Struct tuirealm::view::View [−][src]
pub struct View { /* fields omitted */ }
Expand description
View
View is the wrapper and manager for all the components. A View is a container for all the components in a certain layout. Each View can have only one focused component.
Implementations
impl View
[src]
impl View
[src]pub fn mount(&mut self, id: &str, component: Box<dyn Component>)
[src]
pub fn mount(&mut self, id: &str, component: Box<dyn Component>)
[src]mount
Mount a new component in the view
pub fn umount(&mut self, id: &str)
[src]
pub fn umount(&mut self, id: &str)
[src]umount
Umount a component from the view. If component has focus, blur component and remove it from the stack
pub fn render(&self, id: &str, frame: &mut Canvas<'_>, area: Rect)
[src]
pub fn render(&self, id: &str, frame: &mut Canvas<'_>, area: Rect)
[src]render
RenderData component with the provided id
pub fn update(&mut self, id: &str, props: Props) -> Option<(String, Msg)>
[src]
pub fn update(&mut self, id: &str, props: Props) -> Option<(String, Msg)>
[src]update
Update component properties
Returns None
if component doesn’t exist
pub fn on(&mut self, ev: Event) -> Option<(String, Msg)>
[src]
pub fn on(&mut self, ev: Event) -> Option<(String, Msg)>
[src]on
Handle event for the focused component (if any)
Returns None
if no component is focused