Trait iced_graphics::widget::canvas::Program
source · pub trait Program<Message, Theme = Theme> {
type State: Default + 'static;
fn draw(
&self,
state: &Self::State,
theme: &Theme,
bounds: Rectangle,
cursor: Cursor
) -> Vec<Geometry> ⓘ;
fn update(
&self,
_state: &mut Self::State,
_event: Event,
_bounds: Rectangle,
_cursor: Cursor
) -> (Status, Option<Message>) { ... }
fn mouse_interaction(
&self,
_state: &Self::State,
_bounds: Rectangle,
_cursor: Cursor
) -> Interaction { ... }
}
Available on crate feature
canvas
only.