summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2013-11-13 00:00:04 +0000
committerJabiertxof <jtx@jtx.marker.es>2013-11-13 00:00:04 +0000
commit152a0caf7e216e7ceafeed20822500c385e3e2df (patch)
treea3b5d60e08f3bd8221ba2e50eea80b087e5d541a /src/widgets
parentUpdate to trunk (diff)
parentfix C++11 compilation. There A LOT of const_casts in this file... :-( (diff)
downloadinkscape-152a0caf7e216e7ceafeed20822500c385e3e2df.tar.gz
inkscape-152a0caf7e216e7ceafeed20822500c385e3e2df.zip
Update to trunk
(bzr r12588.1.26)
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/arc-toolbar.cpp2
-rw-r--r--src/widgets/box3d-toolbar.cpp4
-rw-r--r--src/widgets/calligraphy-toolbar.cpp2
-rw-r--r--src/widgets/connector-toolbar.cpp12
-rw-r--r--src/widgets/desktop-widget.cpp2
-rw-r--r--src/widgets/dropper-toolbar.cpp2
-rw-r--r--src/widgets/eraser-toolbar.cpp2
-rw-r--r--src/widgets/fill-style.cpp6
-rw-r--r--src/widgets/gradient-toolbar.cpp25
-rw-r--r--src/widgets/lpe-toolbar.cpp22
-rw-r--r--src/widgets/measure-toolbar.cpp2
-rw-r--r--src/widgets/mesh-toolbar.cpp6
-rw-r--r--src/widgets/node-toolbar.cpp49
-rw-r--r--src/widgets/paintbucket-toolbar.cpp12
-rw-r--r--src/widgets/pencil-toolbar.cpp6
-rw-r--r--src/widgets/rect-toolbar.cpp2
-rw-r--r--src/widgets/sp-color-notebook.cpp4
-rw-r--r--src/widgets/spinbutton-events.cpp4
-rw-r--r--src/widgets/spiral-toolbar.cpp2
-rw-r--r--src/widgets/spray-toolbar.cpp4
-rw-r--r--src/widgets/star-toolbar.cpp2
-rw-r--r--src/widgets/text-toolbar.cpp12
-rw-r--r--src/widgets/toolbox.cpp19
-rw-r--r--src/widgets/toolbox.h13
-rw-r--r--src/widgets/tweak-toolbar.cpp18
-rw-r--r--src/widgets/zoom-toolbar.cpp4
26 files changed, 126 insertions, 112 deletions
diff --git a/src/widgets/arc-toolbar.cpp b/src/widgets/arc-toolbar.cpp
index 5569780e7..69b540762 100644
--- a/src/widgets/arc-toolbar.cpp
+++ b/src/widgets/arc-toolbar.cpp
@@ -56,7 +56,7 @@
#include "../xml/repr.h"
#include "ui/uxmanager.h"
#include "../ui/icon-names.h"
-#include "../pen-context.h"
+#include "ui/tools/pen-tool.h"
#include "../sp-ellipse.h"
#include "../mod360.h"
diff --git a/src/widgets/box3d-toolbar.cpp b/src/widgets/box3d-toolbar.cpp
index 91d4ebdec..32516bbfb 100644
--- a/src/widgets/box3d-toolbar.cpp
+++ b/src/widgets/box3d-toolbar.cpp
@@ -58,9 +58,9 @@
#include "../ui/icon-names.h"
-#include "../pen-context.h"
+#include "ui/tools/pen-tool.h"
-#include "../box3d-context.h"
+#include "ui/tools/box3d-tool.h"
#include "../box3d.h"
using Inkscape::UI::UXManager;
diff --git a/src/widgets/calligraphy-toolbar.cpp b/src/widgets/calligraphy-toolbar.cpp
index 12228ce56..9f08d3462 100644
--- a/src/widgets/calligraphy-toolbar.cpp
+++ b/src/widgets/calligraphy-toolbar.cpp
@@ -57,7 +57,7 @@
#include "ui/uxmanager.h"
#include "../ui/icon-names.h"
-#include "../pen-context.h"
+#include "ui/tools/pen-tool.h"
using Inkscape::UI::UXManager;
using Inkscape::DocumentUndo;
diff --git a/src/widgets/connector-toolbar.cpp b/src/widgets/connector-toolbar.cpp
index 2e5c2ade1..7230f521c 100644
--- a/src/widgets/connector-toolbar.cpp
+++ b/src/widgets/connector-toolbar.cpp
@@ -55,10 +55,10 @@
#include "../xml/repr.h"
#include "ui/uxmanager.h"
#include "../ui/icon-names.h"
-#include "../pen-context.h"
+#include "ui/tools/pen-tool.h"
#include "../sp-namedview.h"
#include "../conn-avoid-ref.h"
-#include "../connector-context.h"
+#include "ui/tools/connector-tool.h"
#include "../graphlayout.h"
#include "../sp-path.h"
@@ -76,13 +76,13 @@ using Inkscape::UI::PrefPusher;
static void sp_connector_path_set_avoid(void)
{
- cc_selection_set_avoid(true);
+ Inkscape::UI::Tools::cc_selection_set_avoid(true);
}
static void sp_connector_path_set_ignore(void)
{
- cc_selection_set_avoid(false);
+ Inkscape::UI::Tools::cc_selection_set_avoid(false);
}
static void sp_connector_orthogonal_toggled( GtkToggleAction* act, GObject *tbl )
@@ -114,7 +114,7 @@ static void sp_connector_orthogonal_toggled( GtkToggleAction* act, GObject *tbl
while (l) {
SPItem *item = SP_ITEM(l->data);
- if (cc_item_is_connector(item)) {
+ if (Inkscape::UI::Tools::cc_item_is_connector(item)) {
item->setAttribute( "inkscape:connector-type",
value, NULL);
item->avoidRef->handleSettingChange();
@@ -163,7 +163,7 @@ static void connector_curvature_changed(GtkAdjustment *adj, GObject* tbl)
while (l) {
SPItem *item = SP_ITEM(l->data);
- if (cc_item_is_connector(item)) {
+ if (Inkscape::UI::Tools::cc_item_is_connector(item)) {
item->setAttribute( "inkscape:connector-curvature",
value, NULL);
item->avoidRef->handleSettingChange();
diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp
index 3ca433586..7e254cdcd 100644
--- a/src/widgets/desktop-widget.cpp
+++ b/src/widgets/desktop-widget.cpp
@@ -27,7 +27,7 @@
#include <2geom/rect.h>
#include "ui/dialog/dialog-manager.h"
-#include "box3d-context.h"
+#include "ui/tools/box3d-tool.h"
#include "cms-system.h"
#include "conn-avoid-ref.h"
#include "desktop.h"
diff --git a/src/widgets/dropper-toolbar.cpp b/src/widgets/dropper-toolbar.cpp
index 054955d8f..991489b86 100644
--- a/src/widgets/dropper-toolbar.cpp
+++ b/src/widgets/dropper-toolbar.cpp
@@ -54,7 +54,7 @@
#include "../xml/repr.h"
#include "ui/uxmanager.h"
#include "../ui/icon-names.h"
-#include "../pen-context.h"
+#include "ui/tools/pen-tool.h"
#include "../tools-switch.h"
using Inkscape::UI::UXManager;
diff --git a/src/widgets/eraser-toolbar.cpp b/src/widgets/eraser-toolbar.cpp
index 1af574ed6..5e09521c9 100644
--- a/src/widgets/eraser-toolbar.cpp
+++ b/src/widgets/eraser-toolbar.cpp
@@ -55,7 +55,7 @@
#include "../xml/repr.h"
#include "ui/uxmanager.h"
#include "../ui/icon-names.h"
-#include "../pen-context.h"
+#include "ui/tools/pen-tool.h"
using Inkscape::UI::UXManager;
diff --git a/src/widgets/fill-style.cpp b/src/widgets/fill-style.cpp
index d9d62d3ec..d1d318abe 100644
--- a/src/widgets/fill-style.cpp
+++ b/src/widgets/fill-style.cpp
@@ -88,7 +88,7 @@ private:
static void fillruleChangedCB( SPPaintSelector *psel, SPPaintSelector::FillRule mode, FillNStroke *self );
void selectionModifiedCB(guint flags);
- void eventContextCB(SPDesktop *desktop, SPEventContext *eventcontext);
+ void eventContextCB(SPDesktop *desktop, Inkscape::UI::Tools::ToolBase *eventcontext);
void dragFromPaint();
void updateFromPaint();
@@ -211,7 +211,7 @@ void FillNStroke::setDesktop(SPDesktop *desktop)
if (desktop && desktop->selection) {
selectChangedConn = desktop->selection->connectChanged(sigc::hide(sigc::mem_fun(*this, &FillNStroke::performUpdate)));
subselChangedConn = desktop->connectToolSubselectionChanged(sigc::hide(sigc::mem_fun(*this, &FillNStroke::performUpdate)));
- eventContextConn = desktop->connectEventContextChanged(sigc::hide(sigc::bind(sigc::mem_fun(*this, &FillNStroke::eventContextCB), (SPEventContext *)NULL)));
+ eventContextConn = desktop->connectEventContextChanged(sigc::hide(sigc::bind(sigc::mem_fun(*this, &FillNStroke::eventContextCB), (Inkscape::UI::Tools::ToolBase *)NULL)));
// Must check flags, so can't call performUpdate() directly.
selectModifiedConn = desktop->selection->connectModified(sigc::hide<0>(sigc::mem_fun(*this, &FillNStroke::selectionModifiedCB)));
@@ -224,7 +224,7 @@ void FillNStroke::setDesktop(SPDesktop *desktop)
* Listen to this "change in tool" event, in case a subselection tool (such as Gradient or Node) selection
* is changed back to a selection tool - especially needed for selected gradient stops.
*/
-void FillNStroke::eventContextCB(SPDesktop * /*desktop*/, SPEventContext * /*eventcontext*/)
+void FillNStroke::eventContextCB(SPDesktop * /*desktop*/, Inkscape::UI::Tools::ToolBase * /*eventcontext*/)
{
performUpdate();
}
diff --git a/src/widgets/gradient-toolbar.cpp b/src/widgets/gradient-toolbar.cpp
index f7d2b2bd5..f02185a15 100644
--- a/src/widgets/gradient-toolbar.cpp
+++ b/src/widgets/gradient-toolbar.cpp
@@ -35,7 +35,7 @@
#include "desktop-handles.h"
#include <glibmm/i18n.h>
-#include "gradient-context.h"
+#include "ui/tools/gradient-tool.h"
#include "gradient-drag.h"
#include "sp-linear-gradient.h"
#include "sp-radial-gradient.h"
@@ -54,13 +54,14 @@
#include "svg/css-ostringstream.h"
#include "svg/svg-color.h"
#include "desktop-style.h"
-#include "gradient-context.h"
+#include "ui/tools/gradient-tool.h"
#include "gradient-toolbar.h"
#include "toolbox.h"
using Inkscape::DocumentUndo;
using Inkscape::UI::ToolboxFactory;
+using Inkscape::UI::Tools::ToolBase;
void gr_apply_gradient_to_item( SPItem *item, SPGradient *gr, SPGradientType initialType, Inkscape::PaintTarget initialMode, Inkscape::PaintTarget mode );
void gr_apply_gradient(Inkscape::Selection *selection, GrDrag *drag, SPGradient *gr);
@@ -70,8 +71,8 @@ void gr_read_selection( Inkscape::Selection *selection, GrDrag *drag, SPGradient
static gboolean update_stop_list( GtkWidget *stop_combo, SPGradient *gradient, SPStop *new_stop, GtkWidget *widget, bool gr_multi);
static void sp_gradient_vector_widget_load_gradient(GtkWidget *widget, SPGradient *gradient);
static void select_stop_in_list( GtkWidget *combo_box, SPGradient *gradient, SPStop *new_stop, GtkWidget *data, gboolean block);
-static void select_stop_by_drag( GtkWidget *combo_box, SPGradient *gradient, SPEventContext *ev, GtkWidget *data);
-static void select_drag_by_stop( GtkWidget *combo_box, SPGradient *gradient, SPEventContext *ev);
+static void select_stop_by_drag( GtkWidget *combo_box, SPGradient *gradient, ToolBase *ev, GtkWidget *data);
+static void select_drag_by_stop( GtkWidget *combo_box, SPGradient *gradient, ToolBase *ev);
static SPGradient *gr_get_selected_gradient(GtkWidget *widget);
static void gr_stop_set_offset(GtkComboBox *widget, GtkWidget *data);
void add_toolbar_widget(GtkWidget *tbl, GtkWidget *widget);
@@ -373,7 +374,7 @@ static void gr_tb_selection_changed(Inkscape::Selection * /*selection*/, gpointe
Inkscape::Selection *selection = sp_desktop_selection(desktop); // take from desktop, not from args
if (selection) {
- SPEventContext *ev = desktop->getEventContext();
+ ToolBase *ev = desktop->getEventContext();
GrDrag *drag = NULL;
if (ev) {
drag = ev->get_drag();
@@ -585,8 +586,8 @@ static void gr_add_stop(GtkWidget * /*button*/, GtkWidget *vb)
return;
}
- SPEventContext *ev = desktop->getEventContext();
- SPGradientContext *rc = SP_GRADIENT_CONTEXT(ev);
+ ToolBase *ev = desktop->getEventContext();
+ Inkscape::UI::Tools::GradientTool *rc = SP_GRADIENT_CONTEXT(ev);
if (rc) {
sp_gradient_context_add_stops_between_selected_stops(rc);
@@ -607,7 +608,7 @@ static void gr_remove_stop(GtkWidget * /*button*/, GtkWidget *vb)
return;
}
- SPEventContext *ev = desktop->getEventContext();
+ ToolBase *ev = desktop->getEventContext();
GrDrag *drag = NULL;
if (ev) {
drag = ev->get_drag();
@@ -641,7 +642,7 @@ static void gr_reverse(GtkWidget * /*button*/, gpointer data)
/*
* Change desktop drag selection to this stop
*/
-static void select_drag_by_stop( GtkWidget *data, SPGradient *gradient, SPEventContext *ev)
+static void select_drag_by_stop( GtkWidget *data, SPGradient *gradient, ToolBase *ev)
{
if (blocked || !ev || !gradient)
return;
@@ -657,7 +658,7 @@ static void select_drag_by_stop( GtkWidget *data, SPGradient *gradient, SPEventC
blocked = FALSE;
}
-static void select_stop_by_drag(GtkWidget *combo_box, SPGradient *gradient, SPEventContext *ev, GtkWidget *data)
+static void select_stop_by_drag(GtkWidget *combo_box, SPGradient *gradient, ToolBase *ev, GtkWidget *data)
{
if (blocked || !ev || !gradient)
return;
@@ -939,7 +940,7 @@ static void gr_gradient_combo_changed(EgeSelectOneAction *act, gpointer data)
SPDesktop *desktop = static_cast<SPDesktop *>(data);
Inkscape::Selection *selection = sp_desktop_selection(desktop);
- SPEventContext *ev = desktop->getEventContext();
+ ToolBase *ev = desktop->getEventContext();
gr_apply_gradient(selection, ev? ev->get_drag() : NULL, gr);
@@ -981,7 +982,7 @@ static void gr_stop_combo_changed(GtkComboBox * /*widget*/, GtkWidget *data)
}
SPDesktop *desktop = static_cast<SPDesktop *>(g_object_get_data(G_OBJECT(data), "desktop"));
- SPEventContext *ev = desktop->getEventContext();
+ ToolBase *ev = desktop->getEventContext();
SPGradient *gr = gr_get_selected_gradient(data);
select_drag_by_stop(data, gr, ev);
diff --git a/src/widgets/lpe-toolbar.cpp b/src/widgets/lpe-toolbar.cpp
index 045d7aa78..559f3fc3c 100644
--- a/src/widgets/lpe-toolbar.cpp
+++ b/src/widgets/lpe-toolbar.cpp
@@ -59,12 +59,12 @@
#include "../helper/action-context.h"
#include "util/units.h"
#include "ui/widget/unit-tracker.h"
-#include "../pen-context.h"
+#include "ui/tools/pen-tool.h"
#include "../sp-namedview.h"
#include "../tools-switch.h"
#include "../live_effects/effect.h"
#include "../live_effects/lpe-angle_bisector.h"
-#include "../lpe-tool-context.h"
+#include "ui/tools/lpe-tool.h"
using Inkscape::UI::Widget::UnitTracker;
using Inkscape::Util::Unit;
@@ -73,6 +73,8 @@ using Inkscape::UI::UXManager;
using Inkscape::DocumentUndo;
using Inkscape::UI::ToolboxFactory;
using Inkscape::UI::PrefPusher;
+using Inkscape::UI::Tools::ToolBase;
+using Inkscape::UI::Tools::LpeTool;
//########################
@@ -87,7 +89,7 @@ static void sp_lpetool_mode_changed(EgeSelectOneAction *act, GObject *tbl)
using namespace Inkscape::LivePathEffect;
SPDesktop *desktop = static_cast<SPDesktop *>(g_object_get_data(tbl, "desktop"));
- SPEventContext *ec = desktop->event_context;
+ ToolBase *ec = desktop->event_context;
if (!SP_IS_LPETOOL_CONTEXT(ec)) {
return;
}
@@ -100,7 +102,7 @@ static void sp_lpetool_mode_changed(EgeSelectOneAction *act, GObject *tbl)
gint mode = ege_select_one_action_get_active(act);
EffectType type = lpesubtools[mode].type;
- SPLPEToolContext *lc = SP_LPETOOL_CONTEXT(desktop->event_context);
+ LpeTool *lc = SP_LPETOOL_CONTEXT(desktop->event_context);
bool success = lpetool_try_construction(lc, type);
if (success) {
// since the construction was already performed, we set the state back to inactive
@@ -122,7 +124,7 @@ static void sp_lpetool_mode_changed(EgeSelectOneAction *act, GObject *tbl)
static void sp_lpetool_toolbox_sel_modified(Inkscape::Selection *selection, guint /*flags*/, GObject * /*tbl*/)
{
- SPEventContext *ec = selection->desktop()->event_context;
+ ToolBase *ec = selection->desktop()->event_context;
if (SP_IS_LPETOOL_CONTEXT(ec)) {
lpetool_update_measuring_items(SP_LPETOOL_CONTEXT(ec));
}
@@ -131,11 +133,11 @@ static void sp_lpetool_toolbox_sel_modified(Inkscape::Selection *selection, guin
static void sp_lpetool_toolbox_sel_changed(Inkscape::Selection *selection, GObject *tbl)
{
using namespace Inkscape::LivePathEffect;
- SPEventContext *ec = selection->desktop()->event_context;
+ ToolBase *ec = selection->desktop()->event_context;
if (!SP_IS_LPETOOL_CONTEXT(ec)) {
return;
}
- SPLPEToolContext *lc = SP_LPETOOL_CONTEXT(ec);
+ LpeTool *lc = SP_LPETOOL_CONTEXT(ec);
lpetool_delete_measuring_items(lc);
lpetool_create_measuring_items(lc, selection);
@@ -172,7 +174,7 @@ static void lpetool_toggle_show_bbox(GtkToggleAction *act, gpointer data) {
prefs->setBool("/tools/lpetool/show_bbox", show);
if (tools_isactive(desktop, TOOLS_LPETOOL)) {
- SPLPEToolContext *lc = SP_LPETOOL_CONTEXT(desktop->event_context);
+ LpeTool *lc = SP_LPETOOL_CONTEXT(desktop->event_context);
lpetool_context_reset_limiting_bbox(lc);
}
}
@@ -185,7 +187,7 @@ static void lpetool_toggle_show_measuring_info(GtkToggleAction *act, GObject *tb
}
GtkAction *unitact = static_cast<GtkAction*>(g_object_get_data(tbl, "lpetool_units_action"));
- SPLPEToolContext *lc = SP_LPETOOL_CONTEXT(desktop->event_context);
+ LpeTool *lc = SP_LPETOOL_CONTEXT(desktop->event_context);
if (tools_isactive(desktop, TOOLS_LPETOOL)) {
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
bool show = gtk_toggle_action_get_active( act );
@@ -204,7 +206,7 @@ static void lpetool_unit_changed(GtkAction* /*act*/, GObject* tbl)
SPDesktop *desktop = static_cast<SPDesktop *>(g_object_get_data( tbl, "desktop" ));
if (SP_IS_LPETOOL_CONTEXT(desktop->event_context)) {
- SPLPEToolContext *lc = SP_LPETOOL_CONTEXT(desktop->event_context);
+ LpeTool *lc = SP_LPETOOL_CONTEXT(desktop->event_context);
lpetool_delete_measuring_items(lc);
lpetool_create_measuring_items(lc);
}
diff --git a/src/widgets/measure-toolbar.cpp b/src/widgets/measure-toolbar.cpp
index 58244566d..a75dd7600 100644
--- a/src/widgets/measure-toolbar.cpp
+++ b/src/widgets/measure-toolbar.cpp
@@ -52,7 +52,7 @@
#include "../xml/repr.h"
#include "ui/uxmanager.h"
#include "../ui/icon-names.h"
-#include "../pen-context.h"
+#include "ui/tools/pen-tool.h"
#include "../sp-namedview.h"
#include "ui/widget/unit-tracker.h"
diff --git a/src/widgets/mesh-toolbar.cpp b/src/widgets/mesh-toolbar.cpp
index 582243870..15dda94f0 100644
--- a/src/widgets/mesh-toolbar.cpp
+++ b/src/widgets/mesh-toolbar.cpp
@@ -41,7 +41,7 @@
#include "desktop-handles.h"
#include <glibmm/i18n.h>
-#include "gradient-context.h"
+#include "ui/tools/gradient-tool.h"
#include "gradient-drag.h"
#include "sp-mesh-gradient.h"
#include "gradient-chemistry.h"
@@ -59,7 +59,7 @@
#include "svg/css-ostringstream.h"
#include "svg/svg-color.h"
#include "desktop-style.h"
-#include "gradient-context.h"
+#include "ui/tools/gradient-tool.h"
#include "toolbox.h"
@@ -94,7 +94,7 @@ static void ms_tb_selection_changed(Inkscape::Selection * /*selection*/, gpointe
// Inkscape::Selection *selection = sp_desktop_selection(desktop); // take from desktop, not from args
// if (selection) {
- // SPEventContext *ev = sp_desktop_event_context(desktop);
+ // ToolBase *ev = sp_desktop_event_context(desktop);
// GrDrag *drag = NULL;
// if (ev) {
// drag = ev->get_drag();
diff --git a/src/widgets/node-toolbar.cpp b/src/widgets/node-toolbar.cpp
index 0d4868642..6a0968424 100644
--- a/src/widgets/node-toolbar.cpp
+++ b/src/widgets/node-toolbar.cpp
@@ -55,12 +55,12 @@
#include "../xml/repr.h"
#include "ui/uxmanager.h"
#include "../ui/tool/control-point-selection.h"
-#include "../ui/tool/node-tool.h"
+#include "ui/tools/node-tool.h"
#include "../ui/tool/multi-path-manipulator.h"
#include "../ui/icon-names.h"
#include "util/units.h"
#include "ui/widget/unit-tracker.h"
-#include "../lpe-tool-context.h"
+#include "ui/tools/lpe-tool.h"
#include "../sp-namedview.h"
using Inkscape::UI::Widget::UnitTracker;
@@ -71,6 +71,7 @@ using Inkscape::DocumentUndo;
using Inkscape::UI::ToolboxFactory;
using Inkscape::UI::PrefPusher;
using Inkscape::Util::unit_table;
+using Inkscape::UI::Tools::NodeTool;
//####################################
//# node editing callbacks
@@ -78,13 +79,13 @@ using Inkscape::Util::unit_table;
/** Temporary hack: Returns the node tool in the active desktop.
* Will go away during tool refactoring. */
-static InkNodeTool *get_node_tool()
+static NodeTool *get_node_tool()
{
- InkNodeTool *tool = 0;
+ NodeTool *tool = 0;
if (SP_ACTIVE_DESKTOP ) {
- SPEventContext *ec = SP_ACTIVE_DESKTOP->event_context;
+ Inkscape::UI::Tools::ToolBase *ec = SP_ACTIVE_DESKTOP->event_context;
if (INK_IS_NODE_TOOL(ec)) {
- tool = static_cast<InkNodeTool*>(ec);
+ tool = static_cast<NodeTool*>(ec);
}
}
return tool;
@@ -92,7 +93,7 @@ static InkNodeTool *get_node_tool()
static void sp_node_path_edit_add(void)
{
- InkNodeTool *nt = get_node_tool();
+ NodeTool *nt = get_node_tool();
if (nt) {
nt->_multipath->insertNodes();
}
@@ -100,28 +101,28 @@ static void sp_node_path_edit_add(void)
static void sp_node_path_edit_add_min_x(void)
{
- InkNodeTool *nt = get_node_tool();
+ NodeTool *nt = get_node_tool();
if (nt) {
nt->_multipath->insertNodesAtExtrema(Inkscape::UI::PointManipulator::EXTR_MIN_X);
}
}
static void sp_node_path_edit_add_max_x(void)
{
- InkNodeTool *nt = get_node_tool();
+ NodeTool *nt = get_node_tool();
if (nt) {
nt->_multipath->insertNodesAtExtrema(Inkscape::UI::PointManipulator::EXTR_MAX_X);
}
}
static void sp_node_path_edit_add_min_y(void)
{
- InkNodeTool *nt = get_node_tool();
+ NodeTool *nt = get_node_tool();
if (nt) {
nt->_multipath->insertNodesAtExtrema(Inkscape::UI::PointManipulator::EXTR_MIN_Y);
}
}
static void sp_node_path_edit_add_max_y(void)
{
- InkNodeTool *nt = get_node_tool();
+ NodeTool *nt = get_node_tool();
if (nt) {
nt->_multipath->insertNodesAtExtrema(Inkscape::UI::PointManipulator::EXTR_MAX_Y);
}
@@ -129,7 +130,7 @@ static void sp_node_path_edit_add_max_y(void)
static void sp_node_path_edit_delete(void)
{
- InkNodeTool *nt = get_node_tool();
+ NodeTool *nt = get_node_tool();
if (nt) {
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
nt->_multipath->deleteNodes(prefs->getBool("/tools/nodes/delete_preserves_shape", true));
@@ -138,7 +139,7 @@ static void sp_node_path_edit_delete(void)
static void sp_node_path_edit_delete_segment(void)
{
- InkNodeTool *nt = get_node_tool();
+ NodeTool *nt = get_node_tool();
if (nt) {
nt->_multipath->deleteSegments();
}
@@ -146,7 +147,7 @@ static void sp_node_path_edit_delete_segment(void)
static void sp_node_path_edit_break(void)
{
- InkNodeTool *nt = get_node_tool();
+ NodeTool *nt = get_node_tool();
if (nt) {
nt->_multipath->breakNodes();
}
@@ -154,7 +155,7 @@ static void sp_node_path_edit_break(void)
static void sp_node_path_edit_join(void)
{
- InkNodeTool *nt = get_node_tool();
+ NodeTool *nt = get_node_tool();
if (nt) {
nt->_multipath->joinNodes();
}
@@ -162,7 +163,7 @@ static void sp_node_path_edit_join(void)
static void sp_node_path_edit_join_segment(void)
{
- InkNodeTool *nt = get_node_tool();
+ NodeTool *nt = get_node_tool();
if (nt) {
nt->_multipath->joinSegments();
}
@@ -170,7 +171,7 @@ static void sp_node_path_edit_join_segment(void)
static void sp_node_path_edit_toline(void)
{
- InkNodeTool *nt = get_node_tool();
+ NodeTool *nt = get_node_tool();
if (nt) {
nt->_multipath->setSegmentType(Inkscape::UI::SEGMENT_STRAIGHT);
}
@@ -178,7 +179,7 @@ static void sp_node_path_edit_toline(void)
static void sp_node_path_edit_tocurve(void)
{
- InkNodeTool *nt = get_node_tool();
+ NodeTool *nt = get_node_tool();
if (nt) {
nt->_multipath->setSegmentType(Inkscape::UI::SEGMENT_CUBIC_BEZIER);
}
@@ -186,7 +187,7 @@ static void sp_node_path_edit_tocurve(void)
static void sp_node_path_edit_cusp(void)
{
- InkNodeTool *nt = get_node_tool();
+ NodeTool *nt = get_node_tool();
if (nt) {
nt->_multipath->setNodeType(Inkscape::UI::NODE_CUSP);
}
@@ -194,7 +195,7 @@ static void sp_node_path_edit_cusp(void)
static void sp_node_path_edit_smooth(void)
{
- InkNodeTool *nt = get_node_tool();
+ NodeTool *nt = get_node_tool();
if (nt) {
nt->_multipath->setNodeType(Inkscape::UI::NODE_SMOOTH);
}
@@ -202,7 +203,7 @@ static void sp_node_path_edit_smooth(void)
static void sp_node_path_edit_symmetrical(void)
{
- InkNodeTool *nt = get_node_tool();
+ NodeTool *nt = get_node_tool();
if (nt) {
nt->_multipath->setNodeType(Inkscape::UI::NODE_SYMMETRIC);
}
@@ -210,7 +211,7 @@ static void sp_node_path_edit_symmetrical(void)
static void sp_node_path_edit_auto(void)
{
- InkNodeTool *nt = get_node_tool();
+ NodeTool *nt = get_node_tool();
if (nt) {
nt->_multipath->setNodeType(Inkscape::UI::NODE_AUTO);
}
@@ -242,7 +243,7 @@ static void sp_node_toolbox_coord_changed(gpointer /*shape_editor*/, GObject *tb
}
Unit const *unit = tracker->getActiveUnit();
- InkNodeTool *nt = get_node_tool();
+ NodeTool *nt = get_node_tool();
if (!nt || nt->_selected_nodes->empty()) {
// no path selected
gtk_action_set_sensitive(xact, FALSE);
@@ -289,7 +290,7 @@ static void sp_node_path_value_changed(GtkAdjustment *adj, GObject *tbl, Geom::D
// in turn, prevent listener from responding
g_object_set_data( tbl, "freeze", GINT_TO_POINTER(TRUE));
- InkNodeTool *nt = get_node_tool();
+ NodeTool *nt = get_node_tool();
if (nt && !nt->_selected_nodes->empty()) {
double val = Quantity::convert(gtk_adjustment_get_value(adj), unit, "px");
double oldval = nt->_selected_nodes->pointwiseBounds()->midpoint()[d];
diff --git a/src/widgets/paintbucket-toolbar.cpp b/src/widgets/paintbucket-toolbar.cpp
index 363fadd3d..8c4de2b32 100644
--- a/src/widgets/paintbucket-toolbar.cpp
+++ b/src/widgets/paintbucket-toolbar.cpp
@@ -56,9 +56,9 @@
#include "../ui/icon-names.h"
#include "util/units.h"
#include "ui/widget/unit-tracker.h"
-#include "../pen-context.h"
+#include "ui/tools/pen-tool.h"
#include "../sp-namedview.h"
-#include "../flood-context.h"
+#include "ui/tools/flood-tool.h"
#include <gtk/gtk.h>
@@ -80,7 +80,7 @@ static void paintbucket_channels_changed(EgeSelectOneAction* act, GObject* /*tbl
{
gint channels = ege_select_one_action_get_active( act );
//flood_channels_set_channels( channels );
- SPFloodContext::set_channels(channels);
+ Inkscape::UI::Tools::FloodTool::set_channels(channels);
}
static void paintbucket_threshold_changed(GtkAdjustment *adj, GObject * /*tbl*/)
@@ -127,7 +127,7 @@ static void paintbucket_defaults(GtkWidget *, GObject *tbl)
}
EgeSelectOneAction* channels_action = EGE_SELECT_ONE_ACTION( g_object_get_data (tbl, "channels_action" ) );
- ege_select_one_action_set_active( channels_action, FLOOD_CHANNELS_RGB );
+ ege_select_one_action_set_active( channels_action, Inkscape::UI::Tools::FLOOD_CHANNELS_RGB );
EgeSelectOneAction* autogap_action = EGE_SELECT_ONE_ACTION( g_object_get_data (tbl, "autogap_action" ) );
ege_select_one_action_set_active( autogap_action, 0 );
}
@@ -142,7 +142,7 @@ void sp_paintbucket_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions
GList* items = 0;
gint count = 0;
- for ( items = flood_channels_dropdown_items_list(); items ; items = g_list_next(items) )
+ for ( items = Inkscape::UI::Tools::flood_channels_dropdown_items_list(); items ; items = g_list_next(items) )
{
GtkTreeIter iter;
gtk_list_store_append( model, &iter );
@@ -209,7 +209,7 @@ void sp_paintbucket_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions
GList* items = 0;
gint count = 0;
- for ( items = flood_autogap_dropdown_items_list(); items ; items = g_list_next(items) )
+ for ( items = Inkscape::UI::Tools::flood_autogap_dropdown_items_list(); items ; items = g_list_next(items) )
{
GtkTreeIter iter;
gtk_list_store_append( model, &iter );
diff --git a/src/widgets/pencil-toolbar.cpp b/src/widgets/pencil-toolbar.cpp
index 783d8dd4d..8abf35fb3 100644
--- a/src/widgets/pencil-toolbar.cpp
+++ b/src/widgets/pencil-toolbar.cpp
@@ -63,11 +63,11 @@
#include "ui/uxmanager.h"
//#include "../ui/tool/control-point-selection.h"
-//#include "../ui/tool/node-tool.h"
+//#include "ui/tools/node-tool.h"
//#include "../ui/tool/multi-path-manipulator.h"
#include "../ui/icon-names.h"
-#include "../pen-context.h"
+#include "ui/tools/pen-tool.h"
//#include "../sp-namedview.h"
#include "../tools-switch.h"
@@ -103,7 +103,7 @@ static void freehand_mode_changed(EgeSelectOneAction* act, GObject* tbl)
// in pen tool we have more options than in pencil tool; if one of them was chosen, we do any
// preparatory work here
if (SP_IS_PEN_CONTEXT(desktop->event_context)) {
- SPPenContext *pc = SP_PEN_CONTEXT(desktop->event_context);
+ Inkscape::UI::Tools::PenTool *pc = SP_PEN_CONTEXT(desktop->event_context);
sp_pen_context_set_polyline_mode(pc);
}
}
diff --git a/src/widgets/rect-toolbar.cpp b/src/widgets/rect-toolbar.cpp
index 0287a9aeb..f5a509db3 100644
--- a/src/widgets/rect-toolbar.cpp
+++ b/src/widgets/rect-toolbar.cpp
@@ -55,7 +55,7 @@
#include "../ui/icon-names.h"
#include "util/units.h"
#include "ui/widget/unit-tracker.h"
-#include "../pen-context.h"
+#include "ui/tools/pen-tool.h"
#include "../sp-namedview.h"
#include "../sp-rect.h"
diff --git a/src/widgets/sp-color-notebook.cpp b/src/widgets/sp-color-notebook.cpp
index c709e9775..e081f98e0 100644
--- a/src/widgets/sp-color-notebook.cpp
+++ b/src/widgets/sp-color-notebook.cpp
@@ -39,7 +39,7 @@
#include "color-profile.h"
#include "cms-system.h"
#include "tools-switch.h"
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
using Inkscape::CMSSystem;
@@ -542,7 +542,7 @@ void ColorNotebook::_picker_clicked(GtkWidget * /*widget*/, SPColorNotebook * /*
// Set the dropper into a "one click" mode, so it reverts to the previous tool after a click
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
prefs->setBool("/tools/dropper/onetimepick", true);
- sp_toggle_dropper(SP_ACTIVE_DESKTOP);
+ Inkscape::UI::Tools::sp_toggle_dropper(SP_ACTIVE_DESKTOP);
}
void ColorNotebook::_rgbaEntryChangedHook(GtkEntry *entry, SPColorNotebook *colorbook)
diff --git a/src/widgets/spinbutton-events.cpp b/src/widgets/spinbutton-events.cpp
index 7a481aea8..0280694f6 100644
--- a/src/widgets/spinbutton-events.cpp
+++ b/src/widgets/spinbutton-events.cpp
@@ -18,7 +18,7 @@
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
-#include "../event-context.h"
+#include "ui/tools/tool-base.h"
#include "sp-widget.h"
#include "widget-sizes.h"
@@ -67,7 +67,7 @@ gboolean spinbutton_keypress(GtkWidget *w, GdkEventKey *event, gpointer /*data*/
{
gboolean result = FALSE; // I didn't consume the event
- switch (get_group0_keyval(event)) {
+ switch (Inkscape::UI::Tools::get_group0_keyval(event)) {
case GDK_KEY_Escape: // defocus
spinbutton_undo(w);
spinbutton_defocus(w);
diff --git a/src/widgets/spiral-toolbar.cpp b/src/widgets/spiral-toolbar.cpp
index b4e8e68a7..6b10bfce9 100644
--- a/src/widgets/spiral-toolbar.cpp
+++ b/src/widgets/spiral-toolbar.cpp
@@ -53,7 +53,7 @@
#include "../xml/repr.h"
#include "ui/uxmanager.h"
#include "../ui/icon-names.h"
-#include "../pen-context.h"
+#include "ui/tools/pen-tool.h"
#include "../sp-spiral.h"
using Inkscape::UI::UXManager;
diff --git a/src/widgets/spray-toolbar.cpp b/src/widgets/spray-toolbar.cpp
index 247df53e2..2a8c85475 100644
--- a/src/widgets/spray-toolbar.cpp
+++ b/src/widgets/spray-toolbar.cpp
@@ -52,8 +52,8 @@
#include "../xml/repr.h"
#include "ui/uxmanager.h"
#include "../ui/icon-names.h"
-#include "../pen-context.h"
-#include "../spray-context.h"
+#include "ui/tools/pen-tool.h"
+#include "ui/tools/spray-tool.h"
using Inkscape::UI::UXManager;
using Inkscape::DocumentUndo;
diff --git a/src/widgets/star-toolbar.cpp b/src/widgets/star-toolbar.cpp
index 9e26988ff..bac0271db 100644
--- a/src/widgets/star-toolbar.cpp
+++ b/src/widgets/star-toolbar.cpp
@@ -53,7 +53,7 @@
#include "../xml/repr.h"
#include "ui/uxmanager.h"
#include "../ui/icon-names.h"
-#include "../pen-context.h"
+#include "ui/tools/pen-tool.h"
#include "../sp-star.h"
diff --git a/src/widgets/text-toolbar.cpp b/src/widgets/text-toolbar.cpp
index 6b9fc900c..750fa1de6 100644
--- a/src/widgets/text-toolbar.cpp
+++ b/src/widgets/text-toolbar.cpp
@@ -56,7 +56,7 @@
#include "../xml/repr.h"
#include "ui/uxmanager.h"
#include "../ui/icon-names.h"
-#include "../pen-context.h"
+#include "ui/tools/pen-tool.h"
#include "../sp-namedview.h"
#include "../svg/css-ostringstream.h"
#include "../sp-flowtext.h"
@@ -64,7 +64,7 @@
#include "../style.h"
#include "../libnrtype/font-lister.h"
#include "../libnrtype/font-instance.h"
-#include "../text-context.h"
+#include "ui/tools/text-tool.h"
#include "../text-editing.h"
#include "widgets/font-selector.h"
@@ -652,7 +652,7 @@ static void sp_text_dx_value_changed( GtkAdjustment *adj, GObject *tbl )
bool modmade = false;
if( SP_IS_TEXT_CONTEXT((SP_ACTIVE_DESKTOP)->event_context) ) {
- SPTextContext *const tc = SP_TEXT_CONTEXT((SP_ACTIVE_DESKTOP)->event_context);
+ Inkscape::UI::Tools::TextTool *const tc = SP_TEXT_CONTEXT((SP_ACTIVE_DESKTOP)->event_context);
if( tc ) {
unsigned char_index = -1;
TextTagAttributes *attributes =
@@ -686,7 +686,7 @@ static void sp_text_dy_value_changed( GtkAdjustment *adj, GObject *tbl )
bool modmade = false;
if( SP_IS_TEXT_CONTEXT((SP_ACTIVE_DESKTOP)->event_context) ) {
- SPTextContext *const tc = SP_TEXT_CONTEXT((SP_ACTIVE_DESKTOP)->event_context);
+ Inkscape::UI::Tools::TextTool *const tc = SP_TEXT_CONTEXT((SP_ACTIVE_DESKTOP)->event_context);
if( tc ) {
unsigned char_index = -1;
TextTagAttributes *attributes =
@@ -721,7 +721,7 @@ static void sp_text_rotation_value_changed( GtkAdjustment *adj, GObject *tbl )
bool modmade = false;
if( SP_IS_TEXT_CONTEXT((SP_ACTIVE_DESKTOP)->event_context) ) {
- SPTextContext *const tc = SP_TEXT_CONTEXT((SP_ACTIVE_DESKTOP)->event_context);
+ Inkscape::UI::Tools::TextTool *const tc = SP_TEXT_CONTEXT((SP_ACTIVE_DESKTOP)->event_context);
if( tc ) {
unsigned char_index = -1;
TextTagAttributes *attributes =
@@ -1091,7 +1091,7 @@ static void sp_text_toolbox_selection_changed(Inkscape::Selection */*selection*/
// Kerning (xshift), yshift, rotation. NB: These are not CSS attributes.
if( SP_IS_TEXT_CONTEXT((SP_ACTIVE_DESKTOP)->event_context) ) {
- SPTextContext *const tc = SP_TEXT_CONTEXT((SP_ACTIVE_DESKTOP)->event_context);
+ Inkscape::UI::Tools::TextTool *const tc = SP_TEXT_CONTEXT((SP_ACTIVE_DESKTOP)->event_context);
if( tc ) {
unsigned char_index = -1;
TextTagAttributes *attributes =
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp
index ddbe77fbb..02da805bf 100644
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
@@ -96,7 +96,7 @@
#include "toolbox.h"
#include <gtk/gtk.h>
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
//#define DEBUG_TEXT
@@ -104,9 +104,10 @@ using Inkscape::UI::UXManager;
using Inkscape::DocumentUndo;
using Inkscape::UI::PrefPusher;
using Inkscape::UI::ToolboxFactory;
+using Inkscape::UI::Tools::ToolBase;
typedef void (*SetupFunction)(GtkWidget *toolbox, SPDesktop *desktop);
-typedef void (*UpdateFunction)(SPDesktop *desktop, SPEventContext *eventcontext, GtkWidget *toolbox);
+typedef void (*UpdateFunction)(SPDesktop *desktop, ToolBase *eventcontext, GtkWidget *toolbox);
enum BarId {
BAR_TOOL = 0,
@@ -550,13 +551,13 @@ static Glib::RefPtr<Gtk::ActionGroup> create_or_fetch_actions( SPDesktop* deskto
static void setup_snap_toolbox(GtkWidget *toolbox, SPDesktop *desktop);
static void setup_tool_toolbox(GtkWidget *toolbox, SPDesktop *desktop);
-static void update_tool_toolbox(SPDesktop *desktop, SPEventContext *eventcontext, GtkWidget *toolbox);
+static void update_tool_toolbox(SPDesktop *desktop, ToolBase *eventcontext, GtkWidget *toolbox);
static void setup_aux_toolbox(GtkWidget *toolbox, SPDesktop *desktop);
-static void update_aux_toolbox(SPDesktop *desktop, SPEventContext *eventcontext, GtkWidget *toolbox);
+static void update_aux_toolbox(SPDesktop *desktop, ToolBase *eventcontext, GtkWidget *toolbox);
static void setup_commands_toolbox(GtkWidget *toolbox, SPDesktop *desktop);
-static void update_commands_toolbox(SPDesktop *desktop, SPEventContext *eventcontext, GtkWidget *toolbox);
+static void update_commands_toolbox(SPDesktop *desktop, ToolBase *eventcontext, GtkWidget *toolbox);
static GtkToolItem * sp_toolbox_button_item_new_from_verb_with_doubleclick( GtkWidget *t, Inkscape::IconSize size, SPButtonType type,
Inkscape::Verb *verb, Inkscape::Verb *doubleclick_verb,
@@ -1310,7 +1311,7 @@ void setup_tool_toolbox(GtkWidget *toolbox, SPDesktop *desktop)
"/toolbox/tools/small");
}
-void update_tool_toolbox( SPDesktop *desktop, SPEventContext *eventcontext, GtkWidget * /*toolbox*/ )
+void update_tool_toolbox( SPDesktop *desktop, ToolBase *eventcontext, GtkWidget * /*toolbox*/ )
{
gchar const *const tname = ( eventcontext
? eventcontext->getPrefsPath().c_str() //g_type_name(G_OBJECT_TYPE(eventcontext))
@@ -1432,7 +1433,7 @@ void setup_aux_toolbox(GtkWidget *toolbox, SPDesktop *desktop)
g_object_unref( G_OBJECT(grouper) );
}
-void update_aux_toolbox(SPDesktop * /*desktop*/, SPEventContext *eventcontext, GtkWidget *toolbox)
+void update_aux_toolbox(SPDesktop * /*desktop*/, ToolBase *eventcontext, GtkWidget *toolbox)
{
gchar const *tname = ( eventcontext
? eventcontext->getPrefsPath().c_str() //g_type_name(G_OBJECT_TYPE(eventcontext))
@@ -1495,7 +1496,7 @@ void setup_commands_toolbox(GtkWidget *toolbox, SPDesktop *desktop)
"/toolbox/small" );
}
-void update_commands_toolbox(SPDesktop * /*desktop*/, SPEventContext * /*eventcontext*/, GtkWidget * /*toolbox*/)
+void update_commands_toolbox(SPDesktop * /*desktop*/, ToolBase * /*eventcontext*/, GtkWidget * /*toolbox*/)
{
}
@@ -1864,7 +1865,7 @@ Glib::ustring ToolboxFactory::getToolboxName(GtkWidget* toolbox)
return name;
}
-void ToolboxFactory::updateSnapToolbox(SPDesktop *desktop, SPEventContext * /*eventcontext*/, GtkWidget *toolbox)
+void ToolboxFactory::updateSnapToolbox(SPDesktop *desktop, ToolBase * /*eventcontext*/, GtkWidget *toolbox)
{
g_assert(desktop != NULL);
g_assert(toolbox != NULL);
diff --git a/src/widgets/toolbox.h b/src/widgets/toolbox.h
index e9ffcda4a..fb749bfb5 100644
--- a/src/widgets/toolbox.h
+++ b/src/widgets/toolbox.h
@@ -23,7 +23,16 @@
#define TOOLBAR_SLIDER_HINT "full"
class SPDesktop;
-class SPEventContext;
+
+namespace Inkscape {
+namespace UI {
+namespace Tools {
+
+class ToolBase;
+
+}
+}
+}
namespace Inkscape {
namespace UI {
@@ -50,7 +59,7 @@ public:
static Glib::ustring getToolboxName(GtkWidget* toolbox);
- static void updateSnapToolbox(SPDesktop *desktop, SPEventContext *eventcontext, GtkWidget *toolbox);
+ static void updateSnapToolbox(SPDesktop *desktop, Inkscape::UI::Tools::ToolBase *eventcontext, GtkWidget *toolbox);
static Inkscape::IconSize prefToSize(Glib::ustring const &path, int base = 0 );
diff --git a/src/widgets/tweak-toolbar.cpp b/src/widgets/tweak-toolbar.cpp
index 6da7608bd..6999b057d 100644
--- a/src/widgets/tweak-toolbar.cpp
+++ b/src/widgets/tweak-toolbar.cpp
@@ -52,8 +52,8 @@
#include "../xml/repr.h"
#include "ui/uxmanager.h"
#include "../ui/icon-names.h"
-#include "../pen-context.h"
-#include "../tweak-context.h"
+#include "ui/tools/pen-tool.h"
+#include "ui/tools/tweak-tool.h"
using Inkscape::UI::UXManager;
using Inkscape::DocumentUndo;
@@ -92,7 +92,7 @@ static void sp_tweak_mode_changed( EgeSelectOneAction *act, GObject *tbl )
prefs->setInt("/tools/tweak/mode", mode);
static gchar const* names[] = {"tweak_doh", "tweak_dos", "tweak_dol", "tweak_doo", "tweak_channels_label"};
- bool flag = ((mode == TWEAK_MODE_COLORPAINT) || (mode == TWEAK_MODE_COLORJITTER));
+ bool flag = ((mode == Inkscape::UI::Tools::TWEAK_MODE_COLORPAINT) || (mode == Inkscape::UI::Tools::TWEAK_MODE_COLORJITTER));
for (size_t i = 0; i < G_N_ELEMENTS(names); ++i) {
GtkAction *act = GTK_ACTION(g_object_get_data( tbl, names[i] ));
if (act) {
@@ -289,7 +289,7 @@ void sp_tweak_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObj
EgeOutputAction* act = ege_output_action_new( "TweakChannelsLabel", _("Channels:"), "", 0 );
ege_output_action_set_use_markup( act, TRUE );
gtk_action_group_add_action( mainActions, GTK_ACTION( act ) );
- if (mode != TWEAK_MODE_COLORPAINT && mode != TWEAK_MODE_COLORJITTER) {
+ if (mode != Inkscape::UI::Tools::TWEAK_MODE_COLORPAINT && mode != Inkscape::UI::Tools::TWEAK_MODE_COLORJITTER) {
gtk_action_set_sensitive (GTK_ACTION(act), FALSE);
}
g_object_set_data( holder, "tweak_channels_label", act);
@@ -306,7 +306,7 @@ void sp_tweak_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObj
gtk_action_group_add_action( mainActions, GTK_ACTION( act ) );
g_signal_connect_after( G_OBJECT(act), "toggled", G_CALLBACK(tweak_toggle_doh), desktop );
gtk_toggle_action_set_active( GTK_TOGGLE_ACTION(act), prefs->getBool("/tools/tweak/doh", true) );
- if (mode != TWEAK_MODE_COLORPAINT && mode != TWEAK_MODE_COLORJITTER) {
+ if (mode != Inkscape::UI::Tools::TWEAK_MODE_COLORPAINT && mode != Inkscape::UI::Tools::TWEAK_MODE_COLORJITTER) {
gtk_action_set_sensitive (GTK_ACTION(act), FALSE);
}
g_object_set_data( holder, "tweak_doh", act);
@@ -322,7 +322,7 @@ void sp_tweak_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObj
gtk_action_group_add_action( mainActions, GTK_ACTION( act ) );
g_signal_connect_after( G_OBJECT(act), "toggled", G_CALLBACK(tweak_toggle_dos), desktop );
gtk_toggle_action_set_active( GTK_TOGGLE_ACTION(act), prefs->getBool("/tools/tweak/dos", true) );
- if (mode != TWEAK_MODE_COLORPAINT && mode != TWEAK_MODE_COLORJITTER) {
+ if (mode != Inkscape::UI::Tools::TWEAK_MODE_COLORPAINT && mode != Inkscape::UI::Tools::TWEAK_MODE_COLORJITTER) {
gtk_action_set_sensitive (GTK_ACTION(act), FALSE);
}
g_object_set_data( holder, "tweak_dos", act );
@@ -338,7 +338,7 @@ void sp_tweak_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObj
gtk_action_group_add_action( mainActions, GTK_ACTION( act ) );
g_signal_connect_after( G_OBJECT(act), "toggled", G_CALLBACK(tweak_toggle_dol), desktop );
gtk_toggle_action_set_active( GTK_TOGGLE_ACTION(act), prefs->getBool("/tools/tweak/dol", true) );
- if (mode != TWEAK_MODE_COLORPAINT && mode != TWEAK_MODE_COLORJITTER) {
+ if (mode != Inkscape::UI::Tools::TWEAK_MODE_COLORPAINT && mode != Inkscape::UI::Tools::TWEAK_MODE_COLORJITTER) {
gtk_action_set_sensitive (GTK_ACTION(act), FALSE);
}
g_object_set_data( holder, "tweak_dol", act );
@@ -354,7 +354,7 @@ void sp_tweak_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObj
gtk_action_group_add_action( mainActions, GTK_ACTION( act ) );
g_signal_connect_after( G_OBJECT(act), "toggled", G_CALLBACK(tweak_toggle_doo), desktop );
gtk_toggle_action_set_active( GTK_TOGGLE_ACTION(act), prefs->getBool("/tools/tweak/doo", true) );
- if (mode != TWEAK_MODE_COLORPAINT && mode != TWEAK_MODE_COLORJITTER) {
+ if (mode != Inkscape::UI::Tools::TWEAK_MODE_COLORPAINT && mode != Inkscape::UI::Tools::TWEAK_MODE_COLORJITTER) {
gtk_action_set_sensitive (GTK_ACTION(act), FALSE);
}
g_object_set_data( holder, "tweak_doo", act );
@@ -373,7 +373,7 @@ void sp_tweak_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObj
sp_tweak_fidelity_value_changed, NULL /*unit tracker*/, 0.01, 0, 100 );
gtk_action_group_add_action( mainActions, GTK_ACTION(eact) );
gtk_action_set_sensitive( GTK_ACTION(eact), TRUE );
- if (mode == TWEAK_MODE_COLORPAINT || mode == TWEAK_MODE_COLORJITTER) {
+ if (mode == Inkscape::UI::Tools::TWEAK_MODE_COLORPAINT || mode == Inkscape::UI::Tools::TWEAK_MODE_COLORJITTER) {
gtk_action_set_sensitive (GTK_ACTION(eact), FALSE);
}
g_object_set_data( holder, "tweak_fidelity", eact );
diff --git a/src/widgets/zoom-toolbar.cpp b/src/widgets/zoom-toolbar.cpp
index 9cdbc3d6a..a5ab6e211 100644
--- a/src/widgets/zoom-toolbar.cpp
+++ b/src/widgets/zoom-toolbar.cpp
@@ -51,8 +51,8 @@
#include "../xml/repr.h"
#include "ui/uxmanager.h"
#include "../ui/icon-names.h"
-#include "../pen-context.h"
-#include "../tweak-context.h"
+#include "ui/tools/pen-tool.h"
+#include "ui/tools/tweak-tool.h"
using Inkscape::UI::UXManager;