summaryrefslogtreecommitdiffstats
path: root/src/ui/tools
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2013-11-10 02:08:46 +0000
committerJabiertxof <jtx@jtx.marker.es>2013-11-10 02:08:46 +0000
commitca1286aa677b5ff8d80fe274dfa3e759478570b3 (patch)
tree36c7edfa575cea3d3bddfc4b034f7a35a8374ade /src/ui/tools
parentFixing bugs on update to trunk (diff)
parentRevert unintentional change. (diff)
downloadinkscape-ca1286aa677b5ff8d80fe274dfa3e759478570b3.tar.gz
inkscape-ca1286aa677b5ff8d80fe274dfa3e759478570b3.zip
Update to trunk
(bzr r11950.1.195)
Diffstat (limited to '')
-rw-r--r--src/ui/tools/Makefile_insert28
-rw-r--r--src/ui/tools/arc-tool.cpp (renamed from src/arc-context.cpp)4
-rw-r--r--src/ui/tools/arc-tool.h (renamed from src/arc-context.h)2
-rw-r--r--src/ui/tools/box3d-tool.cpp (renamed from src/box3d-context.cpp)2
-rw-r--r--src/ui/tools/box3d-tool.h (renamed from src/box3d-context.h)2
-rw-r--r--src/ui/tools/calligraphic-tool.cpp (renamed from src/dyna-draw-context.cpp)10
-rw-r--r--src/ui/tools/calligraphic-tool.h (renamed from src/dyna-draw-context.h)4
-rw-r--r--src/ui/tools/connector-tool.cpp (renamed from src/connector-context.cpp)2
-rw-r--r--src/ui/tools/connector-tool.h (renamed from src/connector-context.h)2
-rw-r--r--src/ui/tools/dropper-tool.cpp (renamed from src/dropper-context.cpp)4
-rw-r--r--src/ui/tools/dropper-tool.h (renamed from src/dropper-context.h)2
-rw-r--r--src/ui/tools/dynamic-base.cpp (renamed from src/common-context.cpp)12
-rw-r--r--src/ui/tools/dynamic-base.h (renamed from src/common-context.h)8
-rw-r--r--src/ui/tools/eraser-tool.cpp (renamed from src/eraser-context.cpp)8
-rw-r--r--src/ui/tools/eraser-tool.h (renamed from src/eraser-context.h)4
-rw-r--r--src/ui/tools/flood-tool.cpp (renamed from src/flood-context.cpp)2
-rw-r--r--src/ui/tools/flood-tool.h (renamed from src/flood-context.h)2
-rw-r--r--src/ui/tools/freehand-base.cpp (renamed from src/draw-context.cpp)54
-rw-r--r--src/ui/tools/freehand-base.h (renamed from src/draw-context.h)18
-rw-r--r--src/ui/tools/gradient-tool.cpp (renamed from src/gradient-context.cpp)2
-rw-r--r--src/ui/tools/gradient-tool.h (renamed from src/gradient-context.h)2
-rw-r--r--src/ui/tools/lpe-tool.cpp (renamed from src/lpe-tool-context.cpp)2
-rw-r--r--src/ui/tools/lpe-tool.h (renamed from src/lpe-tool-context.h)2
-rw-r--r--src/ui/tools/measure-tool.cpp (renamed from src/measure-context.cpp)4
-rw-r--r--src/ui/tools/measure-tool.h (renamed from src/measure-context.h)2
-rw-r--r--src/ui/tools/mesh-tool.cpp (renamed from src/mesh-context.cpp)2
-rw-r--r--src/ui/tools/mesh-tool.h (renamed from src/mesh-context.h)2
-rw-r--r--src/ui/tools/node-tool.cpp (renamed from src/ui/tool/node-tool.cpp)4
-rw-r--r--src/ui/tools/node-tool.h (renamed from src/ui/tool/node-tool.h)3
-rw-r--r--src/ui/tools/pen-tool.cpp (renamed from src/pen-context.cpp)18
-rw-r--r--src/ui/tools/pen-tool.h (renamed from src/pen-context.h)4
-rw-r--r--src/ui/tools/pencil-tool.cpp (renamed from src/pencil-context.cpp)10
-rw-r--r--src/ui/tools/pencil-tool.h (renamed from src/pencil-context.h)4
-rw-r--r--src/ui/tools/rect-tool.cpp (renamed from src/rect-context.cpp)2
-rw-r--r--src/ui/tools/rect-tool.h (renamed from src/rect-context.h)2
-rw-r--r--src/ui/tools/select-tool.cpp (renamed from src/select-context.cpp)2
-rw-r--r--src/ui/tools/select-tool.h (renamed from src/select-context.h)2
-rw-r--r--src/ui/tools/spiral-tool.cpp (renamed from src/spiral-context.cpp)2
-rw-r--r--src/ui/tools/spiral-tool.h (renamed from src/spiral-context.h)2
-rw-r--r--src/ui/tools/spray-tool.cpp (renamed from src/spray-context.cpp)2
-rw-r--r--src/ui/tools/spray-tool.h (renamed from src/spray-context.h)2
-rw-r--r--src/ui/tools/star-tool.cpp (renamed from src/star-context.cpp)2
-rw-r--r--src/ui/tools/star-tool.h (renamed from src/star-context.h)2
-rw-r--r--src/ui/tools/text-tool.cpp (renamed from src/text-context.cpp)2
-rw-r--r--src/ui/tools/text-tool.h (renamed from src/text-context.h)2
-rw-r--r--src/ui/tools/tool-base.cpp (renamed from src/event-context.cpp)4
-rw-r--r--src/ui/tools/tool-base.h (renamed from src/event-context.h)0
-rw-r--r--src/ui/tools/tweak-tool.cpp (renamed from src/tweak-context.cpp)2
-rw-r--r--src/ui/tools/tweak-tool.h (renamed from src/tweak-context.h)2
-rw-r--r--src/ui/tools/zoom-tool.cpp (renamed from src/zoom-context.cpp)2
-rw-r--r--src/ui/tools/zoom-tool.h (renamed from src/zoom-context.h)2
51 files changed, 148 insertions, 119 deletions
diff --git a/src/ui/tools/Makefile_insert b/src/ui/tools/Makefile_insert
new file mode 100644
index 000000000..cd09a3230
--- /dev/null
+++ b/src/ui/tools/Makefile_insert
@@ -0,0 +1,28 @@
+## Makefile.am fragment sourced by src/Makefile.am.
+
+ink_common_sources += \
+ ui/tools/arc-tool.cpp ui/tools/arc-tool.h \
+ ui/tools/box3d-tool.cpp ui/tools/box3d-tool.h \
+ ui/tools/calligraphic-tool.cpp ui/tools/calligraphic-tool.h \
+ ui/tools/connector-tool.cpp ui/tools/connector-tool.h \
+ ui/tools/dropper-tool.cpp ui/tools/dropper-tool.h \
+ ui/tools/dynamic-base.cpp ui/tools/dynamic-base.h \
+ ui/tools/eraser-tool.cpp ui/tools/eraser-tool.h \
+ ui/tools/flood-tool.cpp ui/tools/flood-tool.h \
+ ui/tools/freehand-base.cpp ui/tools/freehand-base.h \
+ ui/tools/gradient-tool.cpp ui/tools/gradient-tool.h \
+ ui/tools/lpe-tool.cpp ui/tools/lpe-tool.h \
+ ui/tools/measure-tool.cpp ui/tools/measure-tool.h \
+ ui/tools/mesh-tool.cpp ui/tools/mesh-tool.h \
+ ui/tools/node-tool.cpp ui/tools/node-tool.h \
+ ui/tools/pen-tool.cpp ui/tools/pen-tool.h \
+ ui/tools/pencil-tool.cpp ui/tools/pencil-tool.h \
+ ui/tools/rect-tool.cpp ui/tools/rect-tool.h \
+ ui/tools/select-tool.cpp ui/tools/select-tool.h \
+ ui/tools/spiral-tool.cpp ui/tools/spiral-tool.h \
+ ui/tools/spray-tool.cpp ui/tools/spray-tool.h \
+ ui/tools/star-tool.cpp ui/tools/star-tool.h \
+ ui/tools/text-tool.cpp ui/tools/text-tool.h \
+ ui/tools/tool-base.cpp ui/tools/tool-base.h \
+ ui/tools/tweak-tool.cpp ui/tools/tweak-tool.h \
+ ui/tools/zoom-tool.cpp ui/tools/zoom-tool.h \ No newline at end of file
diff --git a/src/arc-context.cpp b/src/ui/tools/arc-tool.cpp
index 4e99953f6..bb7dfa21c 100644
--- a/src/arc-context.cpp
+++ b/src/ui/tools/arc-tool.cpp
@@ -41,9 +41,9 @@
#include "context-fns.h"
#include "verbs.h"
#include "shape-editor.h"
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
-#include "arc-context.h"
+#include "ui/tools/arc-tool.h"
#include "display/sp-canvas-item.h"
using Inkscape::DocumentUndo;
diff --git a/src/arc-context.h b/src/ui/tools/arc-tool.h
index 7d99011d0..eaa50f2b9 100644
--- a/src/arc-context.h
+++ b/src/ui/tools/arc-tool.h
@@ -19,7 +19,7 @@
#include <sigc++/connection.h>
#include <2geom/point.h>
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include "sp-ellipse.h"
diff --git a/src/box3d-context.cpp b/src/ui/tools/box3d-tool.cpp
index a441d45eb..80cc75e79 100644
--- a/src/box3d-context.cpp
+++ b/src/ui/tools/box3d-tool.cpp
@@ -34,7 +34,7 @@
#include "message-context.h"
#include "pixmaps/cursor-3dbox.xpm"
#include "box3d.h"
-#include "box3d-context.h"
+#include "ui/tools/box3d-tool.h"
#include <glibmm/i18n.h>
#include "xml/repr.h"
#include "xml/node-event-vector.h"
diff --git a/src/box3d-context.h b/src/ui/tools/box3d-tool.h
index 4f8032eeb..99bf99a7a 100644
--- a/src/box3d-context.h
+++ b/src/ui/tools/box3d-tool.h
@@ -17,7 +17,7 @@
#include <stddef.h>
#include <sigc++/sigc++.h>
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include "proj_pt.h"
#include "vanishing-point.h"
diff --git a/src/dyna-draw-context.cpp b/src/ui/tools/calligraphic-tool.cpp
index 8fc777712..2c5e6561c 100644
--- a/src/dyna-draw-context.cpp
+++ b/src/ui/tools/calligraphic-tool.cpp
@@ -68,7 +68,7 @@
#include "livarot/Shape.h"
#include "verbs.h"
-#include "dyna-draw-context.h"
+#include "ui/tools/calligraphic-tool.h"
using Inkscape::DocumentUndo;
@@ -105,7 +105,7 @@ const std::string& CalligraphicTool::getPrefsPath() {
const std::string CalligraphicTool::prefsPath = "/tools/calligraphic";
-CalligraphicTool::CalligraphicTool() : SPCommonContext() {
+CalligraphicTool::CalligraphicTool() : DynamicBase() {
this->cursor_shape = cursor_calligraphy_xpm;
this->hot_x = 4;
this->hot_y = 4;
@@ -139,7 +139,7 @@ CalligraphicTool::~CalligraphicTool() {
}
void CalligraphicTool::setup() {
- SPCommonContext::setup();
+ DynamicBase::setup();
this->accumulated = new SPCurve();
this->currentcurve = new SPCurve();
@@ -201,7 +201,7 @@ void CalligraphicTool::set(const Inkscape::Preferences::Entry& val) {
this->keep_selected = val.getBool();
} else {
//pass on up to parent class to handle common attributes.
- SPCommonContext::set(val);
+ DynamicBase::set(val);
}
//g_print("DDC: %g %g %g %g\n", ddc->mass, ddc->drag, ddc->angle, ddc->width);
@@ -903,7 +903,7 @@ bool CalligraphicTool::root_handler(GdkEvent* event) {
// if ((SP_EVENT_CONTEXT_CLASS(sp_dyna_draw_context_parent_class))->root_handler) {
// ret = (SP_EVENT_CONTEXT_CLASS(sp_dyna_draw_context_parent_class))->root_handler(event_context, event);
// }
- ret = SPCommonContext::root_handler(event);
+ ret = DynamicBase::root_handler(event);
}
return ret;
diff --git a/src/dyna-draw-context.h b/src/ui/tools/calligraphic-tool.h
index 5793b1142..926e9d126 100644
--- a/src/dyna-draw-context.h
+++ b/src/ui/tools/calligraphic-tool.h
@@ -18,7 +18,7 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include "common-context.h"
+#include "ui/tools/dynamic-base.h"
#include "splivarot.h"
#define DDC_MIN_PRESSURE 0.0
@@ -33,7 +33,7 @@ namespace Inkscape {
namespace UI {
namespace Tools {
-class CalligraphicTool : public SPCommonContext {
+class CalligraphicTool : public DynamicBase {
public:
CalligraphicTool();
virtual ~CalligraphicTool();
diff --git a/src/connector-context.cpp b/src/ui/tools/connector-tool.cpp
index 6af223b54..36e013ba8 100644
--- a/src/connector-context.cpp
+++ b/src/ui/tools/connector-tool.cpp
@@ -72,7 +72,7 @@
#include <string>
#include <cstring>
-#include "connector-context.h"
+#include "ui/tools/connector-tool.h"
#include "pixmaps/cursor-connector.xpm"
#include "xml/node-event-vector.h"
#include "xml/repr.h"
diff --git a/src/connector-context.h b/src/ui/tools/connector-tool.h
index b568b44fc..7cd6a6dad 100644
--- a/src/connector-context.h
+++ b/src/ui/tools/connector-tool.h
@@ -15,7 +15,7 @@
#include <stddef.h>
#include <sigc++/sigc++.h>
#include <sigc++/connection.h>
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include <2geom/point.h>
#include "libavoid/connector.h"
#include <glibmm/i18n.h>
diff --git a/src/dropper-context.cpp b/src/ui/tools/dropper-tool.cpp
index cf2f6b6c9..9c47b50e9 100644
--- a/src/dropper-context.cpp
+++ b/src/ui/tools/dropper-tool.cpp
@@ -42,10 +42,10 @@
#include "pixmaps/cursor-dropper-f.xpm"
#include "pixmaps/cursor-dropper-s.xpm"
-#include "dropper-context.h"
+#include "ui/tools/dropper-tool.h"
#include "message-context.h"
#include "verbs.h"
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
using Inkscape::DocumentUndo;
diff --git a/src/dropper-context.h b/src/ui/tools/dropper-tool.h
index a56720693..dd6f25bb6 100644
--- a/src/dropper-context.h
+++ b/src/ui/tools/dropper-tool.h
@@ -12,7 +12,7 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#define SP_DROPPER_CONTEXT(obj) (dynamic_cast<Inkscape::UI::Tools::DropperTool*>((Inkscape::UI::Tools::ToolBase*)obj))
#define SP_IS_DROPPER_CONTEXT(obj) (dynamic_cast<const Inkscape::UI::Tools::DropperTool*>((const Inkscape::UI::Tools::ToolBase*)obj) != NULL)
diff --git a/src/common-context.cpp b/src/ui/tools/dynamic-base.cpp
index e896d0829..cec58dce9 100644
--- a/src/common-context.cpp
+++ b/src/ui/tools/dynamic-base.cpp
@@ -1,5 +1,5 @@
-#include "common-context.h"
+#include "ui/tools/dynamic-base.h"
#include <gtk/gtk.h>
@@ -23,7 +23,7 @@ namespace Inkscape {
namespace UI {
namespace Tools {
-SPCommonContext::SPCommonContext() :
+DynamicBase::DynamicBase() :
ToolBase(),
accumulated(NULL),
segments(NULL),
@@ -60,7 +60,7 @@ SPCommonContext::SPCommonContext() :
{
}
-SPCommonContext::~SPCommonContext() {
+DynamicBase::~DynamicBase() {
if (this->accumulated) {
this->accumulated = this->accumulated->unref();
this->accumulated = 0;
@@ -92,7 +92,7 @@ SPCommonContext::~SPCommonContext() {
}
}
-void SPCommonContext::set(const Inkscape::Preferences::Entry& value) {
+void DynamicBase::set(const Inkscape::Preferences::Entry& value) {
Glib::ustring path = value.getEntryName();
// ignore preset modifications
@@ -129,7 +129,7 @@ void SPCommonContext::set(const Inkscape::Preferences::Entry& value) {
}
/* Get normalized point */
-Geom::Point SPCommonContext::getNormalizedPoint(Geom::Point v) const {
+Geom::Point DynamicBase::getNormalizedPoint(Geom::Point v) const {
Geom::Rect drect = this->desktop->get_display_area();
double const max = MAX ( drect.dimensions()[Geom::X], drect.dimensions()[Geom::Y] );
@@ -138,7 +138,7 @@ Geom::Point SPCommonContext::getNormalizedPoint(Geom::Point v) const {
}
/* Get view point */
-Geom::Point SPCommonContext::getViewPoint(Geom::Point n) const {
+Geom::Point DynamicBase::getViewPoint(Geom::Point n) const {
Geom::Rect drect = this->desktop->get_display_area();
double const max = MAX ( drect.dimensions()[Geom::X], drect.dimensions()[Geom::Y] );
diff --git a/src/common-context.h b/src/ui/tools/dynamic-base.h
index 658d2ef17..9218eabd3 100644
--- a/src/common-context.h
+++ b/src/ui/tools/dynamic-base.h
@@ -19,7 +19,7 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include "display/curve.h"
#include <2geom/point.h>
@@ -29,10 +29,10 @@ namespace Inkscape {
namespace UI {
namespace Tools {
-class SPCommonContext : public ToolBase {
+class DynamicBase : public ToolBase {
public:
- SPCommonContext();
- virtual ~SPCommonContext();
+ DynamicBase();
+ virtual ~DynamicBase();
virtual void set(const Inkscape::Preferences::Entry& val);
diff --git a/src/eraser-context.cpp b/src/ui/tools/eraser-tool.cpp
index 6445ac3d5..270987d27 100644
--- a/src/eraser-context.cpp
+++ b/src/ui/tools/eraser-tool.cpp
@@ -67,7 +67,7 @@
#include <2geom/math-utils.h>
#include <2geom/pathvector.h>
-#include "eraser-context.h"
+#include "ui/tools/eraser-tool.h"
using Inkscape::DocumentUndo;
@@ -103,7 +103,7 @@ const std::string& EraserTool::getPrefsPath() {
const std::string EraserTool::prefsPath = "/tools/eraser";
-EraserTool::EraserTool() : SPCommonContext() {
+EraserTool::EraserTool() : DynamicBase() {
this->cursor_shape = cursor_eraser_xpm;
this->hot_x = 4;
this->hot_y = 4;
@@ -113,7 +113,7 @@ EraserTool::~EraserTool() {
}
void EraserTool::setup() {
- SPCommonContext::setup();
+ DynamicBase::setup();
this->accumulated = new SPCurve();
this->currentcurve = new SPCurve();
@@ -618,7 +618,7 @@ bool EraserTool::root_handler(GdkEvent* event) {
}
if (!ret) {
- ret = SPCommonContext::root_handler(event);
+ ret = DynamicBase::root_handler(event);
}
return ret;
diff --git a/src/eraser-context.h b/src/ui/tools/eraser-tool.h
index a3ce4a241..eb7eb16e8 100644
--- a/src/eraser-context.h
+++ b/src/ui/tools/eraser-tool.h
@@ -19,7 +19,7 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include "common-context.h"
+#include "ui/tools/dynamic-base.h"
#define ERC_MIN_PRESSURE 0.0
#define ERC_MAX_PRESSURE 1.0
@@ -33,7 +33,7 @@ namespace Inkscape {
namespace UI {
namespace Tools {
-class EraserTool : public SPCommonContext {
+class EraserTool : public DynamicBase {
public:
EraserTool();
virtual ~EraserTool();
diff --git a/src/flood-context.cpp b/src/ui/tools/flood-tool.cpp
index 1f45f1d63..0b72bc9f2 100644
--- a/src/flood-context.cpp
+++ b/src/ui/tools/flood-tool.cpp
@@ -41,7 +41,7 @@
#include "display/sp-canvas.h"
#include "document.h"
#include "document-undo.h"
-#include "flood-context.h"
+#include "ui/tools/flood-tool.h"
#include "livarot/Path.h"
#include "livarot/Shape.h"
#include "macros.h"
diff --git a/src/flood-context.h b/src/ui/tools/flood-tool.h
index 93d2c12de..77dd2f13a 100644
--- a/src/flood-context.h
+++ b/src/ui/tools/flood-tool.h
@@ -14,7 +14,7 @@
#include <stddef.h>
#include <sigc++/sigc++.h>
#include <gtk/gtk.h>
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#define SP_FLOOD_CONTEXT(obj) (dynamic_cast<Inkscape::UI::Tools::FloodTool*>((Inkscape::UI::Tools::ToolBase*)obj))
#define SP_IS_FLOOD_CONTEXT(obj) (dynamic_cast<const Inkscape::UI::Tools::FloodTool*>((const Inkscape::UI::Tools::ToolBase*)obj) != NULL)
diff --git a/src/draw-context.cpp b/src/ui/tools/freehand-base.cpp
index 714e43783..fa9eaa6b4 100644
--- a/src/draw-context.cpp
+++ b/src/ui/tools/freehand-base.cpp
@@ -33,8 +33,8 @@
#include "draw-anchor.h"
#include "macros.h"
#include "message-stack.h"
-#include "pen-context.h"
-#include "lpe-tool-context.h"
+#include "ui/tools/pen-tool.h"
+#include "ui/tools/lpe-tool.h"
#include "preferences.h"
#include "selection.h"
#include "selection-chemistry.h"
@@ -44,7 +44,7 @@
#include "live_effects/lpe-powerstroke.h"
#include "style.h"
#include "ui/control-manager.h"
-#include "draw-context.h"
+#include "ui/tools/freehand-base.h"
#include <gdk/gdkkeysyms.h>
@@ -54,10 +54,10 @@ 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);
+static void spdc_selection_changed(Inkscape::Selection *sel, FreehandBase *dc);
+static void spdc_selection_modified(Inkscape::Selection *sel, guint flags, FreehandBase *dc);
-static void spdc_attach_selection(SPDrawContext *dc, Inkscape::Selection *sel);
+static void spdc_attach_selection(FreehandBase *dc, Inkscape::Selection *sel);
/**
* Flushes white curve(s) and additional curve into object.
@@ -65,12 +65,12 @@ static void spdc_attach_selection(SPDrawContext *dc, Inkscape::Selection *sel);
* No cleaning of colored curves - this has to be done by caller
* No rereading of white data, so if you cannot rely on ::modified, do it in caller
*/
-static void spdc_flush_white(SPDrawContext *dc, SPCurve *gc);
+static void spdc_flush_white(FreehandBase *dc, SPCurve *gc);
-static void spdc_reset_white(SPDrawContext *dc);
-static void spdc_free_colors(SPDrawContext *dc);
+static void spdc_reset_white(FreehandBase *dc);
+static void spdc_free_colors(FreehandBase *dc);
-SPDrawContext::SPDrawContext() : ToolBase() {
+FreehandBase::FreehandBase() : ToolBase() {
this->selection = 0;
this->grab = 0;
this->anchor_statusbar = false;
@@ -103,7 +103,7 @@ SPDrawContext::SPDrawContext() : ToolBase() {
this->waiting_LPE_type = Inkscape::LivePathEffect::INVALID_LPE;
}
-SPDrawContext::~SPDrawContext() {
+FreehandBase::~FreehandBase() {
if (this->grab) {
sp_canvas_item_ungrab(this->grab, GDK_CURRENT_TIME);
this->grab = NULL;
@@ -116,7 +116,7 @@ SPDrawContext::~SPDrawContext() {
spdc_free_colors(this);
}
-void SPDrawContext::setup() {
+void FreehandBase::setup() {
ToolBase::setup();
this->selection = sp_desktop_selection(desktop);
@@ -154,7 +154,7 @@ void SPDrawContext::setup() {
spdc_attach_selection(this, this->selection);
}
-void SPDrawContext::finish() {
+void FreehandBase::finish() {
this->sel_changed_connection.disconnect();
this->sel_modified_connection.disconnect();
@@ -169,10 +169,10 @@ void SPDrawContext::finish() {
spdc_free_colors(this);
}
-void SPDrawContext::set(const Inkscape::Preferences::Entry& /*value*/) {
+void FreehandBase::set(const Inkscape::Preferences::Entry& /*value*/) {
}
-bool SPDrawContext::root_handler(GdkEvent* event) {
+bool FreehandBase::root_handler(GdkEvent* event) {
gint ret = FALSE;
switch (event->type) {
@@ -202,14 +202,14 @@ bool SPDrawContext::root_handler(GdkEvent* event) {
return ret;
}
-static Glib::ustring const tool_name(SPDrawContext *dc)
+static Glib::ustring const tool_name(FreehandBase *dc)
{
return ( SP_IS_PEN_CONTEXT(dc)
? "/tools/freehand/pen"
: "/tools/freehand/pencil" );
}
-static void spdc_paste_curve_as_freehand_shape(const SPCurve *c, SPDrawContext *dc, SPItem *item)
+static void spdc_paste_curve_as_freehand_shape(const SPCurve *c, FreehandBase *dc, SPItem *item)
{
using namespace Inkscape::LivePathEffect;
@@ -221,7 +221,7 @@ static void spdc_paste_curve_as_freehand_shape(const SPCurve *c, SPDrawContext *
static_cast<LPEPatternAlongPath*>(lpe)->pattern.paste_param_path(svgd);
}
-static void spdc_apply_powerstroke_shape(const std::vector<Geom::Point> & points, SPDrawContext *dc, SPItem *item)
+static void spdc_apply_powerstroke_shape(const std::vector<Geom::Point> & points, FreehandBase *dc, SPItem *item)
{
using namespace Inkscape::LivePathEffect;
@@ -238,7 +238,7 @@ static void spdc_apply_powerstroke_shape(const std::vector<Geom::Point> & points
lpe->getRepr()->setAttribute("interpolator_beta", "0.2");
}
-static void spdc_check_for_and_apply_waiting_LPE(SPDrawContext *dc, SPItem *item, SPCurve *curve)
+static void spdc_check_for_and_apply_waiting_LPE(FreehandBase *dc, SPItem *item, SPCurve *curve)
{
using namespace Inkscape::LivePathEffect;
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
@@ -350,7 +350,7 @@ static void spdc_check_for_and_apply_waiting_LPE(SPDrawContext *dc, SPItem *item
* Selection handlers
*/
-static void spdc_selection_changed(Inkscape::Selection *sel, SPDrawContext *dc)
+static void spdc_selection_changed(Inkscape::Selection *sel, FreehandBase *dc)
{
if (dc->attach) {
spdc_attach_selection(dc, sel);
@@ -359,14 +359,14 @@ static void spdc_selection_changed(Inkscape::Selection *sel, SPDrawContext *dc)
/* fixme: We have to ensure this is not delayed (Lauris) */
-static void spdc_selection_modified(Inkscape::Selection *sel, guint /*flags*/, SPDrawContext *dc)
+static void spdc_selection_modified(Inkscape::Selection *sel, guint /*flags*/, FreehandBase *dc)
{
if (dc->attach) {
spdc_attach_selection(dc, sel);
}
}
-static void spdc_attach_selection(SPDrawContext *dc, Inkscape::Selection */*sel*/)
+static void spdc_attach_selection(FreehandBase *dc, Inkscape::Selection */*sel*/)
{
// We reset white and forget white/start/end anchors
spdc_reset_white(dc);
@@ -465,7 +465,7 @@ static SPCurve *reverse_then_unref(SPCurve *orig)
return ret;
}
-void spdc_concat_colors_and_flush(SPDrawContext *dc, gboolean forceclosed)
+void spdc_concat_colors_and_flush(FreehandBase *dc, gboolean forceclosed)
{
// Concat RBG
SPCurve *c = dc->green_curve;
@@ -560,7 +560,7 @@ void spdc_concat_colors_and_flush(SPDrawContext *dc, gboolean forceclosed)
c->unref();
}
-static void spdc_flush_white(SPDrawContext *dc, SPCurve *gc)
+static void spdc_flush_white(FreehandBase *dc, SPCurve *gc)
{
SPCurve *c;
@@ -641,7 +641,7 @@ static void spdc_flush_white(SPDrawContext *dc, SPCurve *gc)
doc->ensureUpToDate();
}
-SPDrawAnchor *spdc_test_inside(SPDrawContext *dc, Geom::Point p)
+SPDrawAnchor *spdc_test_inside(FreehandBase *dc, Geom::Point p)
{
SPDrawAnchor *active = NULL;
@@ -675,7 +675,7 @@ SPDrawAnchor *spdc_test_inside(SPDrawContext *dc, Geom::Point p)
return active;
}
-static void spdc_reset_white(SPDrawContext *dc)
+static void spdc_reset_white(FreehandBase *dc)
{
if (dc->white_item) {
// We do not hold refcount
@@ -691,7 +691,7 @@ static void spdc_reset_white(SPDrawContext *dc)
}
}
-static void spdc_free_colors(SPDrawContext *dc)
+static void spdc_free_colors(FreehandBase *dc)
{
// Red
if (dc->red_bpath) {
diff --git a/src/draw-context.h b/src/ui/tools/freehand-base.h
index 873a65bcf..7d60e217f 100644
--- a/src/draw-context.h
+++ b/src/ui/tools/freehand-base.h
@@ -17,13 +17,13 @@
#include <stddef.h>
#include <sigc++/sigc++.h>
#include <2geom/point.h>
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include "live_effects/effect.h"
/* Freehand context */
-#define SP_DRAW_CONTEXT(obj) (dynamic_cast<Inkscape::UI::Tools::SPDrawContext*>((Inkscape::UI::Tools::ToolBase*)obj))
-#define SP_IS_DRAW_CONTEXT(obj) (dynamic_cast<const Inkscape::UI::Tools::SPDrawContext*>((const Inkscape::UI::Tools::ToolBase*)obj) != NULL)
+#define SP_DRAW_CONTEXT(obj) (dynamic_cast<Inkscape::UI::Tools::FreehandBase*>((Inkscape::UI::Tools::ToolBase*)obj))
+#define SP_IS_DRAW_CONTEXT(obj) (dynamic_cast<const Inkscape::UI::Tools::FreehandBase*>((const Inkscape::UI::Tools::ToolBase*)obj) != NULL)
struct SPDrawAnchor;
namespace Inkscape
@@ -35,10 +35,10 @@ namespace Inkscape {
namespace UI {
namespace Tools {
-class SPDrawContext : public ToolBase {
+class FreehandBase : public ToolBase {
public:
- SPDrawContext();
- virtual ~SPDrawContext();
+ FreehandBase();
+ virtual ~FreehandBase();
Inkscape::Selection *selection;
SPCanvasItem *grab;
@@ -95,14 +95,14 @@ protected:
/**
* Returns FIRST active anchor (the activated one).
*/
-SPDrawAnchor *spdc_test_inside(SPDrawContext *dc, Geom::Point p);
+SPDrawAnchor *spdc_test_inside(FreehandBase *dc, Geom::Point p);
/**
* Concats red, blue and green.
* If any anchors are defined, process these, optionally removing curves from white list
* Invoke _flush_white to write result back to object.
*/
-void spdc_concat_colors_and_flush(SPDrawContext *dc, gboolean forceclosed);
+void spdc_concat_colors_and_flush(FreehandBase *dc, gboolean forceclosed);
/**
* Snaps node or handle to PI/rotationsnapsperpi degree increments.
@@ -120,7 +120,7 @@ void spdc_endpoint_snap_free(ToolBase const *ec, Geom::Point &p, boost::optional
* If we have an item and a waiting LPE, apply the effect to the item
* (spiro spline mode is treated separately).
*/
-void spdc_check_for_and_apply_waiting_LPE(SPDrawContext *dc, SPItem *item);
+void spdc_check_for_and_apply_waiting_LPE(FreehandBase *dc, SPItem *item);
/**
* Create a single dot represented by a circle.
diff --git a/src/gradient-context.cpp b/src/ui/tools/gradient-tool.cpp
index 3a0261cc7..e4ab7b424 100644
--- a/src/gradient-context.cpp
+++ b/src/ui/tools/gradient-tool.cpp
@@ -28,7 +28,7 @@
#include "message-stack.h"
#include "pixmaps/cursor-gradient.xpm"
#include "pixmaps/cursor-gradient-add.xpm"
-#include "gradient-context.h"
+#include "ui/tools/gradient-tool.h"
#include "gradient-chemistry.h"
#include <glibmm/i18n.h>
#include "preferences.h"
diff --git a/src/gradient-context.h b/src/ui/tools/gradient-tool.h
index 5530791df..6fe3bca9f 100644
--- a/src/gradient-context.h
+++ b/src/ui/tools/gradient-tool.h
@@ -17,7 +17,7 @@
#include <stddef.h>
#include <sigc++/sigc++.h>
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#define SP_GRADIENT_CONTEXT(obj) (dynamic_cast<Inkscape::UI::Tools::GradientTool*>((Inkscape::UI::Tools::ToolBase*)obj))
#define SP_IS_GRADIENT_CONTEXT(obj) (dynamic_cast<const Inkscape::UI::Tools::GradientTool*>((const Inkscape::UI::Tools::ToolBase*)obj) != NULL)
diff --git a/src/lpe-tool-context.cpp b/src/ui/tools/lpe-tool.cpp
index 3d004f821..a5406f1c5 100644
--- a/src/lpe-tool-context.cpp
+++ b/src/ui/tools/lpe-tool.cpp
@@ -39,7 +39,7 @@
#include "sp-path.h"
#include "util/units.h"
-#include "lpe-tool-context.h"
+#include "ui/tools/lpe-tool.h"
using Inkscape::Util::unit_table;
using Inkscape::UI::Tools::PenTool;
diff --git a/src/lpe-tool-context.h b/src/ui/tools/lpe-tool.h
index 8be416e9b..df78c205c 100644
--- a/src/lpe-tool-context.h
+++ b/src/ui/tools/lpe-tool.h
@@ -15,7 +15,7 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include "pen-context.h"
+#include "ui/tools/pen-tool.h"
#define SP_LPETOOL_CONTEXT(obj) (dynamic_cast<Inkscape::UI::Tools::LpeTool*>((Inkscape::UI::Tools::ToolBase*)obj))
#define SP_IS_LPETOOL_CONTEXT(obj) (dynamic_cast<const Inkscape::UI::Tools::LpeTool*>((const Inkscape::UI::Tools::ToolBase*)obj) != NULL)
diff --git a/src/measure-context.cpp b/src/ui/tools/measure-tool.cpp
index 11161dc8f..0d823dfda 100644
--- a/src/measure-context.cpp
+++ b/src/ui/tools/measure-tool.cpp
@@ -30,8 +30,8 @@
#include "preferences.h"
#include "inkscape.h"
#include "desktop-handles.h"
-#include "measure-context.h"
-#include "draw-context.h"
+#include "ui/tools/measure-tool.h"
+#include "ui/tools/freehand-base.h"
#include "display/canvas-text.h"
#include "path-chemistry.h"
#include "2geom/line.h"
diff --git a/src/measure-context.h b/src/ui/tools/measure-tool.h
index 97f896e0b..9701ba6ea 100644
--- a/src/measure-context.h
+++ b/src/ui/tools/measure-tool.h
@@ -12,7 +12,7 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include <2geom/point.h>
#include <boost/optional.hpp>
diff --git a/src/mesh-context.cpp b/src/ui/tools/mesh-tool.cpp
index 6b5542e3f..4e7617f44 100644
--- a/src/mesh-context.cpp
+++ b/src/ui/tools/mesh-tool.cpp
@@ -47,7 +47,7 @@
#include "pixmaps/cursor-gradient-add.xpm"
// Mesh specific
-#include "mesh-context.h"
+#include "ui/tools/mesh-tool.h"
#include "sp-mesh-gradient.h"
#include "display/sp-ctrlcurve.h"
diff --git a/src/mesh-context.h b/src/ui/tools/mesh-tool.h
index a8c35e4d8..d952c9010 100644
--- a/src/mesh-context.h
+++ b/src/ui/tools/mesh-tool.h
@@ -19,7 +19,7 @@
#include <stddef.h>
#include <sigc++/sigc++.h>
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#define SP_MESH_CONTEXT(obj) (dynamic_cast<Inkscape::UI::Tools::MeshTool*>((Inkscape::UI::Tools::ToolBase*)obj))
#define SP_IS_MESH_CONTEXT(obj) (dynamic_cast<const Inkscape::UI::Tools::MeshTool*>((const Inkscape::UI::Tools::ToolBase*)obj) != NULL)
diff --git a/src/ui/tool/node-tool.cpp b/src/ui/tools/node-tool.cpp
index 2eeab7c1b..8a950b528 100644
--- a/src/ui/tool/node-tool.cpp
+++ b/src/ui/tools/node-tool.cpp
@@ -10,7 +10,7 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include "curve-drag-point.h"
+#include "ui/tool/curve-drag-point.h"
#include <glib/gi18n.h>
#include "desktop.h"
#include "desktop-handles.h"
@@ -30,7 +30,7 @@
#include "sp-path.h"
#include "sp-text.h"
#include "ui/control-manager.h"
-#include "ui/tool/node-tool.h"
+#include "ui/tools/node-tool.h"
#include "ui/tool/control-point-selection.h"
#include "ui/tool/event-utils.h"
#include "ui/tool/manipulator.h"
diff --git a/src/ui/tool/node-tool.h b/src/ui/tools/node-tool.h
index 2e5aa39f3..4d15ab70e 100644
--- a/src/ui/tool/node-tool.h
+++ b/src/ui/tools/node-tool.h
@@ -13,8 +13,7 @@
#include <boost/ptr_container/ptr_map.hpp>
#include <glib.h>
-#include "event-context.h"
-#include "selection.h"
+#include "ui/tools/tool-base.h"
namespace Inkscape {
namespace Display {
diff --git a/src/pen-context.cpp b/src/ui/tools/pen-tool.cpp
index bb263382a..32b1b47ef 100644
--- a/src/pen-context.cpp
+++ b/src/ui/tools/pen-tool.cpp
@@ -19,7 +19,9 @@
#include <gdk/gdkkeysyms.h>
#include <cstring>
#include <string>
-#include "pen-context.h"
+
+
+#include "ui/tools/pen-tool.h"
#include "sp-namedview.h"
#include "desktop.h"
#include "desktop-handles.h"
@@ -149,7 +151,7 @@ const std::string& PenTool::getPrefsPath() {
const std::string PenTool::prefsPath = "/tools/freehand/pen";
-PenTool::PenTool() : SPDrawContext() {
+PenTool::PenTool() : FreehandBase() {
this->polylines_only = false;
this->polylines_paraxial = false;
this->expecting_clicks_for_LPE = 0;
@@ -224,7 +226,7 @@ void sp_pen_context_set_mode(PenTool *const pc, guint mode) {
* Callback to initialize PenTool object.
*/
void PenTool::setup() {
- SPDrawContext::setup();
+ FreehandBase::setup();
ControlManager &mgr = ControlManager::getManager();
@@ -280,7 +282,7 @@ void PenTool::finish() {
pen_cancel(this);
}
- SPDrawContext::finish();
+ FreehandBase::finish();
}
/**
@@ -355,7 +357,7 @@ bool PenTool::item_handler(SPItem* item, GdkEvent* event) {
}
if (!ret) {
- ret = SPDrawContext::item_handler(item, event);
+ ret = FreehandBase::item_handler(item, event);
}
return ret;
@@ -393,7 +395,7 @@ bool PenTool::root_handler(GdkEvent* event) {
}
if (!ret) {
- ret = SPDrawContext::root_handler(event);
+ ret = FreehandBase::root_handler(event);
}
return ret;
@@ -409,7 +411,7 @@ static gint pen_handle_button_press(PenTool *const pc, GdkEventButton const &bev
return FALSE;
}
- SPDrawContext * const dc = SP_DRAW_CONTEXT(pc);
+ FreehandBase * const dc = SP_DRAW_CONTEXT(pc);
SPDesktop * const desktop = SP_EVENT_CONTEXT_DESKTOP(dc);
Geom::Point const event_w(bevent.x, bevent.y);
Geom::Point event_dt(desktop->w2d(event_w));
@@ -765,7 +767,7 @@ static gint pen_handle_button_release(PenTool *const pc, GdkEventButton const &r
ToolBase *event_context = SP_EVENT_CONTEXT(pc);
if ( revent.button == 1 && !event_context->space_panning) {
- SPDrawContext *dc = SP_DRAW_CONTEXT (pc);
+ FreehandBase *dc = SP_DRAW_CONTEXT (pc);
Geom::Point const event_w(revent.x,
revent.y);
diff --git a/src/pen-context.h b/src/ui/tools/pen-tool.h
index f26fe7ef2..553e4c557 100644
--- a/src/pen-context.h
+++ b/src/ui/tools/pen-tool.h
@@ -5,7 +5,7 @@
* PenTool: a context for pen tool events.
*/
-#include "draw-context.h"
+#include "ui/tools/freehand-base.h"
#include "live_effects/effect.h"
#define SP_PEN_CONTEXT(obj) (dynamic_cast<Inkscape::UI::Tools::PenTool*>((Inkscape::UI::Tools::ToolBase*)obj))
@@ -20,7 +20,7 @@ namespace Tools {
/**
* PenTool: a context for pen tool events.
*/
-class PenTool : public SPDrawContext {
+class PenTool : public FreehandBase {
public:
PenTool();
virtual ~PenTool();
diff --git a/src/pencil-context.cpp b/src/ui/tools/pencil-tool.cpp
index 57377a5ed..ff14d61ec 100644
--- a/src/pencil-context.cpp
+++ b/src/ui/tools/pencil-tool.cpp
@@ -18,7 +18,7 @@
#include <gdk/gdkkeysyms.h>
-#include "pencil-context.h"
+#include "ui/tools/pencil-tool.h"
#include "desktop.h"
#include "desktop-handles.h"
#include "selection.h"
@@ -84,7 +84,7 @@ const std::string& PencilTool::getPrefsPath() {
const std::string PencilTool::prefsPath = "/tools/freehand/pencil";
PencilTool::PencilTool() :
- SPDrawContext(),
+ FreehandBase(),
p(),
npoints(0),
state(SP_PENCIL_CONTEXT_IDLE),
@@ -105,7 +105,7 @@ void PencilTool::setup() {
this->enableSelectionCue();
}
- SPDrawContext::setup();
+ FreehandBase::setup();
this->is_drawing = false;
this->anchor_statusbar = false;
@@ -164,7 +164,7 @@ bool PencilTool::root_handler(GdkEvent* event) {
}
if (!ret) {
- ret = SPDrawContext::root_handler(event);
+ ret = FreehandBase::root_handler(event);
}
return ret;
@@ -177,7 +177,7 @@ pencil_handle_button_press(PencilTool *const pc, GdkEventButton const &bevent)
ToolBase *event_context = SP_EVENT_CONTEXT(pc);
if ( bevent.button == 1 && !event_context->space_panning) {
- SPDrawContext *dc = SP_DRAW_CONTEXT (pc);
+ FreehandBase *dc = SP_DRAW_CONTEXT (pc);
SPDesktop *desktop = SP_EVENT_CONTEXT_DESKTOP(dc);
Inkscape::Selection *selection = sp_desktop_selection(desktop);
diff --git a/src/pencil-context.h b/src/ui/tools/pencil-tool.h
index ad6ed23b9..6ced9eb56 100644
--- a/src/pencil-context.h
+++ b/src/ui/tools/pencil-tool.h
@@ -5,7 +5,7 @@
* PencilTool: a context for pencil tool events
*/
-#include "draw-context.h"
+#include "ui/tools/freehand-base.h"
#define SP_PENCIL_CONTEXT(obj) (dynamic_cast<Inkscape::UI::Tools::PencilTool*>((ToolBase*)obj))
#define SP_IS_PENCIL_CONTEXT(obj) (dynamic_cast<const Inkscape::UI::Tools::PencilTool*>((const ToolBase*)obj) != NULL)
@@ -24,7 +24,7 @@ enum PencilState {
/**
* PencilTool: a context for pencil tool events
*/
-class PencilTool : public SPDrawContext {
+class PencilTool : public FreehandBase {
public:
PencilTool();
virtual ~PencilTool();
diff --git a/src/rect-context.cpp b/src/ui/tools/rect-tool.cpp
index 95a7f1f2d..263fdea84 100644
--- a/src/rect-context.cpp
+++ b/src/ui/tools/rect-tool.cpp
@@ -34,7 +34,7 @@
#include "desktop-style.h"
#include "message-context.h"
#include "pixmaps/cursor-rect.xpm"
-#include "rect-context.h"
+#include "ui/tools/rect-tool.h"
#include <glibmm/i18n.h>
#include "xml/repr.h"
#include "xml/node-event-vector.h"
diff --git a/src/rect-context.h b/src/ui/tools/rect-tool.h
index cf1682620..a50fd7b24 100644
--- a/src/rect-context.h
+++ b/src/ui/tools/rect-tool.h
@@ -17,7 +17,7 @@
#include <stddef.h>
#include <sigc++/sigc++.h>
#include <2geom/point.h>
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include "sp-rect.h"
diff --git a/src/select-context.cpp b/src/ui/tools/select-tool.cpp
index 11b2e6298..498882417 100644
--- a/src/select-context.cpp
+++ b/src/ui/tools/select-tool.cpp
@@ -32,7 +32,7 @@
#include "pixmaps/handles.xpm"
#include <glibmm/i18n.h>
-#include "select-context.h"
+#include "ui/tools/select-tool.h"
#include "selection-chemistry.h"
#ifdef WITH_DBUS
#include "extension/dbus/document-interface.h"
diff --git a/src/select-context.h b/src/ui/tools/select-tool.h
index ed4c02648..b26fc03bc 100644
--- a/src/select-context.h
+++ b/src/ui/tools/select-tool.h
@@ -12,7 +12,7 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include <gtk/gtk.h>
#define SP_SELECT_CONTEXT(obj) (dynamic_cast<Inkscape::UI::Tools::SelectTool*>((Inkscape::UI::Tools::ToolBase*)obj))
diff --git a/src/spiral-context.cpp b/src/ui/tools/spiral-tool.cpp
index d8e51c91e..3199ee06e 100644
--- a/src/spiral-context.cpp
+++ b/src/ui/tools/spiral-tool.cpp
@@ -33,7 +33,7 @@
#include "desktop-style.h"
#include "message-context.h"
#include "pixmaps/cursor-spiral.xpm"
-#include "spiral-context.h"
+#include "ui/tools/spiral-tool.h"
#include <glibmm/i18n.h>
#include "xml/repr.h"
#include "xml/node-event-vector.h"
diff --git a/src/spiral-context.h b/src/ui/tools/spiral-tool.h
index e6b5eeb0c..416aeb7e4 100644
--- a/src/spiral-context.h
+++ b/src/ui/tools/spiral-tool.h
@@ -19,7 +19,7 @@
#include <stddef.h>
#include <sigc++/sigc++.h>
#include <2geom/point.h>
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include "sp-spiral.h"
diff --git a/src/spray-context.cpp b/src/ui/tools/spray-tool.cpp
index 5a2346dab..0ded1e44b 100644
--- a/src/spray-context.cpp
+++ b/src/ui/tools/spray-tool.cpp
@@ -63,7 +63,7 @@
#include "sp-item-transform.h"
#include "filter-chemistry.h"
-#include "spray-context.h"
+#include "ui/tools/spray-tool.h"
#include "helper/action.h"
#include "verbs.h"
diff --git a/src/spray-context.h b/src/ui/tools/spray-tool.h
index ce03a8bc0..e7362fd50 100644
--- a/src/spray-context.h
+++ b/src/ui/tools/spray-tool.h
@@ -19,7 +19,7 @@
*/
#include <2geom/point.h>
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#define SP_SPRAY_CONTEXT(obj) (dynamic_cast<Inkscape::UI::Tools::SprayTool*>((Inkscape::UI::Tools::ToolBase*)obj))
#define SP_IS_SPRAY_CONTEXT(obj) (dynamic_cast<const Inkscape::UI::Tools::SprayTool*>((const Inkscape::UI::Tools::ToolBase*)obj) != NULL)
diff --git a/src/star-context.cpp b/src/ui/tools/star-tool.cpp
index 69eb40370..b5d8c4418 100644
--- a/src/star-context.cpp
+++ b/src/ui/tools/star-tool.cpp
@@ -45,7 +45,7 @@
#include "verbs.h"
#include "display/sp-canvas-item.h"
-#include "star-context.h"
+#include "ui/tools/star-tool.h"
using Inkscape::DocumentUndo;
diff --git a/src/star-context.h b/src/ui/tools/star-tool.h
index 3d792206a..da3774e68 100644
--- a/src/star-context.h
+++ b/src/ui/tools/star-tool.h
@@ -17,7 +17,7 @@
#include <stddef.h>
#include <sigc++/sigc++.h>
#include <2geom/point.h>
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include "sp-star.h"
diff --git a/src/text-context.cpp b/src/ui/tools/text-tool.cpp
index cc27e5589..0a8b35110 100644
--- a/src/text-context.cpp
+++ b/src/ui/tools/text-tool.cpp
@@ -45,7 +45,7 @@
#include "sp-namedview.h"
#include "sp-text.h"
#include "style.h"
-#include "text-context.h"
+#include "ui/tools/text-tool.h"
#include "text-editing.h"
#include "ui/control-manager.h"
#include "verbs.h"
diff --git a/src/text-context.h b/src/ui/tools/text-tool.h
index 1b618a1f0..ef8a67984 100644
--- a/src/text-context.h
+++ b/src/ui/tools/text-tool.h
@@ -19,7 +19,7 @@
#include <sigc++/sigc++.h>
#include <gtk/gtk.h>
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include <2geom/point.h>
#include "libnrtype/Layout-TNG.h"
diff --git a/src/event-context.cpp b/src/ui/tools/tool-base.cpp
index 70502ca64..c123aec27 100644
--- a/src/event-context.cpp
+++ b/src/ui/tools/tool-base.cpp
@@ -24,7 +24,7 @@
#include "shortcuts.h"
#include "file.h"
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include <string.h>
#include <gdk/gdkkeysyms.h>
@@ -52,7 +52,7 @@
#include "attributes.h"
#include "rubberband.h"
#include "selcue.h"
-#include "lpe-tool-context.h"
+#include "ui/tools/lpe-tool.h"
#include "ui/tool/control-point.h"
#include "shape-editor.h"
#include "sp-guide.h"
diff --git a/src/event-context.h b/src/ui/tools/tool-base.h
index 5185f89b1..5185f89b1 100644
--- a/src/event-context.h
+++ b/src/ui/tools/tool-base.h
diff --git a/src/tweak-context.cpp b/src/ui/tools/tweak-tool.cpp
index 5129e152e..0791eff5a 100644
--- a/src/tweak-context.cpp
+++ b/src/ui/tools/tweak-tool.cpp
@@ -83,7 +83,7 @@
#include "filters/gaussian-blur.h"
#include "verbs.h"
-#include "tweak-context.h"
+#include "ui/tools/tweak-tool.h"
using Inkscape::DocumentUndo;
diff --git a/src/tweak-context.h b/src/ui/tools/tweak-tool.h
index 80e2c75b9..6cbb9aded 100644
--- a/src/tweak-context.h
+++ b/src/ui/tools/tweak-tool.h
@@ -12,7 +12,7 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include <2geom/point.h>
#define SAMPLING_SIZE 8 /* fixme: ?? */
diff --git a/src/zoom-context.cpp b/src/ui/tools/zoom-tool.cpp
index fd04f8cd9..d4ede1053 100644
--- a/src/zoom-context.cpp
+++ b/src/ui/tools/zoom-tool.cpp
@@ -24,7 +24,7 @@
#include "preferences.h"
#include "selection-chemistry.h"
-#include "zoom-context.h"
+#include "ui/tools/zoom-tool.h"
#include "tool-factory.h"
namespace Inkscape {
diff --git a/src/zoom-context.h b/src/ui/tools/zoom-tool.h
index 83fc69a88..6e5cca7aa 100644
--- a/src/zoom-context.h
+++ b/src/ui/tools/zoom-tool.h
@@ -13,7 +13,7 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#define SP_ZOOM_CONTEXT(obj) (dynamic_cast<Inkscape::UI::Tools::ZoomTool*>((Inkscape::UI::Tools::ToolBase*)obj))
#define SP_IS_ZOOM_CONTEXT(obj) (dynamic_cast<const Inkscape::UI::Tools::ZoomTool*>((const Inkscape::UI::Tools::ToolBase*)obj) != NULL)