pub struct Application {Show 15 fields
pub ir_version: u32,
pub app: AppInfo,
pub languages: Languages,
pub theme: Theme,
pub protocol: ProtocolDescriptor,
pub types: TypeTable,
pub sessions: Vec<SessionDef>,
pub windows: WindowCatalog,
pub players: Vec<PlayerDef>,
pub components: Vec<ComponentDef>,
pub texts: Vec<LocalizedText>,
pub resources: Vec<ResourceDef>,
pub layouts: Option<LayoutConfig>,
pub contracts: Vec<FeatureContract>,
pub style: StyleSheet,
}Fields§
§ir_version: u32§app: AppInfo§languages: Languages§theme: Theme§protocol: ProtocolDescriptorThe engine protocol the UI binds to.
types: TypeTableProtocol types merged with UI-only value types.
sessions: Vec<SessionDef>§windows: WindowCatalog§players: Vec<PlayerDef>Media players owned by the application, shared by every window.
components: Vec<ComponentDef>§texts: Vec<LocalizedText>Every localized text with its stable resource key.
resources: Vec<ResourceDef>Files shipped with the application, sorted by name.
layouts: Option<LayoutConfig>Layout breakpoints from [layouts], when the application declares
them.
contracts: Vec<FeatureContract>Feature contracts with the coverage the compiler proved.
style: StyleSheetStyle overrides and motion tokens from style!.
Implementations§
Source§impl Application
impl Application
Sourcepub fn on_platform(&self, platform: &str) -> Application
pub fn on_platform(&self, platform: &str) -> Application
This application with every named corner of its elements at the
radius it has on platform (macos, windows, browser, …).
window.menu_bar holds on macOS, whose menu bar shows the
application’s MenuBar, and nowhere else.
Source§impl Application
impl Application
Sourcepub fn on_television(&self) -> Application
pub fn on_television(&self) -> Application
This application with what a television never shows left out.
Sourcepub fn with_webview(&self, enabled: bool) -> Application
pub fn with_webview(&self, enabled: bool) -> Application
Resolve a target capability before checking and code generation. Unselected branches, including their component dependencies, vanish.
This application where the MenuBar does (shown) or does not show
in a system menu bar: window.menu_bar is known, and the branches it
leaves out vanish with the components only they place.
Source§impl Application
impl Application
Sourcepub fn walk<'a>(&'a self, visit: &mut impl FnMut(&'a Node, Option<&'a str>))
pub fn walk<'a>(&'a self, visit: &mut impl FnMut(&'a Node, Option<&'a str>))
Visit the nodes of every component and then of every window’s content, depth first, each with the kind of the nearest element around it.
pub fn component(&self, name: &str) -> Option<&ComponentDef>
pub fn session(&self, name: &str) -> Option<&SessionDef>
pub fn window(&self, id: &str) -> Option<&WindowDef>
Sourcepub fn uses_media(&self) -> bool
pub fn uses_media(&self) -> bool
Whether any declaration plays media.