Skip to main content

DockOp

Enum DockOp 

Source
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

Fields

§active: usize
§

ClosePanel

Fields

§panel: PanelKey
§

MovePanel

Fields

§source_window: AppWindowId
§panel: PanelKey
§target_window: AppWindowId
§target_tabs: DockNodeId
§insert_index: Option<usize>
§

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.

Fields

§source_window: AppWindowId
§panel: PanelKey
§target_window: AppWindowId
§

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: AppWindowId
§source_tabs: DockNodeId
§target_window: AppWindowId
§target_tabs: DockNodeId
§insert_index: Option<usize>
§

MoveTabsToEmptyDockSpace

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.

Fields

§source_window: AppWindowId
§source_tabs: DockNodeId
§target_window: AppWindowId
§

FloatPanelToWindow

Fields

§source_window: AppWindowId
§panel: PanelKey
§new_window: AppWindowId
§

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.

Fields

§source_window: AppWindowId
§panel: PanelKey
§

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.

Fields

§source_window: AppWindowId
§source_tabs: DockNodeId
§panel: PanelKey
§

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.

Fields

§source_window: AppWindowId
§panel: PanelKey
§target_window: AppWindowId
§rect: Rect
§

FloatTabsInWindow

Float a whole tab stack into an in-window floating dock container.

Fields

§source_window: AppWindowId
§source_tabs: DockNodeId
§target_window: AppWindowId
§rect: Rect
§

SetFloatingRect

Update the bounds of an in-window floating dock container.

Fields

§floating: DockNodeId
§rect: Rect
§

RaiseFloating

Raise an in-window floating dock container above other floating containers in the window.

Fields

§floating: DockNodeId
§

MergeFloatingInto

Merge an in-window floating dock container back into an existing tab stack.

Fields

§floating: DockNodeId
§target_tabs: DockNodeId
§

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.

Fields

§source_window: AppWindowId
§target_window: AppWindowId
§target_tabs: DockNodeId
§

SetSplitFractions

Update a split node’s normalized fractions (length must match children.len()).

Fields

§fractions: Vec<f32>
§

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

§

SetSplitFractionTwo

Fields

§first_fraction: f32

Trait Implementations§

Source§

impl Clone for DockOp

Source§

fn clone(&self) -> DockOp

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DockOp

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for DockOp

Source§

fn eq(&self, other: &DockOp) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for DockOp

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.