TachyonUI 1.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
Controls

Every control by family, and the types they take and return. More...

Topics

 Windows and layout
 Windows, horizontal and vertical groups, areas, scroll bars, caching, label and button groups.
 Text and images
 Text, labels, drag labels, selectable text and images.
 Buttons and toggles
 Buttons, command buttons, toggles, switches and checkboxes.
 Fields
 Text, search, autocomplete, numeric, vector and typed fields, dropdowns, lists and dictionaries.
 Sliders
 Sliders with and without a value field.
 Color and gradient fields
 Color and gradient fields with their picker popups.
 Lists and reorderable groups
 List views and drag-to-reorder groups.
 Tables, trees and grids
 Columns, sorting, selection and data sources for tables, tree views and grid views.
 Tabs, docking and toolbars
 Tab bars, dock nodes, dock layouts, documents, toolbars and the toolbar dock.
 Menus, tooltips and dialogs
 Menus, context menus, the menu and title bar, tooltips, message dialogs and toasts.
 Node view
 Nodes, pins and links for the node graph editor.
 Other controls
 Breadcrumb, status bar, command search and the settings panel.

Classes

class  tachyon::LabelBinding
 Links labels to the controls they describe during construction; owned by GUIStateManager. More...
struct  tachyon::ToastAction
 A text button on a toast; the first is drawn in the link color. More...
struct  tachyon::ToastDesc
 What a toast says (ShowToast). Change it later through FindToast. More...
struct  tachyon::BannerAction
 A banner's button or link, right-aligned after its message. More...
struct  tachyon::PlotSeries
 One set of values, such as a histogram's red channel. More...
struct  tachyon::PlotHandle
 A marker dragged along the x axis under the plot. More...
struct  tachyon::PlotEdit
 A change to the handles: where each was and is. More...
struct  tachyon::PlotData
 A plot: what it shows and how. More...
struct  tachyon::PlotViewState
 How one Plot shows a PlotData: the series picked, the part in view, and what the user is doing in it. More...
struct  tachyon::PlotView
 A plot shown in one place: what it shows and the one view of it together. More...
struct  tachyon::PlotRange
 A span of one axis. More...
struct  tachyon::TypeDimensions< T >
struct  tachyon::TypeDimensions< int2 >
struct  tachyon::TypeDimensions< int3 >
struct  tachyon::TypeDimensions< int4 >
struct  tachyon::TypeDimensions< uint2 >
struct  tachyon::TypeDimensions< uint3 >
struct  tachyon::TypeDimensions< uint4 >
struct  tachyon::TypeDimensions< short2 >
struct  tachyon::TypeDimensions< short3 >
struct  tachyon::TypeDimensions< short4 >
struct  tachyon::TypeDimensions< ushort2 >
struct  tachyon::TypeDimensions< ushort3 >
struct  tachyon::TypeDimensions< ushort4 >
struct  tachyon::TypeDimensions< byte2 >
struct  tachyon::TypeDimensions< byte3 >
struct  tachyon::TypeDimensions< byte4 >
struct  tachyon::TypeDimensions< float2 >
struct  tachyon::TypeDimensions< float3 >
struct  tachyon::TypeDimensions< float4 >
struct  tachyon::TypeDimensions< color4b >
struct  tachyon::TypeDimensions< color4f >
struct  tachyon::ViewportCamera
 A camera orbiting target, distance away. More...
struct  tachyon::ViewportTransform
 The selected object's place in the world. More...
struct  tachyon::ViewportEdit
 A gizmo's drag: the selection as it was and is. More...
struct  tachyon::ViewportRenderContext
 What the app's onRender gets each frame: the target's size and the camera's matrices, the projection to the clip space of the scene's API (ToClipSpace). More...
struct  tachyon::ViewportView
 A viewport: what it shows and how. Keep it from frame to frame, as a CurveView. More...
struct  tachyon::MultiSelectState
 Selected item IDs of a multi-select view; user-owned, keep it alive across frames. More...
struct  tachyon::CommandSearchState
 State of a CommandSearch box; user-owned, keep it alive across frames. More...
struct  tachyon::ItemDragDropConfig
 Drag & drop setup for item-based views (tree, list, grid): items drag a payload and accept drops of the same payloadType. More...
struct  tachyon::DoubleClickTracker
 Click-gesture tracker, owned per widget instance so instances (and tests) don't share it. More...
class  tachyon::ButtonGroupSubsystem
 Button/toggle groups: every item takes the group's item style (its :first-child and :last-child rules shape the ends), and a single-item group reverts to "solo", a plain button, in EndGroup. More...
