Module nannou_conrod::input [−][src]
Expand description
This module contains all the logic for handling input events and providing them to widgets.
All user input is provided to the Ui
in the form of input::Input
events, which are received
via the Ui::handle_event
method. These raw input events tend to be fairly low level. The Ui
stores each of these Input
events in it’s GlobalInput
, which keeps track of the state of
input for the entire Ui
. GlobalInput
will also aggregate the low level events into higher
level ones. For instance, two events indicating that a mouse button was pressed then released
would cause a new UiEvent::MouseClick
to be generated. This saves individual widgets from
having to interpret these themselves, thus freeing them from also having to store input state.
Whenever there’s an update, all of the events that have occurred since the last update will be
available for widgets to process. WidgetInput
is used to provide input events to a specific
widget. It filters events that do not apply to the widget. All events provided by WidgetIput
will have all coordinates in the widget’s own local coordinate system, where (0, 0)
is the
middle of the widget’s bounding Rect
. GlobalInput
, on the other hand, will never filter out
any events, and will always provide them with coordinates relative to the window.
Modules
Handles all of the global input events and state.
The core of this module is the Global
struct. It is responsible for aggregating
and interpreting raw input events into high-level semantic events.
Back-end agnostic keyboard keys.
Everything related to storing the state of user input.
Touch-related items.
Contains all the logic for filtering input events and making them relative to widgets.
Structs
Components of a controller axis move event. Not guaranteed consistent across backends.
Components of a controller button event. Not guaranteed consistent across backends.
Global input event handler that also implements input::Provider
. The Ui
passes all events
to it’s Global
instance, which aggregates and interprets the events to provide so-called
‘high-level’ events to widgets. This input gets reset after every update by the Ui
.
Render arguments.
Holds the current state of user input.
Represents a touch interaction.
Provides only events and input state that are relevant to a specific widget.
Enums
Models different kinds of buttons.
Represent a keyboard key. Keycodes follows SDL http://wiki.libsdl.org/SDLKeycodeLookup
Different kinds of motion input.
Represent a mouse button.
Sources from which user input may be received.