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

#include <object-set.h>

Inheritance diagram for Inkscape::ObjectSet:
Inkscape::Selection

Public Types

enum  CompareSize { HORIZONTAL , VERTICAL , AREA }
 
typedef decltype(MultiIndexContainer().get< random_access >()|boost::adaptors::filtered(is_item())|boost::adaptors::transformed(object_to_item())) SPItemRange
 
typedef decltype(MultiIndexContainer().get< random_access >()|boost::adaptors::filtered(is_group())|boost::adaptors::transformed(object_to_group())) SPGroupRange
 
typedef decltype(MultiIndexContainer().get< random_access >()|boost::adaptors::filtered(is_item())|boost::adaptors::transformed(object_to_node())) XMLNodeRange
 

Public Member Functions

 ObjectSet (SPDesktop *desktop)
 
 ObjectSet (SPDocument *doc)
 
 ObjectSet ()
 
virtual ~ObjectSet ()
 
 ObjectSet (ObjectSet const &)=delete
 
ObjectSetoperator= (ObjectSet const &)=delete
 
void setDocument (SPDocument *doc)
 
bool add (SPObject *object, bool nosignal=false)
 Add an SPObject to the set of selected objects.
 
void add (XML::Node *repr)
 Add an XML node's SPObject to the set of selected objects.
 
template<typename InputIterator >
void add (InputIterator from, InputIterator to)
 Add items from an STL iterator range to the selection.
 
bool remove (SPObject *object)
 Removes an item from the set of selected objects.
 
bool includes (SPObject *object, bool anyAncestor=false)
 Returns true if the given object is selected.
 
bool includes (Inkscape::XML::Node *node, bool anyAncestor=false)
 
SPObjectincludesAncestor (SPObject *object)
 Returns ancestor if the given object has ancestor selected.
 
void set (SPObject *object, bool persist_selection_context=false)
 Set the selection to a single specific object.
 
void set (XML::Node *repr)
 
void clear ()
 Unselects all selected objects.
 
int size ()
 Returns size of the selection.
 
bool isEmpty ()
 Returns true if no items are selected.
 
void toggle (SPObject *obj)
 Removes an item if selected, adds otherwise.
 
SPObjectsingle ()
 Returns a single selected object.
 
SPItemsingleItem ()
 Returns a single selected item.
 
SPItemfirstItem () const
 Returns the first selected item, returns nullptr if no items selected.
 
SPItemlastItem () const
 Returns the last selected item, returns nullptr if no items selected.
 
SPItemsmallestItem (CompareSize compare)
 Returns the smallest item from this selection.
 
SPItemlargestItem (CompareSize compare)
 Returns the largest item from this selection.
 
SPObjectRange objects ()
 Returns the list of selected objects.
 
SPItemRange items ()
 Returns a range of selected SPItems.
 
std::vector< SPItem * > items_vector ()
 
SPGroupRange groups ()
 Returns a range of selected groups.
 
XMLNodeRange xmlNodes ()
 Returns a range of the xml nodes of all selected objects.
 
XML::NodesingleRepr ()
 Returns a single selected object's xml node.
 
XML::NodetopRepr () const
 The top-most item, or NULL if the selection is empty.
 
template<class T >
boost::enable_if< boost::is_base_of< SPObject, T >, void >::type setList (const std::vector< T * > &objs)
 Selects exactly the specified objects.
 
void setReprList (std::vector< XML::Node * > const &list)
 Selects the objects with the same IDs as those in list.
 
void enforceIds ()
 Assign IDs to selected objects that don't have an ID attribute Checks if the object's id attribute is NULL.
 
template<class T >
boost::enable_if< boost::is_base_of< SPObject, T >, void >::type addList (const std::vector< T * > &objs)
 Adds the specified objects to selection, without deselecting first.
 
template<class T >
boost::enable_if< boost::is_base_of< SPObject, T >, void >::type removeList (const std::vector< T * > &objs)
 Remove the specified objects from selection.
 
Geom::OptRect bounds (SPItem::BBoxType type) const
 Returns the bounding rectangle of the selection.
 
Geom::OptRect visualBounds () const
 
Geom::OptRect geometricBounds () const
 
Geom::OptRect strokedBounds () const
 
Geom::OptRect preferredBounds () const
 Returns either the visual or geometric bounding rectangle of the selection, based on the preferences specified for the selector tool.
 
Geom::OptRect documentBounds (SPItem::BBoxType type) const
 
Geom::OptRect documentPreferredBounds () const
 Returns either the visual or geometric bounding rectangle of selection in document coordinates based on preferences specified for the selector tool.
 
std::optional< Geom::Pointcenter () const
 Returns the rotation/skew center of the selection.
 
std::list< Persp3D * > const perspList ()
 Returns a list of all perspectives which have a 3D box in the current selection.
 
std::list< SPBox3D * > const box3DList (Persp3D *persp=nullptr)
 Returns a list of all 3D boxes in the current selection which are associated to persp.
 
SPDesktopdesktop ()
 Returns the desktop the selection is bound to.
 
SPDocumentdocument ()
 Returns the document the selection is bound to.
 
void deleteItems (bool skip_undo=false)
 
void duplicate (bool suppressDone=false, bool duplicateLayer=false)
 
void clone (bool skip_undo=false)
 
bool unlink (const bool skip_undo=false, const bool silent=false)
 Unlink all directly selected clones.
 
bool unlinkRecursive (const bool skip_undo=false, const bool force=false, const bool silent=false)
 Recursively unlink any clones present in the current selection, including clones which are used to clip other objects, groups of clones etc.
 
void removeLPESRecursive (bool keep_paths)
 
void relink ()
 
void cloneOriginal ()
 
void cloneOriginalPathLPE (bool allow_transforms=false, bool sync=false, bool skip_undo=false)
 This applies the Fill Between Many LPE, and has it refer to the selection.
 
Inkscape::XML::Nodegroup (bool is_anchor=false)
 
void popFromGroup ()
 
void ungroup (bool skip_undo=false)
 
void ungroup_all (bool skip_undo=false)
 Keep ungrouping until there are no more groups.
 
void stackUp (bool skip_undo=false)
 
void raise (bool skip_undo=false)
 
void raiseToTop (bool skip_undo=false)
 
void stackDown (bool skip_undo=false)
 
void lower (bool skip_undo=false)
 
void lowerToBottom (bool skip_undo=false)
 
void toNextLayer (bool skip_undo=false)
 
void toPrevLayer (bool skip_undo=false)
 
void toLayer (SPObject *layer)
 Move selection to group moveto, after the last child of moveto (if it has any children).
 
void toLayer (SPObject *layer, Inkscape::XML::Node *after)
 Move selection to group moveto, after child after.
 
void copy ()
 
void cut ()
 
void pasteStyle ()
 
void pasteSize (bool apply_x, bool apply_y)
 
void pasteSizeSeparately (bool apply_x, bool apply_y)
 
void pastePathEffect ()
 
void combine (bool skip_undo=false, bool silent=false)
 
void breakApart (bool skip_undo=false, bool overlapping=true, bool silent=false)
 
void toCurves (bool skip_undo=false, bool clonesjustunlink=false)
 
void toLPEItems ()
 Converts the selected items to LPEItems if they are not already so; e.g.
 
void pathReverse ()
 
bool strokesToPaths (bool legacy=false, bool skip_undo=false)
 
bool simplifyPaths (bool skip_undo=false)
 
void pathUnion (bool skip_undo=false, bool silent=false)
 
void pathIntersect (bool skip_undo=false, bool silent=false)
 
void pathDiff (bool skip_undo=false, bool silent=false)
 
void pathSymDiff (bool skip_undo=false, bool silent=false)
 
void pathCut (bool skip_undo=false, bool silent=false)
 
void pathSlice (bool skip_undo=false, bool silent=false)
 
void toMarker (bool apply=true)
 
void toGuides ()
 
void toSymbol ()
 
void unSymbol ()
 
