Skip to main content

AppWindow

Struct AppWindow 

Source
pub struct AppWindow(/* private fields */);

Implementations§

Source§

impl AppWindow

Source

pub fn new() -> Result<Self, PlatformError>

Source

pub fn get_active_view(&self) -> SharedString

Source

pub fn set_active_view(&self, value: SharedString)

Source

pub fn get_col_left_width(&self) -> Coord

Source

pub fn set_col_left_width(&self, value: Coord)

Source

pub fn get_col_right_width(&self) -> Coord

Source

pub fn set_col_right_width(&self, value: Coord)

Source

pub fn get_menu_about_label(&self) -> SharedString

Source

pub fn set_menu_about_label(&self, value: SharedString)

Source

pub fn invoke_menu_action(&self, arg_0: SharedString)

Source

pub fn on_menu_action(&self, f: impl FnMut(SharedString) + 'static)

Source

pub fn get_menu_exit_label(&self) -> SharedString

Source

pub fn set_menu_exit_label(&self, value: SharedString)

Source

pub fn get_menu_file_label(&self) -> SharedString

Source

pub fn set_menu_file_label(&self, value: SharedString)

Source

pub fn get_menu_help_label(&self) -> SharedString

Source

pub fn set_menu_help_label(&self, value: SharedString)

Source

pub fn get_menu_home_label(&self) -> SharedString

Source

pub fn set_menu_home_label(&self, value: SharedString)

Source

pub fn get_menu_list_label(&self) -> SharedString

Source

pub fn set_menu_list_label(&self, value: SharedString)

Source

pub fn get_menu_settings_label(&self) -> SharedString

Source

pub fn set_menu_settings_label(&self, value: SharedString)

Source

pub fn get_menu_view_label(&self) -> SharedString

Source

pub fn set_menu_view_label(&self, value: SharedString)

Source

pub fn get_nav_items(&self) -> ModelRc<NavItem>

Source

pub fn set_nav_items(&self, value: ModelRc<NavItem>)

Source

pub fn invoke_navigate(&self, arg_0: SharedString)

Source

pub fn on_navigate(&self, f: impl FnMut(SharedString) + 'static)

Source

pub fn get_right_panel_label(&self) -> SharedString

Source

pub fn set_right_panel_label(&self, value: SharedString)

Source

pub fn get_row_bottom_ratio(&self) -> f32

Source

pub fn set_row_bottom_ratio(&self, value: f32)

Source

pub fn get_row_main_ratio(&self) -> f32

Source

pub fn set_row_main_ratio(&self, value: f32)

Source

pub fn get_row_top_ratio(&self) -> f32

Source

pub fn set_row_top_ratio(&self, value: f32)

Source

pub fn get_show_toolbar(&self) -> bool

Source

pub fn set_show_toolbar(&self, value: bool)

Source

pub fn get_sidebar_collapsed(&self) -> bool

Source

pub fn set_sidebar_collapsed(&self, value: bool)

Source

pub fn get_sidebar_open(&self) -> bool

Source

pub fn set_sidebar_open(&self, value: bool)

Source

pub fn get_status_prefix(&self) -> SharedString

Source

pub fn set_status_prefix(&self, value: SharedString)

Source

pub fn get_status_text(&self) -> SharedString

Source

pub fn set_status_text(&self, value: SharedString)

Source

pub fn invoke_toolbar_clicked(&self, arg_0: SharedString)

Source

pub fn on_toolbar_clicked(&self, f: impl FnMut(SharedString) + 'static)

Source

pub fn get_toolbar_items(&self) -> ModelRc<ShellToolbarItem>

Source

pub fn set_toolbar_items(&self, value: ModelRc<ShellToolbarItem>)

Source

pub fn get_window_title(&self) -> SharedString

Source

pub fn set_window_title(&self, value: SharedString)

Trait Implementations§

Source§

impl ComponentHandle for AppWindow

Source§

fn as_weak(&self) -> Weak<Self>

Returns a new weak pointer.
Source§

fn clone_strong(&self) -> Self

Returns a clone of this handle that’s a strong reference.
Source§

fn run(&self) -> Result<(), PlatformError>

This is a convenience function that first calls Self::show, followed by crate::run_event_loop() and Self::hide.
Source§

fn show(&self) -> Result<(), PlatformError>

Convenience function for crate::Window::show(). This shows the window on the screen and maintains an extra strong reference while the window is visible. To react to events from the windowing system, such as draw requests or mouse/touch input, it is still necessary to spin the event loop, using crate::run_event_loop.
Source§

fn hide(&self) -> Result<(), PlatformError>

Convenience function for crate::Window::hide(). Hides the window, so that it is not visible anymore. The additional strong reference on the associated component, that was created when show() was called, is dropped.
Source§

fn window(&self) -> &Window

Returns the Window associated with this component. The window API can be used to control different aspects of the integration into the windowing system, such as the position on the screen.
Source§

fn global<'a, T: Global<'a, Self>>(&'a self) -> T

This function provides access to instances of global singletons exported in .slint. See Global for an example how to export and access globals from .slint markup.
Source§

impl From<AppWindow> for VRc<ItemTreeVTable, InnerAppWindow>

Source§

fn from(value: AppWindow) -> Self

Converts to this type from the input type.
Source§

impl<'a> Global<'a, AppWindow> for Settings<'a>

Source§

fn get(component: &'a AppWindow) -> Self

Returns a reference that’s tied to the life time of the provided component.
Source§

impl<'a> Global<'a, AppWindow> for Theme<'a>

Source§

fn get(component: &'a AppWindow) -> Self

Returns a reference that’s tied to the life time of the provided component.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more