UIDock.h file
Docking: panels the user arranges into splits and tab groups by dragging tabs.
inline constexpr GGPanel Outliner{ "Editor.Outliner", "Outliner" }; dock.Panel(Outliner, [](UI& ui) { OutlinerPanel(ui); }); dock.SetDefault(GGDock::Columns({ { 0.25f, GGDock::Tabs({ Outliner }) }, { 0.75f, GGDock::Rows({ { 0.7f, GGDock::Tabs({ Viewport }) }, { 0.3f, GGDock::Tabs({ Content, Log }) } }) } })); ui.Dock(dock); // in the window's document, where the panels go
Layouts are named. "Default" is the one set in code; it can't be overwritten and is always available. Save() / Load() serialise every layout as hand-editable text:
using Animation current window main columns 0.25 0.75 tabs Editor.Outliner tabs Editor.Viewport Editor.Log* (* = active tab) layout Animation window main tabs Editor.Viewport Editor.Timeline*
Panels are referenced by Name, so a layout survives title and language changes. A layout that names an undeclared panel keeps the name and shows the panel once it is declared.
Namespaces
- namespace GGUI
- namespace GGUI::GGDock
- Builders for describing a layout in code.
Classes
- struct GGUI::GGPanel
- A dockable panel. Declare as a constant; the strings must outlive every use.
- struct GGUI::PanelProps
- How a panel behaves.
- struct GGUI::GGDockDrag
- Drag payload for a panel's tab. Public so the host can route it between windows.
- struct GGUI::GGDockNode
- One node of a layout description: a tab group, or a split of child nodes.
- struct GGUI::GGDockLayout
- A layout: one root node per window. Windows[0] is the main window.
- struct GGUI::GGDockLayout::Window
- A window of the layout.
- struct GGUI::GGDock::Part
- A child of a split, and its share.
- struct GGUI::DockProps
- Properties of ui.Dock.
- class GGUI::GGDockSpace
- GGDockSpace: the registered panels and their current layout, across all dock windows.
- struct GGUI::GGDockSpace::WindowInfo
- A floating window, as the host makes it.
- struct GGUI::GGDockSpace::PanelInfo
- A registered panel, for menus.