mirror of
https://github.com/ocornut/imgui.git
synced 2025-01-31 03:53:44 +01:00
Docking: (Breaking) renamed ImGuiDockNodeFlags_NoDockingInCentralNode -> ImGuiDockNodeFlags_NoDockingOverCentralNode, ImGuiDockNodeFlags_NoSplit -> ImGuiDockNodeFlags_NoDockingSplit.
Shuffled other internal flags and added comments.
This commit is contained in:
parent
f693c3d806
commit
72d760ba00
@ -98,6 +98,12 @@ Other changes:
|
|||||||
- Backends: Win32: Added support for keyboard codepage conversion for when application
|
- Backends: Win32: Added support for keyboard codepage conversion for when application
|
||||||
is compiled in MBCS mode and using a non-Unicode window. (#6785, #6782, #5725, #5961) [@sneakyevil]
|
is compiled in MBCS mode and using a non-Unicode window. (#6785, #6782, #5725, #5961) [@sneakyevil]
|
||||||
|
|
||||||
|
Docking+Viewports Branch:
|
||||||
|
|
||||||
|
- Docking: renamed ImGuiDockNodeFlags_NoSplit to ImGuiDockNodeFlags_NoDockingSplit.
|
||||||
|
- Docking: renamed ImGuiDockNodeFlags_NoDockingInCentralNode to ImGuiDockNodeFlags_NoDockingOverCentralNode.
|
||||||
|
- Docking: Internals: renamed ImGuiDockNodeFlags_NoDockingSplitMe to ImGuiDockNodeFlags_NoDockingSplit.
|
||||||
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------
|
-----------------------------------------------------------------------
|
||||||
VERSION 1.89.9 (Released 2023-09-04)
|
VERSION 1.89.9 (Released 2023-09-04)
|
||||||
|
11
imgui.cpp
11
imgui.cpp
@ -17188,7 +17188,7 @@ static void ImGui::DockNodePreviewDockSetup(ImGuiWindow* host_window, ImGuiDockN
|
|||||||
data->IsCenterAvailable = false;
|
data->IsCenterAvailable = false;
|
||||||
else if (dst_node_flags & ImGuiDockNodeFlags_NoDockingOverMe)
|
else if (dst_node_flags & ImGuiDockNodeFlags_NoDockingOverMe)
|
||||||
data->IsCenterAvailable = false;
|
data->IsCenterAvailable = false;
|
||||||
else if (host_node && (dst_node_flags & ImGuiDockNodeFlags_NoDockingInCentralNode) && host_node->IsCentralNode())
|
else if (host_node && (dst_node_flags & ImGuiDockNodeFlags_NoDockingOverCentralNode) && host_node->IsCentralNode())
|
||||||
data->IsCenterAvailable = false;
|
data->IsCenterAvailable = false;
|
||||||
else if ((!host_node || !host_node->IsEmpty()) && payload_node && payload_node->IsSplitNode() && (payload_node->OnlyNodeWithWindows == NULL)) // Is _visibly_ split?
|
else if ((!host_node || !host_node->IsEmpty()) && payload_node && payload_node->IsSplitNode() && (payload_node->OnlyNodeWithWindows == NULL)) // Is _visibly_ split?
|
||||||
data->IsCenterAvailable = false;
|
data->IsCenterAvailable = false;
|
||||||
@ -17198,7 +17198,7 @@ static void ImGui::DockNodePreviewDockSetup(ImGuiWindow* host_window, ImGuiDockN
|
|||||||
data->IsCenterAvailable = false;
|
data->IsCenterAvailable = false;
|
||||||
|
|
||||||
data->IsSidesAvailable = true;
|
data->IsSidesAvailable = true;
|
||||||
if ((dst_node_flags & ImGuiDockNodeFlags_NoSplit) /*|| (dst_node_flags & ImGuiDockNodeFlags_NoDockingSplitMe)*/ || g.IO.ConfigDockingNoSplit)
|
if ((dst_node_flags & ImGuiDockNodeFlags_NoDockingSplit) || g.IO.ConfigDockingNoSplit)
|
||||||
data->IsSidesAvailable = false;
|
data->IsSidesAvailable = false;
|
||||||
else if (!is_outer_docking && host_node && host_node->ParentNode == NULL && host_node->IsCentralNode())
|
else if (!is_outer_docking && host_node && host_node->ParentNode == NULL && host_node->IsCentralNode())
|
||||||
data->IsSidesAvailable = false;
|
data->IsSidesAvailable = false;
|
||||||
@ -17364,7 +17364,7 @@ static void ImGui::DockNodePreviewDockRender(ImGuiWindow* host_window, ImGuiDock
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Stop after ImGuiDir_None
|
// Stop after ImGuiDir_None
|
||||||
if ((host_node && (host_node->MergedFlags & ImGuiDockNodeFlags_NoSplit)) || g.IO.ConfigDockingNoSplit)
|
if ((host_node && (host_node->MergedFlags & ImGuiDockNodeFlags_NoDockingSplit)) || g.IO.ConfigDockingNoSplit)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -19906,7 +19906,6 @@ static void DebugNodeDockNodeFlags(ImGuiDockNodeFlags* p_flags, const char* labe
|
|||||||
Text("%s:", label);
|
Text("%s:", label);
|
||||||
if (!enabled)
|
if (!enabled)
|
||||||
BeginDisabled();
|
BeginDisabled();
|
||||||
CheckboxFlags("NoSplit", p_flags, ImGuiDockNodeFlags_NoSplit);
|
|
||||||
CheckboxFlags("NoResize", p_flags, ImGuiDockNodeFlags_NoResize);
|
CheckboxFlags("NoResize", p_flags, ImGuiDockNodeFlags_NoResize);
|
||||||
CheckboxFlags("NoResizeX", p_flags, ImGuiDockNodeFlags_NoResizeX);
|
CheckboxFlags("NoResizeX", p_flags, ImGuiDockNodeFlags_NoResizeX);
|
||||||
CheckboxFlags("NoResizeY",p_flags, ImGuiDockNodeFlags_NoResizeY);
|
CheckboxFlags("NoResizeY",p_flags, ImGuiDockNodeFlags_NoResizeY);
|
||||||
@ -19915,9 +19914,9 @@ static void DebugNodeDockNodeFlags(ImGuiDockNodeFlags* p_flags, const char* labe
|
|||||||
CheckboxFlags("NoWindowMenuButton", p_flags, ImGuiDockNodeFlags_NoWindowMenuButton);
|
CheckboxFlags("NoWindowMenuButton", p_flags, ImGuiDockNodeFlags_NoWindowMenuButton);
|
||||||
CheckboxFlags("NoCloseButton", p_flags, ImGuiDockNodeFlags_NoCloseButton);
|
CheckboxFlags("NoCloseButton", p_flags, ImGuiDockNodeFlags_NoCloseButton);
|
||||||
CheckboxFlags("NoDocking", p_flags, ImGuiDockNodeFlags_NoDocking); // Multiple flags
|
CheckboxFlags("NoDocking", p_flags, ImGuiDockNodeFlags_NoDocking); // Multiple flags
|
||||||
CheckboxFlags("NoDockingSplitMe", p_flags, ImGuiDockNodeFlags_NoDockingSplitMe);
|
CheckboxFlags("NoDockingSplit", p_flags, ImGuiDockNodeFlags_NoDockingSplit);
|
||||||
CheckboxFlags("NoDockingSplitOther", p_flags, ImGuiDockNodeFlags_NoDockingSplitOther);
|
CheckboxFlags("NoDockingSplitOther", p_flags, ImGuiDockNodeFlags_NoDockingSplitOther);
|
||||||
CheckboxFlags("NoDockingOverMe", p_flags, ImGuiDockNodeFlags_NoDockingOverMe);
|
CheckboxFlags("NoDockingOver", p_flags, ImGuiDockNodeFlags_NoDockingOverMe);
|
||||||
CheckboxFlags("NoDockingOverOther", p_flags, ImGuiDockNodeFlags_NoDockingOverOther);
|
CheckboxFlags("NoDockingOverOther", p_flags, ImGuiDockNodeFlags_NoDockingOverOther);
|
||||||
CheckboxFlags("NoDockingOverEmpty", p_flags, ImGuiDockNodeFlags_NoDockingOverEmpty);
|
CheckboxFlags("NoDockingOverEmpty", p_flags, ImGuiDockNodeFlags_NoDockingOverEmpty);
|
||||||
CheckboxFlags("NoUndocking", p_flags, ImGuiDockNodeFlags_NoUndocking);
|
CheckboxFlags("NoUndocking", p_flags, ImGuiDockNodeFlags_NoUndocking);
|
||||||
|
9
imgui.h
9
imgui.h
@ -1380,11 +1380,16 @@ enum ImGuiDockNodeFlags_
|
|||||||
ImGuiDockNodeFlags_None = 0,
|
ImGuiDockNodeFlags_None = 0,
|
||||||
ImGuiDockNodeFlags_KeepAliveOnly = 1 << 0, // // Don't display the dockspace node but keep it alive. Windows docked into this dockspace node won't be undocked.
|
ImGuiDockNodeFlags_KeepAliveOnly = 1 << 0, // // Don't display the dockspace node but keep it alive. Windows docked into this dockspace node won't be undocked.
|
||||||
//ImGuiDockNodeFlags_NoCentralNode = 1 << 1, // // Disable Central Node (the node which can stay empty)
|
//ImGuiDockNodeFlags_NoCentralNode = 1 << 1, // // Disable Central Node (the node which can stay empty)
|
||||||
ImGuiDockNodeFlags_NoDockingInCentralNode = 1 << 2, // // Disable docking inside the Central Node, which will be always kept empty.
|
ImGuiDockNodeFlags_NoDockingOverCentralNode = 1 << 2, // // Disable docking over the Central Node, which will be always kept empty.
|
||||||
ImGuiDockNodeFlags_PassthruCentralNode = 1 << 3, // // Enable passthru dockspace: 1) DockSpace() will render a ImGuiCol_WindowBg background covering everything excepted the Central Node when empty. Meaning the host window should probably use SetNextWindowBgAlpha(0.0f) prior to Begin() when using this. 2) When Central Node is empty: let inputs pass-through + won't display a DockingEmptyBg background. See demo for details.
|
ImGuiDockNodeFlags_PassthruCentralNode = 1 << 3, // // Enable passthru dockspace: 1) DockSpace() will render a ImGuiCol_WindowBg background covering everything excepted the Central Node when empty. Meaning the host window should probably use SetNextWindowBgAlpha(0.0f) prior to Begin() when using this. 2) When Central Node is empty: let inputs pass-through + won't display a DockingEmptyBg background. See demo for details.
|
||||||
ImGuiDockNodeFlags_NoSplit = 1 << 4, // // Disable splitting the node into smaller nodes. Useful e.g. when embedding dockspaces into a main root one (the root one may have splitting disabled to reduce confusion). Note: when turned off, existing splits will be preserved.
|
ImGuiDockNodeFlags_NoDockingSplit = 1 << 4, // // Disable other windows/nodes from splitting this node.
|
||||||
ImGuiDockNodeFlags_NoResize = 1 << 5, // Saved // Disable resizing node using the splitter/separators. Useful with programmatically setup dockspaces.
|
ImGuiDockNodeFlags_NoResize = 1 << 5, // Saved // Disable resizing node using the splitter/separators. Useful with programmatically setup dockspaces.
|
||||||
ImGuiDockNodeFlags_AutoHideTabBar = 1 << 6, // // Tab bar will automatically hide when there is a single window in the dock node.
|
ImGuiDockNodeFlags_AutoHideTabBar = 1 << 6, // // Tab bar will automatically hide when there is a single window in the dock node.
|
||||||
|
|
||||||
|
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||||
|
ImGuiDockNodeFlags_NoSplit = ImGuiDockNodeFlags_NoDockingSplit, // Renamed in 1.90
|
||||||
|
ImGuiDockNodeFlags_NoDockingInCentralNode = ImGuiDockNodeFlags_NoDockingOverCentralNode, // Renamed in 1.90
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
// Flags for ImGui::BeginDragDropSource(), ImGui::AcceptDragDropPayload()
|
// Flags for ImGui::BeginDragDropSource(), ImGui::AcceptDragDropPayload()
|
||||||
|
@ -8183,9 +8183,9 @@ void ShowExampleAppDockSpace(bool* p_open)
|
|||||||
ImGui::MenuItem("Padding", NULL, &opt_padding);
|
ImGui::MenuItem("Padding", NULL, &opt_padding);
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
if (ImGui::MenuItem("Flag: NoSplit", "", (dockspace_flags & ImGuiDockNodeFlags_NoSplit) != 0)) { dockspace_flags ^= ImGuiDockNodeFlags_NoSplit; }
|
if (ImGui::MenuItem("Flag: NoDockingOverCentralNode", "", (dockspace_flags & ImGuiDockNodeFlags_NoDockingOverCentralNode) != 0)) { dockspace_flags ^= ImGuiDockNodeFlags_NoDockingOverCentralNode; }
|
||||||
|
if (ImGui::MenuItem("Flag: NoDockingSplit", "", (dockspace_flags & ImGuiDockNodeFlags_NoDockingSplit) != 0)) { dockspace_flags ^= ImGuiDockNodeFlags_NoDockingSplit; }
|
||||||
if (ImGui::MenuItem("Flag: NoResize", "", (dockspace_flags & ImGuiDockNodeFlags_NoResize) != 0)) { dockspace_flags ^= ImGuiDockNodeFlags_NoResize; }
|
if (ImGui::MenuItem("Flag: NoResize", "", (dockspace_flags & ImGuiDockNodeFlags_NoResize) != 0)) { dockspace_flags ^= ImGuiDockNodeFlags_NoResize; }
|
||||||
if (ImGui::MenuItem("Flag: NoDockingInCentralNode", "", (dockspace_flags & ImGuiDockNodeFlags_NoDockingInCentralNode) != 0)) { dockspace_flags ^= ImGuiDockNodeFlags_NoDockingInCentralNode; }
|
|
||||||
if (ImGui::MenuItem("Flag: AutoHideTabBar", "", (dockspace_flags & ImGuiDockNodeFlags_AutoHideTabBar) != 0)) { dockspace_flags ^= ImGuiDockNodeFlags_AutoHideTabBar; }
|
if (ImGui::MenuItem("Flag: AutoHideTabBar", "", (dockspace_flags & ImGuiDockNodeFlags_AutoHideTabBar) != 0)) { dockspace_flags ^= ImGuiDockNodeFlags_AutoHideTabBar; }
|
||||||
if (ImGui::MenuItem("Flag: PassthruCentralNode", "", (dockspace_flags & ImGuiDockNodeFlags_PassthruCentralNode) != 0, opt_fullscreen)) { dockspace_flags ^= ImGuiDockNodeFlags_PassthruCentralNode; }
|
if (ImGui::MenuItem("Flag: PassthruCentralNode", "", (dockspace_flags & ImGuiDockNodeFlags_PassthruCentralNode) != 0, opt_fullscreen)) { dockspace_flags ^= ImGuiDockNodeFlags_PassthruCentralNode; }
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
@ -1699,21 +1699,22 @@ enum ImGuiDockNodeFlagsPrivate_
|
|||||||
ImGuiDockNodeFlags_HiddenTabBar = 1 << 13, // Saved // Tab bar is hidden, with a triangle in the corner to show it again (NB: actual tab-bar instance may be destroyed as this is only used for single-window tab bar)
|
ImGuiDockNodeFlags_HiddenTabBar = 1 << 13, // Saved // Tab bar is hidden, with a triangle in the corner to show it again (NB: actual tab-bar instance may be destroyed as this is only used for single-window tab bar)
|
||||||
ImGuiDockNodeFlags_NoWindowMenuButton = 1 << 14, // Saved // Disable window/docking menu (that one that appears instead of the collapse button)
|
ImGuiDockNodeFlags_NoWindowMenuButton = 1 << 14, // Saved // Disable window/docking menu (that one that appears instead of the collapse button)
|
||||||
ImGuiDockNodeFlags_NoCloseButton = 1 << 15, // Saved // Disable close button
|
ImGuiDockNodeFlags_NoCloseButton = 1 << 15, // Saved // Disable close button
|
||||||
|
ImGuiDockNodeFlags_NoResizeX = 1 << 16, // //
|
||||||
|
ImGuiDockNodeFlags_NoResizeY = 1 << 17, // //
|
||||||
// Disable docking/undocking actions in this dockspace or individual node (existing docked nodes will be preserved)
|
// Disable docking/undocking actions in this dockspace or individual node (existing docked nodes will be preserved)
|
||||||
ImGuiDockNodeFlags_NoUndocking = 1 << 16, // // Disable undocking this node.
|
// Those are not exposed in public because the desirable sharing/inheriting/copy-flag-on-split behaviors are quite difficult to design and understand.
|
||||||
ImGuiDockNodeFlags_NoDockingSplitMe = 1 << 17, // // Disable other windows/nodes from splitting this node.
|
// The two public flags ImGuiDockNodeFlags_NoDockingOverCentralNode/ImGuiDockNodeFlags_NoDockingSplit don't have those issues.
|
||||||
ImGuiDockNodeFlags_NoDockingSplitOther = 1 << 18, // // Disable this node from splitting other windows/nodes.
|
ImGuiDockNodeFlags_NoUndocking = 1 << 18, // // Disable undocking this node.
|
||||||
ImGuiDockNodeFlags_NoDockingOverMe = 1 << 19, // // Disable other windows/nodes from being docked over this node.
|
ImGuiDockNodeFlags_NoDockingSplitOther = 1 << 19, // // Disable this node from splitting other windows/nodes.
|
||||||
ImGuiDockNodeFlags_NoDockingOverOther = 1 << 20, // // Disable this node from being docked over another window or non-empty node.
|
ImGuiDockNodeFlags_NoDockingOverMe = 1 << 20, // // Disable other windows/nodes from being docked over this node.
|
||||||
ImGuiDockNodeFlags_NoDockingOverEmpty = 1 << 21, // // Disable this node from being docked over an empty node (e.g. DockSpace with no other windows)
|
ImGuiDockNodeFlags_NoDockingOverOther = 1 << 21, // // Disable this node from being docked over another window or non-empty node.
|
||||||
ImGuiDockNodeFlags_NoDocking = ImGuiDockNodeFlags_NoDockingOverMe | ImGuiDockNodeFlags_NoDockingOverOther | ImGuiDockNodeFlags_NoDockingOverEmpty | ImGuiDockNodeFlags_NoDockingSplitMe | ImGuiDockNodeFlags_NoDockingSplitOther,
|
ImGuiDockNodeFlags_NoDockingOverEmpty = 1 << 22, // // Disable this node from being docked over an empty node (e.g. DockSpace with no other windows)
|
||||||
ImGuiDockNodeFlags_NoResizeX = 1 << 22, // //
|
ImGuiDockNodeFlags_NoDocking = ImGuiDockNodeFlags_NoDockingOverMe | ImGuiDockNodeFlags_NoDockingOverOther | ImGuiDockNodeFlags_NoDockingOverEmpty | ImGuiDockNodeFlags_NoDockingSplit | ImGuiDockNodeFlags_NoDockingSplitOther,
|
||||||
ImGuiDockNodeFlags_NoResizeY = 1 << 23, // //
|
|
||||||
// Masks
|
// Masks
|
||||||
ImGuiDockNodeFlags_SharedFlagsInheritMask_ = ~0,
|
ImGuiDockNodeFlags_SharedFlagsInheritMask_ = ~0,
|
||||||
ImGuiDockNodeFlags_NoResizeFlagsMask_ = ImGuiDockNodeFlags_NoResize | ImGuiDockNodeFlags_NoResizeX | ImGuiDockNodeFlags_NoResizeY,
|
ImGuiDockNodeFlags_NoResizeFlagsMask_ = ImGuiDockNodeFlags_NoResize | ImGuiDockNodeFlags_NoResizeX | ImGuiDockNodeFlags_NoResizeY,
|
||||||
// When splitting, those local flags are moved to the inheriting child, never duplicated
|
// When splitting, those local flags are moved to the inheriting child, never duplicated
|
||||||
ImGuiDockNodeFlags_LocalFlagsTransferMask_ = ImGuiDockNodeFlags_NoSplit | ImGuiDockNodeFlags_NoResizeFlagsMask_ | ImGuiDockNodeFlags_AutoHideTabBar | ImGuiDockNodeFlags_CentralNode | ImGuiDockNodeFlags_NoTabBar | ImGuiDockNodeFlags_HiddenTabBar | ImGuiDockNodeFlags_NoWindowMenuButton | ImGuiDockNodeFlags_NoCloseButton,
|
ImGuiDockNodeFlags_LocalFlagsTransferMask_ = ImGuiDockNodeFlags_NoDockingSplit | ImGuiDockNodeFlags_NoResizeFlagsMask_ | ImGuiDockNodeFlags_AutoHideTabBar | ImGuiDockNodeFlags_CentralNode | ImGuiDockNodeFlags_NoTabBar | ImGuiDockNodeFlags_HiddenTabBar | ImGuiDockNodeFlags_NoWindowMenuButton | ImGuiDockNodeFlags_NoCloseButton,
|
||||||
ImGuiDockNodeFlags_SavedFlagsMask_ = ImGuiDockNodeFlags_NoResizeFlagsMask_ | ImGuiDockNodeFlags_DockSpace | ImGuiDockNodeFlags_CentralNode | ImGuiDockNodeFlags_NoTabBar | ImGuiDockNodeFlags_HiddenTabBar | ImGuiDockNodeFlags_NoWindowMenuButton | ImGuiDockNodeFlags_NoCloseButton,
|
ImGuiDockNodeFlags_SavedFlagsMask_ = ImGuiDockNodeFlags_NoResizeFlagsMask_ | ImGuiDockNodeFlags_DockSpace | ImGuiDockNodeFlags_CentralNode | ImGuiDockNodeFlags_NoTabBar | ImGuiDockNodeFlags_HiddenTabBar | ImGuiDockNodeFlags_NoWindowMenuButton | ImGuiDockNodeFlags_NoCloseButton,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user