cosmic::app

Trait ApplicationExt

source
pub trait ApplicationExt: Application {
    // Required methods
    fn drag(&mut self) -> Task<Self::Message>;
    fn maximize(&mut self) -> Task<Self::Message>;
    fn minimize(&mut self) -> Task<Self::Message>;
    fn title(&self, id: Id) -> &str;
    fn set_window_title(&mut self, title: String, id: Id) -> Task<Self::Message>;
    fn view_main(&self) -> Element<'_, Message<Self::Message>>;

    // Provided methods
    fn set_show_context(&mut self, show: bool) { ... }
    fn set_header_title(&mut self, title: String) { ... }
}
Expand description

Methods automatically derived for all types implementing Application.

Required Methods§

source

fn drag(&mut self) -> Task<Self::Message>

Initiates a window drag.

source

fn maximize(&mut self) -> Task<Self::Message>

Maximizes the window.

source

fn minimize(&mut self) -> Task<Self::Message>

Minimizes the window.

source

fn title(&self, id: Id) -> &str

Get the title of a window.

source

fn set_window_title(&mut self, title: String, id: Id) -> Task<Self::Message>

Set the title of a window.

source

fn view_main(&self) -> Element<'_, Message<Self::Message>>

View template for the main window.

Provided Methods§

source

fn set_show_context(&mut self, show: bool)

Set the context drawer visibility.

source

fn set_header_title(&mut self, title: String)

Set the header bar title.

Object Safety§

This trait is not object safe.

Implementors§