ImGuiID(*AdapterIndexToStorageId)(ImGuiSelectionBasicStorage*self,intidx);// e.g. selection.AdapterIndexToStorageId = [](ImGuiSelectionBasicStorage* self, int idx) { return ((MyItems**)self->UserData)[idx]->ID; };
// Methods
IMGUI_APIvoidApplyRequests(ImGuiMultiSelectIO*ms_io);// Apply selection requests coming from BeginMultiSelect() and EndMultiSelect() functions. It uses 'items_count' passed to BeginMultiSelect()
IMGUI_APIImGuiIDGetNextSelectedItem(void**opaque_it);// Iterate selection with 'void* it = NULL; while (ImGuiId id = selection.GetNextSelectedItem(&it)) { ... }'
boolContains(ImGuiIDid)const{return_Storage.GetInt(id,0)!=0;}// Query if an item id is in selection.
ImGuiIDGetStorageIdFromIndex(intidx){returnAdapterIndexToStorageId(this,idx);}// Convert index to item id based on provided adapter.
IMGUI_APIvoidApplyRequests(ImGuiMultiSelectIO*ms_io);// Apply selection requests coming from BeginMultiSelect() and EndMultiSelect() functions. It uses 'items_count' passed to BeginMultiSelect()
IMGUI_APIboolContains(ImGuiIDid)const;// Query if an item id is in selection.
IMGUI_APIvoidClear();// Clear selection
IMGUI_APIvoidSwap(ImGuiSelectionBasicStorage&r);// Swap two selections
IMGUI_APIvoidSetItemSelected(ImGuiIDid,boolselected);// Add/remove an item from selection (generally done by ApplyRequests() function)
IMGUI_APIImGuiIDGetNextSelectedItem(void**opaque_it);// Iterate selection with 'void* it = NULL; while (ImGuiId id = selection.GetNextSelectedItem(&it)) { ... }'
inlineImGuiIDGetStorageIdFromIndex(intidx){returnAdapterIndexToStorageId(this,idx);}// Convert index to item id based on provided adapter.
};
// Optional helper to apply multi-selection requests to existing randomly accessible storage.