From cf233ff5bbc68bd598ef4b81c7b4063548f2eff9 Mon Sep 17 00:00:00 2001 From: Maximilian Albert Date: Thu, 21 Jun 2007 13:01:57 +0000 Subject: First (very limited) version of the 3D box tool; allows for drawing of new boxes in a fixed perspective without any live interaction. (bzr r3084) --- src/tools-switch.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/tools-switch.cpp') diff --git a/src/tools-switch.cpp b/src/tools-switch.cpp index 339326359..bc9655a83 100644 --- a/src/tools-switch.cpp +++ b/src/tools-switch.cpp @@ -27,6 +27,8 @@ #include "sp-path.h" #include "rect-context.h" #include "sp-rect.h" +#include "box3d-context.h" +#include "box3d.h" #include "arc-context.h" #include "sp-ellipse.h" #include "star-context.h" @@ -54,6 +56,7 @@ static char const *const tool_names[] = { "tools.select", "tools.nodes", "tools.shapes.rect", + "tools.shapes.3dbox", "tools.shapes.arc", "tools.shapes.star", "tools.shapes.spiral", @@ -74,6 +77,7 @@ static char const *const tool_ids[] = { "select", "nodes", "rect", + "3dbox", "arc", "star", "spiral", @@ -143,6 +147,12 @@ tools_switch(SPDesktop *dt, int num) inkscape_eventcontext_set(sp_desktop_event_context(dt)); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Drag to create a rectangle. Drag controls to round corners and resize. Click to select.")); break; + case TOOLS_SHAPES_3DBOX: + dt->set_event_context(SP_TYPE_3DBOX_CONTEXT, tool_names[num]); + dt->activate_guides(false); + inkscape_eventcontext_set(sp_desktop_event_context(dt)); + dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Drag to create a 3D box. Drag controls to resize in perspective. Click to select.")); + break; case TOOLS_SHAPES_ARC: dt->set_event_context(SP_TYPE_ARC_CONTEXT, tool_names[num]); dt->activate_guides(false); -- cgit v1.2.3