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

A docking area: the split/tab tree and the panels its leaves refer to by ID. More...

#include <gui_controls/gui_docking_types.h>

Public Attributes

std::unique_ptr< tachyon::DockNode > root
 the dock tree; leaves hold panel tabs
std::unordered_map< tachyon::ID, Panel > panels
 every panel of this layout, by ID
tachyon::ID hostWindowID = tachyon::ID::Invalid()
 OS window hosting this layout, refreshed each frame.
bool tabsInTitleBar = false
 A torn-off window's layout: a root leaf puts its tabs in the window's title bar.
std::function< void()> onDock
 the title bar's Dock button (none when unset)

Detailed Description

A docking area: the split/tab tree and the panels its leaves refer to by ID.

const ID scene = CreatePanel(layout.panels, "Scene", IconID::Invalid, [this] { ScenePanel(); });
const ID log   = CreatePanel(layout.panels, "Log",   IconID::Invalid, [this] { LogPanel(); });
layout.root = MakeSplit(DockSplitMode::LeftPinned, 220, MakeLeaf({ scene }), MakeLeaf({ log }));

// In OnGUI, inside a window:
BeginDockingContainer(dockID, &layout, LayoutOverride::Auto());
EndDockingContainer();
EmitFloatingDockWindows(); 
Examples
docking/docking.cpp.

Member Data Documentation

◆ root

std::unique_ptr<tachyon::DockNode> tachyon::DockingLayout::root

the dock tree; leaves hold panel tabs

◆ panels

std::unordered_map<tachyon::ID, Panel> tachyon::DockingLayout::panels

every panel of this layout, by ID

◆ hostWindowID

tachyon::ID tachyon::DockingLayout::hostWindowID = tachyon::ID::Invalid()

OS window hosting this layout, refreshed each frame.

A cross-window tab drop raises it, since the OS may otherwise focus an arbitrary window when the source closes.

◆ tabsInTitleBar

bool tachyon::DockingLayout::tabsInTitleBar = false

A torn-off window's layout: a root leaf puts its tabs in the window's title bar.

◆ onDock

std::function<void()> tachyon::DockingLayout::onDock

the title bar's Dock button (none when unset)


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