Trait egui::widgets::Widget [−][src]
Expand description
Anything implementing Widget can be added to a Ui
with Ui::add
.
[Button]
, [Label]
, Slider
, etc all implement the Widget
trait.
Note that the widgets (Button
, TextEdit
etc) are
builders,
and not objects that hold state.
Tip: you can impl Widget for &mut YourThing { }
.
|ui: &mut Ui| -> Response { … }
also implements Widget
.