Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
sp-object.h File Reference

Go to the source code of this file.

Classes

struct  SPCtx
 Unused. More...
 
class  SPIXmlSpace
 Internal class consisting of two bits. More...
 
class  SPObject
 SPObject is an abstract base class of all of the document nodes at the SVG document level. More...
 
struct  SPObject::ParentIteratorStrategy
 Switch containing next() method. More...
 

Namespaces

namespace  Inkscape
 Helper class to stream background task notifications as a series of messages.
 
namespace  Inkscape::XML
 @Inkscape XML tree.
 

Enumerations

enum  { SP_XML_SPACE_DEFAULT , SP_XML_SPACE_PRESERVE }
 

Functions

unsigned cascade_flags (unsigned flags)
 
SPObjectsp_object_ref (SPObject *object, SPObject *owner=nullptr)
 Increase reference count of object, with possible debugging.
 
SPObjectsp_object_unref (SPObject *object, SPObject *owner=nullptr)
 Decrease reference count of object, with possible debugging and finalization.
 
std::ostream & operator<< (std::ostream &out, const SPObject &o)
 
int sp_object_compare_position (SPObject const *first, SPObject const *second)
 Compares height of objects in tree.
 
bool sp_object_compare_position_bool (SPObject const *first, SPObject const *second)
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
SP_XML_SPACE_DEFAULT 
SP_XML_SPACE_PRESERVE 

Definition at line 98 of file sp-object.h.

Function Documentation

◆ cascade_flags()

◆ operator<<()

std::ostream & operator<< ( std::ostream &  out,
const SPObject o 
)

◆ sp_object_compare_position()

int sp_object_compare_position ( SPObject const *  first,
SPObject const *  second 
)

Compares height of objects in tree.

Works for different-parent objects, so long as they have a common ancestor.

Returns
*    0    positions are equivalent
*    1    first object's position is greater than the second
*   -1    first object's position is less than the second   

Definition at line 353 of file sp-object.cpp.

References AncestorSon(), SPObject::getRepr(), SPObject::nearestCommonAncestor(), SPObject::parent, result, and sp_repr_compare_position().

Referenced by sp_object_compare_position_bool().

◆ sp_object_compare_position_bool()

◆ sp_object_ref()

SPObject * sp_object_ref ( SPObject object,
SPObject owner = nullptr 
)

Increase reference count of object, with possible debugging.

Parameters
ownerIf non-NULL, make debug log entry.
Returns
object, NULL is error.
Precondition
object points to real object
Todo:
need to move this to be a member of SPObject.

Definition at line 240 of file sp-object.cpp.

Referenced by Inkscape::ObjectHierarchy::_attach(), SPSwitch::_childList(), Inkscape::Selection::_emitChanged(), Inkscape::SelTrans::_selChanged(), Inkscape::UI::Dialog::LayerPropertiesDialog::_setLayer(), Inkscape::ObjectHierarchy::_trim_for_release(), Inkscape::ObjectHierarchy::_trimAbove(), Inkscape::ObjectHierarchy::_trimBelow(), SPObject::attach(), SPObject::childList(), SPObject::cropToObject(), SPObject::deleteObject(), SPObject::emitModified(), LivePathEffectObject::fork_private_if_necessary(), Inkscape::SelTrans::grab(), GrDraggable::GrDraggable(), KnotHolder::KnotHolder(), SPFlowregion::modified(), SPFlowregionExclude::modified(), SPDefs::modified(), SPFlowdiv::modified(), SPFlowtspan::modified(), SPFlowpara::modified(), SPGradient::modified(), SPHatch::modified(), SPMeshpatch::modified(), SPMeshrow::modified(), SPText::modified(), SPTRef::modified(), SPUse::modified(), SPDocument::queueForOrphanCollection(), SPLPEItem::removeAllPathEffects(), SPObject::set(), Inkscape::XML::SignalObserver::set(), Inkscape::ObjectHierarchy::setBottom(), SPObject::setSuccessor(), SPObject::setTmpSuccessor(), Inkscape::BooleanBuilder::shape_commit(), sp_selection_delete_impl(), Inkscape::UI::Tools::sp_spray_dilate(), sp_tref_convert_to_tspan(), Inkscape::UI::Tools::spdc_apply_powerstroke_shape(), SPUse::unlink(), SPFlowdiv::update(), SPFlowtspan::update(), SPFlowpara::update(), SPFlowregion::update(), SPFlowregionExclude::update(), SPFlowtext::update(), SPHatch::update(), SPText::update(), and SPUse::update().

