mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-30 18:34:34 +01:00
Updated Multi Select (markdown)
parent
499a48b78f
commit
2e5727aab6
@ -1,5 +1,4 @@
|
||||
- Development branch: https://github.com/ocornut/imgui/tree/features/range_select
|
||||
- The feature is expected to be merged before 1.91.
|
||||
_The feature has been merged into master on July 18, 2024 (version 1.91.0 WIP)_
|
||||
|
||||
![Multi-Select](https://github.com/ocornut/imgui/assets/8225057/442d5689-3e91-4771-9e25-498fbeb9ea32)
|
||||
|
||||
@ -18,7 +17,8 @@
|
||||
### Overview
|
||||
|
||||
- **This system implements standard multi-selection idioms** (CTRL+Mouse/Keyboard, SHIFT+Mouse/Keyboard, etc) and supports a clipper being used. Handling this manually and correctly is tricky, this is why we provide the functionality. If you don't need SHIFT+Mouse/Keyboard range-select + clipping, you could technically implement a simple form of multi-selection yourself, by reacting to click/presses on Selectable() items.
|
||||
- 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. external selection (set/map/hash), intrusive selection (bool inside your objects) etc.
|
||||
- The work involved to deal with multi-selection differs whether you want to only submit visible items and clip others, or submit all items regardless of their visibility. Clipping items is more efficient and will allow you to deal with large lists (1k~100k items). See "Usage flow" section below for details. If you are not sure, always start without clipping! You can work your way to the optimized version afterwards.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user