diff options
| author | Markus Engel <markus.engel@tum.de> | 2013-11-07 20:44:00 +0000 |
|---|---|---|
| committer | Markus Engel <markus.engel@tum.de> | 2013-11-07 20:44:00 +0000 |
| commit | 55b451bf382e0c3d5ed8728e42fbb535acfa8a33 (patch) | |
| tree | 094d9faca06cfffc89a872732db4ac3ef60508d9 /src/draw-context.cpp | |
| parent | Fix for Bug #1247985 (Incorrect implementation of plural forms). (diff) | |
| download | inkscape-55b451bf382e0c3d5ed8728e42fbb535acfa8a33.tar.gz inkscape-55b451bf382e0c3d5ed8728e42fbb535acfa8a33.zip | |
First step of moving tools into appropriate namespaces.
(bzr r12782)
Diffstat (limited to 'src/draw-context.cpp')
| -rw-r--r-- | src/draw-context.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/draw-context.cpp b/src/draw-context.cpp index 365da38ac..8fd52b83e 100644 --- a/src/draw-context.cpp +++ b/src/draw-context.cpp @@ -50,6 +50,10 @@ using Inkscape::DocumentUndo; +namespace Inkscape { +namespace UI { +namespace Tools { + static void spdc_selection_changed(Inkscape::Selection *sel, SPDrawContext *dc); static void spdc_selection_modified(Inkscape::Selection *sel, guint flags, SPDrawContext *dc); @@ -66,7 +70,7 @@ static void spdc_flush_white(SPDrawContext *dc, SPCurve *gc); static void spdc_reset_white(SPDrawContext *dc); static void spdc_free_colors(SPDrawContext *dc); -SPDrawContext::SPDrawContext() : SPEventContext() { +SPDrawContext::SPDrawContext() : ToolBase() { this->selection = 0; this->grab = 0; this->anchor_statusbar = false; @@ -113,7 +117,7 @@ SPDrawContext::~SPDrawContext() { } void SPDrawContext::setup() { - SPEventContext::setup(); + ToolBase::setup(); this->selection = sp_desktop_selection(desktop); @@ -192,7 +196,7 @@ bool SPDrawContext::root_handler(GdkEvent* event) { } if (!ret) { - ret = SPEventContext::root_handler(event); + ret = ToolBase::root_handler(event); } return ret; @@ -398,7 +402,7 @@ static void spdc_attach_selection(SPDrawContext *dc, Inkscape::Selection */*sel* } -void spdc_endpoint_snap_rotation(SPEventContext const *const ec, Geom::Point &p, Geom::Point const &o, +void spdc_endpoint_snap_rotation(ToolBase const *const ec, Geom::Point &p, Geom::Point const &o, guint state) { Inkscape::Preferences *prefs = Inkscape::Preferences::get(); @@ -427,7 +431,7 @@ void spdc_endpoint_snap_rotation(SPEventContext const *const ec, Geom::Point &p, } -void spdc_endpoint_snap_free(SPEventContext const * const ec, Geom::Point& p, boost::optional<Geom::Point> &start_of_line, guint const /*state*/) +void spdc_endpoint_snap_free(ToolBase const * const ec, Geom::Point& p, boost::optional<Geom::Point> &start_of_line, guint const /*state*/) { SPDesktop *dt = SP_EVENT_CONTEXT_DESKTOP(ec); SnapManager &m = dt->namedview->snap_manager; @@ -702,7 +706,7 @@ static void spdc_free_colors(SPDrawContext *dc) } } -void spdc_create_single_dot(SPEventContext *ec, Geom::Point const &pt, char const *tool, guint event_state) { +void spdc_create_single_dot(ToolBase *ec, Geom::Point const &pt, char const *tool, guint event_state) { g_return_if_fail(!strcmp(tool, "/tools/freehand/pen") || !strcmp(tool, "/tools/freehand/pencil")); Glib::ustring tool_path = tool; @@ -765,6 +769,10 @@ void spdc_create_single_dot(SPEventContext *ec, Geom::Point const &pt, char cons DocumentUndo::done(sp_desktop_document(desktop), SP_VERB_NONE, _("Create single dot")); } +} +} +} + /* Local Variables: mode:c++ |
