Dock targets check the floating windows drawn this frame instead of every
window's last egui area rect. floating_layer says that an undrawn window
keeps its last area rect.
A dock target named by the dragged panel itself anchors on another panel
of the same group or column, or leaves the panel in place when it is alone
there, instead of failing with InvalidPlacement.
Arrow keys resize the handle right after a drag. Focus that came from
the pointer draws no highlight until a key is pressed, and hovering
still focuses nothing.
A left, right, top or bottom zone without anchor or side maps to
Placement::Edge, anchored on any docked panel that does not move. A
hidden panel is shown and moved in one step, all or nothing.
DockArea::hit_id gives the egui id of the control a Hit names, and
DockArea::floating_layer the layer of a floating window, so apps and
their tests stop rebuilding internal ids. The divider between stacked
groups has one id in docks and floating windows.
A panel body that reaches the bottom of its rect has no height of its
own, so a floated panel or group falls back to floating_size, else 320
points, instead of the whole frame height. A body in a window fitted to
its recorded height keeps that height. Panels leaving a frame fit their
content like panels leaving a dock.
Both are on in the Frame profile and off by default in the Dock profile;
DockStyle::wheel_selects_tabs and middle_click_closes_tabs set them. A
middle click closes only a closable panel.
Action::MovePanel moves one panel to a Target; NewDock and Float give it a group of its own.
DockCommand::Dock with a side that has no dock used to fail with InvalidPlacement for a panel
that shares its group.
A docked pane draws its body in a child ui clipped to the pane, so a body
wider than the pane no longer shifts a right or bottom pane's reserved
rect into the document. PaneLabels::move_pane takes {title}, so each
title bar's accessible name includes its pane ("Move Styles pane").
Pane title bars mirror with .rtl(true).
- Permissions::accepts_splits; PROTECTED takes no side splits, so a
group dropped on a protected canvas floats.
- A press of any pointer button in a panel body, stripless panels
included, reports the panel in DockOutput::focused.
- Right to left, tab strips, their header and drag bar, insertion slots
(DropTarget::right_to_left), accordion headers and chrome::TitleBar
(ChromeStyle::right_to_left) mirror. TitleBar truncates galley titles
like tab labels.
- DockStyle::close_menu_items and close_button hide the built-in close
controls without changing Permissions::closable.
- Menu labels say what moves: Move Panel to Group (move_panel_to_label)
and Move Group to (move_group_to_label).
- The column bar's button has its own accessibility labels
(collapse_column_label, expand_column_label).
- Placement::for_zone maps zones onto what the anchor's container takes;
DockCommand uses it and takes right_to_left.
- Layout::apply, apply_with_permissions and apply_all return the closed
panels.
- Placement::Group takes an optional preferred height.
docs/ui-docking.md covers the Dock and Frame profiles, the model and
actions, Workspace, the renderer and DockContent, gestures, DockCommand,
DockStyle::localized, hit rects and the DockDriver test driver, and links
the task-pane guide.
Also: ui.dock open, close and activate map in one place, the command tests
build as a cfg(test) module, the hit-kind table gets a type alias, the
testing example uses public API, and rustfmt.
DockCommand<P> deserializes a control command's params, with its id under
"command", and maps it to layout actions applied all or none. It covers the
window.panel.* and window.workspace.* ids, the raw {action} form, and the
ui.dock {operation, …} shape of LightCraft, PDFCraft, CADCraft and
SoundCraft (open, close, activate, float, moveFloating, move, setStackOpen,
resizeStack, resizeSplit), so their parsers can go without a protocol change.
Named workspaces and Reset stay with the application.
tests/docking_workflows.rs loads every v1 fixture, docks groups by their bars
into a new dock, a bottom band and a seam, collapses and expands the column,
floats it by command, drags it back, and checks the layout reads back as
written.
An iconic column draws one icon per panel, a grip above each group and a
separator between groups (M3). Widened past `DockStyle::iconic_label_width`
it shows panel names (M4). Clicking an icon opens its group as a flyout on
the canvas side; another icon switches, the same icon closes, and with
Auto-Collapse Iconic Panels (default on) Escape or a press outside closes
it (M5). Dragging a flyout's strip floats its group (M6), an icon drags its
panel (S7) and the grip its group (S8). A drop into an iconic column makes
a new icon group, previewed by the column outline and an insertion line
(P9). `raise_panel` on an iconic panel opens its flyout (U3), and the
column menu has the Auto-Collapse toggle as `DockEvent::ToggleAutoCollapse`.
Iconic widths move to `DockStyle` (`icon_size`, `iconic_width`,
`iconic_max_width`). `DockArea::hit_rects` names every gesture source the
area drew last frame, and `docking::testing::DockDriver` (feature
`testing`) drives an area with real egui input for application tests.
Behaviour follows vectorcraft crates/ui-egui/src/dock.rs (icon column,
flyout placement, names when widened) and photocraft dock.rs
(auto-collapse).
A floated group or column keeps its width and takes the tallest member's floating size, else the docked height capped at 320 pt. Tab labels from pre-laid-out galleys are cut with an ellipsis and drawn left-aligned inside the tab, active tabs included. The group drag ghost has a translucent fill, a 2 pt outline and the members' labels. The drag bar draws a grip mark at rest. A click that expands a minimized group does not start a double-click that minimizes it again. A tab focused by the pointer shows no focus outline; keyboard focus still does.
Found in the DesignCraft trial
DockStyle::localized translates every *_label field through one keyed function. Workspace::apply and apply_all return the panels they closed. Floating::contains takes any borrowed form of the panel id.
Found in the DesignCraft trial
PaneHost draws the open panes as egui side and bottom panels before the app's
CentralPanel, or as floating frames, each with a title, a ▾ menu (app items,
Move to Start/End, Float, Close), × and a resize edge. Edges are logical
(Start/End) with an RTL flag. Columns shows every pane side by side; OneSlot
shows one closable pane per edge. The app owns open state and pane state: the
host returns Close, Place, Resize, FloatRect and Focus requests, the focused
pane, and cycles focus with F6.
Drag-out-to-float and edge snap follow wordcraft#2584.
Moves a rect with a title-bar drag from the rect and press position kept at
drag start, so the window follows the pointer without drift. Escape or window
focus loss ends the move and returns the start rect.
Merge the docking-t4 track (floating title bars and stacks, frame
profile, native windows, public chrome) into the dock profile track.
Integration:
- DockStyle keeps two edge bands: `edge_band` (8) is the outer edge
band that splits at the root; `new_dock_band` (12) is the band along
the docked area's left and right edges that makes a new dock. One
`seam_band` serves dock seams and floating stack seams.
- New-dock targets are offered in the dock profile rather than only in
layouts that already have a dock.
- Window title bar drags take the dock targets: a column edge makes a
new column, a seam or group band stacks the window's groups there,
the new-dock band makes a dock. They still never split a frame or
join a body centre. Tab drags check dock targets before floating
stack and outer edge targets.
- One group_action maps column, window and group gestures to
MoveColumn, MoveWindow and MoveGroup.
- The unused stacked_groups renderer is gone; docks and floating
windows each draw their own stacks.
Floating windows:
- A title bar (TITLE 14) drags the whole window live; Escape and focus
loss put it back. A release over a tab strip, a floating stack's band
or seam, or the outer edge emits MoveWindow; elsewhere the window
stays and hosts get group_drop. Double-click minimizes or expands
every group; the close button closes every panel (CloseWindow).
- Stacked groups with a 3 pt bar between them and dividers that resize
both neighbours (ResizeGroup). The top and bottom quarter of a group
and the seam between two groups insert a new group there, with a line
preview (P3, P4). The title bar occludes what lies behind it.
- The only group of a window carries the window rect when dragged by its
bar, so floating it again keeps the window's size.
Frame profile (DockStyle::profile):
- Ctrl/Cmd held at the start of a tab drag undocks the panel (S9).
- The outer edge band splits at the root: top and bottom in both
profiles, left and right in the frame profile (P8).
- Menu tail: Undock Panel, Close Panel Group, Undock Panel Group, Close
Other Panels in Group and Maximize Frame (DockEvent::ToggleMaximize).
DockArea::maximized draws only the docked frame holding the panel;
other frames and floating windows do not render or take input.
DockArea::hide_panels leaves out every panel, or every panel except a
host-chosen set; protected panels stay and the layout is unchanged.
Feature native-windows: a floating window with a native rect gets its
own OS window through show_viewport_immediate when the backend does not
embed viewports, and stays in-window otherwise. Closing it emits
SetNative None, so the group returns to its in-window rect; moves and
resizes are read back as SetNative with bounded sizes and positions.
Tabs and groups do not drag between OS windows. Move Panel to New Window
is in the menu tail where native windows are available.
A floating panel whose window closed as a whole restores at its last
rect.
Behaviour follows vectorcraft floating.rs (show_set, draw_groups, track),
effectcraft dock_ui.rs (panel_window, set_panel_window, toggle_maximize)
and dock.rs (PanelWindow::sanitized), filmcraft dock_ui.rs (workspace_edge,
EDGE_BAND, maximized) and storytold/filmcraft#2118 (saved_native_rect,
bounded_inner_size).
docking::chrome holds the parts of a floating window that hosts other
than DockArea need, such as office task panes: FloatingFrame (opaque
frame on its own layer, anchored resize from both sides, the bottom and
both bottom corners, arrow keys on a focused handle) and TitleBar (two
grip lines or a title, an optional menu button, and a close button 10 pt
in from the right). They return responses and requested rects; the
caller turns them into its own commands.
Behaviour follows vectorcraft floating.rs (show_set: TITLE 14, grip
lines, close position).
Behaviour tests with real egui input: seam, band, column edge and new
dock drops with their line previews, tab drops, a column taking groups
anywhere, scrolling, column bar drags and their cancellation, dividers,
minimize, iconic toggles, occlusion by floating windows and the mirrored
right-to-left layout.
Behaviour follows vectorcraft crates/ui-egui/src/floating.rs tests.
Node::Dock renders as side docks: columns from the window edge inwards,
each with a column bar (drag, »/« button, double-click and menu toggle
iconic) above stacked groups. A split beside a dock gives the dock its
columns' width. Every column's inner edge resizes it; dividers between
open groups save both heights; minimized groups keep theirs. A column
whose groups' minimum heights do not fit scrolls.
Drops resolve dock targets before group targets: column edges (new
column), seams and the top or bottom quarter of a group body (new group),
the room under a minimized column (below its last group) and the left or
right edge of the docked area without a dock (new dock, offered once the
layout has a dock). They show a horizontal or full-height vertical line.
Floating windows and host overlays occlude them. Tab drags use the same
targets with Move. A column bar drag moves the column with a ghost and
floats its groups away from a dock; Escape, focus loss, pointer exit and
cancel_drag cancel it like a group drag.
Side::Start maps to the left edge, or the right with
DockStyle::right_to_left. New DockStyle fields: column_bar_height,
seam_band, edge_band, right_to_left and the column labels.
Behaviour follows vectorcraft crates/ui-egui/src/floating.rs (drop
geometry, column layout and scrolling) and photocraft
crates/ui-egui/src/dock.rs (group heights).
A frame along one edge of the docked layout, a quarter of its size. In a
layout with docks the split wraps the part between them, so a bottom
Timeline or top bar stays inside the docks.
Behaviour follows filmcraft dock_ui.rs (workspace_edge).