MCPcopy Create free account
hub / github.com/Joe1sn/S-inject / TreeSetAllInOpenNodes

Method TreeSetAllInOpenNodes

extern/ImGui/imgui_demo.cpp:3085–3092  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3083 }
3084
3085 static void TreeSetAllInOpenNodes(ExampleTreeNode* node, ImGuiSelectionBasicStorage* selection, bool selected)
3086 {
3087 if (node->Parent != NULL) // Root node isn't visible nor selectable in our scheme
3088 selection->SetItemSelected((ImGuiID)node->UID, selected);
3089 if (node->Parent == NULL || TreeNodeGetOpen(node))
3090 for (ExampleTreeNode* child : node->Childs)
3091 TreeSetAllInOpenNodes(child, selection, selected);
3092 }
3093
3094 // Interpolate in *user-visible order* AND only *over opened nodes*.
3095 // If you have a sequential mapping tables (e.g. generated after a filter/search pass) this would be simpler.

Callers

nothing calls this directly

Calls 1

SetItemSelectedMethod · 0.80

Tested by

no test coverage detected