pub struct Container { /* private fields */ }Expand description
Container - a component that contains other components.
Children are rendered in order, vertically stacked.
Implementations§
Source§impl Container
impl Container
Sourcepub fn remove_child(&self, component: &Arc<dyn Component>)
pub fn remove_child(&self, component: &Arc<dyn Component>)
Remove a child component.
Sourcepub fn child_count(&self) -> usize
pub fn child_count(&self) -> usize
Get the number of children.
Sourcepub fn get_children(&self) -> Vec<Arc<dyn Component>>
pub fn get_children(&self) -> Vec<Arc<dyn Component>>
Get a clone of the children list.
Trait Implementations§
Source§impl Component for Container
impl Component for Container
Source§fn render(&self, width: usize) -> Vec<String>
fn render(&self, width: usize) -> Vec<String>
Render the component to lines for the given viewport width. Read more
Source§fn invalidate(&self)
fn invalidate(&self)
Invalidate any cached rendering state.
Called when theme changes or when component needs to re-render from scratch.
Source§fn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
Downcast to Any for runtime type checking.
This enables the layout system to check for LayoutNodeProvider.
Source§fn handle_input(&self, _data: &str) -> bool
fn handle_input(&self, _data: &str) -> bool
Optional handler for keyboard input when component has focus. Read more
Source§fn wants_key_release(&self) -> bool
fn wants_key_release(&self) -> bool
If true, component receives key release events (Kitty protocol).
Default is false - release events are filtered out.
Auto Trait Implementations§
impl Freeze for Container
impl RefUnwindSafe for Container
impl Send for Container
impl Sync for Container
impl Unpin for Container
impl UnsafeUnpin for Container
impl UnwindSafe for Container
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more