pub trait Widget {
fn apply_size_constraints(
&mut self,
size_constraints: SizeConstraints
) -> Size;
fn handle_command(
&mut self,
widget_command: WidgetCommand
) -> Result<(), WidgetError>;
fn handle_event(
&mut self,
system_event: &SystemEvent,
widget_events: &mut Vec<WidgetEvent>
);
fn paint(&self, piet: &mut Piet<'_>, region: &Region) -> Result<(), Error>;
fn set_origin(&mut self, origin: Point);
fn widget_id(&self) -> &WidgetId;
}