diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2013-11-08 01:57:36 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2013-11-08 01:57:36 +0000 |
| commit | 3b2966fe4bce6752e47c9180828a628d027d2715 (patch) | |
| tree | e403f77747f8cebd523a48b3a7f7b4a3164254a6 /src/draw-context.cpp | |
| parent | Update to trunk (diff) | |
| parent | First step of moving tools into appropriate namespaces. (diff) | |
| download | inkscape-3b2966fe4bce6752e47c9180828a628d027d2715.tar.gz inkscape-3b2966fe4bce6752e47c9180828a628d027d2715.zip | |
Update to trunk
(bzr r11950.1.193)
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 14f969f3f..714e43783 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; @@ -404,7 +408,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(); @@ -433,7 +437,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; @@ -734,7 +738,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; @@ -797,6 +801,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++ |
