From f5c5a710aa38b91be39b1c219f3bb90e2e15df80 Mon Sep 17 00:00:00 2001 From: ocornut Date: Mon, 6 Mar 2023 17:08:09 +0100 Subject: [PATCH] Docking: exposed DockNodeWindowMenuHandler_Default() in imgui_internal.h to facilitate reuse. --- imgui.cpp | 3 +-- imgui_internal.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index dc6942b3..1a57dd3e 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -14654,7 +14654,6 @@ namespace ImGui static void DockNodeAddTabBar(ImGuiDockNode* node); static void DockNodeRemoveTabBar(ImGuiDockNode* node); static void DockNodeWindowMenuUpdate(ImGuiDockNode* node, ImGuiTabBar* tab_bar); - static void DockNodeWindowMenuHandler_Default(ImGuiContext* ctx, ImGuiDockNode* node, ImGuiTabBar* tab_bar); static void DockNodeUpdateVisibleFlag(ImGuiDockNode* node); static void DockNodeStartMouseMovingWindow(ImGuiDockNode* node, ImGuiWindow* window); static bool DockNodeIsDropAllowed(ImGuiWindow* host_window, ImGuiWindow* payload_window); @@ -16136,7 +16135,7 @@ static int IMGUI_CDECL TabItemComparerByDockOrder(const void* lhs, const void* r // This is exceptionally stored in a function pointer to also user applications to tweak this menu (undocumented) // Custom overrides may want to decorate, group, sort entries. // Please note those are internal structures: if you copy this expect occasional breakage. -static void ImGui::DockNodeWindowMenuHandler_Default(ImGuiContext* ctx, ImGuiDockNode* node, ImGuiTabBar* tab_bar) +void ImGui::DockNodeWindowMenuHandler_Default(ImGuiContext* ctx, ImGuiDockNode* node, ImGuiTabBar* tab_bar) { IM_UNUSED(ctx); if (tab_bar->Tabs.Size == 1) diff --git a/imgui_internal.h b/imgui_internal.h index 9792501c..152e472d 100644 --- a/imgui_internal.h +++ b/imgui_internal.h @@ -3192,6 +3192,7 @@ namespace ImGui IMGUI_API void DockContextProcessUndockNode(ImGuiContext* ctx, ImGuiDockNode* node); IMGUI_API bool DockContextCalcDropPosForDocking(ImGuiWindow* target, ImGuiDockNode* target_node, ImGuiWindow* payload_window, ImGuiDockNode* payload_node, ImGuiDir split_dir, bool split_outer, ImVec2* out_pos); IMGUI_API ImGuiDockNode*DockContextFindNodeByID(ImGuiContext* ctx, ImGuiID id); + IMGUI_API void DockNodeWindowMenuHandler_Default(ImGuiContext* ctx, ImGuiDockNode* node, ImGuiTabBar* tab_bar); IMGUI_API bool DockNodeBeginAmendTabBar(ImGuiDockNode* node); IMGUI_API void DockNodeEndAmendTabBar(); inline ImGuiDockNode* DockNodeGetRootNode(ImGuiDockNode* node) { while (node->ParentNode) node = node->ParentNode; return node; }