TachyonUI 1.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
 Text and images to copy and paste (Get / Set, GetImage / SetImage); 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 ()
 Cleans up when Cleanup wasn't called (an early return, a failed test), so the device, windows and contexts don't outlive the application.
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 SetAccent (std::optional< AccentColors > accent)
 Replaces the palette's accent with accent (its dark color in a dark palette, its light one in a light palette), and the colors derived from it along with it; none goes back to the palette's own.
const std::optional< AccentColors > & GetAccent () const
 SetAccent's accent; none while the palette's own is used.
void SetThemeVariable (std::string_view name, std::string_view value)
 Sets a theme variable ("--bg-panel") to a CSS value ("#202020", "6px", "0 4px 12px rgba(0, 0, 0, 0.4)") for the theme loaded, in place of what its palette and the style files set, and of the accent.
void ClearThemeVariable (std::string_view name)
 Back to the theme's own value for name.
void ClearThemeVariables ()
 Back to the theme's own values for all of them, for the theme loaded.
const ThemeVariableOverrides & GetThemeVariables () const
 The variables set with SetThemeVariable for the theme loaded.
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.
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 or Run's pace 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)
 The leaf whose content (as last laid out) holds screenPos, the part of it the point is in (an edge, or Center), and its layout; none off every leaf's content.
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 ForgetDockingLayout (DockingLayout &layout)
 Before an app destroys Layout: closes the windows of the panels torn off it (they would dock back into it) and stops saving it.
void ReleaseDockingLayout (DockingLayout &layout)
 Closes a layout for good, as ForgetDockingLayout does, and empties it: its panels are hidden (onDisable) and destroyed, and the IDs CreatePanel made for them and its tree's go back.
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.
void ClaimCommandMode (ID owner, CommandMode mode)
 For a control with shortcuts of its own (CommandManager::RegisterMode): while the focus is within owner, the command mode is mode; once it's within none, Default again.
void ClosePanel (DockingLayout &layout, ID panelID)
 Closes a panel of Layout for good, wherever it is: out of its tree (its leaf closing up when it empties), hidden first (onDisable) if it's shown, its ID back when CreatePanel made it.
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).
void CloseAllDocuments (DocumentSet &set)
 Closes every document of set, as CloseDocument does each: at exit, say.
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 InjectPen (ID windowID, const PenState &pen)
 The pen, before the pointer events it goes with; a default PenState is the mouse.
void InjectPinch (ID windowID, float scale, KeyModifier mods=KeyModifier::None)
 A trackpad pinch by scale where the pointer is.
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, and of images.
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.
void SetWheelMode (WheelMode mode)
 What the wheel and a trackpad's two-finger scroll do over the canvases that pan and zoom (node view, curve and timeline editors, plots): zoom, or scroll the view.
WheelMode GetWheelMode () const
 The graphics backend Initialize uses; without one it creates a vulkan::VulkanGraphicsContext.

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.
void SetRedrawMode (RedrawMode mode)
 How often Run draws a frame; RedrawMode::WhenNeeded by default, which sleeps while nothing changes.
RedrawMode GetRedrawMode () const
 Builds the UI; called each frame.
void RequestRedraw ()
 Asks for a frame, for a change the UI can't see by itself: data from another thread, a value the app animates.
