-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Window Layout Configurations #2573
Comments
It is currently possible via the wip Sorry I don't have a better answer at the moment. |
Thanks I have not used the DockContextRebuild yet is there any examples I
can check out.. I will also search for discussions around this...
…On Wed., 22 May 2019, 6:29 pm omar, ***@***.***> wrote:
It is currently possible via the wip DockBuilderXXX api but not via .ini
storage.
This needs to be worked on and is among the pending task, in fact it has
been discussed a few times in the past. Fiddling with DockContextRebuild()
may allow it to work with a .ini reload, I kinda recall there was an issue
with it last time I tried.
Sorry I don't have a better answer at the moment.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2573?email_source=notifications&email_token=AAWZP3SRDZGTXQS2VMSGYP3PWUOADA5CNFSM4HOSZZEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODV6TVXA#issuecomment-494746332>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAWZP3V35SJP4CUHA4CJWMDPWUOADANCNFSM4HOSZZEA>
.
|
There are no examples none of this are public API, you'll be working on imgui itself if you want to move this forward. |
I've achieved this by exposing DockContextClearNodes, DockContextBuildNodesFromSettings, & the DockNodeSettings struct in imgui_internal, then recursively writing out the settings for dock nodes in the same file as the rest of the settings for the application, so I'd say it's likely possible with few tweaks |
…clear and post-read handlers. (#2573)
I have pushed some code allowing to reload settings data at runtime, which includes docking data. Quick test: static const char* ini_to_load = NULL;
if (ini_to_load)
{
ImGui::LoadIniSettingsFromDisk(ini_to_load);
ini_to_load = NULL;
}
// Start the Dear ImGui frame
ImGui_ImplDX11_NewFrame();
ImGui_ImplWin32_NewFrame();
ImGui::Begin("Ini Test");
if (ImGui::Button("Load Ini 1"))
ini_to_load = "imgui1.ini";
if (ImGui::Button("Load Ini 2"))
ini_to_load = "imgui2.ini";
if (ImGui::Button("Load Ini 3"))
ini_to_load = "imgui3d.ini";
if (ImGui::Button("Load Ini 4"))
ini_to_load = "imgui4d.ini";
ImGui::End(); Note: it should be illegal to call Some all forms of rebuild are 100% flicker free, hope to fix that eventually. In addition, the Metrics windows now has some extra Settings infos and tools: |
Thanks for this, it almost works for me but I'm still sometimes hitting asserts at: // imgui.cpp(~13043)
if (node->IsSplitNode())
IM_ASSERT(node->TabBar == NULL); And if I skip that one then I'll hit this one: // imgui.cpp(~12954)
// Bind or create host window
ImGuiWindow* host_window = NULL;
bool beginned_into_host_window = false;
if (node->IsDockSpace())
{
// [Explicit root dockspace node]
IM_ASSERT(node->HostWindow); So far it seems that having multiple dockable viewports is the quickest way to repro, I'll update if I can narrow it down a bit more. Update: Now to figure out why my windows grow in size whenever I drag them out of the new window.... |
Version/Branch of Dear ImGui:
Version: v1.69
Branch: docking
Back-end/Renderer/Compiler/OS
Back-ends: custom
Compiler: VC++ 2017
Operating System: windows
My Issue/Question:
My question is about the ability to support the concept of "window layout configurations". What I mean by this is the ability to position/dock a bunch of windows and save/load these configurations at run-time. Think of it like a preset for a particular workflow arrangement.. Hope I explained this enough.
From what I could tell it's kind of possible (small changes to LoadIniSettingsFromMemory, the IM_ASSERT for SettingsLoaded and the FrameCount needed to be removed). With this change I can kind of get loading different configurations in working.
But the docking side of this breaks in all sorts of places, I tried various things to reset/rebuild the docking but had no luck (will try a little bit more).
Can you suggest some ways to get this working or tell me that currently this is just not possible??
Regards
Graeme
The text was updated successfully, but these errors were encountered: