From f61b361cea68880001f65565079321c281fb2842 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Thu, 4 Jun 2026 09:05:41 +0800 Subject: [PATCH] feat: docking-full convenience bundle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit docking-full = ["docking", "viewports"] — one word for the full docking experience (implication closure verified: both defines activate). The two primitives stay orthogonal (upstream has two independent config flags; docking-only remains Wayland-safe and avoids the per-frame platform-window pass). Example switches to the bundle; README documents all three. --- README.md | 15 +++++++++++++-- examples/docking/mcpp.toml | 2 +- mcpp.toml | 3 +++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ae8abf7..f880249 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ which `CreateWindow`/`Init` use by default. ## Features -- `docking` — exports the Dock* API surface (`DockSpace`, `DockSpaceOverViewport`, +- `docking` — dockable panels inside the main window (Wayland-safe). Exports the Dock* API surface (`DockSpace`, `DockSpaceOverViewport`, `SetNextWindowDockID`, `IsWindowDocked`, ...) and makes the `imgui.app` facade enable `ImGuiConfigFlags_DockingEnable` automatically: @@ -52,9 +52,20 @@ which `CreateWindow`/`Init` use by default. imgui = { version = "0.0.4", features = ["docking"] } ``` +- `viewports` — panels dragged (or positioned) outside the main window detach + into real OS windows (multi-viewport). X11/Windows/macOS; note GLFW/Wayland + does not support it upstream. +- `docking-full = ["docking", "viewports"]` — convenience bundle: the full + docking experience. + + ```toml + [dependencies] + imgui = { version = "0.0.5", features = ["docking-full"] } + ``` + See `examples/docking/`. Sources come from upstream's docking tag (`compat.imgui 1.92.8-docking`, a superset of mainline — identical behavior - while the feature is off). + while the features are off). ## Dependencies diff --git a/examples/docking/mcpp.toml b/examples/docking/mcpp.toml index 4c94905..883bba2 100644 --- a/examples/docking/mcpp.toml +++ b/examples/docking/mcpp.toml @@ -5,4 +5,4 @@ description = "Dockable-windows demo using the imgui `docking` feature" license = "MIT" [dependencies] -imgui = { path = "../..", features = ["docking", "viewports"] } +imgui = { path = "../..", features = ["docking-full"] } diff --git a/mcpp.toml b/mcpp.toml index 37bced4..d3dfc74 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -30,6 +30,9 @@ docking = [] # viewports: ImGui windows dragged outside the main window detach into real # OS windows (multi-viewport). Usually combined with docking. viewports = [] +# Convenience bundle: the full docking experience (dockable panels + windows +# that detach into real OS windows). Equivalent to ["docking", "viewports"]. +docking-full = ["docking", "viewports"] [dependencies] compat.imgui = "1.92.8-docking"