Tab

Trait Tab 

Source
pub trait Tab {
    const NAME: &'static str;

    // Required method
    fn main_display(&mut self, world: &mut World, ui: &mut Ui);

    // Provided methods
    fn pre_render(&mut self, _world: &mut World) { ... }
    fn post_render(&mut self, _world: &mut World) { ... }
    fn edit_display(&mut self, _world: &mut World, ui: &mut Ui) { ... }
    fn display_display(&mut self, _world: &mut World, ui: &mut Ui) { ... }
    fn export_display(&mut self, _world: &mut World, ui: &mut Ui) { ... }
    fn title(&self) -> WidgetText { ... }
    fn on_tab_button(&self, world: &mut World, response: &Response) { ... }
    fn id(&self) -> Id { ... }
    fn scroll_bars(&self) -> [bool; 2] { ... }
    fn frame(&self) -> Frame { ... }
    fn icon(&self) -> Cow<'static, str> { ... }
}

Required Associated Constants§

Source

const NAME: &'static str

The internal name of the tab used for identification. This must be a static string. The actual displayed name could be different based on e.g. the localization or other contents.

Required Methods§

Source

fn main_display(&mut self, world: &mut World, ui: &mut Ui)

The main display of the tab.

Provided Methods§

Source

fn pre_render(&mut self, _world: &mut World)

Called before rendering the tab.

Source

fn post_render(&mut self, _world: &mut World)

Called after rendering the tab.

Source

fn edit_display(&mut self, _world: &mut World, ui: &mut Ui)

Source

fn display_display(&mut self, _world: &mut World, ui: &mut Ui)

Source

fn export_display(&mut self, _world: &mut World, ui: &mut Ui)

Source

fn title(&self) -> WidgetText

Source

fn on_tab_button(&self, world: &mut World, response: &Response)

Source

fn id(&self) -> Id

Source

fn scroll_bars(&self) -> [bool; 2]

Source

fn frame(&self) -> Frame

Source

fn icon(&self) -> Cow<'static, str>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Tab for ClassesTab

Source§

const NAME: &'static str = "Classes"

Source§

impl Tab for DiagramTab

Source§

const NAME: &'static str = "Diagram"

Source§

impl Tab for DisplayedLinesTab

Source§

const NAME: &'static str = "Available Lines"

Source§

impl Tab for GraphTab

Source§

const NAME: &'static str = "Graph"

Source§

impl Tab for InspectorTab

Source§

const NAME: &'static str = "Inspector"

Source§

impl Tab for MinesweeperTab

Source§

const NAME: &'static str = "Minesweeper"

Source§

impl Tab for OverviewTab

Source§

const NAME: &'static str = "Overview"

Source§

impl Tab for ServicesTab

Source§

const NAME: &'static str = "Services"

Source§

impl Tab for SettingsTab

Source§

const NAME: &'static str = "Settings"

Source§

impl Tab for StartTab

Source§

const NAME: &'static str = "Start"

Source§

impl Tab for StationTimetableTab

Source§

const NAME: &'static str = "Station Timetable"

Source§

impl Tab for VehicleTab

Source§

const NAME: &'static str = "Vehicle"