diff --git a/po/POTFILES.src.in b/po/POTFILES.src.in
index 9af8d8553f3fd1c8fb1f6fef0b56361ae434d5b3..57a46162618fa83e37fea5adbf19d8716662ca4f 100644
--- a/po/POTFILES.src.in
+++ b/po/POTFILES.src.in
@@ -8,11 +8,19 @@
../src/actions/actions-canvas-snapping.cpp
../src/actions/actions-canvas-transform.cpp
../src/actions/actions-dialogs.cpp
+../src/actions/actions-doc-file.cpp
+../src/actions/actions-edit.cpp
../src/actions/actions-extra-data.cpp
../src/actions/actions-file.cpp
+../src/actions/actions-fit-canvas.cpp
+../src/actions/actions-hide-lock.cpp
+../src/actions/actions-hint-data.cpp
+../src/actions/actions-node.cpp
../src/actions/actions-object-align.cpp
../src/actions/actions-object.cpp
../src/actions/actions-output.cpp
+../src/actions/actions-selection-desktop.cpp
+../src/actions/actions-selection-object.cpp
../src/actions/actions-selection.cpp
../src/actions/actions-tools.cpp
../src/actions/actions-transform.cpp
@@ -308,6 +316,7 @@
../src/ui/tool/transform-handle-set.cpp
../src/ui/toolbar/arc-toolbar.cpp
../src/ui/toolbar/box3d-toolbar.cpp
+../src/ui/toolbar/builder-toolbar.cpp
../src/ui/toolbar/calligraphy-toolbar.cpp
../src/ui/toolbar/connector-toolbar.cpp
../src/ui/toolbar/dropper-toolbar.cpp
@@ -328,6 +337,7 @@
../src/ui/toolbar/tweak-toolbar.cpp
../src/ui/tools/arc-tool.cpp
../src/ui/tools/box3d-tool.cpp
+../src/ui/tools/builder-tool.cpp
../src/ui/tools/calligraphic-tool.cpp
../src/ui/tools/connector-tool.cpp
../src/ui/tools/dropper-tool.cpp
diff --git a/po/POTFILES.ui.in b/po/POTFILES.ui.in
index 17f6b019a8d961279d30b21113d7e878db293b2e..d24911bfc894458e4f1f41c6a7da06cab7aa51a6 100644
--- a/po/POTFILES.ui.in
+++ b/po/POTFILES.ui.in
@@ -9,7 +9,12 @@
../share/ui/gradient-edit.glade
../share/ui/inkscape-about.glade
../share/ui/inkscape-start.glade
+../share/ui/menu-edit.ui
+../share/ui/menu-object.ui
+../share/ui/menu-path.ui
../share/ui/menu-view.ui
+../share/ui/toolbar-node.ui
+../share/ui/toolbar-select.ui
../share/ui/toolbar-snap.ui
../share/ui/toolbar-tool.ui
../share/ui/toolbar-zoom.ui
diff --git a/share/icons/Tango/scalable/actions/interactive-builder.svg b/share/icons/Tango/scalable/actions/interactive-builder.svg
new file mode 100644
index 0000000000000000000000000000000000000000..9ff82591478bcb66be5857627e1720201b973ea5
--- /dev/null
+++ b/share/icons/Tango/scalable/actions/interactive-builder.svg
@@ -0,0 +1,132 @@
+
+
diff --git a/share/icons/Tango/scalable/actions/interactive-mode-apply.svg b/share/icons/Tango/scalable/actions/interactive-mode-apply.svg
new file mode 100644
index 0000000000000000000000000000000000000000..f6896f8c8d424dda78777e4194e9e52b661be57e
--- /dev/null
+++ b/share/icons/Tango/scalable/actions/interactive-mode-apply.svg
@@ -0,0 +1,43 @@
+
+
+
diff --git a/share/icons/Tango/scalable/actions/interactive-mode-discard.svg b/share/icons/Tango/scalable/actions/interactive-mode-discard.svg
new file mode 100644
index 0000000000000000000000000000000000000000..df2c414b2279f1a8ad818f981e7f51f0e77b8eb0
--- /dev/null
+++ b/share/icons/Tango/scalable/actions/interactive-mode-discard.svg
@@ -0,0 +1,46 @@
+
+
+
diff --git a/share/icons/Tango/scalable/actions/interactive-mode-reset.svg b/share/icons/Tango/scalable/actions/interactive-mode-reset.svg
new file mode 100644
index 0000000000000000000000000000000000000000..5f3b27f41736fa5c6d2f5e731cea650b5cead52a
--- /dev/null
+++ b/share/icons/Tango/scalable/actions/interactive-mode-reset.svg
@@ -0,0 +1,66 @@
+
+
+
diff --git a/share/icons/Tango/scalable/actions/path-flatten.svg b/share/icons/Tango/scalable/actions/path-flatten.svg
new file mode 100644
index 0000000000000000000000000000000000000000..bbb2a098b46f150a19bd219530071f8e9157f108
--- /dev/null
+++ b/share/icons/Tango/scalable/actions/path-flatten.svg
@@ -0,0 +1,96 @@
+
+
diff --git a/share/icons/Tango/scalable/actions/path-fracture.svg b/share/icons/Tango/scalable/actions/path-fracture.svg
new file mode 100644
index 0000000000000000000000000000000000000000..a0476e22b4cfdf73717699fa67cb0eba443f1b9e
--- /dev/null
+++ b/share/icons/Tango/scalable/actions/path-fracture.svg
@@ -0,0 +1,87 @@
+
+
diff --git a/share/icons/Tango/scalable/actions/path-split-non-intersecting.svg b/share/icons/Tango/scalable/actions/path-split-non-intersecting.svg
new file mode 100644
index 0000000000000000000000000000000000000000..51de27569f0793b461a313b6c2724c64a6d9f972
--- /dev/null
+++ b/share/icons/Tango/scalable/actions/path-split-non-intersecting.svg
@@ -0,0 +1,135 @@
+
+
diff --git a/share/icons/Tango/scalable/actions/tool-builder.svg b/share/icons/Tango/scalable/actions/tool-builder.svg
new file mode 100644
index 0000000000000000000000000000000000000000..d2d7b45fb9e14a79e96a0cae9c1b47bde3f9818a
--- /dev/null
+++ b/share/icons/Tango/scalable/actions/tool-builder.svg
@@ -0,0 +1,82 @@
+
+
diff --git a/share/icons/hicolor/cursors/cursor-delete.svg b/share/icons/hicolor/cursors/cursor-delete.svg
new file mode 100644
index 0000000000000000000000000000000000000000..1562bb66bfcef698b38715115ee976aff25d296f
--- /dev/null
+++ b/share/icons/hicolor/cursors/cursor-delete.svg
@@ -0,0 +1,79 @@
+
+
diff --git a/share/icons/hicolor/cursors/cursor-intersect.svg b/share/icons/hicolor/cursors/cursor-intersect.svg
new file mode 100644
index 0000000000000000000000000000000000000000..5217579dfd38e31ce2a76a9b47f69be0e2472f40
--- /dev/null
+++ b/share/icons/hicolor/cursors/cursor-intersect.svg
@@ -0,0 +1,86 @@
+
+
diff --git a/share/icons/hicolor/cursors/cursor-union.svg b/share/icons/hicolor/cursors/cursor-union.svg
new file mode 100644
index 0000000000000000000000000000000000000000..8c657a2be541d70f31772b1a7762a8084c522d8a
--- /dev/null
+++ b/share/icons/hicolor/cursors/cursor-union.svg
@@ -0,0 +1,79 @@
+
+
diff --git a/share/icons/hicolor/scalable/actions/interactive-builder.svg b/share/icons/hicolor/scalable/actions/interactive-builder.svg
new file mode 100644
index 0000000000000000000000000000000000000000..01252829f6cda66f7c9b8b0333077aff0eb52557
--- /dev/null
+++ b/share/icons/hicolor/scalable/actions/interactive-builder.svg
@@ -0,0 +1,50 @@
+
+
diff --git a/share/icons/hicolor/scalable/actions/interactive-mode-apply.svg b/share/icons/hicolor/scalable/actions/interactive-mode-apply.svg
new file mode 100644
index 0000000000000000000000000000000000000000..f6896f8c8d424dda78777e4194e9e52b661be57e
--- /dev/null
+++ b/share/icons/hicolor/scalable/actions/interactive-mode-apply.svg
@@ -0,0 +1,43 @@
+
+
+
diff --git a/share/icons/hicolor/scalable/actions/interactive-mode-discard.svg b/share/icons/hicolor/scalable/actions/interactive-mode-discard.svg
new file mode 100644
index 0000000000000000000000000000000000000000..df2c414b2279f1a8ad818f981e7f51f0e77b8eb0
--- /dev/null
+++ b/share/icons/hicolor/scalable/actions/interactive-mode-discard.svg
@@ -0,0 +1,46 @@
+
+
+
diff --git a/share/icons/hicolor/scalable/actions/interactive-mode-reset.svg b/share/icons/hicolor/scalable/actions/interactive-mode-reset.svg
new file mode 100644
index 0000000000000000000000000000000000000000..5f3b27f41736fa5c6d2f5e731cea650b5cead52a
--- /dev/null
+++ b/share/icons/hicolor/scalable/actions/interactive-mode-reset.svg
@@ -0,0 +1,66 @@
+
+
+
diff --git a/share/icons/hicolor/scalable/actions/path-flatten.svg b/share/icons/hicolor/scalable/actions/path-flatten.svg
new file mode 100644
index 0000000000000000000000000000000000000000..bbb2a098b46f150a19bd219530071f8e9157f108
--- /dev/null
+++ b/share/icons/hicolor/scalable/actions/path-flatten.svg
@@ -0,0 +1,96 @@
+
+
diff --git a/share/icons/hicolor/scalable/actions/path-fracture.svg b/share/icons/hicolor/scalable/actions/path-fracture.svg
new file mode 100644
index 0000000000000000000000000000000000000000..a0476e22b4cfdf73717699fa67cb0eba443f1b9e
--- /dev/null
+++ b/share/icons/hicolor/scalable/actions/path-fracture.svg
@@ -0,0 +1,87 @@
+
+
diff --git a/share/icons/hicolor/scalable/actions/path-split-non-intersecting.svg b/share/icons/hicolor/scalable/actions/path-split-non-intersecting.svg
new file mode 100644
index 0000000000000000000000000000000000000000..51de27569f0793b461a313b6c2724c64a6d9f972
--- /dev/null
+++ b/share/icons/hicolor/scalable/actions/path-split-non-intersecting.svg
@@ -0,0 +1,135 @@
+
+
diff --git a/share/icons/hicolor/scalable/actions/tool-builder.svg b/share/icons/hicolor/scalable/actions/tool-builder.svg
new file mode 100644
index 0000000000000000000000000000000000000000..b7cec90686d2cdb675fb41edd2b7194d5d8617c4
--- /dev/null
+++ b/share/icons/hicolor/scalable/actions/tool-builder.svg
@@ -0,0 +1,30 @@
+
+
diff --git a/share/icons/hicolor/symbolic/actions/interactive-builder-symbolic.svg b/share/icons/hicolor/symbolic/actions/interactive-builder-symbolic.svg
new file mode 100644
index 0000000000000000000000000000000000000000..88c6401f2f8d26be87341a393ccb505cfd811fd1
--- /dev/null
+++ b/share/icons/hicolor/symbolic/actions/interactive-builder-symbolic.svg
@@ -0,0 +1,80 @@
+
+
diff --git a/share/icons/hicolor/symbolic/actions/interactive-mode-apply.svg b/share/icons/hicolor/symbolic/actions/interactive-mode-apply.svg
new file mode 100644
index 0000000000000000000000000000000000000000..f6896f8c8d424dda78777e4194e9e52b661be57e
--- /dev/null
+++ b/share/icons/hicolor/symbolic/actions/interactive-mode-apply.svg
@@ -0,0 +1,43 @@
+
+
+
diff --git a/share/icons/hicolor/symbolic/actions/interactive-mode-discard.svg b/share/icons/hicolor/symbolic/actions/interactive-mode-discard.svg
new file mode 100644
index 0000000000000000000000000000000000000000..df2c414b2279f1a8ad818f981e7f51f0e77b8eb0
--- /dev/null
+++ b/share/icons/hicolor/symbolic/actions/interactive-mode-discard.svg
@@ -0,0 +1,46 @@
+
+
+
diff --git a/share/icons/hicolor/symbolic/actions/interactive-mode-reset.svg b/share/icons/hicolor/symbolic/actions/interactive-mode-reset.svg
new file mode 100644
index 0000000000000000000000000000000000000000..5f3b27f41736fa5c6d2f5e731cea650b5cead52a
--- /dev/null
+++ b/share/icons/hicolor/symbolic/actions/interactive-mode-reset.svg
@@ -0,0 +1,66 @@
+
+
+
diff --git a/share/icons/hicolor/symbolic/actions/path-flatten-symbolic.svg b/share/icons/hicolor/symbolic/actions/path-flatten-symbolic.svg
new file mode 100644
index 0000000000000000000000000000000000000000..a4c184ba392344f912eba060e8eb20a20d106f82
--- /dev/null
+++ b/share/icons/hicolor/symbolic/actions/path-flatten-symbolic.svg
@@ -0,0 +1,94 @@
+
+
diff --git a/share/icons/hicolor/symbolic/actions/path-fracture-symbolic.svg b/share/icons/hicolor/symbolic/actions/path-fracture-symbolic.svg
new file mode 100644
index 0000000000000000000000000000000000000000..b3108eb60ec9251dd4a9724cc1856516a2840d19
--- /dev/null
+++ b/share/icons/hicolor/symbolic/actions/path-fracture-symbolic.svg
@@ -0,0 +1,87 @@
+
+
diff --git a/share/icons/hicolor/symbolic/actions/path-split-non-intersecting.svg b/share/icons/hicolor/symbolic/actions/path-split-non-intersecting.svg
new file mode 100644
index 0000000000000000000000000000000000000000..51de27569f0793b461a313b6c2724c64a6d9f972
--- /dev/null
+++ b/share/icons/hicolor/symbolic/actions/path-split-non-intersecting.svg
@@ -0,0 +1,135 @@
+
+
diff --git a/share/icons/hicolor/symbolic/actions/tool-builder-symbolic.svg b/share/icons/hicolor/symbolic/actions/tool-builder-symbolic.svg
new file mode 100644
index 0000000000000000000000000000000000000000..a0b6fd0a2425ab01b3b7c23b772ecfa8ea0c86f5
--- /dev/null
+++ b/share/icons/hicolor/symbolic/actions/tool-builder-symbolic.svg
@@ -0,0 +1,11 @@
+
+
+
diff --git a/share/icons/multicolor/symbolic/actions/interactive-builder-symbolic.svg b/share/icons/multicolor/symbolic/actions/interactive-builder-symbolic.svg
new file mode 100644
index 0000000000000000000000000000000000000000..69ebff2861ed737b74a4a288ee388da4c64a3507
--- /dev/null
+++ b/share/icons/multicolor/symbolic/actions/interactive-builder-symbolic.svg
@@ -0,0 +1,113 @@
+
+
diff --git a/share/icons/multicolor/symbolic/actions/interactive-mode-apply.svg b/share/icons/multicolor/symbolic/actions/interactive-mode-apply.svg
new file mode 100644
index 0000000000000000000000000000000000000000..f6896f8c8d424dda78777e4194e9e52b661be57e
--- /dev/null
+++ b/share/icons/multicolor/symbolic/actions/interactive-mode-apply.svg
@@ -0,0 +1,43 @@
+
+
+
diff --git a/share/icons/multicolor/symbolic/actions/interactive-mode-discard.svg b/share/icons/multicolor/symbolic/actions/interactive-mode-discard.svg
new file mode 100644
index 0000000000000000000000000000000000000000..df2c414b2279f1a8ad818f981e7f51f0e77b8eb0
--- /dev/null
+++ b/share/icons/multicolor/symbolic/actions/interactive-mode-discard.svg
@@ -0,0 +1,46 @@
+
+
+
diff --git a/share/icons/multicolor/symbolic/actions/interactive-mode-reset.svg b/share/icons/multicolor/symbolic/actions/interactive-mode-reset.svg
new file mode 100644
index 0000000000000000000000000000000000000000..5f3b27f41736fa5c6d2f5e731cea650b5cead52a
--- /dev/null
+++ b/share/icons/multicolor/symbolic/actions/interactive-mode-reset.svg
@@ -0,0 +1,66 @@
+
+
+
diff --git a/share/icons/multicolor/symbolic/actions/path-flatten-symbolic.svg b/share/icons/multicolor/symbolic/actions/path-flatten-symbolic.svg
new file mode 100644
index 0000000000000000000000000000000000000000..a4c184ba392344f912eba060e8eb20a20d106f82
--- /dev/null
+++ b/share/icons/multicolor/symbolic/actions/path-flatten-symbolic.svg
@@ -0,0 +1,94 @@
+
+
diff --git a/share/icons/multicolor/symbolic/actions/path-fracture-symbolic.svg b/share/icons/multicolor/symbolic/actions/path-fracture-symbolic.svg
new file mode 100644
index 0000000000000000000000000000000000000000..b3108eb60ec9251dd4a9724cc1856516a2840d19
--- /dev/null
+++ b/share/icons/multicolor/symbolic/actions/path-fracture-symbolic.svg
@@ -0,0 +1,87 @@
+
+
diff --git a/share/icons/multicolor/symbolic/actions/path-split-non-intersecting.svg b/share/icons/multicolor/symbolic/actions/path-split-non-intersecting.svg
new file mode 100644
index 0000000000000000000000000000000000000000..51de27569f0793b461a313b6c2724c64a6d9f972
--- /dev/null
+++ b/share/icons/multicolor/symbolic/actions/path-split-non-intersecting.svg
@@ -0,0 +1,135 @@
+
+
diff --git a/share/icons/multicolor/symbolic/actions/tool-builder-symbolic.svg b/share/icons/multicolor/symbolic/actions/tool-builder-symbolic.svg
new file mode 100644
index 0000000000000000000000000000000000000000..3c4525c3d0d11690fb3bd40b6239580927824c52
--- /dev/null
+++ b/share/icons/multicolor/symbolic/actions/tool-builder-symbolic.svg
@@ -0,0 +1,76 @@
+
+
diff --git a/share/ui/menu-edit.ui b/share/ui/menu-edit.ui
new file mode 100644
index 0000000000000000000000000000000000000000..51dcaf38109a0bebe2d245bbf24826e23955e0da
--- /dev/null
+++ b/share/ui/menu-edit.ui
@@ -0,0 +1,267 @@
+
+
+
+
+
diff --git a/share/ui/menu-object.ui b/share/ui/menu-object.ui
new file mode 100644
index 0000000000000000000000000000000000000000..253a14e78ac2d0c4b8c47968ba72d2ebe706ab65
--- /dev/null
+++ b/share/ui/menu-object.ui
@@ -0,0 +1,193 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/share/ui/menu-path.ui b/share/ui/menu-path.ui
new file mode 100644
index 0000000000000000000000000000000000000000..96bb52942398ba1a472bcd20abdaaa7db0316a11
--- /dev/null
+++ b/share/ui/menu-path.ui
@@ -0,0 +1,147 @@
+
+
+
+
+
diff --git a/share/ui/menu-view.ui b/share/ui/menu-view.ui
index ebbe4e5416953e6219d638119cecaefa6368f410..39f328ae97a64bd8c54140f1d2c8f41f23dd6517 100644
--- a/share/ui/menu-view.ui
+++ b/share/ui/menu-view.ui
@@ -191,6 +191,133 @@
Color Management
win.canvas-color-manage
+ -
+ Page _Grid
+ win.canvas-show-grid
+
+ -
+ G_uides
+ win.canvas-show-guides
+
+
+
+ Sh_ow/Hide
+
+
+ -
+ _Commands Bar
+ win.canvas-commands-bar
+
+ -
+ Sn_ap Controls Bar
+ win.canvas-snap-controls-bar
+
+ -
+ T_ool Controls Bar
+ win.canvas-tool-control-bar
+
+ -
+ _Toolbox
+ win.canvas-toolbox
+
+ -
+ _Rulers
+ win.canvas-rulers
+
+ -
+ Scroll_bars
+ win.canvas-scroll-bars
+
+ -
+ _Palette
+ win.canvas-palette
+
+ -
+ _Statusbar
+ win.canvas-statusbar
+
+
+
+
+
+ -
+ Show/Hide D_ialogs
+ win.dialog-toggle
+ show-dialogs
+
+ -
+ _Command Palette
+ win.canvas-command-palette
+
+
+
+
+ -
+ S_watches...
+ win.dialog-open
+ Swatches
+ swatches
+
+ -
+ _Messages...
+ win.dialog-open
+ Messages
+ dialog-messages
+
+
+
+
+ -
+ P_revious Window
+ doc.window-previous
+ window-previous
+
+ -
+ N_ext Window
+ doc.window-next
+ window-next
+
+
+
+
+ -
+ Icon Preview
+ win.dialog-open
+ IconPreview
+ dialog-icon-preview
+
+ -
+ Duplic_ate Window
+ win.window-new
+ window-new
+
+
+
+
+ -
+ _Fullscreen
+ win.view-fullscreen
+ view-fullscreen
+
+
+
+
+ -
+ Default
+ win.canvas-interface-mode
+ 0
+
+ -
+ Custom
+ win.canvas-interface-mode
+ 1
+
+ -
+ Wide
+ win.canvas-interface-mode
+ 2
+
+
diff --git a/share/ui/toolbar-node.ui b/share/ui/toolbar-node.ui
new file mode 100644
index 0000000000000000000000000000000000000000..8c4e4c515d83a38213d5a0f4fa6049bac4ccb850
--- /dev/null
+++ b/share/ui/toolbar-node.ui
@@ -0,0 +1,224 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/share/ui/toolbar-select.ui b/share/ui/toolbar-select.ui
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..313a76963c49704b0d2a3e744dbe4d25726cb284 100644
--- a/share/ui/toolbar-select.ui
+++ b/share/ui/toolbar-select.ui
@@ -0,0 +1,162 @@
+
+
+
+
+
+
+
+
+ True
+
+
+
+ True
+
+
+
+
+
+ True
+ app.object-rotate-90-cw
+ edit-select-all
+ Rotate 90° CW
+
+
+
+
+ True
+ app.object-rotate-90-ccw
+ edit-select-all-layers
+ Rotate 90° CCW
+
+
+
+
+ True
+ app.object-rotate-90-cw
+ edit-select-none
+ Rotate 90° CW
+
+
+
+
+ True
+ app.object-rotate-90-ccwdfsdf
+ selection-touch
+ Rotate 90° CCWsdf
+
+
+
+
+
+ True
+
+
+
+
+
+ True
+ app.object-rotate-90-ccw
+ object-rotate-left
+ Rotate 90° CCW
+
+
+
+
+ True
+ app.object-rotate-90-cw
+ object-rotate-right
+ Rotate 90° CW
+
+
+
+
+
+ True
+
+
+
+
+
+ True
+ app.object-flip-horizontal
+ object-flip-horizontal
+ Flip _Horizontal
+
+
+
+
+ True
+ app.object-flip-vertical
+ object-flip-vertical
+ Flip _Vertical
+
+
+
+
+
+ True
+
+
+
+
+
+ True
+ app.selection-top
+ selection-top
+ Raise to _Top
+
+
+
+
+ True
+ app.selection-raise
+ selection-raise
+ _Raise
+
+
+
+
+ True
+ app.selection-lower
+ selection-lower
+ _Lower
+
+
+
+
+ True
+ app.selection-bottom
+ selection-bottom
+ Lower to _Bottom
+
+
+
+
+
+ True
+
+
+
+
+
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+
+
+
+
+
+
+
+
diff --git a/share/ui/toolbar-tool.ui b/share/ui/toolbar-tool.ui
index 2b3825689e53b3e5de068c69ef4b82ceac896474..f83b0db84efc480dfd05442da36697f60f480777 100644
--- a/share/ui/toolbar-tool.ui
+++ b/share/ui/toolbar-tool.ui
@@ -17,6 +17,16 @@
Select
+
+
+ True
+ win.tool-switch
+ 'Builder'
+ tool-builder
+ Builder
+ ToolGroup
+
+
True
diff --git a/src/3rdparty/2geom b/src/3rdparty/2geom
index 651c48a76e2c0f361feba8a66d4d693a2a0605a9..9d38946b7d7a0486a4a75669008112d306309d9e 160000
--- a/src/3rdparty/2geom
+++ b/src/3rdparty/2geom
@@ -1 +1 @@
-Subproject commit 651c48a76e2c0f361feba8a66d4d693a2a0605a9
+Subproject commit 9d38946b7d7a0486a4a75669008112d306309d9e
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 52fe72825c6b0ace3a183a13bbbb94f423f7b8c0..fb355b7617d554baf6fa8eb39a42aed3d6cfbd87 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -205,12 +205,21 @@ set(inkscape_SRC
actions/actions-extra-data.h
actions/actions-extra-data.cpp
+ actions/actions-hint-data.h
+ actions/actions-hint-data.cpp
+
actions/actions-canvas-mode.h
actions/actions-canvas-mode.cpp
actions/actions-canvas-snapping.h
actions/actions-canvas-snapping.cpp
actions/actions-canvas-transform.h
actions/actions-canvas-transform.cpp
+ actions/actions-doc-file.h
+ actions/actions-doc-file.cpp
+ actions/actions-hide-lock.h
+ actions/actions-hide-lock.cpp
+ actions/actions-edit.h
+ actions/actions-edit.cpp
actions/actions-base.h
actions/actions-dialogs.cpp
actions/actions-dialogs.h
@@ -218,13 +227,21 @@ set(inkscape_SRC
actions/actions-file.h
actions/actions-file.cpp
actions/actions-helper.h
- actions/actions-helper.cpp
+ actions/actions-helper.cpp
+ actions/actions-node.h
+ actions/actions-node.cpp
actions/actions-object.h
actions/actions-object.cpp
actions/actions-object-align.h
actions/actions-object-align.cpp
actions/actions-output.h
actions/actions-output.cpp
+ actions/actions-selection-object.h
+ actions/actions-selection-object.cpp
+ actions/actions-selection-desktop.h
+ actions/actions-selection-desktop.cpp
+ actions/actions-fit-canvas.h
+ actions/actions-fit-canvas.cpp
actions/actions-selection.h
actions/actions-selection.cpp
actions/actions-tools.h
@@ -409,4 +426,4 @@ if(WIN32)
endif()
if(BUILD_SHARED_LIBS)
install(TARGETS inkscape_base LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/inkscape")
-endif()
+endif()
\ No newline at end of file
diff --git a/src/actions/actions-canvas-mode.cpp b/src/actions/actions-canvas-mode.cpp
index d7fb677d01f99a53aabb886617ba4b364546c146..8d751d19514c5ee5700f75b90daaf6dca29d5f86 100644
--- a/src/actions/actions-canvas-mode.cpp
+++ b/src/actions/actions-canvas-mode.cpp
@@ -13,6 +13,10 @@
#include // Not ! To eventually allow a headless version!
#include
+#include "ui/interface.h"
+#include "ui/uxmanager.h"
+#include "ui/view/view.h"
+
#include "actions-canvas-mode.h"
#include "inkscape-application.h"
@@ -253,6 +257,350 @@ canvas_color_manage_toggle(InkscapeWindow *win)
canvas->redraw_all();
}
+void
+canvas_show_grid_toggle(InkscapeWindow *win)
+{
+ // Get Action
+ auto action = win->lookup_action("canvas-show-grid");
+ if (!action) {
+ std::cerr << "canvas_show_grid_toggle: action missing!" << std::endl;
+ return;
+ }
+
+ auto saction = Glib::RefPtr::cast_dynamic(action);
+ if (!saction) {
+ std::cerr << "canvas_show_grid_toggle: action not SimpleAction!" << std::endl;
+ return;
+ }
+
+ // Toggle State
+ bool state = false;
+ saction->get_state(state);
+ state = !state;
+ saction->change_state(state);
+
+ // Toggle Action
+ SPDesktop* dt = win->get_desktop();
+ dt->toggleGrids();
+}
+
+void
+canvas_show_guides_toggle(InkscapeWindow *win)
+{
+ // Get Action
+ auto action = win->lookup_action("canvas-show-guides");
+ if (!action) {
+ std::cerr << "canvas_show_guides_toggle: action missing!" << std::endl;
+ return;
+ }
+
+ auto saction = Glib::RefPtr::cast_dynamic(action);
+ if (!saction) {
+ std::cerr << "canvas_show_guides_toggle: action not SimpleAction!" << std::endl;
+ return;
+ }
+
+ // Toggle State
+ bool state = false;
+ saction->get_state(state);
+ state = !state;
+ saction->change_state(state);
+
+ // Toggle Action
+ SPDesktop* dt = win->get_desktop();
+ SPDocument* doc = dt->getDocument();
+ sp_namedview_toggle_guides(doc, dt->namedview);
+}
+
+void
+canvas_commands_bar_toggle(InkscapeWindow *win)
+{
+ // Get Action
+ auto action = win->lookup_action("canvas-commands-bar");
+ if (!action) {
+ std::cerr << "canvas_commands_bar_toggle: action missing!" << std::endl;
+ return;
+ }
+
+ auto saction = Glib::RefPtr::cast_dynamic(action);
+ if (!saction) {
+ std::cerr << "canvas_commands_bar_toggle: action not SimpleAction!" << std::endl;
+ return;
+ }
+
+ // Toggle State
+ bool state = false;
+ saction->get_state(state);
+ state = !state;
+ saction->change_state(state);
+
+ // Toggle Action
+ SPDesktop* dt = win->get_desktop();
+ dt->toggleToolbar("commands");
+}
+
+void
+canvas_snap_controls_bar_toggle(InkscapeWindow *win)
+{
+ // Get Action
+ auto action = win->lookup_action("canvas-snap-controls-bar");
+ if (!action) {
+ std::cerr << "canvas_snap_controls_bar_toggle: action missing!" << std::endl;
+ return;
+ }
+
+ auto saction = Glib::RefPtr::cast_dynamic(action);
+ if (!saction) {
+ std::cerr << "canvas_snap_controls_bar_toggle: action not SimpleAction!" << std::endl;
+ return;
+ }
+
+ // Toggle State
+ bool state = false;
+ saction->get_state(state);
+ state = !state;
+ saction->change_state(state);
+
+ // Toggle Action
+ SPDesktop* dt = win->get_desktop();
+ dt->toggleToolbar("snaptoolbox");
+}
+
+void
+canvas_tool_control_bar_toggle(InkscapeWindow *win)
+{
+ // Get Action
+ auto action = win->lookup_action("canvas-tool-control-bar");
+ if (!action) {
+ std::cerr << "canvas_tool_control_bar_toggle: action missing!" << std::endl;
+ return;
+ }
+
+ auto saction = Glib::RefPtr::cast_dynamic(action);
+ if (!saction) {
+ std::cerr << "canvas_tool_control_bar_toggle: action not SimpleAction!" << std::endl;
+ return;
+ }
+
+ // Toggle State
+ bool state = false;
+ saction->get_state(state);
+ state = !state;
+ saction->change_state(state);
+
+ // Toggle Action
+ SPDesktop* dt = win->get_desktop();
+ dt->toggleToolbar("toppanel");
+}
+
+void
+canvas_toolbox_toggle(InkscapeWindow *win)
+{
+ // Get Action
+ auto action = win->lookup_action("canvas-toolbox");
+ if (!action) {
+ std::cerr << "canvas_toolbox_toggle: action missing!" << std::endl;
+ return;
+ }
+
+ auto saction = Glib::RefPtr::cast_dynamic(action);
+ if (!saction) {
+ std::cerr << "canvas_toolbox_toggle: action not SimpleAction!" << std::endl;
+ return;
+ }
+
+ // Toggle State
+ bool state = false;
+ saction->get_state(state);
+ state = !state;
+ saction->change_state(state);
+
+ // Toggle Action
+ SPDesktop* dt = win->get_desktop();
+ dt->toggleToolbar("toolbox");
+}
+
+void
+canvas_rulers_toggle(InkscapeWindow *win)
+{
+ // Get Action
+ auto action = win->lookup_action("canvas-rulers");
+ if (!action) {
+ std::cerr << "canvas_rulers_toggle: action missing!" << std::endl;
+ return;
+ }
+
+ auto saction = Glib::RefPtr::cast_dynamic(action);
+ if (!saction) {
+ std::cerr << "canvas_rulers_toggle: action not SimpleAction!" << std::endl;
+ return;
+ }
+
+ // Toggle State
+ bool state = false;
+ saction->get_state(state);
+ state = !state;
+ saction->change_state(state);
+
+ // Toggle Action
+ SPDesktop* dt = win->get_desktop();
+ dt->toggleToolbar("rulers");
+}
+
+void
+canvas_scroll_bars(InkscapeWindow *win)
+{
+ // Get Action
+ auto action = win->lookup_action("canvas-scroll-bars");
+ if (!action) {
+ std::cerr << "canvas_scroll_bars: action missing!" << std::endl;
+ return;
+ }
+
+ auto saction = Glib::RefPtr::cast_dynamic(action);
+ if (!saction) {
+ std::cerr << "canvas_scroll_bars: action not SimpleAction!" << std::endl;
+ return;
+ }
+
+ // Toggle State
+ bool state = false;
+ saction->get_state(state);
+ state = !state;
+ saction->change_state(state);
+
+ // Toggle Action
+ SPDesktop* dt = win->get_desktop();
+ dt->toggleToolbar("scrollbars");
+}
+
+void
+canvas_palette_toggle(InkscapeWindow *win)
+{
+ // Get Action
+ auto action = win->lookup_action("canvas-palette");
+ if (!action) {
+ std::cerr << "canvas_palette_toggle: action missing!" << std::endl;
+ return;
+ }
+
+ auto saction = Glib::RefPtr::cast_dynamic(action);
+ if (!saction) {
+ std::cerr << "canvas_palette_toggle: action not SimpleAction!" << std::endl;
+ return;
+ }
+
+ // Toggle State
+ bool state = false;
+ saction->get_state(state);
+ state = !state;
+ saction->change_state(state);
+
+ // Toggle Action
+ SPDesktop* dt = win->get_desktop();
+ dt->toggleToolbar("panels");
+}
+
+void
+canvas_statusbar_toggle(InkscapeWindow *win)
+{
+ // Get Action
+ auto action = win->lookup_action("canvas-statusbar");
+ if (!action) {
+ std::cerr << "canvas_statusbar_toggle: action missing!" << std::endl;
+ return;
+ }
+
+ auto saction = Glib::RefPtr::cast_dynamic(action);
+ if (!saction) {
+ std::cerr << "canvas_statusbar_toggle: action not SimpleAction!" << std::endl;
+ return;
+ }
+
+ // Toggle State
+ bool state = false;
+ saction->get_state(state);
+ state = !state;
+ saction->change_state(state);
+
+ // Toggle Action
+ SPDesktop* dt = win->get_desktop();
+ dt->toggleToolbar("statusbar");
+}
+
+void
+canvas_command_palette(InkscapeWindow *win)
+{
+ SPDesktop* dt = win->get_desktop();
+ dt->toggleCommandPalette();
+}
+
+void
+window_new(InkscapeWindow *win)
+{
+ sp_ui_new_view();
+}
+
+void
+view_fullscreen(InkscapeWindow *win)
+{
+ SPDesktop* dt = win->get_desktop();
+ dt->fullscreen();
+}
+
+void
+canvas_interface_mode(int value, InkscapeWindow *win)
+{
+ if (value < 0 || value >= 3) {
+ std::cerr << "canvas_interface_mode: value out of bound! : " << value << std::endl;
+ return;
+ }
+
+ auto action = win->lookup_action("canvas-interface-mode");
+ if (!action) {
+ std::cerr << "canvas_interface_mode: action 'canvas-interface-mode' missing!" << std::endl;
+ return;
+ }
+
+ auto saction = Glib::RefPtr::cast_dynamic(action);
+ if (!saction) {
+ std::cerr << "canvas_interface_mode: action 'canvas-interface-mode' not SimpleAction!" << std::endl;
+ return;
+ }
+
+ // Setting Message
+ Glib::ustring tip;
+ if (value == 0) {
+ tip = _("Default interface setup");
+ }
+ else if (value == 1) {
+ tip = _("Setup for custom task");
+ }
+ else if (value == 2) {
+ tip = _("Setup for widescreen work");
+ }
+
+ // Change state
+ saction->change_state(value);
+
+ // Set Interface
+ SPDesktop* dt = win->get_desktop();
+ Inkscape::UI::UXManager::getInstance()->setTask(dt, value);
+
+#ifdef GDK_WINDOWING_QUARTZ
+ // TODO uncomment this or figure out what to do with it.
+ // this is just to be able to build successfuly for mac.
+ // call later, crashes during startup if called directly
+ // g_idle_add(sync_menubar, nullptr);
+#endif
+
+ // Message FIXME having some error
+ // dt->tipsMessageContext()->clear();
+ // dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, gettext( tip.c_str() ) );
+ // similar = dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, gettext( tool_msg[tool].c_str() ) );
+
+}
+
std::vector> raw_data_canvas_mode =
{
// clang-format off
@@ -269,6 +617,27 @@ std::vector> raw_data_canvas_mode =
{"win.canvas-color-mode", N_("Color Mode"), "Canvas Display", N_("Toggle between normal and grayscale modes") },
{"win.canvas-color-manage", N_("Color Managed Mode"), "Canvas Display", N_("Toggle between normal and color managed modes") },
+
+ {"win.canvas-show-grid", N_("Page Grid"), "Canvas Display", N_("Show or hide the page grid") },
+
+ {"win.canvas-show-guides", N_("Guides"), "Canvas Display", N_("Show or hide guides (drag from a ruler to create a guide)") },
+ {"win.canvas-commands-bar", N_("Commands Bar"), "Canvas Display", N_("Show or hide the Commands bar (under the menu)") },
+ {"win.canvas-snap-controls-bar", N_("Snap Controls Bar"), "Canvas Display", N_("Show or hide the snapping controls")},
+ {"win.canvas-tool-control-bar", N_("Tool Controls Bar"), "Canvas Display", N_("Show or hide the Tool Controls bar")},
+ {"win.canvas-toolbox", N_("Toolbox"), "Canvas Display", N_("Show or hide the main toolbox (on the left)")},
+ {"win.canvas-rulers", N_("Rulers"), "Canvas Display", N_("Show or hide the canvas rulers")},
+ {"win.canvas-scroll-bars", N_("Scroll bars"), "Canvas Display", N_("Show or hide the canvas scrollbars")},
+ {"win.canvas-palette", N_("Palette"), "Canvas Display", N_("Show or hide the color palette")},
+ {"win.canvas-statusbar", N_("Statusbar"), "Canvas Display", N_("Show or hide the statusbar (at the bottom of the window)")},
+
+ {"win.canvas-command-palette", N_("Command Palette"), "Canvas Display", N_("Show or hide the on-canvas command palette")},
+ {"win.window-new", N_("Duplicate Window"), "Canvas Display", N_("Open a new window with the same document")},
+ {"win.view-fullscreen", N_("Fullscreen"), "Canvas Display", N_("Stretch this document window to full screen")},
+
+ {"win.canvas-interface-mode(0)", N_("Default"), "Canvas Display", N_("Default interface setup") },
+ {"win.canvas-interface-mode(1)", N_("Custom"), "Canvas Display", N_("Setup for custom task") },
+ {"win.canvas-interface-mode(2)", N_("Wide"), "Canvas Display", N_("Setup for widescreen work") }
+
// clang-format on
};
@@ -277,11 +646,22 @@ add_actions_canvas_mode(InkscapeWindow* win)
{
// Sync action with desktop variables. TODO: Remove!
auto prefs = Inkscape::Preferences::get();
+ SPDesktop* dt = win->get_desktop();
- int display_mode = prefs->getIntLimited("/options/displaymode", 0, 0, 4); // Default, minimum, maximum
- bool color_manage = prefs->getBool("/options/displayprofile/enable");
+ // Initial States of Actions
+ int display_mode = prefs->getIntLimited("/options/displaymode", 0, 0, 4); // Default, minimum, maximum
+ bool color_manage = prefs->getBool("/options/displayprofile/enable");
+ bool commands_toggle = prefs->getBool("/window/commands/state", true);
+ bool snaptoolbox_toggle = prefs->getBool("/window/snaptoolbox/state", true);
+ bool toppanel_toggle = prefs->getBool("/window/toppanel/state", true);
+ bool toolbox_toggle = prefs->getBool("/window/toolbox/state", true);
+ bool panels_toggle = prefs->getBool("/window/panels/state", true);
+ bool statusbar_toggle = prefs->getBool("/window/statusbar/state", true);
+ bool scrollbars_toggle = prefs->getBool("/window/scrollbars/state", true);
+ bool rulers_toggle = prefs->getBool("/window/rulers/state", true);
+ bool guides_toggle = win->get_desktop()->namedview->getRepr()->getAttributeBoolean("showguides", true); // Should set it true or retrive the state (every time it set to true on restart)
+ int interface_mode = Inkscape::UI::UXManager::getInstance()->getDefaultTask(dt);
- SPDesktop* dt = win->get_desktop();
if (dt) {
auto canvas = dt->getCanvas();
canvas->set_render_mode(Inkscape::RenderMode(display_mode));
@@ -291,15 +671,26 @@ add_actions_canvas_mode(InkscapeWindow* win)
}
// clang-format off
- win->add_action_radio_integer ("canvas-display-mode", sigc::bind(sigc::ptr_fun(&canvas_display_mode), win), display_mode);
- win->add_action( "canvas-display-mode-cycle", sigc::bind(sigc::ptr_fun(&canvas_display_mode_cycle), win) );
- win->add_action( "canvas-display-mode-toggle", sigc::bind(sigc::ptr_fun(&canvas_display_mode_toggle), win) );
-
- win->add_action_radio_integer ("canvas-split-mode", sigc::bind(sigc::ptr_fun(&canvas_split_mode), win), (int)Inkscape::SplitMode::NORMAL);
-
- win->add_action_bool( "canvas-color-mode", sigc::bind(sigc::ptr_fun(&canvas_color_mode_toggle), win) );
-
- win->add_action_bool( "canvas-color-manage", sigc::bind(sigc::ptr_fun(&canvas_color_manage_toggle), win), color_manage);
+ win->add_action_radio_integer ("canvas-display-mode", sigc::bind(sigc::ptr_fun(&canvas_display_mode), win), display_mode);
+ win->add_action( "canvas-display-mode-cycle", sigc::bind(sigc::ptr_fun(&canvas_display_mode_cycle), win));
+ win->add_action( "canvas-display-mode-toggle", sigc::bind(sigc::ptr_fun(&canvas_display_mode_toggle), win));
+ win->add_action_radio_integer ("canvas-split-mode", sigc::bind(sigc::ptr_fun(&canvas_split_mode), win), (int)Inkscape::SplitMode::NORMAL);
+ win->add_action_bool( "canvas-color-mode", sigc::bind(sigc::ptr_fun(&canvas_color_mode_toggle), win));
+ win->add_action_bool( "canvas-color-manage", sigc::bind(sigc::ptr_fun(&canvas_color_manage_toggle), win), color_manage);
+ win->add_action_bool( "canvas-show-grid", sigc::bind(sigc::ptr_fun(&canvas_show_grid_toggle), win));
+ win->add_action_bool( "canvas-show-guides", sigc::bind(sigc::ptr_fun(&canvas_show_guides_toggle), win), guides_toggle);
+ win->add_action_bool( "canvas-commands-bar", sigc::bind(sigc::ptr_fun(&canvas_commands_bar_toggle), win), commands_toggle);
+ win->add_action_bool( "canvas-snap-controls-bar", sigc::bind(sigc::ptr_fun(&canvas_snap_controls_bar_toggle), win), snaptoolbox_toggle);
+ win->add_action_bool( "canvas-tool-control-bar", sigc::bind(sigc::ptr_fun(&canvas_tool_control_bar_toggle), win), toppanel_toggle);
+ win->add_action_bool( "canvas-toolbox", sigc::bind(sigc::ptr_fun(&canvas_toolbox_toggle), win), toolbox_toggle);
+ win->add_action_bool( "canvas-rulers", sigc::bind(sigc::ptr_fun(&canvas_rulers_toggle), win), rulers_toggle);
+ win->add_action_bool( "canvas-scroll-bars", sigc::bind(sigc::ptr_fun(&canvas_scroll_bars), win), scrollbars_toggle);
+ win->add_action_bool( "canvas-palette", sigc::bind(sigc::ptr_fun(&canvas_palette_toggle), win), panels_toggle);
+ win->add_action_bool( "canvas-statusbar", sigc::bind(sigc::ptr_fun(&canvas_statusbar_toggle), win), statusbar_toggle);
+ win->add_action( "canvas-command-palette", sigc::bind(sigc::ptr_fun(&canvas_command_palette), win));
+ win->add_action( "window-new", sigc::bind(sigc::ptr_fun(&window_new), win));
+ win->add_action( "view-fullscreen", sigc::bind(sigc::ptr_fun(&view_fullscreen), win));
+ win->add_action_radio_integer ("canvas-interface-mode", sigc::bind(sigc::ptr_fun(&canvas_interface_mode), win), interface_mode);
// clang-format on
auto app = InkscapeApplication::instance();
diff --git a/src/actions/actions-doc-file.cpp b/src/actions/actions-doc-file.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..523152c2e0428f661f22c6d8ab433be33c24be56
--- /dev/null
+++ b/src/actions/actions-doc-file.cpp
@@ -0,0 +1,78 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/** \file
+ *
+ * Actions Related to Files
+ *
+ * Authors:
+ * Sushant A A
+ *
+ * Copyright (C) 2021 Authors
+ *
+ * Released under GNU GPL v2+, read the file 'COPYING' for more information.
+ */
+
+#include
+#include
+
+#include "actions-doc-file.h"
+#include "actions/actions-extra-data.h"
+#include "inkscape-application.h"
+
+#include "document.h"
+#include "inkscape.h"
+#include "object/sp-namedview.h"
+
+#include "file.h"
+#include "ui/dialog/new-from-template.h"
+
+void
+window_previous(SPDocument* document)
+{
+ INKSCAPE.switch_desktops_prev();
+}
+
+void
+window_next(SPDocument* document)
+{
+ INKSCAPE.switch_desktops_next();
+}
+
+void
+document_new(SPDocument* document)
+{
+ sp_file_new_default();
+}
+
+void
+document_dialog_templates(SPDocument* document)
+{
+ Inkscape::UI::NewFromTemplate::load_new_from_template();
+}
+
+std::vector> raw_data_doc_file =
+{
+ {"doc.window-previous", N_("P_revious Window"), "File", N_("Switch to the previous document window")},
+ {"doc.window-next", N_("N_ext Window"), "File", N_("Switch to the next document window")},
+ {"doc.document-new", N_("_New"), "File", N_("Create new document from the default template")},
+ {"doc.document-dialog-templates", N_("New from _Template..."), "File", N_("Create new project from template")}
+};
+
+void
+add_actions_doc_file(SPDocument* document)
+{
+
+ Glib::RefPtr map = document->getActionGroup();
+
+ map->add_action( "window-previous", sigc::bind(sigc::ptr_fun(&window_previous), document));
+ map->add_action( "window-next", sigc::bind(sigc::ptr_fun(&window_next), document));
+ map->add_action( "document-new", sigc::bind(sigc::ptr_fun(&document_new), document));
+ map->add_action( "document-dialog-templates", sigc::bind(sigc::ptr_fun(&document_dialog_templates), document));
+
+ // Check if there is already an application instance (GUI or non-GUI).
+ auto app = InkscapeApplication::instance();
+ if (!app) {
+ std::cerr << "add_actions_doc_file: no app!" << std::endl;
+ return;
+ }
+ app->get_action_extra_data().add_data(raw_data_doc_file);
+}
\ No newline at end of file
diff --git a/src/actions/actions-doc-file.h b/src/actions/actions-doc-file.h
new file mode 100644
index 0000000000000000000000000000000000000000..b04d5e3909e6c43ee2ae834aa1eb80064d924ccc
--- /dev/null
+++ b/src/actions/actions-doc-file.h
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/** \file
+ *
+ * Authors:
+ * Sushant A A
+ *
+ * Copyright (C) 2021 Authors
+ *
+ * Released under GNU GPL v2+, read the file 'COPYING' for more information.
+ */
+
+#ifndef INK_ACTIONS_DOC_FILE_H
+#define INK_ACTIONS_DOC_FILE_H
+
+class SPDocument;
+
+void add_actions_doc_file(SPDocument* document);
+
+#endif // INK_ACTIONS_DOC_FILE_H
\ No newline at end of file
diff --git a/src/actions/actions-edit.cpp b/src/actions/actions-edit.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..2c9b6123b5589a555c54a0fc5a0791044b76b301
--- /dev/null
+++ b/src/actions/actions-edit.cpp
@@ -0,0 +1,506 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/** \file
+ *
+ * Actions for Editing an object
+ * Contains many actions of Edit Verb
+ *
+ * Authors:
+ * Sushant A A
+ *
+ * Copyright (C) 2021 Authors
+ *
+ * Released under GNU GPL v2+, read the file 'COPYING' for more information.
+ */
+
+#include
+#include
+
+#include "actions-edit.h"
+#include "inkscape-application.h"
+#include "inkscape-window.h"
+#include "desktop.h"
+#include "selection-chemistry.h"
+#include "object/sp-guide.h"
+
+void
+object_to_pattern(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Objects to Pattern
+ dt->selection->tile();
+}
+
+void
+pattern_to_object(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Pattern to Objects
+ dt->selection->untile();
+}
+
+void
+object_to_marker(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Objects to Marker
+ dt->selection->toMarker();
+}
+
+void
+object_to_guides(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Objects to Guides
+ dt->selection->toGuides();
+}
+
+void
+undo(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Undo
+ sp_undo(dt, dt->getDocument());
+}
+
+void
+redo(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Redo
+ sp_redo(dt, dt->getDocument());
+}
+
+void
+cut(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Cut
+ dt->selection->cut();
+}
+
+void
+copy(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Copy
+ dt->selection->copy();
+}
+
+void
+paste(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Paste
+ sp_selection_paste(dt, false);
+}
+
+void
+paste_in_place(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Paste In Place
+ sp_selection_paste(dt, true);
+}
+
+void
+paste_style(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Paste Style
+ dt->selection->pasteStyle();
+}
+
+void
+paste_size(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Paste Size
+ dt->selection->pasteSize(true,true);
+}
+
+void
+paste_width(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Paste Width
+ dt->selection->pasteSize(true, false);
+}
+
+void
+paste_height(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Paste Height
+ dt->selection->pasteSize(false, true);
+}
+
+void
+paste_size_separately(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Paste Size Separately
+ dt->selection->pasteSizeSeparately(true, true);
+}
+
+void
+paste_width_separately(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Paste Width Separately
+ dt->selection->pasteSizeSeparately(true, false);
+}
+
+void
+paste_height_separately(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Paste Height Separately
+ dt->selection->pasteSizeSeparately(false, true);
+}
+
+void
+duplicate(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Duplicate
+ dt->selection->duplicate();
+}
+
+void
+clone(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Create Clone
+ dt->selection->clone();
+}
+
+void
+clone_unlink(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Unlink Clone
+ dt->selection->unlink();
+}
+
+void
+clone_unlink_recursively(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Unlink Clones recursively
+ dt->selection->unlinkRecursive(false, true);
+}
+
+void
+clone_link(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Relink to Copied
+ dt->selection->relink();
+}
+
+void
+select_original(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Select Original
+ dt->selection->cloneOriginal();
+}
+
+void
+clone_link_lpe(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Clone original path (LPE)
+ dt->selection->cloneOriginalPathLPE();
+}
+
+void
+edit_delete(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Delete
+ dt->selection->deleteItems();
+}
+
+void
+select_all(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Select All
+ Inkscape::SelectionHelper::selectAll(dt);
+}
+
+void
+select_all_layers(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Select All in All Layers
+ Inkscape::SelectionHelper::selectAllInAll(dt);
+}
+
+void
+select_same_fill_and_stroke(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Fill and Stroke
+ Inkscape::SelectionHelper::selectSameFillStroke(dt);
+}
+
+void
+select_same_fill(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Fill Color
+ Inkscape::SelectionHelper::selectSameFillColor(dt);
+}
+
+void
+select_same_stroke_color(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Stroke Color
+ Inkscape::SelectionHelper::selectSameStrokeColor(dt);
+}
+
+void
+select_same_stroke_style(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Stroke Style
+ Inkscape::SelectionHelper::selectSameStrokeStyle(dt);
+}
+
+void
+select_same_object_type(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Object Type
+ Inkscape::SelectionHelper::selectSameObjectType(dt);
+}
+
+void
+select_invert(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Invert Selection
+ Inkscape::SelectionHelper::invert(dt);
+}
+
+void
+select_none(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Deselect
+ Inkscape::SelectionHelper::selectNone(dt);
+}
+
+void
+create_guides_around_page(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Create Guides Around the Page
+ sp_guide_create_guides_around_page(dt);
+}
+
+void
+lock_all_guides(InkscapeWindow *win)
+{
+ // Get Action
+ auto action = win->lookup_action("lock-all-guides");
+ if (!action) {
+ std::cerr << "lock_all_guides: action missing!" << std::endl;
+ return;
+ }
+
+ auto saction = Glib::RefPtr::cast_dynamic(action);
+ if (!saction) {
+ std::cerr << "lock_all_guides: action not SimpleAction!" << std::endl;
+ return;
+ }
+
+ // Toggle State
+ bool state = false;
+ saction->get_state(state);
+ state = !state;
+ saction->change_state(state);
+
+ SPDesktop* dt = win->get_desktop();
+
+ // Lock All Guides
+ dt->toggleGuidesLock();
+}
+
+void
+delete_all_guides(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Delete All Guides
+ sp_guide_delete_all_guides(dt);
+}
+
+void
+paste_path_effect(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Paste Path Effect
+ dt->selection->pastePathEffect();
+}
+
+void
+remove_path_effect(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Remove Path Effect
+ dt->selection->removeLPE();
+}
+
+/* Node toolbar : deactivate button when no effect is done ( Currently not added this feature ) */
+void
+path_effect_parameter_next(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Next path effect parameter
+ sp_selection_next_patheffect_param(dt);
+}
+
+std::vector> raw_data_edit =
+{
+ // clang-format off
+ {"win.object-to-pattern", N_("Objects to Pattern"), "Edit", N_("Convert selection to a rectangle with tiled pattern fill")},
+ {"win.pattern-to-object", N_("Pattern to Objects"), "Edit", N_("Extract objects from a tiled pattern fill")},
+ {"win.object-to-marker", N_("Objects to Marker"), "Edit", N_("Convert selection to a line marker")},
+ {"win.object-to-guides", N_("Objects to Guides"), "Edit", N_("Convert selected objects to a collection of guidelines aligned with their edges")},
+ {"win.undo", N_("Undo"), "Edit", N_("Undo last action")},
+ {"win.redo", N_("Redo"), "Edit", N_("Do again the last undone action")},
+ {"win.cut", N_("Cut"), "Edit", N_("Cut selection to clipboard")},
+ {"win.copy", N_("Copy"), "Edit", N_("Copy selection to clipboard")},
+ {"win.paste", N_("Paste"), "Edit", N_("Paste objects from clipboard to mouse point, or paste text")},
+ {"win.paste-in-place", N_("Paste In Place"), "Edit", N_("Paste objects from clipboard to mouse point, or paste text")},
+ {"win.paste-style", N_("Paste Style"), "Edit", N_("Apply the style of the copied object to selection")},
+ {"win.paste-size", N_("Paste Size"), "Edit", N_("Scale selection to match the size of the copied object")},
+ {"win.paste-width", N_("Paste Width"), "Edit", N_("Scale selection horizontally to match the width of the copied object")},
+ {"win.paste-height", N_("Paste Height"), "Edit", N_("Scale selection vertically to match the height of the copied object")},
+ {"win.paste-size-separately", N_("Paste Size Separately"), "Edit", N_("Scale each selected object to match the size of the copied object")},
+ {"win.paste-width-separately", N_("Paste Width Separately"), "Edit", N_("Scale each selected object horizontally to match the width of the copied object")},
+ {"win.paste-height-separately", N_("Paste Height Separately"), "Edit", N_("Scale each selected object vertically to match the height of the copied object")},
+ {"win.duplicate", N_("Duplicate"), "Edit", N_("Duplicate Selected Objects")},
+ {"win.clone", N_("Create Clone"), "Edit", N_("Create a clone (a copy linked to the original) of selected object")},
+ {"win.clone-unlink", N_("Unlink Clone"), "Edit", N_("Cut the selected clones' links to the originals, turning them into standalone objects")},
+ {"win.clone-unlink-recursively", N_("Unlink Clones recursively"), "Edit", N_("Unlink all clones in the selection, even if they are in groups.")},
+ {"win.clone-link", N_("Relink to Copied"), "Edit", N_("Relink the selected clones to the object currently on the clipboard")},
+ {"win.select-original", N_("Select Original"), "Edit", N_("Select the object to which the selected clone is linked")},
+ {"win.clone-link-lpe", N_("Clone original path (LPE)"), "Edit", N_("Creates a new path, applies the Clone original LPE, and refers it to the selected path")},
+ {"win.delete", N_("Delete"), "Edit", N_("Delete selection")},
+ {"win.select-all", N_("Select All"), "Edit", N_("Select all objects or all nodes")},
+ {"win.select-all-layers", N_("Select All in All Layers"), "Edit", N_("Select all objects in all visible and unlocked layers")},
+ {"win.select-same-fill-and-stroke", N_("Fill and Stroke"), "Edit", N_("Select all objects with the same fill and stroke as the selected objects")},
+ {"win.select-same-fill", N_("Fill Color"), "Edit", N_("Select all objects with the same fill as the selected objects")},
+ {"win.select-same-stroke-color", N_("Stroke Color"), "Edit", N_("Select all objects with the same stroke as the selected objects")},
+ {"win.select-same-stroke-style", N_("Stroke Style"), "Edit", N_("Select all objects with the same stroke style (width, dash, markers) as the selected objects")},
+ {"win.select-same-object-type", N_("Object Type"), "Edit", N_("Select all objects with the same object type (rect, arc, text, path, bitmap etc) as the selected objects")},
+ {"win.select-invert", N_("Invert Selection"), "Edit", N_("Invert selection (unselect what is selected and select everything else)")},
+ {"win.select-none", N_("Deselect"), "Edit", N_("Deselect any selected objects or nodes")},
+ {"win.create-guides-around-page", N_("Create Guides Around the Page"), "Edit", N_("Create four guides aligned with the page borders")},
+ {"win.lock-all-guides", N_("Lock All Guides"), "Edit", N_("Toggle lock of all guides in the document")},
+ {"win.delete-all-guides", N_("Delete All Guides"), "Edit", N_("Delete all the guides in the document")},
+ {"win.paste-path-effect", N_("Paste Path Effect"), "Edit", N_("Apply the path effect of the copied object to selection")},
+ {"win.remove-path-effect", N_("Remove Path Effect"), "Edit", N_("Remove any path effects from selected objects")},
+ {"win.path-effect-parameter-next", N_("Next path effect parameter"), "Edit", N_("Show next editable path effect parameter")}
+ // clang-format on
+};
+
+void
+add_actions_edit(InkscapeWindow* win)
+{
+
+ /* Should be done in separate function or switch cases ? */
+
+ // clang-format off
+ win->add_action( "object-to-pattern", sigc::bind(sigc::ptr_fun(&object_to_pattern), win));
+ win->add_action( "pattern-to-object", sigc::bind(sigc::ptr_fun(&pattern_to_object), win));
+ win->add_action( "object-to-marker", sigc::bind(sigc::ptr_fun(&object_to_marker), win));
+ win->add_action( "object-to-guides", sigc::bind(sigc::ptr_fun(&object_to_guides), win));
+ win->add_action( "undo", sigc::bind(sigc::ptr_fun(&undo), win));
+ win->add_action( "redo", sigc::bind(sigc::ptr_fun(&redo), win));
+ win->add_action( "cut", sigc::bind(sigc::ptr_fun(&cut), win));
+ win->add_action( "copy", sigc::bind(sigc::ptr_fun(©), win));
+ win->add_action( "paste", sigc::bind(sigc::ptr_fun(&paste), win));
+ win->add_action( "paste-in-place", sigc::bind(sigc::ptr_fun(&paste_in_place), win));
+ win->add_action( "paste-style", sigc::bind(sigc::ptr_fun(&paste_style), win));
+ win->add_action( "paste-size", sigc::bind(sigc::ptr_fun(&paste_size), win));
+ win->add_action( "paste-width", sigc::bind(sigc::ptr_fun(&paste_width), win));
+ win->add_action( "paste-height", sigc::bind(sigc::ptr_fun(&paste_height), win));
+ win->add_action( "paste-size-separately", sigc::bind(sigc::ptr_fun(&paste_size_separately), win));
+ win->add_action( "paste-width-separately", sigc::bind(sigc::ptr_fun(&paste_width_separately), win));
+ win->add_action( "paste-height-separately", sigc::bind(sigc::ptr_fun(&paste_height_separately), win));
+ win->add_action( "duplicate", sigc::bind(sigc::ptr_fun(&duplicate), win));
+ win->add_action( "clone", sigc::bind(sigc::ptr_fun(&clone), win));
+ win->add_action( "clone-unlink", sigc::bind(sigc::ptr_fun(&clone_unlink), win));
+ win->add_action( "clone-unlink-recursively", sigc::bind(sigc::ptr_fun(&clone_unlink_recursively), win));
+ win->add_action( "clone-link", sigc::bind(sigc::ptr_fun(&clone_link), win));
+ win->add_action( "select-original", sigc::bind(sigc::ptr_fun(&select_original), win));
+ win->add_action( "clone-link-lpe", sigc::bind(sigc::ptr_fun(&clone_link_lpe), win));
+ win->add_action( "delete", sigc::bind(sigc::ptr_fun(&edit_delete), win));
+ win->add_action( "select-all", sigc::bind(sigc::ptr_fun(&select_all), win));
+ win->add_action( "select-all-layers", sigc::bind(sigc::ptr_fun(&select_all_layers), win));
+ win->add_action( "select-same-fill-and-stroke", sigc::bind(sigc::ptr_fun(&select_same_fill_and_stroke), win));
+ win->add_action( "select-same-fill", sigc::bind(sigc::ptr_fun(&select_same_fill), win));
+ win->add_action( "select-same-stroke-color", sigc::bind(sigc::ptr_fun(&select_same_stroke_color), win));
+ win->add_action( "select-same-stroke-style", sigc::bind(sigc::ptr_fun(&select_same_stroke_style), win));
+ win->add_action( "select-same-object-type", sigc::bind(sigc::ptr_fun(&select_same_object_type), win));
+ win->add_action( "select-invert", sigc::bind(sigc::ptr_fun(&select_invert), win));
+ win->add_action( "select-none", sigc::bind(sigc::ptr_fun(&select_none), win));
+ win->add_action( "create-guides-around-page", sigc::bind(sigc::ptr_fun(&create_guides_around_page), win));
+ win->add_action_bool( "lock-all-guides", sigc::bind(sigc::ptr_fun(&lock_all_guides), win));
+ win->add_action( "delete-all-guides", sigc::bind(sigc::ptr_fun(&delete_all_guides), win));
+ win->add_action( "paste-path-effect", sigc::bind(sigc::ptr_fun(&paste_path_effect), win));
+ win->add_action( "remove-path-effect", sigc::bind(sigc::ptr_fun(&remove_path_effect), win));
+ win->add_action( "path-effect-parameter-next", sigc::bind(sigc::ptr_fun(&path_effect_parameter_next), win));
+ // clang-format on
+
+ auto app = InkscapeApplication::instance();
+ if (!app) {
+ std::cerr << "add_actions_edit: no app!" << std::endl;
+ return;
+ }
+ app->get_action_extra_data().add_data(raw_data_edit);
+}
\ No newline at end of file
diff --git a/src/actions/actions-edit.h b/src/actions/actions-edit.h
new file mode 100644
index 0000000000000000000000000000000000000000..1f4a1c7fd3adc5c0bb6f3e2a559630b5196e168a
--- /dev/null
+++ b/src/actions/actions-edit.h
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/** \file
+ *
+ * Authors:
+ * Sushant A A
+ *
+ * Copyright (C) 2021 Authors
+ *
+ * Released under GNU GPL v2+, read the file 'COPYING' for more information.
+ */
+
+#ifndef INK_ACTIONS_EDIT_H
+#define INK_ACTIONS_EDIT_H
+
+class InkscapeWindow;
+
+void add_actions_edit(InkscapeWindow* win);
+
+#endif // INK_ACTIONS_EDIT_H
\ No newline at end of file
diff --git a/src/actions/actions-file.cpp b/src/actions/actions-file.cpp
index 79c6d741379cb67d8c94ffb1ad60a4c53b5978b6..1d9d135f60c20e9e8ce0c1ff080f4a0c6d3feacf 100644
--- a/src/actions/actions-file.cpp
+++ b/src/actions/actions-file.cpp
@@ -103,6 +103,14 @@ std::vector> raw_data_file =
// clang-format on
};
+std::vector> hint_data_file =
+{
+ // clang-format off
+ {"app.file-open", N_("Give String input for File name")},
+ {"app.file-new", N_("Give String input for File name")}
+ // clang-format on
+};
+
void
add_actions_file(InkscapeApplication* app)
{
@@ -126,6 +134,7 @@ add_actions_file(InkscapeApplication* app)
#endif
app->get_action_extra_data().add_data(raw_data_file);
+ app->get_action_hint_data().add_data(hint_data_file);
}
@@ -138,4 +147,4 @@ add_actions_file(InkscapeApplication* app)
fill-column:99
End:
*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
\ No newline at end of file
diff --git a/src/actions/actions-fit-canvas.cpp b/src/actions/actions-fit-canvas.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..3a9dd6d2e3f94295560c081cba709baba7c9102b
--- /dev/null
+++ b/src/actions/actions-fit-canvas.cpp
@@ -0,0 +1,76 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/** \file
+ *
+ * Actions related to fit canvas
+ *
+ * Authors:
+ * Sushant A A
+ *
+ * Copyright (C) 2021 Authors
+ *
+ * Released under GNU GPL v2+, read the file 'COPYING' for more information.
+ */
+
+#include // Not ! To eventually allow a headless version!
+#include
+
+#include "actions-fit-canvas.h"
+#include "inkscape-application.h"
+#include "inkscape-window.h"
+#include "desktop.h"
+#include "selection-chemistry.h"
+
+void
+fit_canvas_to_selection(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Fit Page to Selection
+ dt->selection->fitCanvas(true);
+}
+
+void
+fit_canvas_drawing(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Fit Page to Drawing
+ if (fit_canvas_to_drawing(dt->getDocument())) {
+ Inkscape::DocumentUndo::done(dt->getDocument(), _("Fit Page to Drawing"), nullptr);
+ }
+}
+
+void
+canvas_to_selection_or_drawing(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+
+ // Resize Page to Selection
+ fit_canvas_to_selection_or_drawing(dt);
+}
+
+std::vector> raw_fit_canvas_data =
+{
+ // clang-format off
+ {"win.fit-canvas-to-selection", N_("Fit Page to Selection"), "Selection Desktop", N_("Fit the page to the current selection")},
+ {"win.fit-canvas-to-drawing", N_("Fit Page to Drawing"), "Selection Desktop", N_("Fit the page to the drawing")},
+ {"win.fit-canvas-to-selection-or-drawing", N_("Resize Page to Selection"), "Selection Desktop", N_("Fit the page to the current selection or the drawing if there is no selection")}
+ // clang-format on
+};
+
+void
+add_actions_fit_canvas(InkscapeWindow* win)
+{
+ // clang-format off
+ win->add_action( "fit-canvas-to-selection", sigc::bind(sigc::ptr_fun(&fit_canvas_to_selection), win));
+ win->add_action( "fit-canvas-to-drawing", sigc::bind(sigc::ptr_fun(&fit_canvas_drawing), win));
+ win->add_action( "fit-canvas-to-selection-or-drawing", sigc::bind(sigc::ptr_fun(&canvas_to_selection_or_drawing), win));
+ // clang-format on
+
+ auto app = InkscapeApplication::instance();
+ if (!app) {
+ std::cerr << "add_actions_fit_canvas: no app!" << std::endl;
+ return;
+ }
+ app->get_action_extra_data().add_data(raw_fit_canvas_data);
+}
\ No newline at end of file
diff --git a/src/actions/actions-fit-canvas.h b/src/actions/actions-fit-canvas.h
new file mode 100644
index 0000000000000000000000000000000000000000..0d47c0af020ee94f3413b102b1d1538b2489ec0a
--- /dev/null
+++ b/src/actions/actions-fit-canvas.h
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/** \file
+ *
+ * Authors:
+ * Sushant A A
+ *
+ * Copyright (C) 2021 Authors
+ *
+ * Released under GNU GPL v2+, read the file 'COPYING' for more information.
+ */
+
+#ifndef INK_ACTIONS_FIT_CANVAS_H
+#define INK_ACTIONS_FIT_CANVAS_H
+
+class InkscapeWindow;
+
+void add_actions_fit_canvas(InkscapeWindow* win);
+
+#endif // INK_ACTIONS_FIT_CANVAS_H
\ No newline at end of file
diff --git a/src/actions/actions-hide-lock.cpp b/src/actions/actions-hide-lock.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..3f4151acb73d448f66a83edecb7e4695c5205337
--- /dev/null
+++ b/src/actions/actions-hide-lock.cpp
@@ -0,0 +1,65 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/** \file
+ *
+ * Actions related to hide and lock
+ *
+ * Authors:
+ * Sushant A A
+ *
+ * Copyright (C) 2021 Authors
+ *
+ * Released under GNU GPL v2+, read the file 'COPYING' for more information.
+ */
+
+#include // Not ! To eventually allow a headless version!
+#include
+
+#include "actions-hide-lock.h"
+#include "inkscape-application.h"
+#include "inkscape-window.h"
+#include "desktop.h"
+#include "document-undo.h"
+#include "selection-chemistry.h"
+
+void
+hide_lock_unhide_all(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+ SPDocument *doc = dt->getDocument();
+ unhide_all(dt);
+ Inkscape::DocumentUndo::done(doc, _("Unhide all objects in the current layer"), nullptr);
+}
+
+void
+hide_lock_unlock_all(InkscapeWindow* win)
+{
+ SPDesktop* dt = win->get_desktop();
+ SPDocument *doc = dt->getDocument();
+ unlock_all(dt);
+ Inkscape::DocumentUndo::done(doc, _("Unlock all objects in the current layer"), nullptr);
+}
+
+std::vector> raw_data_hide_lock =
+{
+ // clang-format off
+ {"win.unhide-all", N_("Unhide All"), "Hide and Lock", N_("Unhide all objects in the current layer") },
+ {"win.unlock-all", N_("Unlock All"), "Hide and Lock", N_("Unlock all objects in the current layer") }
+ // clang-format on
+};
+
+void
+add_actions_hide_lock(InkscapeWindow* win)
+{
+ // clang-format off
+ win->add_action( "unhide-all", sigc::bind(sigc::ptr_fun(&hide_lock_unhide_all), win));
+ win->add_action( "unlock-all", sigc::bind(sigc::ptr_fun(&hide_lock_unlock_all), win));
+ // clang-format on
+
+
+ auto app = InkscapeApplication::instance();
+ if (!app) {
+ std::cerr << "add_actions_hide_lock: no app!" << std::endl;
+ return;
+ }
+ app->get_action_extra_data().add_data(raw_data_hide_lock);
+}
\ No newline at end of file
diff --git a/src/actions/actions-hide-lock.h b/src/actions/actions-hide-lock.h
new file mode 100644
index 0000000000000000000000000000000000000000..fc7fb3eb4f5471bc64ee7e3aef946e1410719afd
--- /dev/null
+++ b/src/actions/actions-hide-lock.h
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/** \file
+ *
+ * Authors:
+ * Sushant A A
+ *
+ * Copyright (C) 2021 Authors
+ *
+ * Released under GNU GPL v2+, read the file 'COPYING' for more information.
+ */
+
+#ifndef INK_ACTIONS_HIDE_LOCK_H
+#define INK_ACTIONS_HIDE_LOCK_H
+
+class InkscapeWindow;
+
+void add_actions_hide_lock(InkscapeWindow* win);
+
+#endif // INK_ACTIONS_HIDE_LOCK_H
\ No newline at end of file
diff --git a/src/actions/actions-hint-data.cpp b/src/actions/actions-hint-data.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..f4b242249ab5c358714dc3834c7f3298f4c5dd56
--- /dev/null
+++ b/src/actions/actions-hint-data.cpp
@@ -0,0 +1,49 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/** \file
+ *
+ * Command Palette input placehoder hint data
+ *
+ * Authors:
+ * Sushant A A
+ *
+ * Copyright (C) 2021 Authors
+ *
+ * Released under GNU GPL v2+, read the file 'COPYING' for more information.
+ */
+
+#include "actions-hint-data.h"
+#include
+
+std::vector
+InkActionHintData::get_actions()
+{
+ // To get all the Placeholder hints
+
+ std::vector action_names;
+ for (auto hint : data) {
+ action_names.emplace_back(hint.first);
+ }
+ return action_names;
+}
+
+Glib::ustring
+InkActionHintData::get_tooltip_hint_for_action(Glib::ustring const &action_name, bool translated)
+{
+ // Hint for a perticular Action
+
+ Glib::ustring value;
+ auto search = data.find(action_name);
+ if (search != data.end()) {
+ value = translated ? _(search->second.c_str()) : search->second;
+ }
+ return value;
+}
+
+void
+InkActionHintData::add_data(std::vector> &hint_data)
+{
+ for (auto hint : hint_data) {
+ // Action Name , Hint
+ data.emplace(hint[0], hint[1]);
+ }
+}
\ No newline at end of file
diff --git a/src/actions/actions-hint-data.h b/src/actions/actions-hint-data.h
new file mode 100644
index 0000000000000000000000000000000000000000..8961d394ba4b0493e9fbd554e6c6b4ae630536dd
--- /dev/null
+++ b/src/actions/actions-hint-data.h
@@ -0,0 +1,36 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/** \file
+ *
+ * Authors:
+ * Sushant A A
+ *
+ * Copyright (C) 2021 Authors
+ *
+ * Released under GNU GPL v2+, read the file 'COPYING' for more information.
+ */
+
+#ifndef INK_ACTIONS_HINT_DATA_H
+#define INK_ACTIONS_HINT_DATA_H
+
+#include
+#include
+#include