UI group


Enums

UI::WindowFlags

Window flags that can be passed to UI::Begin().

UI::WindowFlags::NoTitleBar = 1
UI::WindowFlags::NoResize = 2
UI::WindowFlags::NoMove = 4
UI::WindowFlags::NoScrollbar = 8
UI::WindowFlags::NoScrollWithMouse = 16
UI::WindowFlags::NoCollapse = 32
UI::WindowFlags::AlwaysAutoResize = 64
UI::WindowFlags::NoSavedSettings = 256
UI::WindowFlags::MenuBar = 1024
UI::WindowFlags::HorizontalScrollbar = 2048
UI::WindowFlags::NoFocusOnAppearing = 4096
UI::WindowFlags::NoBringToFrontOnFocus = 8192
UI::WindowFlags::AlwaysVerticalScrollbar = 16384
UI::WindowFlags::AlwaysHorizontalScrollbar = 32768
UI::WindowFlags::AlwaysUseWindowPadding = 65536
UI::WindowFlags::NoNavInputs = 262144
UI::WindowFlags::NoNavFocus = 524288
UI::WindowFlags::UnsavedDocument = 1048576
UI::WindowFlags::NoDocking = 2097152
UI::WindowFlags::NoNav = 786432
UI::WindowFlags::NoDecoration = 43
UI::WindowFlags::NoInputs = 786944

UI::Col

Color variables that can be passed to UI::PushStyleColor().

UI::Col::Text = 0
UI::Col::TextDisabled = 1
UI::Col::WindowBg = 2
UI::Col::ChildBg = 3
UI::Col::PopupBg = 4
UI::Col::Border = 5
UI::Col::BorderShadow = 6
UI::Col::FrameBg = 7
UI::Col::FrameBgHovered = 8
UI::Col::FrameBgActive = 9
UI::Col::TitleBg = 10
UI::Col::TitleBgActive = 11
UI::Col::TitleBgCollapsed = 12
UI::Col::MenuBarBg = 13
UI::Col::ScrollbarBg = 14
UI::Col::ScrollbarGrab = 15
UI::Col::ScrollbarGrabHovered = 16
UI::Col::ScrollbarGrabActive = 17
UI::Col::CheckMark = 18
UI::Col::SliderGrab = 19
UI::Col::SliderGrabActive = 20
UI::Col::Button = 21
UI::Col::ButtonHovered = 22
UI::Col::ButtonActive = 23
UI::Col::Header = 24
UI::Col::HeaderHovered = 25
UI::Col::HeaderActive = 26
UI::Col::Separator = 27
UI::Col::SeparatorHovered = 28
UI::Col::SeparatorActive = 29
UI::Col::ResizeGrip = 30
UI::Col::ResizeGripHovered = 31
UI::Col::ResizeGripActive = 32
UI::Col::Tab = 33
UI::Col::TabHovered = 34
UI::Col::TabActive = 35
UI::Col::TabUnfocused = 36
UI::Col::TabUnfocusedActive = 37
UI::Col::DockingPreview = 38
UI::Col::DockingEmptyBg = 39
UI::Col::PlotLines = 40
UI::Col::PlotLinesHovered = 41
UI::Col::PlotHistogram = 42
UI::Col::PlotHistogramHovered = 43
UI::Col::TableHeaderBg = 44
UI::Col::TableBorderStrong = 45
UI::Col::TableBorderLight = 46
UI::Col::TableRowBg = 47
UI::Col::TableRowBgAlt = 48
UI::Col::TextSelectedBg = 49
UI::Col::DragDropTarget = 50
UI::Col::NavHighlight = 51
UI::Col::NavWindowingHighlight = 52
UI::Col::NavWindowingDimBg = 53
UI::Col::ModalWindowDimBg = 54

UI::StyleVar

Style variables that can be passed to UI::PushStyleVar().

UI::StyleVar::Alpha = 0
UI::StyleVar::WindowPadding = 1
UI::StyleVar::WindowRounding = 2
UI::StyleVar::WindowBorderSize = 3
UI::StyleVar::WindowMinSize = 4
UI::StyleVar::WindowTitleAlign = 5
UI::StyleVar::ChildRounding = 6
UI::StyleVar::ChildBorderSize = 7
UI::StyleVar::PopupRounding = 8
UI::StyleVar::PopupBorderSize = 9
UI::StyleVar::FramePadding = 10
UI::StyleVar::FrameRounding = 11
UI::StyleVar::FrameBorderSize = 12
UI::StyleVar::ItemSpacing = 13
UI::StyleVar::ItemInnerSpacing = 14
UI::StyleVar::IndentSpacing = 15
UI::StyleVar::CellPadding = 16
UI::StyleVar::ScrollbarSize = 17
UI::StyleVar::ScrollbarRounding = 18
UI::StyleVar::GrabMinSize = 19
UI::StyleVar::GrabRounding = 20
UI::StyleVar::TabRounding = 21
UI::StyleVar::ButtonTextAlign = 22
UI::StyleVar::SelectableTextAlign = 23

