Trait libadwaita::prelude::PreferencesWindowExt
source · pub trait PreferencesWindowExt: IsA<PreferencesWindow> + Sealed + 'static {
Show 19 methods
// Provided methods
fn add(&self, page: &impl IsA<PreferencesPage>) { ... }
fn add_toast(&self, toast: Toast) { ... }
fn close_subpage(&self) { ... }
fn can_navigate_back(&self) -> bool { ... }
fn is_search_enabled(&self) -> bool { ... }
fn visible_page(&self) -> Option<PreferencesPage> { ... }
fn visible_page_name(&self) -> Option<GString> { ... }
fn pop_subpage(&self) -> bool { ... }
fn present_subpage(&self, subpage: &impl IsA<Widget>) { ... }
fn push_subpage(&self, page: &impl IsA<NavigationPage>) { ... }
fn remove(&self, page: &impl IsA<PreferencesPage>) { ... }
fn set_can_navigate_back(&self, can_navigate_back: bool) { ... }
fn set_search_enabled(&self, search_enabled: bool) { ... }
fn set_visible_page(&self, page: &impl IsA<PreferencesPage>) { ... }
fn set_visible_page_name(&self, name: &str) { ... }
fn connect_can_navigate_back_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_search_enabled_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_visible_page_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_visible_page_name_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}
Expand description
Provided Methods§
sourcefn add(&self, page: &impl IsA<PreferencesPage>)
👎Deprecated: Since 1.6
fn add(&self, page: &impl IsA<PreferencesPage>)
Adds a preferences page to @self.
§Deprecated since 1.6
Use PreferencesDialog
.
§page
the page to add
sourcefn add_toast(&self, toast: Toast)
👎Deprecated: Since 1.6
fn add_toast(&self, toast: Toast)
Displays @toast.
See ToastOverlay::add_toast()
.
§Deprecated since 1.6
Use PreferencesDialog
.
§toast
a toast
sourcefn close_subpage(&self)
👎Deprecated: Since 1.4
fn close_subpage(&self)
Closes the current subpage.
If there is no presented subpage, this does nothing.
§Deprecated since 1.4
Use pop_subpage()
instead.
👎Deprecated: Since 1.4
Gets whether gestures and shortcuts for closing subpages are enabled.
§Deprecated since 1.4
Use NavigationPageExt::can_pop()
instead.
§Returns
whether gestures and shortcuts are enabled.
sourcefn is_search_enabled(&self) -> bool
👎Deprecated: Since 1.6
fn is_search_enabled(&self) -> bool
Gets whether search is enabled for @self.
§Deprecated since 1.6
Use PreferencesDialog
.
§Returns
whether search is enabled for @self.
sourcefn visible_page(&self) -> Option<PreferencesPage>
👎Deprecated: Since 1.6
fn visible_page(&self) -> Option<PreferencesPage>
Gets the currently visible page of @self.
§Deprecated since 1.6
Use PreferencesDialog
.
§Returns
the visible page
sourcefn visible_page_name(&self) -> Option<GString>
👎Deprecated: Since 1.6
fn visible_page_name(&self) -> Option<GString>
Gets the name of currently visible page of @self.
§Deprecated since 1.6
Use PreferencesDialog
.
§Returns
the name of the visible page
sourcefn pop_subpage(&self) -> bool
👎Deprecated: Since 1.6Available on crate feature v1_4
only.
fn pop_subpage(&self) -> bool
v1_4
only.Pop the visible page from the subpage stack of @self.
§Deprecated since 1.6
Use PreferencesDialog
.
§Returns
TRUE
if a page has been popped
sourcefn present_subpage(&self, subpage: &impl IsA<Widget>)
👎Deprecated: Since 1.4
fn present_subpage(&self, subpage: &impl IsA<Widget>)
Sets @subpage as the window’s subpage and opens it.
The transition can be cancelled by the user, in which case visible child will change back to the previously visible child.
§Deprecated since 1.4
Use push_subpage()
instead.
§subpage
the subpage
sourcefn push_subpage(&self, page: &impl IsA<NavigationPage>)
👎Deprecated: Since 1.6Available on crate feature v1_4
only.
fn push_subpage(&self, page: &impl IsA<NavigationPage>)
v1_4
only.Pushes @page onto the subpage stack of @self.
The page will be automatically removed when popped.
§Deprecated since 1.6
Use PreferencesDialog
.
§page
the subpage
sourcefn remove(&self, page: &impl IsA<PreferencesPage>)
👎Deprecated: Since 1.6
fn remove(&self, page: &impl IsA<PreferencesPage>)
👎Deprecated: Since 1.4
Sets whether gestures and shortcuts for closing subpages are enabled.
The supported gestures are:
- One-finger swipe on touchscreens
- Horizontal scrolling on touchpads (usually two-finger swipe)
- Back mouse button
The keyboard back key is also supported, as well as the Alt+← shortcut.
For right-to-left locales, gestures and shortcuts are reversed.
Has no effect for subpages added with push_subpage()
.
§Deprecated since 1.4
Use NavigationPageExt::set_can_pop()
instead.
§can_navigate_back
the new value
sourcefn set_search_enabled(&self, search_enabled: bool)
👎Deprecated: Since 1.6
fn set_search_enabled(&self, search_enabled: bool)
Sets whether search is enabled for @self.
§Deprecated since 1.6
Use PreferencesDialog
.
§search_enabled
whether search is enabled
sourcefn set_visible_page(&self, page: &impl IsA<PreferencesPage>)
👎Deprecated: Since 1.6
fn set_visible_page(&self, page: &impl IsA<PreferencesPage>)
Makes @page the visible page of @self.
§Deprecated since 1.6
Use PreferencesDialog
.
§page
a page of @self
sourcefn set_visible_page_name(&self, name: &str)
👎Deprecated: Since 1.6
fn set_visible_page_name(&self, name: &str)
Makes the page with the given name visible.
See visible-page
.
§Deprecated since 1.6
Use PreferencesDialog
.
§name
the name of the page to make visible