Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::UI::MultiPathManipulator Class Reference

Manipulator that manages multiple path manipulators active at the same time. More...

#include <multi-path-manipulator.h>

Inheritance diagram for Inkscape::UI::MultiPathManipulator:
Inkscape::UI::PointManipulator Inkscape::UI::Manipulator

Public Member Functions

 MultiPathManipulator (PathSharedData &data)
 
 ~MultiPathManipulator () override
 
bool event (Inkscape::UI::Tools::ToolBase *tool, CanvasEvent const &event) override
 Handle input event. Returns true if handled.
 
bool empty () const
 
size_t size () const
 
void setItems (std::set< ShapeRecord > const &)
 Change the set of items to edit.
 
void clear ()
 
void cleanup ()
 Remove empty manipulators.
 
void selectSubpaths ()
 
void shiftSelection (int dir)
 
void invertSelectionInSubpaths ()
 
void setNodeType (NodeType t)
 
void setSegmentType (SegmentType t)
 
void insertNodesAtExtrema (ExtremumType extremum)
 
void insertNodes ()
 
void insertNode (Geom::Point pt)
 
void alertLPE ()
 
void duplicateNodes ()
 
void copySelectedPath (Geom::PathBuilder *builder)
 
void joinNodes ()
 
void breakNodes ()
 
void deleteNodes ()
 Delete nodes, use the preference to decide which mode to use.
 
void deleteNodes (NodeDeleteMode mode)
 
void joinSegments ()
 Join selected endpoints to create segments.
 
void deleteSegments ()
 
void alignNodes (Geom::Dim2 d, AlignTargetNode target=AlignTargetNode::MID_NODE)
 
void distributeNodes (Geom::Dim2 d)
 
void reverseSubpaths ()
 
void move (Geom::Point const &delta)
 
void scale (Geom::Point const &center, Geom::Point const &scale)
 
void showOutline (bool show)
 
void showHandles (bool show)
 
void showPathDirection (bool show)
 
void setLiveOutline (bool set)
 Set live outline update status.
 
void setLiveObjects (bool set)
 Set live object update status.
 
void updateOutlineColors ()
 
void updateHandles ()
 
void updatePaths ()
 
- Public Member Functions inherited from Inkscape::UI::PointManipulator
 PointManipulator (SPDesktop *d, ControlPointSelection &sel)
 
- Public Member Functions inherited from Inkscape::UI::Manipulator
 Manipulator (SPDesktop *d)
 
virtual ~Manipulator ()=default
 

Public Attributes

sigc::signal< void()> signal_coords_changed
 Emitted whenever the coordinates shown in the status bar need updating.
 
PathSharedData const & _path_data
 
- Public Attributes inherited from Inkscape::UI::Manipulator
SPDesktop *const _desktop
 

Private Types

using MapPair = std::pair< ShapeRecord, std::shared_ptr< PathManipulator > >
 
using MapType = std::map< ShapeRecord, std::shared_ptr< PathManipulator > >
 

Private Member Functions

template<typename R >
void invokeForAll (R(PathManipulator::*method)())
 
template<typename R , typename A >
void invokeForAll (R(PathManipulator::*method)(A), A a)
 
template<typename R , typename A >
void invokeForAll (R(PathManipulator::*method)(A const &), A const &a)
 
template<typename R , typename A , typename B >
void invokeForAll (R(PathManipulator::*method)(A, B), A a, B b)
 
void _commit (CommitEvent cps)
 Commit changes to XML and add undo stack entry based on the action that was done.
 
void _done (gchar const *reason, bool alert_LPE=true)
 Commits changes to XML and adds undo stack entry.
 
void _doneWithCleanup (gchar const *reason, bool alert_LPE=false)
 Commits changes to XML, adds undo stack entry and removes empty manipulators.
 
Colors::Color _getOutlineColor (ShapeRole role, SPObject *object)
 Get an outline color based on the shape's role (normal, mask, LPE parameter, etc.).
 

Private Attributes

MapType _mmap
 
ModifierTracker _tracker
 
bool _show_handles
 
bool _show_outline
 
bool _show_path_direction
 
bool _live_outline
 
bool _live_objects
 

Friends

class PathManipulator
 

Additional Inherited Members

- Public Types inherited from Inkscape::UI::PointManipulator
enum  ExtremumType { EXTR_MIN_X , EXTR_MAX_X , EXTR_MIN_Y , EXTR_MAX_Y }
 Type of extremum points to add in PathManipulator::insertNodeAtExtremum. More...
 
- Protected Attributes inherited from Inkscape::UI::PointManipulator
ControlPointSelection_selection
 

Detailed Description

Manipulator that manages multiple path manipulators active at the same time.

