[][src]Enum pushrod::core::callbacks::CallbackEvent

pub enum CallbackEvent {
    MouseEntered {
        widget_id: i32,
    },
    MouseExited {
        widget_id: i32,
    },
    MouseScrolled {
        widget_id: i32,
        point: Point,
    },
    MouseMoved {
        widget_id: i32,
        point: Point,
    },
    KeyPressed {
        widget_id: i32,
        key: Key,
        state: ButtonState,
    },
    WindowResized {
        size: Size,
    },
    WindowFocused {
        flag: bool,
    },
    MouseButtonDown {
        widget_id: i32,
        button: Button,
    },
    MouseButtonUpInside {
        widget_id: i32,
        button: Button,
    },
    MouseButtonUpOutside {
        widget_id: i32,
        button: Button,
    },
    WidgetClicked {
        widget_id: i32,
        button: Button,
    },
    WidgetSelected {
        widget_id: i32,
        button: Button,
        selected: bool,
    },
    WidgetMoved {
        widget_id: i32,
        point: Point,
    },
    WidgetResized {
        widget_id: i32,
        size: Size,
    },
    TimerTriggered {
        widget_id: i32,
    },
    UnselectRadioButtons {
        widget_id: i32,
        group_id: i32,
    },
}

These are the different types of events that can be triggered. Any other callback events should be extended in this enum definition.

Variants

MouseEntered

Indicates a mouse entered the bounds of a Widget. Contains the ID of the Widget that was affected.

Fields of MouseEntered

widget_id: i32
MouseExited

Indicates a mouse exited the bounds of a Widget. Contains the ID of the Widget that was affected.

Fields of MouseExited

widget_id: i32
MouseScrolled

Indicates that the scroll wheel was moved inside a Widget. Contains the ID of the Widget that had the mouse scroll action, and the point in the direction of the scroll, along with the amount of points the mouse scroll moved.

Fields of MouseScrolled

widget_id: i32point: Point
MouseMoved

Indicates that a mouse moved within the bounds of a Widget. Contains the ID of the Widget that was affected.

Fields of MouseMoved

widget_id: i32point: Point
KeyPressed

Indicates that a keyboard key was pressed/released inside the bounds of a Widget. Contains the ID of the Widget that received the keypress, along with the Key value, and any associated Button modifier states.

Fields of KeyPressed

widget_id: i32key: Keystate: ButtonState
WindowResized

Indicates that the main application window was resized. Contains the Size of the new bounds.

Fields of WindowResized

size: Size
WindowFocused

Indicates whether or not focus was gained or lost for the main application. Contains a boolean flag indicating focus: true is focused, false if lost.

Fields of WindowFocused

flag: bool
MouseButtonDown

Indicates that a mouse button was pressed within the bounds of a Widget. Contains the ID of the Widget, along with the Button that was clicked.

Fields of MouseButtonDown

widget_id: i32button: Button
MouseButtonUpInside

Indicates that a mouse button was released within the bounds of a Widget. Contains the ID of the Widget, along with the Button that was released.

Fields of MouseButtonUpInside

widget_id: i32button: Button
MouseButtonUpOutside

Indicates that a mouse button was released outside of the bounds of a Widget. Contains the ID of the Widget, along with the Button that was released.

Fields of MouseButtonUpOutside

widget_id: i32button: Button
WidgetClicked

Indicates that a mouse button triggered a click action within a Widget. Contains the ID of the Widget, along with the Button that was used to indicate the click action.

Fields of WidgetClicked

widget_id: i32button: Button
WidgetSelected

Indicates that a Widget's selected state has been toggled. Contains the ID of the Widget that was toggled, along with the mouse Button that was clicked, and the final selected state of the widget.

Fields of WidgetSelected

widget_id: i32button: Buttonselected: bool
WidgetMoved

Indicates that a Widget's position has been moved either through physical interaction, or through a LayoutManager repositioning. Contains the ID of the Widget that moved, along with its new position as a Point.

Fields of WidgetMoved

widget_id: i32point: Point
WidgetResized

Indicates that a Widget's Size has changed. Contains the ID of the Widget, along with the new Size of the Widget.

Fields of WidgetResized

widget_id: i32size: Size
TimerTriggered

Indicates that a timer timeout has been triggered. Contains the ID of the Widget that was affected.

Fields of TimerTriggered

widget_id: i32
UnselectRadioButtons

Indicates that a group of RadioButtonWidget objects has been deselected. Contains the ID of the Widget that was unselected, along with the group ID.

Fields of UnselectRadioButtons

widget_id: i32group_id: i32

Trait Implementations

impl Clone for CallbackEvent[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for CallbackEvent[src]

Auto Trait Implementations

Blanket Implementations

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.

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

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

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

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.