Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
SPCSSAttr Class Reference

#include <sp-css-attr.h>

Inheritance diagram for SPCSSAttr:
Inkscape::XML::Node Inkscape::GC::Anchored

Additional Inherited Members

- Public Types inherited from Inkscape::XML::Node
using iterator = Inkscape::XML::NodeSiblingIterator
 
- Public Member Functions inherited from Inkscape::XML::Node
 Node ()=default
 
 ~Node () override=default
 
virtual NodeType type () const =0
 Get the type of the node.
 
virtual char const * name () const =0
 Get the name of the element node.
 
virtual int code () const =0
 Get the integer code corresponding to the node's name.
 
virtual unsigned position () const =0
 Get the index of this node in parent's child order.
 
virtual unsigned childCount () const =0
 Get the number of children of this node.
 
virtual char const * content () const =0
 Get the content of a text or comment node.
 
virtual char const * attribute (char const *key) const =0
 Get the string representation of a node's attribute.
 
virtual const AttributeVectorattributeList () const =0
 Get a list of the node's attributes.
 
virtual bool matchAttributeName (char const *partial_name) const =0
 Check whether this node has any attribute that matches a string.
 
virtual void setPosition (int pos)=0
 Set the position of this node in parent's child order.
 
virtual void setContent (char const *value)=0
 Set the content of a text or comment node.
 
void setAttribute (Util::const_char_ptr key, Util::const_char_ptr value)
 Change an attribute of this node.
 
bool copyAttribute (Util::const_char_ptr key, Node const *source_node, bool remove_if_empty=false)
 Copy attribute value from another node to this node.
 
bool getAttributeBoolean (Util::const_char_ptr key, bool default_value=false) const
 Parses the boolean value of an attribute "key" in repr and sets val accordingly, or to false if the attr is not set.
 
int getAttributeInt (Util::const_char_ptr key, int default_value=0) const
 
double getAttributeDouble (Util::const_char_ptr key, double default_value=0.0) const
 
bool setAttributeBoolean (Util::const_char_ptr key, bool val)
 
bool setAttributeInt (Util::const_char_ptr key, int val)
 
bool setAttributeCssDouble (Util::const_char_ptr key, double val)
 Set a property attribute to val [slightly rounded], in the format required for CSS properties: in particular, it never uses exponent notation.
 
bool setAttributeSvgDouble (Util::const_char_ptr key, double val)
 For attributes where an exponent is allowed.
 
bool setAttributeSvgNonDefaultDouble (Util::const_char_ptr key, double val, double default_value)
 
bool setAttributeSvgLength (Util::const_char_ptr key, SVGLength const &val)
 
bool setAttributePoint (Util::const_char_ptr key, Geom::Point const &val)
 
Geom::Point getAttributePoint (Util::const_char_ptr key, Geom::Point default_value={}) const
 
void setAttributeOrRemoveIfEmpty (Inkscape::Util::const_char_ptr key, Inkscape::Util::const_char_ptr value)
 Change an attribute of this node.
 
void removeAttribute (Inkscape::Util::const_char_ptr key)
 Remove an attribute of this node.
 
virtual void setCodeUnsafe (int code)=0
 Set the integer GQuark code for the name of the node.
 
virtual Documentdocument ()=0
 Get the node's associated document.
 
virtual Document const * document () const =0
 
virtual Noderoot ()=0
 Get the root node of this node's document.
 
virtual Node const * root () const =0
 
virtual Nodeparent ()=0
 Get the parent of this node.
 
virtual Node const * parent () const =0
 
virtual Nodenext ()=0
 Get the next sibling of this node.
 
virtual Node const * next () const =0
 
virtual Nodeprev ()=0
 
virtual Node const * prev () const =0
 
virtual NodefirstChild ()=0
 Get the first child of this node.
 
virtual Node const * firstChild () const =0
 
virtual NodelastChild ()=0
 Get the last child of this node.
 
virtual Node const * lastChild () const =0
 
virtual NodenthChild (unsigned index)=0
 Get the child of this node with a given index.
 
virtual Node const * nthChild (unsigned index) const =0
 
virtual Nodeduplicate (Document *doc) const =0
 Create a duplicate of this node.
 
virtual void addChild (Node *child, Node *after)=0
 Insert another node as a child of this node.
 
void addChildAtPos (Node *child, unsigned pos)
 Insert another node as a child of this node.
 
virtual void appendChild (Node *child)=0
 Append a node as the last child of this node.
 
virtual void removeChild (Node *child)=0
 Remove a child of this node.
 
virtual void changeOrder (Node *child, Node *after)=0
 Move a given node in this node's child order.
 
virtual void cleanOriginal (Node *src, char const *key)=0
 Remove all elements that not in src node.
 
virtual bool equal (Node const *other, bool recursive, bool skip_ids=false)=0
 Compare 2 nodes equality.
 
virtual void mergeFrom (Node const *src, char const *key, bool extension=false, bool clean=false)=0
 Merge all children of another node with the current.
 
virtual void addObserver (NodeObserver &observer)=0
 Add an object that will be notified of the changes to this node.
 
virtual void removeObserver (NodeObserver &observer)=0
 Remove an object from the list of observers.
 
virtual void synthesizeEvents (NodeObserver &observer)=0
 Generate a sequence of events corresponding to the state of this node.
 
virtual void addSubtreeObserver (NodeObserver &observer)=0
 Add an object that will be notified of the changes to this node and its descendants.
 
virtual void removeSubtreeObserver (NodeObserver &observer)=0
 Remove an object from the subtree observers list.
 
virtual void recursivePrintTree (unsigned level)=0
 
iterator begin ()
 Iterator over children.
 
iterator end ()
 Helper to use the standard lib container functions.
 
bool operator== (const std::string &name) const
 Compare a node by looking at its name to a string.
 
template<typename T >
NodefindChildPath (T list)
 depth first search to find a node
 
template<typename iterT >
NodefindChildPath (iterT itr, iterT end)
 template reshuffling to make the more useful findChildPath cleaner
 
- Public Member Functions inherited from Inkscape::GC::Anchored
void anchor () const
 
void release () const
 
unsigned _anchored_refcount () const
 
 Anchored (Anchored const &)=delete
 
void operator= (Anchored const &)=delete
 
- Protected Member Functions inherited from Inkscape::XML::Node
 Node (Node const &)
 
virtual void setAttributeImpl (char const *key, char const *value)=0
 
- Protected Member Functions inherited from Inkscape::GC::Anchored
 Anchored ()
 
virtual ~Anchored ()=default
 

Detailed Description

Definition at line 18 of file sp-css-attr.h.


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