pub struct App;Expand description
The application the interface is part of, as a component sees it: a handle on the settings the shell reads every frame — the theme, the language, the zoom, the title.
Changing one asks for a rebuild, so the next frame is built with it. It is the interface’s own thread that owns them: there is one set per thread, and a handle is only a way to reach it.
Implementations§
Source§impl App
impl App
Sourcepub fn set_title(&self, value: String)
pub fn set_title(&self, value: String)
Changes App::title.
Sourcepub fn set_theme(&self, value: Theme)
pub fn set_theme(&self, value: Theme)
Changes App::theme.
Sourcepub fn dark_theme(&self) -> Option<Theme>
pub fn dark_theme(&self) -> Option<Theme>
The theme for a dark interface, if the application has one.
Sourcepub fn set_dark_theme(&self, value: Option<Theme>)
pub fn set_dark_theme(&self, value: Option<Theme>)
Changes App::dark_theme.
Sourcepub fn theme_mode(&self) -> ThemeMode
pub fn theme_mode(&self) -> ThemeMode
Which of the two themes is on display: the system’s choice by default.
Sourcepub fn set_theme_mode(&self, value: ThemeMode)
pub fn set_theme_mode(&self, value: ThemeMode)
Changes App::theme_mode.
Sourcepub fn set_density(&self, value: f32)
pub fn set_density(&self, value: f32)
Changes App::density.
Sourcepub fn locale(&self) -> Option<Locale>
pub fn locale(&self) -> Option<Locale>
The language the reader picked in the application; None follows the device.
Sourcepub fn set_locale(&self, value: Option<Locale>)
pub fn set_locale(&self, value: Option<Locale>)
Changes App::locale.
Sourcepub fn supported_locales(&self) -> Vec<Locale>
pub fn supported_locales(&self) -> Vec<Locale>
The languages the application has, best first.
Sourcepub fn set_supported_locales(&self, value: Vec<Locale>)
pub fn set_supported_locales(&self, value: Vec<Locale>)
Changes App::supported_locales.
Sourcepub fn localizations(&self) -> Option<Rc<dyn Localizations>>
pub fn localizations(&self) -> Option<Rc<dyn Localizations>>
The words the framework itself says on the application’s behalf, when they are not the English ones.
Sourcepub fn set_localizations(&self, value: Option<Rc<dyn Localizations>>)
pub fn set_localizations(&self, value: Option<Rc<dyn Localizations>>)
Changes App::localizations.
Sourcepub fn resolved_theme(&self, brightness: Brightness) -> Theme
pub fn resolved_theme(&self, brightness: Brightness) -> Theme
The theme to dress the window in for a system that is brightness — what
theme_mode chooses between the two.