MCPcopy Create free account
hub / github.com/Aegel5/SimpleSwitcher / DockNodeWindowMenuUpdate

Method DockNodeWindowMenuUpdate

imgui_tiny_app/imgui/imgui.cpp:19357–19371  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19355}
19356
19357static void ImGui::DockNodeWindowMenuUpdate(ImGuiDockNode* node, ImGuiTabBar* tab_bar)
19358{
19359 // Try to position the menu so it is more likely to stays within the same viewport
19360 ImGuiContext& g = *GImGui;
19361 if (g.Style.WindowMenuButtonPosition == ImGuiDir_Left)
19362 SetNextWindowPos(ImVec2(node->Pos.x, node->Pos.y + GetFrameHeight()), ImGuiCond_Always, ImVec2(0.0f, 0.0f));
19363 else
19364 SetNextWindowPos(ImVec2(node->Pos.x + node->Size.x, node->Pos.y + GetFrameHeight()), ImGuiCond_Always, ImVec2(1.0f, 0.0f));
19365 if (BeginPopup("#WindowMenu"))
19366 {
19367 node->IsFocused = true;
19368 g.DockNodeWindowMenuHandler(&g, node, tab_bar);
19369 EndPopup();
19370 }
19371}
19372
19373// User helper to append/amend into a dock node tab bar. Most commonly used to add e.g. a "+" button.
19374bool ImGui::DockNodeBeginAmendTabBar(ImGuiDockNode* node)

Callers

nothing calls this directly

Calls 1

ImVec2Function · 0.85

Tested by

no test coverage detected