pub trait Widget {
// Required methods
fn id(&self) -> u64;
fn render(&self, ctx: &mut RenderCtx);
fn handle(&mut self, event: &Event) -> bool;
}Expand description
Core trait for all UI elements.
Required Methods§
fn id(&self) -> u64
fn render(&self, ctx: &mut RenderCtx)
fn handle(&mut self, event: &Event) -> bool
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".