void tile (bool apply=true)
 
void untile ()
 
void createBitmapCopy ()
 
void setMask (bool apply_clip_path, bool apply_to_layer, bool remove_original)
 Creates a mask or clipPath from selection.
 
void editMask (bool clip)
 
void unsetMask (const bool apply_clip_path, const bool delete_helper_group, bool remove_original)
 
void setClipGroup ()
 
void chameleonFill ()
 
void removeLPE ()
 
void removeFilter ()
 
void reapplyAffine ()
 Reapply the same transform again.
 
void clearLastAffine ()
 
void applyAffine (Geom::Affine const &affine, bool set_i2d=true, bool compensate=true, bool adjust_transf_center=true)
 Apply matrix to the selection.
 
void removePathTransforms ()
 
void removeTransform ()
 
void setScaleAbsolute (double, double, double, double)
 
void scaleRelative (const Geom::Point &, const Geom::Scale &)
 
void rotateRelative (const Geom::Point &, double)
 
void skewRelative (const Geom::Point &, double, double)
 
void moveRelative (const Geom::Point &move, bool compensate=true)
 
void moveRelative (double dx, double dy)
 
void move (double dx, double dy)
 
void moveScreen (double dx, double dy)
 
void move (double dx, double dy, bool rotated)
 
void move (double dx, double dy, bool rotated, bool screen)
 
void moveScreen (double dx, double dy, bool rotated)
 
bool fitCanvas (bool with_margins, bool skip_undo=false)
 
void swapFillStroke ()
 
void fillBetweenMany ()
 Creates a linked fill between all the objects in the current selection using the "Fill Between Many" LPE.
 
SiblingState getSiblingState (SPItem *item)
 Associates the given SPItem with a SiblingState enum Needed for handling special cases while transforming objects Inserts the [SPItem, SiblingState] pair to ObjectSet._sibling_state map.
 
void insertSiblingState (SPObject *object, SiblingState state)
 
void clearSiblingStates ()
 

Protected Member Functions

virtual void _connectSignals (SPObject *object)
 
virtual void _releaseSignals (SPObject *object)
 
virtual void _emitChanged (bool persist_selection_context=false)
 
void _add (SPObject *object)
 
void _clear ()
 
void _remove (SPObject *object)
 
bool _anyAncestorIsInSet (SPObject *object)
 
void _removeDescendantsFromSet (SPObject *object)
 
void _removeAncestorsFromSet (SPObject *object)
 
SPItem_sizeistItem (bool sml, CompareSize compare)
 
SPObject_getMutualAncestor (SPObject *object)
 
virtual void _add3DBoxesRecursively (SPObject *obj)
 
virtual void _remove3DBoxesRecursively (SPObject *obj)
 

Protected Attributes

MultiIndexContainer _container
 
SPDesktop_desktop = nullptr
 
SPDocument_document = nullptr
 
std::list< SPBox3D * > _3dboxes
 
std::unordered_map< SPObject *, sigc::connection > _releaseConnections
 

Private Member Functions

void _pathBoolOp (BooleanOp bop, char const *icon_name, char const *description, bool skip_undo, bool silent)
 
void _pathBoolOp (BooleanOp bop)
 
void _disconnect (SPObject *object)
 

Private Attributes

std::map< SPObject *, SiblingState_sibling_state
 
Geom::Affine _last_affine
 

Detailed Description

Definition at line 119 of file object-set.h.

Member Typedef Documentation

◆ SPGroupRange

typedef decltype(MultiIndexContainer().get<random_access>() | boost::adaptors::filtered(is_group()) | boost::adaptors::transformed(object_to_group())) Inkscape::ObjectSet::SPGroupRange

Definition at line 123 of file object-set.h.

◆ SPItemRange

typedef decltype(MultiIndexContainer().get<random_access>() | boost::adaptors::filtered(is_item()) | boost::adaptors::transformed(object_to_item())) Inkscape::ObjectSet::SPItemRange

Definition at line 122 of file object-set.h.

◆ XMLNodeRange

typedef decltype(MultiIndexContainer().get<random_access>() | boost::adaptors::filtered(is_item()) | boost::adaptors::transformed(object_to_node())) Inkscape::ObjectSet::XMLNodeRange

Definition at line 124 of file object-set.h.

Member Enumeration Documentation

◆ CompareSize

Enumerator
HORIZONTAL 
VERTICAL 
AREA 

Definition at line 121 of file object-set.h.

Constructor & Destructor Documentation

◆ ObjectSet() [1/4]

Inkscape::ObjectSet::ObjectSet ( SPDesktop desktop)

Definition at line 29 of file object-set.cpp.

References _document, desktop(), and SPDesktop::getDocument().

◆ ObjectSet() [2/4]

Inkscape::ObjectSet::ObjectSet ( SPDocument doc)
inline

Definition at line 127 of file object-set.h.

◆ ObjectSet() [3/4]

Inkscape::ObjectSet::ObjectSet ( )
inline

Definition at line 128 of file object-set.h.

Referenced by relink().

◆ ~ObjectSet()

Inkscape::ObjectSet::~ObjectSet ( )
virtual

Definition at line 216 of file object-set.cpp.

References _clear().

◆ ObjectSet() [4/4]

Inkscape::ObjectSet::ObjectSet ( ObjectSet const &  )
delete

Member Function Documentation

◆ _add()

void Inkscape::ObjectSet::_add ( SPObject object)
protected

◆ _add3DBoxesRecursively()

void Inkscape::ObjectSet::_add3DBoxesRecursively ( SPObject obj)
protectedvirtual

Definition at line 487 of file object-set.cpp.

References _3dboxes, and SPBox3D::extract_boxes().

Referenced by _add().

◆ _anyAncestorIsInSet()

bool Inkscape::ObjectSet::_anyAncestorIsInSet ( SPObject object)
protected

Definition at line 132 of file object-set.cpp.

References includes(), and SPObject::parent.

Referenced by add(), includes(), and remove().

◆ _clear()

void Inkscape::ObjectSet::_clear ( )
protected

Definition at line 175 of file object-set.cpp.

References _container, and _disconnect().

Referenced by clear(), set(), setList(), and ~ObjectSet().

◆ _connectSignals()

virtual void Inkscape::ObjectSet::_connectSignals ( SPObject object)
inlineprotectedvirtual

Reimplemented in Inkscape::Selection.

Definition at line 515 of file object-set.h.

Referenced by _add().

◆ _disconnect()

void Inkscape::ObjectSet::_disconnect ( SPObject object)
private

Definition at line 156 of file object-set.cpp.

References _releaseConnections, _releaseSignals(), and _remove3DBoxesRecursively().

Referenced by _clear(), and _remove().

◆ _emitChanged()

void Inkscape::ObjectSet::_emitChanged ( bool  persist_selection_context = false)
protectedvirtual

Reimplemented in Inkscape::Selection.

Definition at line 89 of file object-set.cpp.

References _sibling_state.

Referenced by Inkscape::Selection::_emitChanged(), add(), add(), addList(), clear(), remove(), removeList(), set(), and setReprList().

◆ _getMutualAncestor()

SPObject * Inkscape::ObjectSet::_getMutualAncestor ( SPObject object)
protected

Definition at line 181 of file object-set.cpp.

References SPObject::parent.

◆ _pathBoolOp() [1/2]

void Inkscape::ObjectSet::_pathBoolOp ( BooleanOp  bop)
private

Definition at line 354 of file path-boolop.cpp.

