diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2013-11-13 00:00:04 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2013-11-13 00:00:04 +0000 |
| commit | 152a0caf7e216e7ceafeed20822500c385e3e2df (patch) | |
| tree | a3b5d60e08f3bd8221ba2e50eea80b087e5d541a /src/ui/tools/zoom-tool.cpp | |
| parent | Update to trunk (diff) | |
| parent | fix C++11 compilation. There A LOT of const_casts in this file... :-( (diff) | |
| download | inkscape-152a0caf7e216e7ceafeed20822500c385e3e2df.tar.gz inkscape-152a0caf7e216e7ceafeed20822500c385e3e2df.zip | |
Update to trunk
(bzr r12588.1.26)
Diffstat (limited to '')
| -rw-r--r-- | src/ui/tools/zoom-tool.cpp (renamed from src/zoom-context.cpp) | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/src/zoom-context.cpp b/src/ui/tools/zoom-tool.cpp index 6efc122f7..d4ede1053 100644 --- a/src/zoom-context.cpp +++ b/src/ui/tools/zoom-tool.cpp @@ -24,24 +24,28 @@ #include "preferences.h" #include "selection-chemistry.h" -#include "zoom-context.h" +#include "ui/tools/zoom-tool.h" #include "tool-factory.h" +namespace Inkscape { +namespace UI { +namespace Tools { + namespace { - SPEventContext* createZoomContext() { - return new SPZoomContext(); + ToolBase* createZoomContext() { + return new ZoomTool(); } bool zoomContextRegistered = ToolFactory::instance().registerObject("/tools/zoom", createZoomContext); } -const std::string& SPZoomContext::getPrefsPath() { - return SPZoomContext::prefsPath; +const std::string& ZoomTool::getPrefsPath() { + return ZoomTool::prefsPath; } -const std::string SPZoomContext::prefsPath = "/tools/zoom"; +const std::string ZoomTool::prefsPath = "/tools/zoom"; -SPZoomContext::SPZoomContext() : SPEventContext() { +ZoomTool::ZoomTool() : ToolBase() { this->grabbed = 0; this->cursor_shape = cursor_zoom_xpm; this->hot_x = 6; @@ -49,10 +53,10 @@ SPZoomContext::SPZoomContext() : SPEventContext() { this->escaped = false; } -SPZoomContext::~SPZoomContext() { +ZoomTool::~ZoomTool() { } -void SPZoomContext::finish() { +void ZoomTool::finish() { this->enableGrDrag(false); if (this->grabbed) { @@ -61,7 +65,7 @@ void SPZoomContext::finish() { } } -void SPZoomContext::setup() { +void ZoomTool::setup() { Inkscape::Preferences *prefs = Inkscape::Preferences::get(); if (prefs->getBool("/tools/zoom/selcue")) { @@ -72,10 +76,10 @@ void SPZoomContext::setup() { this->enableGrDrag(); } - SPEventContext::setup(); + ToolBase::setup(); } -bool SPZoomContext::root_handler(GdkEvent* event) { +bool ZoomTool::root_handler(GdkEvent* event) { Inkscape::Preferences *prefs = Inkscape::Preferences::get(); tolerance = prefs->getIntLimited("/options/dragtolerance/value", 0, 0, 100); @@ -224,12 +228,16 @@ bool SPZoomContext::root_handler(GdkEvent* event) { } if (!ret) { - ret = SPEventContext::root_handler(event); + ret = ToolBase::root_handler(event); } return ret; } +} +} +} + /* Local Variables: mode:c++ |
