[−][src]Module widgetry::app_state
A widgetry application splits its state into two pieces: global shared state that lasts for the entire lifetime of the application, and a stack of smaller states, only one of which is active at a time. For example, imagine an application to view a map. The shared state would include the map and pre-rendered geometry for it. The individual states might start with a splash screen or menu to choose a map, then a map viewer, then maybe a state to drill down into pieces of the map.
Structs
App |
Enums
DrawBaselayer | Before |
Transition | When a state responds to an event, it can specify some way to manipulate the stack of states. |
Traits
SharedAppState | Any data that should last the entire lifetime of the application should be stored in the struct implementing this trait. |
State | A temporary state of an application. There's a stack of these, with the most recent being the active one. |