struct  tachyon::ColorPickerState
 Persistent state of the color picker popup. More...
class  tachyon::ColorPickerSubsystem
 The color picker popup's state plus swatch ColorStyles keyed by swatch ID. More...
struct  tachyon::GradientEditLimits
 What the gradient editor lets a field's gradient have: a Gradient's 8 stops of 8-bit colors, or a GradientF's 64 of HDR ones, each blending to the next its own way. More...
struct  tachyon::GradientEditorState
 Gradient editor popup state: edits a working copy, written back each frame it's open. More...
struct  tachyon::GradientFieldSwatch
 What a GradientField's swatch keeps besides its style: the gradient it was drawn from, so an unchanged one isn't sampled again, and what a click opens the editor with. More...
class  tachyon::GradientEditorSubsystem
 The gradient editor's state plus swatch styles keyed by swatch ID, with the same lifecycle as ColorPickerSubsystem's. More...
class  tachyon::LabelGroupSubsystem
 Labels and DragLabels in a label group share a width; dragging any label's right edge resizes them all. More...
struct  tachyon::ReorderableDragState
 Persistent drag state; one drag at a time application-wide. More...
struct  tachyon::ReorderableConstructionState
 Construction state of the current reorderable group. More...
struct  tachyon::ReorderableFocusFollow
 After a keyboard move: where the focus was in the moved item, to put it back there next frame, in the item's new slot, unless its ID moved with the item. More...
class  tachyon::ReorderableSubsystem
 Drag and construction state of drag-to-reorder groups, used by the Begin/EndReorderableGroup and Begin/EndReorderableItem widgets. More...
class  tachyon::RenameSubsystem
 In-place rename of a tree / list / grid row (F2, Ctrl+Shift+Click or a slow re-click); the target row emits a text field instead of its label. More...
class  tachyon::SliderFieldTrackSubsystem
 Slider track widths written by the sliders' custom draws and read next frame (keyboard step sizes, drag mapping). More...
struct  tachyon::DockTabDragInfo
 Set when a dock tab drag starts, so any target leaf can emit a phantom tab during construction. More...
struct  tachyon::DockDropZoneAnim
 The drop-zone overlay shown while a dock tab is dragged; it slides between zones. More...
class  tachyon::DockTabDragSubsystem
 Dock tab drag state: the dragged tab and the drop-zone overlay animation. More...
class  tachyon::ToolbarWindowDragSubsystem
 A floating toolbar window dragged by its thumb; one drag at a time. More...
class  tachyon::MenuRectsSubsystem
 Last frame's screen rects of menu triggers and popups, written by AddPostLayout callbacks. More...
struct  tachyon::NoSwatchData
class  tachyon::SwatchStyles< Data >
 Swatches' color styles, by swatch ID: each kept while it's claimed every frame, and destroyed the frame after one goes unclaimed. More...
class  tachyon::UICacheManager
 Retained-render cache for BeginCached/EndCached scopes. More...

Typedefs

using tachyon::ToastID = uint32_t
 A toast shown by ShowToast; 0 is none.
using tachyon::PlotViewRef = BasicViewRef<PlotData, PlotViewState>
 A plot and one view of it, as Plot and the helpers take them.
using tachyon::ConstPlotViewRef = BasicViewRef<const PlotData, const PlotViewState>

Enumerations

enum class  tachyon::Severity : uint8_t { tachyon::Severity::Info , tachyon::Severity::Success , tachyon::Severity::Warning , tachyon::Severity::Error }
 How serious a notification is: its icon and color. More...
enum class  tachyon::BannerActionKind : uint8_t { tachyon::BannerActionKind::Primary , tachyon::BannerActionKind::Secondary , tachyon::BannerActionKind::Link }
 How a banner's action is drawn. More...
enum class  tachyon::PlotSeriesKind : uint8_t { tachyon::PlotSeriesKind::Line , tachyon::PlotSeriesKind::Bars , tachyon::PlotSeriesKind::Area }
 How a series is drawn. More...
enum class  tachyon::PlotScale : uint8_t { tachyon::PlotScale::Linear , tachyon::PlotScale::Log }
 How the y axis maps values. More...
enum class  tachyon::ViewportTool : uint8_t { tachyon::ViewportTool::Select , tachyon::ViewportTool::Move , tachyon::ViewportTool::Rotate , tachyon::ViewportTool::Scale }
 What a drag on the view does to the selected object. More...
