pub enum DockOp {
Show 18 variants
SetActiveTab {
tabs: DockNodeId,
active: usize,
},
ClosePanel {
window: AppWindowId,
panel: PanelKey,
},
MovePanel {
source_window: AppWindowId,
panel: PanelKey,
target_window: AppWindowId,
target_tabs: DockNodeId,
zone: DropZone,
insert_index: Option<usize>,
},
MovePanelToEmptyDockSpace {
source_window: AppWindowId,
panel: PanelKey,
target_window: AppWindowId,
},
MoveTabs {
source_window: AppWindowId,
source_tabs: DockNodeId,
target_window: AppWindowId,
target_tabs: DockNodeId,
zone: DropZone,
insert_index: Option<usize>,
},
MoveTabsToEmptyDockSpace {
source_window: AppWindowId,
source_tabs: DockNodeId,
target_window: AppWindowId,
},
FloatPanelToWindow {
source_window: AppWindowId,
panel: PanelKey,
new_window: AppWindowId,
},
RequestFloatPanelToNewWindow {
source_window: AppWindowId,
panel: PanelKey,
anchor: Option<WindowAnchor>,
},
RequestFloatTabsToNewWindow {
source_window: AppWindowId,
source_tabs: DockNodeId,
panel: PanelKey,
anchor: Option<WindowAnchor>,
},
FloatPanelInWindow {
source_window: AppWindowId,
panel: PanelKey,
target_window: AppWindowId,
rect: Rect,
},
FloatTabsInWindow {
source_window: AppWindowId,
source_tabs: DockNodeId,
target_window: AppWindowId,
rect: Rect,
},
SetFloatingRect {
window: AppWindowId,
floating: DockNodeId,
rect: Rect,
},
RaiseFloating {
window: AppWindowId,
floating: DockNodeId,
},
MergeFloatingInto {
window: AppWindowId,
floating: DockNodeId,
target_tabs: DockNodeId,
},
MergeWindowInto {
source_window: AppWindowId,
target_window: AppWindowId,
target_tabs: DockNodeId,
},
SetSplitFractions {
split: DockNodeId,
fractions: Vec<f32>,
},
SetSplitFractionsMany {
updates: Vec<SplitFractionsUpdate>,
},
SetSplitFractionTwo {
split: DockNodeId,
first_fraction: f32,
},
}Expand description
High-level docking operations emitted by the UI layer and applied by the app layer.
This is the transaction vocabulary that enables persistence, undo/redo, and plugins without letting UI widgets mutate the dock graph ad-hoc.
Variants§
SetActiveTab
ClosePanel
MovePanel
MovePanelToEmptyDockSpace
Move a panel into a window that currently has no dock root tabs.
This creates the initial root tab stack for target_window and inserts panel into it.
MoveTabs
Move an entire tab stack (“dock node”) as a group.
This is used for editor-grade interactions like dragging the tab bar empty space to undock/move the whole group, rather than a single tab.
Fields
source_window: AppWindowIdsource_tabs: DockNodeIdtarget_window: AppWindowIdtarget_tabs: DockNodeIdMoveTabsToEmptyDockSpace
Move an entire tab stack (“dock node”) into a window that currently has no dock root tabs.
This creates the initial root tab stack for target_window and moves the whole group.
FloatPanelToWindow
RequestFloatPanelToNewWindow
Request creating a new floating OS window and moving the panel into it.
This is interpreted by the app/runner layer, because fret-core does not own window creation.
RequestFloatTabsToNewWindow
Request creating a new floating OS window and moving an entire tab stack (“tabs node”) into it.
This is interpreted by the app/runner layer, because fret-core does not own window creation.
Note: panel is a representative panel key used for correlating window creation and for
policy hooks; the runtime is responsible for moving the full source_tabs contents.
FloatPanelInWindow
Float a panel into an in-window floating dock container (ImGui docking, viewports disabled).
This does not create a new OS window; the floating container is rendered within
target_window’s dock host.
FloatTabsInWindow
Float a whole tab stack into an in-window floating dock container.
SetFloatingRect
Update the bounds of an in-window floating dock container.
RaiseFloating
Raise an in-window floating dock container above other floating containers in the window.
MergeFloatingInto
Merge an in-window floating dock container back into an existing tab stack.
MergeWindowInto
Merge all panels from source_window into target_tabs in target_window, then remove
the dock root for source_window.
Recommended default behavior when a floating window is closed is to merge its panels back into the main window rather than discarding them.
SetSplitFractions
Update a split node’s normalized fractions (length must match children.len()).
SetSplitFractionsMany
Atomically update multiple split nodes’ normalized fractions.
This is intended for editor-grade splitter drags where a single pointer interaction may need to update nested same-axis splits to avoid oscillation.
Fields
updates: Vec<SplitFractionsUpdate>