Struct mg::Application
[−]
[src]
pub struct Application<T> { // some fields omitted }
Create a new MG application window. This window contains a status bar where the user can type a command and a central widget.
Methods
impl<T: EnumFromStr + 'static> Application<T>
[src]
fn new() -> Rc<Self>
Create a new application.
fn new_with_config(config: Config) -> Rc<Self>
Create a new application with configuration.
fn add_statusbar_item(&self) -> StatusBarItem
Create a new status bar item.
fn connect_command<F: Fn(T) + 'static>(&self, callback: F)
Add a callback to the command event.
fn error(&self, error: &str)
Show an error to the user.
fn parse_config<P: AsRef<Path>>(&self, filename: P) -> Result<()>
Parse a configuration file.
fn set_view<W: IsA<Widget> + WidgetExt>(&self, view: &W)
Set the main widget.
fn set_window_title(&self, title: &str)
Set the window title.
fn use_dark_theme(&self)
Use the dark variant of the theme if available.
fn window(&self) -> &Window
Get the application window.