pub trait Program<Message, Theme = Theme> {
type State: 'static + Default;
fn draw(
&self,
state: &Self::State,
theme: &Theme,
bounds: Rectangle<f32>,
cursor: Cursor
) -> Vec<Geometry, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
;
fn update(
&self,
_state: &mut Self::State,
_event: Event,
_bounds: Rectangle<f32>,
_cursor: Cursor
) -> (Status, Option<Message>) { ... }
fn mouse_interaction(
&self,
_state: &Self::State,
_bounds: Rectangle<f32>,
_cursor: Cursor
) -> Interaction { ... }
}
Available on crate feature
canvas
only.Expand description
Required Associated Types
Required Methods
Provided Methods
sourcefn update(
&self,
_state: &mut Self::State,
_event: Event,
_bounds: Rectangle<f32>,
_cursor: Cursor
) -> (Status, Option<Message>)
fn update(
&self,
_state: &mut Self::State,
_event: Event,
_bounds: Rectangle<f32>,
_cursor: Cursor
) -> (Status, Option<Message>)
sourcefn mouse_interaction(
&self,
_state: &Self::State,
_bounds: Rectangle<f32>,
_cursor: Cursor
) -> Interaction
fn mouse_interaction(
&self,
_state: &Self::State,
_bounds: Rectangle<f32>,
_cursor: Cursor
) -> Interaction
Implementations on Foreign Types
sourceimpl<Message, Theme, T> Program<Message, Theme> for &Twhere
T: Program<Message, Theme>,
impl<Message, Theme, T> Program<Message, Theme> for &Twhere
T: Program<Message, Theme>,
type State = <T as Program<Message, Theme>>::State
fn update(
&self,
state: &mut <&T as Program<Message, Theme>>::State,
event: Event,
bounds: Rectangle<f32>,
cursor: Cursor
) -> (Status, Option<Message>)
fn draw(
&self,
state: &<&T as Program<Message, Theme>>::State,
theme: &Theme,
bounds: Rectangle<f32>,
cursor: Cursor
) -> Vec<Geometry, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,