Module cursive_core::event

source ·
Expand description

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 is a function that can be triggered by an event. It has a mutable access to the cursive root.
A trigger that only selects some types of events.

Enums

Represents an event as seen by the application.
Answer to an event notification. The event can be consumed or ignored.
A non-character key on the keyboard
One of the buttons present on the mouse
Represents a possible event sent by the mouse.

Type Definitions

A callback that can be run on &mut dyn View.