diff options
| author | Liam P. White <inkscapebrony@gmail.com> | 2015-02-25 01:04:28 +0000 |
|---|---|---|
| committer | Liam P. White <inkscapebrony@gmail.com> | 2015-02-25 01:04:28 +0000 |
| commit | 73f83ba325e7d28693363d8d6e6b9482e4e12081 (patch) | |
| tree | cead8f00e537e51838d8469fc52b4ba8d04805f8 /src/ui/tools | |
| parent | create SPObject factory (diff) | |
| download | inkscape-73f83ba325e7d28693363d8d6e6b9482e4e12081.tar.gz inkscape-73f83ba325e7d28693363d8d6e6b9482e4e12081.zip | |
Strip ToolFactory
(bzr r13939.1.2)
Diffstat (limited to 'src/ui/tools')
| -rw-r--r-- | src/ui/tools/arc-tool.cpp | 10 | ||||
| -rw-r--r-- | src/ui/tools/box3d-tool.cpp | 10 | ||||
| -rw-r--r-- | src/ui/tools/calligraphic-tool.cpp | 10 | ||||
| -rw-r--r-- | src/ui/tools/connector-tool.cpp | 10 | ||||
| -rw-r--r-- | src/ui/tools/dropper-tool.cpp | 10 | ||||
| -rw-r--r-- | src/ui/tools/eraser-tool.cpp | 10 | ||||
| -rw-r--r-- | src/ui/tools/flood-tool.cpp | 10 | ||||
| -rw-r--r-- | src/ui/tools/gradient-tool.cpp | 10 | ||||
| -rw-r--r-- | src/ui/tools/lpe-tool.cpp | 11 | ||||
| -rw-r--r-- | src/ui/tools/measure-tool.cpp | 10 | ||||
| -rw-r--r-- | src/ui/tools/mesh-tool.cpp | 10 | ||||
| -rw-r--r-- | src/ui/tools/node-tool.cpp | 10 | ||||
| -rw-r--r-- | src/ui/tools/pen-tool.cpp | 9 | ||||
| -rw-r--r-- | src/ui/tools/pencil-tool.cpp | 9 | ||||
| -rw-r--r-- | src/ui/tools/rect-tool.cpp | 10 | ||||
| -rw-r--r-- | src/ui/tools/select-tool.cpp | 9 | ||||
| -rw-r--r-- | src/ui/tools/spiral-tool.cpp | 10 | ||||
| -rw-r--r-- | src/ui/tools/spray-tool.cpp | 10 | ||||
| -rw-r--r-- | src/ui/tools/star-tool.cpp | 10 | ||||
| -rw-r--r-- | src/ui/tools/text-tool.cpp | 9 | ||||
| -rw-r--r-- | src/ui/tools/tweak-tool.cpp | 10 | ||||
| -rw-r--r-- | src/ui/tools/zoom-tool.cpp | 9 |
22 files changed, 0 insertions, 216 deletions
diff --git a/src/ui/tools/arc-tool.cpp b/src/ui/tools/arc-tool.cpp index b9206407a..c6a9bb23a 100644 --- a/src/ui/tools/arc-tool.cpp +++ b/src/ui/tools/arc-tool.cpp @@ -48,20 +48,10 @@ using Inkscape::DocumentUndo; -#include "ui/tool-factory.h" - namespace Inkscape { namespace UI { namespace Tools { -namespace { - ToolBase* createArcContext() { - return new ArcTool(); - } - - bool arcContextRegistered = ToolFactory::instance().registerObject("/tools/shapes/arc", createArcContext); -} - const std::string& ArcTool::getPrefsPath() { return ArcTool::prefsPath; } diff --git a/src/ui/tools/box3d-tool.cpp b/src/ui/tools/box3d-tool.cpp index f8ae685c4..538e0c7e2 100644 --- a/src/ui/tools/box3d-tool.cpp +++ b/src/ui/tools/box3d-tool.cpp @@ -52,20 +52,10 @@ using Inkscape::DocumentUndo; -#include "ui/tool-factory.h" - namespace Inkscape { namespace UI { namespace Tools { -namespace { - ToolBase* createBox3dTool() { - return new Box3dTool(); - } - - bool Box3dToolRegistered = ToolFactory::instance().registerObject("/tools/shapes/3dbox", createBox3dTool); -} - const std::string& Box3dTool::getPrefsPath() { return Box3dTool::prefsPath; } diff --git a/src/ui/tools/calligraphic-tool.cpp b/src/ui/tools/calligraphic-tool.cpp index 151ab5f89..15e6527a3 100644 --- a/src/ui/tools/calligraphic-tool.cpp +++ b/src/ui/tools/calligraphic-tool.cpp @@ -82,22 +82,12 @@ using Inkscape::DocumentUndo; #define DYNA_MIN_WIDTH 1.0e-6 -#include "ui/tool-factory.h" - namespace Inkscape { namespace UI { namespace Tools { static void add_cap(SPCurve *curve, Geom::Point const &from, Geom::Point const &to, double rounding); -namespace { - ToolBase* createCalligraphicContext() { - return new CalligraphicTool(); - } - - bool calligraphicContextRegistered = ToolFactory::instance().registerObject("/tools/calligraphic", createCalligraphicContext); -} - const std::string& CalligraphicTool::getPrefsPath() { return CalligraphicTool::prefsPath; } diff --git a/src/ui/tools/connector-tool.cpp b/src/ui/tools/connector-tool.cpp index 26a4eadd5..d76b0d142 100644 --- a/src/ui/tools/connector-tool.cpp +++ b/src/ui/tools/connector-tool.cpp @@ -109,8 +109,6 @@ using Inkscape::DocumentUndo; -#include "ui/tool-factory.h" - namespace Inkscape { namespace UI { namespace Tools { @@ -147,14 +145,6 @@ static Inkscape::XML::NodeEventVector layer_repr_events = { NULL /* order_changed */ }; -namespace { - ToolBase* createConnectorContext() { - return new ConnectorTool(); - } - - bool connectorContextRegistered = ToolFactory::instance().registerObject("/tools/connector", createConnectorContext); -} - const std::string& ConnectorTool::getPrefsPath() { return ConnectorTool::prefsPath; } diff --git a/src/ui/tools/dropper-tool.cpp b/src/ui/tools/dropper-tool.cpp index 9038628ee..bda9d8e8a 100644 --- a/src/ui/tools/dropper-tool.cpp +++ b/src/ui/tools/dropper-tool.cpp @@ -52,20 +52,10 @@ using Inkscape::DocumentUndo; static GdkCursor *cursor_dropper_fill = NULL; static GdkCursor *cursor_dropper_stroke = NULL; -#include "ui/tool-factory.h" - namespace Inkscape { namespace UI { namespace Tools { -namespace { - ToolBase* createDropperContext() { - return new DropperTool(); - } - - bool dropperContextRegistered = ToolFactory::instance().registerObject("/tools/dropper", createDropperContext); -} - const std::string& DropperTool::getPrefsPath() { return DropperTool::prefsPath; } diff --git a/src/ui/tools/eraser-tool.cpp b/src/ui/tools/eraser-tool.cpp index 1b4dcfe25..af0cbcb78 100644 --- a/src/ui/tools/eraser-tool.cpp +++ b/src/ui/tools/eraser-tool.cpp @@ -84,20 +84,10 @@ using Inkscape::DocumentUndo; #define DRAG_DEFAULT 1.0 #define DRAG_MAX 1.0 -#include "ui/tool-factory.h" - namespace Inkscape { namespace UI { namespace Tools { -namespace { - ToolBase* createEraserContext() { - return new EraserTool(); - } - - bool eraserContextRegistered = ToolFactory::instance().registerObject("/tools/eraser", createEraserContext); -} - const std::string& EraserTool::getPrefsPath() { return EraserTool::prefsPath; } diff --git a/src/ui/tools/flood-tool.cpp b/src/ui/tools/flood-tool.cpp index f9b64e4fd..bb8782dfa 100644 --- a/src/ui/tools/flood-tool.cpp +++ b/src/ui/tools/flood-tool.cpp @@ -74,20 +74,10 @@ using Inkscape::Display::ExtractARGB32; using Inkscape::Display::ExtractRGB32; using Inkscape::Display::AssembleARGB32; -#include "ui/tool-factory.h" - namespace Inkscape { namespace UI { namespace Tools { -namespace { - ToolBase* createPaintbucketContext() { - return new FloodTool(); - } - - bool paintbucketContextRegistered = ToolFactory::instance().registerObject("/tools/paintbucket", createPaintbucketContext); -} - const std::string& FloodTool::getPrefsPath() { return FloodTool::prefsPath; } diff --git a/src/ui/tools/gradient-tool.cpp b/src/ui/tools/gradient-tool.cpp index 5da30da7b..5be84eb76 100644 --- a/src/ui/tools/gradient-tool.cpp +++ b/src/ui/tools/gradient-tool.cpp @@ -51,22 +51,12 @@ using Inkscape::DocumentUndo; -#include "ui/tool-factory.h" - namespace Inkscape { namespace UI { namespace Tools { static void sp_gradient_drag(GradientTool &rc, Geom::Point const pt, guint state, guint32 etime); -namespace { - ToolBase* createGradientContext() { - return new GradientTool(); - } - - bool gradientContextRegistered = ToolFactory::instance().registerObject("/tools/gradient", createGradientContext); -} - const std::string& GradientTool::getPrefsPath() { return GradientTool::prefsPath; } diff --git a/src/ui/tools/lpe-tool.cpp b/src/ui/tools/lpe-tool.cpp index c9b656397..c0517578d 100644 --- a/src/ui/tools/lpe-tool.cpp +++ b/src/ui/tools/lpe-tool.cpp @@ -58,23 +58,12 @@ SubtoolEntry lpesubtools[] = { {Inkscape::LivePathEffect::MIRROR_SYMMETRY, "draw-geometry-mirror"} }; - -#include "ui/tool-factory.h" - namespace Inkscape { namespace UI { namespace Tools { void sp_lpetool_context_selection_changed(Inkscape::Selection *selection, gpointer data); -namespace { - ToolBase* createLPEToolContext() { - return new LpeTool(); - } - - bool lpetoolContextRegistered = ToolFactory::instance().registerObject("/tools/lpetool", createLPEToolContext); -} - const std::string& LpeTool::getPrefsPath() { return LpeTool::prefsPath; } diff --git a/src/ui/tools/measure-tool.cpp b/src/ui/tools/measure-tool.cpp index b7e54b9c8..0875c29e0 100644 --- a/src/ui/tools/measure-tool.cpp +++ b/src/ui/tools/measure-tool.cpp @@ -49,22 +49,12 @@ using Inkscape::ControlManager; using Inkscape::CTLINE_SECONDARY; using Inkscape::Util::unit_table; -#include "ui/tool-factory.h" - namespace Inkscape { namespace UI { namespace Tools { std::vector<Inkscape::Display::TemporaryItem*> measure_tmp_items; -namespace { - ToolBase* createMeasureContext() { - return new MeasureTool(); - } - - bool measureContextRegistered = ToolFactory::instance().registerObject("/tools/measure", createMeasureContext); -} - const std::string& MeasureTool::getPrefsPath() { return MeasureTool::prefsPath; } diff --git a/src/ui/tools/mesh-tool.cpp b/src/ui/tools/mesh-tool.cpp index d333b932e..9527b7de8 100644 --- a/src/ui/tools/mesh-tool.cpp +++ b/src/ui/tools/mesh-tool.cpp @@ -53,22 +53,12 @@ using Inkscape::DocumentUndo; -#include "ui/tool-factory.h" - namespace Inkscape { namespace UI { namespace Tools { static void sp_mesh_drag(MeshTool &rc, Geom::Point const pt, guint state, guint32 etime); -namespace { - ToolBase* createMeshContext() { - return new MeshTool(); - } - - bool meshContextRegistered = ToolFactory::instance().registerObject("/tools/mesh", createMeshContext); -} - const std::string& MeshTool::getPrefsPath() { return MeshTool::prefsPath; } diff --git a/src/ui/tools/node-tool.cpp b/src/ui/tools/node-tool.cpp index caec901a6..f8045a029 100644 --- a/src/ui/tools/node-tool.cpp +++ b/src/ui/tools/node-tool.cpp @@ -107,20 +107,10 @@ using Inkscape::ControlManager; -#include "ui/tool-factory.h" - namespace Inkscape { namespace UI { namespace Tools { -namespace { - ToolBase* createNodesContext() { - return new NodeTool(); - } - - bool nodesContextRegistered = ToolFactory::instance().registerObject("/tools/nodes", createNodesContext); -} - const std::string& NodeTool::getPrefsPath() { return NodeTool::prefsPath; } diff --git a/src/ui/tools/pen-tool.cpp b/src/ui/tools/pen-tool.cpp index 5174775c9..d28b7c27a 100644 --- a/src/ui/tools/pen-tool.cpp +++ b/src/ui/tools/pen-tool.cpp @@ -73,8 +73,6 @@ #include "live_effects/lpe-bspline.h" #include <2geom/nearest-point.h> -#include "ui/tool-factory.h" - #include "live_effects/effect.h" @@ -88,13 +86,6 @@ static Geom::Point pen_drag_origin_w(0, 0); static bool pen_within_tolerance = false; static int pen_last_paraxial_dir = 0; // last used direction in horizontal/vertical mode; 0 = horizontal, 1 = vertical const double handleCubicGap = 0.01; -namespace { - ToolBase* createPenContext() { - return new PenTool(); - } - - bool penContextRegistered = ToolFactory::instance().registerObject("/tools/freehand/pen", createPenContext); -} const std::string& PenTool::getPrefsPath() { return PenTool::prefsPath; diff --git a/src/ui/tools/pencil-tool.cpp b/src/ui/tools/pencil-tool.cpp index 28fed3a8f..db24c7432 100644 --- a/src/ui/tools/pencil-tool.cpp +++ b/src/ui/tools/pencil-tool.cpp @@ -43,7 +43,6 @@ #include "display/sp-canvas.h" #include "display/curve.h" #include "livarot/Path.h" -#include "ui/tool-factory.h" #include "ui/tool/event-utils.h" namespace Inkscape { @@ -55,14 +54,6 @@ static bool pencil_within_tolerance = false; static bool in_svg_plane(Geom::Point const &p) { return Geom::LInfty(p) < 1e18; } -namespace { - ToolBase* createPencilContext() { - return new PencilTool(); - } - - bool pencilContextRegistered = ToolFactory::instance().registerObject("/tools/freehand/pencil", createPencilContext); -} - const std::string& PencilTool::getPrefsPath() { return PencilTool::prefsPath; } diff --git a/src/ui/tools/rect-tool.cpp b/src/ui/tools/rect-tool.cpp index 9476ff624..62a9006ea 100644 --- a/src/ui/tools/rect-tool.cpp +++ b/src/ui/tools/rect-tool.cpp @@ -46,20 +46,10 @@ using Inkscape::DocumentUndo; -#include "ui/tool-factory.h" - namespace Inkscape { namespace UI { namespace Tools { -namespace { - ToolBase* createRectContext() { - return new RectTool(); - } - - bool rectContextRegistered = ToolFactory::instance().registerObject("/tools/shapes/rect", createRectContext); -} - const std::string& RectTool::getPrefsPath() { return RectTool::prefsPath; } diff --git a/src/ui/tools/select-tool.cpp b/src/ui/tools/select-tool.cpp index 939b1a0b3..40b994968 100644 --- a/src/ui/tools/select-tool.cpp +++ b/src/ui/tools/select-tool.cpp @@ -49,7 +49,6 @@ #include "display/sp-canvas.h" #include "display/sp-canvas-item.h" #include "display/drawing-item.h" -#include "ui/tool-factory.h" using Inkscape::DocumentUndo; @@ -65,14 +64,6 @@ static GdkCursor *CursorSelectDragging = NULL; static gint rb_escaped = 0; // if non-zero, rubberband was canceled by esc, so the next button release should not deselect static gint drag_escaped = 0; // if non-zero, drag was canceled by esc -namespace { - ToolBase* createSelectContext() { - return new SelectTool(); - } - - bool selectContextRegistered = ToolFactory::instance().registerObject("/tools/select", createSelectContext); -} - const std::string& SelectTool::getPrefsPath() { return SelectTool::prefsPath; } diff --git a/src/ui/tools/spiral-tool.cpp b/src/ui/tools/spiral-tool.cpp index f208e1c43..833fef18d 100644 --- a/src/ui/tools/spiral-tool.cpp +++ b/src/ui/tools/spiral-tool.cpp @@ -45,20 +45,10 @@ using Inkscape::DocumentUndo; -#include "ui/tool-factory.h" - namespace Inkscape { namespace UI { namespace Tools { -namespace { - ToolBase* createSpiralContext() { - return new SpiralTool(); - } - - bool spiralContextRegistered = ToolFactory::instance().registerObject("/tools/shapes/spiral", createSpiralContext); -} - const std::string& SpiralTool::getPrefsPath() { return SpiralTool::prefsPath; } diff --git a/src/ui/tools/spray-tool.cpp b/src/ui/tools/spray-tool.cpp index a01c5c55b..790270d91 100644 --- a/src/ui/tools/spray-tool.cpp +++ b/src/ui/tools/spray-tool.cpp @@ -84,20 +84,10 @@ using namespace std; // Please enable again when working on 1.0 #define ENABLE_SPRAY_MODE_SINGLE_PATH -#include "ui/tool-factory.h" - namespace Inkscape { namespace UI { namespace Tools { -namespace { - ToolBase* createSprayContext() { - return new SprayTool(); - } - - bool sprayContextRegistered = ToolFactory::instance().registerObject("/tools/spray", createSprayContext); -} - const std::string& SprayTool::getPrefsPath() { return SprayTool::prefsPath; } diff --git a/src/ui/tools/star-tool.cpp b/src/ui/tools/star-tool.cpp index df311f2d8..9190ae57b 100644 --- a/src/ui/tools/star-tool.cpp +++ b/src/ui/tools/star-tool.cpp @@ -49,20 +49,10 @@ using Inkscape::DocumentUndo; -#include "ui/tool-factory.h" - namespace Inkscape { namespace UI { namespace Tools { -namespace { - ToolBase* createStarContext() { - return new StarTool(); - } - - bool starContextRegistered = ToolFactory::instance().registerObject("/tools/shapes/star", createStarContext); -} - const std::string& StarTool::getPrefsPath() { return StarTool::prefsPath; } diff --git a/src/ui/tools/text-tool.cpp b/src/ui/tools/text-tool.cpp index df0583d67..a2c0c81ae 100644 --- a/src/ui/tools/text-tool.cpp +++ b/src/ui/tools/text-tool.cpp @@ -52,7 +52,6 @@ #include "xml/node-event-vector.h" #include "xml/repr.h" #include <gtk/gtk.h> -#include "ui/tool-factory.h" using Inkscape::ControlManager; using Inkscape::DocumentUndo; @@ -71,14 +70,6 @@ static gint sptc_focus_in(GtkWidget *widget, GdkEventFocus *event, TextTool *tc) static gint sptc_focus_out(GtkWidget *widget, GdkEventFocus *event, TextTool *tc); static void sptc_commit(GtkIMContext *imc, gchar *string, TextTool *tc); -namespace { - ToolBase* createTextContext() { - return new TextTool(); - } - - bool textContextRegistered = ToolFactory::instance().registerObject("/tools/text", createTextContext); -} - const std::string& TextTool::getPrefsPath() { return TextTool::prefsPath; } diff --git a/src/ui/tools/tweak-tool.cpp b/src/ui/tools/tweak-tool.cpp index 5e53fdb93..80b52fba6 100644 --- a/src/ui/tools/tweak-tool.cpp +++ b/src/ui/tools/tweak-tool.cpp @@ -91,20 +91,10 @@ using Inkscape::DocumentUndo; #define DYNA_MIN_WIDTH 1.0e-6 -#include "ui/tool-factory.h" - namespace Inkscape { namespace UI { namespace Tools { -namespace { - ToolBase* createTweakContext() { - return new TweakTool(); - } - - bool tweakContextRegistered = ToolFactory::instance().registerObject("/tools/tweak", createTweakContext); -} - const std::string& TweakTool::getPrefsPath() { return TweakTool::prefsPath; } diff --git a/src/ui/tools/zoom-tool.cpp b/src/ui/tools/zoom-tool.cpp index b3fb78c8f..6a4d4dbbd 100644 --- a/src/ui/tools/zoom-tool.cpp +++ b/src/ui/tools/zoom-tool.cpp @@ -25,20 +25,11 @@ #include "selection-chemistry.h" #include "ui/tools/zoom-tool.h" -#include "ui/tool-factory.h" namespace Inkscape { namespace UI { namespace Tools { -namespace { - ToolBase* createZoomContext() { - return new ZoomTool(); - } - - bool zoomContextRegistered = ToolFactory::instance().registerObject("/tools/zoom", createZoomContext); -} - const std::string& ZoomTool::getPrefsPath() { return ZoomTool::prefsPath; } |
