Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ocornut/imgui/llms.txt
Use this file to discover all available pages before exploring further.
Selectable Widgets
A selectable highlights when hovered, and can display another color when selected. Neighbors selectable extend their highlight bounds in order to leave no gap between them.Selectable
selected carries the selection state (read-only). Returns true when clicked.
Selectable label
Current selection state (read-only)
Selectable flags (see ImGuiSelectableFlags_)
Size (0.0f = use remaining width/height, >0.0f = specify)
True when clicked (modify your selection state)
Selectable (pointer)
Selectable label
Pointer to selection state (read-write)
Selectable flags
Size
True when clicked
Multi-Selection
Multi-selection system forSelectable(), Checkbox(), TreeNode() functions. This enables standard multi-selection/range-selection idioms (Ctrl+Mouse/Keyboard, Shift+Mouse/Keyboard, etc.).
BeginMultiSelect
Multi-select flags (see ImGuiMultiSelectFlags_)
Current number of selected items (-1 if expensive to compute)
Total number of items (-1 if expensive to compute)
Multi-select I/O structure with requests to apply
EndMultiSelect
Multi-select I/O structure with post-loop requests
SetNextItemSelectionUserData
User data (typically item index)
IsItemToggledSelection
EndMultiSelect().
True if item selection was toggled
Selectable Flags
ImGuiSelectableFlags_
Flags forSelectable().
| Flag | Description |
|---|---|
ImGuiSelectableFlags_None | Default |
ImGuiSelectableFlags_NoAutoClosePopups | Clicking this doesn’t close parent popup window |
ImGuiSelectableFlags_SpanAllColumns | Frame will span all columns of container table |
ImGuiSelectableFlags_AllowDoubleClick | Generate press events on double clicks too |
ImGuiSelectableFlags_Disabled | Cannot be selected, display grayed out text |
ImGuiSelectableFlags_AllowOverlap | Hit testing to allow subsequent widgets to overlap |
ImGuiSelectableFlags_Highlight | Make the item be displayed as if it is hovered |
ImGuiSelectableFlags_SelectOnNav | Auto-select when moved into (unless Ctrl is held) |
Multi-Select Flags
ImGuiMultiSelectFlags_
Flags forBeginMultiSelect().
| Flag | Description |
|---|---|
ImGuiMultiSelectFlags_None | Default |
ImGuiMultiSelectFlags_SingleSelect | Single selection mode (default is multi-select) |
ImGuiMultiSelectFlags_NoSelectAll | Disable select all (Ctrl+A) |
ImGuiMultiSelectFlags_NoRangeSelect | Disable range select (Shift+Click) |
ImGuiMultiSelectFlags_NoAutoSelect | Disable auto-select on navigation |
ImGuiMultiSelectFlags_NoAutoClear | Disable auto-clear on click in empty space |
ImGuiMultiSelectFlags_NoAutoClearOnReselect | Disable auto-clear when re-clicking selected item |
ImGuiMultiSelectFlags_BoxSelect1d | Enable 1D box-select (within a single axis) |
ImGuiMultiSelectFlags_BoxSelect2d | Enable 2D box-select |
ImGuiMultiSelectFlags_BoxSelectNoScroll | Disable scrolling when box-selecting |
ImGuiMultiSelectFlags_ClearOnEscape | Clear selection on Escape key |
ImGuiMultiSelectFlags_ClearOnClickVoid | Clear selection when clicking in void |
List Boxes
List boxes are thin wrappers aroundBeginChild() with the ImGuiChildFlags_FrameStyle flag.
BeginListBox
EndListBox() if BeginListBox() returns true.
List box label
Size (0 = default size)
True if list box is open
EndListBox
BeginListBox() returned true.
ListBox (simple)
List box label
Pointer to current selected item index
Array of item strings
Number of items in array
Height in number of items (-1 = default ~7)
True when selection has been modified
ListBox (callback)
List box label
Pointer to current selected item index
Callback function to get item string
User data passed to callback
Number of items
Height in number of items
True when selection has been modified