irox_egui_extras::toolframe

Trait ToolApp

Source
pub trait ToolApp: App {
    // Provided methods
    fn menu(&mut self, _ui: &mut Ui) { ... }
    fn file_menu(&mut self, _ui: &mut Ui) { ... }
    fn settings_menu(&mut self, _ui: &mut Ui) { ... }
    fn bottom_bar(&mut self, _ui: &mut Ui) { ... }
}
Expand description

Downstream users should implement this trait.

  • Implement menu to append new menu items to the menu bar
  • Implement file_menu to append new items to the file menu in the menu bar
  • Implement settings_menu to append new items to the settings menu in the menu bar
  • Implement bottom_bar to append new items to the bottom status bar

[egui::App] is a required trait. update will be called LAST, and is appropriate for adding a egui::CentralPanel

Provided Methods§

Source

fn menu(&mut self, _ui: &mut Ui)

Appends stuff to the menu

Source

fn file_menu(&mut self, _ui: &mut Ui)

Appends bits to the file menu, ‘Exit’ is always last.

Source

fn settings_menu(&mut self, _ui: &mut Ui)

Appends bits to the settings menu.

Source

fn bottom_bar(&mut self, _ui: &mut Ui)

Appends bits to the bottom bar/panel

Implementors§