#[non_exhaustive]pub enum CursorIcon {
Default,
Pointer,
Text,
Grab,
Grabbing,
ColResize,
RowResize,
NotAllowed,
}Expand description
The pointer-cursor vocabulary, flat-re-exported from frust-core::event (and
also available through authoring::CursorIcon).
A widget asks for a shape from its own pointer handling —
ctx.set_cursor(CursorIcon::Pointer) — and the desktop shell applies whatever
the pass resolved; the request is per-pass and stateless, so a widget that
stops asking falls back to CursorIcon::Default with nothing to clear. Lifted
flat rather than left inside authoring because a design-system plugin’s
public builder API can name a cursor (a Button::cursor(..) override, a
disabled control asking for CursorIcon::NotAllowed) without being a widget
author itself. #[non_exhaustive]: match with a wildcard arm.
Honoured on desktop only — the mobile shells never read the resolved value, so
setting a cursor unconditionally is safe on every platform.
The platform-neutral cursor a widget requests through EventCtx::set_cursor; only a desktop
shell honours it. #[non_exhaustive]: an out-of-tree match degrades an unknown variant to
CursorIcon::Default.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Default
The host arrow; what a pass in which no widget asked resolves to.
Pointer
The clickable hand.
Text
Grab
Grabbing
ColResize
RowResize
NotAllowed
A refused action: a disabled control, or a drop target rejecting the drag.
Trait Implementations§
Source§impl Clone for CursorIcon
impl Clone for CursorIcon
Source§fn clone(&self) -> CursorIcon
fn clone(&self) -> CursorIcon
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 CursorIcon
Source§impl Debug for CursorIcon
impl Debug for CursorIcon
Source§impl Default for CursorIcon
impl Default for CursorIcon
Source§fn default() -> CursorIcon
fn default() -> CursorIcon
impl Eq for CursorIcon
Source§impl Hash for CursorIcon
impl Hash for CursorIcon
Source§impl PartialEq for CursorIcon
impl PartialEq for CursorIcon
impl StructuralPartialEq for CursorIcon
Auto Trait Implementations§
impl Freeze for CursorIcon
impl RefUnwindSafe for CursorIcon
impl Send for CursorIcon
impl Sync for CursorIcon
impl Unpin for CursorIcon
impl UnsafeUnpin for CursorIcon
impl UnwindSafe for CursorIcon
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> Brush for T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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.Source§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.Source§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.Source§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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.