References Inkscape::XML::Node::attribute(), bool_op_cut, bool_op_diff, bool_op_inters, bool_op_slice, bool_op_symdiff, bool_op_union, Shape::Booleen(), bs, child, Path::ConvertPositionsToMoveTo(), Shape::ConvertToForme(), Shape::ConvertToFormeNested(), Shape::ConvertToShape(), Path::Copy(), Inkscape::copy_object_properties(), Inkscape::XML::Document::createElement(), css, curve_for_item(), data, Path::descr_cmd, distribute_intersection_times(), SPObject::document, Shape::ebData, end, fill_justDont, fill_nonZero, fill_oddEven, SPStyle::fill_rule, find_containing_child(), FIRST, Inkscape::XML::Node::firstChild(), SPObject::getAttribute(), Shape::getEdge(), SPDocument::getObjectById(), Shape::getPoint(), SPObject::getRepr(), Shape::hasBackData(), SPItem::i2doc_affine(), Shape::dg_point::incidentEdge, Geom::Affine::inverse(), is_descendant_of(), is_line(), item, items, lowest_common_ancestor(), Shape::NextAt(), Shape::numberOfEdges(), Shape::numberOfPoints(), parent, Inkscape::XML::Node::parent(), Path::cut_position::piece, Inkscape::XML::Node::position(), RELATIVE_THRESHOLD, Inkscape::GC::release(), Geom::PathVector::resize(), result, set, Inkscape::XML::Node::setAttribute(), Inkscape::XML::Node::setAttributeOrRemoveIfEmpty(), sort_and_clean_intersection_times(), sp_repr_compare_position_bool(), sp_repr_css_attr_new(), sp_repr_css_attr_unref(), sp_repr_css_change(), sp_repr_css_set_property(), SP_WIND_RULE_EVENODD, Shape::dg_arete::st, SPObject::style, Shape::SubEdge(), Path::SubPaths(), Path::SubPathsWithNesting(), Path::svg_dump_path(), Path::cut_position::t, Shape::dg_point::totalDegree(), and Path::Transform().

◆ _pathBoolOp() [2/2]

void Inkscape::ObjectSet::_pathBoolOp ( BooleanOp  bop,
char const *  icon_name,
char const *  description,
bool  skip_undo,
bool  silent 
)
private

◆ _releaseSignals()

virtual void Inkscape::ObjectSet::_releaseSignals ( SPObject object)
inlineprotectedvirtual

Reimplemented in Inkscape::Selection.

Definition at line 516 of file object-set.h.

Referenced by _disconnect().

◆ _remove()

void Inkscape::ObjectSet::_remove ( SPObject object)
protected

Definition at line 163 of file object-set.cpp.

References _container, and _disconnect().

Referenced by _removeAncestorsFromSet(), Inkscape::Selection::add(), and remove().

◆ _remove3DBoxesRecursively()

void Inkscape::ObjectSet::_remove3DBoxesRecursively ( SPObject obj)
protectedvirtual

Definition at line 495 of file object-set.cpp.

References _3dboxes, and SPBox3D::extract_boxes().

Referenced by _disconnect().

◆ _removeAncestorsFromSet()

void Inkscape::ObjectSet::_removeAncestorsFromSet ( SPObject object)
protected

Definition at line 200 of file object-set.cpp.

References _add(), _remove(), child, SPObject::children, includes(), and SPObject::parent.

Referenced by remove().

◆ _removeDescendantsFromSet()

void Inkscape::ObjectSet::_removeDescendantsFromSet ( SPObject object)
protected

Definition at line 144 of file object-set.cpp.

Referenced by add().

◆ _sizeistItem()

◆ add() [1/3]

template<typename InputIterator >
void Inkscape::ObjectSet::add ( InputIterator  from,
InputIterator  to 
)
inline

Add items from an STL iterator range to the selection.

Parameters
fromthe begin iterator
tothe end iterator

Definition at line 159 of file object-set.h.

References _add(), and _emitChanged().

◆ add() [2/3]

◆ add() [3/3]

void Inkscape::ObjectSet::add ( XML::Node repr)

Add an XML node's SPObject to the set of selected objects.

Parameters
thexml node of the item to add

Definition at line 59 of file object-set.cpp.

References add(), Inkscape::XML::Node::attribute(), document(), and SPDocument::getObjectByRepr().

◆ addList()

template<class T >
boost::enable_if< boost::is_base_of< SPObject, T >, void >::type Inkscape::ObjectSet::addList ( const std::vector< T * > &  objs)
inline

Adds the specified objects to selection, without deselecting first.

Parameters
objsthe objects to select

Definition at line 326 of file object-set.h.

References _emitChanged(), add(), and includes().

Referenced by Inkscape::UI::Tools::NodeTool::root_handler(), setList(), setMask(), toCurves(), toLPEItems(), and unsetMask().

◆ applyAffine()

void ObjectSet::applyAffine ( Geom::Affine const &  affine,
bool  set_i2d = true,
bool  compensate = true,
bool  adjust_transf_center = true 
)

Apply matrix to the selection.

set_i2d is normally true, which means objects are in the original transform, synced with their reprs, and need to jump to the new transform in one go. A value of set_i2d==false is only used by seltrans when it's dragging objects live (not outlines); in that case, items are already in the new position, but the repr is in the old, and this function then simply updates the repr from item->transform.

Definition at line 1625 of file selection-chemistry.cpp.

References _last_affine, Persp3D::apply_affine_transformation(), box3DList(), Inkscape::UI::Tools::cc_item_is_connector(), SPObject::children, Inkscape::LivePathEffect::CLONE_ORIGINAL, Persp3D::create_xml_element(), desktop(), SPObject::document, SPItem::doWriteTransform(), Inkscape::MessageStack::flash(), Inkscape::Preferences::get(), SPItem::getCenter(), Inkscape::Preferences::getInt(), getSiblingState(), Persp3D::has_all_boxes_in_selection(), SPItem::i2dt_affine(), includes(), Geom::Affine::inverse(), SPItem::isCenterSet(), isEmpty(), Geom::Affine::isIdentity(), Geom::Affine::isTranslation(), item, items(), SPDesktop::messageStack(), move(), parent, SPObject::parent, perspList(), SPObject::readAttr(), result, SPItem::set_i2d_affine(), SPItem::setCenter(), SIBLING_CLONE_ORIGINAL, SIBLING_OFFSET_SOURCE, SIBLING_TEXT_FLOW_FRAME, SIBLING_TEXT_PATH, SIBLING_TEXT_SHAPE_INSIDE, SP_CLONE_COMPENSATION_PARALLEL, SP_CLONE_COMPENSATION_UNMOVED, sp_conn_end_detach(), TRANSFORM, SPItem::transform, SPObject::updateRepr(), and Inkscape::WARNING_MESSAGE.

Referenced by Inkscape::UI::Dialog::Transformation::applyPageScale(), Inkscape::UI::Dialog::Transformation::applyPageTransform(), file_import(), moveRelative(), moveRelative(), reapplyAffine(), rotateRelative(), scaleRelative(), setScaleAbsolute(), skewRelative(), sp_import_document(), and Inkscape::SelTrans::ungrab().

◆ bounds()

Geom::OptRect Inkscape::ObjectSet::bounds ( SPItem::BBoxType  type) const

◆ box3DList()

std::list< SPBox3D * > const Inkscape::ObjectSet::box3DList ( Persp3D persp = nullptr)

Returns a list of all 3D boxes in the current selection which are associated to persp.

If pers is NULL, return all selected boxes.

Definition at line 473 of file object-set.cpp.

References _3dboxes.

Referenced by applyAffine().

◆ breakApart()

◆ center()

◆ chameleonFill()

◆ clear()

void Inkscape::ObjectSet::clear ( )

Unselects all selected objects.

Definition at line 123 of file object-set.cpp.

References _clear(), and _emitChanged().

