CollapsingHeader returns true when opened but do not indent nor push into the ID stack (because of the ImGuiTreeNodeFlags_NoTreePushOnOpen flag). This is basically the same as calling TreeNodeEx(label, ImGuiTreeNodeFlags_CollapsingHeader). You can remove the _NoTreePushOnOpen flag if you want behavior closer to normal TreeNode().
| 7265 | // CollapsingHeader returns true when opened but do not indent nor push into the ID stack (because of the ImGuiTreeNodeFlags_NoTreePushOnOpen flag). |
| 7266 | // This is basically the same as calling TreeNodeEx(label, ImGuiTreeNodeFlags_CollapsingHeader). You can remove the _NoTreePushOnOpen flag if you want behavior closer to normal TreeNode(). |
| 7267 | bool ImGui::CollapsingHeader(const char* label, ImGuiTreeNodeFlags flags) |
| 7268 | { |
| 7269 | ImGuiWindow* window = GetCurrentWindow(); |
| 7270 | if (window->SkipItems) |
| 7271 | return false; |
| 7272 | ImGuiID id = window->GetID(label); |
| 7273 | return TreeNodeBehavior(id, flags | ImGuiTreeNodeFlags_CollapsingHeader, label); |
| 7274 | } |
| 7275 | |
| 7276 | // p_visible == NULL : regular collapsing header |
| 7277 | // p_visible != NULL && *p_visible == true : show a small close button on the corner of the header, clicking the button will set *p_visible = false |
nothing calls this directly
no test coverage detected