[][src]Module egui::widgets

Widgets are pieces of GUI such as labels, buttons, sliders etc.

Example widget uses:

  • ui.add(Label::new("Text").text_color(color::red));//!
  • if ui.add(Button::new("Click me")).clicked { ... }

Modules

color_picker

Structs

Button

Clickable button with text

Checkbox

Boolean on/off control with text label

DragValue

A floating point value that you can change by dragging the number. More compact than a slider.

Hyperlink

A clickable hyperlink, e.g. to "https://github.com/emilk/egui".

Image
Label

Static text.

RadioButton

One out of several alternatives, either checked or not.

Separator

A visual separator. A horizontal or vertical line (depending on Layout).

Slider

Control a number by a horizontal slider. The range can include any numbers, and go from low-to-high or from high-to-low.

TextEdit

A text region that the user can edit the contents of.

Traits

Widget

Anything implementing Widget can be added to a Ui with Ui::add