Referenced by Inkscape::UI::Dialog::LayerPropertiesDialog::_doCreate(), Inkscape::UI::Tools::EraserTool::_doWork(), Inkscape::UI::Tools::PenTool::_handleButtonPress(), Inkscape::UI::Tools::PencilTool::_handleButtonPress(), Inkscape::UI::Tools::PencilTool::_handleButtonRelease(), Inkscape::UI::Dialog::StyleDialog::_onLinkObj(), Inkscape::UI::Tools::ArcTool::cancel(), Inkscape::UI::Tools::Box3dTool::cancel(), Inkscape::UI::Tools::RectTool::cancel(), Inkscape::UI::Tools::SpiralTool::cancel(), Inkscape::UI::Tools::StarTool::cancel(), clone(), cloneOriginal(), combine(), createBitmapCopy(), deleteItems(), duplicate(), Inkscape::Extension::Internal::BlurEdge::effect(), fillBetweenMany(), group(), Inkscape::UI::Tools::LpeTool::item_handler(), layer_delete(), layer_new_above(), Inkscape::LivePathEffect::OriginalPathParam::on_select_original_button_click(), Inkscape::LivePathEffect::OriginalSatelliteParam::on_select_original_button_click(), Inkscape::UI::Dialog::Find::onAction(), Inkscape::UI::Tools::PagesTool::PagesTool(), SPDesktop::reconstruction_start(), Inkscape::Application::remove_desktop(), Inkscape::UI::Tools::DropperTool::root_handler(), Inkscape::UI::Tools::TextTool::root_handler(), select_clear(), Inkscape::SelectionHelper::selectNone(), setClipGroup(), Inkscape::LayerManager::setCurrentLayer(), setMask(), Inkscape::UI::Tools::MeasureTool::setMeasureItem(), setReprList(), Inkscape::Selection::setState(), sp_edit_clear_all(), sp_select_same_fill_stroke_style(), sp_select_same_object_type(), sp_selected_path_create_offset_object(), Inkscape::UI::Tools::spdc_check_for_and_apply_waiting_LPE(), Inkscape::SelTrans::stamp(), text_put_on_path(), text_unflow(), tile(), toGuides(), toLayer(), toLPEItems(), toNextLayer(), toPrevLayer(), unlink(), and unsetMask().

◆ clearLastAffine()

void ObjectSet::clearLastAffine ( )

Definition at line 1613 of file selection-chemistry.cpp.

References _last_affine, and Geom::identity().

◆ clearSiblingStates()

void ObjectSet::clearSiblingStates ( )

Definition at line 4218 of file selection-chemistry.cpp.

References _sibling_state.

◆ clone()

◆ cloneOriginal()

◆ cloneOriginalPathLPE()

◆ combine()

◆ copy()

◆ createBitmapCopy()

◆ cut()

◆ deleteItems()

◆ desktop()

SPDesktop * Inkscape::ObjectSet::desktop ( )
inline

Returns the desktop the selection is bound to.

Returns
the desktop the selection is bound to, or NULL if in console mode

Definition at line 390 of file object-set.h.

References _desktop.

Referenced by applyAffine(), Inkscape::UI::Dialog::Transformation::applyPageMove(), Inkscape::UI::Dialog::Transformation::applyPageRotate(), Inkscape::UI::Dialog::Transformation::applyPageScale(), Inkscape::UI::Dialog::Transformation::applyPageSkew(), Inkscape::UI::Dialog::Transformation::applyPageTransform(), Inkscape::BooleanBuilder::BooleanBuilder(), breakApart(), clone(), cloneOriginal(), cloneOriginalPathLPE(), combine(), createBitmapCopy(), cut(), deleteItems(), duplicate(), fillBetweenMany(), fitCanvas(), Inkscape::PageManager::fitToSelection(), Inkscape::Selection::getState(), group(), lower(), lowerToBottom(), move(), moveScreen(), moveScreen(), ObjectSet(), pathReverse(), popFromGroup(), raise(), raiseToTop(), Inkscape::BooleanBuilder::redraw_items(), relink(), removeFilter(), removeLPE(), Inkscape::Selection::rotateAnchored(), Inkscape::UI::Toolbar::LPEToolbar::sel_changed(), Inkscape::UI::Toolbar::LPEToolbar::sel_modified(), select_object_link(), setClipGroup(), setMask(), Inkscape::Selection::setState(), simplifyPaths(), sp_edit_clear_all(), Inkscape::UI::Tools::sp_tweak_dilate_recursive(), stackDown(), stackUp(), strokesToPaths(), swapFillStroke(), tile(), toCurves(), toGuides(), toLayer(), toMarker(), toNextLayer(), toPrevLayer(), toSymbol(), ungroup(), unlink(), unlinkRecursive(), unsetMask(), untile(), and Inkscape::SelectionDescriber::updateMessage().

◆ document()

◆ documentBounds()

Geom::OptRect Inkscape::ObjectSet::documentBounds ( SPItem::BBoxType  type) const

◆ documentPreferredBounds()

Geom::OptRect Inkscape::ObjectSet::documentPreferredBounds ( ) const

Returns either the visual or geometric bounding rectangle of selection in document coordinates based on preferences specified for the selector tool.

Definition at line 436 of file object-set.cpp.

References documentBounds(), SPItem::GEOMETRIC_BBOX, Inkscape::Preferences::get(), and SPItem::VISUAL_BBOX.

Referenced by Inkscape::PageManager::fitToSelection().

◆ duplicate()

◆ editMask()

void ObjectSet::editMask ( bool  clip)

Definition at line 2501 of file selection-chemistry.cpp.

◆ enforceIds()

void Inkscape::ObjectSet::enforceIds ( )

Assign IDs to selected objects that don't have an ID attribute Checks if the object's id attribute is NULL.

If it is, assign it a unique ID

Definition at line 352 of file object-set.cpp.

References _desktop, document(), SPObject::generate_unique_id(), SPDesktop::getDocument(), SPObject::getId(), item, items(), SPObject::setAttribute(), and SPDocument::setModifiedSinceSave().

Referenced by clone(), and Inkscape::Extension::ExecutionEnv::ExecutionEnv().

◆ fillBetweenMany()

void ObjectSet::fillBetweenMany ( )

Creates a linked fill between all the objects in the current selection using the "Fill Between Many" LPE.

After this method completes, the linked fill created becomes the new selection, so as to facilitate quick styling of the fill.

All objects referred to must have an ID. If an ID does not exist, it will be created.

As an additional timesaver, the fill object is created below the bottommost object in the selection.

Definition at line 4110 of file selection-chemistry.cpp.

References add(), SPObject::addChild(), SPObject::appendChild(), clear(), Inkscape::XML::Document::createElement(), desktop(), document(), Inkscape::DocumentUndo::done(), end, SPDocument::ensureUpToDate(), Inkscape::MessageStack::flash(), SPObject::generate_unique_id(), SPDocument::getDefs(), SPObject::getId(), SPDocument::getObjectByRepr(), SPObject::getPrev(), SPObject::getRepr(), SPDocument::getReprDoc(), ID, isEmpty(), item, items(), SPDesktop::messageStack(), SPObject::parent, SPItem::set(), Inkscape::XML::Node::setAttribute(), sp_object_compare_position_bool(), SPObject::updateRepr(), and Inkscape::WARNING_MESSAGE.

Referenced by fill_between_paths().

◆ firstItem()

SPItem * Inkscape::ObjectSet::firstItem ( ) const

Returns the first selected item, returns nullptr if no items selected.

Definition at line 247 of file object-set.cpp.

References _container.

Referenced by Inkscape::Selection::_emitModified(), cloneOriginalPathLPE(), and Inkscape::UI::Dialog::SingleExport::onExport().

◆ fitCanvas()

bool ObjectSet::fitCanvas ( bool  with_margins,
bool  skip_undo = false 
)
Parameters
with_marginsmargins defined in the xml under <sodipodi:namedview> "fit-margin-..." attributes. See SPDocument::fitToRect.
Returns
true if an undoable change should be recorded.

Definition at line 4010 of file selection-chemistry.cpp.

References desktop(), document(), documentBounds(), Inkscape::DocumentUndo::done(), SPDocument::fitToRect(), Inkscape::MessageStack::flash(), isEmpty(), SPDesktop::messageStack(), SPItem::VISUAL_BBOX, and Inkscape::WARNING_MESSAGE.

Referenced by InkFileExportCmd::do_export_vector(), Inkscape::UI::Dialog::Export::exportVector(), and ActionsEdit::fit_canvas_to_selection().

