ImGuiSelectionBasicStorage
Static Members
Apply selection requests coming from BeginMultiSelect() and EndMultiSelect() functions. It uses 'items_count' passed to BeginMultiSelect()
| Name | Type |
|---|---|
self |
cpp.Star |
msIo |
cpp.Star |
Query if an item id is in selection.
| Name | Type |
|---|---|
self |
cpp.Star |
id |
UInt |
| Returns |
|---|
| Bool |
Clear selection
| Name | Type |
|---|---|
self |
cpp.Star |
Swap two selections
| Name | Type |
|---|---|
self |
cpp.Star |
r |
cpp.Star |
Add/remove an item from selection (generally done by ApplyRequests() function)
| Name | Type |
|---|---|
self |
cpp.Star |
id |
UInt |
selected |
Bool |
getNextSelectedItem(self: cpp.Star, opaqueIt: cpp.RawPointer<Void>, outId: cpp.Star): BoolIterate selection with 'void* it = NULL; ImGuiID id; while (selection.GetNextSelectedItem(&it, &id)) { ... }'
| Name | Type |
|---|---|
self |
cpp.Star |
opaqueIt |
cpp.RawPointer<Void> |
outId |
cpp.Star |
| Returns |
|---|
| Bool |
Convert index to item id based on provided adapter.
| Name | Type |
|---|---|
self |
cpp.Star |
idx |
Int |
| Returns |
|---|
| UInt |
Instance Members
size: Int// Number of selected items, maintained by this helper.
preserveOrder: Bool= false // GetNextSelectedItem() will return ordered selection (currently implemented by two additional sorts of selection. Could be improved)
userData: cpp.RawPointer<cpp.Void>= NULL // User data for use by adapter function // e.g. selection.UserData = (void*)my_items;
adapterIndexToStorageId: ImGuiOpaqueCallbacke.g. selection.AdapterIndexToStorageId = [](ImGuiSelectionBasicStorage* self, int idx) { return ((MyItems**)self->UserData)[idx]->ID; };
Metadata
| Name | Parameters |
|---|---|
:structAccess |
- |
:include |
"linc_imgui.h" |