UI::ComboFlags

Combo flags that can be passed to UI::BeginCombo().

UI::ComboFlags::None = 0
UI::ComboFlags::PopupAlignLeft = 1
UI::ComboFlags::HeightSmall = 2
UI::ComboFlags::HeightRegular = 4
UI::ComboFlags::HeightLarge = 8
UI::ComboFlags::HeightLargest = 16
UI::ComboFlags::NoArrowButton = 32
UI::ComboFlags::NoPreview = 64

UI::SelectableFlags

Selectable flags that can be passed to UI::Selectable().

UI::SelectableFlags::None = 0
UI::SelectableFlags::DontClosePopups = 1
UI::SelectableFlags::SpanAllColumns = 2
UI::SelectableFlags::AllowDoubleClick = 4

UI::InputTextFlags

Flags that can be passed to UI::InputText().

UI::InputTextFlags::None = 0
UI::InputTextFlags::CharsDecimal = 1
UI::InputTextFlags::CharsHexadecimal = 2
UI::InputTextFlags::CharsUppercase = 4
UI::InputTextFlags::CharsNoBlank = 8
UI::InputTextFlags::AutoSelectAll = 16
UI::InputTextFlags::EnterReturnsTrue = 32
UI::InputTextFlags::AllowTabInput = 1024
UI::InputTextFlags::CtrlEnterForNewLine = 2048
UI::InputTextFlags::NoHorizontalScroll = 4096
UI::InputTextFlags::AlwaysOverwrite = 8192
UI::InputTextFlags::ReadOnly = 16384
UI::InputTextFlags::Password = 32768
UI::InputTextFlags::NoUndoRedo = 65536
UI::InputTextFlags::CharsScientific = 131072

UI::TableFlags

Flags that can be passed to UI::BeginTable().

UI::TableFlags::None = 0
UI::TableFlags::Resizable = 1
UI::TableFlags::Reorderable = 2
UI::TableFlags::Hideable = 4
UI::TableFlags::Sortable = 8
UI::TableFlags::NoSavedSettings = 16
UI::TableFlags::ContextMenuInBody = 32
UI::TableFlags::RowBg = 64
UI::TableFlags::BordersInnerH = 128
UI::TableFlags::BordersOuterH = 256
UI::TableFlags::BordersInnerV = 512
UI::TableFlags::BordersOuterV = 1024
UI::TableFlags::BordersH = 384
UI::TableFlags::BordersV = 1536
UI::TableFlags::BordersInner = 640
UI::TableFlags::BordersOuter = 1280
UI::TableFlags::Borders = 1920
UI::TableFlags::NoBordersInBody = 2048
UI::TableFlags::NoBordersInBodyUntilResize = 4096
UI::TableFlags::SizingFixedFit = 8192
UI::TableFlags::SizingFixedSame = 16384
UI::TableFlags::SizingStretchProp = 24576
UI::TableFlags::SizingStretchSame = 32768
UI::TableFlags::NoHostExtendX = 65536
UI::TableFlags::NoHostExtendY = 131072
UI::TableFlags::NoKeepColumnsVisible = 262144
UI::TableFlags::PreciseWidths = 524288
UI::TableFlags::NoClip = 1048576
UI::TableFlags::PadOuterX = 2097152
UI::TableFlags::NoPadOuterX = 4194304
UI::TableFlags::NoPadInnerX = 8388608
UI::TableFlags::ScrollX = 16777216
UI::TableFlags::ScrollY = 33554432
UI::TableFlags::SortMulti = 67108864
UI::TableFlags::SortTristate = 134217728

UI::TableRowFlags

Flags that can be passed to UI::TableNextRow().

UI::TableRowFlags::None = 0
UI::TableRowFlags::Headers = 1

UI::TableColumnFlags

Flags that can be passed to UI::TableSetupColumn().

