TachyonUI 0.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
tachyon::GUIApplication Class Referenceabstract

The application: owns the windows, the systems and the frame loop. More...

#include <gui_controls/gui_application.h>

Classes

struct  FrameTimingSample
 Rolling per-frame timing history in ms, recorded only while profiling is enabled. More...
class  Scope
 A container's scope: its End runs when the scope leaves (or at End()). More...
struct  SettingsPanelState
 What RenderSettingsPanel shows: its pages, the selected one and the tree width. More...

Public Attributes

std::unique_ptr< InputManager > inputManager
 Routes input events to the elements; also holds global handlers. Created by Initialize.
std::unique_ptr< LayoutEngine > layoutEngine
 Lays out the elements each frame. Created by Initialize.
std::unique_ptr< OSWindowManager > windowManager
 The OS windows and their render contexts. Created by Initialize.
std::unique_ptr< TextAtlasManager > textAtlasManager
 The glyph atlas. Created by Initialize.
std::unique_ptr< IClipboard > clipboard
 from SetClipboard
ITextSystem * textSystem { nullptr }
 Shapes, measures and edits text. Created by Initialize.
IWindowBackend * windowBackend { nullptr }
 SetWindowBackend's windows plus render-to-image windows.
GraphicsContext * graphicsContext { nullptr }
 the backend from SetGraphicsBackend
GUIRenderer * guiRenderer { nullptr }
 The graphics backend's renderer.
IDManager idManager {}
 Element IDs: static ones (CreateStaticID), call-site ones (AllocateDynamicID) and parent scopes (PushParent / PopParent).
GUIStateManager guiStateManager {}
 Per-element interaction state (hover, focus, clicks) and the construction stacks (disabled, selected).
TransitionManager transitionManager {}
 In-progress visual state transitions, per element.
TabChainManager tabChainManager {}
 The Tab-key focus order, rebuilt each frame.
MenuManager menuManager {}
 The open menus and the menu bar's triggers.
TooltipManager tooltipManager {}
 When a tooltip shows (delaySeconds) and for which element.

Friends

class GUIApplicationInternals
 GUIApplicationInternals (gui_application_internal.h) re-exposes these to the library's own code and the tests.

Setup and resources

using InitializeOptions = GUIApplicationInitializeOptions
 See GUIApplicationInitializeOptions.
virtual ~GUIApplication ()=default
 See GUIApplicationInitializeOptions.
virtual Result< void > Initialize (const InitializeOptions &options={})
 Creates the backends not set before, the window manager, the text system and the subsystems, and loads the theme.
virtual void Cleanup ()
 Releases what Initialize created, including the backends set before it.
Result< void > InitializeStyles ()
 Loads the current theme at the current font scale; an error when it can't be opened.
virtual void OnStylesReloaded ()
 Called after every successful theme/font reload (and by subclasses at startup) to re-register styles/icons the reload wiped.
void RequestReloadTheme (std::string_view themePath, float fontScale)
 Deferred to the start of the next frame; safe from event handlers.
const Result< void > & ThemeReloadResult () const
 How the last reload went; on an error the previous theme stays.
const std::string & GetThemePath () const
 See GUIApplicationInitializeOptions.
void SetResourceRoot (std::string_view root)
 The folder the resources load from: compiled shaders, default fonts and relative theme paths.
const std::string & GetResourceRoot () const
 See GUIApplicationInitializeOptions.

State

GradientManager gradientManager {}
 GPU pages for the gradients styles use.
StyleManager styleManager { gradientManager }
 The registered styles; Px converts CSS pixels to pixels at the UI scale.
ElementStorage elementStorage { styleManager, &guiStateManager.GetElementDataStore() }
 This frame's element tree.
WindowRegistry windowRegistry {}
 The elements of each window, filled as the windows are built.
CommandManager commandManager {}
 Commands, their shortcuts and the undo history.
InputHandlerBroadcaster inputBroadcaster {}
 Sends each platform input event to the input manager and the text system.
OnGuiFunc onGui {}
 Runs a frame from inside the OS's modal resize loop, so windows repaint while resized.
GUITheme theme {}
 The loaded theme: the style refs, icons and metrics the controls use; theme.GetStyle finds a CSS class.
bool applicationQuit = false
 Set to true to end Run (UpdateFrame then returns false).
std::chrono::steady_clock::time_point m_frameStart {}
 Internal: when the current frame started (set by UpdateFrame).
float frameTime = 0.0f
 The last frame's duration in seconds, including any vsync wait.
float frameBuildTime = 0.0f
 CPU work per frame, excluding the vsync stall in present.
static constexpr int kFrameHistoryCount = 240
 ~4s @ 60fps
void GetFrameTimingHistory (std::span< FrameTimingSample > out) const
 Copies the ring chronologically (oldest first) into out.

Panels and floating windows

void CreatePanel (std::unordered_map< tachyon::ID, tachyon::Panel > &panels, ID id, std::string title, tachyon::IconID icon, std::function< void()> onPanelGUI, std::string panelType={}, std::function< void()> onEnable={}, std::function< void()> onDisable={})
 Adds a panel to panels (usually a DockingLayout's).
tachyon::ID CreatePanel (std::unordered_map< tachyon::ID, tachyon::Panel > &panels, std::string title, tachyon::IconID icon, std::function< void()> onPanelGUI, std::string panelType={}, std::function< void()> onEnable={}, std::function< void()> onDisable={})
 As above, with a new static ID, which it returns.
void DisableAllPanels (DockingLayout &layout)
 Panel lifecycle.
void EmitFloatingToolbarWindows (std::vector< struct FloatingToolbarItem > &floatingItems, const struct FloatingToolbarOptions *options=nullptr)
 One OS window per floating toolbar. Closed windows are erased and their IDs released.
DockLeafResult FindDockLeafAtScreenPos (tachyon::int2 screenPos)
 Dock leaf whose tab bar contains screenPos, plus its owning layout (needed by TransferPanel for cross-layout drops).
DockDropResult FindDockDropTargetAtScreenPos (tachyon::int2 screenPos)
 Hit-tests leaf content areas; falls back to tab bars with zone=Center.
void EmitFloatingDockWindows ()
 Call from OnGUI after the main docking container. Empty windows are closed.
void EmitFloatingDockWindows (const DocumentSet &documents)
 With documents in several main windows: in each, after its Documents, the windows of the panels torn from its documents.
bool FloatPanel (DockingLayout &layout, ID panelID, int2 screenPos)
 Moves a docked panel into its own window at a screen position, as tearing its tab off does; the window's Dock button returns it.
void CloseFloatingDockWindow (size_t index)
 Closes the window for good: its panels are disabled and destroyed.
void CloseDockedPanel (DockingLayout &layout, DockNode &leaf, int tabIndex)
 Closes the panel at tabIndex of a docked leaf, as the tab's Close action does.
Document & CreateDocument (DocumentSet &set, std::string name, std::string extension, std::string kind, tachyon::IconID icon)
 Adds a document at the end of set, with new static IDs and an empty layout, which the caller fills (CreatePanel, MakeLeaf).
void CloseDocument (DocumentSet &set, int index)
 Closes set's document at index for good: its panels are disabled and destroyed, its torn-off panel windows closed, its IDs released and its layout no longer saved (PersistDocking).
static void TransferPanel (tachyon::ID panelID, tachyon::DockNode *sourceNode, DockingLayout *sourceLayout, DockingLayout *targetLayout)
 Moves a panel from sourceNode/sourceLayout to targetLayout, fixing up selectedTab.

Input for render-to-image windows

void InjectMouseMove (ID windowID, int2 pos, KeyModifier mods=KeyModifier::None)
 Input for render-to-image windows (WindowFlags::RenderToImage), which get none from the OS.
void InjectMouseButton (ID windowID, int2 pos, MouseButtons button, bool down, KeyModifier mods=KeyModifier::None)
 A button press (down) or release at pos.
void InjectMouseScroll (ID windowID, int2 pos, float2 offset, KeyModifier mods=KeyModifier::None)
 A wheel scroll by offset at pos.
void InjectMouseLeave (ID windowID)
 The pointer left the window.
void InjectFocus (ID windowID, bool focused)
 Gives the window keyboard focus, or takes it away.
void InjectKey (ID windowID, KeyCode key, KeyAction action, KeyModifier mods=KeyModifier::None)
 A key event; typed text goes through InjectText.
void InjectText (ID windowID, std::string_view utf8)
 Typed text, one character event per codepoint.
Result< void > ReadWindowPixels (ID windowID, std::span< uint8_t > bgra)
 The last rendered frame of a render-to-image window: BGRA8, tightly packed rows, bgra holding width x height x 4 bytes of its pixel size.

Backends, styles and scale

void SetGraphicsBackend (std::unique_ptr< GraphicsContext > backend)
 The graphics backend Initialize uses; without one it creates a vulkan::VulkanGraphicsContext.
void SetWindowBackend (std::unique_ptr< IWindowBackend > backend)
 The OS windows and their input; Initialize wraps it to add render-to-image windows.
void SetClipboard (std::unique_ptr< IClipboard > clipboardImpl)
 Copy and paste for text fields.
void SetAllocationHooks (const AllocationHooks &hooks)
 Host memory functions for what can be routed: Vulkan objects, VMA, vk-bootstrap and SDL (only when the GUI starts SDL).
void SetStyleFiles (std::span< const std::string_view > files)
 The CSS rule files loaded after the palette, in order; relative paths are next to the palette file.
float GetGlobalFontScale () const
 The graphics backend Initialize uses; without one it creates a vulkan::VulkanGraphicsContext.
void SetUIScale (float scale)
 Extra UI zoom on top of the main window's display scale (1 follows the OS).
float GetUIScale () const
 The graphics backend Initialize uses; without one it creates a vulkan::VulkanGraphicsContext.
void SetReducedMotion (std::optional< bool > reduced)
 Reduced motion: changes of state show at once instead of blending.
bool IsThemeCrossfading () const
 True while a theme switch is crossfading (the old look fading out over the new).
bool IsReducedMotion () const
 Whether changes of state show at once now.

The frame

virtual void OnGUI ()=0
 Builds the UI; called each frame.
Result< void > Run ()
 Loops over the frame calls below until the app quits; an error when the GPU device was lost and couldn't be made again (a host's device).
bool UpdateFrame ()
 One frame, for a host with its own main loop:
Result< void > RecordFrame ()
 See UpdateFrame.
void PresentFrame ()
 See UpdateFrame.

Event handlers and control building blocks

tachyon::EventHandler MakeToggleHandler (bool &toggle)
 A handler that flips toggle on click.
tachyon::EventHandler MakeButtonHandler (std::function< void()> onClick)
 A handler that calls onClick on click.
tachyon::EventHandler MakeLabelHandler ()
 A label's handler: a click focuses the control the label belongs to.
tachyon::ElementRef RegisterElement (tachyon::Element &&element, LayoutOverride &&constraints)
 Adds an element, with its interaction state, to the current window; for custom elements.
tachyon::ElementRef RegisterElement (tachyon::Element &&element, std::string_view text, LayoutOverride &&constraints)
 As above, with Text registered as its text.
bool TakeEscapeFor (ID popupWindowID, ID triggerID)
 While building a popup's trigger: true, and the key taken, when Escape was pressed this frame with the keyboard in the popup's window or on the trigger.
tachyon::ElementRef RegisterControl (tachyon::Element &&element, LayoutOverride &&constraints)
 As RegisterElement, for a control: it joins the Tab order and needs a valid ID.
tachyon::ElementRef RegisterControl (tachyon::Element &&element, std::string_view text, LayoutOverride &&constraints)
 As above, with Text registered as its text.
tachyon::ElementRef RegisterControl (tachyon::Element &&element, std::function< TextID(tachyon::Element &element)> createTextID, LayoutOverride &&constraints)
 As above; createTextID registers the text, given the element with its current state.
tachyon::ElementRef MenuItemRow (ID id, tachyon::EventHandler handler, StyleRef rowStyle, bool reserveIcon, IconID icon, std::string_view text, std::string_view trailing, StyleRef trailingStyle, LayoutOverride &&constraints, bool destructive=false)
 A menu row: an icon slot, the label and a trailing text (a shortcut or a submenu arrow).
bool MenuItemImpl (ID id, const GUIContent &content, std::string_view shortcut, std::function< void()> onClick, StyleRef style, bool destructive, LayoutOverride &&constraints)
 SearchField, also giving the ID of its text field (to focus it).
void ShowContentTooltip (ID id, const GUIContent &content)
 The content's tooltip, if it has one, on the control id.
