pub struct LogoComponent { /* private fields */ }
Implementationsยง
Sourceยงimpl LogoComponent
impl LogoComponent
pub fn new(theme: Theme) -> Self
pub fn with_blinking(self, blink: bool) -> Self
pub fn stop_blinking(&mut self)
pub fn start_blinking(&mut self)
Trait Implementationsยง
Sourceยงimpl Component for LogoComponent
impl Component for LogoComponent
Sourceยงfn init(&mut self, _area: Size)
fn init(&mut self, _area: Size)
Initialize the component with a specified area if necessary. Usefull for components that
need to performe some initialization before the first render. Read more
Sourceยงfn receive_message(&mut self, message: String)
fn receive_message(&mut self, message: String)
Receive a custom message, probably from another component. Read more
Sourceยงfn draw(&mut self, f: &mut Frame<'_>, area: Rect)
fn draw(&mut self, f: &mut Frame<'_>, area: Rect)
Render the component on the screen. (REQUIRED) Read more
Sourceยงfn handle_key_events(&mut self, key: KeyEvent) -> Option<Action>
fn handle_key_events(&mut self, key: KeyEvent) -> Option<Action>
Handle key events and produce actions if necessary. Read more
Sourceยงfn handle_mouse_events(&mut self, mouse: MouseEvent) -> Option<Action>
fn handle_mouse_events(&mut self, mouse: MouseEvent) -> Option<Action>
Handle mouse events and produce actions if necessary. Read more
Sourceยงfn handle_tick_event(&mut self) -> Option<Action>
fn handle_tick_event(&mut self) -> Option<Action>
Handle Tick events and produce actions if necessary. Read more
Sourceยงfn handle_frame_event(&mut self) -> Option<Action>
fn handle_frame_event(&mut self) -> Option<Action>
Handle frame events and produce actions if necessary. Read more
Sourceยงfn handle_paste_event(&mut self, message: String) -> Option<Action>
fn handle_paste_event(&mut self, message: String) -> Option<Action>
Handle paste events and produce actions if necessary. Read more
Sourceยงfn update(&mut self, action: &Action)
fn update(&mut self, action: &Action)
Update the state of the component based on a received action. Read more
Sourceยงfn child_mut(&mut self, name: &str) -> Option<&mut Box<dyn Component>>
fn child_mut(&mut self, name: &str) -> Option<&mut Box<dyn Component>>
Get a child component by name as a mutable reference. Read more
Sourceยงfn child(&mut self, name: &str) -> Option<&Box<dyn Component>>
fn child(&mut self, name: &str) -> Option<&Box<dyn Component>>
Get a child component by name as an immutable reference. Read more
Sourceยงfn on_active_changed(&mut self, active: bool)
fn on_active_changed(&mut self, active: bool)
Notify the component that its active state has changed. Read more
Sourceยงimpl ComponentAccessors for LogoComponent
impl ComponentAccessors for LogoComponent
Sourceยงfn set_active(&mut self, active: bool)
fn set_active(&mut self, active: bool)
sets the active state of the component
Sourceยงfn register_action_handler(&mut self, tx: UnboundedSender<String>)
fn register_action_handler(&mut self, tx: UnboundedSender<String>)
registers an action handler that can send actions for processing if necessary
Sourceยงfn send_action(&self, action: Action)
fn send_action(&self, action: Action)
send a message to through the action handler bus
fn as_active(self) -> Self
Auto Trait Implementationsยง
impl Freeze for LogoComponent
impl !RefUnwindSafe for LogoComponent
impl !Send for LogoComponent
impl !Sync for LogoComponent
impl Unpin for LogoComponent
impl !UnwindSafe for LogoComponent
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
Sourceยงimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Sourceยงfn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Sourceยงfn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Sourceยงfn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
โs vtable from &Trait
โs.Sourceยงfn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
โs vtable from &mut Trait
โs.Sourceยงimpl<T> IntoEither for T
impl<T> IntoEither for T
Sourceยงfn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSourceยงfn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more