UI::TableColumnFlags::None = 0
UI::TableColumnFlags::DefaultHide = 1
UI::TableColumnFlags::DefaultSort = 2
UI::TableColumnFlags::WidthStretch = 4
UI::TableColumnFlags::WidthFixed = 8
UI::TableColumnFlags::NoResize = 16
UI::TableColumnFlags::NoReorder = 32
UI::TableColumnFlags::NoHide = 64
UI::TableColumnFlags::NoClip = 128
UI::TableColumnFlags::NoSort = 256
UI::TableColumnFlags::NoSortAscending = 512
UI::TableColumnFlags::NoSortDescending = 1024
UI::TableColumnFlags::NoHeaderWidth = 2048
UI::TableColumnFlags::PreferSortAscending = 4096
UI::TableColumnFlags::PreferSortDescending = 8192
UI::TableColumnFlags::IndentEnable = 16384
UI::TableColumnFlags::IndentDisable = 32768
UI::TableColumnFlags::IsEnabled = 1048576
UI::TableColumnFlags::IsVisible = 2097152
UI::TableColumnFlags::IsSorted = 4194304
UI::TableColumnFlags::IsHovered = 8388608

UI::TabBarFlags

Flags that can be passed to UI::BeginTab().

UI::TabBarFlags::None = 0
UI::TabBarFlags::Reorderable = 1
UI::TabBarFlags::AutoSelectNewTabs = 2
UI::TabBarFlags::TabListPopupButton = 4
UI::TabBarFlags::NoCloseWithMiddleMouseButton = 8
UI::TabBarFlags::NoTabListScrollingButtons = 16
UI::TabBarFlags::NoTooltip = 32
UI::TabBarFlags::FittingPolicyResizeDown = 64
UI::TabBarFlags::FittingPolicyScroll = 128

UI::TabItemFlags

Flags that can be passed to UI::BeginTabItem().

UI::TabItemFlags::None = 0
UI::TabItemFlags::UnsavedDocument = 1
UI::TabItemFlags::SetSelected = 2
UI::TabItemFlags::NoCloseWithMiddleMouseButton = 4
UI::TabItemFlags::NoPushId = 8
UI::TabItemFlags::NoTooltip = 16
UI::TabItemFlags::NoReorder = 32
UI::TabItemFlags::Leading = 64
UI::TabItemFlags::Trailing = 128

UI::SortDirection

UI::SortDirection::None = 0
UI::SortDirection::Ascending = 1
UI::SortDirection::Descending = 2

UI::Cond

Conditions for certain UI set operations.

UI::Cond::None = 0
UI::Cond::Always = 1
UI::Cond::Once = 2
UI::Cond::FirstUseEver = 4
UI::Cond::Appearing = 8
Classes

UI::ListClipper Helper class to manually clip large lists of items.

UI::TableColumnSortSpecs Sorting specification for a single column of a table.

UI::TableSortSpecs Sorting information for tables. Do not keep this object around! Use the Dirty property to see if the sorting changed, then set it to false when you've sorted your list.

Global functions

bool UI::Begin(const string&in title, int flags = UI :: WindowFlags :: NoCollapse) Begins an imgui window.

bool UI::Begin(const string&in title, bool&out open, int flags = UI :: WindowFlags :: NoCollapse) Begins an imgui window.

void UI::End() Ends an imgui window.

void UI::BeginGroup() Begins a new group.

void UI::EndGroup() Ends a group.

void UI::PushStyleColor(UI::Col idx, const vec4&in col) Temporarily pushes a color change for the next widgets. You must call PopStyleColor() sometime after!

void UI::PopStyleColor(int count = 1) Pops one or more temporary color changes.

void UI::PushStyleVar(UI::StyleVar var, float value) Temporarily pushes a style change for the next widgets. You must call PopStyleVar() sometime after!

void UI::PushStyleVar(UI::StyleVar var, const vec2&in value) Temporarily pushes a style change for the next widgets. You must call PopStyleVar() sometime after!

void UI::PopStyleVar(int count = 1) Pops one or more temporary style changes.

float UI::GetScrollX() Get scrolling amount, from 0 to GetScrollMaxX().

float UI::GetScrollY() Get scrolling amount, from 0 to GetScrollMaxY().

void UI::SetScrollX(float x) Set scrolling amount, from 0 to GetScrollMaxX().

void UI::SetScrollY(float y) Set scrolling amount, from 0 to GetScrollMaxY().

float UI::GetScrollMaxX() Get maximum horizontal scrolling amount.

float UI::GetScrollMaxY() Get maximum vertical scrolling amount.

void UI::SetScrollHereX(float center_x_ratio = 0.5f) Adjust scrolling amount to make current cursor position visible. center_x_ratio=0.0: left, 0.5: center, 1.0: right. When using to make a "default / current item" visible, consider using SetItemDefaultFocus() instead.

