// // Generated by Brutal.ImGui.Generator; do not edit by hand. #nullable enable namespace Brutal.ImGuiApi { public partial class ImGui { public unsafe partial class PInvoke { /// /// /// Apply selection requests coming from BeginMultiSelect() and EndMultiSelect() functions. It uses /// 'items_count' passed to BeginMultiSelect() /// /// /// C++: /// imgui.h:3174 /// , /// imgui_widgets.cpp:8359 ///
void ApplyRequests(ImGuiMultiSelectIO* ms_io) ///
///
/// /// /// Methods /// /// /// Apply requests coming from BeginMultiSelect() and EndMultiSelect(). /// - Enable 'Demo->Tools->Debug Log->Selection' to see selection requests as they happen. /// - Honoring SetRange requests requires that you can iterate/interpolate between RangeFirstItem and RangeLastItem. /// - In this demo we often submit indices to SetNextItemSelectionUserData() + store the same indices in persistent selection. /// - Your code may do differently. If you store pointers or objects ID in ImGuiSelectionUserData you may need to perform /// a lookup in order to have some way to iterate/interpolate between two items. /// - A full-featured application is likely to allow search/filtering which is likely to lead to using indices /// and constructing a view index <> object id/ptr data structure anyway. /// WHEN YOUR APPLICATION SETTLES ON A CHOICE, YOU WILL PROBABLY PREFER TO GET RID OF THIS UNNECESSARY 'ImGuiSelectionBasicStorage' INDIRECTION LOGIC. /// Notice that with the simplest adapter (using indices everywhere), all functions return their parameters. /// The most simple implementation (using indices everywhere) would look like: /// for (ImGuiSelectionRequest& req : ms_io->Requests) /// { /// if (req.Type == ImGuiSelectionRequestType_SetAll) { Clear(); if (req.Selected) { for (int n = 0; n < items_count; n++) { SetItemSelected(n, true); } } /// if (req.Type == ImGuiSelectionRequestType_SetRange) { for (int n = (int)ms_io->RangeFirstItem; n <= (int)ms_io->RangeLastItem; n++) { SetItemSelected(n, ms_io->Selected); } } /// } /// /// [LibraryImport("imgui")] public static unsafe partial void ImGuiSelectionBasicStorage_ApplyRequests( ImGuiSelectionBasicStorage* target, ImGuiMultiSelectIO* ms_io ); /// /// /// Query if an item id is in selection. /// /// /// C++: /// imgui.h:3175 /// , /// imgui_widgets.cpp:8280 ///
bool Contains(ImGuiID id) const ///
///
/// /// /// Methods /// /// [LibraryImport("imgui")] public static unsafe partial Bool8 ImGuiSelectionBasicStorage_Contains( ImGuiSelectionBasicStorage* target, ImGuiID id ); /// /// /// Clear selection /// /// /// C++: /// imgui.h:3176 /// , /// imgui_widgets.cpp:8266 ///
void Clear() ///
///
/// /// /// Methods /// /// [LibraryImport("imgui")] public static unsafe partial void ImGuiSelectionBasicStorage_Clear(ImGuiSelectionBasicStorage* target); /// /// /// Swap two selections /// /// /// C++: /// imgui.h:3177 /// , /// imgui_widgets.cpp:8273 ///
void Swap(ImGuiSelectionBasicStorage& r) ///
///
/// /// /// Methods /// /// [LibraryImport("imgui")] public static unsafe partial void ImGuiSelectionBasicStorage_Swap( ImGuiSelectionBasicStorage* target, ImGuiSelectionBasicStorage* r ); /// /// /// Add/remove an item from selection (generally done by ApplyRequests() function) /// /// /// C++: /// imgui.h:3178 /// , /// imgui_widgets.cpp:8314 ///
void SetItemSelected(ImGuiID id, bool selected) ///
///
/// /// /// Methods /// /// [LibraryImport("imgui")] public static unsafe partial void ImGuiSelectionBasicStorage_SetItemSelected( ImGuiSelectionBasicStorage* target, ImGuiID id, Bool8 selected ); /// /// /// Iterate selection with 'void* it = NULL; ImGuiID id; while (selection.GetNextSelectedItem(&it, /// &id)) { ... }' /// /// /// C++: /// imgui.h:3179 /// , /// imgui_widgets.cpp:8294 ///
bool GetNextSelectedItem(void** opaque_it, ImGuiID* out_id) ///
///
/// /// /// Methods /// /// /// GetNextSelectedItem() is an abstraction allowing us to change our underlying actual storage system without impacting user. /// (e.g. store unselected vs compact down, compact down on demand, use raw ImVector<ImGuiID> instead of ImGuiStorage...) /// /// [LibraryImport("imgui")] public static unsafe partial Bool8 ImGuiSelectionBasicStorage_GetNextSelectedItem( ImGuiSelectionBasicStorage* target, void** opaque_it, ImGuiID* out_id ); /// /// /// Convert index to item id based on provided adapter. /// /// /// C++: /// imgui.h:3180 ///
inline ImGuiID GetStorageIdFromIndex(int idx) ///
///
/// /// /// Methods /// /// [LibraryImport("imgui")] public static unsafe partial ImGuiID ImGuiSelectionBasicStorage_GetStorageIdFromIndex( ImGuiSelectionBasicStorage* target, int idx ); } } }