void RequestRedrawIn (float seconds)
 Asks for a frame seconds from now (a clock's next tick). Safe from any thread.
bool NeedsFrame () const
 Whether a frame is needed now.
float SecondsUntilFrame () const
 Seconds until a frame is needed: 0 when NeedsFrame is true, INFINITY when nothing is due (only input or a request will need one).

Event handlers and control building blocks

tachyon::EventHandler MakeToggleHandler (bool &toggle)
 A handler that flips toggle on click.
template<class OnClick>
tachyon::EventHandler MakeButtonHandler (OnClick &&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.
void DrawnValid (tachyon::ElementRef ref)
 The element just registered drawn as valid inside a BeginInvalid scope: the part of a control that shows it invalid is another one (a check box's box, not its row).
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, bool lit=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 ShortcutButton (ID id, const CommandManager::Command &command, std::function< void()> onClick, std::string_view unassigned="Unassigned", LayoutOverride &&constraints={})
 A command's shortcut as keycaps, one per key ("Ctrl" "C"); a chord's two steps apart by a comma.
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 its shortcut in a chip after it ("Undo" then "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.
bool BusyButton (ID id, const GUIContent &content, bool busy, std::string_view busyText, std::function< void()> onClick, StyleRef style, LayoutOverride &&constraints={})
 A button at work: a spinner in place of its icon and busyText ("Saving...") in place of its text, as wide as it was before, and clicks ignored.
bool BusyButton (ID id, const GUIContent &content, bool busy, std::string_view busyText, std::function< void()> onClick, LayoutOverride &&constraints={})
 As above, in the theme's button style.

Progress and loading

Spinners, the sliding segment and the skeleton's shine move every frame; a BeginCached scope holding one is rebuilt every frame (ElementFlags::Animated).

void ProgressBar (ID id, float value, bool failed, StyleRef style, LayoutOverride &&constraints={})
 A bar value (0 to 1, clamped) of the way full; failed fills it in the error color, for work that stopped.
void ProgressBar (ID id, float value, LayoutOverride &&constraints={})
 As above, not failed, in the theme's bar style.
void ProgressBar (float value, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
void IndeterminateProgressBar (ID id, StyleRef style, LayoutOverride &&constraints={})
 A bar for work of unknown length: a segment with soft ends slides along it, from start to end every 1.2 s.
void IndeterminateProgressBar (ID id, LayoutOverride &&constraints={})
 As above, in the theme's bar style.
void IndeterminateProgressBar (LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
void Spinner (ID id, SpinnerSize size=SpinnerSize::Medium, LayoutOverride &&constraints={})
 A ring with an arc going round it, a turn every 0.8 s, in the theme's track and accent colors: work under way.
void Spinner (SpinnerSize size=SpinnerSize::Medium, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
void CircularProgress (ID id, float value, StyleRef style, LayoutOverride &&constraints={})
 A ring filled value (0 to 1, clamped) of the way round, clockwise from the top, the percentage in its middle.
void CircularProgress (ID id, float value, LayoutOverride &&constraints={})
 As above, in the theme's style.
void CircularProgress (float value, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
void Skeleton (ID id, StyleRef style, LayoutOverride &&constraints={})
 A placeholder bar where content is still loading, sized as the content it stands for (give it a width), with a shine sweeping across it every 1.5 s; still with reduced motion.
void Skeleton (ID id, LayoutOverride &&constraints={})
 As above, in the theme's style.
void Skeleton (LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
void TaskProgress (ID id, const ProgressTask &task, LayoutOverride &&constraints={})
 A piece of work in full: its name and percent (or note) over its bar, a cancel button when onCancel is set, and detail under it.
void TaskProgress (const ProgressTask &task, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
void ProgressSteps (ID id, std::span< const ProgressTask > steps, LayoutOverride &&constraints={})
 The steps of a longer job, one a row: a glyph for its state (a check once done, a spinner while running, a dashed ring while pending, a cross and "failed" once failed), its name, and its note (or percent) at the end of the line; under the running one, a small bar and its detail, in line with the names.
void ProgressSteps (std::span< const ProgressTask > steps, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
void StatusProgress (ID id, const ProgressTask &task, LayoutOverride &&constraints={})
 A piece of work in a status bar: a small spinner, its name, a 120px bar and its note ("1,240 / 3,800") or percent.
void StatusProgress (const ProgressTask &task, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool BackgroundTasks (ID id, std::span< const ProgressTask > tasks, LayoutOverride &&constraints={})
 A "3 tasks" pill with a chevron, for a status bar, that opens a popover listing tasks: each with its name, a small bar, its percent or state and a cancel button when onCancel is set.
bool BackgroundTasks (std::span< const ProgressTask > tasks, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.

Timeline

bool Timeline (ID id, TimelineState &state, const TimelineOptions &options, LayoutOverride &&constraints={})
 Playback on one row: go to the start, step back a frame, play or pause, step on a frame, go to the end and loop; the time and frame; and a scrubber with ticks (every second when there's room), the progress fill, a line per marker and the playhead.
bool Timeline (TimelineState &state, const TimelineOptions &options, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
void TimelineEditor (ID id, TimelineViewRef view, LayoutOverride &&constraints={})
 A timeline editor over view: a toolbar (the transport, with the previous and next key in place of the frame steps; the time; the frame rate; Snap; zoom), the track list beside the ruler and the lanes, and a scroll bar under them.
void TimelineEditor (TimelineViewRef view, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.

Curves

bool CurveField (ID id, CurveViewRef view, LayoutOverride &&constraints={})
 A curve in a box, over the curves' range: a click opens the curve editor (CurveEditor) in a window under it.
bool CurveField (CurveViewRef view, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
void CurveEditor (ID id, CurveViewRef view, LayoutOverride &&constraints={})
 The curve editor a CurveField opens, as a control of its own: the channels and the selected key's time and value over the plot; the keys, their tangent handles and the grid on it; the presets and the wrap modes under it.
void CurveEditor (CurveViewRef view, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool Plot (ID id, PlotViewRef view, LayoutOverride &&constraints={})
 Series of values as lines, bars or areas over the x range (a histogram's channels), with a chip per series to show one on its own, the values under the pointer, and handles dragged along x under the plot.
bool Plot (PlotViewRef view, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
bool Viewport (ID id, ViewportView &view, LayoutOverride &&constraints={})
 A 3D view: the app's scene, drawn by view.onRender into an image the library keeps at the view's size, a camera the mouse moves round it, the move, rotate and scale gizmos over the selection, the tools down the left and the axes at the top right.
bool Viewport (ViewportView &view, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.

Menus and message dialogs

bool BeginMenu (ID id, const GUIContent &content, 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, const GUIContent &content, LayoutOverride &&constraints={})
 As above, in the theme's menu styles.
bool BeginMenu (const GUIContent &content, 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 (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 menu styles.
bool BeginDropdownMenu (ID id, const GUIContent &content, StyleRef buttonStyle, StyleRef menuStyle, StyleRef itemStyle, LayoutOverride &&constraints={})
 A menu opened from a dropdown: as BeginMenu, with an arrow after its text also in a menu bar or title bar, where it isn't one of the bar's menus (Left and Right don't go to it).
bool BeginDropdownMenu (ID id, const GUIContent &content, LayoutOverride &&constraints={})
 As above, in the theme's menu-bar dropdown style (menu-bar-dropdown) and 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.
uint32_t ContextMenuOpenings () const
 Counts the context menus opened, a right click on a target whose menu is already open included.

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.
bool BeginButtonGroup (ID id, LayoutOverride &&constraints={})
 As above, with the group's own ID.
void EndButtonGroup ()
 Closes BeginButtonGroup.
bool BeginToggleGroup (LayoutOverride &&constraints={})
 The same for Toggles and Field(bool).
void EndToggleGroup ()
 Closes BeginToggleGroup.
bool Segmented (ID id, int &selected, std::span< const std::string_view > options, LayoutOverride &&constraints={})
 One of a few choices side by side, as a button group with the chosen segment selected: selected is its index in options.
template<typename E>
requires std::is_enum_v<E>
bool Segmented (ID id, E &selected, std::span< const std::string_view > options, LayoutOverride &&constraints={})
 As above, for an enum whose values are the segments' indices.
template<typename T>
requires (std::is_enum_v<T> || std::is_same_v<T, int>)
bool Segmented (T &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.

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.
ID DropTargetID () const
 The element that takes the drag under the pointer, wherever the drag came from: files from another application (FileDragTargetID), else a drag started in this one (the element whose handler returned true to EventType::DragEnter).
ID DragGhostWindowID () const
 The window a drag's ghost goes in, by the pointer (see BeginCursorGhostWindow).
DragVisualizer ImageDragGhost (ImageIndex image, uint2 size)
 A ghost for a drag of a picture: image fitted into 64 x 64 CSS px by the pointer, keeping its shape.
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.
bool BeginShownState (ElementState states)
 The controls until EndShownState look hovered, pressed (Active) or focused as states say, whatever the pointer and keyboard do: a control's states side by side, for a preview or a screenshot.
void EndShownState ()
 Closes BeginShownState.
bool ShowsFocusRing (const tachyon::Element &element) const
 Whether element draws its focus ring (:focus-visible): it's focused and focus came from the keyboard, or it's shown focused (BeginShownState).
static void RebuildTreeViewIndex (std::vector< TreeViewRow > &rows)
 Recomputes skipCount / ancestorLineMask / isLastSibling from row depths.
static void WalkTreeViewVisibility (const std::vector< TreeViewRow > &rows, const std::unordered_set< ID > &openRows, std::vector< int > &visibleIdx)
 Writes the flat indices of the rows shown to visibleIdx: those under no closed branch, the open ones being in openRows (by TreeViewRowKey).
static void WalkTreeViewVisibility (const std::vector< TreeViewRow > &rows, std::vector< int > &visibleIdx, TableState &state)
 As above, for a tree drawn by a table with state, open as its openRows says: when rows were opened or closed, its selection stays on the same rows (row IDs are visible positions).
static TreeOpenRef TreeViewOpenRef (const std::vector< TreeViewRow > &rows, size_t flat, TableState &state)
 The TreeCell open state of flat row flat in the view with state: its key in state.openRows, or nothing for a row without children.

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, TreeOpenRef 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 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)
 As above, the open state a bool of yours; null for leaves.
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 (NodeViewRef view)
 Builds view (canvas, nodes, wires and overlays) in the current container: a NodeView, or { graph, state } for one of several views of a graph.
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.
void DocumentBar (ID id, DocumentSet &set, StyleRef style, LayoutOverride &&constraints=LayoutOverride::Auto())
 The document bar of set alone: its tabs, "+", "N open" and the line in the active document's color.
void DocumentBar (ID id, DocumentSet &set, LayoutOverride &&constraints=LayoutOverride::Auto())
 As above, in the theme's document bar style.
void DocumentLine (const DocumentSet &set, LayoutOverride &&constraints=LayoutOverride::Auto())
 The line under the document bar of set, in the active document's color, across what it's in: after the title bar the bar is in.
void DocumentPanels (DocumentSet &set, LayoutOverride &&constraints=LayoutOverride::Auto())
 The active document's panels of set, after its DocumentBar.

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, const GUIContent &content, 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, const GUIContent &content, TextEditBehavior textEditBehavior=TextEditBehavior::ContinuousUpdate, LayoutOverride &&constraints={})
 As above, in the theme's search style.
bool SearchField (std::string &value, const GUIContent &content, 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, const GUIContent &content, 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).

Edge and corner fields

bool EdgesField (ID id, BoxEdges &value, NumericFieldConfig< int32_t > config={ .stepPerPixel=0.25,.minVal=0,.maxVal=64 }, LayoutOverride &&constraints={})
 Border widths, padding or the like: a number field for each side, captioned T, R, B and L, after a link toggle.
bool CornersField (ID id, BoxCorners &value, NumericFieldConfig< int32_t > config={ .stepPerPixel=0.25,.minVal=0,.maxVal=64 }, LayoutOverride &&constraints={})
 As EdgesField, for corner radii: top left, top right, bottom right and bottom left.
bool ShadowField (ID id, BoxShadow &value, LayoutOverride &&constraints={})
 A shadow: its color over its offsets (X, Y), blur and spread.

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.
void SetColorSwatches (std::span< const tachyon::color4f > colors)
 The color picker's swatches, which the user adds to and removes from; set them to start from the app's palette, read them to keep it.
std::vector< tachyon::color4f > ColorSwatches () const
 A color swatch that opens a color picker; true when the color changed.
void AddRecentColor (tachyon::color4f color)
 Adds a color to the picker's recent ones, as OK does: newest first, each once, at most 8.
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.
bool GradientField (ID id, tachyon::GradientF &value, StyleRef style, LayoutOverride &&constraints={})
 As above, for a GradientF: up to GradientF::kMaxStops stops, colors over 1 (HDR), and each stop's interpolation to the next.
bool GradientField (ID id, tachyon::GradientF &value, LayoutOverride &&constraints={})
 As above, in the theme's gradient swatch style.
bool GradientField (tachyon::GradientF &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::GradientF &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.
template<typename T>
requires std::is_arithmetic_v<T>
bool Slider (ID id, T &value, std::type_identity_t< T > minVal, std::type_identity_t< T > maxVal, StyleRef style, LayoutOverride &&constraints={})
 Groove + knob without value text; drag-only.
template<typename T>
requires std::is_arithmetic_v<T>
bool Slider (ID id, T &value, std::type_identity_t< T > minVal, std::type_identity_t< T > maxVal, LayoutOverride &&constraints={})
 As above, in the theme's slider style.
template<typename T>
requires std::is_arithmetic_v<T>
bool Slider (T &value, std::type_identity_t< T > minVal, std::type_identity_t< T > maxVal, StyleRef style, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
template<typename T>
requires std::is_arithmetic_v<T>
bool Slider (T &value, std::type_identity_t< T > minVal, std::type_identity_t< T > 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.
template<typename T>
requires std::is_arithmetic_v<T>
bool RangeField (ID id, T &value, std::type_identity_t< T > minVal, std::type_identity_t< T > maxVal, LayoutOverride &&constraints={})
 A number in [minVal, maxVal]: a slider taking the row's room and a value box after it to type into.
template<typename T>
requires std::is_arithmetic_v<T>
bool RangeField (T &value, std::type_identity_t< T > minVal, std::type_identity_t< T > maxVal, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.

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.
void Image (ID id, ImageIndex image, const UVRect &uv, StyleRef style, LayoutOverride &&constraints={})
 Draws the part uv of image stretched over the element's padding box: a cell of an atlas (UVRect::FromPixels), or a zoomed or panned view of a big image.
void Image (ID id, ImageIndex image, const UVRect &uv, LayoutOverride &&constraints={})
 As above, in the theme's image style.
void Image (ImageIndex image, const UVRect &uv, 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, const UVRect &uv, 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, const UVRect &uv, StyleRef style, LayoutOverride &&constraints={})
 The part uv of an image sourceSize pixels big, sized like the aspect-preserving Image above to the aspect of that part.
void Image (ID id, ImageIndex image, uint2 sourceSize, const UVRect &uv, LayoutOverride &&constraints={})
 As above, in the theme's image style.
void Image (ImageIndex image, uint2 sourceSize, const UVRect &uv, 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, const UVRect &uv, const ImageDisplay &display, StyleRef style, LayoutOverride &&constraints={})
 The part uv of image shown as display says: tinted, its channels picked (one shown as grey, say), sRGB-encoded for an image of linear values.
void Image (ID id, ImageIndex image, const ImageDisplay &display, LayoutOverride &&constraints={})
 As above, the whole image, in the theme's image style.
void Image (ImageIndex image, const ImageDisplay &display, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.
void Image (ID id, ImageIndex image, uint2 sourceSize, const UVRect &uv, const ImageDisplay &display, StyleRef style, LayoutOverride &&constraints={})
 The part uv of an image sourceSize pixels big, shown as display says, sized like the aspect-preserving Image to the aspect of that part.
void Image (ID id, ImageIndex image, uint2 sourceSize, const ImageDisplay &display, LayoutOverride &&constraints={})
 As above, the whole image, in the theme's image style.
void Image (ImageIndex image, uint2 sourceSize, const ImageDisplay &display, LayoutOverride &&constraints={}, std::source_location site=std::source_location::current())
 As above, with the call site as the ID.

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 AddGhostIcon (IconID icon, int2 size, std::source_location site=std::source_location::current())
 As above, size in pixels: in a ghost window of that size, a small icon by the cursor, for example.
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
PersistLayoutPresets("layouts", presets);    // saved layouts, file types' layouts

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.
void PersistLayoutPresets (std::string key, LayoutPresets &presets)
 Keeps the layouts the user saved and the file types' layouts; the app adds its built-in ones itself, before or after RestoreUIState.
void PersistThemeVariables (std::string key)
 Keeps each theme's variables, set with SetThemeVariable.
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, const std::function< std::optional< ID >(std::string_view key)> &makePanel={})
 Lays a document's panels out as saved, and gives them their own states back:
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 SaveDockLayout (const DockingLayout &layout) const
 A layout's dock tree as text, panels by type, else title, as a LayoutPreset keeps it; empty when it has none.
bool ApplyDockLayout (DockingLayout &layout, std::string_view tree, const std::function< std::optional< ID >(std::string_view key)> &makePanel={})
 Lays a layout's panels out as tree (SaveDockLayout's text) says:
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 ( )
virtual

Cleans up when Cleanup wasn't called (an early return, a failed test), so the device, windows and contexts don't outlive the application.

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.

The ID goes back when the panel is closed (its tab, its window, its document, or a layout applied without it).

◆ 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)

The leaf whose content (as last laid out) holds screenPos, the part of it the point is in (an edge, or Center), and its layout; none off every leaf's content.

Tab bars aren't content: FindDockLeafAtScreenPos finds those.

◆ 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.

◆ ForgetDockingLayout()

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

Before an app destroys Layout: closes the windows of the panels torn off it (they would dock back into it) and stops saving it.

◆ ReleaseDockingLayout()

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

Closes a layout for good, as ForgetDockingLayout does, and empties it: its panels are hidden (onDisable) and destroyed, and the IDs CreatePanel made for them and its tree's go back.

Call it before the app destroys a layout it made, or at exit.

◆ 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.

◆ ClaimCommandMode()

void tachyon::GUIApplication::ClaimCommandMode ( ID owner,
CommandMode mode )

For a control with shortcuts of its own (CommandManager::RegisterMode): while the focus is within owner, the command mode is mode; once it's within none, Default again.

Call it as the control is built, every frame it is. The mode is set once a frame, before input is handled, from where the focus is, so two controls of one mode (two panels of a kind) don't undo each other. Default claims nothing.

◆ ClosePanel()

void tachyon::GUIApplication::ClosePanel ( DockingLayout & layout,
ID panelID )

Closes a panel of Layout for good, wherever it is: out of its tree (its leaf closing up when it empties), hidden first (onDisable) if it's shown, its ID back when CreatePanel made it.

Its callbacks, and what they hold, are destroyed when the next frame starts, so it can be called from an input handler.

◆ 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.

◆ CloseAllDocuments()

void tachyon::GUIApplication::CloseAllDocuments ( DocumentSet & set)

Closes every document of set, as CloseDocument does each: at exit, say.

◆ 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

◆ SetAccent()

void tachyon::GUIApplication::SetAccent ( std::optional< AccentColors > accent)

Replaces the palette's accent with accent (its dark color in a dark palette, its light one in a light palette), and the colors derived from it along with it; none goes back to the palette's own.

Applied, like RequestReloadTheme, at the start of the next frame, and kept through theme changes. kAccentPresets has the design's. SetAccent(kAccentPresets[1].colors); // teal

◆ GetAccent()

const std::optional< AccentColors > & tachyon::GUIApplication::GetAccent ( ) const
inline

SetAccent's accent; none while the palette's own is used.

◆ SetThemeVariable()

void tachyon::GUIApplication::SetThemeVariable ( std::string_view name,
std::string_view value )

Sets a theme variable ("--bg-panel") to a CSS value ("#202020", "6px", "0 4px 12px rgba(0, 0, 0, 0.4)") for the theme loaded, in place of what its palette and the style files set, and of the accent.

Each theme keeps its own: switch to another and back, and they're back. A color shows on the next frame, anything else as the theme loads again at the start of it. theme.GetVariables() lists the variables a theme editor can offer; PersistThemeVariables keeps them. SetThemeVariable("--radius-md", "6px");

◆ ClearThemeVariable()

void tachyon::GUIApplication::ClearThemeVariable ( std::string_view name)

Back to the theme's own value for name.

◆ ClearThemeVariables()

void tachyon::GUIApplication::ClearThemeVariables ( )

Back to the theme's own values for all of them, for the theme loaded.

◆ GetThemeVariables()

const ThemeVariableOverrides & tachyon::GUIApplication::GetThemeVariables ( ) const

The variables set with SetThemeVariable for the theme loaded.

◆ 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). A window opened from it as an image (WindowImagePopups) takes the focus as an OS popup does, and keeps it until a press in the window that opened it.

◆ 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.

◆ InjectPen()

void tachyon::GUIApplication::InjectPen ( ID windowID,
const PenState & pen )

The pen, before the pointer events it goes with; a default PenState is the mouse.

◆ InjectPinch()

void tachyon::GUIApplication::InjectPinch ( ID windowID,
float scale,
KeyModifier mods = KeyModifier::None )

A trackpad pinch by scale where the pointer is.

◆ 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, and of images.

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.

◆ SetWheelMode()

void tachyon::GUIApplication::SetWheelMode ( WheelMode mode)
inline

What the wheel and a trackpad's two-finger scroll do over the canvases that pan and zoom (node view, curve and timeline editors, plots): zoom, or scroll the view.

A pinch zooms, and the middle button (or Alt + left) drags the view, either way. By default DefaultWheelMode(): Pan on macOS, Zoom elsewhere.

◆ GetWheelMode()

WheelMode tachyon::GUIApplication::GetWheelMode ( ) 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.

◆ 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. Run also keeps frames to the display's refresh rate when presenting doesn't wait (a mailbox swapchain, a window the compositor draws); a host's loop paces its own frames.

◆ RecordFrame()

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

See UpdateFrame.

◆ PresentFrame()

void tachyon::GUIApplication::PresentFrame ( )

See UpdateFrame.

◆ SetRedrawMode()

void tachyon::GUIApplication::SetRedrawMode ( RedrawMode mode)
inline

How often Run draws a frame; RedrawMode::WhenNeeded by default, which sleeps while nothing changes.

Switch it any time: Always for an app that animates all the time, WhenChanged to build every frame but draw only the windows that changed.

◆ GetRedrawMode()

RedrawMode tachyon::GUIApplication::GetRedrawMode ( ) const
inline

Builds the UI; called each frame.

◆ RequestRedraw()

void tachyon::GUIApplication::RequestRedraw ( )

Asks for a frame, for a change the UI can't see by itself: data from another thread, a value the app animates.

Safe from any thread; wakes a sleeping Run.

◆ RequestRedrawIn()

void tachyon::GUIApplication::RequestRedrawIn ( float seconds)

Asks for a frame seconds from now (a clock's next tick). Safe from any thread.

◆ NeedsFrame()

bool tachyon::GUIApplication::NeedsFrame ( ) const

Whether a frame is needed now.

Always true except in WhenNeeded, where it's true after input, while something animates or the last frame's draws changed, and when a redraw asked for is due. A host's loop can skip RecordFrame and PresentFrame, or sleep, while it's false:

while (app.UpdateFrame()) { if (app.NeedsFrame()) { app.RecordFrame(); app.PresentFrame(); } else Sleep(app.SecondsUntilFrame()); } 

◆ SecondsUntilFrame()

float tachyon::GUIApplication::SecondsUntilFrame ( ) const

Seconds until a frame is needed: 0 when NeedsFrame is true, INFINITY when nothing is due (only input or a request will need one).

◆ MakeToggleHandler()

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

A handler that flips toggle on click.

◆ MakeButtonHandler()

template<class OnClick>
tachyon::EventHandler tachyon::GUIApplication::MakeButtonHandler ( OnClick && onClick)
inline

A handler that calls onClick on click.

The callable is kept in the handler as it is, so a small one doesn't make the handler allocate.

◆ 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.

◆ DrawnValid()

void tachyon::GUIApplication::DrawnValid ( tachyon::ElementRef ref)

The element just registered drawn as valid inside a BeginInvalid scope: the part of a control that shows it invalid is another one (a check box's box, not its row).

◆ 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,
bool lit = 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. lit shows it hovered whatever the pointer does: a submenu's row while its submenu is open.

◆ 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.

◆ ShortcutButton()

bool tachyon::GUIApplication::ShortcutButton ( ID id,
const CommandManager::Command & command,
std::function< void()> onClick,
std::string_view unassigned = "Unassigned",
LayoutOverride && constraints = {} )

A command's shortcut as keycaps, one per key ("Ctrl" "C"); a chord's two steps apart by a comma.

Without one, unassigned in a muted color. A flat button: onClick runs on a click anywhere on it (to rebind the shortcut, say).

◆ 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 its shortcut in a chip after it ("Undo" then "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.

◆ BusyButton() [1/2]

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

A button at work: a spinner in place of its icon and busyText ("Saving...") in place of its text, as wide as it was before, and clicks ignored.

While busy is false it's an ordinary Button; empty busyText keeps the text.

◆ BusyButton() [2/2]

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

As above, in the theme's button style.

◆ ProgressBar() [1/3]

void tachyon::GUIApplication::ProgressBar ( ID id,
float value,
bool failed,
StyleRef style,
LayoutOverride && constraints = {} )

A bar value (0 to 1, clamped) of the way full; failed fills it in the error color, for work that stopped.

The theme's bar is 6px high; progressBarSmallStyleRef's is 4px, for lists and the status bar.

◆ ProgressBar() [2/3]

void tachyon::GUIApplication::ProgressBar ( ID id,
float value,
LayoutOverride && constraints = {} )
inline

As above, not failed, in the theme's bar style.

◆ ProgressBar() [3/3]

void tachyon::GUIApplication::ProgressBar ( float value,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ IndeterminateProgressBar() [1/3]

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

A bar for work of unknown length: a segment with soft ends slides along it, from start to end every 1.2 s.

◆ IndeterminateProgressBar() [2/3]

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

As above, in the theme's bar style.

◆ IndeterminateProgressBar() [3/3]

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

As above, with the call site as the ID.

◆ Spinner() [1/2]

void tachyon::GUIApplication::Spinner ( ID id,
SpinnerSize size = SpinnerSize::Medium,
LayoutOverride && constraints = {} )

A ring with an arc going round it, a turn every 0.8 s, in the theme's track and accent colors: work under way.

12, 16 or 18px across unless constraints say.

◆ Spinner() [2/2]

void tachyon::GUIApplication::Spinner ( SpinnerSize size = SpinnerSize::Medium,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ CircularProgress() [1/3]

void tachyon::GUIApplication::CircularProgress ( ID id,
float value,
StyleRef style,
LayoutOverride && constraints = {} )

A ring filled value (0 to 1, clamped) of the way round, clockwise from the top, the percentage in its middle.

The theme's is 36px across.

◆ CircularProgress() [2/3]

void tachyon::GUIApplication::CircularProgress ( ID id,
float value,
LayoutOverride && constraints = {} )
inline

As above, in the theme's style.

◆ CircularProgress() [3/3]

void tachyon::GUIApplication::CircularProgress ( float value,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ Skeleton() [1/3]

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

A placeholder bar where content is still loading, sized as the content it stands for (give it a width), with a shine sweeping across it every 1.5 s; still with reduced motion.

◆ Skeleton() [2/3]

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

As above, in the theme's style.

◆ Skeleton() [3/3]

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

As above, with the call site as the ID.

◆ TaskProgress() [1/2]

void tachyon::GUIApplication::TaskProgress ( ID id,
const ProgressTask & task,
LayoutOverride && constraints = {} )

A piece of work in full: its name and percent (or note) over its bar, a cancel button when onCancel is set, and detail under it.

Failed: the error icon, the bar in the error color, the reason in error text and a Retry button when onRetry is set, with a turning arrow. Done: a check, the name and note (how long it took) on one line.

◆ TaskProgress() [2/2]

void tachyon::GUIApplication::TaskProgress ( const ProgressTask & task,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ ProgressSteps() [1/2]

void tachyon::GUIApplication::ProgressSteps ( ID id,
std::span< const ProgressTask > steps,
LayoutOverride && constraints = {} )

The steps of a longer job, one a row: a glyph for its state (a check once done, a spinner while running, a dashed ring while pending, a cross and "failed" once failed), its name, and its note (or percent) at the end of the line; under the running one, a small bar and its detail, in line with the names.

◆ ProgressSteps() [2/2]

void tachyon::GUIApplication::ProgressSteps ( std::span< const ProgressTask > steps,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ StatusProgress() [1/2]

void tachyon::GUIApplication::StatusProgress ( ID id,
const ProgressTask & task,
LayoutOverride && constraints = {} )

A piece of work in a status bar: a small spinner, its name, a 120px bar and its note ("1,240 / 3,800") or percent.

◆ StatusProgress() [2/2]

void tachyon::GUIApplication::StatusProgress ( const ProgressTask & task,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ BackgroundTasks() [1/2]

bool tachyon::GUIApplication::BackgroundTasks ( ID id,
std::span< const ProgressTask > tasks,
LayoutOverride && constraints = {} )

A "3 tasks" pill with a chevron, for a status bar, that opens a popover listing tasks: each with its name, a small bar, its percent or state and a cancel button when onCancel is set.

Shows nothing while tasks is empty. Returns whether the popover is open.

◆ BackgroundTasks() [2/2]

bool tachyon::GUIApplication::BackgroundTasks ( std::span< const ProgressTask > tasks,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ Timeline() [1/2]

bool tachyon::GUIApplication::Timeline ( ID id,
TimelineState & state,
const TimelineOptions & options,
LayoutOverride && constraints = {} )

Playback on one row: go to the start, step back a frame, play or pause, step on a frame, go to the end and loop; the time and frame; and a scrubber with ticks (every second when there's room), the progress fill, a line per marker and the playhead.

A press or drag on the scrubber moves the playhead there, onto a frame. Keys on the focused scrubber: Space plays or pauses, Left / Right step a frame, Page Down / Page Up go to the previous / next marker, Home / End to the ends; Escape during a drag puts the playhead back. A step is a frame, or a hundredth of the length without frames; stepping pauses. Edits state; the app moves it on while it plays (AdvanceTimeline). Returns true on the frame the user changed it.

◆ Timeline() [2/2]

bool tachyon::GUIApplication::Timeline ( TimelineState & state,
const TimelineOptions & options,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ TimelineEditor() [1/2]

void tachyon::GUIApplication::TimelineEditor ( ID id,
TimelineViewRef view,
LayoutOverride && constraints = {} )

A timeline editor over view: a toolbar (the transport, with the previous and next key in place of the frame steps; the time; the frame rate; Snap; zoom), the track list beside the ruler and the lanes, and a scroll bar under them.

  • The track list: groups (a chevron, a color chip, eye and lock), properties (a button to key them at the playhead), audio (mute, solo) and events; a filter and an add button (onAddTrack) over it; a right click opens onTrackContextMenu.
  • The ruler: a press or drag moves the playhead; Shift + drag sets the loop range, its ends drag, Ctrl + click clears it.
  • The lanes: keys (a group's summed up), audio clips with their waveform, events. A click selects a key (Shift adds, Ctrl toggles), a drag on the empty lanes selects those in a box, and a drag on a selected key moves them all, onto frames while Snap is on; Escape puts them back.
  • Over the ruler and the lanes, the wheel zooms round the pointer and Shift + the wheel pans; a drag with the right button pans along the time and scrolls the rows.
  • Keys on the focused lanes: Delete removes the selected keys, Left / Right move them a frame, Ctrl+A selects them all, K keys the selected track at the playhead, Space plays or pauses, Home / End go to the ends, Escape clears the selection. Every change to the tracks or the loop range is a TimelineEdit, handed to the data's onEdit for undo; the playhead and selection change directly. view is a TimelineView, or { data, state } for one of several editors of the same tracks.

◆ TimelineEditor() [2/2]

void tachyon::GUIApplication::TimelineEditor ( TimelineViewRef view,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ CurveField() [1/2]

bool tachyon::GUIApplication::CurveField ( ID id,
CurveViewRef view,
LayoutOverride && constraints = {} )

A curve in a box, over the curves' range: a click opens the curve editor (CurveEditor) in a window under it.

Every change comes to the curves' onEdit, already applied. True on the frame after a change made in it, as a field's is. view is a CurveView, or { data, state } for one of several views of the same curves. CurveView falloff; // a member: one channel, keys over 0 to 1 Label("Falloff"); CurveField(idManager.AllocateDynamicID("falloff"), falloff);

◆ CurveField() [2/2]

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

As above, with the call site as the ID.

◆ CurveEditor() [1/2]

void tachyon::GUIApplication::CurveEditor ( ID id,
CurveViewRef view,
LayoutOverride && constraints = {} )

The curve editor a CurveField opens, as a control of its own: the channels and the selected key's time and value over the plot; the keys, their tangent handles and the grid on it; the presets and the wrap modes under it.

◆ CurveEditor() [2/2]

void tachyon::GUIApplication::CurveEditor ( CurveViewRef view,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ Plot() [1/2]

bool tachyon::GUIApplication::Plot ( ID id,
PlotViewRef view,
LayoutOverride && constraints = {} )

Series of values as lines, bars or areas over the x range (a histogram's channels), with a chip per series to show one on its own, the values under the pointer, and handles dragged along x under the plot.

True on the frame after a handle moved in it. view is a PlotView, or { data, state } for one of several views of a plot.

PlotView levels;   // a member
levels.series  = { PlotSeries{ .name = "Luma", .values = HistogramBins(lumas, 256) } };
levels.handles = { { "Black", 0.0f }, { "White", 1.0f } };
if (Plot(idManager.AllocateDynamicID("levels"), levels))
    ApplyLevels(levels.handles[0].x, levels.handles[1].x); 

◆ Plot() [2/2]

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

As above, with the call site as the ID.

◆ Viewport() [1/2]

bool tachyon::GUIApplication::Viewport ( ID id,
ViewportView & view,
LayoutOverride && constraints = {} )

A 3D view: the app's scene, drawn by view.onRender into an image the library keeps at the view's size, a camera the mouse moves round it, the move, rotate and scale gizmos over the selection, the tools down the left and the axes at the top right.

True on the frame after a gizmo's drag changed the selection.

ViewportView scene;   // a member
scene.onRender = [this](const ViewportRenderContext& ctx) { DrawScene(ctx); };
scene.onClick  = [this](const Ray& ray, KeyModifier) { Pick(ray); };
if (Viewport(idManager.AllocateDynamicID("scene"), scene, LayoutOverride{}.FlexGrow(1)))
    MoveSelected(scene.selection); 

◆ Viewport() [2/2]

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

As above, with the call site as the ID.

◆ BeginMenu() [1/4]

bool tachyon::GUIApplication::BeginMenu ( ID id,
const GUIContent & content,
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. content is the trigger's text with an optional icon before it.

◆ BeginMenu() [2/4]

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

As above, in the theme's menu styles.

◆ BeginMenu() [3/4]

bool tachyon::GUIApplication::BeginMenu ( const GUIContent & content,
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 ( 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 menu styles.

◆ BeginDropdownMenu() [1/2]

bool tachyon::GUIApplication::BeginDropdownMenu ( ID id,
const GUIContent & content,
StyleRef buttonStyle,
StyleRef menuStyle,
StyleRef itemStyle,
LayoutOverride && constraints = {} )

A menu opened from a dropdown: as BeginMenu, with an arrow after its text also in a menu bar or title bar, where it isn't one of the bar's menus (Left and Right don't go to it).

For a picker with actions of its own, beside the bar's menus.

◆ BeginDropdownMenu() [2/2]

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

As above, in the theme's menu-bar dropdown style (menu-bar-dropdown) and 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.

A change outside a frame shows at the next one: call RequestRedraw after it.

◆ 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.

◆ ContextMenuOpenings()

uint32_t tachyon::GUIApplication::ContextMenuOpenings ( ) const
inline

Counts the context menus opened, a right click on a target whose menu is already open included.

A control that builds its menu from what was under the pointer keeps the count it built it for, and works it out again when the count moves on.

◆ 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() [1/2]

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.

◆ BeginButtonGroup() [2/2]

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

As above, with the group's own ID.

◆ 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.

◆ Segmented() [1/3]

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

One of a few choices side by side, as a button group with the chosen segment selected: selected is its index in options.

A click on another segment writes its index to selected (stable storage of the caller's). True on the frame after.

◆ Segmented() [2/3]

template<typename E>
requires std::is_enum_v<E>
bool tachyon::GUIApplication::Segmented ( ID id,
E & selected,
std::span< const std::string_view > options,
LayoutOverride && constraints = {} )
inline

As above, for an enum whose values are the segments' indices.

◆ Segmented() [3/3]

template<typename T>
requires (std::is_enum_v<T> || std::is_same_v<T, int>)
bool tachyon::GUIApplication::Segmented ( T & 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.

◆ 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() [1/2]

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

Writes the flat indices of the rows shown to visibleIdx: those under no closed branch, the open ones being in openRows (by TreeViewRowKey).

◆ WalkTreeViewVisibility() [2/2]

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

As above, for a tree drawn by a table with state, open as its openRows says: when rows were opened or closed, its selection stays on the same rows (row IDs are visible positions).

For a tree built on VirtualTable directly; VirtualTreeView does this itself.

◆ TreeViewOpenRef()

TreeOpenRef tachyon::GUIApplication::TreeViewOpenRef ( const std::vector< TreeViewRow > & rows,
size_t flat,
TableState & state )
inlinestatic

The TreeCell open state of flat row flat in the view with state: its key in state.openRows, or nothing for a row without children.

◆ 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.

◆ DropTargetID()

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

The element that takes the drag under the pointer, wherever the drag came from: files from another application (FileDragTargetID), else a drag started in this one (the element whose handler returned true to EventType::DragEnter).

Invalid when none does. A control that takes both draws itself as the drop target while this is its ID.

◆ DragGhostWindowID()

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

The window a drag's ghost goes in, by the pointer (see BeginCursorGhostWindow).

One drag at a time, so every kind of drag shares it.

◆ ImageDragGhost()

DragVisualizer tachyon::GUIApplication::ImageDragGhost ( ImageIndex image,
uint2 size )

A ghost for a drag of a picture: image fitted into 64 x 64 CSS px by the pointer, keeping its shape.

For MakeDragSourceHandler's ghost.

◆ 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.

◆ BeginShownState()

bool tachyon::GUIApplication::BeginShownState ( ElementState states)
inline

The controls until EndShownState look hovered, pressed (Active) or focused as states say, whatever the pointer and keyboard do: a control's states side by side, for a preview or a screenshot.

A focus ring also needs the focus visible.

◆ EndShownState()

void tachyon::GUIApplication::EndShownState ( )
inline

Closes BeginShownState.

◆ ShowsFocusRing()

bool tachyon::GUIApplication::ShowsFocusRing ( const tachyon::Element & element) const
inline

Whether element draws its focus ring (:focus-visible): it's focused and focus came from the keyboard, or it's shown focused (BeginShownState).

◆ 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() [1/2]

void tachyon::GUIApplication::TreeCell ( std::string_view text,
int depth,
TreeOpenRef 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 where the row's open state lives: empty for leaves (no arrow), else a bool of yours or a view's open rows (see TreeViewOpenRef). Clicks toggle it. 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.

◆ TreeCell() [2/2]

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 )
inline

As above, the open state a bool of yours; null for leaves.

◆ 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 ( NodeViewRef view)

Builds view (canvas, nodes, wires and overlays) in the current container: a NodeView, or { graph, state } for one of several views of a graph.

◆ 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.

◆ DocumentBar() [1/2]

void tachyon::GUIApplication::DocumentBar ( ID id,
DocumentSet & set,
StyleRef style,
LayoutOverride && constraints = LayoutOverride::Auto() )

The document bar of set alone: its tabs, "+", "N open" and the line in the active document's color.

With DocumentPanels, the two parts of Documents placed apart (the bar in the title bar, say); call it first, once a frame. In theme.titleBarDocumentsStyleRef, which fits it in a title bar, it leaves its line out: DocumentLine draws it under the whole title bar.

◆ DocumentBar() [2/2]

void tachyon::GUIApplication::DocumentBar ( ID id,
DocumentSet & set,
LayoutOverride && constraints = LayoutOverride::Auto() )
inline

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

◆ DocumentLine()

void tachyon::GUIApplication::DocumentLine ( const DocumentSet & set,
LayoutOverride && constraints = LayoutOverride::Auto() )

The line under the document bar of set, in the active document's color, across what it's in: after the title bar the bar is in.

◆ DocumentPanels()

void tachyon::GUIApplication::DocumentPanels ( DocumentSet & set,
LayoutOverride && constraints = LayoutOverride::Auto() )

The active document's panels of set, after its DocumentBar.

◆ 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,
const GUIContent & content,
TextEditBehavior textEditBehavior,
StyleRef style,
LayoutOverride && constraints = {} )
inline

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

content's icon leads, and its text is the placeholder shown while the field is empty ({ searchIcon, "Filter objects" }); an icon alone converts to it.

◆ SearchField() [2/4]

bool tachyon::GUIApplication::SearchField ( ID id,
std::string & value,
const GUIContent & content,
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,
const GUIContent & content,
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,
const GUIContent & content,
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>".

◆ EdgesField()

bool tachyon::GUIApplication::EdgesField ( ID id,
BoxEdges & value,
NumericFieldConfig< int32_t > config = { .stepPerPixel=0.25,.minVal=0,.maxVal=64 },
LayoutOverride && constraints = {} )

Border widths, padding or the like: a number field for each side, captioned T, R, B and L, after a link toggle.

Linked, one field sets all four; linking makes the others the top's. It starts linked when the four are equal. True when the value changed. BoxEdges border = BoxEdges(1); EdgesField(idManager.AllocateDynamicID("border"), border);

◆ CornersField()

bool tachyon::GUIApplication::CornersField ( ID id,
BoxCorners & value,
NumericFieldConfig< int32_t > config = { .stepPerPixel=0.25,.minVal=0,.maxVal=64 },
LayoutOverride && constraints = {} )

As EdgesField, for corner radii: top left, top right, bottom right and bottom left.

◆ ShadowField()

bool tachyon::GUIApplication::ShadowField ( ID id,
BoxShadow & value,
LayoutOverride && constraints = {} )

A shadow: its color over its offsets (X, Y), blur and spread.

A transparent color is no shadow. True when the value changed. BoxShadow shadow{ .y = 4, .blur = 12, .color = { 0, 0, 0, 90 } }; ShadowField(idManager.AllocateDynamicID("shadow"), shadow);

◆ 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.

◆ SetColorSwatches()

void tachyon::GUIApplication::SetColorSwatches ( std::span< const tachyon::color4f > colors)

The color picker's swatches, which the user adds to and removes from; set them to start from the app's palette, read them to keep it.

A palette of twelve to begin with.

◆ ColorSwatches()

std::vector< tachyon::color4f > tachyon::GUIApplication::ColorSwatches ( ) const

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

allowHDR lets the picker take brightness over 1.

◆ AddRecentColor()

void tachyon::GUIApplication::AddRecentColor ( tachyon::color4f color)

Adds a color to the picker's recent ones, as OK does: newest first, each once, at most 8.

For colors the app restores from a previous run.

◆ GradientField() [1/8]

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/8]

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

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

◆ GradientField() [3/8]

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/8]

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.

◆ GradientField() [5/8]

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

As above, for a GradientF: up to GradientF::kMaxStops stops, colors over 1 (HDR), and each stop's interpolation to the next.

The swatch shows it clamped to 0..1.

◆ GradientField() [6/8]

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

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

◆ GradientField() [7/8]

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

As above, with the call site as the ID.

◆ GradientField() [8/8]

bool tachyon::GUIApplication::GradientField ( tachyon::GradientF & 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]

template<typename T>
requires std::is_arithmetic_v<T>
bool tachyon::GUIApplication::Slider ( ID id,
T & value,
std::type_identity_t< T > minVal,
std::type_identity_t< T > maxVal,
StyleRef style,
LayoutOverride && constraints = {} )

Groove + knob without value text; drag-only.

Integer types step in whole numbers, float and double move smoothly. Built for float, double and the 8 to 64 bit integer types.

◆ Slider() [2/4]

template<typename T>
requires std::is_arithmetic_v<T>
bool tachyon::GUIApplication::Slider ( ID id,
T & value,
std::type_identity_t< T > minVal,
std::type_identity_t< T > maxVal,
LayoutOverride && constraints = {} )
inline

As above, in the theme's slider style.

◆ Slider() [3/4]

template<typename T>
requires std::is_arithmetic_v<T>
bool tachyon::GUIApplication::Slider ( T & value,
std::type_identity_t< T > minVal,
std::type_identity_t< T > 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]

template<typename T>
requires std::is_arithmetic_v<T>
bool tachyon::GUIApplication::Slider ( T & value,
std::type_identity_t< T > minVal,
std::type_identity_t< T > 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.

◆ RangeField() [1/2]

template<typename T>
requires std::is_arithmetic_v<T>
bool tachyon::GUIApplication::RangeField ( ID id,
T & value,
std::type_identity_t< T > minVal,
std::type_identity_t< T > maxVal,
LayoutOverride && constraints = {} )
inline

A number in [minVal, maxVal]: a slider taking the row's room and a value box after it to type into.

True when the value changed. The types are Slider's.

◆ RangeField() [2/2]

template<typename T>
requires std::is_arithmetic_v<T>
bool tachyon::GUIApplication::RangeField ( T & value,
std::type_identity_t< T > minVal,
std::type_identity_t< T > maxVal,
LayoutOverride && constraints = {},
std::source_location site = std::source_location::current() )
inline

As above, with the call site as the ID.

◆ 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/21]

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/21]

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

As above, in the theme's image style.

◆ Image() [3/21]

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/21]

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/21]

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/21]

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

As above, in the theme's image style.

◆ Image() [7/21]

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/21]

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.

◆ Image() [9/21]

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

Draws the part uv of image stretched over the element's padding box: a cell of an atlas (UVRect::FromPixels), or a zoomed or panned view of a big image.

◆ Image() [10/21]

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

As above, in the theme's image style.

◆ Image() [11/21]

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

As above, with the call site as the ID.

◆ Image() [12/21]

void tachyon::GUIApplication::Image ( ImageIndex image,
const UVRect & uv,
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() [13/21]

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

The part uv of an image sourceSize pixels big, sized like the aspect-preserving Image above to the aspect of that part.

◆ Image() [14/21]

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

As above, in the theme's image style.

◆ Image() [15/21]

void tachyon::GUIApplication::Image ( ImageIndex image,
uint2 sourceSize,
const UVRect & uv,
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() [16/21]

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

The part uv of image shown as display says: tinted, its channels picked (one shown as grey, say), sRGB-encoded for an image of linear values.

◆ Image() [17/21]

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

As above, the whole image, in the theme's image style.

◆ Image() [18/21]

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

As above, with the call site as the ID.

◆ Image() [19/21]

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

The part uv of an image sourceSize pixels big, shown as display says, sized like the aspect-preserving Image to the aspect of that part.

◆ Image() [20/21]

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

As above, the whole image, in the theme's image style.

◆ Image() [21/21]

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

As above, with the call site as the ID.

◆ 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() [1/2]

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.

◆ AddGhostIcon() [2/2]

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

As above, size in pixels: in a ghost window of that size, a small icon by the cursor, for example.

◆ 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.

◆ PersistLayoutPresets()

void tachyon::GUIApplication::PersistLayoutPresets ( std::string key,
LayoutPresets & presets )

Keeps the layouts the user saved and the file types' layouts; the app adds its built-in ones itself, before or after RestoreUIState.

◆ PersistThemeVariables()

void tachyon::GUIApplication::PersistThemeVariables ( std::string key)

Keeps each theme's variables, set with SetThemeVariable.

◆ 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,
const std::function< std::optional< ID >(std::string_view key)> & makePanel = {} )

Lays a document's panels out as saved, and gives them their own states back:

  • panels by type, else title; with several of one kind, the n-th in the saved tree is the n-th the document has
  • a panel the saved tree names that the document hasn't (a second of a kind, say) is made by makePanel, as for ApplyDockLayout; without it, it's left out
  • the document's panels 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.

◆ SaveDockLayout()

std::string tachyon::GUIApplication::SaveDockLayout ( const DockingLayout & layout) const

A layout's dock tree as text, panels by type, else title, as a LayoutPreset keeps it; empty when it has none.

Floating panels aren't in it.

◆ ApplyDockLayout()

bool tachyon::GUIApplication::ApplyDockLayout ( DockingLayout & layout,
std::string_view tree,
const std::function< std::optional< ID >(std::string_view key)> & makePanel = {} )

Lays a layout's panels out as tree (SaveDockLayout's text) says:

  • a panel it names that the layout hasn't is made by makePanel, given the panel's type, else title; it creates the panel in layout.panels and returns its ID, or nullopt to leave it out
  • with several of one kind in the tree, each is a panel of its own: the layout's own first, then ones makePanel makes
  • panels it doesn't name are closed, as closing their tabs does

False when the tree can't be read or has no panel left: the layout stays as it was. Call it outside the layout's Docking, e.g. before it in the frame.

◆ 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

Text and images to copy and paste (Get / Set, GetImage / SetImage); 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.

◆ 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 or Run's pace 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: