Widget

Trait Widget 

Source
pub trait Widget<Ev, Surface> {
    type Output;

    // Required methods
    fn take_event(&self, ev: Ev, size: (u32, u32)) -> Self::Output;
    fn draw(&self, surface: &mut Surface);
}

Required Associated Types§

Required Methods§

Source

fn take_event(&self, ev: Ev, size: (u32, u32)) -> Self::Output

Source

fn draw(&self, surface: &mut Surface)

Implementors§

Source§

impl<Ev: Positional, Surface: Surfacial, A, W: DerefMut<Target = dyn Widget<Ev, Surface, Output = A>>, Ws: DerefMut<Target = [(u32, W)]>, F: Fn() -> A> Widget<Ev, Surface> for Split<Ev, Surface, A, W, Ws, F>