From 0ea9b448ee16fe941d46395c2877f4d2e815b9ed Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Wed, 23 May 2012 14:00:49 +0200 Subject: Add Mesh tool (experimental, requires Cario >= 1.11.4, disabled by default). (bzr r11406) --- src/tools-switch.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/tools-switch.cpp') 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, _("Drag or double click to create a gradient on selected objects, drag handles 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, _("Drag or double click to create a mesh on selected objects, drag handles 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)); -- cgit v1.2.3