pub trait Widget {
// Provided methods
fn render_widget_bounds(&self, _bounds: Rect, _style: &Style) { ... }
fn handle_widget_event(
&mut self,
_event: &UiEvent,
_ctx: &mut EventContext,
) -> EventPolicy { ... }
fn get_property(&self, _key: PropertyKey) -> Option<PropertyValue<'_>> { ... }
fn set_property<'a>(
&mut self,
_key: PropertyKey,
_val: PropertyValue<'a>,
) -> Result<(), PropertyError> { ... }
}Provided Methods§
fn render_widget_bounds(&self, _bounds: Rect, _style: &Style)
fn handle_widget_event( &mut self, _event: &UiEvent, _ctx: &mut EventContext, ) -> EventPolicy
fn get_property(&self, _key: PropertyKey) -> Option<PropertyValue<'_>>
fn set_property<'a>( &mut self, _key: PropertyKey, _val: PropertyValue<'a>, ) -> Result<(), PropertyError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".