| 19355 | } |
| 19356 | |
| 19357 | static 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. |
| 19374 | bool ImGui::DockNodeBeginAmendTabBar(ImGuiDockNode* node) |