mirror of
https://github.com/ocornut/imgui.git
synced 2025-01-19 16:13:00 +08:00
Docking: exposed DockNodeWindowMenuHandler_Default() in imgui_internal.h to facilitate reuse.
This commit is contained in:
parent
4078abe14c
commit
f5c5a710aa
@ -14654,7 +14654,6 @@ namespace ImGui
|
|||||||
static void DockNodeAddTabBar(ImGuiDockNode* node);
|
static void DockNodeAddTabBar(ImGuiDockNode* node);
|
||||||
static void DockNodeRemoveTabBar(ImGuiDockNode* node);
|
static void DockNodeRemoveTabBar(ImGuiDockNode* node);
|
||||||
static void DockNodeWindowMenuUpdate(ImGuiDockNode* node, ImGuiTabBar* tab_bar);
|
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 DockNodeUpdateVisibleFlag(ImGuiDockNode* node);
|
||||||
static void DockNodeStartMouseMovingWindow(ImGuiDockNode* node, ImGuiWindow* window);
|
static void DockNodeStartMouseMovingWindow(ImGuiDockNode* node, ImGuiWindow* window);
|
||||||
static bool DockNodeIsDropAllowed(ImGuiWindow* host_window, ImGuiWindow* payload_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)
|
// 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.
|
// Custom overrides may want to decorate, group, sort entries.
|
||||||
// Please note those are internal structures: if you copy this expect occasional breakage.
|
// 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);
|
IM_UNUSED(ctx);
|
||||||
if (tab_bar->Tabs.Size == 1)
|
if (tab_bar->Tabs.Size == 1)
|
||||||
|
@ -3192,6 +3192,7 @@ namespace ImGui
|
|||||||
IMGUI_API void DockContextProcessUndockNode(ImGuiContext* ctx, ImGuiDockNode* node);
|
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 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 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 bool DockNodeBeginAmendTabBar(ImGuiDockNode* node);
|
||||||
IMGUI_API void DockNodeEndAmendTabBar();
|
IMGUI_API void DockNodeEndAmendTabBar();
|
||||||
inline ImGuiDockNode* DockNodeGetRootNode(ImGuiDockNode* node) { while (node->ParentNode) node = node->ParentNode; return node; }
|
inline ImGuiDockNode* DockNodeGetRootNode(ImGuiDockNode* node) { while (node->ParentNode) node = node->ParentNode; return node; }
|
||||||
|
Loading…
Reference in New Issue
Block a user