Struct LogoComponent

Source
pub struct LogoComponent { /* private fields */ }

Implementationsยง

Sourceยง

impl LogoComponent

Source

pub fn new(theme: Theme) -> Self

Source

pub fn with_blinking(self, blink: bool) -> Self

Source

pub fn stop_blinking(&mut self)

Source

pub fn start_blinking(&mut self)

Trait Implementationsยง

Sourceยง

impl Component for LogoComponent

Sourceยง

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)

Receive a custom message, probably from another component. Read more
Sourceยง

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>

Handle key events and produce actions if necessary. Read more
Sourceยง

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>

Handle Tick events and produce actions if necessary. Read more
Sourceยง

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>

Handle paste events and produce actions if necessary. Read more
Sourceยง

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>>

Get a child component by name as a mutable reference. Read more
Sourceยง

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)

Notify the component that its active state has changed. Read more
Sourceยง

impl ComponentAccessors for LogoComponent

Sourceยง

fn name(&self) -> String

returns the name of the component
Sourceยง

fn is_active(&self) -> bool

returns the active state of the component
Sourceยง

fn set_active(&mut self, active: bool)

sets the active state of the component
Sourceยง

fn register_action_handler(&mut self, tx: UnboundedSender<String>)

registers an action handler that can send actions for processing if necessary
Sourceยง

fn send(&self, action: &str)

send a message to through the action handler bus
Sourceยง

fn send_action(&self, action: Action)

send a message to through the action handler bus
Sourceยง

fn as_active(self) -> Self

Sourceยง

fn get_children(&mut self) -> Option<&mut Children>

Get all child components. This is necessary if the component has children, as will be used by other functions to have knowledge of the children. Read more
Sourceยง

impl Default for LogoComponent

Sourceยง

fn default() -> Self

Returns the โ€œdefault valueโ€ for a type. Read more

Auto Trait Implementationsยง

Blanket Implementationsยง

Sourceยง

impl<T> Any for T
where T: 'static + ?Sized,

Sourceยง

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Sourceยง

impl<T> Borrow<T> for T
where T: ?Sized,

Sourceยง

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Sourceยง

impl<T> BorrowMut<T> for T
where T: ?Sized,

Sourceยง

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Sourceยง

impl<T> Downcast for T
where T: Any,

Sourceยง

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>

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)

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)

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> From<T> for T

Sourceยง

fn from(t: T) -> T

Returns the argument unchanged.

Sourceยง

impl<T, U> Into<U> for T
where U: From<T>,

Sourceยง

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Sourceยง

impl<T> IntoEither for T

Sourceยง

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 more
Sourceยง

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Sourceยง

impl<T> Pointable for T

Sourceยง

const ALIGN: usize

The alignment of pointer.
Sourceยง

type Init = T

The type for initializers.
Sourceยง

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Sourceยง

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Sourceยง

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Sourceยง

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Sourceยง

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Sourceยง

type Error = Infallible

The type returned in the event of a conversion error.
Sourceยง

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Sourceยง

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Sourceยง

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Sourceยง

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.