Logo Search packages:      
Sourcecode: inkscape version File versions

Inkscape::XML Namespace Reference


Detailed Description

Inkscape XML tree

This namespace contains classes and functions that comprise the XML tree of Inkscape documents.

SVG documents in Inkscape are represented as two parallel hierarchies of nodes: the object tree, which contains all information about the document's state when loaded, and the XML tree, which contains all information about the document's XML representation. For this reason this tree is also called the "repr tree", and XML nodes are called "reprs".

The central class is XML::Node, which provides all operations. It should be noted that nodes are currently typeless and operations not valid for their type simply do nothing (like trying to iterate over children of a text node). In addition to standard DOM operations, the XML tree supports observers - objects derived from Xml::NodeObserver which receive notifications about changes in the document tree.


Classes

struct  AttributeRecord
 Key-value pair representing an attribute. More...
struct  CommentNode
 Comment node, e.g. <!-- Some comment -->. More...
class  CompositeNodeObserver
 An observer that relays notifications to multiple other observers. More...
struct  Document
 Interface for XML documents. More...
class  ElementNode
 Element node, e.g. <group />. More...
class  Event
 Generic XML modification event. More...
class  EventAdd
 Object representing child addition. More...
class  EventChgAttr
 Object representing attribute change. More...
class  EventChgContent
 Object representing content change. More...
class  EventChgOrder
 Obect representing child order change. More...
class  EventDel
 Object representing child removal. More...
class  InvalidOperationException
class  LogBuilder
 Event log builder. More...
class  Node
 Interface for refcounted XML nodes. More...
struct  node_matches
struct  NodeEventVector
 Structure holding callbacks for node state changes. More...
class  NodeObserver
 Interface for XML node observers. More...
struct  NodeParentIteratorStrategy
struct  NodeSiblingIteratorStrategy
struct  PINode
 Processing instruction node, e.g. <?xml version="1.0" encoding="utf-8" standalone="no"?>. More...
class  SignalObserver
class  SimpleDocument
class  SimpleNode
 Default implementation of the XML node stored in memory. More...
class  Subtree
 Represents a node and all its descendants. More...
struct  TextNode
 Text node, e.g. "Some text" in <group>Some text</group>. More...

Typedefs

typedef Debug::SimpleEvent
< Debug::Event::XML > 
DebugXML
typedef
Inkscape::Util::ForwardPointerIterator
< Node const,
NodeParentIteratorStrategy > 
NodeConstParentIterator
typedef
Inkscape::Util::ForwardPointerIterator
< Node const,
NodeSiblingIteratorStrategy > 
NodeConstSiblingIterator
typedef
Inkscape::Util::ForwardPointerIterator
< Node,
NodeParentIteratorStrategy > 
NodeParentIterator
typedef
Inkscape::Util::ForwardPointerIterator
< Node,
NodeSiblingIteratorStrategy > 
NodeSiblingIterator
typedef
CompositeNodeObserver::ObserverRecord 
ObserverRecord
typedef
CompositeNodeObserver::ObserverRecordList 
ObserverRecordList

Enumerations

enum  EventType {
  EVENT_ADD, EVENT_DEL, EVENT_CHG_ATTR, EVENT_CHG_CONTENT,
  EVENT_CHG_ORDER, EVENT_ADD, EVENT_DEL, EVENT_CHG_ATTR,
  EVENT_CHG_CONTENT, EVENT_CHG_ORDER
}
 Enumeration of all XML event types. More...
enum  EventType {
  EVENT_ADD, EVENT_DEL, EVENT_CHG_ATTR, EVENT_CHG_CONTENT,
  EVENT_CHG_ORDER, EVENT_ADD, EVENT_DEL, EVENT_CHG_ATTR,
  EVENT_CHG_CONTENT, EVENT_CHG_ORDER
}
 Enumeration of all XML event types. More...
