Enum cursive::event::Event [] [src]

pub enum Event {
    WindowResize,
    Refresh,
    Char(char),
    CtrlChar(char),
    AltChar(char),
    Key(Key),
    Shift(Key),
    Alt(Key),
    AltShift(Key),
    Ctrl(Key),
    CtrlShift(Key),
    CtrlAlt(Key),
    Mouse {
        offset: Vec2,
        position: Vec2,
        event: MouseEvent,
    },
    Unknown(Vec<u8>),
    // some variants omitted
}

Represents an event as seen by the application.

Variants

Event fired when the window is resized.

Event fired regularly when a auto-refresh is set.

A character was entered (includes numbers, punctuation, ...).

A character was entered with the Ctrl key pressed.

A character was entered with the Alt key pressed.

A non-character key was pressed.

A non-character key was pressed with the Shift key pressed.

A non-character key was pressed with the Alt key pressed.

A non-character key was pressed with the Shift and Alt keys pressed.

A non-character key was pressed with the Ctrl key pressed.

A non-character key was pressed with the Ctrl and Shift keys pressed.

A non-character key was pressed with the Ctrl and Alt keys pressed.

A mouse event was sent.

Fields of Mouse

Position of the top-left corner of the view receiving this event.

Position of the mouse when this event was fired.

The mouse event itself.

An unknown event was received.

Methods

impl Event
[src]

[src]

Returns the position of the mouse, if self is a mouse event.

[src]

Update self with the given offset.

If self is a mouse event, adds top_left to its offset. Otherwise, do nothing.

[src]

Returns a cloned, relativized event.

If self is a mouse event, adds top_left to its offset. Otherwise, returns a simple clone.

Trait Implementations

impl PartialEq for Event
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Eq for Event
[src]

impl Clone for Event
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Hash for Event
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for Event
[src]

[src]

Formats the value using the given formatter.

impl From<char> for Event
[src]

[src]

Performs the conversion.

impl From<Key> for Event
[src]

[src]

Performs the conversion.