libadwaita::prelude

Trait PreferencesWindowExt

source
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 { ... }
}
πŸ‘ŽDeprecated: Since 1.6
Expand description

Trait containing all PreferencesWindow methods.

Β§Implementors

PreferencesWindow

Provided Methods§

source

fn add(&self, page: &impl IsA<PreferencesPage>)

πŸ‘ŽDeprecated: Since 1.6

Adds a preferences page to @self.

Β§Deprecated since 1.6

Use PreferencesDialog.

Β§page

the page to add

source

fn add_toast(&self, toast: Toast)

πŸ‘ŽDeprecated: Since 1.6

Displays @toast.

See ToastOverlay::add_toast().

Β§Deprecated since 1.6

Use PreferencesDialog.

Β§toast

a toast

source

fn close_subpage(&self)

πŸ‘ŽDeprecated: Since 1.4

Closes the current subpage.

If there is no presented subpage, this does nothing.

Β§Deprecated since 1.4

Use pop_subpage() instead.

source

fn can_navigate_back(&self) -> bool

πŸ‘Ž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.

source

fn is_search_enabled(&self) -> bool

πŸ‘ŽDeprecated: Since 1.6

Gets whether search is enabled for @self.

Β§Deprecated since 1.6

Use PreferencesDialog.

Β§Returns

whether search is enabled for @self.

source

fn visible_page(&self) -> Option<PreferencesPage>

πŸ‘ŽDeprecated: Since 1.6

Gets the currently visible page of @self.

Β§Deprecated since 1.6

Use PreferencesDialog.

Β§Returns

the visible page

source

fn visible_page_name(&self) -> Option<GString>

πŸ‘ŽDeprecated: Since 1.6

Gets the name of currently visible page of @self.

Β§Deprecated since 1.6

Use PreferencesDialog.

Β§Returns

the name of the visible page

source

fn pop_subpage(&self) -> bool

πŸ‘ŽDeprecated: Since 1.6
Available on crate feature 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

source

fn present_subpage(&self, subpage: &impl IsA<Widget>)

πŸ‘ŽDeprecated: Since 1.4

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

source

fn push_subpage(&self, page: &impl IsA<NavigationPage>)

πŸ‘ŽDeprecated: Since 1.6
Available on crate feature 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

source

fn remove(&self, page: &impl IsA<PreferencesPage>)

πŸ‘ŽDeprecated: Since 1.6

Removes a page from @self.

Β§Deprecated since 1.6

Use PreferencesDialog.

Β§page

the page to remove

source

fn set_can_navigate_back(&self, can_navigate_back: bool)

πŸ‘Ž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

source

fn set_search_enabled(&self, search_enabled: bool)

πŸ‘ŽDeprecated: Since 1.6

Sets whether search is enabled for @self.

Β§Deprecated since 1.6

Use PreferencesDialog.

Β§search_enabled

whether search is enabled

source

fn set_visible_page(&self, page: &impl IsA<PreferencesPage>)

πŸ‘ŽDeprecated: Since 1.6

Makes @page the visible page of @self.

Β§Deprecated since 1.6

Use PreferencesDialog.

Β§page

a page of @self

source

fn set_visible_page_name(&self, name: &str)

πŸ‘ŽDeprecated: Since 1.6

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

source

fn connect_can_navigate_back_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

πŸ‘ŽDeprecated: Since 1.4
source

fn connect_search_enabled_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

πŸ‘ŽDeprecated: Since 1.6
source

fn connect_visible_page_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

πŸ‘ŽDeprecated: Since 1.6
source

fn connect_visible_page_name_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

πŸ‘ŽDeprecated: Since 1.6

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.

Implementors§