12#ifndef INKSCAPE_UI_TOOL_MULTI_PATH_MANIPULATOR_H
13#define INKSCAPE_UI_TOOL_MULTI_PATH_MANIPULATOR_H
16#include <sigc++/connection.h>
29class MultiPathManipulator;
45 void setItems(std::set<ShapeRecord>
const &);
87 using MapPair = std::pair<ShapeRecord, std::shared_ptr<PathManipulator>>;
88 using MapType = std::map<ShapeRecord, std::shared_ptr<PathManipulator>>;
92 for (MapType::iterator i =
_mmap.begin(); i !=
_mmap.end(); ) {
96 MapType::iterator next_i = i;
102 std::shared_ptr<PathManipulator> hold(i->second);
103 ((hold.get())->*method)();
107 template <
typename R,
typename A>
109 for (
auto & i :
_mmap) {
110 ((i.second.get())->*method)(a);
113 template <
typename R,
typename A>
115 for (
auto & i :
_mmap) {
116 ((i.second.get())->*method)(a);
119 template <
typename R,
typename A,
typename B>
121 for (
auto & i :
_mmap) {
122 ((i.second.get())->*method)(a, b);
127 void _done(gchar
const *reason,
bool alert_LPE =
true);
Store paths to a PathVector.
Two-dimensional point that doubles as a vector.
Manipulator that manages multiple path manipulators active at the same time.
void copySelectedPath(Geom::PathBuilder *builder)
void setItems(std::set< ShapeRecord > const &)
Change the set of items to edit.
void showOutline(bool show)
void showPathDirection(bool show)
void distributeNodes(Geom::Dim2 d)
std::map< ShapeRecord, std::shared_ptr< PathManipulator > > MapType
void invokeForAll(R(PathManipulator::*method)(A const &), A const &a)
void _done(gchar const *reason, bool alert_LPE=true)
Commits changes to XML and adds undo stack entry.
sigc::signal< void()> signal_coords_changed
Emitted whenever the coordinates shown in the status bar need updating.
void setLiveObjects(bool set)
Set live object update status.
void setNodeType(NodeType t)
std::pair< ShapeRecord, std::shared_ptr< PathManipulator > > MapPair
void invokeForAll(R(PathManipulator::*method)(A), A a)
void updateOutlineColors()
void move(Geom::Point const &delta)
void joinSegments()
Join selected endpoints to create segments.
void setLiveOutline(bool set)
Set live outline update status.
PathSharedData const & _path_data
void invokeForAll(R(PathManipulator::*method)())
void invokeForAll(R(PathManipulator::*method)(A, B), A a, B b)
void alignNodes(Geom::Dim2 d, AlignTargetNode target=AlignTargetNode::MID_NODE)
void cleanup()
Remove empty manipulators.
void insertNodesAtExtrema(ExtremumType extremum)
Colors::Color _getOutlineColor(ShapeRole role, SPObject *object)
Get an outline color based on the shape's role (normal, mask, LPE parameter, etc.).
bool _show_path_direction
void shiftSelection(int dir)
void insertNode(Geom::Point pt)
bool event(Inkscape::UI::Tools::ToolBase *tool, CanvasEvent const &event) override
Handle input event. Returns true if handled.
void _doneWithCleanup(gchar const *reason, bool alert_LPE=false)
Commits changes to XML, adds undo stack entry and removes empty manipulators.
void invertSelectionInSubpaths()
void scale(Geom::Point const ¢er, Geom::Point const &scale)
void showHandles(bool show)
void _commit(CommitEvent cps)
Commit changes to XML and add undo stack entry based on the action that was done.
void deleteNodes()
Delete nodes, use the preference to decide which mode to use.
~MultiPathManipulator() override
void setSegmentType(SegmentType t)
Manipulator that edits a single path using nodes with handles.
Tool component that edits something on the canvas using selectable control points.
ExtremumType
Type of extremum points to add in PathManipulator::insertNodeAtExtremum.
SPObject is an abstract base class of all of the document nodes at the SVG document level.
Dim2
2D axis enumeration (X or Y).
Manipulator - edits something on-canvas.
Fine-grained modifier tracker for event handling.
ShapeRole
Role of the shape in the drawing - affects outline display and color.
NodeType
Types of nodes supported in the node tool.
CommitEvent
This is used to provide sensible messages on the undo stack.
SegmentType
Types of segments supported in the node tool.
Helper class to stream background task notifications as a series of messages.
Node types and other small enums.
Path manipulator - a component that edits a single path on-canvas.
callback interface for SVG path data
Structures that store data needed for shape editing which are not contained directly in the XML node.
Abstract base class for events.
Glib::RefPtr< Gtk::Builder > builder