Trait ExWidget

Source
pub trait ExWidget {
    // Required method
    fn ui_ex(self, ex_ui: &mut ExUi<'_, '_>) -> Response;
}
Expand description

Similar to egui::Widget, but for use with ExUi

Anything implementing Widget can be added to a ExUi with ExUi::add, but this trait is if you prefer to use widget.ui_ex(ui).

This trait is implemented for all types that implement egui::Widget

Required Methods§

Source

fn ui_ex(self, ex_ui: &mut ExUi<'_, '_>) -> Response

Allocate space, interact, paint, and return a Response.

Note that this consumes self. This is because most widgets (Button, TextEdit etc) are builders

Tip: you can impl Widget for &mut YourObject { }.

Implementors§

Source§

impl<T: Widget> ExWidget for T