TachyonUI 0.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
tachyon::DockNode Struct Reference

Docking tree node: a leaf with panel tabs, or a split with two children where splitSize applies to the pinned child. More...

#include <gui_controls/gui_dock_node.h>

Public Attributes

ID nodeID = ID::Invalid()
 ID of the node's container element; assigned lazily in BeginDockingContainer.
ID tabBarID = ID::Invalid()
 ID of a leaf's tab bar.
bool isLeaf = true
 false = a split with first and second
std::vector< ID > panelIds
 the leaf's tabs, in order (Panel IDs in the DockingLayout)
int selectedTab = 0
 index into panelIds of the visible panel
int selectedTabBeforeDrag = 0
 restored on drag-out
TabBarLayout tabLayout = TabBarLayout::OneRow
 picked from the tab bar's context menu; saved
ID lastContentID = ID::Invalid()
 Content element of the visible tab; written during construction, read by SyncDockingScrollOffsets after dispatch.
ID lastContentPanelID = ID::Invalid()
 Panel that lastContentID belongs to.
IntRect cachedContentRect {}
 Last frame's content rect (screen space), for hit-testing during construction, when this frame's rects aren't laid out yet.
IntRect cachedLeafRect {}
 tab bar + content
IntRect cachedTabBarRect {}
 tab bar
IntRect cachedSplitRect {}
 split container, to clamp the split size
std::vector< IntRect > cachedTabRects {}
 per tab, for the insertion preview
DockSplitMode mode = DockSplitMode::LeftPinned
 direction and pinned child
CssPx splitSize = 200
 pinned child's size; mode says which child that is
CssPx minFirstSize = 80
 first child's minimum when dragging the sizer
CssPx minSecondSize = 80
 second child's minimum when dragging the sizer
std::unique_ptr< DockNode > first
 left / top child
std::unique_ptr< DockNode > second
 right / bottom child

Detailed Description

Docking tree node: a leaf with panel tabs, or a split with two children where splitSize applies to the pinned child.

No application dependencies, so it's unit-testable.

Member Data Documentation

◆ nodeID

ID tachyon::DockNode::nodeID = ID::Invalid()

ID of the node's container element; assigned lazily in BeginDockingContainer.

◆ tabBarID

ID tachyon::DockNode::tabBarID = ID::Invalid()

ID of a leaf's tab bar.

Distinct from nodeID, since the tab bar is a child of the node's container and FindElementRefByID returns the first match.

◆ isLeaf

bool tachyon::DockNode::isLeaf = true

false = a split with first and second

◆ panelIds

std::vector<ID> tachyon::DockNode::panelIds

the leaf's tabs, in order (Panel IDs in the DockingLayout)

◆ selectedTab

int tachyon::DockNode::selectedTab = 0

index into panelIds of the visible panel

◆ selectedTabBeforeDrag

int tachyon::DockNode::selectedTabBeforeDrag = 0

restored on drag-out

◆ tabLayout

TabBarLayout tachyon::DockNode::tabLayout = TabBarLayout::OneRow

picked from the tab bar's context menu; saved

◆ lastContentID

ID tachyon::DockNode::lastContentID = ID::Invalid()

Content element of the visible tab; written during construction, read by SyncDockingScrollOffsets after dispatch.

◆ lastContentPanelID

ID tachyon::DockNode::lastContentPanelID = ID::Invalid()

Panel that lastContentID belongs to.

Stored because a tab click during dispatch has already changed selectedTab while the scroll handle still belongs to the old tab.

◆ cachedContentRect

IntRect tachyon::DockNode::cachedContentRect {}

Last frame's content rect (screen space), for hit-testing during construction, when this frame's rects aren't laid out yet.

The other cached* rects work the same.

◆ cachedLeafRect

IntRect tachyon::DockNode::cachedLeafRect {}

tab bar + content

◆ cachedTabBarRect

IntRect tachyon::DockNode::cachedTabBarRect {}

tab bar

◆ cachedSplitRect

IntRect tachyon::DockNode::cachedSplitRect {}

split container, to clamp the split size

◆ cachedTabRects

std::vector<IntRect> tachyon::DockNode::cachedTabRects {}

per tab, for the insertion preview

◆ mode

DockSplitMode tachyon::DockNode::mode = DockSplitMode::LeftPinned

direction and pinned child

◆ splitSize

CssPx tachyon::DockNode::splitSize = 200

pinned child's size; mode says which child that is

◆ minFirstSize

CssPx tachyon::DockNode::minFirstSize = 80

first child's minimum when dragging the sizer

◆ minSecondSize

CssPx tachyon::DockNode::minSecondSize = 80

second child's minimum when dragging the sizer

◆ first

std::unique_ptr<DockNode> tachyon::DockNode::first

left / top child

◆ second

std::unique_ptr<DockNode> tachyon::DockNode::second

right / bottom child


The documentation for this struct was generated from the following file: