cosmic

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<'_, Action<Self::Message>>;

    // Provided methods
    fn set_show_context(&mut self, show: bool) { ... }
    fn set_header_title(&mut self, title: String) { ... }
    fn watch_config<T: CosmicConfigEntry + Send + Sync + Default + 'static + Clone + PartialEq>(
        &self,
        id: &'static str,
    ) -> Subscription<Update<T>> { ... }
    fn watch_state<T: CosmicConfigEntry + Send + Sync + Default + 'static + Clone + PartialEq>(
        &self,
        id: &'static str,
    ) -> Subscription<Update<T>> { ... }
}
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<'_, Action<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.

Source

fn watch_config<T: CosmicConfigEntry + Send + Sync + Default + 'static + Clone + PartialEq>( &self, id: &'static str, ) -> Subscription<Update<T>>

Source

fn watch_state<T: CosmicConfigEntry + Send + Sync + Default + 'static + Clone + PartialEq>( &self, id: &'static str, ) -> Subscription<Update<T>>

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§