pub struct PointerInput<'a> {
pub pass: PointerEventPass,
pub computed_data: ComputedData,
pub cursor_position_rel: Option<PxPosition>,
pub pointer_changes: &'a mut Vec<PointerChange>,
pub key_modifiers: ModifiersState,
/* private fields */
}Expand description
Input for pointer handlers.
This type carries pointer event payload, local geometry, and event consumption helpers. Side effects that are not pointer-specific should use dedicated APIs such as semantics modifiers, hover cursor modifiers, window action helpers, or the IME session bridge instead of a generic request bag.
Fields§
§pass: PointerEventPassCurrent pointer dispatch pass.
computed_data: ComputedDataThe size of the component node, computed during the measure stage.
cursor_position_rel: Option<PxPosition>The position of the cursor, if available. Relative to the root position of the component.
pointer_changes: &'a mut Vec<PointerChange>Pointer changes from the event loop, if any.
key_modifiers: ModifiersStateThe current state of the keyboard modifiers at the time of the event.
Implementations§
Source§impl PointerInput<'_>
impl PointerInput<'_>
Sourcepub fn consume_pointer_changes(&mut self)
pub fn consume_pointer_changes(&mut self)
Marks all current pointer changes as consumed.
Sourcepub fn has_unconsumed_release(&self) -> bool
pub fn has_unconsumed_release(&self) -> bool
Returns whether any current pointer change is an unconsumed release.
Sourcepub fn block_cursor(&mut self)
pub fn block_cursor(&mut self)
Blocks pointer input to other components.
Sourcepub fn drag_window(&mut self)
pub fn drag_window(&mut self)
Begins a system drag move for the current window.
Sourcepub fn minimize_window(&mut self)
pub fn minimize_window(&mut self)
Requests that the current window be minimized.
Sourcepub fn maximize_window(&mut self)
pub fn maximize_window(&mut self)
Requests that the current window be maximized.
Sourcepub fn toggle_maximize_window(&mut self)
pub fn toggle_maximize_window(&mut self)
Requests that the current window toggle maximized state.
Sourcepub fn close_window(&mut self)
pub fn close_window(&mut self)
Requests that the current window close.
Sourcepub fn ime_session(&mut self) -> ImeSession<'_>
pub fn ime_session(&mut self) -> ImeSession<'_>
Returns the IME session bridge for the current frame.
Auto Trait Implementations§
impl<'a> Freeze for PointerInput<'a>
impl<'a> RefUnwindSafe for PointerInput<'a>
impl<'a> Send for PointerInput<'a>
impl<'a> Sync for PointerInput<'a>
impl<'a> Unpin for PointerInput<'a>
impl<'a> !UnwindSafe for PointerInput<'a>
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more