|
|
Donner SVG Editor & Engine
SVG-native editor and embeddable SVG2 + CSS3 engine in C++20, with GPU (WebGPU) and compact CPU renderers, built for correctness, security, and performance.
|
One flattened row of the Layers tree. The list is flat (not nested); nesting is conveyed by depth. Rows for descendants of a collapsed group are omitted, but hasChildren is still set on collapsed groups so the disclosure chevron renders. More...
#include "donner/editor/LayerTreeModel.h"
Public Attributes | |
| int | depth = 0 |
| Indentation depth. The root row is depth 0. | |
| std::string | displayName |
| Display name: the element id when non-empty, otherwise <tag>[n] where n is the element's zero-based index among its same-tag siblings. | |
| std::uint64_t | stableId = 0 |
| Stable identity used as the expansion/selection key. Derived from the element's ECS entity id; stable across refreshes until a full document rebuild (the same lifetime guarantee SidebarPresenter relies on). | |
| svg::SVGElement | element |
| The editable SVG element this row maps to. Valid until a full document rebuild, at which point the model is refreshed on the next idle frame. | |
| bool | hasChildren = false |
| True when this row has editor-visible children (so a chevron is shown). | |
| bool | isExpanded = false |
| True when this row is currently expanded (only meaningful when hasChildren). | |
| bool | isVisible = true |
| True when the element is visible (display != none, visibility != hidden). | |
| bool | isLocked = false |
| True when the element (or one of its ancestors) is locked via the data-donner-locked="true" marker attribute. Locked rows are protected from geometry-changing edits and deletion (see IsLocked in LockState.h). | |
| bool | isSelected = false |
| True when the element is in the editor selection. | |
| bool | isPartiallySelected = false |
| True for a group that is not itself selected but has at least one transitive descendant in the selection (some-but-not-all). | |
| LayerRowKind | kind = LayerRowKind::Other |
| Row classification. | |
One flattened row of the Layers tree. The list is flat (not nested); nesting is conveyed by depth. Rows for descendants of a collapsed group are omitted, but hasChildren is still set on collapsed groups so the disclosure chevron renders.
| int donner::editor::LayerTreeRow::depth = 0 |
Indentation depth. The root row is depth 0.
| std::string donner::editor::LayerTreeRow::displayName |
Display name: the element id when non-empty, otherwise <tag>[n] where n is the element's zero-based index among its same-tag siblings.
| svg::SVGElement donner::editor::LayerTreeRow::element |
The editable SVG element this row maps to. Valid until a full document rebuild, at which point the model is refreshed on the next idle frame.
| bool donner::editor::LayerTreeRow::hasChildren = false |
True when this row has editor-visible children (so a chevron is shown).
| bool donner::editor::LayerTreeRow::isExpanded = false |
True when this row is currently expanded (only meaningful when hasChildren).
| bool donner::editor::LayerTreeRow::isLocked = false |
True when the element (or one of its ancestors) is locked via the data-donner-locked="true" marker attribute. Locked rows are protected from geometry-changing edits and deletion (see IsLocked in LockState.h).
| bool donner::editor::LayerTreeRow::isPartiallySelected = false |
True for a group that is not itself selected but has at least one transitive descendant in the selection (some-but-not-all).
| bool donner::editor::LayerTreeRow::isSelected = false |
True when the element is in the editor selection.
| bool donner::editor::LayerTreeRow::isVisible = true |
True when the element is visible (display != none, visibility != hidden).
| LayerRowKind donner::editor::LayerTreeRow::kind = LayerRowKind::Other |
Row classification.
| std::uint64_t donner::editor::LayerTreeRow::stableId = 0 |
Stable identity used as the expansion/selection key. Derived from the element's ECS entity id; stable across refreshes until a full document rebuild (the same lifetime guarantee SidebarPresenter relies on).