You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: imgui.h
+6-2
Original file line number
Diff line number
Diff line change
@@ -672,10 +672,12 @@ namespace ImGui
672
672
IMGUI_API boolSelectable(constchar* label, bool selected = false, ImGuiSelectableFlags flags = 0, const ImVec2& size = ImVec2(0, 0)); // "bool selected" carry the selection state (read-only). Selectable() is clicked is returns true so you can modify your selection state. size.x==0.0: use remaining width, size.x>0.0: specify width. size.y==0.0: use label height, size.y>0.0: specify height
673
673
IMGUI_API boolSelectable(constchar* label, bool* p_selected, ImGuiSelectableFlags flags = 0, const ImVec2& size = ImVec2(0, 0)); // "bool* p_selected" point to the selection state (read-write), as a convenient helper.
674
674
675
-
// Multi-selection system for Selectable() and TreeNode() functions.
675
+
// Multi-selection system for Selectable(), Checkbox() functions*
676
676
// - This enables standard multi-selection/range-selection idioms (CTRL+Mouse/Keyboard, SHIFT+Mouse/Keyboard, etc.) in a way that also allow a clipper to be used.
677
677
// - ImGuiSelectionUserData is often used to store your item index within the current view (but may store something else).
678
678
// - Read comments near ImGuiMultiSelectIO for instructions/details and see 'Demo->Widgets->Selection State & Multi-Select' for demo.
679
+
// - (*) TreeNode() is technically supported but... using this correctly is more complicate: you need some sort of linear/random access to your tree,
680
+
// which is suited to advanced trees setups already implementing filters and clipper. We will work toward simplifying and demoing this.
679
681
// - 'selection_size' and 'items_count' parameters are optional and used by a few features. If they are costly for you to compute, you may avoid them.
680
682
IMGUI_API ImGuiMultiSelectIO* BeginMultiSelect(ImGuiMultiSelectFlags flags, int selection_size = -1, int items_count = -1);
681
683
IMGUI_API ImGuiMultiSelectIO* EndMultiSelect();
@@ -2734,7 +2736,9 @@ struct ImColor
2734
2736
// - Refer to 'Demo->Widgets->Selection State & Multi-Select' for demos using this.
2735
2737
// - This system implements standard multi-selection idioms (CTRL+Mouse/Keyboard, SHIFT+Mouse/Keyboard, etc)
2736
2738
// with support for clipper (skipping non-visible items), box-select and many other details.
2737
-
// - TreeNode(), Selectable(), Checkbox() are supported but custom widgets may use it as well.
2739
+
// - Selectable(), Checkbox() are supported but custom widgets may use it as well.
2740
+
// - TreeNode() is technically supported but... using this correctly is more complicated: you need some sort of linear/random access to your tree,
2741
+
// which is suited to advanced trees setups also implementing filters and clipper. We will work toward simplifying and demoing it.
2738
2742
// - In the spirit of Dear ImGui design, your code owns actual selection data.
2739
2743
// This is designed to allow all kinds of selection storage you may use in your application e.g. set/map/hash.
HelpMarker("TreeNode() is technically supported but... using this correctly is more complicated (you need some sort of linear/random access to your tree, which is suited to advanced trees setups already implementing filters and clipper. We will work toward simplifying and demoing this.\n\nFor now the tree demo is actually a little bit meaningless because it is an empty tree with only root nodes.");
0 commit comments