docking: DockBuilder surface + real split-layout demo#7
Merged
Conversation
The previous demo pre-docked both panels into one tab group — visually just a tab bar, no visible docking. Export the minimal DockBuilder surface (DockBuilderSplitNode/DockWindow/Finish + ImGuiDir-typed Dir_* constants, gated by the docking feature; imgui_internal.h enters the GMF only when the feature is on) and rebuild the example as an IDE-style first-frame layout: Scene | Viewport | Inspector with Console split below — four real dock nodes, drag any tab to re-split/stack/float. Default (feature-off) build/tests unchanged.
New independent `viewports` feature (usually combined with docking): - core exports GetMainViewport/UpdatePlatformWindows/ RenderPlatformWindowsDefault/SetNextWindowPos + ConfigFlags_ViewportsEnable (gated by MCPP_FEATURE_VIEWPORTS). - imgui.app facade enables ViewportsEnable and renders platform windows each frame (with GL context backup/restore); GlfwOpenGL3 gains GetCurrentContext. - docking example requests ["docking", "viewports"] and spawns a 'Detached' panel outside the main window — verified: a separate OS window appears in the X window tree and renders (drag back inside to re-dock). Default (feature-off) build/tests unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the docking demo actually demonstrating docking: exports the minimal DockBuilder surface (feature-gated; imgui_internal.h in GMF only with the feature) and builds an IDE-style split layout (Scene | Viewport | Inspector / Console) — four real dock nodes, visibly split and rearrangeable. Default build/tests unchanged.