Renamed ImGuiDockNodeFlags_Dockspace to ImGuiDockNodeFlags_DockSpace for consistency. DockBuilderCopyDockspace() to DockBuilderCopyDockSpace(). Made casing consistent elsewhere. (#2109)

This commit is contained in:
omar
2019-03-27 17:25:39 +01:00
parent 04a9ce3a18
commit 8d4b5fef1d
3 changed files with 21 additions and 24 deletions

View File

@ -11097,7 +11097,7 @@ static void ImGui::DockContextBuildNodesFromSettings(ImGuiContext* ctx, ImGuiDoc
node->SelectedTabID = settings->SelectedTabID;
node->SplitAxis = settings->SplitAxis;
if (settings->IsDockSpace)
node->Flags |= ImGuiDockNodeFlags_Dockspace;
node->Flags |= ImGuiDockNodeFlags_DockSpace;
node->IsCentralNode = settings->IsCentralNode != 0;
node->IsHiddenTabBar = settings->IsHiddenTabBar != 0;
@ -11613,7 +11613,7 @@ static void ImGui::DockNodeUpdateVisibleFlagAndInactiveChilds(ImGuiDockNode* nod
IM_ASSERT(node->ParentNode == NULL || node->ParentNode->ChildNodes[0] == node || node->ParentNode->ChildNodes[1] == node);
// Inherit most flags
ImGuiDockNodeFlags flags_to_inherit = ~ImGuiDockNodeFlags_Dockspace;
ImGuiDockNodeFlags flags_to_inherit = ~ImGuiDockNodeFlags_DockSpace;
if (node->ParentNode)
node->Flags = node->ParentNode->Flags & flags_to_inherit;
@ -12897,7 +12897,7 @@ void ImGui::DockSpace(ImGuiID id, const ImVec2& size_arg, ImGuiDockNodeFlags fla
if (!(g.IO.ConfigFlags & ImGuiConfigFlags_DockingEnable))
return;
IM_ASSERT((flags & ImGuiDockNodeFlags_Dockspace) == 0);
IM_ASSERT((flags & ImGuiDockNodeFlags_DockSpace) == 0);
ImGuiDockNode* node = DockContextFindNodeByID(ctx, id);
if (!node)
{
@ -12907,15 +12907,15 @@ void ImGui::DockSpace(ImGuiID id, const ImVec2& size_arg, ImGuiDockNodeFlags fla
node->Flags = flags;
node->WindowClass = window_class ? *window_class : ImGuiWindowClass();
// When a Dockspace transitioned form implicit to explicit this may be called a second time
// When a DockSpace transitioned form implicit to explicit this may be called a second time
// It is possible that the node has already been claimed by a docked window which appeared before the DockSpace() node, so we overwrite IsDockSpace again.
if (node->LastFrameActive == g.FrameCount && !(flags & ImGuiDockNodeFlags_KeepAliveOnly))
{
IM_ASSERT(node->IsDockSpace() == false && "Cannot call DockSpace() twice a frame with the same ID");
node->Flags |= ImGuiDockNodeFlags_Dockspace;
node->Flags |= ImGuiDockNodeFlags_DockSpace;
return;
}
node->Flags |= ImGuiDockNodeFlags_Dockspace;
node->Flags |= ImGuiDockNodeFlags_DockSpace;
// Keep alive mode, this is allow windows docked into this node so stay docked even if they are not visible
if (flags & ImGuiDockNodeFlags_KeepAliveOnly)
@ -12984,7 +12984,7 @@ ImGuiID ImGui::DockSpaceOverViewport(ImGuiViewport* viewport, ImGuiDockNodeFlags
host_window_flags |= ImGuiWindowFlags_NoBackground;
char label[32];
ImFormatString(label, IM_ARRAYSIZE(label), "DockspaceViewport_%08X", viewport->ID);
ImFormatString(label, IM_ARRAYSIZE(label), "DockSpaceViewport_%08X", viewport->ID);
PushStyleVar(ImGuiStyleVar_WindowRounding, 0.0f);
PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0.0f);
@ -12992,7 +12992,7 @@ ImGuiID ImGui::DockSpaceOverViewport(ImGuiViewport* viewport, ImGuiDockNodeFlags
Begin(label, NULL, host_window_flags);
PopStyleVar(3);
ImGuiID dockspace_id = GetID("Dockspace");
ImGuiID dockspace_id = GetID("DockSpace");
DockSpace(dockspace_id, ImVec2(0.0f, 0.0f), dockspace_flags, window_class);
End();
@ -13059,7 +13059,7 @@ ImGuiID ImGui::DockBuilderAddNode(ImGuiID id, ImGuiDockNodeFlags flags)
{
ImGuiContext* ctx = GImGui;
ImGuiDockNode* node = NULL;
if (flags & ImGuiDockNodeFlags_Dockspace)
if (flags & ImGuiDockNodeFlags_DockSpace)
{
DockSpace(id, ImVec2(0, 0), flags | ImGuiDockNodeFlags_KeepAliveOnly);
node = DockContextFindNodeByID(ctx, id);
@ -13294,7 +13294,7 @@ void ImGui::DockBuilderCopyWindowSettings(const char* src_name, const char* dst_
}
// FIXME: Will probably want to change this signature, in particular how the window remapping pairs are passed.
void ImGui::DockBuilderCopyDockspace(ImGuiID src_dockspace_id, ImGuiID dst_dockspace_id, ImVector<const char*>* in_window_remap_pairs)
void ImGui::DockBuilderCopyDockSpace(ImGuiID src_dockspace_id, ImGuiID dst_dockspace_id, ImVector<const char*>* in_window_remap_pairs)
{
IM_ASSERT(src_dockspace_id != 0);
IM_ASSERT(dst_dockspace_id != 0);