Clipper accounts for Selectable() layout oddity as BoxSelect is sensitive to it.
Also tweaked scroll triggering region inward.
Rename ImGuiMultiSelectFlags_NoBoxSelectScroll to ImGuiMultiSelectFlags_BoxSelectNoScroll.
Fixed use with ImGuiMultiSelectFlags_SinglaSelect.
- EndIO.RangeSelected always set along with EndIO.RequestSetRange
- Trying to assert for the assignment making a difference when EndIO.RequestSetRange is already set couldn't find a case (tests passing).
This also minify the patch for an alternative/wip attmept at redesgining pre/post deletion logic. But turns out current attempt may be easier to grasp.
Intended to be entirely a no-op, merely a transform of source code for simplification. But committing separatey from behavior change in previous change.
Internals: Rename ImGuiSelectableFlags_PressedOnXXX to ImGuiSelectableFlags_SelectOnXXX, ImGuiButtonFlags_NoHoveredOnNav to ImGuiButtonFlags_NoHoveredOnFocus.
Rebased 2023/05/20 (reworked demo locations), 2023/05/23 (rename some local to reduce noise in future commits)
Major rebase 2023/09/12 since master added ImGuiSelectionUserData + SetNextItemSelectionUserData() + add ImGuiItemFlags_IsMultiSelect.
// FIXME-OPT: Need a way to reuse the result of lower_bound when doing GetInt()/SetInt() - not too bad because it only happens on explicit interaction (maximum one a frame)
@ -174,11 +175,16 @@ struct ImGuiIO; // Main configuration and I/O between your a
structImGuiInputTextCallbackData;// Shared state of InputText() when using custom ImGuiInputTextCallback (rare/advanced use)
structImGuiKeyData;// Storage for ImGuiIO and IsKeyDown(), IsKeyPressed() etc functions.
structImGuiListClipper;// Helper to manually clip large list of items
structImGuiMultiSelectIO;// Structure to interact with a BeginMultiSelect()/EndMultiSelect() block
structImGuiOnceUponAFrame;// Helper for running a block of code not more than once a frame
structImGuiPayload;// User data payload for drag and drop operations
structImGuiPlatformImeData;// Platform IME data for io.SetPlatformImeDataFn() function.
structImGuiSelectionBasicStorage;// Optional helper to store multi-selection state + apply multi-selection requests.
structImGuiSelectionExternalStorage;//Optional helper to apply multi-selection requests to existing randomly accessible storage.
structImGuiSelectionRequest;// A selection request (stored in ImGuiMultiSelectIO)
structImGuiSizeCallbackData;// Callback data when using SetNextWindowSizeConstraints() (rare/advanced use)
structImGuiStorage;// Helper for key->value storage
structImGuiStorage;// Helper for key->value storage (container sorted by key)
structImGuiStoragePair;// Helper for key->value storage (pair)
structImGuiStyle;// Runtime data for styling/colors
structImGuiTableSortSpecs;// Sorting specifications for a table (often handling sort specs for a single column, occasionally more)
structImGuiTableColumnSortSpecs;// Sorting specification for one column of a table
@ -225,6 +231,7 @@ typedef int ImGuiInputFlags; // -> enum ImGuiInputFlags_ // Flags: f
typedefintImGuiInputTextFlags;// -> enum ImGuiInputTextFlags_ // Flags: for InputText(), InputTextMultiline()
typedefintImGuiKeyChord;// -> ImGuiKey | ImGuiMod_XXX // Flags: for IsKeyChordPressed(), Shortcut() etc. an ImGuiKey optionally OR-ed with one or more ImGuiMod_XXX values.
typedefintImGuiPopupFlags;// -> enum ImGuiPopupFlags_ // Flags: for OpenPopup*(), BeginPopupContext*(), IsPopupOpen()
typedefintImGuiMultiSelectFlags;// -> enum ImGuiMultiSelectFlags_// Flags: for BeginMultiSelect()
typedefintImGuiSelectableFlags;// -> enum ImGuiSelectableFlags_ // Flags: for Selectable()
typedefintImGuiSliderFlags;// -> enum ImGuiSliderFlags_ // Flags: for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc.
typedefintImGuiTabBarFlags;// -> enum ImGuiTabBarFlags_ // Flags: for BeginTabBar()
@ -260,6 +267,11 @@ typedef ImWchar32 ImWchar;
typedefImWchar16ImWchar;
#endif
// Multi-Selection item index or identifier when using BeginMultiSelect()
// - Used by SetNextItemSelectionUserData() + and inside ImGuiMultiSelectIO structure.
// - Most users are likely to use this store an item INDEX but this may be used to store a POINTER/ID as well. Read comments near ImGuiMultiSelectIO for details.
typedefImS64ImGuiSelectionUserData;
// Callback and functions types
typedefint(*ImGuiInputTextCallback)(ImGuiInputTextCallbackData*data);// Callback function for ImGui::InputText()
typedefvoid(*ImGuiSizeCallback)(ImGuiSizeCallbackData*data);// Callback function for ImGui::SetNextWindowSizeConstraints()
@ -659,6 +671,16 @@ namespace ImGui
IMGUI_APIboolSelectable(constchar*label,boolselected=false,ImGuiSelectableFlagsflags=0,constImVec2&size=ImVec2(0,0));// "bool selected" carry the selection state (read-only). Selectable() is clicked is returns true so you can modify your selection state. size.x==0.0: use remaining width, size.x>0.0: specify width. size.y==0.0: use label height, size.y>0.0: specify height
IMGUI_APIboolSelectable(constchar*label,bool*p_selected,ImGuiSelectableFlagsflags=0,constImVec2&size=ImVec2(0,0));// "bool* p_selected" point to the selection state (read-write), as a convenient helper.
// Multi-selection system for Selectable() and TreeNode() functions.
// - This enables standard multi-selection/range-selection idioms (CTRL+Mouse/Keyboard, SHIFT+Mouse/Keyboard, etc.) in a way that also allow a clipper to be used.
// - ImGuiSelectionUserData is often used to store your item index within the current view (but may store something else).
// - Read comments near ImGuiMultiSelectIO for instructions/details and see 'Demo->Widgets->Selection State & Multi-Select' for demo.
// - 'selection_size' and 'items_count' parameters are optional and used by a few features. If they are costly for you to compute, you may avoid them.
IMGUI_APIboolIsItemToggledSelection();// Was the last item selection state toggled? Useful if you need the per-item information _before_ reaching EndMultiSelect(). We only returns toggle _event_ in order to handle clipping correctly.
// Widgets: List Boxes
// - This is essentially a thin wrapper to using BeginChild/EndChild with the ImGuiChildFlags_FrameStyle flag for stylistic changes + displaying a label.
// - You can submit contents and manage your selection state however you want it, by creating e.g. Selectable() or any other items.
#define IMGUI_HAS_MULTI_SELECT // Multi-Select/Range-Select WIP branch // <-- This is currently _not_ in the top of imgui.h to prevent merge conflicts.
// - Refer to 'Demo->Widgets->Selection State & Multi-Select' for demos using this.
// - This system implements standard multi-selection idioms (CTRL+Mouse/Keyboard, SHIFT+Mouse/Keyboard, etc)
// with support for clipper (skipping non-visible items), box-select and many other details.
// - TreeNode(), Selectable(), Checkbox() are supported but custom widgets may use it as well.
// - 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. set/map/hash.
// About ImGuiSelectionBasicStorage:
// - This is an optional helper to store a selection state and apply selection requests.
// - It is used by our demos and provided as a convenience to quickly implement multi-selection.
// Usage:
// - Identify submitted items with SetNextItemSelectionUserData(), most likely using an index into your current data-set.
// - Store and maintain actual selection data using persistent object identifiers.
// - Usage flow:
// BEGIN - (1) Call BeginMultiSelect() and retrieve the ImGuiMultiSelectIO* result.
// - (2) Honor request list (SetAll/SetRange requests) by updating your selection data. Same code as Step 6.
// - (3) [If using clipper] You need to make sure RangeSrcItem is always submitted. Calculate its index and pass to clipper.IncludeItemByIndex(). If storing indices in ImGuiSelectionUserData, a simple clipper.IncludeItemByIndex(ms_io->RangeSrcItem) call will work.
// LOOP - (4) Submit your items with SetNextItemSelectionUserData() + Selectable()/TreeNode() calls.
// END - (5) Call EndMultiSelect() and retrieve the ImGuiMultiSelectIO* result.
// - (6) Honor request list (SetAll/SetRange requests) by updating your selection data. Same code as Step 2.
// If you submit all items (no clipper), Step 2 and 3 are optional and will be handled by each item themselves. It is fine to always honor those steps.
// About ImGuiSelectionUserData:
// - This can store an application-defined identifier (e.g. index or pointer) submitted via SetNextItemSelectionUserData().
// - In return we store them into RangeSrcItem/RangeFirstItem/RangeLastItem and other fields in ImGuiMultiSelectIO.
// - Most applications will store an object INDEX, hence the chosen name and type. Storing an index is natural, because
// SetRange requests will give you two end-points and you will need to iterate/interpolate between them to update your selection.
// - However it is perfectly possible to store a POINTER or another IDENTIFIER inside ImGuiSelectionUserData.
// Our system never assume that you identify items by indices, it never attempts to interpolate between two values.
// - As most users will want to store an index, for convenience and to reduce confusion we use ImS64 instead of void*,
// being syntactically easier to downcast. Feel free to reinterpret_cast and store a pointer inside.
// Flags for BeginMultiSelect()
enumImGuiMultiSelectFlags_
{
ImGuiMultiSelectFlags_None=0,
ImGuiMultiSelectFlags_SingleSelect=1<<0,// Disable selecting more than one item. This is available to allow single-selection code to share same code/logic if desired. It essentially disables the main purpose of BeginMultiSelect() tho!
ImGuiMultiSelectFlags_NoSelectAll=1<<1,// Disable CTRL+A shortcut to select all.
ImGuiMultiSelectFlags_NoRangeSelect=1<<2,// Disable Shift+selection mouse/keyboard support (useful for unordered 2D selection).
ImGuiMultiSelectFlags_NoAutoSelect=1<<3,// Disable selecting items when navigating (useful for e.g. supporting range-select in a list of checkboxes)
ImGuiMultiSelectFlags_NoAutoClear=1<<4,// Disable clearing other items when navigating or selecting another one (generally used with ImGuiMultiSelectFlags_NoAutoSelect. useful for e.g. supporting range-select in a list of checkboxes)
ImGuiMultiSelectFlags_BoxSelect=1<<5,// Enable box-selection with varying width or varying x pos items support (e.g. different width labels, or 2D layout/grid). This alters clipping logic so that e.g. horizontal movements will update selection of normally clipped items. Box-selection works better with little bit of spacing between items hit-box in order to be able to aim at empty space.
ImGuiMultiSelectFlags_BoxSelect1d=1<<6,// Enable box-selection with same width and same x pos items (e.g. only full row Selectable()). Small optimization.
ImGuiMultiSelectFlags_BoxSelectNoScroll=1<<7,// Disable scrolling when box-selecting near edges of scope.
ImGuiMultiSelectFlags_ClearOnEscape=1<<8,// Clear selection when pressing Escape while scope is focused.
ImGuiMultiSelectFlags_ClearOnClickVoid=1<<9,// Clear selection when clicking on empty location within scope.
ImGuiMultiSelectFlags_ScopeWindow=1<<10,// Use if BeginMultiSelect() covers a whole window (Default): Scope for _ClearOnClickVoid and _BoxSelect is whole window (Default).
ImGuiMultiSelectFlags_ScopeRect=1<<11,// Use if multiple BeginMultiSelect() are used in the same host window: Scope for _ClearOnClickVoid and _BoxSelect is rectangle covering submitted items.
ImGuiMultiSelectFlags_SelectOnClick=1<<12,// Apply selection on mouse down when clicking on unselected item. (Default)
ImGuiMultiSelectFlags_SelectOnClickRelease=1<<13,// Apply selection on mouse release when clicking an unselected item. Allow dragging an unselected item without altering selection.
};
// Main IO structure returned by BeginMultiSelect()/EndMultiSelect().
// This mainly contains a list of selection requests.
// - Use 'Demo->Tools->Debug Log->Selection' to see requests as they happen.
// - Some fields are only useful if your list is dynamic and allows deletion (getting post-deletion focus/state right is shown in the demo)
// - Below: who reads/writes each fields? 'r'=read, 'w'=write, 'ms'=multi-select code, 'app'=application/user code.
ImVector<ImGuiSelectionRequest>Requests;// ms:w, app:r / ms:w app:r // Requests to apply to your selection data.
ImGuiSelectionUserDataRangeSrcItem;// ms:w app:r / // (If using clipper) Begin: Source item (generally the first selected item when multi-selecting, which is used as a reference point) must never be clipped!
ImGuiSelectionUserDataNavIdItem;// ms:w, app:r / // (If using deletion) Last known SetNextItemSelectionUserData() value for NavId (if part of submitted items).
boolNavIdSelected;// ms:w, app:r / app:r // (If using deletion) Last known selection state for NavId (if part of submitted items).
boolRangeSrcReset;// app:w / ms:r // (If using deletion) Set before EndMultiSelect() to reset ResetSrcItem (e.g. if deleted selection).
intItemsCount;// ms:w, app:r / app:r // 'int items_count' parameter to BeginMultiSelect() is copied here for convenience, allowing simpler calls to your ApplyRequests handler. Not used internally.
};
// Selection request type
enumImGuiSelectionRequestType
{
ImGuiSelectionRequestType_None=0,
ImGuiSelectionRequestType_SetAll,// Request app to clear selection (if Selected==false) or select all items (if Selected==true). We cannot set RangeFirstItem/RangeLastItem as its contents is entirely up to user (not necessarily an index)
ImGuiSelectionRequestType_SetRange,// Request app to select/unselect [RangeFirstItem..RangeLastItem] items (inclusive) based on value of Selected. Only EndMultiSelect() request this, app code can read after BeginMultiSelect() and it will always be false.
ImGuiSelectionUserDataRangeFirstItem;// / ms:w, app:r // Parameter for SetRange request (this is generally == RangeSrcItem when shift selecting from top to bottom).
ImGuiSelectionUserDataRangeLastItem;// / ms:w, app:r // Parameter for SetRange request (this is generally == RangeSrcItem when shift selecting from bottom to top). Inclusive!
};
// Optional helper to store multi-selection state + apply multi-selection requests.
// - Used by our demos and provided as a convenience to easily implement basic multi-selection.
// - Iterate selection with 'void* it = NULL; while (ImGuiId id = selection.GetNextSelectedItem(&it)) { ... }'
// Or you can check 'if (Contains(id)) { ... }' for each possible object if their number is not too high to iterate.
// - USING THIS IS NOT MANDATORY. This is only a helper and not a required API.
// To store a multi-selection, in your application you could:
// - Use this helper as a convenience. We use our simple key->value ImGuiStorage as a std::set<ImGuiID> replacement.
// - Use your own external storage: e.g. std::set<MyObjectId>, std::vector<MyObjectId>, interval trees, intrusively stored selection etc.
// In ImGuiSelectionBasicStorage we:
// - always use indices in the multi-selection API (passed to SetNextItemSelectionUserData(), retrieved in ImGuiMultiSelectIO)
// - use the AdapterIndexToStorageId() indirection layer to abstract how persistent selection data is derived from an index.
// - use decently optimized logic to allow queries and insertion of very large selection sets.
// - do not preserve selection order.
// Many combinations are possible depending on how you prefer to store your items and how you prefer to store your selection.
// Large applications are likely to eventually want to get rid of this indirection layer and do their own thing.
// See https://github.com/ocornut/imgui/wiki/Multi-Select for details and pseudo-code using this helper.
structImGuiSelectionBasicStorage
{
// Members
ImGuiStorage_Storage;// [Internal] Selection set. Think of this as similar to e.g. std::set<ImGuiID>. Prefer not accessing directly: iterate with GetNextSelectedItem().
intSize;// Number of selected items (== number of 1 in the Storage), maintained by this helper.
void*UserData;// User data for use by adapter function // e.g. selection.UserData = (void*)my_items;
ImGuiID(*AdapterIndexToStorageId)(ImGuiSelectionBasicStorage*self,intidx);// e.g. selection.AdapterIndexToStorageId = [](ImGuiSelectionBasicStorage* self, int idx) { return ((MyItems**)self->UserData)[idx]->ID; };
// Methods
ImGuiSelectionBasicStorage();
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.
// Convenient if you want to quickly wire multi-select API on e.g. an array of bool or items storing their own selection state.
structImGuiSelectionExternalStorage
{
// Members
void*UserData;// User data for use by adapter function // e.g. selection.UserData = (void*)my_items;
void(*AdapterSetItemSelected)(ImGuiSelectionExternalStorage*self,intidx,boolselected);// e.g. AdapterSetItemSelected = [](ImGuiSelectionExternalStorage* self, int idx, bool selected) { ((MyItems**)self->UserData)[idx]->Selected = selected; }
// Methods
IMGUI_APIImGuiSelectionExternalStorage();
IMGUI_APIvoidApplyRequests(ImGuiMultiSelectIO*ms_io);// Apply selection requests by using AdapterSetItemSelected() calls
ImGuiItemFlags_Inputable=1<<10,// false // [WIP] Auto-activate input mode when tab focused. Currently only used and supported by a few items before it becomes a generic feature.
ImGuiItemFlags_HasSelectionUserData=1<<11,// false // Set by SetNextItemSelectionUserData()
ImGuiItemFlags_IsMultiSelect=1<<12,// false // Set by SetNextItemSelectionUserData()
// Multi-Selection item index or identifier when using SetNextItemSelectionUserData()/BeginMultiSelect()
// (Most users are likely to use this store an item INDEX but this may be used to store a POINTER as well.)
typedefImS64ImGuiSelectionUserData;
enumImGuiNextItemDataFlags_
{
ImGuiNextItemDataFlags_None=0,
@ -1217,8 +1222,9 @@ enum ImGuiNextItemDataFlags_
structImGuiNextItemData
{
ImGuiNextItemDataFlagsFlags;
ImGuiItemFlagsItemFlags;// Currently only tested/used for ImGuiItemFlags_AllowOverlap.
ImGuiItemFlagsItemFlags;// Currently only tested/used for ImGuiItemFlags_AllowOverlap and ImGuiItemFlags_HasSelectionUserData.
// Non-flags members are NOT cleared by ItemAdd() meaning they are still valid during NavProcessItem()
ImGuiIDFocusScopeId;// Set by SetNextItemSelectionUserData()
ImGuiSelectionUserDataSelectionUserData;// Set by SetNextItemSelectionUserData() (note that NULL/0 is a valid value, we use -1 == ImGuiSelectionUserData_Invalid to mark invalid values)
floatWidth;// Set by SetNextItemWidth()
ImGuiKeyChordShortcut;// Set by SetNextItemShortcut()
@ -1596,7 +1602,7 @@ struct ImGuiNavItemData
floatDistBox;// Move // Best candidate box distance to current NavId
floatDistCenter;// Move // Best candidate center distance to current NavId
floatDistAxial;// Move // Best candidate axial distance to current NavId
ImGuiSelectionUserDataSelectionUserData;//I+Mov // Best candidate SetNextItemSelectionData() value.
ImGuiSelectionUserDataSelectionUserData;//I+Mov // Best candidate SetNextItemSelectionUserData() value.
ImGuiMultiSelectIOIO;// MUST BE FIRST FIELD. Requests are set and returned by BeginMultiSelect()/EndMultiSelect() + written to by user during the loop.
ImGuiMultiSelectState*Storage;
ImGuiIDFocusScopeId;// Copied from g.CurrentFocusScopeId (unless another selection scope was pushed manually)
ImGuiMultiSelectFlagsFlags;
ImVec2ScopeRectMin;
ImVec2BackupCursorMaxPos;
ImGuiIDBoxSelectId;
ImGuiKeyChordKeyMods;
ImS8LoopRequestSetAll;// -1: no operation, 0: clear all, 1: select all.
boolIsEndIO;// Set when switching IO from BeginMultiSelect() to EndMultiSelect() state.
boolIsFocused;// Set if currently focusing the selection scope (any item of the selection). May be used if you have custom shortcut associated to selection.
boolIsKeyboardSetRange;// Set by BeginMultiSelect() when using Shift+Navigation. Because scrolling may be affected we can't afford a frame of lag with Shift+Navigation.
boolNavIdPassedBy;
boolRangeSrcPassedBy;// Set by the item that matches RangeSrcItem.
boolRangeDstPassedBy;// Set by the item that matches NavJustMovedToId when IsSetRange is set.
ImGuiSelectionUserDataBoxSelectLastitem;// Copy of last submitted item data, used to merge output ranges.
ImGuiMultiSelectTempData(){Clear();}
voidClear(){size_tio_sz=sizeof(IO);ClearIO();memset((void*)(&IO+1),0,sizeof(*this)-io_sz);}// Zero-clear except IO as we preserve IO.Requests[] buffer allocation.
floatHoveredIdTimer;// Measure contiguous hovering time
floatHoveredIdNotActiveTimer;// Measure contiguous hovering time where the item has not been active
boolHoveredIdAllowOverlap;
boolHoveredIdDisabled;// At least one widget passed the rect test, but has been discarded by disabled flag or popup inhibit. May be true even if HoveredId == 0.
boolHoveredIdIsDisabled;// At least one widget passed the rect test, but has been discarded by disabled flag or popup inhibit. May be true even if HoveredId == 0.
boolItemUnclipByLog;// Disable ItemAdd() clipping, essentially a memory-locality friendly copy of LogEnabled
ImGuiIDActiveId;// Active widget
ImGuiIDActiveIdIsAlive;// Active widget has been seen this frame (we can't use a bool as the ActiveId may change within the frame)
@ -2047,8 +2120,10 @@ struct ImGuiContext
ImGuiIDNavHighlightActivatedId;
floatNavHighlightActivatedTimer;
ImGuiIDNavJustMovedToId;// Just navigated to this id (result of a successfully MoveRequest).
ImGuiIDNavJustMovedFromFocusScopeId;// Just navigated from this focus scope id (result of a successfully MoveRequest).
ImGuiIDNavJustMovedToFocusScopeId;// Just navigated to this focus scope id (result of a successfully MoveRequest).
ImGuiKeyChordNavJustMovedToKeyMods;
boolNavJustMovedToHasSelectionData;// " (FIXME-NAV: We should maybe just store ImGuiNavMoveResult)
ImGuiIDNavNextActivateId;// Set by ActivateItem(), queued until next frame.
ImGuiActivateFlagsNavNextActivateFlags;
ImGuiInputSourceNavInputSource;// Keyboard or Gamepad mode? THIS CAN ONLY BE ImGuiInputSource_Keyboard or ImGuiInputSource_Mouse
@ -2138,6 +2213,13 @@ struct ImGuiContext
ImVector<ImGuiPtrOrIndex>CurrentTabBarStack;
ImVector<ImGuiShrinkWidthItem>ShrinkWidthBuffer;
// Multi-Select state
ImGuiBoxSelectStateBoxSelectState;
ImGuiMultiSelectTempData*CurrentMultiSelect;
intMultiSelectTempDataStacked;// Temporary multi-select data size (because we leave previous instances undestructed, we generally don't use MultiSelectTempData.Size)
IMGUI_APIboolIsItemToggledSelection();// Was the last item selection toggled? (after Selectable(), TreeNode() etc. We only returns toggle _event_ in order to handle clipping correctly)
IMGUI_APIvoidBeginColumns(constchar*str_id,intcount,ImGuiOldColumnFlagsflags=0);// setup number of columns. use an identifier to distinguish multiple column sets. close with EndColumns().
@ -3446,7 +3545,6 @@ namespace ImGui
IMGUI_APIvoidTreePushOverrideID(ImGuiIDid);
IMGUI_APIvoidTreeNodeSetOpen(ImGuiIDid,boolopen);
IMGUI_APIboolTreeNodeUpdateNextOpen(ImGuiIDid,ImGuiTreeNodeFlagsflags);// Return open state. Consume previous SetNextItemOpen() data, if any. May return true when logging.
// Template functions are instantiated in imgui_widgets.cpp for a finite number of types.
// To use them externally (for custom widget) you may need an "extern template" statement in your code in order to link to existing instances and silence Clang warnings (see #2036).