enum class  tachyon::GizmoPart : uint8_t {
  tachyon::GizmoPart::None , tachyon::GizmoPart::X , tachyon::GizmoPart::Y , tachyon::GizmoPart::Z ,
  tachyon::GizmoPart::XY , tachyon::GizmoPart::YZ , tachyon::GizmoPart::XZ , tachyon::GizmoPart::Center
}
 A part of the gizmo. More...
enum class  tachyon::TreeDropPosition : uint8_t {
  tachyon::TreeDropPosition::None = 0 , tachyon::TreeDropPosition::Before , tachyon::TreeDropPosition::Inside , tachyon::TreeDropPosition::InsideLast ,
  tachyon::TreeDropPosition::After
}
 Where a tree reorder drop lands relative to the target row. More...
enum class  tachyon::ReorderDirection : uint8_t { tachyon::ReorderDirection::Horizontal , tachyon::ReorderDirection::Vertical }
 Main axis of a reorderable group. More...

Functions

std::vector< float > tachyon::HistogramBins (std::span< const float > samples, int bins, float min=0.0f, float max=1.0f)
 samples counted into bins equal bins over [min, max]; a sample at max goes in the last one, and those outside or not finite in none.
void tachyon::ApplyPlotEdit (PlotData &data, const PlotEdit &edit, bool undo=false)
 Does (or with undo, undoes) edit on the handles.
PlotEdit tachyon::MovePlotHandleEdit (const PlotData &data, int handle, float x)
 Moves handle handle to x, kept between its neighbours and inside the x range; the edit, or an empty one when it doesn't move.
void tachyon::CommitPlotEdit (PlotViewRef view, const PlotEdit &edit)
 Applies edit and hands it to view.data.onEdit; does nothing for an empty one.
PlotRange tachyon::PlotShownX (ConstPlotViewRef view)
 The part of the x range in view: all of it until the plot is zoomed, then the part zoomed to, kept inside [xMin, xMax].
PlotRange tachyon::PlotShownY (ConstPlotViewRef view)
 The y range drawn: yMax from the values in view with fitY, then mapped by yScale.
float tachyon::PlotScaleY (const PlotData &data, float value)
 value along the drawn y axis, by the view's scale.