Definition at line 35 of file multi-path-manipulator.h.

Member Typedef Documentation

◆ MapPair

using Inkscape::UI::MultiPathManipulator::MapPair = std::pair<ShapeRecord, std::shared_ptr<PathManipulator> >
private

Definition at line 87 of file multi-path-manipulator.h.

◆ MapType

using Inkscape::UI::MultiPathManipulator::MapType = std::map<ShapeRecord, std::shared_ptr<PathManipulator> >
private

Definition at line 88 of file multi-path-manipulator.h.

Constructor & Destructor Documentation

◆ MultiPathManipulator()

◆ ~MultiPathManipulator()

Inkscape::UI::MultiPathManipulator::~MultiPathManipulator ( )
override

Definition at line 128 of file multi-path-manipulator.cpp.

References _mmap.

Member Function Documentation

◆ _commit()

◆ _done()

◆ _doneWithCleanup()

void Inkscape::UI::MultiPathManipulator::_doneWithCleanup ( gchar const *  reason,
bool  alert_LPE = false 
)
private

Commits changes to XML, adds undo stack entry and removes empty manipulators.

Definition at line 881 of file multi-path-manipulator.cpp.

References _done(), and cleanup().

Referenced by Inkscape::UI::PathManipulator::_nodeClicked(), deleteNodes(), deleteSegments(), joinNodes(), and joinSegments().

◆ _getOutlineColor()

Colors::Color Inkscape::UI::MultiPathManipulator::_getOutlineColor ( ShapeRole  role,
SPObject object 
)
private

Get an outline color based on the shape's role (normal, mask, LPE parameter, etc.).

Definition at line 887 of file multi-path-manipulator.cpp.

References Inkscape::Preferences::get(), Inkscape::Preferences::getColor(), Inkscape::UI::SHAPE_ROLE_CLIPPING_PATH, Inkscape::UI::SHAPE_ROLE_LPE_PARAM, Inkscape::UI::SHAPE_ROLE_MASK, and Inkscape::UI::SHAPE_ROLE_NORMAL.

Referenced by setItems().

◆ alertLPE()

void Inkscape::UI::MultiPathManipulator::alertLPE ( )

References scale().

◆ alignNodes()

◆ breakNodes()

void Inkscape::UI::MultiPathManipulator::breakNodes ( )

◆ cleanup()

void Inkscape::UI::MultiPathManipulator::cleanup ( )

Remove empty manipulators.

Definition at line 134 of file multi-path-manipulator.cpp.

References _mmap.

Referenced by _doneWithCleanup().

◆ clear()

void Inkscape::UI::MultiPathManipulator::clear ( )
inline

Definition at line 46 of file multi-path-manipulator.h.

References _mmap.

◆ copySelectedPath()

◆ deleteNodes() [1/2]

void Inkscape::UI::MultiPathManipulator::deleteNodes ( )

Delete nodes, use the preference to decide which mode to use.

Definition at line 436 of file multi-path-manipulator.cpp.

References deleteNodes(), and Inkscape::Preferences::get().

Referenced by deleteNodes(), Inkscape::UI::Tools::NodeTool::deleteSelected(), and event().

◆ deleteNodes() [2/2]

◆ deleteSegments()

◆ distributeNodes()

◆ duplicateNodes()

void Inkscape::UI::MultiPathManipulator::duplicateNodes ( )

◆ empty()

bool Inkscape::UI::MultiPathManipulator::empty ( ) const
inline

◆ event()

bool Inkscape::UI::MultiPathManipulator::event ( Inkscape::UI::Tools::ToolBase tool,
CanvasEvent const &  event 
)
overridevirtual

◆ insertNode()

void Inkscape::UI::MultiPathManipulator::insertNode ( Geom::Point  pt)

◆ insertNodes()

void Inkscape::UI::MultiPathManipulator::insertNodes ( )

◆ insertNodesAtExtrema()

◆ invertSelectionInSubpaths()

void Inkscape::UI::MultiPathManipulator::invertSelectionInSubpaths ( )

◆ invokeForAll() [1/4]

◆ invokeForAll() [2/4]

template<typename R , typename A >
void Inkscape::UI::MultiPathManipulator::invokeForAll ( R(PathManipulator::*)(A const &)  method,
A const &  a 
)
inlineprivate

Definition at line 114 of file multi-path-manipulator.h.

References _mmap.

◆ invokeForAll() [3/4]

template<typename R , typename A >
void Inkscape::UI::MultiPathManipulator::invokeForAll ( R(PathManipulator::*)(A)  method,
a 
)
inlineprivate

Definition at line 108 of file multi-path-manipulator.h.

References _mmap.

