mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-22 07:36:35 +00:00
Docking: Renamed SetNextWindowDock() to SetNextWindowDockId(). Added GetWindowDockId().
This commit is contained in:
parent
53a5d32df1
commit
d3e8e5731a
10
imgui.cpp
10
imgui.cpp
@ -6103,10 +6103,16 @@ bool ImGui::IsWindowFocused(ImGuiFocusedFlags flags)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGuiID ImGui::GetWindowDockId()
|
||||||
|
{
|
||||||
|
ImGuiContext& g = *GImGui;
|
||||||
|
return g.CurrentWindow->DockId;
|
||||||
|
}
|
||||||
|
|
||||||
bool ImGui::IsWindowDocked()
|
bool ImGui::IsWindowDocked()
|
||||||
{
|
{
|
||||||
ImGuiContext& g = *GImGui;
|
ImGuiContext& g = *GImGui;
|
||||||
return (g.CurrentWindow->DockIsActive);
|
return g.CurrentWindow->DockIsActive;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Can we focus this window with CTRL+TAB (or PadMenu + PadFocusPrev/PadFocusNext)
|
// Can we focus this window with CTRL+TAB (or PadMenu + PadFocusPrev/PadFocusNext)
|
||||||
@ -6349,7 +6355,7 @@ void ImGui::SetNextWindowViewport(ImGuiID id)
|
|||||||
g.NextWindowData.ViewportId = id;
|
g.NextWindowData.ViewportId = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImGui::SetNextWindowDock(ImGuiID id, ImGuiCond cond)
|
void ImGui::SetNextWindowDockId(ImGuiID id, ImGuiCond cond)
|
||||||
{
|
{
|
||||||
ImGuiContext& g = *GImGui;
|
ImGuiContext& g = *GImGui;
|
||||||
g.NextWindowData.DockCond = cond ? cond : ImGuiCond_Always;
|
g.NextWindowData.DockCond = cond ? cond : ImGuiCond_Always;
|
||||||
|
3
imgui.h
3
imgui.h
@ -521,8 +521,9 @@ namespace ImGui
|
|||||||
// Note: you DO NOT need to call DockSpace() to use most Docking facilities! You can hold SHIFT anywhere while moving windows.
|
// Note: you DO NOT need to call DockSpace() to use most Docking facilities! You can hold SHIFT anywhere while moving windows.
|
||||||
// Use DockSpace() to create an explicit dock node _within_ an existing window. See Docking demo for details.
|
// Use DockSpace() to create an explicit dock node _within_ an existing window. See Docking demo for details.
|
||||||
IMGUI_API void DockSpace(ImGuiID id, const ImVec2& size = ImVec2(0, 0), ImGuiDockNodeFlags flags = 0, const ImGuiDockFamily* dock_family = NULL);
|
IMGUI_API void DockSpace(ImGuiID id, const ImVec2& size = ImVec2(0, 0), ImGuiDockNodeFlags flags = 0, const ImGuiDockFamily* dock_family = NULL);
|
||||||
IMGUI_API void SetNextWindowDock(ImGuiID dock_id, ImGuiCond cond = 0); // set next window dock id (FIXME-DOCK)
|
IMGUI_API void SetNextWindowDockId(ImGuiID dock_id, ImGuiCond cond = 0); // set next window dock id (FIXME-DOCK)
|
||||||
IMGUI_API void SetNextWindowDockFamily(const ImGuiDockFamily* dock_family); // FIXME-DOCK: set next window user type (docking filters by same user_type)
|
IMGUI_API void SetNextWindowDockFamily(const ImGuiDockFamily* dock_family); // FIXME-DOCK: set next window user type (docking filters by same user_type)
|
||||||
|
IMGUI_API ImGuiID GetWindowDockId();
|
||||||
IMGUI_API bool IsWindowDocked(); // is current window docked into another window?
|
IMGUI_API bool IsWindowDocked(); // is current window docked into another window?
|
||||||
|
|
||||||
// Logging/Capture: all text output from interface is captured to tty/file/clipboard. By default, tree nodes are automatically opened during logging.
|
// Logging/Capture: all text output from interface is captured to tty/file/clipboard. By default, tree nodes are automatically opened during logging.
|
||||||
|
@ -3973,7 +3973,7 @@ void ShowExampleAppDocuments(bool* p_open)
|
|||||||
// FIXME-DOCK: SetNextWindowDock()
|
// FIXME-DOCK: SetNextWindowDock()
|
||||||
//ImGuiID default_dock_id = GetDockspaceRootDocumentDockID();
|
//ImGuiID default_dock_id = GetDockspaceRootDocumentDockID();
|
||||||
//ImGuiID default_dock_id = GetDockspacePreferedDocumentDockID();
|
//ImGuiID default_dock_id = GetDockspacePreferedDocumentDockID();
|
||||||
ImGui::SetNextWindowDock(dockspace_id, redock_all ? ImGuiCond_Always : ImGuiCond_FirstUseEver);
|
ImGui::SetNextWindowDockId(dockspace_id, redock_all ? ImGuiCond_Always : ImGuiCond_FirstUseEver);
|
||||||
ImGuiWindowFlags window_flags = (doc->Dirty ? ImGuiWindowFlags_UnsavedDocument : 0);
|
ImGuiWindowFlags window_flags = (doc->Dirty ? ImGuiWindowFlags_UnsavedDocument : 0);
|
||||||
bool visible = ImGui::Begin(doc->Name, &doc->Open, window_flags);
|
bool visible = ImGui::Begin(doc->Name, &doc->Open, window_flags);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user