pub enum PaneCommand {
FocusNext,
FocusPrevious,
FocusDirectional(PaneCardinalDirection),
FocusEdge(PaneCardinalDirection),
ResizeStep {
direction: PaneResizeDirection,
units: u16,
},
Split(SplitAxis),
Close,
MovePane(PaneCardinalDirection),
SwapPane(PaneFocusOrdinal),
Maximize,
Restore,
}Expand description
The canonical, host-agnostic pane keyboard command vocabulary.
Hosts translate raw key events into these commands; resolve maps each to
a deterministic outcome. Resize unit counts are supplied by the caller
(computed via PaneCommandAcceleration) so the command itself stays a
pure intent.
Variants§
FocusNext
Move focus to the next leaf in deterministic focus order (cyclic).
FocusPrevious
Move focus to the previous leaf in deterministic focus order (cyclic).
FocusDirectional(PaneCardinalDirection)
Move focus to the nearest leaf in a direction (spatial).
FocusEdge(PaneCardinalDirection)
Move focus to the extreme leaf in a direction (jump to edge).
ResizeStep
Grow (Increase) or shrink (Decrease) the active pane by units
snap steps, resizing its enclosing split.
Fields
direction: PaneResizeDirectionIncrease grows the active pane; Decrease shrinks it.
Split(SplitAxis)
Split the active leaf along axis, adding a new sibling leaf.
Close
Close the active leaf, promoting its sibling.
MovePane(PaneCardinalDirection)
Move the active pane to dock against the nearest pane in a direction.
SwapPane(PaneFocusOrdinal)
Swap the active pane with its cyclic neighbour.
Maximize
Maximize the active pane (transient view state; no topology change).
Restore
Restore from a maximized state (transient view state).
Trait Implementations§
Source§impl Clone for PaneCommand
impl Clone for PaneCommand
Source§fn clone(&self) -> PaneCommand
fn clone(&self) -> PaneCommand
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for PaneCommand
Source§impl Debug for PaneCommand
impl Debug for PaneCommand
impl Eq for PaneCommand
Source§impl PartialEq for PaneCommand
impl PartialEq for PaneCommand
Source§fn eq(&self, other: &PaneCommand) -> bool
fn eq(&self, other: &PaneCommand) -> bool
self and other values to be equal, and is used by ==.