Skip to main content

AnyComponent

Trait AnyComponent 

Source
pub trait AnyComponent {
    // Required methods
    fn any_event(
        &mut self,
        children: Children<'_, '_>,
        ctx: AnyComponentContext<'_, '_>,
        ev: Event,
    ) -> Event;
    fn any_message(
        &mut self,
        children: Children<'_, '_>,
        ctx: AnyComponentContext<'_, '_>,
        message: Box<dyn Any>,
    );
    fn any_tick(
        &mut self,
        children: Children<'_, '_>,
        ctx: AnyComponentContext<'_, '_>,
        dt: Duration,
    );
    fn any_focus(
        &mut self,
        children: Children<'_, '_>,
        ctx: AnyComponentContext<'_, '_>,
    );
    fn any_blur(
        &mut self,
        children: Children<'_, '_>,
        ctx: AnyComponentContext<'_, '_>,
    );
    fn any_resize(
        &mut self,
        children: Children<'_, '_>,
        ctx: AnyComponentContext<'_, '_>,
    );
    fn any_component_event(
        &mut self,
        children: Children<'_, '_>,
        ctx: AnyComponentContext<'_, '_>,
        value: &mut UserEvent<'_>,
    );
    fn any_accept_focus(&self) -> bool;
    fn any_ticks(&self) -> bool;
}

Required Methods§

Source

fn any_event( &mut self, children: Children<'_, '_>, ctx: AnyComponentContext<'_, '_>, ev: Event, ) -> Event

Source

fn any_message( &mut self, children: Children<'_, '_>, ctx: AnyComponentContext<'_, '_>, message: Box<dyn Any>, )

Source

fn any_tick( &mut self, children: Children<'_, '_>, ctx: AnyComponentContext<'_, '_>, dt: Duration, )

Source

fn any_focus( &mut self, children: Children<'_, '_>, ctx: AnyComponentContext<'_, '_>, )

Source

fn any_blur( &mut self, children: Children<'_, '_>, ctx: AnyComponentContext<'_, '_>, )

Source

fn any_resize( &mut self, children: Children<'_, '_>, ctx: AnyComponentContext<'_, '_>, )

Source

fn any_component_event( &mut self, children: Children<'_, '_>, ctx: AnyComponentContext<'_, '_>, value: &mut UserEvent<'_>, )

Source

fn any_accept_focus(&self) -> bool

Source

fn any_ticks(&self) -> bool

Trait Implementations§

Source§

impl Debug for dyn AnyComponent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Implementors§

Source§

impl<T> AnyComponent for T
where T: Component + 'static,