summaryrefslogtreecommitdiffstats
path: root/src/tools-switch.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2012-05-23 12:00:49 +0000
committertavmjong-free <tavmjong@free.fr>2012-05-23 12:00:49 +0000
commit0ea9b448ee16fe941d46395c2877f4d2e815b9ed (patch)
treea49cb57d691df46475d1e9fe197aeade8b0fa10c /src/tools-switch.cpp
parentCorrect improper flipping of sRGB transform from RGB to BGR with cairo change... (diff)
downloadinkscape-0ea9b448ee16fe941d46395c2877f4d2e815b9ed.tar.gz
inkscape-0ea9b448ee16fe941d46395c2877f4d2e815b9ed.zip
Add Mesh tool (experimental, requires Cario >= 1.11.4, disabled by default).
(bzr r11406)
Diffstat (limited to 'src/tools-switch.cpp')
-rw-r--r--src/tools-switch.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tools-switch.cpp b/src/tools-switch.cpp
index 42eaf4474..cbf269387 100644
--- a/src/tools-switch.cpp
+++ b/src/tools-switch.cpp
@@ -49,6 +49,7 @@
#include "sp-text.h"
#include "sp-flowtext.h"
#include "gradient-context.h"
+#include "mesh-context.h"
#include "zoom-context.h"
#include "measure-context.h"
#include "dropper-context.h"
@@ -75,6 +76,7 @@ static char const *const tool_names[] = {
"/tools/calligraphic",
"/tools/text",
"/tools/gradient",
+ "/tools/mesh",
"/tools/zoom",
"/tools/measure",
"/tools/dropper",
@@ -204,7 +206,14 @@ tools_switch(SPDesktop *dt, int num)
inkscape_eventcontext_set(sp_desktop_event_context(dt));
dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("<b>Drag</b> or <b>double click</b> to create a gradient on selected objects, <b>drag handles</b> to adjust gradients."));
break;
+ case TOOLS_MESH:
+ dt->set_event_context(SP_TYPE_MESH_CONTEXT, tool_names[num]);
+ dt->activate_guides(false);
+ inkscape_eventcontext_set(sp_desktop_event_context(dt));
+ dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("<b>Drag</b> or <b>double click</b> to create a mesh on selected objects, <b>drag handles</b> to adjust meshes."));
+ break;
case TOOLS_ZOOM:
+ std::cout << "tools-switch.cpp: TOOLS_ZOOM" << std::endl;
dt->set_event_context(SP_TYPE_ZOOM_CONTEXT, tool_names[num]);
dt->activate_guides(false);
inkscape_eventcontext_set(sp_desktop_event_context(dt));