void UI::SetScrollHereY(float center_y_ratio = 0.5f) Adjust scrolling amount to make current cursor position visible. center_y_ratio=0.0: top, 0.5: center, 1.0: bottom. When using to make a "default / current item" visible, consider using SetItemDefaultFocus() instead.

void UI::SetScrollFromPosX(float local_x, float center_x_ratio = 0.5f) Adjust scrolling amount to make given position visible. Generally GetCursorStartPos() + offset to compute a valid position.

void UI::SetScrollFromPosY(float local_y, float center_y_ratio = 0.5f) Adjust scrolling amount to make given position visible. Generally GetCursorStartPos() + offset to compute a valid position.

void UI::SetNextWindowSize(int w, int h, UI::Cond cond = UI :: Cond :: Appearing) Sets the size for the next window created with UI::Begin().

void UI::SetNextWindowPos(int x, int y, UI::Cond cond = UI :: Cond :: Appearing, float pivotx = 0.0f, float pivoty = 0.0f) Sets the position for the next window created with UI::Begin(). Pivot floats can be used to align the window on the given point.

void UI::SetNextWindowContentSize(int w, int h = 0) Sets the size for the next window contents. Set height to 0 to only set width.

void UI::SetNextItemWidth(float w) Sets the width of the next item.

void UI::PushID(const ?&in) Pushes an ID to the stack.

void UI::PushID(const string&in id) Pushes an ID to the stack.

void UI::PopID() Pops an ID from the stack.

void UI::PushFont(Resources::Font@ font) Pushes a font to the stack.

void UI::PopFont() Pops a font from the stack.

void UI::SameLine() Marks the next control to be drawn on the same line as the last one.

void UI::NewLine() Marks the next control to be drawn on the next line rather than the current line.

void UI::Separator() Separator line.

bool UI::Button(const string&in label) Clickable button. Returns true if it was clicked.

void UI::Text(const string&in text) Simple text label.

void UI::TextDisabled(const string&in text) Simple text label, but in its disabled color.

void UI::LabelText(const string&in label, const string&in text) Text label with a value.

void UI::PlotLines(const string&in label, const float[]&in values, int offset = 0, float height = 0.0f) Line graph.

bool UI::Checkbox(const string&in label, bool value) Checkbox. For value, pass the current value. The return value is the new value.

bool UI::BeginMenuBar() Begins an imgui menu bar.

void UI::EndMenuBar() Ends an imgui menu bar.

bool UI::BeginMenu(const string&in label, bool enabled = true) Begins an imgui menu.

void UI::EndMenu() Ends an imgui menu.

bool UI::MenuItem(const string&in label, const string&in shortcut = "", bool selected = false, bool enabled = true) Clickable menu item. Returns true when clicked.

bool UI::IsWindowAppearing() Returns true if the previous window is just now appearing.

bool UI::TreeNode(const string&in text) Node in a tree list. Returns true if opened.

void UI::TreePop() End of the previously tree node. Must only be called if TreeNode() returned true.

void UI::TreeAdvanceToLabelPos() Advance the cursor position to the normal label position for tree nodes.

bool UI::CollapsingHeader(const string&in label) Collapsable header. Returns true if open.

void UI::Columns(int count, const string&in id = "", bool border = true) Begins a table layout. Call this with count set to 1 to reset to normal.

void UI::NextColumn() Goes to the next column.

bool UI::IsItemHovered() Returns true if the mouse is hovering the previous control.

void UI::BeginTooltip() Begins a tooltip dialog.

void UI::EndTooltip() Ends a tooltip dialog.

bool UI::BeginPopupContextItem(const string&in id) Begins a popup context item.

void UI::EndPopup() Ends a popup.

bool UI::BeginCombo(const string&in label, const string&in current, int flags = UI :: ComboFlags :: None) Begins a combo box.

bool UI::Selectable(const string&in label, bool selected, int flags = UI :: SelectableFlags :: None) Represents a selectable item. Could be inside of a combo box.

void UI::SetItemDefaultFocus() Puts default focus on the last added item.

void UI::EndCombo() Ends a combo box.

string UI::InputText(const string&in label, string str, int flags = UI :: InputTextFlags :: None) Input text. Returns the new value.

string UI::InputText(const string&in label, string str, bool&out changed, int flags = UI :: InputTextFlags :: None) Input text. Returns the new value as well as the changed boolean.

string UI::InputTextMultiline(const string&in label, string str, const vec2&in size = vec2 ( 0 , 0 ), UI::InputTextFlags flags = UI :: InputTextFlags :: None) Input text in a multiline box. Returns the new value.

