Module egui::widgets

source ·
Expand description

Widgets are pieces of GUI such as Label, Button, Slider etc.

Example widget uses:

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

Re-exports

Modules

Structs

  • Clickable button with text.
  • Boolean on/off control with text label.
  • A numeric value that you can change by dragging the number. More compact than a Slider.
  • A clickable hyperlink, e.g. to "https://github.com/emilk/egui".
  • A widget which displays an image.
  • A clickable image within a frame.
  • This type determines the constraints on how the size of an image should be calculated.
  • Static text.
  • Clickable text, that looks like a hyperlink.
  • A simple progress bar.
  • One out of several alternatives, either selected or not.
  • One out of several alternatives, either selected or not. Will mark selected items with a different background color. An alternative to RadioButton and Checkbox.
  • A visual separator. A horizontal or vertical line (depending on Layout).
  • Control a number with a slider.
  • A spinner widget used to indicate loading.

Enums

Traits

Functions