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 |
| The eye state the Layers panel draws for this row, and the value the eye toggle inverts. True when the element is shown on both axes: the display axis, read from the element's own display attribute when that attribute names a value and from computed style otherwise, and the visibility axis, always read from computed style. The axes are asymmetric about ancestors, following CSS inheritance: visibility inherits, so a row inside a visibility="hidden" group reads hidden unless it overrides it, while display does not, so a row inside a display="none" group keeps an open eye. Because the toggle writes only display, this can report an open eye for an element a higher-priority stylesheet display rule keeps unpainted, and a closed eye the toggle cannot open for an element hidden by visibility. | |
| 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 |
The eye state the Layers panel draws for this row, and the value the eye toggle inverts. True when the element is shown on both axes: the display axis, read from the element's own display attribute when that attribute names a value and from computed style otherwise, and the visibility axis, always read from computed style. The axes are asymmetric about ancestors, following CSS inheritance: visibility inherits, so a row inside a visibility="hidden" group reads hidden unless it overrides it, while display does not, so a row inside a display="none" group keeps an open eye. Because the toggle writes only display, this can report an open eye for an element a higher-priority stylesheet display rule keeps unpainted, and a closed eye the toggle cannot open for an element hidden by visibility.
| 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).