rat_widget

Module event

Source
Expand description

Event-handler traits and Keybindings.

Modules§

crossterm
Support for the ct_event! macro.
util
Some utility functions that pop up all the time.

Macros§

ct_event
This macro produces pattern matches for crossterm events.
flow
Breaks the control-flow if the block returns a value for which ConsumedEvent::is_consumed is true.
try_flow
Breaks the control-flow if the block returns a value for which ConsumedEvent::is_consumed is true.

Structs§

Dialog
Event-handling for a dialog like widget.
DoubleClick
Event-handler for double-click on a widget.
MouseOnly
Handle mouse-events only. Useful whenever you want to write new key-bindings, but keep the mouse-events.
Popup
Popup/Overlays are a bit difficult to handle, as there is no z-order/area tree, which would direct mouse interactions. We can simulate a z-order in the event-handler by trying the things with a higher z-order first.
ReadOnly
Runs only the navigation events, not any editing.
Regular
All the regular and expected event-handling a widget can do.

Enums§

ButtonOutcome
Result value for event-handling.
CalOutcome
Result of event handling.
CheckOutcome
Result value for event-handling.
ChoiceOutcome
Result value for event-handling.
DoubleClickOutcome
Result type for double-click event-handling.
EditOutcome
Result type for the edit widgets.
FileOutcome
Result for the FileDialog.
MenuOutcome
Outcome for menuline.
Outcome
The baseline outcome for an event-handler.
PagerOutcome
Result of event handling.
PopupOutcome
RadioOutcome
Result value for event-handling.
ScrollOutcome
Result of event-handling for a scroll.
SliderOutcome
Result value for event-handling.
TabbedOutcome
Result of event handling.
TableOutcome
Result value for event-handling.
TextOutcome
Result of event handling.

Traits§

ConsumedEvent
When calling multiple event-handlers, the minimum information required from the result is consumed the event/didn’t consume the event.
HandleEvent
A very broad trait for an event handler.