◆ sp_object_unref()

SPObject * sp_object_unref ( SPObject object,
SPObject owner = nullptr 
)

Decrease reference count of object, with possible debugging and finalization.

Parameters
ownerIf non-NULL, make debug log entry.
Returns
always NULL
Precondition
object points to real object
Todo:
need to move this to be a member of SPObject.

Definition at line 251 of file sp-object.cpp.

References SPObject::refCount.

Referenced by Inkscape::ObjectHierarchy::_detach(), Inkscape::Selection::_releaseContext(), Inkscape::SelTrans::_selChanged(), Inkscape::UI::Dialog::LayerPropertiesDialog::_setLayer(), Inkscape::ObjectHierarchy::_trim_for_release(), Inkscape::ObjectHierarchy::_trimAbove(), Inkscape::ObjectHierarchy::_trimBelow(), SPLPEItem::applyToClipPath(), SPLPEItem::applyToMask(), SPObject::build(), SPObject::child_added(), SPDocument::collectOrphans(), SPObject::cropToObject(), SPObject::deleteObject(), SPObject::detach(), SPObject::emitModified(), LivePathEffectObject::fork_private_if_necessary(), SPUse::href_changed(), SPTagUse::href_changed(), SPFlowregion::modified(), SPFlowregionExclude::modified(), SPFeDiffuseLighting::modified(), SPFeSpecularLighting::modified(), SPClipPath::modified(), SPMask::modified(), SPPattern::modified(), SPDefs::modified(), SPFlowdiv::modified(), SPFlowtspan::modified(), SPFlowpara::modified(), SPGradient::modified(), SPHatch::modified(), SPGroup::modified(), SPMeshpatch::modified(), SPMeshrow::modified(), SPText::modified(), SPTRef::modified(), SPUse::modified(), SPLPEItem::removeAllPathEffects(), SPLPEItem::resetClipPathAndMaskLPE(), SPObject::set(), Inkscape::XML::SignalObserver::set(), Inkscape::ObjectHierarchy::setBottom(), Inkscape::BooleanBuilder::shape_commit(), sp_lpe_item_cleanup_original_path_recursive(), sp_lpe_item_create_original_path_recursive(), Inkscape::UI::Tools::SelectTool::sp_select_context_abort(), sp_selection_delete_impl(), Inkscape::UI::Tools::sp_spray_dilate(), sp_tref_convert_to_tspan(), sp_tref_update_text(), Inkscape::UI::Tools::spdc_apply_powerstroke_shape(), Inkscape::SelTrans::ungrab(), SPUse::unlink(), SPObject::unsetTmpSuccessor(), SPClipPath::update(), SPMask::update(), SPPattern::update(), SPDefs::update(), SPFlowdiv::update(), SPFlowtspan::update(), SPFlowpara::update(), SPFlowregion::update(), SPFlowregionExclude::update(), SPFlowtext::update(), SPHatch::update(), SPGroup::update(), SPText::update(), SPUse::update(), GrDraggable::~GrDraggable(), KnotHolder::~KnotHolder(), Inkscape::UI::Tools::SelectTool::~SelectTool(), Inkscape::SelTrans::~SelTrans(), SPDocument::~SPDocument(), and SPObject::~SPObject().