◆ geometricBounds()

◆ getSiblingState()

SiblingState ObjectSet::getSiblingState ( SPItem item)

Associates the given SPItem with a SiblingState enum Needed for handling special cases while transforming objects Inserts the [SPItem, SiblingState] pair to ObjectSet._sibling_state map.

Parameters
item
Returns
the SiblingState

Definition at line 4179 of file selection-chemistry.cpp.

References _sibling_state, SPObject::firstChild(), includes(), item, object_set_contains_original(), offset, SPStyle::shape_inside, SIBLING_CLONE_ORIGINAL, SIBLING_NONE, SIBLING_OFFSET_SOURCE, SIBLING_TEXT_FLOW_FRAME, SIBLING_TEXT_PATH, SIBLING_TEXT_SHAPE_INSIDE, sp_offset_get_source(), sp_textpath_get_path_item(), and SPObject::style.

Referenced by applyAffine().

◆ group()

◆ groups()

SPGroupRange Inkscape::ObjectSet::groups ( )
inline

Returns a range of selected groups.

Definition at line 267 of file object-set.h.

References _container.

Referenced by ungroup().

◆ includes() [1/2]

bool Inkscape::ObjectSet::includes ( Inkscape::XML::Node node,
bool  anyAncestor = false 
)

Definition at line 102 of file object-set.cpp.

References document(), includes(), and node.

◆ includes() [2/2]

bool Inkscape::ObjectSet::includes ( SPObject object,
bool  anyAncestor = false 
)

◆ includesAncestor()

SPObject * Inkscape::ObjectSet::includesAncestor ( SPObject object)

Returns ancestor if the given object has ancestor selected.

Definition at line 111 of file object-set.cpp.

References includes(), and SPObject::parent.

◆ insertSiblingState()

void Inkscape::ObjectSet::insertSiblingState ( SPObject object,
SiblingState  state 
)

◆ isEmpty()

bool Inkscape::ObjectSet::isEmpty ( )

Returns true if no items are selected.

Definition at line 228 of file object-set.cpp.

References _container.

Referenced by Inkscape::UI::Dialog::ObjectsPanel::_activateAction(), Inkscape::UI::Dialog::Transformation::_apply(), Inkscape::UI::Tools::EraserTool::_doWork(), Inkscape::Selection::_emitModified(), Inkscape::UI::Dialog::SelectorsDialog::_selectRow(), Inkscape::UI::Toolbar::SelectToolbar::_sensitize(), Inkscape::UI::Toolbar::GradientToolbar::_update(), Inkscape::SelTrans::_updateVolatileState(), Inkscape::UI::Dialog::CloneTiler::apply(), applyAffine(), Inkscape::UI::Dialog::GridArrangeTab::arrange(), breakApart(), Inkscape::UI::Dialog::CloneTiler::change_selection(), clone(), createBitmapCopy(), deleteItems(), duplicate(), Inkscape::Extension::Internal::Grid::effect(), Inkscape::Extension::Internal::Grid::effect(), fillBetweenMany(), fitCanvas(), Inkscape::PageManager::fitToSelection(), flowtext_to_text(), grid_item_sort(), group(), Box3D::VPDrag::hasEmptySelection(), Inkscape::UI::Tools::InteractiveBooleansTool::is_ready(), Inkscape::UI::Toolbar::SelectToolbar::layout_widget_update(), lower(), lowerToBottom(), move(), Inkscape::UI::Dialog::LivePathEffectEditor::move_list(), moveScreen(), Inkscape::UI::Tools::MeshTool::new_default(), Inkscape::UI::Dialog::Transformation::onClear(), Inkscape::UI::Dialog::Transformation::onMoveRelativeToggled(), Inkscape::UI::Dialog::Transformation::onReplaceMatrixToggled(), Inkscape::UI::Dialog::LivePathEffectEditor::onSelectionChanged(), pathReverse(), popFromGroup(), query_dimension(), raise(), raiseToTop(), relink(), Inkscape::UI::Dialog::CloneTiler::remove(), removeFilter(), removeLPE(), removeLPESRecursive(), Inkscape::UI::Tools::DropperTool::root_handler(), Inkscape::UI::Tools::NodeTool::root_handler(), Inkscape::UI::Tools::SprayTool::root_handler(), Inkscape::UI::Tools::TweakTool::root_handler(), scaleRelative(), Inkscape::UI::Dialog::ObjectsPanel::selectCursorItem(), Inkscape::UI::Tools::MeshTool::selection_changed(), Inkscape::UI::Dialog::BatchExport::selectionChanged(), Inkscape::UI::Dialog::SingleExport::selectionChanged(), Inkscape::SelectionHelper::selectNone(), setClipGroup(), setMask(), setScaleAbsolute(), simplifyPaths(), Inkscape::LivePathEffect::sp_inverse_powerclip(), Inkscape::LivePathEffect::sp_inverse_powermask(), Inkscape::LivePathEffect::sp_remove_powerclip(), Inkscape::LivePathEffect::sp_remove_powermask(), sp_selected_path_do_offset(), sp_selection_next_patheffect_param(), Inkscape::UI::Tools::sp_tweak_dilate(), Inkscape::UI::Tools::spdc_check_for_and_apply_waiting_LPE(), stackDown(), stackUp(), strokesToPaths(), Inkscape::UI::Dialog::StyleFromSelectionToTool(), text_remove_all_kerns(), text_remove_from_path(), tile(), toCurves(), toGuides(), toLayer(), toLPEItems(), toMarker(), toNextLayer(), toPrevLayer(), toSymbol(), Inkscape::UI::Dialog::CloneTiler::unclump(), ungroup(), unlink(), unlinkRecursive(), unsetMask(), untile(), Inkscape::UI::Tools::TweakTool::update_cursor(), Inkscape::UI::Tools::SprayTool::update_cursor(), Inkscape::UI::Widget::StrokeStyle::updateLine(), Inkscape::UI::Dialog::Transformation::updatePageMove(), Inkscape::UI::Dialog::Transformation::updatePageRotate(), Inkscape::UI::Dialog::Transformation::updatePageScale(), Inkscape::UI::Dialog::Transformation::updatePageSkew(), Inkscape::UI::Dialog::Transformation::updatePageTransform(), and Inkscape::UI::Dialog::Transformation::updateSelection().

◆ items()

SPItemRange Inkscape::ObjectSet::items ( )
inline

Returns a range of selected SPItems.

Definition at line 255 of file object-set.h.

References _container.

