@ -44,7 +44,7 @@ Index of this file:
// [SECTION] ImGuiIO
// [SECTION] ImGuiIO
// [SECTION] Misc data structures (ImGuiInputTextCallbackData, ImGuiSizeCallbackData, ImGuiPayload)
// [SECTION] Misc data structures (ImGuiInputTextCallbackData, ImGuiSizeCallbackData, ImGuiPayload)
// [SECTION] Helpers (ImGuiOnceUponAFrame, ImGuiTextFilter, ImGuiTextBuffer, ImGuiStorage, ImGuiListClipper, Math Operators, ImColor)
// [SECTION] Helpers (ImGuiOnceUponAFrame, ImGuiTextFilter, ImGuiTextBuffer, ImGuiStorage, ImGuiListClipper, Math Operators, ImColor)
// [SECTION] Multi-Select API flags and structures (ImGuiMultiSelectFlags, ImGuiMultiSelectIO, ImGuiSelectionRequest, ImGuiSelectionBasicStorage)
// [SECTION] Multi-Select API flags and structures (ImGuiMultiSelectFlags, ImGuiMultiSelectIO, ImGuiSelectionRequest, ImGuiSelectionBasicStorage, ImGuiSelectionExternalStorage )
// [SECTION] Drawing API (ImDrawCallback, ImDrawCmd, ImDrawIdx, ImDrawVert, ImDrawChannel, ImDrawListSplitter, ImDrawFlags, ImDrawListFlags, ImDrawList, ImDrawData)
// [SECTION] Drawing API (ImDrawCallback, ImDrawCmd, ImDrawIdx, ImDrawVert, ImDrawChannel, ImDrawListSplitter, ImDrawFlags, ImDrawListFlags, ImDrawList, ImDrawData)
// [SECTION] Font API (ImFontConfig, ImFontGlyph, ImFontGlyphRangesBuilder, ImFontAtlasFlags, ImFontAtlas, ImFont)
// [SECTION] Font API (ImFontConfig, ImFontGlyph, ImFontGlyphRangesBuilder, ImFontAtlasFlags, ImFontAtlas, ImFont)
// [SECTION] Viewports (ImGuiViewportFlags, ImGuiViewport)
// [SECTION] Viewports (ImGuiViewportFlags, ImGuiViewport)
@ -180,6 +180,7 @@ struct ImGuiOnceUponAFrame; // Helper for running a block of code not mo
struct ImGuiPayload ; // User data payload for drag and drop operations
struct ImGuiPayload ; // User data payload for drag and drop operations
struct ImGuiPlatformImeData ; // Platform IME data for io.PlatformSetImeDataFn() function.
struct ImGuiPlatformImeData ; // Platform IME data for io.PlatformSetImeDataFn() function.
struct ImGuiSelectionBasicStorage ; // Optional helper to store multi-selection state + apply multi-selection requests.
struct ImGuiSelectionBasicStorage ; // Optional helper to store multi-selection state + apply multi-selection requests.
struct ImGuiSelectionExternalStorage ; //Optional helper to apply multi-selection requests to existing randomly accessible storage.
struct ImGuiSelectionRequest ; // A selection request (stored in ImGuiMultiSelectIO)
struct ImGuiSelectionRequest ; // A selection request (stored in ImGuiMultiSelectIO)
struct ImGuiSizeCallbackData ; // Callback data when using SetNextWindowSizeConstraints() (rare/advanced use)
struct ImGuiSizeCallbackData ; // Callback data when using SetNextWindowSizeConstraints() (rare/advanced use)
struct ImGuiStorage ; // Helper for key->value storage (container sorted by key)
struct ImGuiStorage ; // Helper for key->value storage (container sorted by key)
@ -2860,6 +2861,19 @@ struct ImGuiSelectionBasicStorage
ImGuiID GetStorageIdFromIndex ( int idx ) { return AdapterIndexToStorageId ( this , idx ) ; }
ImGuiID GetStorageIdFromIndex ( int idx ) { return AdapterIndexToStorageId ( this , idx ) ; }
} ;
} ;
// Optional helper to apply multi-selection requests to existing randomly accessible storage.
// Convenient if you want to quickly wire multi-select API on e.g. an array of bool or items storing their own selection state.
struct ImGuiSelectionExternalStorage
{
// Members
void ( * AdapterSetItemSelected ) ( ImGuiSelectionExternalStorage * self , int idx , bool selected ) ; // e.g. AdapterSetItemSelected = [](ImGuiSelectionExternalStorage* self, int idx, bool selected) { ((MyItems**)self->UserData)[idx]->Selected = selected; }
void * UserData ; // User data for use by adapter function // e.g. selection.UserData = (void*)my_items;
// Methods
ImGuiSelectionExternalStorage ( ) { memset ( this , 0 , sizeof ( * this ) ) ; }
IMGUI_API void ApplyRequests ( ImGuiMultiSelectIO * ms_io ) ; // Generic function, using AdapterSetItemSelected()
} ;
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// [SECTION] Drawing API (ImDrawCmd, ImDrawIdx, ImDrawVert, ImDrawChannel, ImDrawListSplitter, ImDrawListFlags, ImDrawList, ImDrawData)
// [SECTION] Drawing API (ImDrawCmd, ImDrawIdx, ImDrawVert, ImDrawChannel, ImDrawListSplitter, ImDrawListFlags, ImDrawList, ImDrawData)
// Hold a series of drawing commands. The user provides a renderer for ImDrawData which essentially contains an array of ImDrawList.
// Hold a series of drawing commands. The user provides a renderer for ImDrawData which essentially contains an array of ImDrawList.