Tab

Trait Tab 

Source
pub trait Tab {
    const NAME: &'static str;
    const ICON: &'static str = "๐Ÿ–ณ";

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

    // Provided methods
    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] { ... }
}

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.

Provided Associated Constantsยง

Source

const ICON: &'static str = "๐Ÿ–ณ"

The icon for the tab button.

Required Methodsยง

Source

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

The main display of the tab.

Provided Methodsยง

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]

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 MinesweeperTab

Sourceยง

const NAME: &'static str = "Minesweeper"

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"