Referenced by Inkscape::UI::Tools::EraserTool::_booleanErase(), Inkscape::Selection::_emitModified(), Inkscape::UI::Toolbar::PencilToolbar::_flattenLPE(), Inkscape::SelCue::_newItemBboxes(), Inkscape::SelCue::_newTextBaselines(), Inkscape::SelTrans::_selChanged(), Inkscape::UI::Dialog::ObjectsPanel::_selectionChanged(), Inkscape::UI::Toolbar::ArcToolbar::_selectionChanged(), Inkscape::UI::Toolbar::RectToolbar::_selectionChanged(), Inkscape::UI::Toolbar::SpiralToolbar::_selectionChanged(), Inkscape::UI::Toolbar::StarToolbar::_selectionChanged(), Inkscape::UI::Toolbar::TextToolbar::_selectionChanged(), Inkscape::UI::Toolbar::StarToolbar::_selectionModified(), _sizeistItem(), Inkscape::UI::Toolbar::ArcToolbar::_startendValueChanged(), Inkscape::UI::Toolbar::ArcToolbar::_typeChanged(), Inkscape::SelTrans::_updateVolatileState(), Inkscape::UI::Toolbar::RectToolbar::_valueChanged(), Inkscape::UI::Toolbar::SpiralToolbar::_valueChanged(), Inkscape::UI::Toolbar::ArcToolbar::_valueChanged(), Inkscape::UI::Toolbar::TextToolbar::align_mode_changed(), Inkscape::UI::Dialog::Find::all_selection_items(), Inkscape::UI::Dialog::CloneTiler::apply(), Inkscape::UI::Dialog::TextEdit::apply_changes(), applyAffine(), Inkscape::UI::Dialog::Transformation::applyPageMove(), Inkscape::UI::Dialog::Transformation::applyPageRotate(), Inkscape::UI::Dialog::Transformation::applyPageScale(), Inkscape::UI::Dialog::Transformation::applyPageSkew(), Inkscape::UI::Dialog::Transformation::applyPageTransform(), Inkscape::UI::Dialog::PolarArrangeTab::arrange(), breakApart(), Inkscape::UI::Dialog::GlyphsPanel::calcCanInsert(), Inkscape::UI::Tools::cc_selection_set_avoid(), center(), chameleonFill(), Inkscape::UI::Dialog::CloneTiler::change_selection(), cloneOriginal(), cloneOriginalPathLPE(), combine(), Inkscape::UI::Tools::LpeTool::create_measuring_items(), createBitmapCopy(), Inkscape::UI::Toolbar::ConnectorToolbar::curvature_changed(), deleteItems(), documentBounds(), duplicate(), Inkscape::Extension::Internal::BlurEdge::effect(), Inkscape::Extension::Internal::Filter::Filter::effect(), enforceIds(), exchange(), fillBetweenMany(), Inkscape::UI::Tools::MeshTool::fit_mesh_in_bbox(), Inkscape::SelectionHelper::fixSelection(), flowtext_to_text(), geometricBounds(), Inkscape::UI::Dialog::TextEdit::getSelectedTextCount(), Inkscape::UI::Dialog::TextEdit::getSelectedTextItem(), Inkscape::Selection::getSnapPoints(), Inkscape::Selection::getState(), Inkscape::UI::Toolbar::ConnectorToolbar::graph_layout(), Inkscape::UI::Dialog::GlyphsPanel::insertText(), items_vector(), Inkscape::UI::Toolbar::StarToolbar::length_value_changed(), Inkscape::UI::Toolbar::TextToolbar::lineheight_unit_changed(), Inkscape::UI::Toolbar::TextToolbar::lineheight_value_changed(), lower(), lowerToBottom(), Inkscape::UI::Toolbar::StarToolbar::magnitude_value_changed(), Inkscape::UI::Widget::StrokeStyle::markerSelectCB(), Inkscape::UI::Tools::MeshTool::new_default(), Inkscape::UI::Toolbar::StarToolbar::notifyAttributeChanged(), Inkscape::Selection::numberOfLayers(), Inkscape::Selection::numberOfParents(), Inkscape::UI::Dialog::GridArrangeTab::on_col_spinbutton_changed(), Inkscape::UI::Dialog::GridArrangeTab::on_row_spinbutton_changed(), Inkscape::UI::Dialog::BatchExport::onExport(), Inkscape::UI::Dialog::Transformation::onReplaceMatrixToggled(), Inkscape::UI::Toolbar::ConnectorToolbar::orthogonal_toggled(), pathReverse(), popFromGroup(), Inkscape::Extension::Implementation::Implementation::prefs_effect(), Inkscape::Extension::Internal::Bitmap::ImageMagick::prefs_effect(), Inkscape::Extension::Internal::Grid::prefs_effect(), Inkscape::UI::Toolbar::StarToolbar::proportion_value_changed(), query_dimension(), raise(), raiseToTop(), randomize(), Inkscape::UI::Toolbar::StarToolbar::randomized_value_changed(), GrDrag::refreshDraggers(), Inkscape::UI::Dialog::BatchExport::refreshItems(), Inkscape::UI::Dialog::BatchExport::refreshPreview(), Inkscape::UI::Dialog::SingleExport::refreshPreview(), Inkscape::UI::Dialog::IconPreviewPanel::refreshPreview(), relink(), Inkscape::UI::Dialog::CloneTiler::remove(), removeFilter(), removeLPE(), removeLPESRecursive(), removeTransform(), Inkscape::UI::Tools::TweakTool::root_handler(), Inkscape::UI::Toolbar::StarToolbar::rounded_value_changed(), select_invert(), select_list(), Box3D::VanishingPoint::selectedBoxes(), Inkscape::UI::Tools::MeshTool::selection_changed(), Inkscape::UI::Tools::NodeTool::selection_changed(), Inkscape::UI::Tools::MarkerTool::selection_changed(), Inkscape::UI::Dialog::FilterEffectsDialog::FilterModifier::selection_toggled(), setMask(), Inkscape::UI::Widget::StrokeStyle::setStrokeDash(), Inkscape::UI::Widget::StrokeStyle::setStrokeMiter(), Inkscape::UI::Widget::StrokeStyle::setStrokeWidth(), SnapManager::setupIgnoreSelection(), shape_in_selection(), Inkscape::UI::Toolbar::StarToolbar::side_mode_changed(), simplifyPaths(), sp_edit_select_all_full(), Inkscape::UI::Tools::sp_event_context_find_item(), sp_gradient_invert_selected_gradients(), sp_gradient_reverse_selected_gradients(), sp_import_document(), Inkscape::LivePathEffect::sp_inverse_powerclip(), Inkscape::LivePathEffect::sp_inverse_powermask(), Inkscape::LivePathEffect::sp_remove_powerclip(), Inkscape::LivePathEffect::sp_remove_powermask(), sp_select_same_fill_stroke_style(), sp_select_same_object_type(), sp_selected_path_do_offset(), sp_selection_item_next(), sp_selection_item_prev(), Inkscape::UI::Tools::sp_tweak_dilate(), Inkscape::UI::Tools::sp_update_helperpath(), stackDown(), stackUp(), Inkscape::SelTrans::stamp(), strokedBounds(), strokesToPaths(), swapFillStroke(), text_flow_into_shape(), text_flow_shape_subtract(), text_or_flowtext_in_selection(), Inkscape::UI::Toolbar::TextToolbar::text_outer_set_style(), text_put_on_path(), text_remove_all_kerns(), text_remove_from_path(), text_unflow(), tile(), toCurves(), Inkscape::UI::Dialog::ObjectsPanel::toggleLocked(), Inkscape::UI::Dialog::ObjectsPanel::toggleVisible(), toGuides(), toLayer(), Inkscape::UI::Toolbar::PencilToolbar::tolerance_value_changed(), toLPEItems(), toMarker(), toNextLayer(), toPrevLayer(), Inkscape::UI::Dialog::CloneTiler::unclump(), unlink(), unlinkRecursive(), unsetMask(), unSymbol(), untile(), Inkscape::UI::Tools::TweakTool::update_cursor(), Inkscape::UI::Dialog::FilterEffectsDialog::FilterModifier::update_selection(), Box3D::VPDrag::updateBoxHandles(), GrDrag::updateDraggers(), Box3D::VPDrag::updateDraggers(), GrDrag::updateLevels(), Inkscape::UI::Widget::StrokeStyle::updateLine(), GrDrag::updateLines(), Box3D::VPDrag::updateLines(), Inkscape::SelectionDescriber::updateMessage(), Inkscape::UI::Dialog::Transformation::updatePageTransform(), Inkscape::UI::Dialog::GridArrangeTab::updateSelection(), visualBounds(), and Box3D::VPDragger::VPsOfSelectedBoxes().

◆ items_vector()

std::vector< SPItem * > Inkscape::ObjectSet::items_vector ( )
inline

◆ largestItem()

SPItem * Inkscape::ObjectSet::largestItem ( CompareSize  compare)

Returns the largest item from this selection.

Definition at line 261 of file object-set.cpp.

References _sizeistItem().

◆ lastItem()

SPItem * Inkscape::ObjectSet::lastItem ( ) const

Returns the last selected item, returns nullptr if no items selected.

Definition at line 252 of file object-set.cpp.

References _container.

◆ lower()

◆ lowerToBottom()

◆ move() [1/3]

