What problem does it solve?
Developers modifying the Gum editor's left-hand element tree panel need to understand its non-obvious architecture—model-based selection, diff-based refresh, drag payload workarounds, and icon tinting—before making changes that could silently break selection, expansion state, or theming.
Core Features & Use Cases
- File Map: Locates every relevant source file, from
GumTreeView.cs and ElementTreeViewManager to TreeIconRegistry and the headless Gum.Presentation logic twins.
- Architecture Guidance: Explains why selection lives on
GumTreeNode rather than TreeViewItem, how diff-based RefreshUi() preserves scroll and selection, and how RefreshCoalescer batches bulk imports.
- Gotcha Catalog: Documents pitfalls like remove-then-insert reordering,
TreeDragPayload replacing DataObject, backslash-separated FullPath, and persisted expansion state formats.
- Use Case: When adding a new node type or icon to the Gum tree panel, follow the documented steps—add a constant in
TreeNodeImageIndices, register it in TreeIconRegistry, and supply a white-on-transparent PNG.
Quick Start
Ask the AI to explain how to add a new icon or node type to the Gum element tree panel using this reference.