[−][src]Module cursive_core::event
User-input events and their effects.
- Every user input the application receives is converted to an
Event
. - Each event is then given to the root, and descends the view tree down to
the view currently in focus, through the
on_event
method.- If the view consumes the event, it may return a callback to be executed.
- Otherwise, it ignores the event, and the view parent can in turn choose to consume it or not.
- If no view consumes the event, the global callback table is checked.
Structs
Callback | Callback is a function that can be triggered by an event. It has a mutable access to the cursive root. |
EventTrigger | A trigger that only selects some types of events. |
Enums
Event | Represents an event as seen by the application. |
EventResult | Answer to an event notification. The event can be consumed or ignored. |
Key | A non-character key on the keyboard |
MouseButton | One of the buttons present on the mouse |
MouseEvent | Represents a possible event sent by the mouse. |
Type Definitions
AnyCb | A callback that can be run on |