Ray tachyon::ViewportRay (const ViewportCamera &camera, float2 pixel, float2 size)
 The ray from the camera through pixel (from the view's top left) of a view size pixels.
bool tachyon::ViewportProject (const ViewportCamera &camera, float2 size, float3 point, float2 &pixel)
 Where point shows in the view, from its top left; false when it's behind the camera.

Viewport helpers

enum  tachyon::FlyKey : uint8_t {
  tachyon::FlyForward = 1 , tachyon::FlyBack = 2 , tachyon::FlyLeft = 4 , tachyon::FlyRight = 8 ,
  tachyon::FlyDown = 16 , tachyon::FlyUp = 32
}
 The fly keys' bits in ViewportView::flyKeys. More...
constexpr float tachyon::kGizmoPixels = 90.0f
 The gizmo's arrows, rings and handles are this many pixels long.
GizmoPart tachyon::HitGizmo (const ViewportView &view, float2 pixel, float2 size)
 The part of view's gizmo under pixel in a view size pixels, by its tool; None without a selection or with Select.
ViewportTransform tachyon::DragGizmo (ViewportTool tool, GizmoPart part, const ViewportTransform &before, const ViewportCamera &camera, float2 size, float2 from, float2 to)
 The selection a drag of part from from to to (view pixels) makes of before.
void tachyon::OrbitCamera (ViewportCamera &camera, float2 delta)
 Turns the camera round its target by a drag of delta pixels.
void tachyon::LookCamera (ViewportCamera &camera, float2 delta)
 Turns the camera where it stands (looks round) by a drag of delta pixels.
void tachyon::PanCamera (ViewportCamera &camera, float2 delta, float heightPixels)
 Slides the camera and its target so what was under the pointer follows a drag of delta pixels, in a view heightPixels high.
void tachyon::DollyCamera (ViewportCamera &camera, float factor)
 Moves the camera toward its target by factor (above 1: closer).
void tachyon::AlignCamera (ViewportCamera &camera, int axis, bool fromNegative)
 Looks along axis (0 x, 1 y, 2 z) toward its negative end, or its positive with fromBelow.
void tachyon::FrameSelection (ViewportView &view)
 Centers the selection, near enough to see all of it.
void tachyon::FlyCamera (ViewportView &view, float seconds)
 Moves the camera by the fly keys held (ViewportView::flyKeys) for seconds: forward, back and sideways along its view, down and up along the world's y.
void tachyon::ApplyViewportEdit (ViewportView &view, const ViewportEdit &edit, bool undo=false)
 Does (or with undo, undoes) edit on the selection.
void tachyon::CommitViewportEdit (ViewportView &view, const ViewportEdit &edit)
 Applies edit and hands it to view.onEdit; does nothing for an empty one.

Detailed Description

Every control by family, and the types they take and return.

Controls are member functions of tachyon::GUIApplication. Guide: Controls.

Typedef Documentation

◆ ToastID

using tachyon::ToastID = uint32_t

#include <gui_controls/gui_notification_types.h>

A toast shown by ShowToast; 0 is none.

◆ PlotViewRef

#include <gui_controls/gui_plot_types.h>

A plot and one view of it, as Plot and the helpers take them.

◆ ConstPlotViewRef

Enumeration Type Documentation

◆ Severity

enum class tachyon::Severity : uint8_t
strong

#include <gui_controls/gui_notification_types.h>

How serious a notification is: its icon and color.

Enumerator
Info 
Success 
Warning 
Error 

◆ BannerActionKind

enum class tachyon::BannerActionKind : uint8_t
strong

#include <gui_controls/gui_notification_types.h>

How a banner's action is drawn.

Enumerator
Primary 
Secondary 
Link 

◆ PlotSeriesKind

enum class tachyon::PlotSeriesKind : uint8_t
strong

#include <gui_controls/gui_plot_types.h>

How a series is drawn.

Enumerator
Line 

through the middle of each value's slot

Bars 

one bar per value, from zero

Area 

filled from zero up to the line

◆ PlotScale

enum class tachyon::PlotScale : uint8_t
strong

#include <gui_controls/gui_plot_types.h>

How the y axis maps values.

Enumerator
Linear 
Log 

log(1 + value): small counts stay visible beside large ones

◆ ViewportTool

enum class tachyon::ViewportTool : uint8_t
strong

#include <gui_controls/gui_viewport_types.h>

What a drag on the view does to the selected object.

Enumerator
Select 

nothing: a click picks

Move 
Rotate 
Scale 

◆ GizmoPart

enum class tachyon::GizmoPart : uint8_t
strong

#include <gui_controls/gui_viewport_types.h>

A part of the gizmo.

Enumerator
None 
X 
Y 
Z 

an arrow, a ring or a scale handle

XY 
YZ 
XZ 

a plane square (move)

Center 

the middle: move in the view's plane, or scale all three ways

◆ FlyKey

enum tachyon::FlyKey : uint8_t

#include <gui_controls/gui_viewport_types.h>

The fly keys' bits in ViewportView::flyKeys.

Enumerator
FlyForward 
FlyBack 
FlyLeft 
FlyRight 
FlyDown 
FlyUp 

◆ TreeDropPosition

enum class tachyon::TreeDropPosition : uint8_t
strong

#include <gui_controls/gui_widget_state_types.h>

Where a tree reorder drop lands relative to the target row.

Enumerator
None 
Before 

previous sibling of the target (line at the row top)

Inside 

first child of an open target branch (indented line at the row bottom)

InsideLast 

last child of the target (rectangle around the row)

After 

next sibling of the target (line at the row bottom)

◆ ReorderDirection

enum class tachyon::ReorderDirection : uint8_t
strong

#include <gui_controls/subsystems/gui_reorderable_subsystem.h>

Main axis of a reorderable group.

Enumerator
Horizontal 
Vertical 

Function Documentation

◆ HistogramBins()

std::vector< float > tachyon::HistogramBins ( std::span< const float > samples,
int bins,
float min = 0.0f,
float max = 1.0f )

#include <gui_controls/gui_plot_types.h>

samples counted into bins equal bins over [min, max]; a sample at max goes in the last one, and those outside or not finite in none.

◆ ApplyPlotEdit()

void tachyon::ApplyPlotEdit ( PlotData & data,
const PlotEdit & edit,
bool undo = false )

#include <gui_controls/gui_plot_types.h>

Does (or with undo, undoes) edit on the handles.

◆ MovePlotHandleEdit()

PlotEdit tachyon::MovePlotHandleEdit ( const PlotData & data,
int handle,
float x )

#include <gui_controls/gui_plot_types.h>

Moves handle handle to x, kept between its neighbours and inside the x range; the edit, or an empty one when it doesn't move.

◆ CommitPlotEdit()

void tachyon::CommitPlotEdit ( PlotViewRef view,
const PlotEdit & edit )

#include <gui_controls/gui_plot_types.h>

Applies edit and hands it to view.data.onEdit; does nothing for an empty one.

◆ PlotShownX()

PlotRange tachyon::PlotShownX ( ConstPlotViewRef view)

#include <gui_controls/gui_plot_types.h>

The part of the x range in view: all of it until the plot is zoomed, then the part zoomed to, kept inside [xMin, xMax].

◆ PlotShownY()

PlotRange tachyon::PlotShownY ( ConstPlotViewRef view)

#include <gui_controls/gui_plot_types.h>

The y range drawn: yMax from the values in view with fitY, then mapped by yScale.

◆ PlotScaleY()

float tachyon::PlotScaleY ( const PlotData & data,
float value )

#include <gui_controls/gui_plot_types.h>

value along the drawn y axis, by the view's scale.

◆ ViewportRay()

Ray tachyon::ViewportRay ( const ViewportCamera & camera,
float2 pixel,
float2 size )

#include <gui_controls/gui_viewport_types.h>

The ray from the camera through pixel (from the view's top left) of a view size pixels.

◆ ViewportProject()

bool tachyon::ViewportProject ( const ViewportCamera & camera,
float2 size,
float3 point,
float2 & pixel )

#include <gui_controls/gui_viewport_types.h>

Where point shows in the view, from its top left; false when it's behind the camera.

◆ HitGizmo()

GizmoPart tachyon::HitGizmo ( const ViewportView & view,
float2 pixel,
float2 size )

#include <gui_controls/gui_viewport_types.h>

The part of view's gizmo under pixel in a view size pixels, by its tool; None without a selection or with Select.

◆ DragGizmo()

ViewportTransform tachyon::DragGizmo ( ViewportTool tool,
GizmoPart part,
const ViewportTransform & before,
const ViewportCamera & camera,
float2 size,
float2 from,
float2 to )

#include <gui_controls/gui_viewport_types.h>

The selection a drag of part from from to to (view pixels) makes of before.

◆ OrbitCamera()

void tachyon::OrbitCamera ( ViewportCamera & camera,
float2 delta )

#include <gui_controls/gui_viewport_types.h>

Turns the camera round its target by a drag of delta pixels.

◆ LookCamera()

void tachyon::LookCamera ( ViewportCamera & camera,
float2 delta )

#include <gui_controls/gui_viewport_types.h>

Turns the camera where it stands (looks round) by a drag of delta pixels.

◆ PanCamera()

void tachyon::PanCamera ( ViewportCamera & camera,
float2 delta,
float heightPixels )

#include <gui_controls/gui_viewport_types.h>

Slides the camera and its target so what was under the pointer follows a drag of delta pixels, in a view heightPixels high.

◆ DollyCamera()

void tachyon::DollyCamera ( ViewportCamera & camera,
float factor )

#include <gui_controls/gui_viewport_types.h>

Moves the camera toward its target by factor (above 1: closer).

◆ AlignCamera()

void tachyon::AlignCamera ( ViewportCamera & camera,
int axis,
bool fromNegative )

#include <gui_controls/gui_viewport_types.h>

Looks along axis (0 x, 1 y, 2 z) toward its negative end, or its positive with fromBelow.

◆ FrameSelection()

void tachyon::FrameSelection ( ViewportView & view)

#include <gui_controls/gui_viewport_types.h>

Centers the selection, near enough to see all of it.

◆ FlyCamera()

void tachyon::FlyCamera ( ViewportView & view,
float seconds )

#include <gui_controls/gui_viewport_types.h>

Moves the camera by the fly keys held (ViewportView::flyKeys) for seconds: forward, back and sideways along its view, down and up along the world's y.

◆ ApplyViewportEdit()

void tachyon::ApplyViewportEdit ( ViewportView & view,
const ViewportEdit & edit,
bool undo = false )

#include <gui_controls/gui_viewport_types.h>

Does (or with undo, undoes) edit on the selection.

◆ CommitViewportEdit()

void tachyon::CommitViewportEdit ( ViewportView & view,
const ViewportEdit & edit )

#include <gui_controls/gui_viewport_types.h>

Applies edit and hands it to view.onEdit; does nothing for an empty one.

Variable Documentation

◆ kGizmoPixels

float tachyon::kGizmoPixels = 90.0f
constexpr

#include <gui_controls/gui_viewport_types.h>

The gizmo's arrows, rings and handles are this many pixels long.