pub struct PaneDragResizeMachine { /* private fields */ }Expand description
Runtime lifecycle machine for pane drag/resize interactions.
Implementations§
Source§impl PaneDragResizeMachine
impl PaneDragResizeMachine
Sourcepub fn new(drag_threshold: u16) -> Result<Self, PaneDragResizeMachineError>
pub fn new(drag_threshold: u16) -> Result<Self, PaneDragResizeMachineError>
Construct a drag/resize lifecycle machine with explicit threshold.
Sourcepub fn new_with_hysteresis(
drag_threshold: u16,
update_hysteresis: u16,
) -> Result<Self, PaneDragResizeMachineError>
pub fn new_with_hysteresis( drag_threshold: u16, update_hysteresis: u16, ) -> Result<Self, PaneDragResizeMachineError>
Construct a drag/resize lifecycle machine with explicit threshold and drag-update hysteresis.
Sourcepub const fn state(&self) -> PaneDragResizeState
pub const fn state(&self) -> PaneDragResizeState
Current lifecycle state.
Sourcepub const fn drag_threshold(&self) -> u16
pub const fn drag_threshold(&self) -> u16
Configured drag-start threshold.
Sourcepub const fn update_hysteresis(&self) -> u16
pub const fn update_hysteresis(&self) -> u16
Configured drag-update hysteresis threshold.
Sourcepub const fn is_active(&self) -> bool
pub const fn is_active(&self) -> bool
Whether the machine is in a non-idle state (Armed or Dragging).
Sourcepub fn force_cancel(&mut self) -> Option<PaneDragResizeTransition>
pub fn force_cancel(&mut self) -> Option<PaneDragResizeTransition>
Unconditionally reset the machine to Idle, returning a diagnostic transition if the machine was in an active state.
This is a safety valve for RAII cleanup paths (panic, signal, guard
drop) where constructing a valid PaneSemanticInputEvent is not
possible. The returned transition carries PaneCancelReason::Programmatic
and a Canceled effect.
If the machine is already Idle, returns None (no-op).
Sourcepub fn apply_event(
&mut self,
event: &PaneSemanticInputEvent,
) -> Result<PaneDragResizeTransition, PaneDragResizeMachineError>
pub fn apply_event( &mut self, event: &PaneSemanticInputEvent, ) -> Result<PaneDragResizeTransition, PaneDragResizeMachineError>
Apply one semantic pane input event and emit deterministic transition diagnostics.
Trait Implementations§
Source§impl Clone for PaneDragResizeMachine
impl Clone for PaneDragResizeMachine
Source§fn clone(&self) -> PaneDragResizeMachine
fn clone(&self) -> PaneDragResizeMachine
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more