pub enum PointerIcon {
System(CursorIcon),
Custom(CustomPointerIcon),
}Expand description
The pointer’s appearance over a region of the UI.
Variants§
System(CursorIcon)
One of the standard shapes the platform already draws, named by the CSS cursor vocabulary.
Custom(CustomPointerIcon)
A shape the application draws itself.
Implementations§
Source§impl PointerIcon
impl PointerIcon
Sourcepub const DEFAULT: PointerIcon
pub const DEFAULT: PointerIcon
The platform’s default pointer, usually an arrow.
Sourcepub const POINTER: PointerIcon
pub const POINTER: PointerIcon
The hand shown over something that can be clicked.
Sourcepub const TEXT: PointerIcon
pub const TEXT: PointerIcon
The I-beam shown over selectable text.
Sourcepub fn custom(
image: ImageBitmap,
hotspot_x: u32,
hotspot_y: u32,
) -> Result<PointerIcon, PointerIconError>
pub fn custom( image: ImageBitmap, hotspot_x: u32, hotspot_y: u32, ) -> Result<PointerIcon, PointerIconError>
Builds a custom icon from image with its hotspot at (hotspot_x,
hotspot_y).
Sourcepub fn css_keyword(&self) -> Option<&'static str>
pub fn css_keyword(&self) -> Option<&'static str>
The CSS cursor keyword for a standard shape, or None for a custom
one, which a browser names with a url() instead.
Trait Implementations§
Source§impl Clone for PointerIcon
impl Clone for PointerIcon
Source§fn clone(&self) -> PointerIcon
fn clone(&self) -> PointerIcon
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PointerIcon
impl Debug for PointerIcon
Source§impl Default for PointerIcon
impl Default for PointerIcon
Source§fn default() -> PointerIcon
fn default() -> PointerIcon
Returns the “default value” for a type. Read more
impl Eq for PointerIcon
Source§impl From<CursorIcon> for PointerIcon
impl From<CursorIcon> for PointerIcon
Source§fn from(icon: CursorIcon) -> PointerIcon
fn from(icon: CursorIcon) -> PointerIcon
Converts to this type from the input type.
Source§impl From<CustomPointerIcon> for PointerIcon
impl From<CustomPointerIcon> for PointerIcon
Source§fn from(icon: CustomPointerIcon) -> PointerIcon
fn from(icon: CustomPointerIcon) -> PointerIcon
Converts to this type from the input type.
Source§impl Hash for PointerIcon
impl Hash for PointerIcon
Source§impl PartialEq for PointerIcon
impl PartialEq for PointerIcon
impl StructuralPartialEq for PointerIcon
Auto Trait Implementations§
impl Freeze for PointerIcon
impl RefUnwindSafe for PointerIcon
impl Send for PointerIcon
impl Sync for PointerIcon
impl Unpin for PointerIcon
impl UnsafeUnpin for PointerIcon
impl UnwindSafe for PointerIcon
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