pub struct SplitResizeEvent {
pub axis: ResizeAxis,
pub phase: ResizeDragPhase,
pub position: f32,
pub delta: f32,
pub total_delta: f32,
}Expand description
Resize event expressed along one logical-pixel main axis.
delta is relative to the previous event; total_delta is relative to the
initial press. position is the current split or bar-local pointer position.
§Examples
use ailloli_ui_widgets::layout::{ResizeAxis, ResizeDragPhase, SplitResizeEvent};
let event = SplitResizeEvent { axis: ResizeAxis::X, phase: ResizeDragPhase::Drag, position: 120.0, delta: 4.0, total_delta: 12.0 };
assert_eq!(event.total_delta, 12.0);Fields§
§axis: ResizeAxisHorizontal (X) or vertical (Y) split coordinate.
phase: ResizeDragPhaseStart, incremental drag, or end phase.
position: f32Current split position, in logical pixels on the main axis.
For standalone ResizeBar, this is the current main-axis pointer
coordinate inside the bar bounds.
delta: f32Delta since the previous emitted event, in logical pixels.
total_delta: f32Delta since drag start, in logical pixels.
Trait Implementations§
Source§impl Clone for SplitResizeEvent
impl Clone for SplitResizeEvent
Source§fn clone(&self) -> SplitResizeEvent
fn clone(&self) -> SplitResizeEvent
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SplitResizeEvent
impl Debug for SplitResizeEvent
Source§impl PartialEq for SplitResizeEvent
impl PartialEq for SplitResizeEvent
impl Copy for SplitResizeEvent
impl StructuralPartialEq for SplitResizeEvent
Auto Trait Implementations§
impl Freeze for SplitResizeEvent
impl RefUnwindSafe for SplitResizeEvent
impl Send for SplitResizeEvent
impl Sync for SplitResizeEvent
impl Unpin for SplitResizeEvent
impl UnwindSafe for SplitResizeEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.