pub trait Widget {
// Required method
fn calc_constraints(
&mut self,
children: &ConstraintsContext<'_>
) -> Constraints;
// Provided methods
fn sense(&mut self) -> Option<&mut Sense> { ... }
fn update(&mut self, delta_time: f64) { ... }
fn draw(&mut self, cx: &mut DrawContext<'_, '_>) { ... }
fn handle_event(&mut self, event: &Event) { ... }
fn walk_children_mut(&mut self, f: &mut dyn FnMut(&mut dyn Widget)) { ... }
fn layout_children(&mut self, cx: &mut LayoutContext<'_>) { ... }
}