summaryrefslogtreecommitdiffstats
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
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)
-rw-r--r--share/extensions/hpgl_input.inx2
-rw-r--r--share/extensions/hpgl_output.inx2
-rw-r--r--share/extensions/plotter.inx7
-rw-r--r--share/extensions/plotter.py8
-rw-r--r--src/CMakeLists.txt49
-rw-r--r--src/Makefile.am1
-rw-r--r--src/Makefile_insert26
-rw-r--r--src/box3d-side.cpp2
-rw-r--r--src/box3d.cpp2
-rw-r--r--src/context-fns.cpp2
-rw-r--r--src/desktop-events.cpp2
-rw-r--r--src/desktop-style.cpp2
-rw-r--r--src/desktop.cpp6
-rw-r--r--src/dialogs/dialog-events.cpp2
-rw-r--r--src/draw-anchor.cpp6
-rw-r--r--src/draw-anchor.h6
-rw-r--r--src/file.cpp2
-rw-r--r--src/gradient-chemistry.cpp2
-rw-r--r--src/helper/window.cpp2
-rw-r--r--src/inkscape.cpp2
-rw-r--r--src/interface.cpp4
-rw-r--r--src/knot.cpp2
-rw-r--r--src/knotholder.cpp8
-rw-r--r--src/live_effects/effect.cpp2
-rw-r--r--src/live_effects/lpe-line_segment.cpp2
-rw-r--r--src/live_effects/parameter/path.cpp2
-rw-r--r--src/persp3d.cpp2
-rw-r--r--src/selection-chemistry.cpp10
-rw-r--r--src/seltrans.cpp2
-rw-r--r--src/shortcuts.cpp2
-rw-r--r--src/snap.cpp2
-rw-r--r--src/sp-path.cpp2
-rw-r--r--src/tools-switch.cpp44
-rw-r--r--src/ui/CMakeLists.txt54
-rw-r--r--src/ui/clipboard.cpp4
-rw-r--r--src/ui/dialog/align-and-distribute.cpp2
-rw-r--r--src/ui/dialog/dialog.cpp2
-rw-r--r--src/ui/dialog/guides.cpp2
-rw-r--r--src/ui/dialog/layer-properties.cpp2
-rw-r--r--src/ui/dialog/layers.cpp2
-rw-r--r--src/ui/dialog/spellcheck.cpp2
-rw-r--r--src/ui/dialog/xml-tree.cpp2
-rw-r--r--src/ui/tool/Makefile_insert2
-rw-r--r--src/ui/tool/control-point.cpp2
-rw-r--r--src/ui/tool/manipulator.h2
-rw-r--r--src/ui/tool/selector.cpp2
-rw-r--r--src/ui/tool/transform-handle-set.cpp2
-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
-rw-r--r--src/ui/widget/rotateable.cpp2
-rw-r--r--src/ui/widget/selected-style.cpp2
-rw-r--r--src/ui/widget/spinbutton.cpp2
-rw-r--r--src/vanishing-point.cpp2
-rw-r--r--src/verbs.cpp8
-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.cpp4
-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/gradient-toolbar.cpp4
-rw-r--r--src/widgets/lpe-toolbar.cpp4
-rw-r--r--src/widgets/measure-toolbar.cpp2
-rw-r--r--src/widgets/mesh-toolbar.cpp4
-rw-r--r--src/widgets/node-toolbar.cpp4
-rw-r--r--src/widgets/paintbucket-toolbar.cpp4
-rw-r--r--src/widgets/pencil-toolbar.cpp4
-rw-r--r--src/widgets/rect-toolbar.cpp2
-rw-r--r--src/widgets/sp-color-notebook.cpp2
-rw-r--r--src/widgets/spinbutton-events.cpp2
-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.cpp4
-rw-r--r--src/widgets/toolbox.cpp2
-rw-r--r--src/widgets/tweak-toolbar.cpp4
-rw-r--r--src/widgets/zoom-toolbar.cpp4
127 files changed, 331 insertions, 323 deletions
diff --git a/share/extensions/hpgl_input.inx b/share/extensions/hpgl_input.inx
index 69711d85a..8dd90b3f7 100644
--- a/share/extensions/hpgl_input.inx
+++ b/share/extensions/hpgl_input.inx
@@ -14,7 +14,7 @@
<extension>.hpgl</extension>
<mimetype>image/hpgl</mimetype>
<_filetypename>HP Graphics Language file (*.hpgl)</_filetypename>
- <_filetypetooltip>Import HP Graphics Language file</_filetypetooltip>
+ <_filetypetooltip>Import an HP Graphics Language file</_filetypetooltip>
</input>
<script>
<command reldir="extensions" interpreter="python">hpgl_input.py</command>
diff --git a/share/extensions/hpgl_output.inx b/share/extensions/hpgl_output.inx
index 7f8705996..c51215b4c 100644
--- a/share/extensions/hpgl_output.inx
+++ b/share/extensions/hpgl_output.inx
@@ -42,7 +42,7 @@
<extension>.hpgl</extension>
<mimetype>image/hpgl</mimetype>
<_filetypename>HP Graphics Language file (*.hpgl)</_filetypename>
- <_filetypetooltip>Export to an HP Graphics Language file</_filetypetooltip>
+ <_filetypetooltip>Export an HP Graphics Language file</_filetypetooltip>
<dataloss>true</dataloss>
</output>
<script>
diff --git a/share/extensions/plotter.inx b/share/extensions/plotter.inx
index b950e0246..526ab1bd3 100644
--- a/share/extensions/plotter.inx
+++ b/share/extensions/plotter.inx
@@ -27,9 +27,10 @@
<option value="115200">115200</option>
</param>
<param name="flowControl" type="optiongroup" appearance="minimal" _gui-text="Flow control" _gui-description="Software / Hardware flow control - Try different settings to find the one that fits your plotter (Default: None)">
- <option value="0">None</option>
- <option value="1">Software (XON/XOFF)</option>
- <option value="2">Hardware (RTS/CTS)</option>
+ <_option value="">None</_option>
+ <_option value="xonxoff">Software (XON/XOFF)</_option>
+ <_option value="rtscts">Hardware (RTS/CTS)</_option>
+ <_option value="dsrdtrrtscts">Hardware (DSR/DTR + RTS/CTS)</_option>
</param>
<param name="space" type="description">&#xa0;</param>
<_param name="serialHelp" type="description">This can be a physical serial connection or a USB-to-Serial bridge. Ask your plotter manufacturer for drivers if needed.</_param>
diff --git a/share/extensions/plotter.py b/share/extensions/plotter.py
index aef9e016d..d518de4c9 100644
--- a/share/extensions/plotter.py
+++ b/share/extensions/plotter.py
@@ -98,10 +98,12 @@ class MyEffect(inkex.Effect):
raise ValueError, ("", type, value), traceback
'''
# send data to plotter
- if self.options.flowControl == '1':
+ if self.options.flowControl == 'xonxoff':
mySerial = serial.Serial(port=self.options.serialPort, baudrate=self.options.serialBaudRate, timeout=0.1, writeTimeout=10, xonxoff=True)
- elif self.options.flowControl == '2':
- mySerial = serial.Serial(port=self.options.serialPort, baudrate=self.options.serialBaudRate, timeout=0.1, writeTimeout=10, dsrdtr=None, rtscts=True)
+ elif self.options.flowControl == 'rtscts':
+ mySerial = serial.Serial(port=self.options.serialPort, baudrate=self.options.serialBaudRate, timeout=0.1, writeTimeout=10, rtscts=True)
+ elif self.options.flowControl == 'dsrdtrrtscts':
+ mySerial = serial.Serial(port=self.options.serialPort, baudrate=self.options.serialBaudRate, timeout=0.1, writeTimeout=10, dsrdtr=True, rtscts=True)
else:
mySerial = serial.Serial(port=self.options.serialPort, baudrate=self.options.serialBaudRate, timeout=0.1, writeTimeout=10)
try:
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 32bcf19a7..54b15d342 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -77,7 +77,6 @@ set(sp_SRC
sp-tspan.cpp
sp-use-reference.cpp
sp-use.cpp
- spiral-context.cpp
splivarot.cpp
@@ -167,19 +166,15 @@ set(sp_SRC
)
set(inkscape_SRC
- arc-context.cpp
attributes.cpp
axis-manip.cpp
- box3d-context.cpp
box3d-side.cpp
box3d.cpp
color-profile.cpp
color.cpp
- common-context.cpp
composite-undo-stack-observer.cpp
conditions.cpp
conn-avoid-ref.cpp
- connector-context.cpp
console-output-undo-observer.cpp
context-fns.cpp
desktop-events.cpp
@@ -193,26 +188,19 @@ set(inkscape_SRC
document.cpp
doxygen-main.cpp
draw-anchor.cpp
- draw-context.cpp
- dropper-context.cpp
- dyna-draw-context.cpp
ege-adjustment-action.cpp
ege-color-prof-tracker.cpp
ege-output-action.cpp
ege-select-one-action.cpp
- eraser-context.cpp
- event-context.cpp
event-log.cpp
extract-uri.cpp
file.cpp
filter-chemistry.cpp
filter-enums.cpp
- flood-context.cpp
gc-anchored.cpp
gc-finalized.cpp
gc.cpp
gradient-chemistry.cpp
- gradient-context.cpp
gradient-drag.cpp
graphlayout.cpp
guide-snapper.cpp
@@ -232,12 +220,9 @@ set(inkscape_SRC
layer-model.cpp
line-geometry.cpp
line-snapper.cpp
- lpe-tool-context.cpp
main-cmdlineact.cpp
marker.cpp
- measure-context.cpp
media.cpp
- mesh-context.cpp
message-context.cpp
message-stack.cpp
mod360.cpp
@@ -245,8 +230,6 @@ set(inkscape_SRC
object-hierarchy.cpp
object-snapper.cpp
path-chemistry.cpp
- pen-context.cpp
- pencil-context.cpp
persp3d-reference.cpp
persp3d.cpp
perspective-line.cpp
@@ -256,13 +239,11 @@ set(inkscape_SRC
profile-manager.cpp
proj_pt.cpp
rdf.cpp
- rect-context.cpp
removeoverlap.cpp
resource-manager.cpp
rubberband.cpp
satisfied-guide-cns.cpp
selcue.cpp
- select-context.cpp
selection-chemistry.cpp
selection-describer.cpp
selection.cpp
@@ -276,17 +257,13 @@ set(inkscape_SRC
snapped-line.cpp
snapped-point.cpp
snapper.cpp
- spray-context.cpp
- star-context.cpp
style.cpp
svg-view-widget.cpp
svg-view.cpp
text-chemistry.cpp
- text-context.cpp
text-editing.cpp
tools-switch.cpp
transf_mat_3x4.cpp
- tweak-context.cpp
unclump.cpp
unicoderange.cpp
uri-references.cpp
@@ -294,20 +271,16 @@ set(inkscape_SRC
vanishing-point.cpp
verbs.cpp
version.cpp
- zoom-context.cpp
-
# -------
# Headers
MultiPrinter.h
PylogFormatter.h
TRPIFormatter.h
- arc-context.h
attributes-test.h
attributes.h
axis-manip.h
bad-uri-exception.h
- box3d-context.h
box3d-side.h
box3d.h
cms-color-types.h
@@ -318,12 +291,10 @@ set(inkscape_SRC
color-rgba.h
color.h
colorspace.h
- common-context.h
composite-undo-stack-observer.h
conditions.h
conn-avoid-ref.h
connection-pool.h
- connector-context.h
console-output-undo-observer.h
context-fns.h
decimal-round.h
@@ -339,16 +310,11 @@ set(inkscape_SRC
document-undo.h
document.h
draw-anchor.h
- draw-context.h
- dropper-context.h
- dyna-draw-context.h
ege-adjustment-action.h
ege-color-prof-tracker.h
ege-output-action.h
ege-select-one-action.h
enums.h
- eraser-context.h
- event-context.h
event-log.h
event.h
extract-uri-test.h
@@ -358,7 +324,6 @@ set(inkscape_SRC
fill-or-stroke.h
filter-chemistry.h
filter-enums.h
- flood-context.h
gc-alloc.h
gc-allocator.h
gc-anchored.h
@@ -367,7 +332,6 @@ set(inkscape_SRC
gc-managed.h
gc-soft-ptr.h
gradient-chemistry.h
- gradient-context.h
gradient-drag.h
graphlayout.h
guide-snapper.h
@@ -393,15 +357,12 @@ set(inkscape_SRC
layer-model.h
line-geometry.h
line-snapper.h
- lpe-tool-context.h
macros.h
main-cmdlineact.h
marker-test.h
marker.h
- measure-context.h
media.h
menus-skeleton.h
- mesh-context.h
message-context.h
message-stack.h
message.h
@@ -414,8 +375,6 @@ set(inkscape_SRC
object-snapper.h
path-chemistry.h
path-prefix.h
- pen-context.h
- pencil-context.h
persp3d-reference.h
persp3d.h
perspective-line.h
@@ -427,7 +386,6 @@ set(inkscape_SRC
profile-manager.h
proj_pt.h
rdf.h
- rect-context.h
registrytool.h
remove-last.h
removeoverlap.h
@@ -438,7 +396,6 @@ set(inkscape_SRC
rubberband.h
satisfied-guide-cns.h
selcue.h
- select-context.h
selection-chemistry.h
selection-describer.h
selection.h
@@ -454,10 +411,7 @@ set(inkscape_SRC
snapped-line.h
snapped-point.h
snapper.h
- spiral-context.h
splivarot.h
- spray-context.h
- star-context.h
streq.h
strneq.h
style-test.h
@@ -468,13 +422,11 @@ set(inkscape_SRC
syseq.h
test-helpers.h
text-chemistry.h
- text-context.h
text-editing.h
text-tag-attributes.h
tool-factory.h
tools-switch.h
transf_mat_3x4.h
- tweak-context.h
unclump.h
undo-stack-observer.h
unicoderange.h
@@ -484,7 +436,6 @@ set(inkscape_SRC
verbs-test.h
verbs.h
version.h
- zoom-context.h
)
if(WIN32)
diff --git a/src/Makefile.am b/src/Makefile.am
index 411e3cf86..2f91c3c24 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -134,6 +134,7 @@ include ui/Makefile_insert
include ui/cache/Makefile_insert
include ui/dialog/Makefile_insert
include ui/tool/Makefile_insert
+include ui/tools/Makefile_insert
include ui/view/Makefile_insert
include ui/widget/Makefile_insert
include util/Makefile_insert
diff --git a/src/Makefile_insert b/src/Makefile_insert
index e719f8894..5e441560a 100644
--- a/src/Makefile_insert
+++ b/src/Makefile_insert
@@ -4,14 +4,12 @@ ink_common_sources += \
util/find-last-if.h \
util/longest-common-suffix.h \
remove-last.h \
- arc-context.cpp arc-context.h \
attributes.cpp attributes.h \
attribute-rel-svg.cpp attribute-rel-svg.h \
attribute-rel-css.cpp attribute-rel-css.h \
attribute-rel-util.cpp attribute-rel-util.h \
axis-manip.cpp axis-manip.h \
bad-uri-exception.h \
- box3d-context.cpp box3d-context.h \
box3d.cpp box3d.h \
box3d-side.cpp box3d-side.h \
brokenimage.xpm \
@@ -22,13 +20,11 @@ ink_common_sources += \
color-profile-cms-fns.h \
color-rgba.h \
colorspace.h \
- common-context.cpp common-context.h \
composite-undo-stack-observer.cpp \
composite-undo-stack-observer.h \
conditions.cpp conditions.h \
conn-avoid-ref.cpp conn-avoid-ref.h \
connection-pool.h \
- connector-context.cpp connector-context.h \
console-output-undo-observer.h console-output-undo-observer.cpp \
context-fns.cpp context-fns.h \
decimal-round.h \
@@ -43,16 +39,11 @@ ink_common_sources += \
document-undo.cpp document-undo.h \
doxygen-main.cpp \
draw-anchor.cpp draw-anchor.h \
- draw-context.cpp draw-context.h \
- dropper-context.cpp dropper-context.h \
- dyna-draw-context.cpp dyna-draw-context.h \
ege-adjustment-action.cpp ege-adjustment-action.h \
ege-color-prof-tracker.cpp ege-color-prof-tracker.h \
ege-output-action.cpp ege-output-action.h \
ege-select-one-action.cpp ege-select-one-action.h \
enums.h \
- eraser-context.cpp eraser-context.h \
- event-context.cpp event-context.h \
event-log.cpp event-log.h event.h \
extract-uri.cpp extract-uri.h \
factory.h \
@@ -60,7 +51,6 @@ ink_common_sources += \
fill-or-stroke.h \
filter-chemistry.cpp filter-chemistry.h \
filter-enums.cpp filter-enums.h \
- flood-context.cpp flood-context.h \
gc-alloc.h \
gc-anchored.h gc-anchored.cpp \
gc-core.h \
@@ -69,7 +59,6 @@ ink_common_sources += \
gc-managed.h \
gc-soft-ptr.h \
gradient-chemistry.cpp gradient-chemistry.h \
- gradient-context.cpp gradient-context.h \
gradient-drag.cpp gradient-drag.h \
graphlayout.cpp graphlayout.h \
guide-snapper.cpp guide-snapper.h \
@@ -96,13 +85,11 @@ ink_common_sources += \
layer-model.cpp layer-model.h \
line-geometry.cpp line-geometry.h \
line-snapper.cpp line-snapper.h \
- lpe-tool-context.cpp lpe-tool-context.h \
macros.h \
main-cmdlineact.cpp main-cmdlineact.h \
marker.cpp marker.h \
media.cpp media.h \
menus-skeleton.h \
- mesh-context.cpp mesh-context.h \
message-context.cpp message-context.h \
message.h \
message-stack.cpp message-stack.h \
@@ -113,8 +100,6 @@ ink_common_sources += \
object-snapper.cpp object-snapper.h \
path-chemistry.cpp path-chemistry.h \
path-prefix.h \
- pencil-context.cpp pencil-context.h \
- pen-context.cpp pen-context.h \
persp3d.cpp persp3d.h \
persp3d-reference.cpp persp3d-reference.h \
perspective-line.cpp perspective-line.h \
@@ -126,14 +111,12 @@ ink_common_sources += \
proj_pt.cpp proj_pt.h \
removeoverlap.cpp removeoverlap.h \
rdf.cpp rdf.h \
- rect-context.cpp rect-context.h \
resource-manager.cpp resource-manager.h \
require-config.h \
round.h \
rubberband.cpp rubberband.h \
satisfied-guide-cns.cpp satisfied-guide-cns.h \
selcue.cpp selcue.h \
- select-context.cpp select-context.h \
selection-chemistry.cpp selection-chemistry.h \
selection.cpp selection.h \
selection-describer.cpp selection-describer.h \
@@ -177,7 +160,6 @@ ink_common_sources += \
sp-guide-constraint.h \
sp-guide.cpp sp-guide.h \
sp-image.cpp sp-image.h \
- spiral-context.cpp spiral-context.h \
sp-item.cpp sp-item.h \
sp-item-group.cpp sp-item-group.h \
sp-item-notify-moveto.cpp sp-item-notify-moveto.h \
@@ -226,8 +208,6 @@ ink_common_sources += \
sp-tspan.cpp sp-tspan.h \
sp-use.cpp sp-use.h \
sp-use-reference.cpp sp-use-reference.h \
- spray-context.cpp spray-context.h \
- star-context.cpp star-context.h \
streq.h \
strneq.h \
style.cpp style.h \
@@ -236,13 +216,11 @@ ink_common_sources += \
svg-view-widget.cpp svg-view-widget.h \
syseq.h \
text-chemistry.cpp text-chemistry.h \
- text-context.cpp text-context.h \
text-editing.cpp text-editing.h \
text-tag-attributes.h \
tool-factory.h \
tools-switch.cpp tools-switch.h \
transf_mat_3x4.cpp transf_mat_3x4.h \
- tweak-context.h tweak-context.cpp \
unclump.cpp unclump.h \
undo-stack-observer.h \
unicoderange.cpp unicoderange.h \
@@ -250,9 +228,7 @@ ink_common_sources += \
uri-references.cpp uri-references.h \
vanishing-point.cpp vanishing-point.h \
verbs.cpp verbs.h \
- version.cpp version.h \
- zoom-context.cpp zoom-context.h \
- measure-context.cpp measure-context.h
+ version.cpp version.h
# Additional dependencies
diff --git a/src/box3d-side.cpp b/src/box3d-side.cpp
index 040b031c6..7b5ddc00e 100644
--- a/src/box3d-side.cpp
+++ b/src/box3d-side.cpp
@@ -19,7 +19,7 @@
#include "attributes.h"
#include "inkscape.h"
#include "persp3d.h"
-#include "box3d-context.h"
+#include "ui/tools/box3d-tool.h"
#include "preferences.h"
#include "desktop-style.h"
#include "box3d.h"
diff --git a/src/box3d.cpp b/src/box3d.cpp
index 32442746d..13a8d0e3e 100644
--- a/src/box3d.cpp
+++ b/src/box3d.cpp
@@ -21,7 +21,7 @@
#include "box3d.h"
#include "box3d-side.h"
-#include "box3d-context.h"
+#include "ui/tools/box3d-tool.h"
#include "proj_pt.h"
#include "transf_mat_3x4.h"
#include "perspective-line.h"
diff --git a/src/context-fns.cpp b/src/context-fns.cpp
index 8c18c0764..1e30e51de 100644
--- a/src/context-fns.cpp
+++ b/src/context-fns.cpp
@@ -9,7 +9,7 @@
#include "message-stack.h"
#include "context-fns.h"
#include "snap.h"
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include "sp-namedview.h"
#include "display/snap-indicator.h"
diff --git a/src/desktop-events.cpp b/src/desktop-events.cpp
index 67c500b05..4f8f7889f 100644
--- a/src/desktop-events.cpp
+++ b/src/desktop-events.cpp
@@ -32,7 +32,7 @@
#include "display/snap-indicator.h"
#include "document.h"
#include "document-undo.h"
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include "helper/action.h"
#include "message-context.h"
#include "preferences.h"
diff --git a/src/desktop-style.cpp b/src/desktop-style.cpp
index f8fad9711..00b9db7d0 100644
--- a/src/desktop-style.cpp
+++ b/src/desktop-style.cpp
@@ -42,7 +42,7 @@
#include "xml/sp-css-attr.h"
#include "libnrtype/font-style-to-pos.h"
#include "sp-path.h"
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include "desktop-style.h"
#include "svg/svg-icc-color.h"
diff --git a/src/desktop.cpp b/src/desktop.cpp
index 52aed1cce..cf8c60fec 100644
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
@@ -33,7 +33,7 @@
#include <2geom/transforms.h>
#include <2geom/rect.h>
-#include "box3d-context.h"
+#include "ui/tools/box3d-tool.h"
#include "color.h"
#include "desktop-events.h"
#include "desktop.h"
@@ -64,7 +64,7 @@
#include "message-stack.h"
#include "preferences.h"
#include "resource-manager.h"
-#include "select-context.h"
+#include "ui/tools/select-tool.h"
#include "selection.h"
#include "sp-item-group.h"
#include "sp-item-group.h"
@@ -76,7 +76,7 @@
#include "helper/action.h" //sp_action_perform
// TODO those includes are only for node tool quick zoom. Remove them after fixing it.
-#include "ui/tool/node-tool.h"
+#include "ui/tools/node-tool.h"
#include "ui/tool/control-point-selection.h"
namespace Inkscape { namespace XML { class Node; }}
diff --git a/src/dialogs/dialog-events.cpp b/src/dialogs/dialog-events.cpp
index ac4ed58f9..a12e3eafc 100644
--- a/src/dialogs/dialog-events.cpp
+++ b/src/dialogs/dialog-events.cpp
@@ -27,7 +27,7 @@
#include "desktop.h"
#include "inkscape-private.h"
#include "preferences.h"
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include "dialog-events.h"
diff --git a/src/draw-anchor.cpp b/src/draw-anchor.cpp
index 7cd6daeb5..cd57b2461 100644
--- a/src/draw-anchor.cpp
+++ b/src/draw-anchor.cpp
@@ -16,8 +16,8 @@
#include "draw-anchor.h"
#include "desktop.h"
#include "desktop-handles.h"
-#include "event-context.h"
-#include "lpe-tool-context.h"
+#include "ui/tools/tool-base.h"
+#include "ui/tools/lpe-tool.h"
#include "display/sodipodi-ctrl.h"
#include "display/curve.h"
#include "ui/control-manager.h"
@@ -30,7 +30,7 @@ using Inkscape::ControlManager;
/**
* Creates an anchor object and initializes it.
*/
-SPDrawAnchor *sp_draw_anchor_new(Inkscape::UI::Tools::SPDrawContext *dc, SPCurve *curve, gboolean start, Geom::Point delta)
+SPDrawAnchor *sp_draw_anchor_new(Inkscape::UI::Tools::FreehandBase *dc, SPCurve *curve, gboolean start, Geom::Point delta)
{
if (SP_IS_LPETOOL_CONTEXT(dc)) {
// suppress all kinds of anchors in LPEToolContext
diff --git a/src/draw-anchor.h b/src/draw-anchor.h
index 2312c6c32..e7b252186 100644
--- a/src/draw-anchor.h
+++ b/src/draw-anchor.h
@@ -12,7 +12,7 @@ namespace Inkscape {
namespace UI {
namespace Tools {
-class SPDrawContext;
+class FreehandBase;
}
}
@@ -24,7 +24,7 @@ struct SPCanvasItem;
/// The drawing anchor.
/// \todo Make this a regular knot, this will allow to set statusbar tips.
struct SPDrawAnchor {
- Inkscape::UI::Tools::SPDrawContext *dc;
+ Inkscape::UI::Tools::FreehandBase *dc;
SPCurve *curve;
guint start : 1;
guint active : 1;
@@ -33,7 +33,7 @@ struct SPDrawAnchor {
};
-SPDrawAnchor *sp_draw_anchor_new(Inkscape::UI::Tools::SPDrawContext *dc, SPCurve *curve, gboolean start,
+SPDrawAnchor *sp_draw_anchor_new(Inkscape::UI::Tools::FreehandBase *dc, SPCurve *curve, gboolean start,
Geom::Point delta);
SPDrawAnchor *sp_draw_anchor_destroy(SPDrawAnchor *anchor);
SPDrawAnchor *sp_draw_anchor_test(SPDrawAnchor *anchor, Geom::Point w, gboolean activate);
diff --git a/src/file.cpp b/src/file.cpp
index f978ec66e..cec634c9b 100644
--- a/src/file.cpp
+++ b/src/file.cpp
@@ -36,7 +36,7 @@
#include "dir-util.h"
#include "document-private.h"
#include "document-undo.h"
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include "extension/db.h"
#include "extension/input.h"
#include "extension/output.h"
diff --git a/src/gradient-chemistry.cpp b/src/gradient-chemistry.cpp
index a12db7b59..89b7968fc 100644
--- a/src/gradient-chemistry.cpp
+++ b/src/gradient-chemistry.cpp
@@ -32,7 +32,7 @@
#include "desktop.h"
#include "desktop-style.h"
#include "desktop-handles.h"
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include "selection.h"
#include "verbs.h"
#include <glibmm/i18n.h>
diff --git a/src/helper/window.cpp b/src/helper/window.cpp
index 17501c260..98fbef170 100644
--- a/src/helper/window.cpp
+++ b/src/helper/window.cpp
@@ -22,7 +22,7 @@
#include "inkscape.h"
#include "shortcuts.h"
#include "desktop.h"
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include "window.h"
#include <gtk/gtk.h>
diff --git a/src/inkscape.cpp b/src/inkscape.cpp
index 8973c7b25..8c4ba5695 100644
--- a/src/inkscape.cpp
+++ b/src/inkscape.cpp
@@ -51,7 +51,7 @@
#include "desktop-handles.h"
#include "device-manager.h"
#include "document.h"
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include "extension/db.h"
#include "extension/init.h"
#include "extension/output.h"
diff --git a/src/interface.cpp b/src/interface.cpp
index f411989ce..5d4022e7b 100644
--- a/src/interface.cpp
+++ b/src/interface.cpp
@@ -67,7 +67,7 @@
#include "svg/svg-color.h"
#include "desktop-style.h"
#include "style.h"
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include "gradient-drag.h"
#include "widgets/ege-paint-def.h"
#include "document-undo.h"
@@ -1300,7 +1300,7 @@ sp_ui_drag_data_received(GtkWidget *widget,
}
}
-#include "gradient-context.h"
+#include "ui/tools/gradient-tool.h"
void sp_ui_drag_motion( GtkWidget */*widget*/,
GdkDragContext */*drag_context*/,
diff --git a/src/knot.cpp b/src/knot.cpp
index 0fb0600c4..2179bc3d5 100644
--- a/src/knot.cpp
+++ b/src/knot.cpp
@@ -27,7 +27,7 @@
#include "preferences.h"
#include "message-stack.h"
#include "message-context.h"
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
using Inkscape::DocumentUndo;
diff --git a/src/knotholder.cpp b/src/knotholder.cpp
index 7129348c2..71bccca16 100644
--- a/src/knotholder.cpp
+++ b/src/knotholder.cpp
@@ -20,13 +20,13 @@
#include "knot.h"
#include "knotholder.h"
#include "knot-holder-entity.h"
-#include "rect-context.h"
+#include "ui/tools/rect-tool.h"
#include "sp-rect.h"
-#include "arc-context.h"
+#include "ui/tools/arc-tool.h"
#include "sp-ellipse.h"
-#include "star-context.h"
+#include "ui/tools/tweak-tool.h"
#include "sp-star.h"
-#include "spiral-context.h"
+#include "ui/tools/spiral-tool.h"
#include "sp-spiral.h"
#include "sp-offset.h"
#include "box3d.h"
diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp
index e47b4c3e9..3289c239e 100644
--- a/src/live_effects/effect.cpp
+++ b/src/live_effects/effect.cpp
@@ -61,7 +61,7 @@
#include "document-private.h"
#include "xml/document.h"
#include <glibmm/i18n.h>
-#include "pen-context.h"
+#include "ui/tools/pen-tool.h"
#include "tools-switch.h"
#include "message-stack.h"
#include "desktop.h"
diff --git a/src/live_effects/lpe-line_segment.cpp b/src/live_effects/lpe-line_segment.cpp
index 793b00bcc..78d286143 100644
--- a/src/live_effects/lpe-line_segment.cpp
+++ b/src/live_effects/lpe-line_segment.cpp
@@ -12,7 +12,7 @@
*/
#include "live_effects/lpe-line_segment.h"
-#include "lpe-tool-context.h"
+#include "ui/tools/lpe-tool.h"
#include <2geom/pathvector.h>
#include <2geom/geom.h>
diff --git a/src/live_effects/parameter/path.cpp b/src/live_effects/parameter/path.cpp
index 6e951f6ea..77f7eabcc 100644
--- a/src/live_effects/parameter/path.cpp
+++ b/src/live_effects/parameter/path.cpp
@@ -40,7 +40,7 @@
#include "sp-text.h"
#include "display/curve.h"
-#include "ui/tool/node-tool.h"
+#include "ui/tools/node-tool.h"
#include "ui/tool/multi-path-manipulator.h"
#include "ui/tool/shape-record.h"
diff --git a/src/persp3d.cpp b/src/persp3d.cpp
index a737c0634..b10e5f23b 100644
--- a/src/persp3d.cpp
+++ b/src/persp3d.cpp
@@ -17,7 +17,7 @@
#include "document-private.h"
#include "document-undo.h"
#include "vanishing-point.h"
-#include "box3d-context.h"
+#include "ui/tools/box3d-tool.h"
#include "box3d.h"
#include "xml/document.h"
#include "xml/node-event-vector.h"
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp
index ae85df295..26e575439 100644
--- a/src/selection-chemistry.cpp
+++ b/src/selection-chemistry.cpp
@@ -56,11 +56,11 @@ SPCycleType SP_CYCLING = SP_CYCLE_FOCUS;
#include "sp-polyline.h"
#include "sp-line.h"
#include "text-editing.h"
-#include "text-context.h"
-#include "connector-context.h"
+#include "ui/tools/text-tool.h"
+#include "ui/tools/connector-tool.h"
#include "sp-path.h"
#include "sp-conn-end.h"
-#include "dropper-context.h"
+#include "ui/tools/dropper-tool.h"
#include <glibmm/i18n.h>
#include <2geom/transforms.h>
#include "xml/repr.h"
@@ -74,7 +74,7 @@ SPCycleType SP_CYCLING = SP_CYCLE_FOCUS;
#include "sp-pattern.h"
#include "sp-symbol.h"
#include "sp-radial-gradient.h"
-#include "gradient-context.h"
+#include "ui/tools/gradient-tool.h"
#include "sp-namedview.h"
#include "preferences.h"
#include "sp-offset.h"
@@ -111,7 +111,7 @@ SPCycleType SP_CYCLING = SP_CYCLE_FOCUS;
// For clippath editing
#include "tools-switch.h"
-#include "ui/tool/node-tool.h"
+#include "ui/tools/node-tool.h"
#include "ui/clipboard.h"
#include "verbs.h"
diff --git a/src/seltrans.cpp b/src/seltrans.cpp
index 568ad6a09..f961e309d 100644
--- a/src/seltrans.cpp
+++ b/src/seltrans.cpp
@@ -31,7 +31,7 @@
#include "knot.h"
#include "snap.h"
#include "selection.h"
-#include "select-context.h"
+#include "ui/tools/select-tool.h"
#include "sp-item.h"
#include "sp-item-transform.h"
#include "seltrans-handles.h"
diff --git a/src/shortcuts.cpp b/src/shortcuts.cpp
index ab8e5f761..1e43c98c6 100644
--- a/src/shortcuts.cpp
+++ b/src/shortcuts.cpp
@@ -43,7 +43,7 @@
#include "xml/repr.h"
#include "document.h"
#include "preferences.h"
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include "inkscape.h"
#include "desktop.h"
#include "path-prefix.h"
diff --git a/src/snap.cpp b/src/snap.cpp
index 15f24ef53..ecf799cdc 100644
--- a/src/snap.cpp
+++ b/src/snap.cpp
@@ -32,7 +32,7 @@
#include "selection.h"
#include "sp-guide.h"
#include "preferences.h"
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include "util/mathfns.h"
using std::vector;
using Inkscape::Util::round_to_upper_multiple_plus;
diff --git a/src/sp-path.cpp b/src/sp-path.cpp
index 563c5b326..cbb61b0f6 100644
--- a/src/sp-path.cpp
+++ b/src/sp-path.cpp
@@ -43,7 +43,7 @@
#include "desktop.h"
#include "desktop-handles.h"
#include "desktop-style.h"
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include "inkscape.h"
#include "style.h"
#include "message-stack.h"
diff --git a/src/tools-switch.cpp b/src/tools-switch.cpp
index beff0e5f3..fe9d32f43 100644
--- a/src/tools-switch.cpp
+++ b/src/tools-switch.cpp
@@ -25,36 +25,36 @@
#include <xml/repr.h>
-#include "select-context.h"
-#include "ui/tool/node-tool.h"
-#include "tweak-context.h"
-#include "spray-context.h"
+#include "ui/tools/select-tool.h"
+#include "ui/tools/node-tool.h"
+#include "ui/tools/tweak-tool.h"
+#include "ui/tools/spray-tool.h"
#include "sp-path.h"
-#include "rect-context.h"
+#include "ui/tools/rect-tool.h"
#include "sp-rect.h"
-#include "box3d-context.h"
+#include "ui/tools/box3d-tool.h"
#include "box3d.h"
-#include "arc-context.h"
+#include "ui/tools/arc-tool.h"
#include "sp-ellipse.h"
-#include "star-context.h"
+#include "ui/tools/tweak-tool.h"
#include "sp-star.h"
-#include "spiral-context.h"
+#include "ui/tools/spiral-tool.h"
#include "sp-spiral.h"
-#include "dyna-draw-context.h"
-#include "eraser-context.h"
-#include "pen-context.h"
-#include "pencil-context.h"
-#include "lpe-tool-context.h"
-#include "text-context.h"
+#include "ui/tools/calligraphic-tool.h"
+#include "ui/tools/eraser-tool.h"
+#include "ui/tools/pen-tool.h"
+#include "ui/tools/pencil-tool.h"
+#include "ui/tools/lpe-tool.h"
+#include "ui/tools/text-tool.h"
#include "sp-text.h"
#include "sp-flowtext.h"
-#include "gradient-context.h"
-#include "mesh-context.h"
-#include "zoom-context.h"
-#include "measure-context.h"
-#include "dropper-context.h"
-#include "connector-context.h"
-#include "flood-context.h"
+#include "ui/tools/gradient-tool.h"
+#include "ui/tools/mesh-tool.h"
+#include "ui/tools/zoom-tool.h"
+#include "ui/tools/measure-tool.h"
+#include "ui/tools/dropper-tool.h"
+#include "ui/tools/connector-tool.h"
+#include "ui/tools/flood-tool.h"
#include "sp-offset.h"
#include "message-context.h"
diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt
index 24324c874..c3e406e3f 100644
--- a/src/ui/CMakeLists.txt
+++ b/src/ui/CMakeLists.txt
@@ -14,13 +14,38 @@ set(ui_SRC
tool/manipulator.cpp
tool/modifier-tracker.cpp
tool/multi-path-manipulator.cpp
- tool/node-tool.cpp
tool/node.cpp
tool/path-manipulator.cpp
tool/selectable-control-point.cpp
tool/selector.cpp
tool/transform-handle-set.cpp
+ tools/arc-tool.cpp
+ tools/box3d-tool.cpp
+ tools/calligraphic-tool.cpp
+ tools/connector-tool.cpp
+ tools/dropper-tool.cpp
+ tools/dynamic-base.cpp
+ tools/eraser-tool.cpp
+ tools/flood-tool.cpp
+ tools/freehand-base.cpp
+ tools/gradient-tool.cpp
+ tools/lpe-tool.cpp
+ tools/measure-tool.cpp
+ tools/mesh-tool.cpp
+ tools/node-tool.cpp
+ tools/pencil-tool.cpp
+ tools/pen-tool.cpp
+ tools/rect-tool.cpp
+ tools/select-tool.cpp
+ tools/spiral-tool.cpp
+ tools/spray-tool.cpp
+ tools/star-tool.cpp
+ tools/text-tool.cpp
+ tools/tool-base.cpp
+ tools/tweak-tool.cpp
+ tools/zoom-tool.cpp
+
dialog/aboutbox.cpp
dialog/align-and-distribute.cpp
dialog/calligraphic-profile-rename.cpp
@@ -200,7 +225,6 @@ set(ui_SRC
tool/manipulator.h
tool/modifier-tracker.h
tool/multi-path-manipulator.h
- tool/node-tool.h
tool/node-types.h
tool/node.h
tool/path-manipulator.h
@@ -209,6 +233,32 @@ set(ui_SRC
tool/shape-record.h
tool/transform-handle-set.h
+ tools/arc-tool.h
+ tools/box3d-tool.h
+ tools/calligraphic-tool.h
+ tools/connector-tool.h
+ tools/dropper-tool.h
+ tools/dynamic-base.h
+ tools/eraser-tool.h
+ tools/flood-tool.h
+ tools/freehand-base.h
+ tools/gradient-tool.h
+ tools/lpe-tool.h
+ tools/measure-tool.h
+ tools/mesh-tool.h
+ tools/node-tool.h
+ tools/pencil-tool.h
+ tools/pen-tool.h
+ tools/rect-tool.h
+ tools/select-tool.h
+ tools/spiral-tool.h
+ tools/spray-tool.h
+ tools/star-tool.h
+ tools/text-tool.h
+ tools/tool-base.h
+ tools/tweak-tool.h
+ tools/zoom-tool.h
+
widget/attr-widget.h
widget/button.h
widget/color-picker.h
diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp
index ffb2bdf8c..8e2502545 100644
--- a/src/ui/clipboard.cpp
+++ b/src/ui/clipboard.cpp
@@ -44,7 +44,7 @@
#include "selection.h"
#include "message-stack.h"
#include "context-fns.h"
-#include "dropper-context.h" // used in copy()
+#include "ui/tools/dropper-tool.h" // used in copy()
#include "style.h"
#include "extension/db.h" // extension database
#include "extension/input.h"
@@ -74,7 +74,7 @@
#include "live_effects/parameter/path.h"
#include "svg/svg.h" // for sp_svg_transform_write, used in _copySelection
#include "svg/css-ostringstream.h" // used in copy
-#include "text-context.h"
+#include "ui/tools/text-tool.h"
#include "text-editing.h"
#include "tools-switch.h"
#include "path-chemistry.h"
diff --git a/src/ui/dialog/align-and-distribute.cpp b/src/ui/dialog/align-and-distribute.cpp
index 4a3852d5d..6b4aeebb9 100644
--- a/src/ui/dialog/align-and-distribute.cpp
+++ b/src/ui/dialog/align-and-distribute.cpp
@@ -40,7 +40,7 @@
#include "text-editing.h"
#include "tools-switch.h"
#include "ui/icon-names.h"
-#include "ui/tool/node-tool.h"
+#include "ui/tools/node-tool.h"
#include "ui/tool/multi-path-manipulator.h"
#include "util/glib-list-iterators.h"
#include "verbs.h"
diff --git a/src/ui/dialog/dialog.cpp b/src/ui/dialog/dialog.cpp
index 7fc9c3889..3cc3f3d88 100644
--- a/src/ui/dialog/dialog.cpp
+++ b/src/ui/dialog/dialog.cpp
@@ -23,7 +23,7 @@
#include <gdk/gdkkeysyms.h>
#include "inkscape.h"
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include "desktop.h"
#include "desktop-handles.h"
#include "modifier-fns.h"
diff --git a/src/ui/dialog/guides.cpp b/src/ui/dialog/guides.cpp
index 5dfafa78d..e84f25733 100644
--- a/src/ui/dialog/guides.cpp
+++ b/src/ui/dialog/guides.cpp
@@ -25,7 +25,7 @@
#include "sp-guide.h"
#include "sp-namedview.h"
#include "desktop-handles.h"
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include "widgets/desktop-widget.h"
#include <glibmm/i18n.h>
#include "dialogs/dialog-events.h"
diff --git a/src/ui/dialog/layer-properties.cpp b/src/ui/dialog/layer-properties.cpp
index c726f93af..f19828b1f 100644
--- a/src/ui/dialog/layer-properties.cpp
+++ b/src/ui/dialog/layer-properties.cpp
@@ -31,7 +31,7 @@
#include "selection-chemistry.h"
#include "ui/icon-names.h"
#include "ui/widget/imagetoggler.h"
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
namespace Inkscape {
namespace UI {
diff --git a/src/ui/dialog/layers.cpp b/src/ui/dialog/layers.cpp
index ff9265c8d..12fdf6b7d 100644
--- a/src/ui/dialog/layers.cpp
+++ b/src/ui/dialog/layers.cpp
@@ -41,7 +41,7 @@
#include "widgets/icon.h"
#include "xml/repr.h"
#include "sp-root.h"
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include "selection-chemistry.h"
//#define DUMP_LAYERS 1
diff --git a/src/ui/dialog/spellcheck.cpp b/src/ui/dialog/spellcheck.cpp
index 45106755c..00bd445bf 100644
--- a/src/ui/dialog/spellcheck.cpp
+++ b/src/ui/dialog/spellcheck.cpp
@@ -24,7 +24,7 @@
#include "desktop.h"
#include "desktop-handles.h"
#include "tools-switch.h"
-#include "text-context.h"
+#include "ui/tools/text-tool.h"
#include "interface.h"
#include "preferences.h"
#include "sp-text.h"
diff --git a/src/ui/dialog/xml-tree.cpp b/src/ui/dialog/xml-tree.cpp
index dfddfb1d3..0e1e9f7a6 100644
--- a/src/ui/dialog/xml-tree.cpp
+++ b/src/ui/dialog/xml-tree.cpp
@@ -27,7 +27,7 @@
#include "dialogs/dialog-events.h"
#include "document.h"
#include "document-undo.h"
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include "helper/window.h"
#include "inkscape.h"
#include "interface.h"
diff --git a/src/ui/tool/Makefile_insert b/src/ui/tool/Makefile_insert
index 2a72dd645..f46f48b72 100644
--- a/src/ui/tool/Makefile_insert
+++ b/src/ui/tool/Makefile_insert
@@ -19,8 +19,6 @@ ink_common_sources += \
ui/tool/node.cpp \
ui/tool/node.h \
ui/tool/node-types.h \
- ui/tool/node-tool.cpp \
- ui/tool/node-tool.h \
ui/tool/path-manipulator.cpp \
ui/tool/path-manipulator.h \
ui/tool/selectable-control-point.cpp \
diff --git a/src/ui/tool/control-point.cpp b/src/ui/tool/control-point.cpp
index 3f1587492..e98c7b2a2 100644
--- a/src/ui/tool/control-point.cpp
+++ b/src/ui/tool/control-point.cpp
@@ -14,7 +14,7 @@
#include "desktop-handles.h"
#include "display/sp-canvas.h"
#include "display/snap-indicator.h"
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include "message-context.h"
#include "preferences.h"
#include "snap-preferences.h"
diff --git a/src/ui/tool/manipulator.h b/src/ui/tool/manipulator.h
index 2e6d80517..07e01a656 100644
--- a/src/ui/tool/manipulator.h
+++ b/src/ui/tool/manipulator.h
@@ -18,7 +18,7 @@
#include <glib.h>
#include <gdk/gdk.h>
#include <boost/shared_ptr.hpp>
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
class SPDesktop;
namespace Inkscape {
diff --git a/src/ui/tool/selector.cpp b/src/ui/tool/selector.cpp
index d46a160bc..bdeacadc9 100644
--- a/src/ui/tool/selector.cpp
+++ b/src/ui/tool/selector.cpp
@@ -13,7 +13,7 @@
#include "desktop.h"
#include "desktop-handles.h"
#include "display/sodipodi-ctrlrect.h"
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include "preferences.h"
#include "ui/tool/event-utils.h"
#include "ui/tool/selector.h"
diff --git a/src/ui/tool/transform-handle-set.cpp b/src/ui/tool/transform-handle-set.cpp
index 535a138ed..f21e1661a 100644
--- a/src/ui/tool/transform-handle-set.cpp
+++ b/src/ui/tool/transform-handle-set.cpp
@@ -26,7 +26,7 @@
#include "ui/tool/selectable-control-point.h"
#include "ui/tool/event-utils.h"
#include "ui/tool/transform-handle-set.h"
-#include "ui/tool/node-tool.h"
+#include "ui/tools/node-tool.h"
#include "ui/tool/node.h"
#include "seltrans.h"
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)
diff --git a/src/ui/widget/rotateable.cpp b/src/ui/widget/rotateable.cpp
index 24a21e075..72ec69362 100644
--- a/src/ui/widget/rotateable.cpp
+++ b/src/ui/widget/rotateable.cpp
@@ -19,7 +19,7 @@
#include <gtkmm/eventbox.h>
#include <glibmm/i18n.h>
#include <2geom/point.h>
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include "rotateable.h"
namespace Inkscape {
diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp
index 000fdee4b..aa617353c 100644
--- a/src/ui/widget/selected-style.cpp
+++ b/src/ui/widget/selected-style.cpp
@@ -39,7 +39,7 @@
#include "sp-gradient.h"
#include "svg/svg-color.h"
#include "svg/css-ostringstream.h"
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include "message-context.h"
#include "verbs.h"
#include "color.h"
diff --git a/src/ui/widget/spinbutton.cpp b/src/ui/widget/spinbutton.cpp
index aa8f68ce8..7709a837b 100644
--- a/src/ui/widget/spinbutton.cpp
+++ b/src/ui/widget/spinbutton.cpp
@@ -16,7 +16,7 @@
#include "unit-menu.h"
#include "unit-tracker.h"
#include "util/expression-evaluator.h"
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
namespace Inkscape {
namespace UI {
diff --git a/src/vanishing-point.cpp b/src/vanishing-point.cpp
index edc3dd15b..361a7a0de 100644
--- a/src/vanishing-point.cpp
+++ b/src/vanishing-point.cpp
@@ -19,7 +19,7 @@
#include "desktop.h"
#include "display/sp-canvas-item.h"
#include "display/sp-ctrlline.h"
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include "xml/repr.h"
#include "perspective-line.h"
#include "shape-editor.h"
diff --git a/src/verbs.cpp b/src/verbs.cpp
index 4bcfd39fe..329e63115 100644
--- a/src/verbs.cpp
+++ b/src/verbs.cpp
@@ -44,9 +44,9 @@
#include "desktop-handles.h"
#include "display/curve.h"
#include "document.h"
-#include "draw-context.h"
+#include "ui/tools/freehand-base.h"
#include "extension/effect.h"
-#include "event-context.h"
+#include "ui/tools/tool-base.h"
#include "file.h"
#include "gradient-drag.h"
#include "helper/action.h"
@@ -59,7 +59,7 @@
#include "message-stack.h"
#include "path-chemistry.h"
#include "preferences.h"
-#include "select-context.h"
+#include "ui/tools/select-tool.h"
#include "selection-chemistry.h"
#include "seltrans.h"
#include "shape-editor.h"
@@ -86,7 +86,7 @@
#include "ui/dialog/symbols.h"
#include "ui/dialog/spellcheck.h"
#include "ui/icon-names.h"
-#include "ui/tool/node-tool.h"
+#include "ui/tools/node-tool.h"
#include "selection.h"
#include <gtk/gtk.h>
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 32a6e8fb9..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"
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/gradient-toolbar.cpp b/src/widgets/gradient-toolbar.cpp
index a9122e54b..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,7 +54,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 "gradient-toolbar.h"
#include "toolbox.h"
diff --git a/src/widgets/lpe-toolbar.cpp b/src/widgets/lpe-toolbar.cpp
index 9fdb7b036..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;
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 926a42f90..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"
diff --git a/src/widgets/node-toolbar.cpp b/src/widgets/node-toolbar.cpp
index 8d24fdf82..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;
diff --git a/src/widgets/paintbucket-toolbar.cpp b/src/widgets/paintbucket-toolbar.cpp
index e0d406c04..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>
diff --git a/src/widgets/pencil-toolbar.cpp b/src/widgets/pencil-toolbar.cpp
index a70cb0d28..d9d53117c 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"
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 8b42f4ae1..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;
diff --git a/src/widgets/spinbutton-events.cpp b/src/widgets/spinbutton-events.cpp
index ac5f0040d..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"
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 a9d29ae98..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"
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp
index 528451304..9f64f6336 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
diff --git a/src/widgets/tweak-toolbar.cpp b/src/widgets/tweak-toolbar.cpp
index c828373d7..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;
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;