pub struct Window {
main_stack: TemplateChild<Stack>,
loading: TemplateChild<WindowHandle>,
login: TemplateChild<Login>,
error_page: TemplateChild<ErrorPage>,
pub(super) session_view: TemplateChild<SessionView>,
toast_overlay: TemplateChild<ToastOverlay>,
compact: Cell<bool>,
session_selection: SingleSelection,
pub(super) account_switcher: AccountSwitcherPopover,
}
Fields§
§main_stack: TemplateChild<Stack>
§loading: TemplateChild<WindowHandle>
§login: TemplateChild<Login>
§error_page: TemplateChild<ErrorPage>
§session_view: TemplateChild<SessionView>
§toast_overlay: TemplateChild<ToastOverlay>
§compact: Cell<bool>
Whether the window should be in compact view.
It means that the horizontal size is not large enough to hold all the content.
session_selection: SingleSelection
The selection of the logged-in sessions.
The one that is selected being the one that is visible.
account_switcher: AccountSwitcherPopover
The account switcher popover.
Implementations§
Source§impl Window
impl Window
Sourcefn register_type()
fn register_type()
Registers the type only once.
Source§impl Window
impl Window
Sourcefn set_compact(&self, compact: bool)
fn set_compact(&self, compact: bool)
Set whether the window should be in compact view.
Sourcefn load_window_size(&self)
fn load_window_size(&self)
Load the window size from the settings.
Sourcefn save_window_size(&self) -> Result<(), BoolError>
fn save_window_size(&self) -> Result<(), BoolError>
Save the current window size to the settings.
Sourcefn save_current_visible_session(&self) -> Result<(), BoolError>
fn save_current_visible_session(&self) -> Result<(), BoolError>
Save the currently visible session to the settings.
Sourcepub(super) fn visible_page(&self) -> WindowPage
pub(super) fn visible_page(&self) -> WindowPage
The visible page of the window.
Sourcepub(super) fn current_session_id(&self) -> Option<String>
pub(super) fn current_session_id(&self) -> Option<String>
The ID of the currently visible session, if any.
Sourcepub(super) fn set_current_session_by_id(&self, session_id: &str) -> bool
pub(super) fn set_current_session_by_id(&self, session_id: &str) -> bool
Set the current session by its ID.
Returns true
if the session was set as the current session.
Sourcefn show_selected_session(&self)
fn show_selected_session(&self)
Show the selected session.
The displayed view will change according to the current session.
Sourcefn set_visible_page(&self, name: WindowPage)
fn set_visible_page(&self, name: WindowPage)
Set the visible page of the window.
Sourcepub(super) fn show_secret_error(&self, message: &str)
pub(super) fn show_secret_error(&self, message: &str)
Open the error page and display the given secret error message.
Sourcefn open_account_settings(&self, session_id: &str)
fn open_account_settings(&self, session_id: &str)
Open the account settings for the session with the given ID.
Trait Implementations§
Source§impl CompositeTemplate for Window
impl CompositeTemplate for Window
fn bind_template(klass: &mut Self::Class)
fn check_template_children(widget: &<Self as ObjectSubclass>::Type)
Source§impl DerivedObjectProperties for Window
impl DerivedObjectProperties for Window
Source§fn derived_properties() -> &'static [ParamSpec]
fn derived_properties() -> &'static [ParamSpec]
Source§fn derived_property(&self, id: usize, pspec: &ParamSpec) -> Value
fn derived_property(&self, id: usize, pspec: &ParamSpec) -> Value
ObjectImpl
but auto-generated by the Properties
macro
to allow handling more complex use-cases.Source§fn derived_set_property(&self, id: usize, value: &Value, pspec: &ParamSpec)
fn derived_set_property(&self, id: usize, value: &Value, pspec: &ParamSpec)
ObjectImpl
but auto-generated by the Properties
macro
to allow handling more complex use-cases.Source§impl ObjectImpl for Window
impl ObjectImpl for Window
Source§fn constructed(&self)
fn constructed(&self)
Source§fn properties() -> &'static [ParamSpec]
fn properties() -> &'static [ParamSpec]
Source§fn set_property(&self, id: usize, value: &Value, pspec: &ParamSpec)
fn set_property(&self, id: usize, value: &Value, pspec: &ParamSpec)
Source§fn notify(&self, pspec: &ParamSpec)
fn notify(&self, pspec: &ParamSpec)
self.notify("property")
.fn dispatch_properties_changed(&self, pspecs: &[ParamSpec])
Source§impl ObjectSubclass for Window
impl ObjectSubclass for Window
Source§type Interfaces = ()
type Interfaces = ()
Source§type ParentType = ApplicationWindow
type ParentType = ApplicationWindow
Source§fn class_init(klass: &mut Self::Class)
fn class_init(klass: &mut Self::Class)
Source§fn instance_init(obj: &InitializingObject<Self>)
fn instance_init(obj: &InitializingObject<Self>)
Source§const ALLOW_NAME_CONFLICT: bool = false
const ALLOW_NAME_CONFLICT: bool = false
Source§fn type_init(_type_: &mut InitializingType<Self>)
fn type_init(_type_: &mut InitializingType<Self>)
Source§fn with_class(_klass: &Self::Class) -> Self
fn with_class(_klass: &Self::Class) -> Self
Source§impl ObjectSubclassType for Window
impl ObjectSubclassType for Window
Source§impl WidgetImpl for Window
impl WidgetImpl for Window
fn grab_focus(&self) -> bool
fn compute_expand(&self, hexpand: &mut bool, vexpand: &mut bool)
fn contains(&self, x: f64, y: f64) -> bool
fn direction_changed(&self, previous_direction: TextDirection)
fn focus(&self, direction_type: DirectionType) -> bool
fn request_mode(&self) -> SizeRequestMode
fn map(&self)
fn measure( &self, orientation: Orientation, for_size: i32, ) -> (i32, i32, i32, i32)
fn mnemonic_activate(&self, group_cycling: bool) -> bool
fn move_focus(&self, direction_type: DirectionType)
fn query_tooltip( &self, x: i32, y: i32, keyboard_tooltip: bool, tooltip: &Tooltip, ) -> bool
fn realize(&self)
fn root(&self)
fn set_focus_child(&self, child: Option<&Widget>)
fn size_allocate(&self, width: i32, height: i32, baseline: i32)
fn snapshot(&self, snapshot: &Snapshot)
fn state_flags_changed(&self, state_flags: &StateFlags)
fn system_setting_changed(&self, settings: &SystemSetting)
fn unmap(&self)
fn unrealize(&self)
fn unroot(&self)
Source§impl WindowImpl for Window
impl WindowImpl for Window
fn close_request(&self) -> Propagation
fn activate_focus(&self)
fn activate_default(&self)
fn keys_changed(&self)
fn enable_debugging(&self, toggle: bool) -> bool
impl AdwApplicationWindowImpl for Window
impl ApplicationWindowImpl for Window
Auto Trait Implementations§
impl !Freeze for Window
impl !RefUnwindSafe for Window
impl !Send for Window
impl !Sync for Window
impl Unpin for Window
impl !UnwindSafe for Window
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CompositeTemplateDisposeExt for T
impl<T> CompositeTemplateDisposeExt for T
fn dispose_template(&self)
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> ObjectImplExt for Twhere
T: ObjectImpl,
impl<T> ObjectImplExt for Twhere
T: ObjectImpl,
Source§fn parent_constructed(&self)
fn parent_constructed(&self)
glib::Object::constructed()
.Source§fn parent_notify(&self, pspec: &ParamSpec)
fn parent_notify(&self, pspec: &ParamSpec)
glib::Object::notify()
.Source§fn parent_dispatch_properties_changed(&self, pspecs: &[ParamSpec])
fn parent_dispatch_properties_changed(&self, pspecs: &[ParamSpec])
glib::Object::dispatch_properties_changed()
.Source§fn signal_chain_from_overridden(
&self,
token: &SignalClassHandlerToken,
values: &[Value],
) -> Option<Value>
fn signal_chain_from_overridden( &self, token: &SignalClassHandlerToken, values: &[Value], ) -> Option<Value>
Source§impl<T> ObjectSubclassExt for Twhere
T: ObjectSubclass,
impl<T> ObjectSubclassExt for Twhere
T: ObjectSubclass,
Source§fn instance(&self) -> BorrowedObject<'_, <T as ObjectSubclass>::Type>
fn instance(&self) -> BorrowedObject<'_, <T as ObjectSubclass>::Type>
Source§fn from_instance(obj: &<T as ObjectSubclass>::Type) -> &T
fn from_instance(obj: &<T as ObjectSubclass>::Type) -> &T
Source§fn obj(&self) -> BorrowedObject<'_, <T as ObjectSubclass>::Type>
fn obj(&self) -> BorrowedObject<'_, <T as ObjectSubclass>::Type>
Source§fn from_obj(obj: &<T as ObjectSubclass>::Type) -> &T
fn from_obj(obj: &<T as ObjectSubclass>::Type) -> &T
Source§fn ref_counted(&self) -> ObjectImplRef<T>
fn ref_counted(&self) -> ObjectImplRef<T>
self
.