◆ invokeForAll() [4/4]

template<typename R , typename A , typename B >
void Inkscape::UI::MultiPathManipulator::invokeForAll ( R(PathManipulator::*)(A, B)  method,
a,
b 
)
inlineprivate

Definition at line 120 of file multi-path-manipulator.h.

References _mmap.

◆ joinNodes()

◆ joinSegments()

◆ move()

◆ reverseSubpaths()

◆ scale()

void Inkscape::UI::MultiPathManipulator::scale ( Geom::Point const &  center,
Geom::Point const &  scale 
)

◆ selectSubpaths()

◆ setItems()

void Inkscape::UI::MultiPathManipulator::setItems ( std::set< ShapeRecord > const &  s)

◆ setLiveObjects()

void Inkscape::UI::MultiPathManipulator::setLiveObjects ( bool  set)

Set live object update status.

When set to true, objects will be updated continuously when dragging or transforming nodes. Otherwise they will only update when changes are committed to XML.

Definition at line 572 of file multi-path-manipulator.cpp.

References _live_objects, invokeForAll(), set, and Inkscape::UI::PathManipulator::setLiveObjects().

Referenced by Inkscape::UI::Tools::NodeTool::set().

◆ setLiveOutline()

void Inkscape::UI::MultiPathManipulator::setLiveOutline ( bool  set)

Set live outline update status.

When set to true, outline will be updated continuously when dragging or transforming nodes. Otherwise it will only update when changes are committed to XML.

Definition at line 560 of file multi-path-manipulator.cpp.

References _live_outline, invokeForAll(), set, and Inkscape::UI::PathManipulator::setLiveOutline().

Referenced by Inkscape::UI::Tools::NodeTool::set().

◆ setNodeType()

void Inkscape::UI::MultiPathManipulator::setNodeType ( NodeType  t)

◆ setSegmentType()

◆ shiftSelection()

◆ showHandles()

void Inkscape::UI::MultiPathManipulator::showHandles ( bool  show)

◆ showOutline()

void Inkscape::UI::MultiPathManipulator::showOutline ( bool  show)

◆ showPathDirection()

void Inkscape::UI::MultiPathManipulator::showPathDirection ( bool  show)

◆ size()

size_t Inkscape::UI::MultiPathManipulator::size ( ) const
inline

Definition at line 44 of file multi-path-manipulator.h.

References _mmap.

◆ updateHandles()

void Inkscape::UI::MultiPathManipulator::updateHandles ( )

◆ updateOutlineColors()

void Inkscape::UI::MultiPathManipulator::updateOutlineColors ( )

Definition at line 578 of file multi-path-manipulator.cpp.

◆ updatePaths()

void Inkscape::UI::MultiPathManipulator::updatePaths ( )

Friends And Related Symbol Documentation

◆ PathManipulator

friend class PathManipulator
friend

Definition at line 144 of file multi-path-manipulator.h.

Referenced by setItems().

Member Data Documentation

◆ _live_objects

bool Inkscape::UI::MultiPathManipulator::_live_objects
private

Definition at line 142 of file multi-path-manipulator.h.

Referenced by setItems(), and setLiveObjects().

◆ _live_outline

bool Inkscape::UI::MultiPathManipulator::_live_outline
private

Definition at line 141 of file multi-path-manipulator.h.

Referenced by setItems(), and setLiveOutline().

◆ _mmap

MapType Inkscape::UI::MultiPathManipulator::_mmap
private

◆ _path_data

◆ _show_handles

bool Inkscape::UI::MultiPathManipulator::_show_handles
private

Definition at line 138 of file multi-path-manipulator.h.

Referenced by setItems(), and showHandles().

◆ _show_outline

bool Inkscape::UI::MultiPathManipulator::_show_outline
private

Definition at line 139 of file multi-path-manipulator.h.

Referenced by setItems(), and showOutline().

◆ _show_path_direction

bool Inkscape::UI::MultiPathManipulator::_show_path_direction
private

Definition at line 140 of file multi-path-manipulator.h.

Referenced by setItems(), and showPathDirection().

◆ _tracker

ModifierTracker Inkscape::UI::MultiPathManipulator::_tracker
private

Definition at line 137 of file multi-path-manipulator.h.

Referenced by event().

◆ signal_coords_changed

sigc::signal<void ()> Inkscape::UI::MultiPathManipulator::signal_coords_changed

Emitted whenever the coordinates shown in the status bar need updating.

Definition at line 84 of file multi-path-manipulator.h.

Referenced by _commit(), _done(), MultiPathManipulator(), and Inkscape::UI::Tools::NodeTool::NodeTool().


The documentation for this class was generated from the following files: