|
|
Donner 0.8.0-pre
Embeddable browser-grade SVG2 engine
|
Central mutation service for SVG DOM tree edits. More...
#include "donner/svg/components/TreeMutation.h"
Static Public Member Functions | |
| static void | InsertBefore (EntityHandle parent, EntityHandle newNode, EntityHandle referenceNode=EntityHandle()) |
Insert newNode as a child of parent before referenceNode. | |
| static void | AppendChild (EntityHandle parent, EntityHandle child) |
Append child as the last child of parent. | |
| static void | ReplaceChild (EntityHandle parent, EntityHandle newChild, EntityHandle oldChild) |
Replace oldChild with newChild under parent. | |
| static void | RemoveChild (EntityHandle parent, EntityHandle child) |
Remove child from parent. | |
| static void | Remove (EntityHandle entity) |
Remove entity from its parent, if it has one. | |
Central mutation service for SVG DOM tree edits.
TreeMutation is the public SVG layer's single path for inserting, replacing, and detaching SVG element entities. It wraps the low-level donner::components::TreeComponent link operations with SVG-specific validation, dirty-flag propagation, render-tree invalidation, and node-lifetime state updates.
|
static |
Append child as the last child of parent.
| parent | Parent entity to receive the child. |
| child | Entity to append. |
|
static |
Insert newNode as a child of parent before referenceNode.
If referenceNode is invalid, newNode is appended.
| parent | Parent entity to receive the child. |
| newNode | Entity to insert. |
| referenceNode | Existing child to insert before, or an invalid handle to append. |
|
static |
Remove entity from its parent, if it has one.
| entity | Entity to detach from its parent. |
|
static |
Remove child from parent.
The child entity and its descendants remain alive as a detached subtree.
| parent | Parent entity whose child is removed. |
| child | Existing child to detach. |
|
static |
Replace oldChild with newChild under parent.
| parent | Parent entity whose child is replaced. |
| newChild | Replacement entity. |
| oldChild | Existing child to detach. |