FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    Application

    struct · ferroui-diagnostics · v0.5.0

    struct Application
    

    The application DevTools is attached to, as the root of its trees: the windows of the application, and the members of the application that DevTools shows. It closes when the application exits.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<Application>
    

    Returns a strong reference to this object.

    Source

    requested_theme_variant_property

    fn requested_theme_variant_property() -> &'static StyledProperty<Option<ThemeVariant>>
    

    Defines the requested_theme_variant property.

    Source

    construct

    fn construct(group: Rc<dyn IDevToolsTopLevelGroup>, application: Ref<ferroui_controls::Application>) -> Self
    

    Source

    new

    fn new(group: Rc<dyn IDevToolsTopLevelGroup>, application: Ref<ferroui_controls::Application>) -> Ref<Self>
    

    C# new Application(ClassicDesktopStyleApplicationLifetimeTopLevelGroup group, Application application): group is the ClassicDesktopStyleApplicationLifetimeTopLevelGroup of the lifetime of application.

    Source

    closed

    fn closed(self: &Self, handler: impl Fn() -> () + 'static) -> Rc<dyn IDisposable>
    

    Raised when the application exits. Disposing the returned handle unsubscribes.

    Source

    as_closeable

    fn as_closeable(this: Ref<Self>) -> Rc<dyn ICloseable>
    

    The application as ICloseable (the class implements it in the original).

    Source

    as_disposable

    fn as_disposable(this: Ref<Self>) -> Rc<dyn IDisposable>
    

    The application as IDisposable (the class implements it in the original).

    Source

    instance

    fn instance(self: &Self) -> Ref<ferroui_controls::Application>
    

    The application DevTools is attached to.

    Source

    data_context

    fn data_context(self: &Self) -> Option<BoxedValue>
    

    The data context of the application.

    Source

    data_templates

    fn data_templates(self: &Self) -> DataTemplates
    

    Gets or sets the application's global data templates.

    Source

    input_manager

    fn input_manager(self: &Self) -> Option<Rc<InputManager>>
    

    Gets the application's input manager.

    Source

    resources

    fn resources(self: &Self) -> Ref<ResourceDictionary>
    

    Gets the application's global resource dictionary.

    Source

    styles

    fn styles(self: &Self) -> Ref<Styles>
    

    Gets the application's global styles.

    Global styles apply to all windows in the application.

    Source

    application_lifetime

    fn application_lifetime(self: &Self) -> Option<Rc<dyn IApplicationLifetime>>
    

    Application lifetime, use it for things like setting the main window and exiting the app from code Currently supported lifetimes are:

    • IClassicDesktopStyleApplicationLifetime
    • ISingleViewApplicationLifetime
    • IControlledApplicationLifetime

    Source

    name

    fn name(self: &Self) -> Option<String>
    

    Application name to be used for various platform-specific purposes

    Source

    renderer_root

    fn renderer_root(self: &Self) -> Option<Rc<dyn ITopLevelRenderer>>
    

    Gets the renderer of the root of the visual tree of the application: the renderer of its main window, or of the top level of its main view.

    Source

    requested_theme_variant

    fn requested_theme_variant(self: &Self) -> Option<ThemeVariant>
    

    The theme variant requested for the application (ThemeVariantScope.RequestedThemeVariant).

    Source

    set_requested_theme_variant

    fn set_requested_theme_variant(self: &Self, value: Option<ThemeVariant>)
    

    Source

    dispose

    fn dispose(self: &Self)
    

    Dispose: stops following the changes of the application.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.