void ObjectSet::move ( double  dx,
double  dy 
)

◆ move() [2/3]

void ObjectSet::move ( double  dx,
double  dy,
bool  rotated 
)

◆ move() [3/3]

void ObjectSet::move ( double  dx,
double  dy,
bool  rotated,
bool  screen 
)

Definition at line 2253 of file selection-chemistry.cpp.

References move(), and moveScreen().

◆ moveRelative() [1/2]

void ObjectSet::moveRelative ( const Geom::Point move,
bool  compensate = true 
)

◆ moveRelative() [2/2]

void ObjectSet::moveRelative ( double  dx,
double  dy 
)

Definition at line 1899 of file selection-chemistry.cpp.

References applyAffine().

◆ moveScreen() [1/2]

void ObjectSet::moveScreen ( double  dx,
double  dy 
)

◆ moveScreen() [2/2]

void ObjectSet::moveScreen ( double  dx,
double  dy,
bool  rotated 
)

◆ objects()

◆ operator=()

ObjectSet & Inkscape::ObjectSet::operator= ( ObjectSet const &  )
delete

◆ pastePathEffect()

◆ pasteSize()

◆ pasteSizeSeparately()

◆ pasteStyle()

◆ pathCut()

void Inkscape::ObjectSet::pathCut ( bool  skip_undo = false,
bool  silent = false 
)

Definition at line 67 of file path-boolop.cpp.

References bool_op_cut.

Referenced by Inkscape::UI::Tools::EraserTool::_booleanErase().

◆ pathDiff()

void Inkscape::ObjectSet::pathDiff ( bool  skip_undo = false,
bool  silent = false 
)

◆ pathIntersect()

void Inkscape::ObjectSet::pathIntersect ( bool  skip_undo = false,
bool  silent = false 
)

Definition at line 52 of file path-boolop.cpp.

References bool_op_inters.

◆ pathReverse()

◆ pathSlice()

void Inkscape::ObjectSet::pathSlice ( bool  skip_undo = false,
bool  silent = false 
)

Definition at line 72 of file path-boolop.cpp.

References bool_op_slice.

◆ pathSymDiff()

void Inkscape::ObjectSet::pathSymDiff ( bool  skip_undo = false,
bool  silent = false 
)

Definition at line 62 of file path-boolop.cpp.

References bool_op_symdiff.

◆ pathUnion()

void Inkscape::ObjectSet::pathUnion ( bool  skip_undo = false,
bool  silent = false 
)

◆ perspList()

std::list< Persp3D * > const Inkscape::ObjectSet::perspList ( )

Returns a list of all perspectives which have a 3D box in the current selection.

(these may also be nested in groups)

Definition at line 463 of file object-set.cpp.

References _3dboxes.

Referenced by Inkscape::UI::Toolbar::Box3DToolbar::angle_value_changed(), applyAffine(), Inkscape::UI::Tools::Box3dTool::selection_changed(), and Inkscape::UI::Toolbar::Box3DToolbar::vp_state_changed().

◆ popFromGroup()

◆ preferredBounds()

◆ raise()

◆ raiseToTop()

◆ reapplyAffine()

void ObjectSet::reapplyAffine ( )

Reapply the same transform again.

Definition at line 1606 of file selection-chemistry.cpp.

References _last_affine, and applyAffine().

Referenced by transform_reapply().

◆ relink()

◆ remove()

bool Inkscape::ObjectSet::remove ( SPObject object)

Removes an item from the set of selected objects.

It is ok to call this method for an unselected item.

Parameters
itemthe item to unselect
Returns
is success

Definition at line 68 of file object-set.cpp.

References _anyAncestorIsInSet(), _emitChanged(), _remove(), _removeAncestorsFromSet(), and includes().

Referenced by _add(), Inkscape::UI::Tools::EraserTool::_booleanErase(), removeList(), sp_item_group_ungroup(), and toggle().

◆ removeFilter()

◆ removeList()

template<class T >
boost::enable_if< boost::is_base_of< SPObject, T >, void >::type Inkscape::ObjectSet::removeList ( const std::vector< T * > &  objs)
inline

Remove the specified objects from selection.

Parameters
objsthe objects to select

Definition at line 342 of file object-set.h.

References _emitChanged(), and remove().

◆ removeLPE()

◆ removeLPESRecursive()

◆ removePathTransforms()

void Inkscape::ObjectSet::removePathTransforms ( )

◆ removeTransform()

void ObjectSet::removeTransform ( )

Definition at line 1817 of file selection-chemistry.cpp.

References document(), Inkscape::DocumentUndo::done(), items(), and xmlNodes().

Referenced by transform_remove().

◆ rotateRelative()

void ObjectSet::rotateRelative ( const Geom::Point center,
double  angle_degrees 
)

◆ scaleRelative()

void ObjectSet::scaleRelative ( const Geom::Point align,
const Geom::Scale scale 
)

◆ set() [1/2]

void Inkscape::ObjectSet::set ( SPObject object,
bool  persist_selection_context = false 
)

Set the selection to a single specific object.

Parameters
objthe object to select

Definition at line 318 of file object-set.cpp.

References _add(), _clear(), and _emitChanged().

Referenced by Inkscape::UI::Tools::EraserTool::_booleanErase(), Inkscape::UI::Tools::EraserTool::_clipErase(), InkFileExportCmd::do_export_vector(), unlink(), and unlinkRecursive().

◆ set() [2/2]

void Inkscape::ObjectSet::set ( XML::Node repr)

◆ setClipGroup()

◆ setDocument()

void Inkscape::ObjectSet::setDocument ( SPDocument doc)
inline

Definition at line 134 of file object-set.h.

References _document.

◆ setList()

template<class T >
boost::enable_if< boost::is_base_of< SPObject, T >, void >::type Inkscape::ObjectSet::setList ( const std::vector< T * > &  objs)
inline

◆ setMask()

void ObjectSet::setMask ( bool  apply_clip_path,
bool  apply_to_layer,
bool  remove_original 
)

◆ setReprList()

void Inkscape::ObjectSet::setReprList ( std::vector< XML::Node * > const &  list)

Selects the objects with the same IDs as those in list.

Todo:
How about adding setIdList(std::vector<Glib::ustring> const &list)
Parameters
listthe repr list to add

Definition at line 333 of file object-set.cpp.

References _emitChanged(), add(), clear(), document(), SPDocument::getObjectById(), and SPDocument::getObjectByRepr().

Referenced by breakApart(), clone(), duplicate(), flowtext_to_text(), sp_import_document(), toCurves(), toLayer(), toLPEItems(), toNextLayer(), and toPrevLayer().

◆ setScaleAbsolute()

void ObjectSet::setScaleAbsolute ( double  x0,
double  x1,
double  y0,
double  y1 
)

◆ simplifyPaths()

◆ single()

SPObject * Inkscape::ObjectSet::single ( )

Returns a single selected object.

Returns
NULL unless exactly one object is selected

Definition at line 232 of file object-set.cpp.

References _container.

Referenced by Inkscape::UI::Dialog::Prototype::selectionChanged(), and singleRepr().

◆ singleItem()

SPItem * Inkscape::ObjectSet::singleItem ( )

Returns a single selected item.

Returns
NULL unless exactly one object is selected

Definition at line 236 of file object-set.cpp.

References _container.

