TreeNode: moved TreeNodeGetOpen() helper to public API. (#3823, #9251, #7553, #6754, #5423, #2958, #2079, #1947, #1131, #722)

Amend 0653a0d
This commit is contained in:
ocornut
2026-02-23 22:18:38 +01:00
parent 14b4d8a625
commit f6e0953b38
3 changed files with 5 additions and 1 deletions

View File

@@ -49,6 +49,10 @@ Breaking Changes:
Other Changes:
- TreeNode:
- Moved TreeNodeGetOpen() helper to public API. I was hesitant to make this public
because I intend to provide a more generic and feature-full version, but in the meanwhile
this will do. (#3823, #9251, #7553, #6754, #5423, #2958, #2079, #1947, #1131, #722)
- Style: border sizes are now scaled (and rounded) by ScaleAllSizes().
- Clipper:
- Clear `DisplayStart`/`DisplayEnd` fields when `Step()` returns false.

View File

@@ -756,6 +756,7 @@ namespace ImGui
IMGUI_API bool CollapsingHeader(const char* label, bool* p_visible, ImGuiTreeNodeFlags flags = 0); // when 'p_visible != NULL': if '*p_visible==true' display an additional small close button on upper right of the header which will set the bool to false when clicked, if '*p_visible==false' don't display the header.
IMGUI_API void SetNextItemOpen(bool is_open, ImGuiCond cond = 0); // set next TreeNode/CollapsingHeader open state.
IMGUI_API void SetNextItemStorageID(ImGuiID storage_id); // set id to use for open/close storage (default to same as item id).
IMGUI_API bool TreeNodeGetOpen(ImGuiID storage_id); // retrieve tree node open/close state.
// Widgets: Selectables
// - A selectable highlights when hovered, and can display another color when selected.

View File

@@ -294,7 +294,6 @@ void* GImGuiDemoMarkerCallbackUserData = NULL;
namespace ImGui
{
IMGUI_API void ShowFontAtlas(ImFontAtlas* atlas);
IMGUI_API bool TreeNodeGetOpen(ImGuiID storage_id);
IMGUI_API void TreeNodeSetOpen(ImGuiID storage_id, bool is_open);
}