TachyonUI 0.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
controls_toolbar_dock.h File Reference
#include <gui_core/gui_id.h>
#include <gui_core/gui_base_types.h>
#include <chrono>
#include <functional>
#include <string_view>
#include <vector>

Go to the source code of this file.

Classes

struct  tachyon::ToolbarDockState
 Per-instance state for one toolbar dock. More...
struct  tachyon::ToolbarItem
 One toolbar item. More...
struct  tachyon::ToolbarDockCallbacks
 Callbacks through which RenderToolbarDock changes the caller's data; the dock never touches that data itself. More...
struct  tachyon::FloatingToolbarItem
 A torn-off toolbar in its own OS window, owned by the caller. More...
struct  tachyon::FloatingToolbarOptions
 Enables dragging a floating toolbar back onto a dock side; both fields are required, otherwise the drag handle only moves the OS window. More...

Namespaces

namespace  tachyon

Enumerations

enum class  tachyon::ToolbarSide : uint8_t { tachyon::ToolbarSide::Top = 0 , tachyon::ToolbarSide::Right = 1 , tachyon::ToolbarSide::Bottom = 2 , tachyon::ToolbarSide::Left = 3 }
 A side of a toolbar dock; indexes the per-side arrays. More...

Functions

void tachyon::InitializeToolbarDockState (ToolbarDockState &state, GUIApplication &app)
 Allocates the state's static IDs; call once before the first RenderToolbarDock.
void tachyon::ReleaseToolbarDockState (ToolbarDockState &state, GUIApplication &app)
 Releases the IDs allocated by InitializeToolbarDockState.
void tachyon::RenderToolbarDock (GUIApplication &app, ToolbarDockState &state, const std::vector< ToolbarItem >(&itemsPerSide)[kToolbarSideCount], const ToolbarDockCallbacks &callbacks, std::function< void()> renderContent)
 Renders the 5-zone scaffold (top / left | content | right / bottom) with a reorderable group per side.

Variables

constexpr int tachyon::kToolbarSideCount = 4
 number of ToolbarSide values