Referenced by Inkscape::UI::Dialog::ObjectProperties::_aspectRatioToggled(), Inkscape::UI::Tools::FreehandBase::_attachSelection(), Inkscape::Selection::_emitChanged(), Inkscape::Selection::_emitModified(), Inkscape::UI::Tools::PenTool::_handleButtonPress(), Inkscape::UI::Tools::PencilTool::_handleButtonPress(), Inkscape::UI::Tools::PenTool::_handleButtonRelease(), Inkscape::UI::Dialog::ObjectProperties::_hiddenToggled(), Inkscape::UI::Dialog::ObjectProperties::_labelChanged(), Inkscape::UI::Tools::ConnectorTool::_selectionChanged(), Inkscape::UI::Toolbar::Box3DToolbar::_selectionChanged(), Inkscape::UI::Toolbar::ConnectorToolbar::_selectionChanged(), Inkscape::UI::Tools::TextTool::_selectionChanged(), Inkscape::UI::Dialog::ObjectProperties::_sensitivityToggled(), Inkscape::UI::Tools::PenTool::_setToNearestHorizVert(), Inkscape::UI::Dialog::AlignAndDistribute::AlignAndDistribute(), Inkscape::UI::Dialog::CloneTiler::apply(), Inkscape::UI::Dialog::TextEdit::apply_changes(), Inkscape::UI::Tools::ArcTool::ArcTool(), Inkscape::UI::Tools::Box3dTool::Box3dTool(), Inkscape::UI::Dialog::CloneTiler::change_selection(), cloneOriginal(), Inkscape::UI::Dialog::Find::desktopReplaced(), Inkscape::UI::Tools::FloodTool::FloodTool(), Inkscape::UI::Toolbar::TextToolbar::lineheight_unit_changed(), Inkscape::UI::Tools::LpeTool::LpeTool(), Inkscape::UI::Dialog::LivePathEffectEditor::move_list(), Inkscape::UI::Dialog::SpellCheck::nextWord(), Inkscape::UI::Dialog::LivePathEffectEditor::onSelectionChanged(), Inkscape::UI::Tools::RectTool::RectTool(), Inkscape::UI::Dialog::CloneTiler::remove(), Inkscape::UI::Toolbar::LPEToolbar::sel_changed(), Inkscape::UI::Toolbar::NodeToolbar::sel_changed(), Inkscape::UI::Tools::ArcTool::selection_changed(), Inkscape::UI::Tools::Box3dTool::selection_changed(), Inkscape::UI::Tools::FloodTool::selection_changed(), Inkscape::UI::Tools::LpeTool::selection_changed(), Inkscape::UI::Tools::RectTool::selection_changed(), Inkscape::UI::Tools::SpiralTool::selection_changed(), Inkscape::UI::Tools::StarTool::selection_changed(), Inkscape::UI::Dialog::LivePathEffectEditor::selectionModified(), Inkscape::UI::Dialog::ObjectAttributes::selectionModified(), sp_item_group_ungroup(), sp_selected_path_create_offset_object(), sp_selection_next_patheffect_param(), Inkscape::UI::Tools::spdc_check_for_and_apply_waiting_LPE(), Inkscape::UI::Tools::spdc_endpoint_snap_free(), Inkscape::UI::Tools::SpiralTool::SpiralTool(), Inkscape::UI::Tools::StarTool::StarTool(), Inkscape::UI::Dialog::StyleFromSelectionToTool(), Inkscape::UI::Tools::TextTool::TextTool(), Inkscape::UI::Dialog::CloneTiler::unclump(), unlink(), unlinkRecursive(), Inkscape::UI::Dialog::ObjectProperties::update_entries(), Inkscape::LivePathEffect::Parameter::update_satellites(), and Inkscape::UI::Dialog::ObjectAttributes::widget_setup().

◆ singleRepr()

Inkscape::XML::Node * Inkscape::ObjectSet::singleRepr ( )

Returns a single selected object's xml node.

Returns
NULL unless exactly one object is selected

Definition at line 294 of file object-set.cpp.

References SPObject::getRepr(), and single().

Referenced by Inkscape::UI::Dialog::XmlTree::get_dt_select().

◆ size()

◆ skewRelative()

void ObjectSet::skewRelative ( const Geom::Point align,
double  dx,
double  dy 
)

◆ smallestItem()

SPItem * Inkscape::ObjectSet::smallestItem ( CompareSize  compare)

Returns the smallest item from this selection.

Definition at line 257 of file object-set.cpp.

References _sizeistItem().

◆ stackDown()

◆ stackUp()

◆ strokedBounds()

◆ strokesToPaths()

◆ swapFillStroke()

◆ tile()

◆ toCurves()

◆ toggle()

void Inkscape::ObjectSet::toggle ( SPObject obj)

Removes an item if selected, adds otherwise.

Parameters
itemthe item to unselect

Definition at line 220 of file object-set.cpp.

References add(), includes(), and remove().

Referenced by Inkscape::UI::Tools::ConnectorTool::item_handler().

◆ toGuides()

◆ toLayer() [1/2]

void ObjectSet::toLayer ( SPObject moveto)

Move selection to group moveto, after the last child of moveto (if it has any children).

Parameters
movetoLayer to move to
skip_undoDon't call DocumentUndo::done
Precondition
moveto is of type SPItem (or even SPGroup?)

Definition at line 1503 of file selection-chemistry.cpp.

References document(), SPObject::getRepr(), Inkscape::XML::Node::lastChild(), and toLayer().

Referenced by Inkscape::UI::Dialog::LayerPropertiesDialog::_doMove(), Inkscape::UI::Dialog::ObjectsPanel::on_drag_drop(), popFromGroup(), and toLayer().

◆ toLayer() [2/2]

◆ toLPEItems()

void ObjectSet::toLPEItems ( )

Converts the selected items to LPEItems if they are not already so; e.g.

SPRects)

Definition at line 343 of file path-chemistry.cpp.

References addList(), clear(), end, isEmpty(), items(), setReprList(), sp_item_list_to_curves(), and unlinkRecursive().

◆ toMarker()

◆ toNextLayer()

◆ topRepr()

Inkscape::XML::Node * Inkscape::ObjectSet::topRepr ( ) const

The top-most item, or NULL if the selection is empty.

Definition at line 299 of file object-set.cpp.

References sp_repr_compare_position_bool(), and xmlNodes().

Referenced by sp_import_document().

◆ toPrevLayer()

◆ toSymbol()

◆ ungroup()

◆ ungroup_all()

void ObjectSet::ungroup_all ( bool  skip_undo = false)

Keep ungrouping until there are no more groups.

Definition at line 943 of file selection-chemistry.cpp.

References size(), and ungroup().

◆ unlink()

bool ObjectSet::unlink ( const bool  skip_undo = false,
const bool  silent = false 
)

◆ unlinkRecursive()

bool ObjectSet::unlinkRecursive ( const bool  skip_undo = false,
const bool  force = false,
const bool  silent = false 
)

◆ unsetMask()

◆ unSymbol()

void ObjectSet::unSymbol ( )

Definition at line 3270 of file selection-chemistry.cpp.

References document(), Inkscape::DocumentUndo::done(), and items().

◆ untile()

◆ visualBounds()

◆ xmlNodes()

XMLNodeRange Inkscape::ObjectSet::xmlNodes ( )
inline

Returns a range of the xml nodes of all selected objects.

Definition at line 274 of file object-set.h.

References _container.

Referenced by clone(), duplicate(), group(), lowerToBottom(), raiseToTop(), removeTransform(), setClipGroup(), and topRepr().

Member Data Documentation

◆ _3dboxes

std::list<SPBox3D *> Inkscape::ObjectSet::_3dboxes
protected

◆ _container

MultiIndexContainer Inkscape::ObjectSet::_container
protected

◆ _desktop

◆ _document

SPDocument* Inkscape::ObjectSet::_document = nullptr
protected

◆ _last_affine

Geom::Affine Inkscape::ObjectSet::_last_affine
private

Definition at line 542 of file object-set.h.

Referenced by applyAffine(), clearLastAffine(), and reapplyAffine().

◆ _releaseConnections

std::unordered_map<SPObject*, sigc::connection> Inkscape::ObjectSet::_releaseConnections
protected

Definition at line 533 of file object-set.h.

Referenced by _add(), and _disconnect().

◆ _sibling_state

std::map<SPObject *, SiblingState> Inkscape::ObjectSet::_sibling_state
private

Definition at line 540 of file object-set.h.

Referenced by _emitChanged(), clearSiblingStates(), and getSiblingState().


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