ocornut / imgui

Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies
MIT License
57.68k stars 9.9k forks source link

How to change properties of the Docking host Window ? #7156

Open Yves-911 opened 6 months ago

Yves-911 commented 6 months ago

Hi ImGui !

Without manually creating a dockspace, when you dock two ImGui windows, it will create a e.g. ##DockNode_01 parent window. How can I change the settings of this window (in my case, I want to remove the resize feature, see below) ?

image

I have no explicit ImGui::Begin() for this window because it's handled by ImGui so I don't see how to do that ?

Thank for your support ! Yves.


Dear ImGui 1.89.9 (18990)

sizeof(size_t): 8, sizeof(ImDrawIdx): 4, sizeof(ImDrawVert): 24 define: cplusplus=201703 define: IMGUI_DISABLE_OBSOLETE_FUNCTIONS define: _WIN32 define: _WIN64 define: _MSC_VER=1930 define: _MSVC_LANG=201703 define: __clang_version=17.0.5 (https://gitlab-ncsa.ubisoft.org/LLVM/llvm-project 9e9cf6cbdad8990a11d3ecd2af9bb61989b463f5) define: IMGUI_HAS_VIEWPORT define: IMGUI_HAS_DOCK

io.BackendPlatformName: NULL io.BackendRendererName: NULL io.ConfigFlags: 0x00000442 NavEnableGamepad DockingEnable ViewportsEnable io.ConfigViewportsNoDecoration io.ConfigDockingAlwaysTabBar io.ConfigInputTextCursorBlink io.ConfigWindowsResizeFromEdges io.ConfigMemoryCompactTimer = 60.0 io.BackendFlags: 0x00001C07 HasGamepad HasMouseCursors HasSetMousePos PlatformHasViewports HasMouseHoveredViewport RendererHasViewports

ocornut commented 6 months ago

Hello, It's not possible.

Yves-911 commented 6 months ago

Thank you Omar for your prompt answer !

So I wasn't crazy :)

ocornut commented 6 months ago

If you have more details on your concrete use case it may be good to know about them.

Yves-911 commented 6 months ago

Basically the imgui-docked windows are hosted by another Windows App/process which handles its viewports.

So I'd like to have passive ImGui windows, only modified when the other windows app is manipulating the window/viewport containing the imgui window. This is working very well when there is just a single ImGui window but there is some side effects when the window is a ##DockNode that I can't manipulate directly.

This is quite a complex use case though !

--> I would hope that some WindowClass SetDockNodeFlags could be used to drive that behavior. (e.g. for NoMove / NoResize ).