-
Notifications
You must be signed in to change notification settings - Fork 3
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
[1-2SP,2.25SP] Investigate if the docking branch of imgui can be used for chart layouts #142
Comments
Is there is a built-in feature to layout windows in a row (and others)?No. But it can be done manually using the DockBuilderXXX private/beta api in imgui_internal.h. Note that most docking api seems to be private/beta If the windows can be chained one after the other left to right and whether they behave well enough when they are (that they stay chained, resized while staying in a row etc)?Once we lay out the docks in a given layout, Imgui takes care of internal resizing (using split handles) without breaking our original layout. We do have to make the docks "Undockable" to prevent breakage of a layout. In "Free form" layout, the docks are dockable and the user can reposition them however he likes. can the window group be forced to be full-screen?Yes. The docks are normal imgui windows. If you specify position and size for the window, it will ignore the docking constrains and use those values. serializationImGui supports serialization/deserialization of docks. It saves the config to the file specified in ImGuiIO::IniFilename automatically unless disabled by setting this field to null. ImGui also provides a way to get the INI data which can then be stored however the user wants. There's another way to store data which is to save the size of each dock-node window and then when rebuilding the layout, use DockBuilderSetNodeSize to specify the size of the node. However, this won't work for 'free form' layout as that involves restoring not just the size but also the position and maybe other attributes for which I didn't find an easy way to restore. Some other points:
Sample code that I used to try out the docking branch: Archive.zip |
Thanks for the write-up and investigation. Will close this as the primary task is done. 👍 |
Check out the docking branch of imgui and see if these are possible:
tiling in a horizontal row, in a vertical column, in a grid (like the current opendigitizer has)
full-area/full-screen tiling
serialization
The text was updated successfully, but these errors were encountered: