[][src]Enum azul_core::dom::On

pub enum On {
    MouseOver,
    MouseDown,
    LeftMouseDown,
    MiddleMouseDown,
    RightMouseDown,
    MouseUp,
    LeftMouseUp,
    MiddleMouseUp,
    RightMouseUp,
    MouseEnter,
    MouseLeave,
    Scroll,
    TextInput,
    VirtualKeyDown,
    VirtualKeyUp,
    HoveredFile,
    DroppedFile,
    HoveredFileCancelled,
    FocusReceived,
    FocusLost,
}

When to call a callback action - On::MouseOver, On::MouseOut, etc.

Variants

MouseOver

Mouse cursor is hovering over the element

MouseDown

Mouse cursor has is over element and is pressed (not good for "click" events - use MouseUp instead)

LeftMouseDown

(Specialization of MouseDown). Fires only if the left mouse button has been pressed while cursor was over the element

MiddleMouseDown

(Specialization of MouseDown). Fires only if the middle mouse button has been pressed while cursor was over the element

RightMouseDown

(Specialization of MouseDown). Fires only if the right mouse button has been pressed while cursor was over the element

MouseUp

Mouse button has been released while cursor was over the element

LeftMouseUp

(Specialization of MouseUp). Fires only if the left mouse button has been released while cursor was over the element

MiddleMouseUp

(Specialization of MouseUp). Fires only if the middle mouse button has been released while cursor was over the element

RightMouseUp

(Specialization of MouseUp). Fires only if the right mouse button has been released while cursor was over the element

MouseEnter

Mouse cursor has entered the element

MouseLeave

Mouse cursor has left the element

Scroll

Mousewheel / touchpad scrolling

TextInput

The window received a unicode character (also respects the system locale). Check keyboard_state.current_char to get the current pressed character.

VirtualKeyDown

A virtual keycode was pressed. Note: This is only the virtual keycode, not the actual char. If you want to get the character, use TextInput instead. A virtual key does not have to map to a printable character.

You can get all currently pressed virtual keycodes in the keyboard_state.current_virtual_keycodes and / or just the last keycode in the keyboard_state.latest_virtual_keycode.

VirtualKeyUp

A virtual keycode was release. See VirtualKeyDown for more info.

HoveredFile

A file has been dropped on the element

DroppedFile

A file is being hovered on the element

HoveredFileCancelled

A file was hovered, but has exited the window

FocusReceived

Equivalent to onfocus

FocusLost

Equivalent to onblur

Trait Implementations

impl Clone for On[src]

impl Copy for On[src]

impl Debug for On[src]

impl Eq for On[src]

impl From<On> for EventFilter[src]

impl Hash for On[src]

impl Ord for On[src]

impl PartialEq<On> for On[src]

impl PartialOrd<On> for On[src]

impl StructuralEq for On[src]

impl StructuralPartialEq for On[src]

Auto Trait Implementations

impl RefUnwindSafe for On

impl Send for On

impl Sync for On

impl Unpin for On

impl UnwindSafe for On

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.