Expand description
Menu bar functionality (very basic so far).
Usage:
fn show_menu(ui: &mut egui::Ui) {
use egui::{menu, Button};
menu::bar(ui, |ui| {
ui.menu_button("File", |ui| {
if ui.button("Open").clicked() {
// …
}
});
});
}
Structs§
- What is saved between frames.
- Menu root associated with an Id from a Response
- Stores the state for the context menu.
- Components of menu state, public for advanced usage.
Enums§
Functions§
- The menu bar goes well in a
TopBottomPanel::top
, but can also be placed in aWindow
. In the latter case you may want to wrap it inFrame
. - Construct a top level menu in a menu bar. This would be e.g. “File”, “Edit” etc.
- Construct a top level menu with an image in a menu bar. This would be e.g. “File”, “Edit” etc.