|
TachyonUI 1.1.0
High-performance UI for building tools.
|
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) | |
| std::function< void(DockingLayout &layout, tachyon::ID leafNodeID)> | newTabMenu |
| Builds the items of a tab group's "+" menu, after its last tab: the panels that can be added there, each adding one with AddPanelToLeaf(layout.root.get(), leafNodeID, id). | |
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();
Panels torn off it float in windows that dock back into it: before destroying a layout while the app runs on, call ForgetDockingLayout (CloseDocument does for a document's).
| std::unique_ptr<tachyon::DockNode> tachyon::DockingLayout::root |
the dock tree; leaves hold panel tabs
| std::unordered_map<tachyon::ID, Panel> tachyon::DockingLayout::panels |
every panel of this layout, by ID
| 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.
| bool tachyon::DockingLayout::tabsInTitleBar = false |
A torn-off window's layout: a root leaf puts its tabs in the window's title bar.
| std::function<void()> tachyon::DockingLayout::onDock |
the title bar's Dock button (none when unset)
| std::function<void(DockingLayout& layout, tachyon::ID leafNodeID)> tachyon::DockingLayout::newTabMenu |
Builds the items of a tab group's "+" menu, after its last tab: the panels that can be added there, each adding one with AddPanelToLeaf(layout.root.get(), leafNodeID, id).
No "+" when unset. A torn-off window's layout takes its home layout's.