mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-20 14:56:35 +00:00
+ extraded bits of metrics into DebugNodeDockNodeFlags()
This commit is contained in:
parent
36a0d1028c
commit
0a8ab75e4b
@ -144,6 +144,8 @@ Docking+Viewports Branch:
|
||||
|
||||
- Docking: Clicking on the right-most close button of a docking node closes all windows. (#4186)
|
||||
- Docking: Fix IsWindowAppearing() and ImGuiCond_Appearing on docked windows. (#4177, #3982, #1497, #1061)
|
||||
- Docking: (Internal/Experimental) Removed DockNodeFlagsOverrideClear flags from ImGuiWindowClass as
|
||||
it is ambiguous how to apply them and we haven't got a use out of them yet.
|
||||
- Viewports: Fix popup/tooltip created without a parent window from being given a ParentViewportId value
|
||||
from the implicit/fallback window. (#4236, #2409)
|
||||
- Backends: Vulkan: Fix the use of the incorrect fence for secondary viewports. (#4208) [@FunMiles]
|
||||
|
39
imgui.cpp
39
imgui.cpp
@ -13442,7 +13442,7 @@ static void ImGui::DockNodeUpdateVisibleFlagAndInactiveChilds(ImGuiDockNode* nod
|
||||
else
|
||||
{
|
||||
// FIXME-DOCKING: Missing policies for conflict resolution, hence the "Experimental" tag on this.
|
||||
node->LocalFlags &= ~window->WindowClass.DockNodeFlagsOverrideClear;
|
||||
//node->LocalFlags &= ~window->WindowClass.DockNodeFlagsOverrideClear;
|
||||
node->LocalFlags |= window->WindowClass.DockNodeFlagsOverrideSet;
|
||||
}
|
||||
}
|
||||
@ -16677,6 +16677,33 @@ void ImGui::DebugNodeColumns(ImGuiOldColumns* columns)
|
||||
TreePop();
|
||||
}
|
||||
|
||||
static void DebugNodeDockNodeFlags(ImGuiDockNodeFlags* p_flags, const char* label, bool enabled)
|
||||
{
|
||||
using namespace ImGui;
|
||||
PushID(label);
|
||||
PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(0.0f, 0.0f));
|
||||
Text("%s:", label);
|
||||
if (!enabled)
|
||||
PushDisabled();
|
||||
CheckboxFlags("NoSplit", p_flags, ImGuiDockNodeFlags_NoSplit);
|
||||
CheckboxFlags("NoResize", p_flags, ImGuiDockNodeFlags_NoResize);
|
||||
CheckboxFlags("NoResizeX", p_flags, ImGuiDockNodeFlags_NoResizeX);
|
||||
CheckboxFlags("NoResizeY",p_flags, ImGuiDockNodeFlags_NoResizeY);
|
||||
CheckboxFlags("NoTabBar", p_flags, ImGuiDockNodeFlags_NoTabBar);
|
||||
CheckboxFlags("HiddenTabBar", p_flags, ImGuiDockNodeFlags_HiddenTabBar);
|
||||
CheckboxFlags("NoWindowMenuButton", p_flags, ImGuiDockNodeFlags_NoWindowMenuButton);
|
||||
CheckboxFlags("NoCloseButton", p_flags, ImGuiDockNodeFlags_NoCloseButton);
|
||||
CheckboxFlags("NoDocking", p_flags, ImGuiDockNodeFlags_NoDocking);
|
||||
CheckboxFlags("NoDockingSplitMe", p_flags, ImGuiDockNodeFlags_NoDockingSplitMe);
|
||||
CheckboxFlags("NoDockingSplitOther", p_flags, ImGuiDockNodeFlags_NoDockingSplitOther);
|
||||
CheckboxFlags("NoDockingOverMe", p_flags, ImGuiDockNodeFlags_NoDockingOverMe);
|
||||
CheckboxFlags("NoDockingOverOther", p_flags, ImGuiDockNodeFlags_NoDockingOverOther);
|
||||
if (!enabled)
|
||||
PopDisabled();
|
||||
PopStyleVar();
|
||||
PopID();
|
||||
}
|
||||
|
||||
// [DEBUG] Display contents of ImDockNode
|
||||
void ImGui::DebugNodeDockNode(ImGuiDockNode* node, const char* label)
|
||||
{
|
||||
@ -16709,15 +16736,7 @@ void ImGui::DebugNodeDockNode(ImGuiDockNode* node, const char* label)
|
||||
node->WantLockSizeOnce ? " WantLockSizeOnce" : "");
|
||||
if (TreeNode("flags", "LocalFlags: 0x%04X SharedFlags: 0x%04X", node->LocalFlags, node->SharedFlags))
|
||||
{
|
||||
CheckboxFlags("LocalFlags: NoDocking", &node->LocalFlags, ImGuiDockNodeFlags_NoDocking);
|
||||
CheckboxFlags("LocalFlags: NoSplit", &node->LocalFlags, ImGuiDockNodeFlags_NoSplit);
|
||||
CheckboxFlags("LocalFlags: NoResize", &node->LocalFlags, ImGuiDockNodeFlags_NoResize);
|
||||
CheckboxFlags("LocalFlags: NoResizeX", &node->LocalFlags, ImGuiDockNodeFlags_NoResizeX);
|
||||
CheckboxFlags("LocalFlags: NoResizeY", &node->LocalFlags, ImGuiDockNodeFlags_NoResizeY);
|
||||
CheckboxFlags("LocalFlags: NoTabBar", &node->LocalFlags, ImGuiDockNodeFlags_NoTabBar);
|
||||
CheckboxFlags("LocalFlags: HiddenTabBar", &node->LocalFlags, ImGuiDockNodeFlags_HiddenTabBar);
|
||||
CheckboxFlags("LocalFlags: NoWindowMenuButton", &node->LocalFlags, ImGuiDockNodeFlags_NoWindowMenuButton);
|
||||
CheckboxFlags("LocalFlags: NoCloseButton", &node->LocalFlags, ImGuiDockNodeFlags_NoCloseButton);
|
||||
DebugNodeDockNodeFlags(&node->LocalFlags, "LocalFlags", true);
|
||||
TreePop();
|
||||
}
|
||||
if (node->ParentNode)
|
||||
|
1
imgui.h
1
imgui.h
@ -2068,7 +2068,6 @@ struct ImGuiWindowClass
|
||||
ImGuiViewportFlags ViewportFlagsOverrideClear; // Viewport flags to clear when a window of this class owns a viewport. This allows you to enforce OS decoration or task bar icon, override the defaults on a per-window basis.
|
||||
ImGuiTabItemFlags TabItemFlagsOverrideSet; // [EXPERIMENTAL] TabItem flags to set when a window of this class gets submitted into a dock node tab bar. May use with ImGuiTabItemFlags_Leading or ImGuiTabItemFlags_Trailing.
|
||||
ImGuiDockNodeFlags DockNodeFlagsOverrideSet; // [EXPERIMENTAL] Dock node flags to set when a window of this class is hosted by a dock node (it doesn't have to be selected!)
|
||||
ImGuiDockNodeFlags DockNodeFlagsOverrideClear; // [EXPERIMENTAL]
|
||||
bool DockingAlwaysTabBar; // Set to true to enforce single floating windows of this class always having their own docking node (equivalent of setting the global io.ConfigDockingAlwaysTabBar)
|
||||
bool DockingAllowUnclassed; // Set to true to allow windows of this class to be docked/merged with an unclassed window. // FIXME-DOCK: Move to DockNodeFlags override?
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user