string UI::InputTextMultiline(const string&in label, string str, bool&out changed, const vec2&in size = vec2 ( 0 , 0 ), UI::InputTextFlags flags = UI :: InputTextFlags :: None) Input text in a multiline box. Returns the new value as well as the changed boolean.

void UI::SetKeyboardFocusHere(int offset = 0) Sets the keyboard focus on the next widget. Use positive offsets to access sub components of a multiple component widget. Use -1 to access previous widget.

int UI::InputInt(const string&in label, int num, int step = 1) Input integer. Returns the new value.

float UI::InputFloat(const string&in label, float num, float step = 1.0f) Input float. Returns the new value.

int UI::SliderInt(const string&in label, int num, int min, int max) Slider for integers. Returns the new value.

float UI::SliderFloat(const string&in label, float num, float min, float max) Slider for floats. Returns the new value.

int UI::VSliderInt(const string&in label, const vec2&in size, int num, int min, int max, const string&in format = "%d") Vertical slider for integers. Returns the new value.

float UI::VSliderFloat(const string&in label, const vec2&in size, float num, float min, float max, const string&in format = "%.3f") Vertical slider for floats. Returns the new value.

vec3 UI::InputColor3(const string&in label, vec3 color) Input color. Returns the new value.

void UI::Image(Resources::Texture&inout texture) An image.

void UI::Image(Resources::Texture&inout texture, const vec2&in size) An image scaled to a specific size.

bool UI::BeginChild(const string&in id, const vec2&in size = vec2 ( )) Begins a self-contained indepedendent scrolling container.

void UI::EndChild() Ends a child container.

void UI::BeginTabBar(const string&in id, int flags = UI :: TabBarFlags :: None) Begins a multi-tab container.

bool UI::BeginTabItem(const string&in label, int flags = UI :: TabItemFlags :: None) Begins a tab item within a multi-tab container.

bool UI::BeginTabItem(const string&in label, bool&out open, int flags = UI :: TabItemFlags :: None) Begins a tab item within a multi-tab container.

void UI::EndTabItem() Ends a tab item within a multi-tab container.

void UI::EndTabBar() Ends a multi-tab container.

bool UI::BeginTable(const string&in id, int columns, int flags = UI :: TableFlags :: None, const vec2&in outer_size = vec2 ( ), float inner_width = 0.0f) Begins a table. Only call EndTable() if BeginTable() returns true.

void UI::EndTable() Ends a table.

void UI::TableNextRow(int flags = UI :: TableRowFlags :: None, float min_height = 0.0f) Append into the first cell of a new row in a table.

bool UI::TableNextColumn() Append into the next column (or first column of new row) of a table. Returns true if visible.

bool UI::TableSetColumnIndex(int index) Append into a specified column of a table. Returns true if visible.

void UI::TableSetupColumn(const string&in label, int flags = UI :: TableColumnFlags :: None, float init_width_or_weight = 0.0f, uint user_id = 0) Sets up a column within a table with a label, flags, and initial size.

void UI::TableSetupScrollFreeze(int cols, int rows) Lock columns and rows in a table so they stay visible when scrolled.

void UI::TableHeadersRow() Submit all table header cells based on data provided to TableSetupColumn.

void UI::TableHeader(const string&in label) Submit one header cell manually. (Prefer TableHeadersRow!)

UI::TableSortSpecs@ UI::TableGetSortSpecs() Get latest sort specs for the table. Returns null when not sorting.

vec2 UI::GetCursorPos() Gets the current position of the UI cursor.

void UI::SetCursorPos(const vec2&in pos) Sets the current position of the UI cursor.

vec2 UI::GetWindowPos() Gets the current position of the UI window.

void UI::SetWindowPos(const vec2&in size, UI::Cond cond = UI :: Cond :: None) Sets the current position of the UI window.

vec2 UI::GetWindowSize() Gets the current size of the UI window.

void UI::SetWindowSize(const vec2&in size, UI::Cond cond = UI :: Cond :: None) Sets the current size of the UI window.

void UI::NodTree(CMwNod@ nod, UI::NodTreeMemberCallback@ memberCallback = null) A tree of nods, much like Nod Explorer.

bool UI::IsOverlayShown() Returns true if the overlay is currently visible.

void UI::ShowOverlay() Shows the overlay.

void UI::HideOverlay() Hides the overlay.

void UI::ShowNotification(const string&in text, int time = 5000) Shows a notification in the overlay.

void UI::ShowNotification(const string&in header, const string&in text, int time = 5000) Shows a notification in the overlay with an additional header.

vec2 UI::GetMousePos() Get the current position of the mouse relative to the top-left corner of the window.