|
@@ -672,10 +672,12 @@ namespace ImGui
|
|
|
IMGUI_API bool Selectable(const char* 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
|
|
|
IMGUI_API bool Selectable(const char* 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.
|
|
|
|
|
|
- // Multi-selection system for Selectable() and TreeNode() functions.
|
|
|
+ // Multi-selection system for Selectable(), Checkbox() functions*
|
|
|
// - 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.
|
|
|
// - ImGuiSelectionUserData is often used to store your item index within the current view (but may store something else).
|
|
|
// - Read comments near ImGuiMultiSelectIO for instructions/details and see 'Demo->Widgets->Selection State & Multi-Select' for demo.
|
|
|
+ // - (*) TreeNode() is technically supported but... using this correctly is more complicate: 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.
|
|
|
// - '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.
|
|
|
IMGUI_API ImGuiMultiSelectIO* BeginMultiSelect(ImGuiMultiSelectFlags flags, int selection_size = -1, int items_count = -1);
|
|
|
IMGUI_API ImGuiMultiSelectIO* EndMultiSelect();
|
|
@@ -2734,7 +2736,9 @@ struct ImColor
|
|
|
// - Refer to 'Demo->Widgets->Selection State & Multi-Select' for demos using this.
|
|
|
// - This system implements standard multi-selection idioms (CTRL+Mouse/Keyboard, SHIFT+Mouse/Keyboard, etc)
|
|
|
// with support for clipper (skipping non-visible items), box-select and many other details.
|
|
|
-// - TreeNode(), Selectable(), Checkbox() are supported but custom widgets may use it as well.
|
|
|
+// - Selectable(), Checkbox() are supported but custom widgets may use it as well.
|
|
|
+// - 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 also implementing filters and clipper. We will work toward simplifying and demoing it.
|
|
|
// - In the spirit of Dear ImGui design, your code owns actual selection data.
|
|
|
// This is designed to allow all kinds of selection storage you may use in your application e.g. set/map/hash.
|
|
|
// About ImGuiSelectionBasicStorage:
|