enum  NodeType {
  DOCUMENT_NODE, ELEMENT_NODE, TEXT_NODE, COMMENT_NODE,
  PI_NODE, DOCUMENT_NODE, ELEMENT_NODE, TEXT_NODE,
  COMMENT_NODE, PI_NODE
}
 Enumeration containing all supported node types. More...
enum  NodeType {
  DOCUMENT_NODE, ELEMENT_NODE, TEXT_NODE, COMMENT_NODE,
  PI_NODE, DOCUMENT_NODE, ELEMENT_NODE, TEXT_NODE,
  COMMENT_NODE, PI_NODE
}
 Enumeration containing all supported node types. More...

Functions

void attr_changed (Node *node, gchar const *name, gchar const *old_value, gchar const *new_value, bool, void *data)
void attr_changed (Node *node, gchar const *name, gchar const *old_value, gchar const *new_value, bool, void *data)
gchar * calc_abs_doc_base (gchar const *const doc_base)
void child_added (Node *node, Node *child, Node *ref, void *data)
void child_added (Node *node, Node *child, Node *ref, void *data)
void child_removed (Node *node, Node *child, Node *ref, void *data)
void child_removed (Node *node, Node *child, Node *ref, void *data)
void content_changed (Node *node, gchar const *old_content, gchar const *new_content, void *data)
void content_changed (Node *node, gchar const *old_content, gchar const *new_content, void *data)
static char * get_attr (CRXMLNodePtr n, char const *a)
static CRXMLNodePtr get_first_child (CRXMLNodePtr n)
static char const * get_local_name (CRXMLNodePtr n)
static CRXMLNodePtr get_next (CRXMLNodePtr n)
static CRXMLNodePtr get_parent (CRXMLNodePtr n)
static CRXMLNodePtr get_prev (CRXMLNodePtr cn)
bool id_permitted (Node const *node)
bool id_permitted_internal (GQuark qname)
bool id_permitted_internal (GQuark qname)
bool id_permitted_internal_memoized (GQuark qname)
bool id_permitted_internal_memoized (GQuark qname)
static gboolean is_element_node (CRXMLNodePtr n)
bool is_marked (ObserverRecord const &record)
bool is_marked (ObserverRecord const &record)
template<typename Predicate>
bool mark_one (ObserverRecordList &observers, unsigned &, Predicate p)
template<typename Predicate>
bool mark_one (ObserverRecordList &observers, unsigned &, Predicate p)
void order_changed (Node *node, Node *child, Node *old_ref, Node *new_ref, void *data)
void order_changed (Node *node, Node *child, Node *old_ref, Node *new_ref, void *data)
Nodeprevious_node (Node *node)
Inkscape::Util::List
< AttributeRecord const > 
rebase_href_attrs (gchar const *const old_abs_base, gchar const *const new_abs_base, Inkscape::Util::List< AttributeRecord const > attributes)
void rebase_hrefs (SPDocument *const doc, gchar const *const new_base, bool const spns)
void remove_all_marked (ObserverRecordList &observers, unsigned &marked_count)
void remove_all_marked (ObserverRecordList &observers, unsigned &marked_count)
template<typename Predicate>
bool remove_one (ObserverRecordList &observers, unsigned &, Predicate p)
template<typename Predicate>
bool remove_one (ObserverRecordList &observers, unsigned &, Predicate p)
void replay_log_to_observer (Event const *log, NodeObserver &observer)
Util::ptr_shared< char > stringify_node (Node const &node)
Util::ptr_shared< char > stringify_node (Node const &node)
void synthesize_events_recursive (Node &node, NodeObserver &observer)
void synthesize_events_recursive (Node &node, NodeObserver &observer)
void undo_log_to_observer (Event const *log, NodeObserver &observer)
Node const * next_node (Node const *node)
Node const * parent_node (Node const *node)
Node const * previous_node (Node const *node)

Variables

CRNodeIface const croco_node_iface
 Interface for XML nodes used by libcroco.
const NodeEventVector OBSERVER_EVENT_VECTOR


Generated by  Doxygen 1.6.0   Back to index