bool BeginIndeterminate ()
 Value fields emitted in between show a dash for mixed values (e.g.
void EndIndeterminate ()
 Closes BeginIndeterminate.

Buttons and toggles

bool Button (ID id, const GUIContent &content, std::function< void()> onClick, StyleRef style, LayoutOverride &&constraints={})
 Controls take (id, icon, text, ..., style, constraints), each part optional.
bool Button (ID id, const GUIContent &content, std::function< void()> onClick, LayoutOverride &&constraints={})
 As above, in the theme's button style.
bool Button (const GUIContent &content, std::function< void()> onClick, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool Button (const GUIContent &content, std::function< void()> onClick, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's button style.
bool CommandButton (CommandID command, StyleRef style, LayoutOverride &&constraints={})
 Icon button for a command; the tooltip shows its name and shortcut, e.g. "Undo (Ctrl+Z)".
bool CommandButton (CommandID command, LayoutOverride &&constraints={})
 As above, in the theme's button style.
bool Checkbox (ID id, bool value, std::string_view text, std::function< void(bool)> onToggle, StyleRef style, LayoutOverride &&constraints={})
 A checkbox (a box, checked with a tick) and its label; a click calls onToggle with the new value.
bool Checkbox (ID id, bool value, std::string_view text, std::function< void(bool)> onToggle, LayoutOverride &&constraints={})
 As above, in the theme's checkbox style.
bool Checkbox (bool value, std::string_view text, std::function< void(bool)> onToggle, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool Checkbox (bool value, std::string_view text, std::function< void(bool)> onToggle, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's checkbox style.
bool Checkbox (ID id, bool &value, std::string_view text, StyleRef style, LayoutOverride &&constraints={})
 Checks and unchecks value itself.
bool Checkbox (ID id, bool &value, std::string_view text={}, LayoutOverride &&constraints={})
 As above, in the theme's checkbox style.
bool Checkbox (bool &value, std::string_view text, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool Checkbox (bool &value, std::string_view text={}, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's checkbox style.
bool Switch (ID id, bool value, std::string_view text, std::function< void(bool)> onToggle, StyleRef style, LayoutOverride &&constraints={})
 An on/off switch (track and knob) with an optional label after it, e.g. "On".
bool Switch (ID id, bool value, std::string_view text, std::function< void(bool)> onToggle, LayoutOverride &&constraints={})
 As above, in the theme's switch style.
bool Switch (bool value, std::string_view text, std::function< void(bool)> onToggle, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool Switch (bool value, std::string_view text, std::function< void(bool)> onToggle, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's switch style.
bool Switch (ID id, bool &value, std::string_view text, StyleRef style, LayoutOverride &&constraints={})
 Switches value itself.
bool Switch (ID id, bool &value, std::string_view text={}, LayoutOverride &&constraints={})
 As above, in the theme's switch style.
bool Switch (bool &value, std::string_view text, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool Switch (bool &value, std::string_view text={}, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's switch style.
bool Toggle (ID id, bool value, const GUIContent &content, std::function< void(bool)> onToggle, StyleRef style, LayoutOverride &&constraints={})
 A button that shows pressed while value is on; a click calls onToggle with the new value.
bool Toggle (ID id, bool value, const GUIContent &content, std::function< void(bool)> onToggle, LayoutOverride &&constraints={})
 As above, in the theme's toggle style.
bool Toggle (bool value, const GUIContent &content, std::function< void(bool)> onToggle, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool Toggle (bool value, const GUIContent &content, std::function< void(bool)> onToggle, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's toggle style.
bool Toggle (ID id, bool &value, const GUIContent &content, StyleRef style, LayoutOverride &&constraints={})
 Toggles value itself.
bool Toggle (ID id, bool &value, const GUIContent &content, LayoutOverride &&constraints={})
 As above, in the theme's toggle style.
bool Toggle (bool &value, const GUIContent &content, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool Toggle (bool &value, const GUIContent &content, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's toggle style.

Menus and message dialogs

bool BeginMenu (ID id, std::string_view text, StyleRef buttonStyle, StyleRef menuStyle, StyleRef itemStyle, LayoutOverride &&constraints={})
 A menu: a trigger button (in a menu bar or on its own), or a submenu item inside another menu.
bool BeginMenu (ID id, std::string_view text, LayoutOverride &&constraints={})
 As above, in the theme's menu styles.
bool BeginMenu (std::string_view text, StyleRef buttonStyle, StyleRef menuStyle, StyleRef itemStyle, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool BeginMenu (std::string_view text, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's menu styles.
bool Dropdown (ID id, int &selected, std::span< const std::string_view > options, StyleRef style, LayoutOverride &&constraints={})
 A dropdown: a field showing options[selected] that opens the list of options under itself.
bool Dropdown (ID id, int &selected, std::span< const std::string_view > options, LayoutOverride &&constraints={})
 As above, in the theme's dropdown style.
bool Dropdown (int &selected, std::span< const std::string_view > options, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool Dropdown (int &selected, std::span< const std::string_view > options, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's dropdown style.
bool Dropdown (ID id, int &selected, std::initializer_list< std::string_view > options, LayoutOverride &&constraints={})
 With the options written in place: Dropdown(quality, { "Low", "Medium", "High" }).
bool Dropdown (int &selected, std::initializer_list< std::string_view > options, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool Dropdown (ID id, int &selected, std::initializer_list< std::string_view > options, StyleRef style, LayoutOverride &&constraints={})
 As above, in style.
bool Dropdown (int &selected, std::initializer_list< std::string_view > options, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in style.
void MenuHeader (std::string_view text)
 A section's name between items, e.g. "View", lined up with the labels.
int MessageDialog (ID id, const MessageDialogDesc &desc, StyleRef style)
 A modal question with verb buttons, centered.
int MessageDialog (ID id, const MessageDialogDesc &desc)
 As above, in the theme's message box style.
int MessageDialog (const MessageDialogDesc &desc, StyleRef style, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
int MessageDialog (const MessageDialogDesc &desc, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's message box style.
ToastID ShowToast (ToastDesc desc)
 Shows a toast in the corner of the window that builds Toasts.
ToastDesc * FindToast (ToastID toast)
 A shown toast's description, to change (its progress, its body); null once it's gone.
void DismissToast (ToastID toast)
 Takes a toast away, as its close button does.
void Toasts ()
 The toasts, in the current window's bottom-right corner over what's built before; call it last in the window.
void Banner (ID id, Severity severity, const GUIContent &message, std::span< const BannerAction > actions={}, LayoutOverride &&constraints={})
 A banner across the top of a panel: the message (message.icon, else the severity's) on the severity's tint, then actions, right-aligned.
void Banner (Severity severity, const GUIContent &message, std::span< const BannerAction > actions={}, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool CloseRequested (ID windowID)
 Whether the user asked to close a window flagged WindowConfirmClose (its close button, Alt+F4, the OS quitting) since last asked.
void MenuFilter ()
 A filter field for a big menu, first in it: it takes the keyboard when the menu opens, and while it holds text the items (and headers and separators) that don't contain it are left out.
bool MenuItem (ID id, const GUIContent &content, std::string_view shortcut, std::function< void()> onClick, StyleRef style, LayoutOverride &&constraints={})
 Optional icon, label, optional shortcut. The icon column is reserved if any sibling has an icon.
bool MenuItem (ID id, const GUIContent &content, std::function< void()> onClick=nullptr, LayoutOverride &&constraints={})
 As above, without a shortcut, in the theme's item style.
bool MenuItem (const GUIContent &content, std::function< void()> onClick=nullptr, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool MenuItem (ID id, const GUIContent &content, std::string_view shortcut, std::function< void()> onClick, LayoutOverride &&constraints={})
 With a shortcut; onClick is required so MenuItem(text, nullptr) stays unambiguous.
bool MenuItem (const GUIContent &content, std::string_view shortcut, std::function< void()> onClick, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool MenuItem (const GUIContent &content, std::string_view shortcut, std::function< void()> onClick, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 With a shortcut, the call site as the ID and style.
bool MenuItem (ID id, const GUIContent &content, std::function< void()> onClick, StyleRef style, LayoutOverride &&constraints={})
 Without a shortcut, in style.
bool MenuItem (const GUIContent &content, std::function< void()> onClick, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 Without a shortcut, with the call site as the ID, in style.
bool MenuItem (CommandID command)
 Menu item for a command: icon, label, shortcut and callback come from the command.
bool DestructiveMenuItem (ID id, const GUIContent &content, std::string_view shortcut, std::function< void()> onClick, StyleRef style, LayoutOverride &&constraints={})
 An item that destroys something (Delete, Discard), in the error color.
bool DestructiveMenuItem (ID id, const GUIContent &content, std::string_view shortcut, std::function< void()> onClick, LayoutOverride &&constraints={})
 As above, in the theme's item style.
bool DestructiveMenuItem (const GUIContent &content, std::string_view shortcut, std::function< void()> onClick, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool DestructiveMenuItem (const GUIContent &content, std::string_view shortcut, std::function< void()> onClick, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's item style.
bool DestructiveMenuItem (ID id, const GUIContent &content, std::function< void()> onClick, StyleRef style, LayoutOverride &&constraints={})
 Without a shortcut, in style.
bool DestructiveMenuItem (ID id, const GUIContent &content, std::function< void()> onClick, LayoutOverride &&constraints={})
 Without a shortcut, in the theme's item style.
bool DestructiveMenuItem (const GUIContent &content, std::function< void()> onClick, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 Without a shortcut, with the call site as the ID, in style.
bool DestructiveMenuItem (const GUIContent &content, std::function< void()> onClick, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 Without a shortcut, with the call site as the ID, in the theme's item style.
void EndMenu ()
 Closes BeginMenu; called whether or not it returned true.
bool BeginMenuBar (ID id, StyleRef style, LayoutOverride &&constraints={})
 Menu bar: place BeginMenu triggers inside.
bool BeginMenuBar (ID id, LayoutOverride &&constraints={})
 As above, in the theme's menu bar style.
bool BeginMenuBar (LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool BeginMenuBar (StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in style.
void EndMenuBar ()
 Closes BeginMenuBar.

Title bar, tooltips and context menus

bool BeginTitleBar (ID id, StyleRef style, LayoutOverride &&constraints={})
 A menu bar the window is dragged by: what in it isn't a control is the caption (drag to move, double-click to maximize).
bool BeginTitleBar (ID id, LayoutOverride &&constraints={})
 As above, in the theme's title bar style.
bool BeginTitleBar (LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool BeginTitleBar (StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in style.
void EndTitleBar ()
 Closes BeginTitleBar, adding the window buttons in a custom-title-bar window.
WindowHitArea TitleBarHitTest (ID windowID, int2 screenPos) const
 What the OS should do with a screen point of a window with a custom title bar.
void MenuSeparator ()
 Divider inside a menu or context menu.
void SetTooltip (ID targetID, std::string_view text)
 A text tooltip on targetID, shown when the pointer rests on it.
void SetTooltip (ID targetID, IconID icon, std::string_view text)
 As above, with an icon before the text.
void SetTooltip (std::string_view text)
 As above, on the control just drawn (its outer element, shown over all its parts).
void SetTooltip (IconID icon, std::string_view text)
 As above, with an icon, on the control just drawn.
void SetTooltip (ID targetID, std::string_view text, std::string_view shortcut)
 As above, with the keyboard shortcut that does the same in a chip after the text.
void SetTooltip (ID targetID, IconID icon, std::string_view text, std::string_view shortcut)
 As above, with an icon.
void SetTooltip (std::string_view text, std::string_view shortcut)
 As above, for the last control.
void SetTooltip (ID targetID, const PropertyHelp &help)
 A property's help on targetID, in a larger tooltip: its title, description and footer.
void SetTooltip (const PropertyHelp &help)
 As above, for the last control.
void SetErrorTooltip (ID targetID, std::string_view message)
 Why a value isn't accepted, in a tooltip on the popup surface with an error border (and arrow).
void SetErrorTooltip (std::string_view message)
 As above, for the last control.
void SetDisabledTooltip (ID targetID, std::string_view text, std::string_view reason)
 A text tooltip that, while targetID is disabled, also says why, on a second, muted line.
void SetDisabledTooltip (std::string_view text, std::string_view reason)
 As above, for the last control.
bool BeginTooltip (ID targetID)
 A tooltip with any content on targetID: build it while this returns true.
bool BeginTooltip ()
 As above, on the control just drawn.
void EndTooltip ()
 Closes BeginTooltip; called whether or not it returned true.
bool BeginContextMenu (ID targetID)
 Context menu: opens at the pointer on a right-click on the target element, or below it on Shift+F10 or the Menu key while it has the focus.
bool BeginContextMenu ()
 As above, on the control just drawn.
void EndContextMenu ()
 Closes BeginContextMenu; called whether or not it returned true.
void OpenContextMenu (ID targetID, int2 screenPos)
 Opens targetID's context menu at a screen point, e.g.

Label, button and toggle groups

bool BeginLabelGroup (ID id, CssPx defaultWidth=120, CssPx minWidth=40, CssPx maxWidth=500, bool resizable=true)
 Label group: Labels/DragLabels inside share one width, resizable by dragging any label's right edge.
bool BeginLabelGroup (CssPx defaultWidth=120, CssPx minWidth=40, CssPx maxWidth=500, bool resizable=true, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
void EndLabelGroup ()
 Closes BeginLabelGroup.
bool BeginButtonGroup (LayoutOverride &&constraints={})
 Button / toggle group: Buttons / Field(bool) inside are restyled with .first-/.mid-/.last-* so they share borders.
void EndButtonGroup ()
 Closes BeginButtonGroup.
bool BeginToggleGroup (LayoutOverride &&constraints={})
 The same for Toggles and Field(bool).
void EndToggleGroup ()
 Closes BeginToggleGroup.

Areas, caching and layout containers

bool BeginArea (ID id, StyleRef style, LayoutOverride &&constraints={})
 A container drawn in style, for grouping content; it scrolls when bounded and its style has overflow: auto.
bool BeginArea (ID id, LayoutOverride &&constraints={})
 As above, in the theme's area style.
bool BeginArea (StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool BeginArea (LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's area style.
void EndArea ()
 Closes BeginArea.
bool BeginCached (ID id, StyleRef style, uint64_t signature=0, LayoutOverride &&constraints={})
 A container (like BeginArea) whose drawing is kept: while nothing changed it returns false, skipping the content, and the kept drawing is shown.
bool BeginCached (ID id, uint64_t signature=0, LayoutOverride &&constraints={})
 As above, in the theme's area style.
void EndCached ()
 Closes BeginCached; called whether or not it returned true.
void Invalidate (ID id)
 Rebuilds id's cached scope, and those around it, next frame. Safe from event handlers.
void SetDrawCacheEnabled (bool enabled)
 Enables the retained-render cache (on by default). When off, every scope rebuilds.
void InvalidatePanel (ID panelId)
 Invalidates a docked panel's cached content by panel id. Safe from event handlers.
bool BeginHorizontal (ID id, StyleRef style, LayoutOverride &&constraints={})
 Undecorated flex containers; the Wrap variants wrap onto further lines/columns.
bool BeginHorizontal (ID id, LayoutOverride &&constraints={})
 As above, in the theme's plain style.
bool BeginHorizontal (StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool BeginHorizontal (LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's plain style.
void EndHorizontal ()
 Closes BeginHorizontal.
bool BeginHorizontalWrap (ID id, StyleRef style, LayoutOverride &&constraints={})
 A horizontal container whose children wrap onto further lines.
bool BeginHorizontalWrap (ID id, LayoutOverride &&constraints={})
 As above, in the theme's plain style.
bool BeginHorizontalWrap (StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool BeginHorizontalWrap (LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's plain style.
void EndHorizontalWrap ()
 Closes BeginHorizontalWrap.
bool BeginVertical (ID id, StyleRef style, LayoutOverride &&constraints={})
 A vertical container.
bool BeginVertical (ID id, LayoutOverride &&constraints={})
 As above, in the theme's plain style.
bool BeginVertical (StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool BeginVertical (LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's plain style.
void EndVertical ()
 Closes BeginVertical.
bool BeginVerticalWrap (ID id, StyleRef style, LayoutOverride &&constraints={})
 A vertical container whose children wrap onto further columns.
bool BeginVerticalWrap (ID id, LayoutOverride &&constraints={})
 As above, in the theme's plain style.
bool BeginVerticalWrap (StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool BeginVerticalWrap (LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's plain style.
void EndVerticalWrap ()
 Closes BeginVerticalWrap.
bool BeginToolbar (bool horizontal=true)
 Toolbar scope: a wrap container that swaps theme.controls to the toolbar styles, so default-style widgets inside use their toolbar variants.
void EndToolbar ()
 Closes BeginToolbar.

Scrollbars

void VerticalScrollbar (ID scrollBarID, ID containerID)
 A vertical scrollbar for containerID, called from inside it: it overlays the container's border box and draws nothing without overflow.
void VerticalScrollbar (ID containerID)
 As above, with an ID derived from the container's.
void HorizontalScrollbar (ID scrollBarID, ID containerID)
 As VerticalScrollbar, horizontal.
void HorizontalScrollbar (ID containerID)
 As above, with an ID derived from the container's.
void ScrollbarOverlay (ID containerID, int2 lastInnerSize=int2{0, 0}, ID vertScrollBarID=ID::Invalid(), ID horzScrollBarID=ID::Invalid(), bool emitVert=true, bool emitHorz=true)
 Both bars plus a corner cap; each hides itself without overflow.

Reorderable groups

bool BeginReorderableGroup (ID id, ReorderDirection direction, bool isWrapped, std::function< void(int fromIndex, int toIndex)> onReorder, StyleRef style, LayoutOverride &&constraints={}, std::function< void(int, tachyon::int2)> onDragOut=nullptr, std::function< void(int, tachyon::int2)> dragVisualizer=nullptr)
 A container of BeginReorderableItem scopes the user reorders by dragging.
bool BeginReorderableGroup (ID id, ReorderDirection direction, std::function< void(int fromIndex, int toIndex)> onReorder, StyleRef style, LayoutOverride &&constraints={})
 As above, not wrapped.
bool BeginReorderableGroup (ID id, ReorderDirection direction, std::function< void(int fromIndex, int toIndex)> onReorder, LayoutOverride &&constraints={})
 As above, not wrapped, in the theme's style for the direction.
bool BeginReorderableGroup (ID id, ReorderDirection direction, bool isWrapped, std::function< void(int fromIndex, int toIndex)> onReorder, LayoutOverride &&constraints={})
 As above, in the theme's style for the direction and wrapping.
bool BeginReorderableGroup (ReorderDirection direction, bool isWrapped, std::function< void(int fromIndex, int toIndex)> onReorder, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool BeginReorderableGroup (ReorderDirection direction, bool isWrapped, std::function< void(int fromIndex, int toIndex)> onReorder, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's style for the direction and wrapping.
bool BeginReorderableGroup (ReorderDirection direction, std::function< void(int fromIndex, int toIndex)> onReorder, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, not wrapped, with the call site as the ID.
bool BeginReorderableGroup (ReorderDirection direction, std::function< void(int fromIndex, int toIndex)> onReorder, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, not wrapped, with the call site as the ID, in the theme's style for the direction.
StyleRef ReorderableGroupStyle (ReorderDirection direction, bool isWrapped) const
 The theme's reorderable group style for a direction and wrapping.
void EndReorderableGroup ()
 Closes BeginReorderableGroup.
bool BeginReorderableItem (ID id, StyleRef style, LayoutOverride &&constraints={})
 One draggable item of a reorderable group; any content goes inside.
bool BeginReorderableItem (ID id, LayoutOverride &&constraints={})
 As above, in the theme's item style.
bool BeginReorderableItem (StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool BeginReorderableItem (LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's item style.
void EndReorderableItem ()
 Closes BeginReorderableItem.
void EmitDragHandle ()
 Non-interactive drag handle for use inside BeginReorderableItem; clicks reach the item.

List and tree views

bool BeginListView (ID id, int *selectedIndex, int itemCount, ItemDragDropConfig *dragDrop, StyleRef style, LayoutOverride &&constraints={})
 Opens a list view of ListItems.
bool BeginListView (ID id, int *selectedIndex, int itemCount, StyleRef style, LayoutOverride &&constraints={})
 As above, without drag and drop.
bool BeginListView (ID id, int *selectedIndex, int itemCount, LayoutOverride &&constraints={})
 As above, without drag and drop, in the theme's list style.
bool BeginListView (int *selectedIndex, int itemCount, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool BeginListView (ID id, int *selectedIndex, int itemCount, ItemDragDropConfig *dragDrop, LayoutOverride &&constraints={})
 As above, with drag and drop, in the theme's list style.
bool BeginListView (int *selectedIndex, int itemCount, ItemDragDropConfig *dragDrop, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool BeginListView (int *selectedIndex, int itemCount, ItemDragDropConfig *dragDrop, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in style.
bool BeginListView (int *selectedIndex, int itemCount, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, without drag and drop, with the call site as the ID, in style.
void EndListView ()
 Closes BeginListView.
int FindListItemIndex (tachyon::ID id) const
 A list item's index by ID, for end-of-frame handlers; -1 if unknown.
bool ListItem (ID id, const GUIContent &content, StyleRef style, LayoutOverride &&constraints={})
 One item of a list view, drawn selected when it is the selected index. True when clicked.
bool ListItem (ID id, const GUIContent &content, LayoutOverride &&constraints={})
 As above, in the theme's item style.
bool ListItem (const GUIContent &content, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool ListItem (const GUIContent &content, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in style.
void VirtualTreeView (ID id, std::vector< TreeViewRow > &rows, std::vector< int > &visibleIdx, TableState &state, StyleRef style={}, LayoutOverride &&constraints={}, std::string_view header={})
 Single-column virtualized tree view (a VirtualTable with one TreeCell column).
void VirtualTreeView (std::vector< TreeViewRow > &rows, std::vector< int > &visibleIdx, TableState &state, StyleRef style={}, LayoutOverride &&constraints={}, std::string_view header={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
ID TreeDropTargetRow () const
 The tree row a drag is over (drives the drop indicator), or Invalid.
bool IsFileDragging () const
 Whether files or text from another application are dragged over one of the app's windows.
ID FileDragTargetID () const
 The element that takes that drag where it is now: the first from the one under the pointer up whose handler returned true to EventType::FileDragOver.
void SetFileDropHandler (std::function< void(const FileDrop &)> handler)
 Gets the drops no element took (none returned true to EventType::FileDrop): the application's own, such as opening the files.
bool BeginSelected ()
 Items emitted in between render as selected.
void EndSelected ()
 Closes BeginSelected.
bool BeginDisabled ()
 Controls emitted in between are disabled: drawn dimmed, and they take no input.
void EndDisabled ()
 Closes BeginDisabled.
bool BeginInvalid ()
 Controls emitted in between show that their value isn't accepted: the theme's error border (–error) and halo (–invalid-halo) over whatever state they're in.
void EndInvalid ()
 Closes BeginInvalid.
static void RebuildTreeViewIndex (std::vector< TreeViewRow > &rows)
 Recomputes skipCount / ancestorLineMask / isLastSibling from row depths.
static void WalkTreeViewVisibility (const std::vector< TreeViewRow > &rows, std::vector< int > &visibleIdx)
 Writes the flat indices of visible rows (honoring isOpen) to visibleIdx.

Grid views

bool BeginGridView (ID id, int *selectedIndex, StyleRef style, MultiSelectState *multiSelect=nullptr, ItemDragDropConfig *dragDrop=nullptr, LayoutOverride &&constraints={})
 Opens a grid view of GridViewItems.
bool BeginGridView (ID id, int *selectedIndex=nullptr, MultiSelectState *multiSelect=nullptr, ItemDragDropConfig *dragDrop=nullptr, LayoutOverride &&constraints={})
 As above, in the theme's grid style.
bool BeginGridView (int *selectedIndex, StyleRef style, MultiSelectState *multiSelect=nullptr, ItemDragDropConfig *dragDrop=nullptr, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in style.
bool BeginGridView (int *selectedIndex, MultiSelectState *multiSelect=nullptr, ItemDragDropConfig *dragDrop=nullptr, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's grid style.
void EndGridView ()
 Closes BeginGridView.
bool GridViewItem (ID id, const GUIContent &content, tachyon::ElementState extraState=tachyon::ElementState::None, std::string *renameBuffer=nullptr, StyleRef itemStyle={}, LayoutOverride &&constraints={})
 renameBuffer (optional) enables in-place rename: F2, Ctrl+Shift+Click or a slow re-click opens an editor.
bool GridViewItem (ID id, const GUIContent &content, LayoutOverride &&constraints)
 As above, without rename.
bool GridViewItem (const GUIContent &content, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool GridViewItem (ID id, const GUIContent &content, StyleRef style, LayoutOverride &&constraints={})
 Without rename, in style.
bool GridViewItem (const GUIContent &content, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 Without rename, with the call site as the ID, in style.
bool IsRenaming () const
 Whether an inline rename editor (a grid item's, a tree row's) is open; an app that sorts by name re-sorts once it closes.
void VirtualGridView (ID id, GridViewVirtualState &vstate, int itemCount, int2 cellSize, const std::function< void(int index, ID itemID)> &generateItem, int *selectedIndex=nullptr, MultiSelectState *multiSelect=nullptr, ItemDragDropConfig *dragDrop=nullptr, StyleRef scrollStyle={}, StyleRef rowStyle={}, LayoutOverride &&constraints={})
 generateItem(index, itemID) must emit exactly one cell, typically GridViewItem(itemID, ...).
void VirtualGridView (GridViewVirtualState &vstate, int itemCount, int2 cellSize, const std::function< void(int index, ID itemID)> &generateItem, int *selectedIndex=nullptr, MultiSelectState *multiSelect=nullptr, ItemDragDropConfig *dragDrop=nullptr, StyleRef scrollStyle={}, StyleRef rowStyle={}, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.

Tables

bool BeginTable (ID id, VirtualTableColumn *columns, size_t columnCount, TableState &state, StyleRef style, LayoutOverride &&constraints={})
 Opens a table.
bool BeginTable (ID id, VirtualTableColumn *columns, size_t columnCount, TableState &state, LayoutOverride &&constraints={})
 As above, in the theme's table style.
template<size_t N>
bool BeginTable (ID id, VirtualTableColumn(&columns)[N], TableState &state, StyleRef style, LayoutOverride &&constraints={})
 As above, for a C array of columns.
template<size_t N>
bool BeginTable (ID id, VirtualTableColumn(&columns)[N], TableState &state, LayoutOverride &&constraints={})
 As above, for a C array of columns, in the theme's table style.
bool BeginTable (VirtualTableColumn *columns, size_t columnCount, TableState &state, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool BeginTable (VirtualTableColumn *columns, size_t columnCount, TableState &state, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's table style.
template<size_t N>
bool BeginTable (VirtualTableColumn(&columns)[N], TableState &state, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, for a C array of columns, with the call site as the ID.
template<size_t N>
bool BeginTable (VirtualTableColumn(&columns)[N], TableState &state, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, for a C array of columns, with the call site as the ID, in the theme's table style.
void EndTable ()
 Builds the recorded rows as a VirtualTable.
bool BeginRow ()
 Starts a row; its Cells fill the columns in order.
void EndRow ()
 Ends the row.
void Cell (std::string_view text)
 Cells auto-advance to the next column.
void Cell (std::function< void()> emit)
 Custom-content cell: emit runs inside the cell during EndTable, so its captures must live until then.
void TreeCell (std::string_view text, int depth, bool *isOpen, IconID icon=IconID::Invalid, uint32_t ancestorLineMask=0, bool isLastSibling=true, std::string *renameBuffer=nullptr, bool reserveExpander=true)
 Tree-style first column: [indent][arrow or spacer][optional icon][text].
void VirtualTable (ID id, TableState &state, std::span< VirtualTableColumn > columns, int totalRowCount, CssPx rowHeight=0, StyleRef style={}, LayoutOverride &&constraints={})
 Virtual-scrolled table: emits only the visible rows, under one ranged ID.
void VirtualTable (TableState &state, std::span< VirtualTableColumn > columns, int totalRowCount, CssPx rowHeight=0, StyleRef style={}, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.

Breadcrumb

bool Breadcrumb (ID id, std::span< const std::string > segments, std::function< void(int)> onSelect, StyleRef style, LayoutOverride &&constraints={})
 A path such as Graphs > Terrain material: segments separated by chevrons, the last one current.
bool Breadcrumb (ID id, std::span< const std::string > segments, std::function< void(int)> onSelect, LayoutOverride &&constraints={})
 As above, in the theme's breadcrumb style.
bool Breadcrumb (std::span< const std::string > segments, std::function< void(int)> onSelect, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool Breadcrumb (std::span< const std::string > segments, std::function< void(int)> onSelect, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in style.

Status bar

bool BeginStatusBar (ID id, StyleRef style, LayoutOverride &&constraints={})
 A strip of short status texts, usually along a window's bottom edge.
bool BeginStatusBar (ID id, LayoutOverride &&constraints={})
 As above, in the theme's status bar style.
bool BeginStatusBar (LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool BeginStatusBar (StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in style.
void EndStatusBar ()
 Closes BeginStatusBar.
void StatusText (ID id, std::string_view text, StyleRef style, LayoutOverride &&constraints={})
 A text in the status bar.
void StatusText (ID id, std::string_view text, LayoutOverride &&constraints={})
 As above, in the theme's status text style.
void StatusText (std::string_view text, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
void StatusText (std::string_view text, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's status text style.

Command search

bool CommandSearch (ID id, CommandSearchState &state, StyleRef style, LayoutOverride &&constraints={})
 Finds and runs commandManager's commands: focused, it lists those whose description contains the query; Up / Down move through them, Enter or a click runs one, Escape leaves.
bool CommandSearch (ID id, CommandSearchState &state, LayoutOverride &&constraints={})
 As above, in the theme's command search style.
bool CommandSearch (CommandSearchState &state, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool CommandSearch (CommandSearchState &state, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's command search style.
static void FocusCommandSearch (CommandSearchState &state)
 Puts the keyboard in the search next frame; bind it to a command such as Ctrl+K.

Node view

void RenderNodeView (NodeView &view)
 Builds view (canvas, nodes, wires and overlays) in the current container.
void NodeText (std::string_view text)
 Text property body aligned by the row's sockets: left => left, right => right, both => centre.

Tabs

bool BeginTabBar (ID id, int *selectedIndex, std::function< void(int, int)> onReorder, std::function< void(int)> onClose=nullptr, std::function< void(int, tachyon::int2)> onDragOut=nullptr, std::function< void(int, tachyon::int2)> dragVisualizer=nullptr, StyleRef style={}, LayoutOverride &&constraints={}, TabBarLayout *layout=nullptr, const TabBarOptions &options={})
 Opens a tab bar of Tabs.
bool BeginTabBar (int *selectedIndex, std::function< void(int, int)> onReorder, std::function< void(int)> onClose=nullptr, std::function< void(int, tachyon::int2)> onDragOut=nullptr, std::function< void(int, tachyon::int2)> dragVisualizer=nullptr, StyleRef style={}, LayoutOverride &&constraints={}, TabBarLayout *layout=nullptr, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
void EndTabBar ()
 Closes BeginTabBar.
bool Tab (ID id, const GUIContent &content, StyleRef style, LayoutOverride &&constraints={})
 One tab of the tab bar; a click selects it. True when clicked.
bool BeginTab (ID id, const GUIContent &content, StyleRef style, StyleRef contentStyle, LayoutOverride &&constraints={})
 A tab with more in it: its icon and text in contentStyle (the theme's when invalid), then whatever is added up to EndTab, which every BeginTab needs.
void EndTab ()
 Closes BeginTab.
bool Tab (ID id, const GUIContent &content, LayoutOverride &&constraints={})
 As above, in the theme's tab style.
bool Tab (const GUIContent &content, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool Tab (const GUIContent &content, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in style.

Docking

bool BeginDockingContainer (ID id, DockingLayout *layout, StyleRef style, LayoutOverride &&constraints={})
 Builds Layout's docked panels (each one's onPanelGUI) in a container, enabling the visible panels first.
bool BeginDockingContainer (ID id, DockingLayout *layout, LayoutOverride &&constraints={})
 As above, in the theme's dock style.
bool BeginDockingContainer (DockingLayout *layout, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool BeginDockingContainer (DockingLayout *layout, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's dock style.
void EndDockingContainer ()
 Closes BeginDockingContainer.
void Documents (ID id, DocumentSet &set, LayoutOverride &&constraints={})
 The document bar of set, under the title bar, and below it the active document's panels, filling the rest of the window's column.

Fields

bool Field (ID id, bool &value, std::string_view text, StyleRef style, LayoutOverride &&constraints={})
 A bool as a Toggle labelled Text.
bool Field (bool &value, std::string_view text, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool Field (ID id, bool &value, std::string_view text, LayoutOverride &&constraints={})
 As above, in the theme's toggle style.
bool Field (bool &value, std::string_view text, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's toggle style.
bool Field (ID id, std::string &value, TextEditBehavior textEditBehavior, StyleRef style, LayoutOverride &&constraints={})
 A text field editing value; true when it changed.
bool Field (std::string &value, TextEditBehavior textEditBehavior, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool Field (ID id, std::string &value, StyleRef style, LayoutOverride &&constraints={})
 As above, updating continuously.
bool Field (std::string &value, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool Field (ID id, std::string &value, TextEditBehavior textEditBehavior, LayoutOverride &&constraints={})
 As the first, in the theme's text box style.
bool Field (std::string &value, TextEditBehavior textEditBehavior, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool Field (ID id, std::string &value, LayoutOverride &&constraints={})
 As the first, updating continuously, in the theme's text box style.
bool Field (std::string &value, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool SearchField (ID id, std::string &value, IconID icon, TextEditBehavior textEditBehavior, StyleRef style, LayoutOverride &&constraints={})
 A Field with a leading icon inside its border; style is the border's.
bool SearchField (ID id, std::string &value, IconID icon, TextEditBehavior textEditBehavior=TextEditBehavior::ContinuousUpdate, LayoutOverride &&constraints={})
 As above, in the theme's search style.
bool SearchField (std::string &value, IconID icon, TextEditBehavior textEditBehavior, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool SearchField (std::string &value, IconID icon, TextEditBehavior textEditBehavior=TextEditBehavior::ContinuousUpdate, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's search style.
bool AutocompleteField (ID id, std::string &value, std::span< const std::string_view > suggestions, StyleRef style, LayoutOverride &&constraints={})
 A text field that lists, under itself while it has the keyboard and holds text, the suggestions that contain that text (ignoring case), at most 12.
bool AutocompleteField (ID id, std::string &value, std::span< const std::string_view > suggestions, LayoutOverride &&constraints={})
 As above, in the theme's textbox style.
bool AutocompleteField (std::string &value, std::span< const std::string_view > suggestions, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool AutocompleteField (std::string &value, std::span< const std::string_view > suggestions, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's textbox style.
template<typename T, typename ComponentT = typename TypeDimensions<T>::ComponentType>
bool Field (ID id, T &value, TextEditBehavior textEditBehavior, StyleRef style, NumericFieldConfig< ComponentT > config={}, LayoutOverride &&constraints={})
 A number field; for a vector type (TypeDimensions), a field per component, each after a colored axis label that drags it.
template<typename T, typename ComponentT = typename TypeDimensions<T>::ComponentType>
bool Field (ID id, T &value, TextEditBehavior textEditBehavior, NumericFieldConfig< ComponentT > config, LayoutOverride &&constraints={})
 As above, in the theme's number style.
template<typename T, typename ComponentT = typename TypeDimensions<T>::ComponentType>
bool Field (ID id, T &value, TextEditBehavior textEditBehavior, LayoutOverride &&constraints={})
 As above, with the default config.
template<typename T, typename ComponentT = typename TypeDimensions<T>::ComponentType>
bool Field (ID id, T &value, LayoutOverride &&constraints={})
 As above, updating continuously.
template<typename T, typename ComponentT = typename TypeDimensions<T>::ComponentType>
bool Field (ID id, T &value, StyleRef style, NumericFieldConfig< ComponentT > config, LayoutOverride &&constraints={})
 As the first, updating continuously.
template<typename T, typename ComponentT = typename TypeDimensions<T>::ComponentType>
bool Field (ID id, T &value, StyleRef style, LayoutOverride &&constraints={})
 As the first, updating continuously, with the default config.
template<typename T, typename ComponentT = typename TypeDimensions<T>::ComponentType>
bool Field (ID id, T &value, NumericFieldConfig< ComponentT > config, LayoutOverride &&constraints={})
 As the first, updating continuously, in the theme's number style.
template<typename T, typename ComponentT = typename TypeDimensions<T>::ComponentType>
bool Field (T &value, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As the first, with the call site as the ID, updating continuously, with the default config.
template<typename T, typename ComponentT = typename TypeDimensions<T>::ComponentType>
bool Field (T &value, TextEditBehavior textEditBehavior, StyleRef style, NumericFieldConfig< ComponentT > config, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As the first, with the call site as the ID.
template<typename T, typename ComponentT = typename TypeDimensions<T>::ComponentType>
bool Field (T &value, StyleRef style, NumericFieldConfig< ComponentT > config, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As the first, with the call site as the ID, updating continuously.
template<typename T, typename ComponentT = typename TypeDimensions<T>::ComponentType>
bool Field (T &value, TextEditBehavior textEditBehavior, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As the first, with the call site as the ID and the default config.
template<typename T, typename ComponentT = typename TypeDimensions<T>::ComponentType>
bool Field (T &value, TextEditBehavior textEditBehavior, NumericFieldConfig< ComponentT > config, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As the first, with the call site as the ID, in the theme's number style.
template<typename T, typename ComponentT = typename TypeDimensions<T>::ComponentType>
bool Field (T &value, NumericFieldConfig< ComponentT > config, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As the first, with the call site as the ID, updating continuously, in the theme's number style.
template<typename T, typename ComponentT = typename TypeDimensions<T>::ComponentType>
bool Field (T &value, TextEditBehavior textEditBehavior, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As the first, with the call site as the ID and the default config, in the theme's number style.
template<typename T, typename ComponentT = typename TypeDimensions<T>::ComponentType>
bool Field (T &value, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As the first, with the call site as the ID and the default config, updating continuously, in the theme's number style.
template<typename T>
bool TypedField (ID id, T &value, LayoutOverride &&constraints={})
 A number field with its type after the value, e.g. "0.5 f32".
template<typename T>
bool TypedField (ID id, T &value, StyleRef style, LayoutOverride &&constraints={})
 As above; style is the box's around the number and its type.
template<typename T>
bool TypedField (T &value, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
template<typename T>
bool TypedField (T &value, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID and a style for the box.
template<typename T>
void Field (ID id, std::vector< T > &items, StyleRef style, LayoutOverride &&constraints={})
 A reorderable list: each row a grip, its index, the field (numbers with their type) and a remove button; "Add item" after the rows.
template<typename T>
void Field (ID id, std::vector< T > &items, LayoutOverride &&constraints={})
 As above, in the theme's collection style.
template<typename T>
void Field (std::vector< T > &items, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
template<typename T>
void Field (std::vector< T > &items, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's collection style.
template<typename V>
void Field (ID id, std::vector< std::pair< std::string, V > > &items, StyleRef style, LayoutOverride &&constraints={})
 A key-value list (std::string keys, V values): a Key / Value header with the types, then a row per entry (key, value, remove) and "Add entry".
template<typename V>
void Field (ID id, std::vector< std::pair< std::string, V > > &items, LayoutOverride &&constraints={})
 As above, in the theme's collection style.
template<typename V>
void Field (std::vector< std::pair< std::string, V > > &items, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
template<typename V>
void Field (std::vector< std::pair< std::string, V > > &items, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's collection style.
template<typename V>
void Field (ID id, std::unordered_map< std::string, V > &items, StyleRef style, LayoutOverride &&constraints={})
 Key-value list over an unordered_map.
template<typename V>
void Field (ID id, std::unordered_map< std::string, V > &items, LayoutOverride &&constraints={})
 As above, in the theme's collection style.
template<typename V>
void Field (std::unordered_map< std::string, V > &items, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
template<typename V>
void Field (std::unordered_map< std::string, V > &items, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's collection style.
void CollectionHeader (std::string_view valueType)
 A dictionary's header row: "Key string", "Value <type>".
template<typename T>
static constexpr std::string_view TypeTag ()
 A number's type as a short tag: f32, f64, i8 ... u64 (empty for other types).

Color and gradient fields

bool ColorField (ID id, tachyon::color4f &value, bool allowHDR, StyleRef style, LayoutOverride &&constraints={})
 A color swatch that opens a color picker; true when the color changed.
bool ColorField (ID id, tachyon::color4f &value, bool allowHDR=false, LayoutOverride &&constraints={})
 As above, in the theme's color field style.
bool ColorField (tachyon::color4f &value, bool allowHDR, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool ColorField (tachyon::color4f &value, bool allowHDR=false, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's color field style.
bool ColorField (ID id, tachyon::color4b &value, StyleRef style, LayoutOverride &&constraints={})
 As above, for an 8-bit color.
bool ColorField (ID id, tachyon::color4b &value, LayoutOverride &&constraints={})
 As above, in the theme's color field style.
bool ColorField (tachyon::color4b &value, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool ColorField (tachyon::color4b &value, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's color field style.
bool GradientField (ID id, tachyon::Gradient &value, StyleRef style, LayoutOverride &&constraints={})
 A gradient swatch that opens a gradient editor; true when the gradient changed.
bool GradientField (ID id, tachyon::Gradient &value, LayoutOverride &&constraints={})
 As above, in the theme's gradient swatch style.
bool GradientField (tachyon::Gradient &value, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool GradientField (tachyon::Gradient &value, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's gradient swatch style.

Sliders

bool SliderField (ID id, float &value, float minVal, float maxVal, std::string_view text, StyleRef style, LayoutOverride &&constraints={})
 A label, a slider track and a number field for value in [minVal, maxVal]; true when it changed.
bool SliderField (ID id, float &value, float minVal, float maxVal, std::string_view text, LayoutOverride &&constraints={})
 As above, in the theme's slider field style.
bool SliderField (float &value, float minVal, float maxVal, std::string_view text, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool SliderField (float &value, float minVal, float maxVal, std::string_view text, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's slider field style.
bool SliderField (ID id, int &value, int minVal, int maxVal, std::string_view text, StyleRef style, LayoutOverride &&constraints={})
 Integer variant: snaps to whole numbers.
bool SliderField (ID id, int &value, int minVal, int maxVal, std::string_view text, LayoutOverride &&constraints={})
 As above, in the theme's slider field style.
bool SliderField (int &value, int minVal, int maxVal, std::string_view text, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool SliderField (int &value, int minVal, int maxVal, std::string_view text, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's slider field style.
bool Slider (ID id, int &value, int minVal, int maxVal, StyleRef style, LayoutOverride &&constraints={})
 Groove + knob without value text; drag-only, integer-valued.
bool Slider (ID id, int &value, int minVal, int maxVal, LayoutOverride &&constraints={})
 As above, in the theme's slider style.
bool Slider (int &value, int minVal, int maxVal, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool Slider (int &value, int minVal, int maxVal, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's slider style.

Text, labels and images

void DragLabel (ID id, std::string_view text, StyleRef style, LayoutOverride &&constraints={})
 A label whose horizontal drag changes the value of the field after it; a click focuses that field and Escape cancels a drag.
void DragLabel (ID id, std::string_view text, LayoutOverride &&constraints={})
 As above, in the theme's drag label style.
void DragLabel (std::string_view text, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
void DragLabel (std::string_view text, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's drag label style.
void Label (ID id, std::string_view text, StyleRef style, LayoutOverride &&constraints={})
 A label for the control after it: a click focuses that control.
void Label (ID id, std::string_view text, std::string_view caption, StyleRef style, LayoutOverride &&constraints={})
 A label over a field taller than a row (a list): at the top, with a caption under it such as "3 items".
void Label (ID id, std::string_view text, std::string_view caption, LayoutOverride &&constraints={})
 As above, in the theme's top label style.
void Label (std::string_view text, std::string_view caption, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
void Label (std::string_view text, std::string_view caption, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's top label style.
void Label (ID id, std::string_view text, LayoutOverride &&constraints={})
 As the first, in the theme's label style.
void Label (std::string_view text, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As the first, with the call site as the ID.
void Label (std::string_view text, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As the first, with the call site as the ID, in the theme's label style.
void Text (ID id, std::string_view text, StyleRef style, LayoutOverride &&constraints={})
 Static text.
void Text (ID id, std::string_view text, LayoutOverride &&constraints={})
 As above, in the theme's text style.
void Text (std::string_view text, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
void Text (std::string_view text, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's text style.
void SelectableText (ID id, const std::span< ContentRun > &runs, std::function< void(intptr_t contentId)> onLinkActivate, StyleRef style, LayoutOverride &&constraints={})
 Read-only rich text with links, mouse selection and Ctrl+C.
void SelectableText (ID id, const std::span< ContentRun > &runs, StyleRef style, LayoutOverride &&constraints={})
 As above, without link handling.
void SelectableText (ID id, const std::span< ContentRun > &runs, LayoutOverride &&constraints={})
 As above, in the theme's text style.
void SelectableText (const std::span< ContentRun > &runs, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID (the same every frame).
void SelectableText (const std::span< ContentRun > &runs, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's text style.
void Image (ID id, ImageIndex image, StyleRef style, LayoutOverride &&constraints={})
 Draws image (from graphicsContext->RegisterImage) stretched over the element's box.
void Image (ID id, ImageIndex image, LayoutOverride &&constraints={})
 As above, in the theme's image style.
void Image (ImageIndex image, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
void Image (ImageIndex image, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's image style.
void Image (ID id, ImageIndex image, uint2 sourceSize, StyleRef style, LayoutOverride &&constraints={})
 Aspect-preserving: sizes the element to the largest sourceSize-aspect rect that fits the constraints.
void Image (ID id, ImageIndex image, uint2 sourceSize, LayoutOverride &&constraints={})
 As above, in the theme's image style.
void Image (ImageIndex image, uint2 sourceSize, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
void Image (ImageIndex image, uint2 sourceSize, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID, in the theme's image style.

Ghost windows

bool BeginGhostWindow (ID windowLayoutID, int2 position)
 A ghost window: caption-less and transparent, e.g.
bool BeginGhostWindow (ID windowLayoutID, int2 position, int2 size, StyleRef styleRef)
 position is the top-left in screen space; for drag previews use BeginCursorGhostWindow.
bool BeginGhostWindow (ID windowLayoutID, int2 position, int2 size)
 As above, in the theme's ghost window style.
bool BeginGhostWindow (ID windowLayoutID, int2 position, StyleRef styleRef)
 Sized to its content.
int2 CursorGhostOffset () const
 Where a ghost sits from the cursor, clear of the OS cursor: 14 px for a 32 px cursor, in proportion for others, 14 CSS px when the backend can't tell the cursor's size.
bool BeginCursorGhostWindow (ID windowLayoutID, int2 cursorPos)
 A ghost window at the cursor, offset by CursorGhostOffset; 28 x 28 CSS px.
bool BeginCursorGhostWindow (ID windowLayoutID, int2 cursorPos, int2 size, StyleRef styleRef)
 As above, with a size and style.
bool BeginCursorGhostWindow (ID windowLayoutID, int2 cursorPos, int2 size)
 As above, with a size.
bool BeginCursorGhostWindow (ID windowLayoutID, int2 cursorPos, StyleRef styleRef)
 As above, with a style, sized to its content.
void AddGhostIcon (IconID icon, std::source_location site=std::source_location::current())
 An icon in the open ghost window, 28 x 28 CSS px.
void EndGhostWindow ()
 Closes BeginGhostWindow or BeginCursorGhostWindow.

Windows

bool BeginWindow (ID windowLayoutID, std::string_view title, ElementFlags flags=ElementFlags::WindowUserControlled|ElementFlags::WindowIsCentered, int monitorIndex=-1)
 As the full BeginWindow below, in the theme's window style.
bool BeginWindow (ID windowLayoutID, std::string_view title, StyleRef styleRef, ElementFlags flags=ElementFlags::WindowUserControlled|ElementFlags::WindowIsCentered, int monitorIndex=-1)
 As the full BeginWindow below.
bool BeginWindow (ID windowLayoutID, std::string_view title, LayoutOverride &&constraints, ElementFlags flags=ElementFlags::WindowUserControlled|ElementFlags::WindowIsCentered, int monitorIndex=-1)
 As the full BeginWindow below, in the theme's window style.
bool BeginWindow (ID windowLayoutID, ElementFlags flags=ElementFlags::WindowUserControlled|ElementFlags::WindowIsCentered, int monitorIndex=-1)
 As the full BeginWindow below, without a title, in the theme's window style.
bool BeginWindow (ID windowLayoutID, StyleRef styleRef, ElementFlags flags=ElementFlags::WindowUserControlled|ElementFlags::WindowIsCentered, int monitorIndex=-1)
 As the full BeginWindow below, without a title.
bool BeginWindow (ID windowLayoutID, LayoutOverride &&constraints, ElementFlags flags=ElementFlags::WindowUserControlled|ElementFlags::WindowIsCentered, int monitorIndex=-1)
 As the full BeginWindow below, without a title, in the theme's window style.
bool BeginWindow (ID windowLayoutID, StyleRef styleRef, LayoutOverride &&constraints, ElementFlags flags=ElementFlags::WindowUserControlled|ElementFlags::WindowIsCentered, int monitorIndex=-1)
 As the full BeginWindow below, without a title.
bool BeginWindow (ID windowLayoutID, std::string_view title, StyleRef styleRef, LayoutOverride &&constraints, ElementFlags flags=ElementFlags::WindowUserControlled|ElementFlags::WindowIsCentered, int monitorIndex=-1)
 An OS window, made the first time its ID is seen; build its content while this returns true.
bool OpenWindow (ID windowLayoutID, std::string_view title, StyleRef styleRef, LayoutOverride &&constraints, ElementFlags flags, int monitorIndex)
 Internal: the body of BeginWindow; call BeginWindow.
void EndWindow ()
 Closes BeginWindow; called whether or not it returned true.

Container scopes

Scopes for the Begin / End pairs, taking the Begin's arguments.

template<class... A>
auto Window (A &&... a)
template<class... A>
auto GhostWindow (A &&... a)
template<class... A>
auto CursorGhostWindow (A &&... a)
template<class... A>
auto Menu (A &&... a)
template<class... A>
auto MenuBar (A &&... a)
template<class... A>
auto ContextMenu (A &&... a)
template<class... A>
auto Tooltip (A &&... a)
template<class... A>
auto Cached (A &&... a)
template<class... A>
auto Horizontal (A &&... a)
template<class... A>
auto Vertical (A &&... a)
template<class... A>
auto HorizontalWrap (A &&... a)
template<class... A>
auto VerticalWrap (A &&... a)
template<class... A>
auto Area (A &&... a)
template<class... A>
auto LabelGroup (A &&... a)
template<class... A>
auto ButtonGroup (A &&... a)
template<class... A>
auto ToggleGroup (A &&... a)
template<class... A>
auto Table (A &&... a)
template<class... A>
auto Row (A &&... a)
template<class... A>
auto ListView (A &&... a)
template<class... A>
auto GridView (A &&... a)
template<class... A>
auto TabBar (A &&... a)
template<class... A>
auto Toolbar (A &&... a)
template<class... A>
auto StatusBar (A &&... a)
template<class... A>
auto TitleBar (A &&... a)
template<class... A>
auto ReorderableGroup (A &&... a)
template<class... A>
auto ReorderableItem (A &&... a)
template<class... A>
auto Disabled (A &&... a)
template<class... A>
auto Invalid (A &&... a)
template<class... A>
auto Selected (A &&... a)
template<class... A>
auto Indeterminate (A &&... a)
template<class... A>
auto DockingContainer (A &&... a)
template<class... A>
auto DockingFrame (A &&... a)

Boxes

void CloseWindow ()
 Internal: the body of EndWindow for an open window; call EndWindow.
void AddBox (ID id, int2 size, StyleRef styleRef, TextID textID=TextID::Invalid)
 A plain box of a fixed size in pixels, in a style; textID is optional.
void AddBox (int2 size, StyleRef styleRef, TextID textID=TextID::Invalid, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
void AddBox (ID id, int2 size, StyleRef styleRef, std::string_view text)
 As above, with text.
void AddBox (ID id, int2 size, StyleRef styleRef, IconID iconID, std::string_view text)
 As above, with an icon and text.
void AddBox (ID id, StyleRef styleRef, IconID iconID, std::string_view text)
 As above, sized to its content.
void AddBox (StyleRef styleRef, std::string_view text, std::source_location site=std::source_location::current())
 A box with text, sized to its content, with the call site as the ID.
void AddBox (int2 size, StyleRef styleRef, std::string_view text, std::source_location site=std::source_location::current())
 A fixed-size box with text, with the call site as the ID.

Settings panel

void RenderSettingsPanel (SettingsPanelState &state)
 Renders into the current container; the caller provides the outer panel.

Saved UI state

The UI's state as JSON text, which the host stores where and when it likes.

Name what to keep once, by keys that stay the same between runs; the named objects must outlive the naming:

PersistWindow("main", mainWindowID);         // position, size, mode
PersistDocking("dock", dockingLayout);       // panels by type, else title
PersistTable("assets", tableState, columns); // column widths and order, by header
PersistToolbars("toolbars", toolbarSides);   // items by debugName
PersistValue("zoom", zoom);                  // an app setting, if it wants
PersistDocuments("documents", windows);      // each main window's documents
PersistShortcuts("shortcuts", commandManager); // the shortcuts the user changed

RestoreUIState applies saved text: windows when they are next declared, the rest at once. What it doesn't know (keys, panels, columns) is skipped.

void PersistWindow (std::string key, ID windowID)
 Keeps the window's position, size and mode.
void PersistDocking (std::string key, DockingLayout &layout)
 Keeps the layout's dock tree; panels are matched by type, else by title.
void PersistTable (std::string key, TableState &state, std::span< VirtualTableColumn > columns)
 Keeps the table's column widths and order, matching columns by header.
void PersistToolbars (std::string key, std::span< std::vector< ToolbarItem >, kToolbarSideCount > sides)
 Keeps each side's toolbar items, by debugName.
void PersistValue (std::string key, bool &value)
 Keeps an app value.
void PersistValue (std::string key, int &value)
 As above, for an int.
void PersistValue (std::string key, float &value)
 As above, for a float.
void PersistValue (std::string key, std::string &value)
 As above, for a string.
void PersistDocuments (std::string key, std::function< std::vector< DocumentWindowRef >()> windows)
 Keeps the documents of each main window that Windows and platform lists when the state is saved: their names, kinds and order, the active one, each one's dock tree, and the window's position, size and mode.
void PersistShortcuts (std::string key, CommandManager &commands)
 Keeps the shortcuts that aren't the ones their commands were registered with, matching commands by mode name and description.
std::vector< SavedDocumentWindow > TakeSavedDocuments (std::string_view key)
 The main windows of documents RestoreUIState read for key, in the order they were listed; empty when none were saved.
bool RestoreDocumentLayout (Document &document, const SavedDocument &saved)
 Lays a document's panels out as saved: panels by type, else title; ones the saved tree doesn't have go to its first leaf.
void RestoreWindowPlace (ID windowID, const SavedDocumentWindow &saved)
 Puts a window where saved was when it's next declared, as PersistWindow does (on its monitor, or the same place on another).
std::string SaveUIState () const
 The named state as JSON text.
Result< void > RestoreUIState (std::string_view json)
 Applies JSON text from SaveUIState.

Detailed Description

The application: owns the windows, the systems and the frame loop.

Subclass it, build the UI in OnGUI, and call Initialize, then Run (or the frame calls), then Cleanup.

class HelloApp : public tachyon::GUIApplication
{
public:
    tachyon::Result<void> Initialize(const InitializeOptions& options = {}) override
    {
        if (tachyon::Result<void> result = GUIApplication::Initialize(options); !result)
            return result;
        windowID = idManager.CreateStaticID();   // windows need stable IDs
        return {};
    }

    void OnGUI() override   // every frame: describe the whole UI
    {
        if (BeginWindow(windowID, "Hello", tachyon::LayoutOverride{}.Size(360, 160)))
            Button("Greet", [this] { ++greetings; });
        EndWindow();   // always, whatever BeginWindow returned
    }

private:
    tachyon::ID windowID = tachyon::ID::Invalid();
    int         greetings = 0;
};

Every control is a member function, grouped below by family.

Examples
controls/controls.cpp, custom_theme/custom_theme.cpp, docking/docking.cpp, hello_world/hello_world.cpp, and host_device/host_device.cpp.

Member Typedef Documentation

◆ InitializeOptions

Constructor & Destructor Documentation

◆ ~GUIApplication()

virtual tachyon::GUIApplication::~GUIApplication ( )
virtualdefault

Member Function Documentation

◆ GetFrameTimingHistory()

void tachyon::GUIApplication::GetFrameTimingHistory ( std::span< FrameTimingSample > out) const

Copies the ring chronologically (oldest first) into out.

◆ CreatePanel() [1/2]

void tachyon::GUIApplication::CreatePanel ( std::unordered_map< tachyon::ID, tachyon::Panel > & panels,
ID id,
std::string title,
tachyon::IconID icon,
std::function< void()> onPanelGUI,
std::string panelType = {},
std::function< void()> onEnable = {},
std::function< void()> onDisable = {} )

Adds a panel to panels (usually a DockingLayout's).

onPanelGUI builds its content; onEnable / onDisable run when it becomes visible / hidden. panelType names its kind, which saved UI state matches panels by (else the title).

◆ CreatePanel() [2/2]

tachyon::ID tachyon::GUIApplication::CreatePanel ( std::unordered_map< tachyon::ID, tachyon::Panel > & panels,
std::string title,
tachyon::IconID icon,
std::function< void()> onPanelGUI,
std::string panelType = {},
std::function< void()> onEnable = {},
std::function< void()> onDisable = {} )
inline

As above, with a new static ID, which it returns.

◆ DisableAllPanels()

void tachyon::GUIApplication::DisableAllPanels ( DockingLayout & layout)

Panel lifecycle.

A panel is enabled iff it is the selectedTab of a leaf reachable from layout.root; the docking enables the visible ones each frame. DisableAllPanels brackets disruptive operations (theme reload, preset swap).

◆ EmitFloatingToolbarWindows()

void tachyon::GUIApplication::EmitFloatingToolbarWindows ( std::vector< struct FloatingToolbarItem > & floatingItems,
const struct FloatingToolbarOptions * options = nullptr )

One OS window per floating toolbar. Closed windows are erased and their IDs released.

◆ FindDockLeafAtScreenPos()

DockLeafResult tachyon::GUIApplication::FindDockLeafAtScreenPos ( tachyon::int2 screenPos)

Dock leaf whose tab bar contains screenPos, plus its owning layout (needed by TransferPanel for cross-layout drops).

{nullptr, nullptr} on miss.

◆ FindDockDropTargetAtScreenPos()

DockDropResult tachyon::GUIApplication::FindDockDropTargetAtScreenPos ( tachyon::int2 screenPos)

Hit-tests leaf content areas; falls back to tab bars with zone=Center.

◆ EmitFloatingDockWindows() [1/2]

void tachyon::GUIApplication::EmitFloatingDockWindows ( )

Call from OnGUI after the main docking container. Empty windows are closed.

◆ EmitFloatingDockWindows() [2/2]

void tachyon::GUIApplication::EmitFloatingDockWindows ( const DocumentSet & documents)

With documents in several main windows: in each, after its Documents, the windows of the panels torn from its documents.

They belong to it, and to the window a document is moved to.

◆ FloatPanel()

bool tachyon::GUIApplication::FloatPanel ( DockingLayout & layout,
ID panelID,
int2 screenPos )

Moves a docked panel into its own window at a screen position, as tearing its tab off does; the window's Dock button returns it.

False if the layout hasn't the panel.

◆ CloseFloatingDockWindow()

void tachyon::GUIApplication::CloseFloatingDockWindow ( size_t index)

Closes the window for good: its panels are disabled and destroyed.

◆ CloseDockedPanel()

void tachyon::GUIApplication::CloseDockedPanel ( DockingLayout & layout,
DockNode & leaf,
int tabIndex )

Closes the panel at tabIndex of a docked leaf, as the tab's Close action does.

◆ CreateDocument()

Document & tachyon::GUIApplication::CreateDocument ( DocumentSet & set,
std::string name,
std::string extension,
std::string kind,
tachyon::IconID icon )

Adds a document at the end of set, with new static IDs and an empty layout, which the caller fills (CreatePanel, MakeLeaf).

The first one added becomes the active one.

◆ CloseDocument()

void tachyon::GUIApplication::CloseDocument ( DocumentSet & set,
int index )

Closes set's document at index for good: its panels are disabled and destroyed, its torn-off panel windows closed, its IDs released and its layout no longer saved (PersistDocking).

The active document stays active; when it's the one closed, the next one (else the one before) takes over. Call from OnGUI, not from an input handler.

◆ TransferPanel()

void tachyon::GUIApplication::TransferPanel ( tachyon::ID panelID,
tachyon::DockNode * sourceNode,
DockingLayout * sourceLayout,
DockingLayout * targetLayout )
static

Moves a panel from sourceNode/sourceLayout to targetLayout, fixing up selectedTab.

◆ Initialize()

virtual Result< void > tachyon::GUIApplication::Initialize ( const InitializeOptions & options = {})
virtual

Creates the backends not set before, the window manager, the text system and the subsystems, and loads the theme.

An error when the graphics or text setup fails.

◆ Cleanup()

virtual void tachyon::GUIApplication::Cleanup ( )
virtual

Releases what Initialize created, including the backends set before it.

Safe without Initialize.

◆ InitializeStyles()

Result< void > tachyon::GUIApplication::InitializeStyles ( )

Loads the current theme at the current font scale; an error when it can't be opened.

◆ OnStylesReloaded()

virtual void tachyon::GUIApplication::OnStylesReloaded ( )
inlinevirtual

Called after every successful theme/font reload (and by subclasses at startup) to re-register styles/icons the reload wiped.

Reset any bookkeeping of stale StyleRefs.

◆ RequestReloadTheme()

void tachyon::GUIApplication::RequestReloadTheme ( std::string_view themePath,
float fontScale )

Deferred to the start of the next frame; safe from event handlers.

fontScale multiplies every CSS font-size.

◆ ThemeReloadResult()

const Result< void > & tachyon::GUIApplication::ThemeReloadResult ( ) const
inline

How the last reload went; on an error the previous theme stays.

◆ GetThemePath()

const std::string & tachyon::GUIApplication::GetThemePath ( ) const
inline

◆ SetResourceRoot()

void tachyon::GUIApplication::SetResourceRoot ( std::string_view root)
inline

The folder the resources load from: compiled shaders, default fonts and relative theme paths.

Empty (the default) is the working directory; a package user passes TACHYON_RESOURCE_DIR, which the package defines. Call before Initialize.

◆ GetResourceRoot()

const std::string & tachyon::GUIApplication::GetResourceRoot ( ) const
inline

◆ InjectMouseMove()

void tachyon::GUIApplication::InjectMouseMove ( ID windowID,
int2 pos,
KeyModifier mods = KeyModifier::None )

Input for render-to-image windows (WindowFlags::RenderToImage), which get none from the OS.

Positions are in the window's pixels. The window is under the pointer from a mouse event until InjectMouseLeave, and has keyboard focus from any injected input until InjectFocus(windowID, false).

◆ InjectMouseButton()

void tachyon::GUIApplication::InjectMouseButton ( ID windowID,
int2 pos,
MouseButtons button,
bool down,
KeyModifier mods = KeyModifier::None )

A button press (down) or release at pos.

◆ InjectMouseScroll()

void tachyon::GUIApplication::InjectMouseScroll ( ID windowID,
int2 pos,
float2 offset,
KeyModifier mods = KeyModifier::None )

A wheel scroll by offset at pos.

◆ InjectMouseLeave()

void tachyon::GUIApplication::InjectMouseLeave ( ID windowID)

The pointer left the window.

◆ InjectFocus()

void tachyon::GUIApplication::InjectFocus ( ID windowID,
bool focused )

Gives the window keyboard focus, or takes it away.

◆ InjectKey()

void tachyon::GUIApplication::InjectKey ( ID windowID,
KeyCode key,
KeyAction action,
KeyModifier mods = KeyModifier::None )

A key event; typed text goes through InjectText.

◆ InjectText()

void tachyon::GUIApplication::InjectText ( ID windowID,
std::string_view utf8 )

Typed text, one character event per codepoint.

◆ ReadWindowPixels()

Result< void > tachyon::GUIApplication::ReadWindowPixels ( ID windowID,
std::span< uint8_t > bgra )

The last rendered frame of a render-to-image window: BGRA8, tightly packed rows, bgra holding width x height x 4 bytes of its pixel size.

◆ SetGraphicsBackend()

void tachyon::GUIApplication::SetGraphicsBackend ( std::unique_ptr< GraphicsContext > backend)
inline

The graphics backend Initialize uses; without one it creates a vulkan::VulkanGraphicsContext.

Set it up through its own API first, for example SetExternalDevice to render on the host's device. Owned until Cleanup. Call before Initialize.

◆ SetWindowBackend()

void tachyon::GUIApplication::SetWindowBackend ( std::unique_ptr< IWindowBackend > backend)
inline

The OS windows and their input; Initialize wraps it to add render-to-image windows.

Without one it creates an SDLWindowBackend (SDL builds only). Owned until Cleanup. Call before Initialize.

◆ SetClipboard()

void tachyon::GUIApplication::SetClipboard ( std::unique_ptr< IClipboard > clipboardImpl)
inline

Copy and paste for text fields.

Defaults to SDL's clipboard, or a LocalClipboard without SDL. Owned until Cleanup. Call before Initialize.

◆ SetAllocationHooks()

void tachyon::GUIApplication::SetAllocationHooks ( const AllocationHooks & hooks)
inline

Host memory functions for what can be routed: Vulkan objects, VMA, vk-bootstrap and SDL (only when the GUI starts SDL).

See AllocationHooks for how long they must live. Call before Initialize.

◆ SetStyleFiles()

void tachyon::GUIApplication::SetStyleFiles ( std::span< const std::string_view > files)

The CSS rule files loaded after the palette, in order; relative paths are next to the palette file.

Defaults to the library's "styles.css". An app appends its own and finds their classes with theme.GetStyle. Call before Initialize, or follow with RequestReloadTheme.

◆ GetGlobalFontScale()

float tachyon::GUIApplication::GetGlobalFontScale ( ) const
inline

The graphics backend Initialize uses; without one it creates a vulkan::VulkanGraphicsContext.

Set it up through its own API first, for example SetExternalDevice to render on the host's device. Owned until Cleanup. Call before Initialize.

◆ SetUIScale()

void tachyon::GUIApplication::SetUIScale ( float scale)

Extra UI zoom on top of the main window's display scale (1 follows the OS).

Styles are registered at display scale x zoom. May be called before Initialize.

◆ GetUIScale()

float tachyon::GUIApplication::GetUIScale ( ) const
inline

The graphics backend Initialize uses; without one it creates a vulkan::VulkanGraphicsContext.

Set it up through its own API first, for example SetExternalDevice to render on the host's device. Owned until Cleanup. Call before Initialize.

◆ SetReducedMotion()

void tachyon::GUIApplication::SetReducedMotion ( std::optional< bool > reduced)

Reduced motion: changes of state show at once instead of blending.

By default it follows the OS (on Windows, "Animation effects" turned off); true or false sets it, nullopt follows the OS again.

◆ IsThemeCrossfading()

bool tachyon::GUIApplication::IsThemeCrossfading ( ) const
inline

True while a theme switch is crossfading (the old look fading out over the new).

◆ IsReducedMotion()

bool tachyon::GUIApplication::IsReducedMotion ( ) const
inline

Whether changes of state show at once now.

◆ OnGUI()

virtual void tachyon::GUIApplication::OnGUI ( )
pure virtual

Builds the UI; called each frame.

◆ Run()

Result< void > tachyon::GUIApplication::Run ( )

Loops over the frame calls below until the app quits; an error when the GPU device was lost and couldn't be made again (a host's device).

◆ UpdateFrame()

bool tachyon::GUIApplication::UpdateFrame ( )

One frame, for a host with its own main loop:

while (app.UpdateFrame()) { app.RecordFrame(); /* the host's own work *&zwj;/ app.PresentFrame(); }

UpdateFrame pumps OS events and input (false once the app quits). RecordFrame builds the UI and records and submits every window; render-to-image windows are done then. A lost GPU device is made again first; an error when it can't be (a host's device). PresentFrame presents the OS windows and may wait for vsync.

◆ RecordFrame()

Result< void > tachyon::GUIApplication::RecordFrame ( )

See UpdateFrame.

◆ PresentFrame()

void tachyon::GUIApplication::PresentFrame ( )

See UpdateFrame.

◆ MakeToggleHandler()

tachyon::EventHandler tachyon::GUIApplication::MakeToggleHandler ( bool & toggle)

A handler that flips toggle on click.

◆ MakeButtonHandler()

tachyon::EventHandler tachyon::GUIApplication::MakeButtonHandler ( std::function< void()> onClick)

A handler that calls onClick on click.

◆ MakeLabelHandler()

tachyon::EventHandler tachyon::GUIApplication::MakeLabelHandler ( )

A label's handler: a click focuses the control the label belongs to.

◆ RegisterElement() [1/2]

tachyon::ElementRef tachyon::GUIApplication::RegisterElement ( tachyon::Element && element,
LayoutOverride && constraints )

Adds an element, with its interaction state, to the current window; for custom elements.

◆ RegisterElement() [2/2]

tachyon::ElementRef tachyon::GUIApplication::RegisterElement ( tachyon::Element && element,
std::string_view text,
LayoutOverride && constraints )

As above, with Text registered as its text.

◆ TakeEscapeFor()

bool tachyon::GUIApplication::TakeEscapeFor ( ID popupWindowID,
ID triggerID )

While building a popup's trigger: true, and the key taken, when Escape was pressed this frame with the keyboard in the popup's window or on the trigger.

◆ RegisterControl() [1/3]

tachyon::ElementRef tachyon::GUIApplication::RegisterControl ( tachyon::Element && element,
LayoutOverride && constraints )

As RegisterElement, for a control: it joins the Tab order and needs a valid ID.

◆ RegisterControl() [2/3]

tachyon::ElementRef tachyon::GUIApplication::RegisterControl ( tachyon::Element && element,
std::string_view text,
LayoutOverride && constraints )

As above, with Text registered as its text.

◆ RegisterControl() [3/3]

tachyon::ElementRef tachyon::GUIApplication::RegisterControl ( tachyon::Element && element,
std::function< TextID(tachyon::Element &element)> createTextID,
LayoutOverride && constraints )

As above; createTextID registers the text, given the element with its current state.

◆ MenuItemRow()

tachyon::ElementRef tachyon::GUIApplication::MenuItemRow ( ID id,
tachyon::EventHandler handler,
StyleRef rowStyle,
bool reserveIcon,
IconID icon,
std::string_view text,
std::string_view trailing,
StyleRef trailingStyle,
LayoutOverride && constraints,
bool destructive = false )

A menu row: an icon slot, the label and a trailing text (a shortcut or a submenu arrow).

The row takes the input and the highlight. reserveIcon keeps the icon slot without an icon, so labels line up in a menu that mixes both.

◆ MenuItemImpl()

bool tachyon::GUIApplication::MenuItemImpl ( ID id,
const GUIContent & content,
std::string_view shortcut,
std::function< void()> onClick,
StyleRef style,
bool destructive,
LayoutOverride && constraints )

SearchField, also giving the ID of its text field (to focus it).

Internal: the body of MenuItem and DestructiveMenuItem.

◆ ShowContentTooltip()

void tachyon::GUIApplication::ShowContentTooltip ( ID id,
const GUIContent & content )
inline

The content's tooltip, if it has one, on the control id.

◆ BeginIndeterminate()

bool tachyon::GUIApplication::BeginIndeterminate ( )
inline

Value fields emitted in between show a dash for mixed values (e.g.

across a selection) and can't be edited.

◆ EndIndeterminate()

void tachyon::GUIApplication::EndIndeterminate ( )
inline

Closes BeginIndeterminate.

◆ Button() [1/4]

bool tachyon::GUIApplication::Button ( ID id,
const GUIContent & content,
std::function< void()> onClick,
StyleRef style,
LayoutOverride && constraints = {} )

Controls take (id, icon, text, ..., style, constraints), each part optional.

A change is reported twice: input is handled after the frame it arrives in, where the callback runs; the return value is true in the next frame. Without an id, the control's ID comes from its call site.

◆ Button() [2/4]

bool tachyon::GUIApplication::Button ( ID id,
const GUIContent & content,
std::function< void()> onClick,
LayoutOverride && constraints = {} )
inline

As above, in the theme's button style.

◆ Button() [3/4]

bool tachyon::GUIApplication::Button ( const GUIContent & content,
std::function< void()> onClick,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ Button() [4/4]

bool tachyon::GUIApplication::Button ( const GUIContent & content,
std::function< void()> onClick,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's button style.

◆ CommandButton() [1/2]

bool tachyon::GUIApplication::CommandButton ( CommandID command,
StyleRef style,
LayoutOverride && constraints = {} )

Icon button for a command; the tooltip shows its name and shortcut, e.g. "Undo (Ctrl+Z)".

◆ CommandButton() [2/2]

bool tachyon::GUIApplication::CommandButton ( CommandID command,
LayoutOverride && constraints = {} )
inline

As above, in the theme's button style.

◆ Checkbox() [1/8]

bool tachyon::GUIApplication::Checkbox ( ID id,
bool value,
std::string_view text,
std::function< void(bool)> onToggle,
StyleRef style,
LayoutOverride && constraints = {} )

A checkbox (a box, checked with a tick) and its label; a click calls onToggle with the new value.

◆ Checkbox() [2/8]

bool tachyon::GUIApplication::Checkbox ( ID id,
bool value,
std::string_view text,
std::function< void(bool)> onToggle,
LayoutOverride && constraints = {} )
inline

As above, in the theme's checkbox style.

◆ Checkbox() [3/8]

bool tachyon::GUIApplication::Checkbox ( bool value,
std::string_view text,
std::function< void(bool)> onToggle,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ Checkbox() [4/8]

bool tachyon::GUIApplication::Checkbox ( bool value,
std::string_view text,
std::function< void(bool)> onToggle,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's checkbox style.

◆ Checkbox() [5/8]

bool tachyon::GUIApplication::Checkbox ( ID id,
bool & value,
std::string_view text,
StyleRef style,
LayoutOverride && constraints = {} )
inline

Checks and unchecks value itself.

◆ Checkbox() [6/8]

bool tachyon::GUIApplication::Checkbox ( ID id,
bool & value,
std::string_view text = {},
LayoutOverride && constraints = {} )
inline

As above, in the theme's checkbox style.

◆ Checkbox() [7/8]

bool tachyon::GUIApplication::Checkbox ( bool & value,
std::string_view text,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ Checkbox() [8/8]

bool tachyon::GUIApplication::Checkbox ( bool & value,
std::string_view text = {},
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's checkbox style.

◆ Switch() [1/8]

bool tachyon::GUIApplication::Switch ( ID id,
bool value,
std::string_view text,
std::function< void(bool)> onToggle,
StyleRef style,
LayoutOverride && constraints = {} )

An on/off switch (track and knob) with an optional label after it, e.g. "On".

◆ Switch() [2/8]

bool tachyon::GUIApplication::Switch ( ID id,
bool value,
std::string_view text,
std::function< void(bool)> onToggle,
LayoutOverride && constraints = {} )
inline

As above, in the theme's switch style.

◆ Switch() [3/8]

bool tachyon::GUIApplication::Switch ( bool value,
std::string_view text,
std::function< void(bool)> onToggle,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ Switch() [4/8]

bool tachyon::GUIApplication::Switch ( bool value,
std::string_view text,
std::function< void(bool)> onToggle,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's switch style.

◆ Switch() [5/8]

bool tachyon::GUIApplication::Switch ( ID id,
bool & value,
std::string_view text,
StyleRef style,
LayoutOverride && constraints = {} )
inline

Switches value itself.

◆ Switch() [6/8]

bool tachyon::GUIApplication::Switch ( ID id,
bool & value,
std::string_view text = {},
LayoutOverride && constraints = {} )
inline

As above, in the theme's switch style.

◆ Switch() [7/8]

bool tachyon::GUIApplication::Switch ( bool & value,
std::string_view text,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ Switch() [8/8]

bool tachyon::GUIApplication::Switch ( bool & value,
std::string_view text = {},
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's switch style.

◆ Toggle() [1/8]

bool tachyon::GUIApplication::Toggle ( ID id,
bool value,
const GUIContent & content,
std::function< void(bool)> onToggle,
StyleRef style,
LayoutOverride && constraints = {} )

A button that shows pressed while value is on; a click calls onToggle with the new value.

◆ Toggle() [2/8]

bool tachyon::GUIApplication::Toggle ( ID id,
bool value,
const GUIContent & content,
std::function< void(bool)> onToggle,
LayoutOverride && constraints = {} )
inline

As above, in the theme's toggle style.

◆ Toggle() [3/8]

bool tachyon::GUIApplication::Toggle ( bool value,
const GUIContent & content,
std::function< void(bool)> onToggle,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ Toggle() [4/8]

bool tachyon::GUIApplication::Toggle ( bool value,
const GUIContent & content,
std::function< void(bool)> onToggle,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's toggle style.

◆ Toggle() [5/8]

bool tachyon::GUIApplication::Toggle ( ID id,
bool & value,
const GUIContent & content,
StyleRef style,
LayoutOverride && constraints = {} )
inline

Toggles value itself.

◆ Toggle() [6/8]

bool tachyon::GUIApplication::Toggle ( ID id,
bool & value,
const GUIContent & content,
LayoutOverride && constraints = {} )
inline

As above, in the theme's toggle style.

◆ Toggle() [7/8]

bool tachyon::GUIApplication::Toggle ( bool & value,
const GUIContent & content,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ Toggle() [8/8]

bool tachyon::GUIApplication::Toggle ( bool & value,
const GUIContent & content,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's toggle style.

◆ BeginMenu() [1/4]

bool tachyon::GUIApplication::BeginMenu ( ID id,
std::string_view text,
StyleRef buttonStyle,
StyleRef menuStyle,
StyleRef itemStyle,
LayoutOverride && constraints = {} )

A menu: a trigger button (in a menu bar or on its own), or a submenu item inside another menu.

True while it is open: emit its items then. EndMenu is called either way.

◆ BeginMenu() [2/4]

bool tachyon::GUIApplication::BeginMenu ( ID id,
std::string_view text,
LayoutOverride && constraints = {} )
inline

As above, in the theme's menu styles.

◆ BeginMenu() [3/4]

bool tachyon::GUIApplication::BeginMenu ( std::string_view text,
StyleRef buttonStyle,
StyleRef menuStyle,
StyleRef itemStyle,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ BeginMenu() [4/4]

bool tachyon::GUIApplication::BeginMenu ( std::string_view text,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's menu styles.

◆ Dropdown() [1/8]

bool tachyon::GUIApplication::Dropdown ( ID id,
int & selected,
std::span< const std::string_view > options,
StyleRef style,
LayoutOverride && constraints = {} )

A dropdown: a field showing options[selected] that opens the list of options under itself.

Picking one (click, or arrows and Enter) sets selected and returns true on that frame; Escape or a click elsewhere closes the list unchanged. The open list starts on the current option. An out-of-range selected shows an empty field.

◆ Dropdown() [2/8]

bool tachyon::GUIApplication::Dropdown ( ID id,
int & selected,
std::span< const std::string_view > options,
LayoutOverride && constraints = {} )
inline

As above, in the theme's dropdown style.

◆ Dropdown() [3/8]

bool tachyon::GUIApplication::Dropdown ( int & selected,
std::span< const std::string_view > options,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ Dropdown() [4/8]

bool tachyon::GUIApplication::Dropdown ( int & selected,
std::span< const std::string_view > options,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's dropdown style.

◆ Dropdown() [5/8]

bool tachyon::GUIApplication::Dropdown ( ID id,
int & selected,
std::initializer_list< std::string_view > options,
LayoutOverride && constraints = {} )
inline

With the options written in place: Dropdown(quality, { "Low", "Medium", "High" }).

◆ Dropdown() [6/8]

bool tachyon::GUIApplication::Dropdown ( int & selected,
std::initializer_list< std::string_view > options,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ Dropdown() [7/8]

bool tachyon::GUIApplication::Dropdown ( ID id,
int & selected,
std::initializer_list< std::string_view > options,
StyleRef style,
LayoutOverride && constraints = {} )
inline

As above, in style.

◆ Dropdown() [8/8]

bool tachyon::GUIApplication::Dropdown ( int & selected,
std::initializer_list< std::string_view > options,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in style.

◆ MenuHeader()

void tachyon::GUIApplication::MenuHeader ( std::string_view text)

A section's name between items, e.g. "View", lined up with the labels.

◆ MessageDialog() [1/4]

int tachyon::GUIApplication::MessageDialog ( ID id,
const MessageDialogDesc & desc,
StyleRef style )

A modal question with verb buttons, centered.

Call it every frame while asking; it returns the index of the button chosen (once, on the frame after), else -1. Esc and the close button choose desc.cancelButton; Alt + a button's first letter chooses it.

◆ MessageDialog() [2/4]

int tachyon::GUIApplication::MessageDialog ( ID id,
const MessageDialogDesc & desc )
inline

As above, in the theme's message box style.

◆ MessageDialog() [3/4]

int tachyon::GUIApplication::MessageDialog ( const MessageDialogDesc & desc,
StyleRef style,
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ MessageDialog() [4/4]

int tachyon::GUIApplication::MessageDialog ( const MessageDialogDesc & desc,
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's message box style.

◆ ShowToast()

ToastID tachyon::GUIApplication::ShowToast ( ToastDesc desc)

Shows a toast in the corner of the window that builds Toasts.

Errors stay until dismissed; the rest go after about 6 s (not while the pointer is over the toasts, nor while a progress bar is short of 1).

◆ FindToast()

ToastDesc * tachyon::GUIApplication::FindToast ( ToastID toast)

A shown toast's description, to change (its progress, its body); null once it's gone.

◆ DismissToast()

void tachyon::GUIApplication::DismissToast ( ToastID toast)

Takes a toast away, as its close button does.

◆ Toasts()

void tachyon::GUIApplication::Toasts ( )

The toasts, in the current window's bottom-right corner over what's built before; call it last in the window.

The newest is nearest the corner; ones past the fourth fold into a "+N earlier" pill, which shows them all.

◆ Banner() [1/2]

void tachyon::GUIApplication::Banner ( ID id,
Severity severity,
const GUIContent & message,
std::span< const BannerAction > actions = {},
LayoutOverride && constraints = {} )

A banner across the top of a panel: the message (message.icon, else the severity's) on the severity's tint, then actions, right-aligned.

◆ Banner() [2/2]

void tachyon::GUIApplication::Banner ( Severity severity,
const GUIContent & message,
std::span< const BannerAction > actions = {},
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ CloseRequested()

bool tachyon::GUIApplication::CloseRequested ( ID windowID)

Whether the user asked to close a window flagged WindowConfirmClose (its close button, Alt+F4, the OS quitting) since last asked.

The window stays until the app closes it, e.g. after asking with a MessageDialog.

◆ MenuFilter()

void tachyon::GUIApplication::MenuFilter ( )

A filter field for a big menu, first in it: it takes the keyboard when the menu opens, and while it holds text the items (and headers and separators) that don't contain it are left out.

◆ MenuItem() [1/9]

bool tachyon::GUIApplication::MenuItem ( ID id,
const GUIContent & content,
std::string_view shortcut,
std::function< void()> onClick,
StyleRef style,
LayoutOverride && constraints = {} )

Optional icon, label, optional shortcut. The icon column is reserved if any sibling has an icon.

◆ MenuItem() [2/9]

bool tachyon::GUIApplication::MenuItem ( ID id,
const GUIContent & content,
std::function< void()> onClick = nullptr,
LayoutOverride && constraints = {} )
inline

As above, without a shortcut, in the theme's item style.

◆ MenuItem() [3/9]

bool tachyon::GUIApplication::MenuItem ( const GUIContent & content,
std::function< void()> onClick = nullptr,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ MenuItem() [4/9]

bool tachyon::GUIApplication::MenuItem ( ID id,
const GUIContent & content,
std::string_view shortcut,
std::function< void()> onClick,
LayoutOverride && constraints = {} )
inline

With a shortcut; onClick is required so MenuItem(text, nullptr) stays unambiguous.

◆ MenuItem() [5/9]

bool tachyon::GUIApplication::MenuItem ( const GUIContent & content,
std::string_view shortcut,
std::function< void()> onClick,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ MenuItem() [6/9]

bool tachyon::GUIApplication::MenuItem ( const GUIContent & content,
std::string_view shortcut,
std::function< void()> onClick,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

With a shortcut, the call site as the ID and style.

◆ MenuItem() [7/9]

bool tachyon::GUIApplication::MenuItem ( ID id,
const GUIContent & content,
std::function< void()> onClick,
StyleRef style,
LayoutOverride && constraints = {} )
inline

Without a shortcut, in style.

◆ MenuItem() [8/9]

bool tachyon::GUIApplication::MenuItem ( const GUIContent & content,
std::function< void()> onClick,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

Without a shortcut, with the call site as the ID, in style.

◆ MenuItem() [9/9]

bool tachyon::GUIApplication::MenuItem ( CommandID command)

Menu item for a command: icon, label, shortcut and callback come from the command.

◆ DestructiveMenuItem() [1/8]

bool tachyon::GUIApplication::DestructiveMenuItem ( ID id,
const GUIContent & content,
std::string_view shortcut,
std::function< void()> onClick,
StyleRef style,
LayoutOverride && constraints = {} )

An item that destroys something (Delete, Discard), in the error color.

◆ DestructiveMenuItem() [2/8]

bool tachyon::GUIApplication::DestructiveMenuItem ( ID id,
const GUIContent & content,
std::string_view shortcut,
std::function< void()> onClick,
LayoutOverride && constraints = {} )
inline

As above, in the theme's item style.

◆ DestructiveMenuItem() [3/8]

bool tachyon::GUIApplication::DestructiveMenuItem ( const GUIContent & content,
std::string_view shortcut,
std::function< void()> onClick,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ DestructiveMenuItem() [4/8]

bool tachyon::GUIApplication::DestructiveMenuItem ( const GUIContent & content,
std::string_view shortcut,
std::function< void()> onClick,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's item style.

◆ DestructiveMenuItem() [5/8]

bool tachyon::GUIApplication::DestructiveMenuItem ( ID id,
const GUIContent & content,
std::function< void()> onClick,
StyleRef style,
LayoutOverride && constraints = {} )
inline

Without a shortcut, in style.

◆ DestructiveMenuItem() [6/8]

bool tachyon::GUIApplication::DestructiveMenuItem ( ID id,
const GUIContent & content,
std::function< void()> onClick,
LayoutOverride && constraints = {} )
inline

Without a shortcut, in the theme's item style.

◆ DestructiveMenuItem() [7/8]

bool tachyon::GUIApplication::DestructiveMenuItem ( const GUIContent & content,
std::function< void()> onClick,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

Without a shortcut, with the call site as the ID, in style.

◆ DestructiveMenuItem() [8/8]

bool tachyon::GUIApplication::DestructiveMenuItem ( const GUIContent & content,
std::function< void()> onClick,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

Without a shortcut, with the call site as the ID, in the theme's item style.

◆ EndMenu()

void tachyon::GUIApplication::EndMenu ( )

Closes BeginMenu; called whether or not it returned true.

◆ BeginMenuBar() [1/4]

bool tachyon::GUIApplication::BeginMenuBar ( ID id,
StyleRef style,
LayoutOverride && constraints = {} )

Menu bar: place BeginMenu triggers inside.

Left/Right move between triggers, Down enters the dropdown, Up at its first item returns to the trigger.

◆ BeginMenuBar() [2/4]

bool tachyon::GUIApplication::BeginMenuBar ( ID id,
LayoutOverride && constraints = {} )
inline

As above, in the theme's menu bar style.

◆ BeginMenuBar() [3/4]

bool tachyon::GUIApplication::BeginMenuBar ( LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ BeginMenuBar() [4/4]

bool tachyon::GUIApplication::BeginMenuBar ( StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in style.

◆ EndMenuBar()

void tachyon::GUIApplication::EndMenuBar ( )

Closes BeginMenuBar.

◆ BeginTitleBar() [1/4]

bool tachyon::GUIApplication::BeginTitleBar ( ID id,
StyleRef style,
LayoutOverride && constraints = {} )

A menu bar the window is dragged by: what in it isn't a control is the caption (drag to move, double-click to maximize).

In a window with ElementFlags::WindowCustomTitleBar, EndTitleBar adds the window buttons.

◆ BeginTitleBar() [2/4]

bool tachyon::GUIApplication::BeginTitleBar ( ID id,
LayoutOverride && constraints = {} )
inline

As above, in the theme's title bar style.

◆ BeginTitleBar() [3/4]

bool tachyon::GUIApplication::BeginTitleBar ( LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ BeginTitleBar() [4/4]

bool tachyon::GUIApplication::BeginTitleBar ( StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in style.

◆ EndTitleBar()

void tachyon::GUIApplication::EndTitleBar ( )

Closes BeginTitleBar, adding the window buttons in a custom-title-bar window.

◆ TitleBarHitTest()

WindowHitArea tachyon::GUIApplication::TitleBarHitTest ( ID windowID,
int2 screenPos ) const

What the OS should do with a screen point of a window with a custom title bar.

◆ MenuSeparator()

void tachyon::GUIApplication::MenuSeparator ( )

Divider inside a menu or context menu.

◆ SetTooltip() [1/9]

void tachyon::GUIApplication::SetTooltip ( ID targetID,
std::string_view text )

A text tooltip on targetID, shown when the pointer rests on it.

◆ SetTooltip() [2/9]

void tachyon::GUIApplication::SetTooltip ( ID targetID,
IconID icon,
std::string_view text )

As above, with an icon before the text.

◆ SetTooltip() [3/9]

void tachyon::GUIApplication::SetTooltip ( std::string_view text)
inline

As above, on the control just drawn (its outer element, shown over all its parts).

◆ SetTooltip() [4/9]

void tachyon::GUIApplication::SetTooltip ( IconID icon,
std::string_view text )
inline

As above, with an icon, on the control just drawn.

◆ SetTooltip() [5/9]

void tachyon::GUIApplication::SetTooltip ( ID targetID,
std::string_view text,
std::string_view shortcut )

As above, with the keyboard shortcut that does the same in a chip after the text.

◆ SetTooltip() [6/9]

void tachyon::GUIApplication::SetTooltip ( ID targetID,
IconID icon,
std::string_view text,
std::string_view shortcut )

As above, with an icon.

◆ SetTooltip() [7/9]

void tachyon::GUIApplication::SetTooltip ( std::string_view text,
std::string_view shortcut )
inline

As above, for the last control.

◆ SetTooltip() [8/9]

void tachyon::GUIApplication::SetTooltip ( ID targetID,
const PropertyHelp & help )

A property's help on targetID, in a larger tooltip: its title, description and footer.

A label given help (Label, DragLabel) is underlined, dotted.

◆ SetTooltip() [9/9]

void tachyon::GUIApplication::SetTooltip ( const PropertyHelp & help)
inline

As above, for the last control.

◆ SetErrorTooltip() [1/2]

void tachyon::GUIApplication::SetErrorTooltip ( ID targetID,
std::string_view message )

Why a value isn't accepted, in a tooltip on the popup surface with an error border (and arrow).

Goes with BeginInvalid, which gives the control its error border and halo.

◆ SetErrorTooltip() [2/2]

void tachyon::GUIApplication::SetErrorTooltip ( std::string_view message)
inline

As above, for the last control.

◆ SetDisabledTooltip() [1/2]

void tachyon::GUIApplication::SetDisabledTooltip ( ID targetID,
std::string_view text,
std::string_view reason )

A text tooltip that, while targetID is disabled, also says why, on a second, muted line.

A disabled control shows its tooltip, though it takes no input.

◆ SetDisabledTooltip() [2/2]

void tachyon::GUIApplication::SetDisabledTooltip ( std::string_view text,
std::string_view reason )
inline

As above, for the last control.

◆ BeginTooltip() [1/2]

bool tachyon::GUIApplication::BeginTooltip ( ID targetID)

A tooltip with any content on targetID: build it while this returns true.

EndTooltip is called either way.

◆ BeginTooltip() [2/2]

bool tachyon::GUIApplication::BeginTooltip ( )
inline

As above, on the control just drawn.

◆ EndTooltip()

void tachyon::GUIApplication::EndTooltip ( )

Closes BeginTooltip; called whether or not it returned true.

◆ BeginContextMenu() [1/2]

bool tachyon::GUIApplication::BeginContextMenu ( ID targetID)

Context menu: opens at the pointer on a right-click on the target element, or below it on Shift+F10 or the Menu key while it has the focus.

A target that takes its parts' states (PropagatesDescendantState) opens for them too; when several targets match, the first BeginContextMenu of the frame wins.

◆ BeginContextMenu() [2/2]

bool tachyon::GUIApplication::BeginContextMenu ( )
inline

As above, on the control just drawn.

◆ EndContextMenu()

void tachyon::GUIApplication::EndContextMenu ( )

Closes BeginContextMenu; called whether or not it returned true.

◆ OpenContextMenu()

void tachyon::GUIApplication::OpenContextMenu ( ID targetID,
int2 screenPos )

Opens targetID's context menu at a screen point, e.g.

for something that isn't an element; BeginContextMenu(targetID) then builds it.

◆ BeginLabelGroup() [1/2]

bool tachyon::GUIApplication::BeginLabelGroup ( ID id,
CssPx defaultWidth = 120,
CssPx minWidth = 40,
CssPx maxWidth = 500,
bool resizable = true )

Label group: Labels/DragLabels inside share one width, resizable by dragging any label's right edge.

Widths in CSS pixels.

◆ BeginLabelGroup() [2/2]

bool tachyon::GUIApplication::BeginLabelGroup ( CssPx defaultWidth = 120,
CssPx minWidth = 40,
CssPx maxWidth = 500,
bool resizable = true,
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ EndLabelGroup()

void tachyon::GUIApplication::EndLabelGroup ( )

Closes BeginLabelGroup.

◆ BeginButtonGroup()

bool tachyon::GUIApplication::BeginButtonGroup ( LayoutOverride && constraints = {})

Button / toggle group: Buttons / Field(bool) inside are restyled with .first-/.mid-/.last-* so they share borders.

A single item keeps its plain style.

◆ EndButtonGroup()

void tachyon::GUIApplication::EndButtonGroup ( )

Closes BeginButtonGroup.

◆ BeginToggleGroup()

bool tachyon::GUIApplication::BeginToggleGroup ( LayoutOverride && constraints = {})

The same for Toggles and Field(bool).

◆ EndToggleGroup()

void tachyon::GUIApplication::EndToggleGroup ( )

Closes BeginToggleGroup.

◆ BeginArea() [1/4]

bool tachyon::GUIApplication::BeginArea ( ID id,
StyleRef style,
LayoutOverride && constraints = {} )

A container drawn in style, for grouping content; it scrolls when bounded and its style has overflow: auto.

◆ BeginArea() [2/4]

bool tachyon::GUIApplication::BeginArea ( ID id,
LayoutOverride && constraints = {} )
inline

As above, in the theme's area style.

◆ BeginArea() [3/4]

bool tachyon::GUIApplication::BeginArea ( StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ BeginArea() [4/4]

bool tachyon::GUIApplication::BeginArea ( LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's area style.

◆ EndArea()

void tachyon::GUIApplication::EndArea ( )

Closes BeginArea.

◆ BeginCached() [1/2]

bool tachyon::GUIApplication::BeginCached ( ID id,
StyleRef style,
uint64_t signature = 0,
LayoutOverride && constraints = {} )

A container (like BeginArea) whose drawing is kept: while nothing changed it returns false, skipping the content, and the kept drawing is shown.

EndCached is called either way. id must be the same every frame (for example a static ID). The content is rebuilt when its size changes, when input reaches it, when signature changes, or after Invalidate(id); change signature when it shows data the cache can't see change.

◆ BeginCached() [2/2]

bool tachyon::GUIApplication::BeginCached ( ID id,
uint64_t signature = 0,
LayoutOverride && constraints = {} )
inline

As above, in the theme's area style.

◆ EndCached()

void tachyon::GUIApplication::EndCached ( )

Closes BeginCached; called whether or not it returned true.

◆ Invalidate()

void tachyon::GUIApplication::Invalidate ( ID id)

Rebuilds id's cached scope, and those around it, next frame. Safe from event handlers.

◆ SetDrawCacheEnabled()

void tachyon::GUIApplication::SetDrawCacheEnabled ( bool enabled)
inline

Enables the retained-render cache (on by default). When off, every scope rebuilds.

◆ InvalidatePanel()

void tachyon::GUIApplication::InvalidatePanel ( ID panelId)

Invalidates a docked panel's cached content by panel id. Safe from event handlers.

◆ BeginHorizontal() [1/4]

bool tachyon::GUIApplication::BeginHorizontal ( ID id,
StyleRef style,
LayoutOverride && constraints = {} )

Undecorated flex containers; the Wrap variants wrap onto further lines/columns.

◆ BeginHorizontal() [2/4]

bool tachyon::GUIApplication::BeginHorizontal ( ID id,
LayoutOverride && constraints = {} )
inline

As above, in the theme's plain style.

◆ BeginHorizontal() [3/4]

bool tachyon::GUIApplication::BeginHorizontal ( StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ BeginHorizontal() [4/4]

bool tachyon::GUIApplication::BeginHorizontal ( LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's plain style.

◆ EndHorizontal()

void tachyon::GUIApplication::EndHorizontal ( )

Closes BeginHorizontal.

◆ BeginHorizontalWrap() [1/4]

bool tachyon::GUIApplication::BeginHorizontalWrap ( ID id,
StyleRef style,
LayoutOverride && constraints = {} )

A horizontal container whose children wrap onto further lines.

◆ BeginHorizontalWrap() [2/4]

bool tachyon::GUIApplication::BeginHorizontalWrap ( ID id,
LayoutOverride && constraints = {} )
inline

As above, in the theme's plain style.

◆ BeginHorizontalWrap() [3/4]

bool tachyon::GUIApplication::BeginHorizontalWrap ( StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ BeginHorizontalWrap() [4/4]

bool tachyon::GUIApplication::BeginHorizontalWrap ( LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's plain style.

◆ EndHorizontalWrap()

void tachyon::GUIApplication::EndHorizontalWrap ( )

Closes BeginHorizontalWrap.

◆ BeginVertical() [1/4]

bool tachyon::GUIApplication::BeginVertical ( ID id,
StyleRef style,
LayoutOverride && constraints = {} )

A vertical container.

◆ BeginVertical() [2/4]

bool tachyon::GUIApplication::BeginVertical ( ID id,
LayoutOverride && constraints = {} )
inline

As above, in the theme's plain style.

◆ BeginVertical() [3/4]

bool tachyon::GUIApplication::BeginVertical ( StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ BeginVertical() [4/4]

bool tachyon::GUIApplication::BeginVertical ( LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's plain style.

◆ EndVertical()

void tachyon::GUIApplication::EndVertical ( )

Closes BeginVertical.

◆ BeginVerticalWrap() [1/4]

bool tachyon::GUIApplication::BeginVerticalWrap ( ID id,
StyleRef style,
LayoutOverride && constraints = {} )

A vertical container whose children wrap onto further columns.

◆ BeginVerticalWrap() [2/4]

bool tachyon::GUIApplication::BeginVerticalWrap ( ID id,
LayoutOverride && constraints = {} )
inline

As above, in the theme's plain style.

◆ BeginVerticalWrap() [3/4]

bool tachyon::GUIApplication::BeginVerticalWrap ( StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ BeginVerticalWrap() [4/4]

bool tachyon::GUIApplication::BeginVerticalWrap ( LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's plain style.

◆ EndVerticalWrap()

void tachyon::GUIApplication::EndVerticalWrap ( )

Closes BeginVerticalWrap.

◆ BeginToolbar()

bool tachyon::GUIApplication::BeginToolbar ( bool horizontal = true)

Toolbar scope: a wrap container that swaps theme.controls to the toolbar styles, so default-style widgets inside use their toolbar variants.

◆ EndToolbar()

void tachyon::GUIApplication::EndToolbar ( )

Closes BeginToolbar.

◆ VerticalScrollbar() [1/2]

void tachyon::GUIApplication::VerticalScrollbar ( ID scrollBarID,
ID containerID )

A vertical scrollbar for containerID, called from inside it: it overlays the container's border box and draws nothing without overflow.

◆ VerticalScrollbar() [2/2]

void tachyon::GUIApplication::VerticalScrollbar ( ID containerID)
inline

As above, with an ID derived from the container's.

◆ HorizontalScrollbar() [1/2]

void tachyon::GUIApplication::HorizontalScrollbar ( ID scrollBarID,
ID containerID )

As VerticalScrollbar, horizontal.

◆ HorizontalScrollbar() [2/2]

void tachyon::GUIApplication::HorizontalScrollbar ( ID containerID)
inline

As above, with an ID derived from the container's.

◆ ScrollbarOverlay()

void tachyon::GUIApplication::ScrollbarOverlay ( ID containerID,
int2 lastInnerSize = int2{0, 0},
ID vertScrollBarID = ID::Invalid(),
ID horzScrollBarID = ID::Invalid(),
bool emitVert = true,
bool emitHorz = true )

Both bars plus a corner cap; each hides itself without overflow.

lastInnerSize (the container's last-frame inner size) trims the bars around the cap.

◆ BeginReorderableGroup() [1/8]

bool tachyon::GUIApplication::BeginReorderableGroup ( ID id,
ReorderDirection direction,
bool isWrapped,
std::function< void(int fromIndex, int toIndex)> onReorder,
StyleRef style,
LayoutOverride && constraints = {},
std::function< void(int, tachyon::int2)> onDragOut = nullptr,
std::function< void(int, tachyon::int2)> dragVisualizer = nullptr )

A container of BeginReorderableItem scopes the user reorders by dragging.

onReorder(from, to) runs on drop; isWrapped lets items wrap onto more lines.

◆ BeginReorderableGroup() [2/8]

bool tachyon::GUIApplication::BeginReorderableGroup ( ID id,
ReorderDirection direction,
std::function< void(int fromIndex, int toIndex)> onReorder,
StyleRef style,
LayoutOverride && constraints = {} )
inline

As above, not wrapped.

◆ BeginReorderableGroup() [3/8]

bool tachyon::GUIApplication::BeginReorderableGroup ( ID id,
ReorderDirection direction,
std::function< void(int fromIndex, int toIndex)> onReorder,
LayoutOverride && constraints = {} )
inline

As above, not wrapped, in the theme's style for the direction.

◆ BeginReorderableGroup() [4/8]

bool tachyon::GUIApplication::BeginReorderableGroup ( ID id,
ReorderDirection direction,
bool isWrapped,
std::function< void(int fromIndex, int toIndex)> onReorder,
LayoutOverride && constraints = {} )
inline

As above, in the theme's style for the direction and wrapping.

◆ BeginReorderableGroup() [5/8]

bool tachyon::GUIApplication::BeginReorderableGroup ( ReorderDirection direction,
bool isWrapped,
std::function< void(int fromIndex, int toIndex)> onReorder,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ BeginReorderableGroup() [6/8]

bool tachyon::GUIApplication::BeginReorderableGroup ( ReorderDirection direction,
bool isWrapped,
std::function< void(int fromIndex, int toIndex)> onReorder,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's style for the direction and wrapping.

◆ BeginReorderableGroup() [7/8]

bool tachyon::GUIApplication::BeginReorderableGroup ( ReorderDirection direction,
std::function< void(int fromIndex, int toIndex)> onReorder,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, not wrapped, with the call site as the ID.

◆ BeginReorderableGroup() [8/8]

bool tachyon::GUIApplication::BeginReorderableGroup ( ReorderDirection direction,
std::function< void(int fromIndex, int toIndex)> onReorder,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, not wrapped, with the call site as the ID, in the theme's style for the direction.

◆ ReorderableGroupStyle()

StyleRef tachyon::GUIApplication::ReorderableGroupStyle ( ReorderDirection direction,
bool isWrapped ) const
inline

The theme's reorderable group style for a direction and wrapping.

◆ EndReorderableGroup()

void tachyon::GUIApplication::EndReorderableGroup ( )

Closes BeginReorderableGroup.

◆ BeginReorderableItem() [1/4]

bool tachyon::GUIApplication::BeginReorderableItem ( ID id,
StyleRef style,
LayoutOverride && constraints = {} )

One draggable item of a reorderable group; any content goes inside.

◆ BeginReorderableItem() [2/4]

bool tachyon::GUIApplication::BeginReorderableItem ( ID id,
LayoutOverride && constraints = {} )
inline

As above, in the theme's item style.

◆ BeginReorderableItem() [3/4]

bool tachyon::GUIApplication::BeginReorderableItem ( StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ BeginReorderableItem() [4/4]

bool tachyon::GUIApplication::BeginReorderableItem ( LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's item style.

◆ EndReorderableItem()

void tachyon::GUIApplication::EndReorderableItem ( )

Closes BeginReorderableItem.

◆ EmitDragHandle()

void tachyon::GUIApplication::EmitDragHandle ( )

Non-interactive drag handle for use inside BeginReorderableItem; clicks reach the item.

◆ BeginListView() [1/8]

bool tachyon::GUIApplication::BeginListView ( ID id,
int * selectedIndex,
int itemCount,
ItemDragDropConfig * dragDrop,
StyleRef style,
LayoutOverride && constraints = {} )

Opens a list view of ListItems.

selectedIndex (optional) holds the selection, which a click or Up / Down changes; itemCount bounds the keys. dragDrop (optional) lets items be dragged.

◆ BeginListView() [2/8]

bool tachyon::GUIApplication::BeginListView ( ID id,
int * selectedIndex,
int itemCount,
StyleRef style,
LayoutOverride && constraints = {} )
inline

As above, without drag and drop.

◆ BeginListView() [3/8]

bool tachyon::GUIApplication::BeginListView ( ID id,
int * selectedIndex,
int itemCount,
LayoutOverride && constraints = {} )
inline

As above, without drag and drop, in the theme's list style.

◆ BeginListView() [4/8]

bool tachyon::GUIApplication::BeginListView ( int * selectedIndex,
int itemCount,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ BeginListView() [5/8]

bool tachyon::GUIApplication::BeginListView ( ID id,
int * selectedIndex,
int itemCount,
ItemDragDropConfig * dragDrop,
LayoutOverride && constraints = {} )
inline

As above, with drag and drop, in the theme's list style.

◆ BeginListView() [6/8]

bool tachyon::GUIApplication::BeginListView ( int * selectedIndex,
int itemCount,
ItemDragDropConfig * dragDrop,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ BeginListView() [7/8]

bool tachyon::GUIApplication::BeginListView ( int * selectedIndex,
int itemCount,
ItemDragDropConfig * dragDrop,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in style.

◆ BeginListView() [8/8]

bool tachyon::GUIApplication::BeginListView ( int * selectedIndex,
int itemCount,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, without drag and drop, with the call site as the ID, in style.

◆ EndListView()

void tachyon::GUIApplication::EndListView ( )

Closes BeginListView.

◆ FindListItemIndex()

int tachyon::GUIApplication::FindListItemIndex ( tachyon::ID id) const

A list item's index by ID, for end-of-frame handlers; -1 if unknown.

Filled only for lists with drag and drop.

◆ ListItem() [1/4]

bool tachyon::GUIApplication::ListItem ( ID id,
const GUIContent & content,
StyleRef style,
LayoutOverride && constraints = {} )

One item of a list view, drawn selected when it is the selected index. True when clicked.

◆ ListItem() [2/4]

bool tachyon::GUIApplication::ListItem ( ID id,
const GUIContent & content,
LayoutOverride && constraints = {} )
inline

As above, in the theme's item style.

◆ ListItem() [3/4]

bool tachyon::GUIApplication::ListItem ( const GUIContent & content,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ ListItem() [4/4]

bool tachyon::GUIApplication::ListItem ( const GUIContent & content,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in style.

◆ RebuildTreeViewIndex()

void tachyon::GUIApplication::RebuildTreeViewIndex ( std::vector< TreeViewRow > & rows)
static

Recomputes skipCount / ancestorLineMask / isLastSibling from row depths.

Call after any structural change. O(n^2) worst case.

◆ WalkTreeViewVisibility()

void tachyon::GUIApplication::WalkTreeViewVisibility ( const std::vector< TreeViewRow > & rows,
std::vector< int > & visibleIdx )
static

Writes the flat indices of visible rows (honoring isOpen) to visibleIdx.

◆ VirtualTreeView() [1/2]

void tachyon::GUIApplication::VirtualTreeView ( ID id,
std::vector< TreeViewRow > & rows,
std::vector< int > & visibleIdx,
TableState & state,
StyleRef style = {},
LayoutOverride && constraints = {},
std::string_view header = {} )

Single-column virtualized tree view (a VirtualTable with one TreeCell column).

A non-empty header shows the header row.

◆ VirtualTreeView() [2/2]

void tachyon::GUIApplication::VirtualTreeView ( std::vector< TreeViewRow > & rows,
std::vector< int > & visibleIdx,
TableState & state,
StyleRef style = {},
LayoutOverride && constraints = {},
std::string_view header = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ TreeDropTargetRow()

ID tachyon::GUIApplication::TreeDropTargetRow ( ) const
inline

The tree row a drag is over (drives the drop indicator), or Invalid.

◆ IsFileDragging()

bool tachyon::GUIApplication::IsFileDragging ( ) const
inline

Whether files or text from another application are dragged over one of the app's windows.

What's dragged is known only once it's dropped.

◆ FileDragTargetID()

ID tachyon::GUIApplication::FileDragTargetID ( ) const
inline

The element that takes that drag where it is now: the first from the one under the pointer up whose handler returned true to EventType::FileDragOver.

Invalid when none does. Draw it as the drop target.

◆ SetFileDropHandler()

void tachyon::GUIApplication::SetFileDropHandler ( std::function< void(const FileDrop &)> handler)
inline

Gets the drops no element took (none returned true to EventType::FileDrop): the application's own, such as opening the files.

◆ BeginSelected()

bool tachyon::GUIApplication::BeginSelected ( )
inline

Items emitted in between render as selected.

◆ EndSelected()

void tachyon::GUIApplication::EndSelected ( )
inline

Closes BeginSelected.

◆ BeginDisabled()

bool tachyon::GUIApplication::BeginDisabled ( )
inline

Controls emitted in between are disabled: drawn dimmed, and they take no input.

◆ EndDisabled()

void tachyon::GUIApplication::EndDisabled ( )
inline

Closes BeginDisabled.

◆ BeginInvalid()

bool tachyon::GUIApplication::BeginInvalid ( )
inline

Controls emitted in between show that their value isn't accepted: the theme's error border (–error) and halo (–invalid-halo) over whatever state they're in.

The halo grows in over 150 ms.

◆ EndInvalid()

void tachyon::GUIApplication::EndInvalid ( )
inline

Closes BeginInvalid.

◆ BeginGridView() [1/4]

bool tachyon::GUIApplication::BeginGridView ( ID id,
int * selectedIndex,
StyleRef style,
MultiSelectState * multiSelect = nullptr,
ItemDragDropConfig * dragDrop = nullptr,
LayoutOverride && constraints = {} )

Opens a grid view of GridViewItems.

selectedIndex (optional) holds a single selection, multiSelect (optional) a multi-selection; dragDrop (optional) lets items be dragged. Arrow keys move the selection.

◆ BeginGridView() [2/4]

bool tachyon::GUIApplication::BeginGridView ( ID id,
int * selectedIndex = nullptr,
MultiSelectState * multiSelect = nullptr,
ItemDragDropConfig * dragDrop = nullptr,
LayoutOverride && constraints = {} )
inline

As above, in the theme's grid style.

◆ BeginGridView() [3/4]

bool tachyon::GUIApplication::BeginGridView ( int * selectedIndex,
StyleRef style,
MultiSelectState * multiSelect = nullptr,
ItemDragDropConfig * dragDrop = nullptr,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in style.

◆ BeginGridView() [4/4]

bool tachyon::GUIApplication::BeginGridView ( int * selectedIndex,
MultiSelectState * multiSelect = nullptr,
ItemDragDropConfig * dragDrop = nullptr,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's grid style.

◆ EndGridView()

void tachyon::GUIApplication::EndGridView ( )

Closes BeginGridView.

◆ GridViewItem() [1/5]

bool tachyon::GUIApplication::GridViewItem ( ID id,
const GUIContent & content,
tachyon::ElementState extraState = tachyon::ElementState::None,
std::string * renameBuffer = nullptr,
StyleRef itemStyle = {},
LayoutOverride && constraints = {} )

renameBuffer (optional) enables in-place rename: F2, Ctrl+Shift+Click or a slow re-click opens an editor.

Enter commits; Escape or focus loss cancels.

◆ GridViewItem() [2/5]

bool tachyon::GUIApplication::GridViewItem ( ID id,
const GUIContent & content,
LayoutOverride && constraints )
inline

As above, without rename.

◆ GridViewItem() [3/5]

bool tachyon::GUIApplication::GridViewItem ( const GUIContent & content,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ GridViewItem() [4/5]

bool tachyon::GUIApplication::GridViewItem ( ID id,
const GUIContent & content,
StyleRef style,
LayoutOverride && constraints = {} )
inline

Without rename, in style.

◆ GridViewItem() [5/5]

bool tachyon::GUIApplication::GridViewItem ( const GUIContent & content,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

Without rename, with the call site as the ID, in style.

◆ IsRenaming()

bool tachyon::GUIApplication::IsRenaming ( ) const
inline

Whether an inline rename editor (a grid item's, a tree row's) is open; an app that sorts by name re-sorts once it closes.

◆ VirtualGridView() [1/2]

void tachyon::GUIApplication::VirtualGridView ( ID id,
GridViewVirtualState & vstate,
int itemCount,
int2 cellSize,
const std::function< void(int index, ID itemID)> & generateItem,
int * selectedIndex = nullptr,
MultiSelectState * multiSelect = nullptr,
ItemDragDropConfig * dragDrop = nullptr,
StyleRef scrollStyle = {},
StyleRef rowStyle = {},
LayoutOverride && constraints = {} )

generateItem(index, itemID) must emit exactly one cell, typically GridViewItem(itemID, ...).

itemID is a stable ranged sub-ID (index = id.value.subRangeParts.index), used for selection and drag payloads. Cells are cellSize, with a 4px gap between columns.

◆ VirtualGridView() [2/2]

void tachyon::GUIApplication::VirtualGridView ( GridViewVirtualState & vstate,
int itemCount,
int2 cellSize,
const std::function< void(int index, ID itemID)> & generateItem,
int * selectedIndex = nullptr,
MultiSelectState * multiSelect = nullptr,
ItemDragDropConfig * dragDrop = nullptr,
StyleRef scrollStyle = {},
StyleRef rowStyle = {},
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ BeginTable() [1/8]

bool tachyon::GUIApplication::BeginTable ( ID id,
VirtualTableColumn * columns,
size_t columnCount,
TableState & state,
StyleRef style,
LayoutOverride && constraints = {} )

Opens a table.

Columns are described each frame; widths, selection and sort state live in the caller's TableState. Rows are BeginRow / EndRow with Cell(text) or Cell(emit); EndTable builds them as a VirtualTable. columns must stay valid until EndTable.

◆ BeginTable() [2/8]

bool tachyon::GUIApplication::BeginTable ( ID id,
VirtualTableColumn * columns,
size_t columnCount,
TableState & state,
LayoutOverride && constraints = {} )
inline

As above, in the theme's table style.

◆ BeginTable() [3/8]

template<size_t N>
bool tachyon::GUIApplication::BeginTable ( ID id,
VirtualTableColumn(&) columns[N],
TableState & state,
StyleRef style,
LayoutOverride && constraints = {} )
inline

As above, for a C array of columns.

◆ BeginTable() [4/8]

template<size_t N>
bool tachyon::GUIApplication::BeginTable ( ID id,
VirtualTableColumn(&) columns[N],
TableState & state,
LayoutOverride && constraints = {} )
inline

As above, for a C array of columns, in the theme's table style.

◆ BeginTable() [5/8]

bool tachyon::GUIApplication::BeginTable ( VirtualTableColumn * columns,
size_t columnCount,
TableState & state,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ BeginTable() [6/8]

bool tachyon::GUIApplication::BeginTable ( VirtualTableColumn * columns,
size_t columnCount,
TableState & state,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's table style.

◆ BeginTable() [7/8]

template<size_t N>
bool tachyon::GUIApplication::BeginTable ( VirtualTableColumn(&) columns[N],
TableState & state,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, for a C array of columns, with the call site as the ID.

◆ BeginTable() [8/8]

template<size_t N>
bool tachyon::GUIApplication::BeginTable ( VirtualTableColumn(&) columns[N],
TableState & state,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, for a C array of columns, with the call site as the ID, in the theme's table style.

◆ EndTable()

void tachyon::GUIApplication::EndTable ( )

Builds the recorded rows as a VirtualTable.

◆ BeginRow()

bool tachyon::GUIApplication::BeginRow ( )

Starts a row; its Cells fill the columns in order.

◆ EndRow()

void tachyon::GUIApplication::EndRow ( )

Ends the row.

◆ Cell() [1/2]

void tachyon::GUIApplication::Cell ( std::string_view text)

Cells auto-advance to the next column.

◆ Cell() [2/2]

void tachyon::GUIApplication::Cell ( std::function< void()> emit)

Custom-content cell: emit runs inside the cell during EndTable, so its captures must live until then.

◆ TreeCell()

void tachyon::GUIApplication::TreeCell ( std::string_view text,
int depth,
bool * isOpen,
IconID icon = IconID::Invalid,
uint32_t ancestorLineMask = 0,
bool isLastSibling = true,
std::string * renameBuffer = nullptr,
bool reserveExpander = true )

Tree-style first column: [indent][arrow or spacer][optional icon][text].

depth horizontal indent (pixels = depth * theme.treeTableIndent). isOpen null for leaves (no arrow). Non-null toggles on click. icon optional leading icon rendered between arrow and text. ancestorLineMask bit d set iff the ancestor at depth d+1 has a next sibling (its guide line passes through this row at column d). isLastSibling true -> own-depth L-tick stops at row center. renameBuffer optional; enables in-place rename (F2 / Ctrl+Shift+Click / slow re-click). reserveExpander false drops the arrow slot for leaves (for flat trees).

Arrow clicks toggle without selecting; other clicks select the row.

◆ VirtualTable() [1/2]

void tachyon::GUIApplication::VirtualTable ( ID id,
TableState & state,
std::span< VirtualTableColumn > columns,
int totalRowCount,
CssPx rowHeight = 0,
StyleRef style = {},
LayoutOverride && constraints = {} )

Virtual-scrolled table: emits only the visible rows, under one ranged ID.

Frozen columns get their own body section (left / mid / right), scroll-synced.

columns : each carries its own generateCell(rowIndex), so reordering the array reorders headers and cells together. A C array converts to the span. rowHeight : row-height floor; 0 uses the style's natural row height. Headers, cell style and separators are TableState options.

◆ VirtualTable() [2/2]

void tachyon::GUIApplication::VirtualTable ( TableState & state,
std::span< VirtualTableColumn > columns,
int totalRowCount,
CssPx rowHeight = 0,
StyleRef style = {},
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ Breadcrumb() [1/4]

bool tachyon::GUIApplication::Breadcrumb ( ID id,
std::span< const std::string > segments,
std::function< void(int)> onSelect,
StyleRef style,
LayoutOverride && constraints = {} )

A path such as Graphs > Terrain material: segments separated by chevrons, the last one current.

Clicking another segment calls onSelect(index) and returns true.

◆ Breadcrumb() [2/4]

bool tachyon::GUIApplication::Breadcrumb ( ID id,
std::span< const std::string > segments,
std::function< void(int)> onSelect,
LayoutOverride && constraints = {} )
inline

As above, in the theme's breadcrumb style.

◆ Breadcrumb() [3/4]

bool tachyon::GUIApplication::Breadcrumb ( std::span< const std::string > segments,
std::function< void(int)> onSelect,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ Breadcrumb() [4/4]

bool tachyon::GUIApplication::Breadcrumb ( std::span< const std::string > segments,
std::function< void(int)> onSelect,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in style.

◆ BeginStatusBar() [1/4]

bool tachyon::GUIApplication::BeginStatusBar ( ID id,
StyleRef style,
LayoutOverride && constraints = {} )

A strip of short status texts, usually along a window's bottom edge.

Give one StatusText FlexGrow(1) to push the texts after it to the right.

◆ BeginStatusBar() [2/4]

bool tachyon::GUIApplication::BeginStatusBar ( ID id,
LayoutOverride && constraints = {} )
inline

As above, in the theme's status bar style.

◆ BeginStatusBar() [3/4]

bool tachyon::GUIApplication::BeginStatusBar ( LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ BeginStatusBar() [4/4]

bool tachyon::GUIApplication::BeginStatusBar ( StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in style.

◆ EndStatusBar()

void tachyon::GUIApplication::EndStatusBar ( )

Closes BeginStatusBar.

◆ StatusText() [1/4]

void tachyon::GUIApplication::StatusText ( ID id,
std::string_view text,
StyleRef style,
LayoutOverride && constraints = {} )

A text in the status bar.

◆ StatusText() [2/4]

void tachyon::GUIApplication::StatusText ( ID id,
std::string_view text,
LayoutOverride && constraints = {} )
inline

As above, in the theme's status text style.

◆ StatusText() [3/4]

void tachyon::GUIApplication::StatusText ( std::string_view text,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ StatusText() [4/4]

void tachyon::GUIApplication::StatusText ( std::string_view text,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's status text style.

◆ CommandSearch() [1/4]

bool tachyon::GUIApplication::CommandSearch ( ID id,
CommandSearchState & state,
StyleRef style,
LayoutOverride && constraints = {} )

Finds and runs commandManager's commands: focused, it lists those whose description contains the query; Up / Down move through them, Enter or a click runs one, Escape leaves.

state must outlive the frame. True when a command ran since the last call.

◆ CommandSearch() [2/4]

bool tachyon::GUIApplication::CommandSearch ( ID id,
CommandSearchState & state,
LayoutOverride && constraints = {} )
inline

As above, in the theme's command search style.

◆ CommandSearch() [3/4]

bool tachyon::GUIApplication::CommandSearch ( CommandSearchState & state,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ CommandSearch() [4/4]

bool tachyon::GUIApplication::CommandSearch ( CommandSearchState & state,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's command search style.

◆ FocusCommandSearch()

void tachyon::GUIApplication::FocusCommandSearch ( CommandSearchState & state)
inlinestatic

Puts the keyboard in the search next frame; bind it to a command such as Ctrl+K.

◆ RenderNodeView()

void tachyon::GUIApplication::RenderNodeView ( NodeView & view)

Builds view (canvas, nodes, wires and overlays) in the current container.

◆ NodeText()

void tachyon::GUIApplication::NodeText ( std::string_view text)

Text property body aligned by the row's sockets: left => left, right => right, both => centre.

Call inside NodeProperty::renderBody.

◆ BeginTabBar() [1/2]

bool tachyon::GUIApplication::BeginTabBar ( ID id,
int * selectedIndex,
std::function< void(int, int)> onReorder,
std::function< void(int)> onClose = nullptr,
std::function< void(int, tachyon::int2)> onDragOut = nullptr,
std::function< void(int, tachyon::int2)> dragVisualizer = nullptr,
StyleRef style = {},
LayoutOverride && constraints = {},
TabBarLayout * layout = nullptr,
const TabBarOptions & options = {} )

Opens a tab bar of Tabs.

selectedIndex holds the selected tab; onReorder(from, to) runs on a drop, onClose(index) closes a tab (none when null); onDragOut and dragVisualizer as for BeginReorderableGroup. Layout says what happens to tabs that don't fit on one row (TabBarLayout); the bar's context menu changes it. Null keeps it with the bar, by its ID. options: the close item's label, the "+N" list, the layout menu.

◆ BeginTabBar() [2/2]

bool tachyon::GUIApplication::BeginTabBar ( int * selectedIndex,
std::function< void(int, int)> onReorder,
std::function< void(int)> onClose = nullptr,
std::function< void(int, tachyon::int2)> onDragOut = nullptr,
std::function< void(int, tachyon::int2)> dragVisualizer = nullptr,
StyleRef style = {},
LayoutOverride && constraints = {},
TabBarLayout * layout = nullptr,
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ EndTabBar()

void tachyon::GUIApplication::EndTabBar ( )

Closes BeginTabBar.

◆ Tab() [1/4]

bool tachyon::GUIApplication::Tab ( ID id,
const GUIContent & content,
StyleRef style,
LayoutOverride && constraints = {} )

One tab of the tab bar; a click selects it. True when clicked.

◆ BeginTab()

bool tachyon::GUIApplication::BeginTab ( ID id,
const GUIContent & content,
StyleRef style,
StyleRef contentStyle,
LayoutOverride && constraints = {} )

A tab with more in it: its icon and text in contentStyle (the theme's when invalid), then whatever is added up to EndTab, which every BeginTab needs.

False when the tab doesn't fit the bar (it's listed by "+N"): add nothing to it then.

◆ EndTab()

void tachyon::GUIApplication::EndTab ( )

Closes BeginTab.

◆ Tab() [2/4]

bool tachyon::GUIApplication::Tab ( ID id,
const GUIContent & content,
LayoutOverride && constraints = {} )
inline

As above, in the theme's tab style.

◆ Tab() [3/4]

bool tachyon::GUIApplication::Tab ( const GUIContent & content,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ Tab() [4/4]

bool tachyon::GUIApplication::Tab ( const GUIContent & content,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in style.

◆ BeginDockingContainer() [1/4]

bool tachyon::GUIApplication::BeginDockingContainer ( ID id,
DockingLayout * layout,
StyleRef style,
LayoutOverride && constraints = {} )

Builds Layout's docked panels (each one's onPanelGUI) in a container, enabling the visible panels first.

Then call EmitFloatingDockWindows.

◆ BeginDockingContainer() [2/4]

bool tachyon::GUIApplication::BeginDockingContainer ( ID id,
DockingLayout * layout,
LayoutOverride && constraints = {} )
inline

As above, in the theme's dock style.

◆ BeginDockingContainer() [3/4]

bool tachyon::GUIApplication::BeginDockingContainer ( DockingLayout * layout,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ BeginDockingContainer() [4/4]

bool tachyon::GUIApplication::BeginDockingContainer ( DockingLayout * layout,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's dock style.

◆ EndDockingContainer()

void tachyon::GUIApplication::EndDockingContainer ( )

Closes BeginDockingContainer.

◆ Documents()

void tachyon::GUIApplication::Documents ( ID id,
DocumentSet & set,
LayoutOverride && constraints = {} )

The document bar of set, under the title bar, and below it the active document's panels, filling the rest of the window's column.

Each tab is in its document type's colors; a click shows that document, its close button (or Ctrl+W) asks DocumentSet::onClose and closes it on the next frame. Then call EmitFloatingDockWindows.

◆ Field() [1/39]

bool tachyon::GUIApplication::Field ( ID id,
bool & value,
std::string_view text,
StyleRef style,
LayoutOverride && constraints = {} )

A bool as a Toggle labelled Text.

◆ Field() [2/39]

bool tachyon::GUIApplication::Field ( bool & value,
std::string_view text,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ Field() [3/39]

bool tachyon::GUIApplication::Field ( ID id,
bool & value,
std::string_view text,
LayoutOverride && constraints = {} )
inline

As above, in the theme's toggle style.

◆ Field() [4/39]

bool tachyon::GUIApplication::Field ( bool & value,
std::string_view text,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's toggle style.

◆ Field() [5/39]

bool tachyon::GUIApplication::Field ( ID id,
std::string & value,
TextEditBehavior textEditBehavior,
StyleRef style,
LayoutOverride && constraints = {} )

A text field editing value; true when it changed.

With ContinuousUpdate the value changes on every keystroke, else when the edit is committed.

◆ Field() [6/39]

bool tachyon::GUIApplication::Field ( std::string & value,
TextEditBehavior textEditBehavior,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ Field() [7/39]

bool tachyon::GUIApplication::Field ( ID id,
std::string & value,
StyleRef style,
LayoutOverride && constraints = {} )
inline

As above, updating continuously.

◆ Field() [8/39]

bool tachyon::GUIApplication::Field ( std::string & value,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ Field() [9/39]

bool tachyon::GUIApplication::Field ( ID id,
std::string & value,
TextEditBehavior textEditBehavior,
LayoutOverride && constraints = {} )
inline

As the first, in the theme's text box style.

◆ Field() [10/39]

bool tachyon::GUIApplication::Field ( std::string & value,
TextEditBehavior textEditBehavior,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ Field() [11/39]

bool tachyon::GUIApplication::Field ( ID id,
std::string & value,
LayoutOverride && constraints = {} )
inline

As the first, updating continuously, in the theme's text box style.

◆ Field() [12/39]

bool tachyon::GUIApplication::Field ( std::string & value,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ SearchField() [1/4]

bool tachyon::GUIApplication::SearchField ( ID id,
std::string & value,
IconID icon,
TextEditBehavior textEditBehavior,
StyleRef style,
LayoutOverride && constraints = {} )
inline

A Field with a leading icon inside its border; style is the border's.

◆ SearchField() [2/4]

bool tachyon::GUIApplication::SearchField ( ID id,
std::string & value,
IconID icon,
TextEditBehavior textEditBehavior = TextEditBehavior::ContinuousUpdate,
LayoutOverride && constraints = {} )
inline

As above, in the theme's search style.

◆ SearchField() [3/4]

bool tachyon::GUIApplication::SearchField ( std::string & value,
IconID icon,
TextEditBehavior textEditBehavior,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ SearchField() [4/4]

bool tachyon::GUIApplication::SearchField ( std::string & value,
IconID icon,
TextEditBehavior textEditBehavior = TextEditBehavior::ContinuousUpdate,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's search style.

◆ AutocompleteField() [1/4]

bool tachyon::GUIApplication::AutocompleteField ( ID id,
std::string & value,
std::span< const std::string_view > suggestions,
StyleRef style,
LayoutOverride && constraints = {} )

A text field that lists, under itself while it has the keyboard and holds text, the suggestions that contain that text (ignoring case), at most 12.

Up / Down highlight one, Enter or a click puts it into value; nothing is highlighted until Down, so Enter keeps what was typed. Escape, a pick or a click elsewhere closes the list; typing opens it again. True when value changed: typed, or a suggestion picked.

◆ AutocompleteField() [2/4]

bool tachyon::GUIApplication::AutocompleteField ( ID id,
std::string & value,
std::span< const std::string_view > suggestions,
LayoutOverride && constraints = {} )
inline

As above, in the theme's textbox style.

◆ AutocompleteField() [3/4]

bool tachyon::GUIApplication::AutocompleteField ( std::string & value,
std::span< const std::string_view > suggestions,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ AutocompleteField() [4/4]

bool tachyon::GUIApplication::AutocompleteField ( std::string & value,
std::span< const std::string_view > suggestions,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's textbox style.

◆ Field() [13/39]

template<typename T, typename ComponentT = typename TypeDimensions<T>::ComponentType>
bool tachyon::GUIApplication::Field ( ID id,
T & value,
TextEditBehavior textEditBehavior,
StyleRef style,
NumericFieldConfig< ComponentT > config = {},
LayoutOverride && constraints = {} )
inline

A number field; for a vector type (TypeDimensions), a field per component, each after a colored axis label that drags it.

config sets the drag step and the range. True when the value changed.

◆ Field() [14/39]

template<typename T, typename ComponentT = typename TypeDimensions<T>::ComponentType>
bool tachyon::GUIApplication::Field ( ID id,
T & value,
TextEditBehavior textEditBehavior,
NumericFieldConfig< ComponentT > config,
LayoutOverride && constraints = {} )
inline

As above, in the theme's number style.

◆ Field() [15/39]

template<typename T, typename ComponentT = typename TypeDimensions<T>::ComponentType>
bool tachyon::GUIApplication::Field ( ID id,
T & value,
TextEditBehavior textEditBehavior,
LayoutOverride && constraints = {} )
inline

As above, with the default config.

◆ Field() [16/39]

template<typename T, typename ComponentT = typename TypeDimensions<T>::ComponentType>
bool tachyon::GUIApplication::Field ( ID id,
T & value,
LayoutOverride && constraints = {} )
inline

As above, updating continuously.

◆ Field() [17/39]

template<typename T, typename ComponentT = typename TypeDimensions<T>::ComponentType>
bool tachyon::GUIApplication::Field ( ID id,
T & value,
StyleRef style,
NumericFieldConfig< ComponentT > config,
LayoutOverride && constraints = {} )
inline

As the first, updating continuously.

◆ Field() [18/39]

template<typename T, typename ComponentT = typename TypeDimensions<T>::ComponentType>
bool tachyon::GUIApplication::Field ( ID id,
T & value,
StyleRef style,
LayoutOverride && constraints = {} )
inline

As the first, updating continuously, with the default config.

◆ Field() [19/39]

template<typename T, typename ComponentT = typename TypeDimensions<T>::ComponentType>
bool tachyon::GUIApplication::Field ( ID id,
T & value,
NumericFieldConfig< ComponentT > config,
LayoutOverride && constraints = {} )
inline

As the first, updating continuously, in the theme's number style.

◆ Field() [20/39]

template<typename T, typename ComponentT = typename TypeDimensions<T>::ComponentType>
bool tachyon::GUIApplication::Field ( T & value,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As the first, with the call site as the ID, updating continuously, with the default config.

◆ Field() [21/39]

template<typename T, typename ComponentT = typename TypeDimensions<T>::ComponentType>
bool tachyon::GUIApplication::Field ( T & value,
TextEditBehavior textEditBehavior,
StyleRef style,
NumericFieldConfig< ComponentT > config,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As the first, with the call site as the ID.

◆ Field() [22/39]

template<typename T, typename ComponentT = typename TypeDimensions<T>::ComponentType>
bool tachyon::GUIApplication::Field ( T & value,
StyleRef style,
NumericFieldConfig< ComponentT > config,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As the first, with the call site as the ID, updating continuously.

◆ Field() [23/39]

template<typename T, typename ComponentT = typename TypeDimensions<T>::ComponentType>
bool tachyon::GUIApplication::Field ( T & value,
TextEditBehavior textEditBehavior,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As the first, with the call site as the ID and the default config.

◆ Field() [24/39]

template<typename T, typename ComponentT = typename TypeDimensions<T>::ComponentType>
bool tachyon::GUIApplication::Field ( T & value,
TextEditBehavior textEditBehavior,
NumericFieldConfig< ComponentT > config,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As the first, with the call site as the ID, in the theme's number style.

◆ Field() [25/39]

template<typename T, typename ComponentT = typename TypeDimensions<T>::ComponentType>
bool tachyon::GUIApplication::Field ( T & value,
NumericFieldConfig< ComponentT > config,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As the first, with the call site as the ID, updating continuously, in the theme's number style.

◆ Field() [26/39]

template<typename T, typename ComponentT = typename TypeDimensions<T>::ComponentType>
bool tachyon::GUIApplication::Field ( T & value,
TextEditBehavior textEditBehavior,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As the first, with the call site as the ID and the default config, in the theme's number style.

◆ Field() [27/39]

template<typename T, typename ComponentT = typename TypeDimensions<T>::ComponentType>
bool tachyon::GUIApplication::Field ( T & value,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As the first, with the call site as the ID and the default config, updating continuously, in the theme's number style.

◆ TypeTag()

template<typename T>
constexpr std::string_view tachyon::GUIApplication::TypeTag ( )
inlinestaticconstexpr

A number's type as a short tag: f32, f64, i8 ... u64 (empty for other types).

◆ TypedField() [1/4]

template<typename T>
bool tachyon::GUIApplication::TypedField ( ID id,
T & value,
LayoutOverride && constraints = {} )
inline

A number field with its type after the value, e.g. "0.5 f32".

◆ TypedField() [2/4]

template<typename T>
bool tachyon::GUIApplication::TypedField ( ID id,
T & value,
StyleRef style,
LayoutOverride && constraints = {} )
inline

As above; style is the box's around the number and its type.

◆ TypedField() [3/4]

template<typename T>
bool tachyon::GUIApplication::TypedField ( T & value,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ TypedField() [4/4]

template<typename T>
bool tachyon::GUIApplication::TypedField ( T & value,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID and a style for the box.

◆ Field() [28/39]

template<typename T>
void tachyon::GUIApplication::Field ( ID id,
std::vector< T > & items,
StyleRef style,
LayoutOverride && constraints = {} )
inline

A reorderable list: each row a grip, its index, the field (numbers with their type) and a remove button; "Add item" after the rows.

The ID must be the same every frame so the reorder state survives.

◆ Field() [29/39]

template<typename T>
void tachyon::GUIApplication::Field ( ID id,
std::vector< T > & items,
LayoutOverride && constraints = {} )
inline

As above, in the theme's collection style.

◆ Field() [30/39]

template<typename T>
void tachyon::GUIApplication::Field ( std::vector< T > & items,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ Field() [31/39]

template<typename T>
void tachyon::GUIApplication::Field ( std::vector< T > & items,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's collection style.

◆ Field() [32/39]

template<typename V>
void tachyon::GUIApplication::Field ( ID id,
std::vector< std::pair< std::string, V > > & items,
StyleRef style,
LayoutOverride && constraints = {} )
inline

A key-value list (std::string keys, V values): a Key / Value header with the types, then a row per entry (key, value, remove) and "Add entry".

◆ Field() [33/39]

template<typename V>
void tachyon::GUIApplication::Field ( ID id,
std::vector< std::pair< std::string, V > > & items,
LayoutOverride && constraints = {} )
inline

As above, in the theme's collection style.

◆ Field() [34/39]

template<typename V>
void tachyon::GUIApplication::Field ( std::vector< std::pair< std::string, V > > & items,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ Field() [35/39]

template<typename V>
void tachyon::GUIApplication::Field ( std::vector< std::pair< std::string, V > > & items,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's collection style.

◆ Field() [36/39]

template<typename V>
void tachyon::GUIApplication::Field ( ID id,
std::unordered_map< std::string, V > & items,
StyleRef style,
LayoutOverride && constraints = {} )
inline

Key-value list over an unordered_map.

Row order can change when the map rehashes; use the vector-of-pairs version for stable rows.

◆ Field() [37/39]

template<typename V>
void tachyon::GUIApplication::Field ( ID id,
std::unordered_map< std::string, V > & items,
LayoutOverride && constraints = {} )
inline

As above, in the theme's collection style.

◆ Field() [38/39]

template<typename V>
void tachyon::GUIApplication::Field ( std::unordered_map< std::string, V > & items,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ Field() [39/39]

template<typename V>
void tachyon::GUIApplication::Field ( std::unordered_map< std::string, V > & items,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's collection style.

◆ CollectionHeader()

void tachyon::GUIApplication::CollectionHeader ( std::string_view valueType)

A dictionary's header row: "Key string", "Value <type>".

◆ ColorField() [1/8]

bool tachyon::GUIApplication::ColorField ( ID id,
tachyon::color4f & value,
bool allowHDR,
StyleRef style,
LayoutOverride && constraints = {} )

A color swatch that opens a color picker; true when the color changed.

allowHDR lets the picker take brightness over 1.

◆ ColorField() [2/8]

bool tachyon::GUIApplication::ColorField ( ID id,
tachyon::color4f & value,
bool allowHDR = false,
LayoutOverride && constraints = {} )
inline

As above, in the theme's color field style.

◆ ColorField() [3/8]

bool tachyon::GUIApplication::ColorField ( tachyon::color4f & value,
bool allowHDR,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ ColorField() [4/8]

bool tachyon::GUIApplication::ColorField ( tachyon::color4f & value,
bool allowHDR = false,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's color field style.

◆ ColorField() [5/8]

bool tachyon::GUIApplication::ColorField ( ID id,
tachyon::color4b & value,
StyleRef style,
LayoutOverride && constraints = {} )

As above, for an 8-bit color.

◆ ColorField() [6/8]

bool tachyon::GUIApplication::ColorField ( ID id,
tachyon::color4b & value,
LayoutOverride && constraints = {} )
inline

As above, in the theme's color field style.

◆ ColorField() [7/8]

bool tachyon::GUIApplication::ColorField ( tachyon::color4b & value,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ ColorField() [8/8]

bool tachyon::GUIApplication::ColorField ( tachyon::color4b & value,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's color field style.

◆ GradientField() [1/4]

bool tachyon::GUIApplication::GradientField ( ID id,
tachyon::Gradient & value,
StyleRef style,
LayoutOverride && constraints = {} )

A gradient swatch that opens a gradient editor; true when the gradient changed.

◆ GradientField() [2/4]

bool tachyon::GUIApplication::GradientField ( ID id,
tachyon::Gradient & value,
LayoutOverride && constraints = {} )
inline

As above, in the theme's gradient swatch style.

◆ GradientField() [3/4]

bool tachyon::GUIApplication::GradientField ( tachyon::Gradient & value,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ GradientField() [4/4]

bool tachyon::GUIApplication::GradientField ( tachyon::Gradient & value,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's gradient swatch style.

◆ SliderField() [1/8]

bool tachyon::GUIApplication::SliderField ( ID id,
float & value,
float minVal,
float maxVal,
std::string_view text,
StyleRef style,
LayoutOverride && constraints = {} )

A label, a slider track and a number field for value in [minVal, maxVal]; true when it changed.

◆ SliderField() [2/8]

bool tachyon::GUIApplication::SliderField ( ID id,
float & value,
float minVal,
float maxVal,
std::string_view text,
LayoutOverride && constraints = {} )
inline

As above, in the theme's slider field style.

◆ SliderField() [3/8]

bool tachyon::GUIApplication::SliderField ( float & value,
float minVal,
float maxVal,
std::string_view text,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ SliderField() [4/8]

bool tachyon::GUIApplication::SliderField ( float & value,
float minVal,
float maxVal,
std::string_view text,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's slider field style.

◆ SliderField() [5/8]

bool tachyon::GUIApplication::SliderField ( ID id,
int & value,
int minVal,
int maxVal,
std::string_view text,
StyleRef style,
LayoutOverride && constraints = {} )

Integer variant: snaps to whole numbers.

◆ SliderField() [6/8]

bool tachyon::GUIApplication::SliderField ( ID id,
int & value,
int minVal,
int maxVal,
std::string_view text,
LayoutOverride && constraints = {} )
inline

As above, in the theme's slider field style.

◆ SliderField() [7/8]

bool tachyon::GUIApplication::SliderField ( int & value,
int minVal,
int maxVal,
std::string_view text,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ SliderField() [8/8]

bool tachyon::GUIApplication::SliderField ( int & value,
int minVal,
int maxVal,
std::string_view text,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's slider field style.

◆ Slider() [1/4]

bool tachyon::GUIApplication::Slider ( ID id,
int & value,
int minVal,
int maxVal,
StyleRef style,
LayoutOverride && constraints = {} )

Groove + knob without value text; drag-only, integer-valued.

◆ Slider() [2/4]

bool tachyon::GUIApplication::Slider ( ID id,
int & value,
int minVal,
int maxVal,
LayoutOverride && constraints = {} )
inline

As above, in the theme's slider style.

◆ Slider() [3/4]

bool tachyon::GUIApplication::Slider ( int & value,
int minVal,
int maxVal,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ Slider() [4/4]

bool tachyon::GUIApplication::Slider ( int & value,
int minVal,
int maxVal,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's slider style.

◆ DragLabel() [1/4]

void tachyon::GUIApplication::DragLabel ( ID id,
std::string_view text,
StyleRef style,
LayoutOverride && constraints = {} )

A label whose horizontal drag changes the value of the field after it; a click focuses that field and Escape cancels a drag.

In a label group it takes the group's width.

◆ DragLabel() [2/4]

void tachyon::GUIApplication::DragLabel ( ID id,
std::string_view text,
LayoutOverride && constraints = {} )
inline

As above, in the theme's drag label style.

◆ DragLabel() [3/4]

void tachyon::GUIApplication::DragLabel ( std::string_view text,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ DragLabel() [4/4]

void tachyon::GUIApplication::DragLabel ( std::string_view text,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's drag label style.

◆ Label() [1/8]

void tachyon::GUIApplication::Label ( ID id,
std::string_view text,
StyleRef style,
LayoutOverride && constraints = {} )

A label for the control after it: a click focuses that control.

In a label group it takes the group's width.

◆ Label() [2/8]

void tachyon::GUIApplication::Label ( ID id,
std::string_view text,
std::string_view caption,
StyleRef style,
LayoutOverride && constraints = {} )

A label over a field taller than a row (a list): at the top, with a caption under it such as "3 items".

◆ Label() [3/8]

void tachyon::GUIApplication::Label ( ID id,
std::string_view text,
std::string_view caption,
LayoutOverride && constraints = {} )
inline

As above, in the theme's top label style.

◆ Label() [4/8]

void tachyon::GUIApplication::Label ( std::string_view text,
std::string_view caption,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ Label() [5/8]

void tachyon::GUIApplication::Label ( std::string_view text,
std::string_view caption,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's top label style.

◆ Label() [6/8]

void tachyon::GUIApplication::Label ( ID id,
std::string_view text,
LayoutOverride && constraints = {} )
inline

As the first, in the theme's label style.

◆ Label() [7/8]

void tachyon::GUIApplication::Label ( std::string_view text,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As the first, with the call site as the ID.

◆ Label() [8/8]

void tachyon::GUIApplication::Label ( std::string_view text,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As the first, with the call site as the ID, in the theme's label style.

◆ Text() [1/4]

void tachyon::GUIApplication::Text ( ID id,
std::string_view text,
StyleRef style,
LayoutOverride && constraints = {} )

Static text.

◆ Text() [2/4]

void tachyon::GUIApplication::Text ( ID id,
std::string_view text,
LayoutOverride && constraints = {} )
inline

As above, in the theme's text style.

◆ Text() [3/4]

void tachyon::GUIApplication::Text ( std::string_view text,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ Text() [4/4]

void tachyon::GUIApplication::Text ( std::string_view text,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's text style.

◆ SelectableText() [1/5]

void tachyon::GUIApplication::SelectableText ( ID id,
const std::span< ContentRun > & runs,
std::function< void(intptr_t contentId)> onLinkActivate,
StyleRef style,
LayoutOverride && constraints = {} )

Read-only rich text with links, mouse selection and Ctrl+C.

onLinkActivate (optional) gets a clicked link's contentId. The ID must be the same every frame for the selection to last.

◆ SelectableText() [2/5]

void tachyon::GUIApplication::SelectableText ( ID id,
const std::span< ContentRun > & runs,
StyleRef style,
LayoutOverride && constraints = {} )
inline

As above, without link handling.

◆ SelectableText() [3/5]

void tachyon::GUIApplication::SelectableText ( ID id,
const std::span< ContentRun > & runs,
LayoutOverride && constraints = {} )
inline

As above, in the theme's text style.

◆ SelectableText() [4/5]

void tachyon::GUIApplication::SelectableText ( const std::span< ContentRun > & runs,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID (the same every frame).

◆ SelectableText() [5/5]

void tachyon::GUIApplication::SelectableText ( const std::span< ContentRun > & runs,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's text style.

◆ Image() [1/8]

void tachyon::GUIApplication::Image ( ID id,
ImageIndex image,
StyleRef style,
LayoutOverride && constraints = {} )

Draws image (from graphicsContext->RegisterImage) stretched over the element's box.

◆ Image() [2/8]

void tachyon::GUIApplication::Image ( ID id,
ImageIndex image,
LayoutOverride && constraints = {} )
inline

As above, in the theme's image style.

◆ Image() [3/8]

void tachyon::GUIApplication::Image ( ImageIndex image,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ Image() [4/8]

void tachyon::GUIApplication::Image ( ImageIndex image,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's image style.

◆ Image() [5/8]

void tachyon::GUIApplication::Image ( ID id,
ImageIndex image,
uint2 sourceSize,
StyleRef style,
LayoutOverride && constraints = {} )

Aspect-preserving: sizes the element to the largest sourceSize-aspect rect that fits the constraints.

sourceSize is the image's pixel size.

◆ Image() [6/8]

void tachyon::GUIApplication::Image ( ID id,
ImageIndex image,
uint2 sourceSize,
LayoutOverride && constraints = {} )
inline

As above, in the theme's image style.

◆ Image() [7/8]

void tachyon::GUIApplication::Image ( ImageIndex image,
uint2 sourceSize,
StyleRef style,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ Image() [8/8]

void tachyon::GUIApplication::Image ( ImageIndex image,
uint2 sourceSize,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID, in the theme's image style.

◆ BeginGhostWindow() [1/4]

bool tachyon::GUIApplication::BeginGhostWindow ( ID windowLayoutID,
int2 position )
inline

A ghost window: caption-less and transparent, e.g.

a drag preview; 28 x 28 CSS px. Close it with EndGhostWindow, whether or not it opened.

◆ BeginGhostWindow() [2/4]

bool tachyon::GUIApplication::BeginGhostWindow ( ID windowLayoutID,
int2 position,
int2 size,
StyleRef styleRef )
inline

position is the top-left in screen space; for drag previews use BeginCursorGhostWindow.

◆ BeginGhostWindow() [3/4]

bool tachyon::GUIApplication::BeginGhostWindow ( ID windowLayoutID,
int2 position,
int2 size )
inline

As above, in the theme's ghost window style.

◆ BeginGhostWindow() [4/4]

bool tachyon::GUIApplication::BeginGhostWindow ( ID windowLayoutID,
int2 position,
StyleRef styleRef )
inline

Sized to its content.

◆ CursorGhostOffset()

int2 tachyon::GUIApplication::CursorGhostOffset ( ) const
inline

Where a ghost sits from the cursor, clear of the OS cursor: 14 px for a 32 px cursor, in proportion for others, 14 CSS px when the backend can't tell the cursor's size.

◆ BeginCursorGhostWindow() [1/4]

bool tachyon::GUIApplication::BeginCursorGhostWindow ( ID windowLayoutID,
int2 cursorPos )
inline

A ghost window at the cursor, offset by CursorGhostOffset; 28 x 28 CSS px.

◆ BeginCursorGhostWindow() [2/4]

bool tachyon::GUIApplication::BeginCursorGhostWindow ( ID windowLayoutID,
int2 cursorPos,
int2 size,
StyleRef styleRef )
inline

As above, with a size and style.

◆ BeginCursorGhostWindow() [3/4]

bool tachyon::GUIApplication::BeginCursorGhostWindow ( ID windowLayoutID,
int2 cursorPos,
int2 size )
inline

As above, with a size.

◆ BeginCursorGhostWindow() [4/4]

bool tachyon::GUIApplication::BeginCursorGhostWindow ( ID windowLayoutID,
int2 cursorPos,
StyleRef styleRef )
inline

As above, with a style, sized to its content.

◆ AddGhostIcon()

void tachyon::GUIApplication::AddGhostIcon ( IconID icon,
std::source_location site = std::source_location::current() )
inline

An icon in the open ghost window, 28 x 28 CSS px.

◆ EndGhostWindow()

void tachyon::GUIApplication::EndGhostWindow ( )
inline

Closes BeginGhostWindow or BeginCursorGhostWindow.

◆ BeginWindow() [1/8]

bool tachyon::GUIApplication::BeginWindow ( ID windowLayoutID,
std::string_view title,
ElementFlags flags = ElementFlags::WindowUserControlled | ElementFlags::WindowIsCentered,
int monitorIndex = -1 )
inline

As the full BeginWindow below, in the theme's window style.

◆ BeginWindow() [2/8]

bool tachyon::GUIApplication::BeginWindow ( ID windowLayoutID,
std::string_view title,
StyleRef styleRef,
ElementFlags flags = ElementFlags::WindowUserControlled | ElementFlags::WindowIsCentered,
int monitorIndex = -1 )
inline

As the full BeginWindow below.

◆ BeginWindow() [3/8]

bool tachyon::GUIApplication::BeginWindow ( ID windowLayoutID,
std::string_view title,
LayoutOverride && constraints,
ElementFlags flags = ElementFlags::WindowUserControlled | ElementFlags::WindowIsCentered,
int monitorIndex = -1 )
inline

As the full BeginWindow below, in the theme's window style.

◆ BeginWindow() [4/8]

bool tachyon::GUIApplication::BeginWindow ( ID windowLayoutID,
ElementFlags flags = ElementFlags::WindowUserControlled | ElementFlags::WindowIsCentered,
int monitorIndex = -1 )
inline

As the full BeginWindow below, without a title, in the theme's window style.

◆ BeginWindow() [5/8]

bool tachyon::GUIApplication::BeginWindow ( ID windowLayoutID,
StyleRef styleRef,
ElementFlags flags = ElementFlags::WindowUserControlled | ElementFlags::WindowIsCentered,
int monitorIndex = -1 )
inline

As the full BeginWindow below, without a title.

◆ BeginWindow() [6/8]

bool tachyon::GUIApplication::BeginWindow ( ID windowLayoutID,
LayoutOverride && constraints,
ElementFlags flags = ElementFlags::WindowUserControlled | ElementFlags::WindowIsCentered,
int monitorIndex = -1 )
inline

As the full BeginWindow below, without a title, in the theme's window style.

◆ BeginWindow() [7/8]

bool tachyon::GUIApplication::BeginWindow ( ID windowLayoutID,
StyleRef styleRef,
LayoutOverride && constraints,
ElementFlags flags = ElementFlags::WindowUserControlled | ElementFlags::WindowIsCentered,
int monitorIndex = -1 )
inline

As the full BeginWindow below, without a title.

◆ BeginWindow() [8/8]

bool tachyon::GUIApplication::BeginWindow ( ID windowLayoutID,
std::string_view title,
StyleRef styleRef,
LayoutOverride && constraints,
ElementFlags flags = ElementFlags::WindowUserControlled | ElementFlags::WindowIsCentered,
int monitorIndex = -1 )
inline

An OS window, made the first time its ID is seen; build its content while this returns true.

flags (ElementFlags::Window*) set how it behaves; monitorIndex is the monitor a new window opens on (-1: the one at its fixed position, else the primary). EndWindow is called either way.

◆ OpenWindow()

bool tachyon::GUIApplication::OpenWindow ( ID windowLayoutID,
std::string_view title,
StyleRef styleRef,
LayoutOverride && constraints,
ElementFlags flags,
int monitorIndex )
inline

Internal: the body of BeginWindow; call BeginWindow.

◆ EndWindow()

void tachyon::GUIApplication::EndWindow ( )
inline

Closes BeginWindow; called whether or not it returned true.

◆ Window()

template<class... A>
auto tachyon::GUIApplication::Window ( A &&... a)
inline

◆ GhostWindow()

template<class... A>
auto tachyon::GUIApplication::GhostWindow ( A &&... a)
inline

◆ CursorGhostWindow()

template<class... A>
auto tachyon::GUIApplication::CursorGhostWindow ( A &&... a)
inline

◆ Menu()

template<class... A>
auto tachyon::GUIApplication::Menu ( A &&... a)
inline

◆ MenuBar()

template<class... A>
auto tachyon::GUIApplication::MenuBar ( A &&... a)
inline

◆ ContextMenu()

template<class... A>
auto tachyon::GUIApplication::ContextMenu ( A &&... a)
inline

◆ Tooltip()

template<class... A>
auto tachyon::GUIApplication::Tooltip ( A &&... a)
inline

◆ Cached()

template<class... A>
auto tachyon::GUIApplication::Cached ( A &&... a)
inline

◆ Horizontal()

template<class... A>
auto tachyon::GUIApplication::Horizontal ( A &&... a)
inline

◆ Vertical()

template<class... A>
auto tachyon::GUIApplication::Vertical ( A &&... a)
inline

◆ HorizontalWrap()

template<class... A>
auto tachyon::GUIApplication::HorizontalWrap ( A &&... a)
inline

◆ VerticalWrap()

template<class... A>
auto tachyon::GUIApplication::VerticalWrap ( A &&... a)
inline

◆ Area()

template<class... A>
auto tachyon::GUIApplication::Area ( A &&... a)
inline

◆ LabelGroup()

template<class... A>
auto tachyon::GUIApplication::LabelGroup ( A &&... a)
inline

◆ ButtonGroup()

template<class... A>
auto tachyon::GUIApplication::ButtonGroup ( A &&... a)
inline

◆ ToggleGroup()

template<class... A>
auto tachyon::GUIApplication::ToggleGroup ( A &&... a)
inline

◆ Table()

template<class... A>
auto tachyon::GUIApplication::Table ( A &&... a)
inline

◆ Row()

template<class... A>
auto tachyon::GUIApplication::Row ( A &&... a)
inline

◆ ListView()

template<class... A>
auto tachyon::GUIApplication::ListView ( A &&... a)
inline

◆ GridView()

template<class... A>
auto tachyon::GUIApplication::GridView ( A &&... a)
inline

◆ TabBar()

template<class... A>
auto tachyon::GUIApplication::TabBar ( A &&... a)
inline

◆ Toolbar()

template<class... A>
auto tachyon::GUIApplication::Toolbar ( A &&... a)
inline

◆ StatusBar()

template<class... A>
auto tachyon::GUIApplication::StatusBar ( A &&... a)
inline

◆ TitleBar()

template<class... A>
auto tachyon::GUIApplication::TitleBar ( A &&... a)
inline

◆ ReorderableGroup()

template<class... A>
auto tachyon::GUIApplication::ReorderableGroup ( A &&... a)
inline

◆ ReorderableItem()

template<class... A>
auto tachyon::GUIApplication::ReorderableItem ( A &&... a)
inline

◆ Disabled()

template<class... A>
auto tachyon::GUIApplication::Disabled ( A &&... a)
inline

◆ Invalid()

template<class... A>
auto tachyon::GUIApplication::Invalid ( A &&... a)
inline

◆ Selected()

template<class... A>
auto tachyon::GUIApplication::Selected ( A &&... a)
inline

◆ Indeterminate()

template<class... A>
auto tachyon::GUIApplication::Indeterminate ( A &&... a)
inline

◆ DockingContainer()

template<class... A>
auto tachyon::GUIApplication::DockingContainer ( A &&... a)
inline

◆ DockingFrame()

template<class... A>
auto tachyon::GUIApplication::DockingFrame ( A &&... a)
inline

◆ CloseWindow()

void tachyon::GUIApplication::CloseWindow ( )
inline

Internal: the body of EndWindow for an open window; call EndWindow.

◆ AddBox() [1/7]

void tachyon::GUIApplication::AddBox ( ID id,
int2 size,
StyleRef styleRef,
TextID textID = TextID::Invalid )
inline

A plain box of a fixed size in pixels, in a style; textID is optional.

◆ AddBox() [2/7]

void tachyon::GUIApplication::AddBox ( int2 size,
StyleRef styleRef,
TextID textID = TextID::Invalid,
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ AddBox() [3/7]

void tachyon::GUIApplication::AddBox ( ID id,
int2 size,
StyleRef styleRef,
std::string_view text )
inline

As above, with text.

◆ AddBox() [4/7]

void tachyon::GUIApplication::AddBox ( ID id,
int2 size,
StyleRef styleRef,
IconID iconID,
std::string_view text )
inline

As above, with an icon and text.

◆ AddBox() [5/7]

void tachyon::GUIApplication::AddBox ( ID id,
StyleRef styleRef,
IconID iconID,
std::string_view text )
inline

As above, sized to its content.

◆ AddBox() [6/7]

void tachyon::GUIApplication::AddBox ( StyleRef styleRef,
std::string_view text,
std::source_location site = std::source_location::current() )
inline

A box with text, sized to its content, with the call site as the ID.

◆ AddBox() [7/7]

void tachyon::GUIApplication::AddBox ( int2 size,
StyleRef styleRef,
std::string_view text,
std::source_location site = std::source_location::current() )
inline

A fixed-size box with text, with the call site as the ID.

◆ RenderSettingsPanel()

void tachyon::GUIApplication::RenderSettingsPanel ( SettingsPanelState & state)

Renders into the current container; the caller provides the outer panel.

◆ PersistWindow()

void tachyon::GUIApplication::PersistWindow ( std::string key,
ID windowID )

Keeps the window's position, size and mode.

◆ PersistDocking()

void tachyon::GUIApplication::PersistDocking ( std::string key,
DockingLayout & layout )

Keeps the layout's dock tree; panels are matched by type, else by title.

◆ PersistTable()

void tachyon::GUIApplication::PersistTable ( std::string key,
TableState & state,
std::span< VirtualTableColumn > columns )

Keeps the table's column widths and order, matching columns by header.

◆ PersistToolbars()

void tachyon::GUIApplication::PersistToolbars ( std::string key,
std::span< std::vector< ToolbarItem >, kToolbarSideCount > sides )

Keeps each side's toolbar items, by debugName.

◆ PersistValue() [1/4]

void tachyon::GUIApplication::PersistValue ( std::string key,
bool & value )

Keeps an app value.

◆ PersistValue() [2/4]

void tachyon::GUIApplication::PersistValue ( std::string key,
int & value )

As above, for an int.

◆ PersistValue() [3/4]

void tachyon::GUIApplication::PersistValue ( std::string key,
float & value )

As above, for a float.

◆ PersistValue() [4/4]

void tachyon::GUIApplication::PersistValue ( std::string key,
std::string & value )

As above, for a string.

◆ PersistDocuments()

void tachyon::GUIApplication::PersistDocuments ( std::string key,
std::function< std::vector< DocumentWindowRef >()> windows )

Keeps the documents of each main window that Windows and platform lists when the state is saved: their names, kinds and order, the active one, each one's dock tree, and the window's position, size and mode.

The app makes them again (TakeSavedDocuments).

◆ PersistShortcuts()

void tachyon::GUIApplication::PersistShortcuts ( std::string key,
CommandManager & commands )

Keeps the shortcuts that aren't the ones their commands were registered with, matching commands by mode name and description.

Register the commands before RestoreUIState; ones it doesn't find keep their own.

◆ TakeSavedDocuments()

std::vector< SavedDocumentWindow > tachyon::GUIApplication::TakeSavedDocuments ( std::string_view key)

The main windows of documents RestoreUIState read for key, in the order they were listed; empty when none were saved.

Taking them clears them. Make each document with its panels, then RestoreDocumentLayout, and place each window with RestoreWindowPlace.

◆ RestoreDocumentLayout()

bool tachyon::GUIApplication::RestoreDocumentLayout ( Document & document,
const SavedDocument & saved )

Lays a document's panels out as saved: panels by type, else title; ones the saved tree doesn't have go to its first leaf.

False (the layout stays) when it can't be read.

◆ RestoreWindowPlace()

void tachyon::GUIApplication::RestoreWindowPlace ( ID windowID,
const SavedDocumentWindow & saved )

Puts a window where saved was when it's next declared, as PersistWindow does (on its monitor, or the same place on another).

Nothing when no place was saved.

◆ SaveUIState()

std::string tachyon::GUIApplication::SaveUIState ( ) const

The named state as JSON text.

◆ RestoreUIState()

Result< void > tachyon::GUIApplication::RestoreUIState ( std::string_view json)

Applies JSON text from SaveUIState.

An error when it doesn't parse, isn't an object or was saved by a newer version.

◆ GUIApplicationInternals

friend class GUIApplicationInternals
friend

GUIApplicationInternals (gui_application_internal.h) re-exposes these to the library's own code and the tests.

Member Data Documentation

◆ inputManager

std::unique_ptr<InputManager> tachyon::GUIApplication::inputManager

Routes input events to the elements; also holds global handlers. Created by Initialize.

◆ layoutEngine

std::unique_ptr<LayoutEngine> tachyon::GUIApplication::layoutEngine

Lays out the elements each frame. Created by Initialize.

◆ windowManager

std::unique_ptr<OSWindowManager> tachyon::GUIApplication::windowManager

The OS windows and their render contexts. Created by Initialize.

◆ textAtlasManager

std::unique_ptr<TextAtlasManager> tachyon::GUIApplication::textAtlasManager

The glyph atlas. Created by Initialize.

◆ clipboard

std::unique_ptr<IClipboard> tachyon::GUIApplication::clipboard

from SetClipboard

◆ textSystem

ITextSystem* tachyon::GUIApplication::textSystem { nullptr }

Shapes, measures and edits text. Created by Initialize.

◆ windowBackend

IWindowBackend* tachyon::GUIApplication::windowBackend { nullptr }

SetWindowBackend's windows plus render-to-image windows.

◆ graphicsContext

GraphicsContext* tachyon::GUIApplication::graphicsContext { nullptr }

the backend from SetGraphicsBackend

◆ guiRenderer

GUIRenderer* tachyon::GUIApplication::guiRenderer { nullptr }

The graphics backend's renderer.

◆ idManager

IDManager tachyon::GUIApplication::idManager {}

Element IDs: static ones (CreateStaticID), call-site ones (AllocateDynamicID) and parent scopes (PushParent / PopParent).

◆ guiStateManager

GUIStateManager tachyon::GUIApplication::guiStateManager {}

Per-element interaction state (hover, focus, clicks) and the construction stacks (disabled, selected).

◆ transitionManager

TransitionManager tachyon::GUIApplication::transitionManager {}

In-progress visual state transitions, per element.

◆ tabChainManager

TabChainManager tachyon::GUIApplication::tabChainManager {}

The Tab-key focus order, rebuilt each frame.

◆ menuManager

MenuManager tachyon::GUIApplication::menuManager {}

The open menus and the menu bar's triggers.

◆ tooltipManager

TooltipManager tachyon::GUIApplication::tooltipManager {}

When a tooltip shows (delaySeconds) and for which element.

◆ gradientManager

GradientManager tachyon::GUIApplication::gradientManager {}

GPU pages for the gradients styles use.

◆ styleManager

StyleManager tachyon::GUIApplication::styleManager { gradientManager }

The registered styles; Px converts CSS pixels to pixels at the UI scale.

◆ elementStorage

ElementStorage tachyon::GUIApplication::elementStorage { styleManager, &guiStateManager.GetElementDataStore() }

This frame's element tree.

◆ windowRegistry

WindowRegistry tachyon::GUIApplication::windowRegistry {}

The elements of each window, filled as the windows are built.

◆ commandManager

CommandManager tachyon::GUIApplication::commandManager {}

Commands, their shortcuts and the undo history.

◆ inputBroadcaster

InputHandlerBroadcaster tachyon::GUIApplication::inputBroadcaster {}

Sends each platform input event to the input manager and the text system.

◆ onGui

OnGuiFunc tachyon::GUIApplication::onGui {}

Runs a frame from inside the OS's modal resize loop, so windows repaint while resized.

Initialize sets it unless repaintWhileResizing is off or it is already set.

◆ theme

GUITheme tachyon::GUIApplication::theme {}

The loaded theme: the style refs, icons and metrics the controls use; theme.GetStyle finds a CSS class.

◆ applicationQuit

bool tachyon::GUIApplication::applicationQuit = false

Set to true to end Run (UpdateFrame then returns false).

◆ m_frameStart

std::chrono::steady_clock::time_point tachyon::GUIApplication::m_frameStart {}

Internal: when the current frame started (set by UpdateFrame).

◆ frameTime

float tachyon::GUIApplication::frameTime = 0.0f

The last frame's duration in seconds, including any vsync wait.

◆ frameBuildTime

float tachyon::GUIApplication::frameBuildTime = 0.0f

CPU work per frame, excluding the vsync stall in present.

◆ kFrameHistoryCount

int tachyon::GUIApplication::kFrameHistoryCount = 240
staticconstexpr

~4s @ 60fps


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