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>)
fn add(&self, page: &impl IsA<PreferencesPage>)
sourcefn close_subpage(&self)
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.
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
fn is_search_enabled(&self) -> bool
sourcefn visible_page(&self) -> Option<PreferencesPage>
fn visible_page(&self) -> Option<PreferencesPage>
sourcefn visible_page_name(&self) -> Option<GString>
fn visible_page_name(&self) -> Option<GString>
sourcefn pop_subpage(&self) -> bool
fn pop_subpage(&self) -> bool
v1_4
only.sourcefn present_subpage(&self, subpage: &impl IsA<Widget>)
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>)
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.
§page
the subpage
sourcefn remove(&self, page: &impl IsA<PreferencesPage>)
fn remove(&self, page: &impl IsA<PreferencesPage>)
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.
§Deprecated since 1.4
Use NavigationPageExt::set_can_pop()
instead.
Has no effect for subpages added with push_subpage()
.
§can_navigate_back
the new value
sourcefn set_search_enabled(&self, search_enabled: bool)
fn set_search_enabled(&self, search_enabled: bool)
sourcefn set_visible_page(&self, page: &impl IsA<PreferencesPage>)
fn set_visible_page(&self, page: &impl IsA<PreferencesPage>)
sourcefn set_visible_page_name(&self, name: &str)
fn set_visible_page_name(&self, name: &str)
Makes the page with the given name visible.
See visible-page
.
§name
the name of the page to make visible