pub trait Widget: DataProcessor {
// Required method
fn to_native(
&mut self,
_widget_generator: &mut dyn WidgetGenerator,
) -> Result<NativeWidget, ()>;
// Provided method
fn draw(&mut self) { ... }
}
Expand description
Minimal UI element.
Widget represents minimal UI element. Most common widgets is Button and TextEdit.
Required Methods§
Sourcefn to_native(
&mut self,
_widget_generator: &mut dyn WidgetGenerator,
) -> Result<NativeWidget, ()>
fn to_native( &mut self, _widget_generator: &mut dyn WidgetGenerator, ) -> Result<NativeWidget, ()>
Generate native widget