pub trait PreferencesWindowExt: IsA<PreferencesWindow> + '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
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
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.