Trait flo_ui::Controller
[−]
[src]
pub trait Controller: Send + Sync { fn ui(&self) -> BindRef<Control>; fn get_viewmodel(&self) -> Option<Arc<ViewModel>> { ... } fn get_subcontroller(&self, _id: &str) -> Option<Arc<Controller>> { ... } fn action(&self, _action_id: &str, _action_data: &ActionParameter) { ... } fn get_image_resources(&self) -> Option<Arc<ResourceManager<Image>>> { ... } fn get_canvas_resources(
&self
) -> Option<Arc<ResourceManager<BindingCanvas>>> { ... } fn tick(&self) { ... } }
Controllers represent a portion of the UI and provide a hub for receiving events related to it and connecting the model or viewmodel.
Required Methods
Provided Methods
fn get_viewmodel(&self) -> Option<Arc<ViewModel>>
Retrieves the viewmodel for this controller
fn get_subcontroller(&self, _id: &str) -> Option<Arc<Controller>>
Attempts to retrieve a sub-controller of this controller
fn action(&self, _action_id: &str, _action_data: &ActionParameter)
Callback for when a control associated with this controller generates an action
fn get_image_resources(&self) -> Option<Arc<ResourceManager<Image>>>
Retrieves a resource manager containing the images used in the UI for this controller
fn get_canvas_resources(&self) -> Option<Arc<ResourceManager<BindingCanvas>>>
Retrieves a resource manager containing the canvases used in the UI for this controller
fn tick(&self)
Called just before an update is processed
This is called for every controller every time after processing any actions that might have occurred.
Implementors
impl Controller for NullController
impl<ContentController: Controller> Controller for PopupController<ContentController>