Trait libadwaita::prelude::NavigationPageExt
source · pub trait NavigationPageExt: IsA<NavigationPage> + Sealed + 'static {
Show 16 methods
// Provided methods
fn can_pop(&self) -> bool { ... }
fn child(&self) -> Option<Widget> { ... }
fn tag(&self) -> Option<GString> { ... }
fn title(&self) -> GString { ... }
fn set_can_pop(&self, can_pop: bool) { ... }
fn set_child(&self, child: Option<&impl IsA<Widget>>) { ... }
fn set_tag(&self, tag: Option<&str>) { ... }
fn set_title(&self, title: &str) { ... }
fn connect_hidden<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { ... }
fn connect_hiding<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { ... }
fn connect_showing<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { ... }
fn connect_shown<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { ... }
fn connect_can_pop_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_child_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_tag_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_title_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}
v1_4
only.Expand description
Provided Methods§
sourcefn can_pop(&self) -> bool
fn can_pop(&self) -> bool
Gets whether @self can be popped from navigation stack.
§Returns
whether the page can be popped from navigation stack
sourcefn set_can_pop(&self, can_pop: bool)
fn set_can_pop(&self, can_pop: bool)
Sets whether @self can be popped from navigation stack.
Set it to FALSE
to disable shortcuts and gestures, as well as remove the
back button from HeaderBar
.
Manually calling NavigationView::pop()
or using the navigation.pop
action will still work.
See show-back-button
for removing only the back button,
but not shortcuts.
§can_pop
whether the page can be popped from navigation stack
sourcefn set_tag(&self, tag: Option<&str>)
fn set_tag(&self, tag: Option<&str>)
Sets the tag for @self.
The tag can be used to retrieve the page with
NavigationView::find_page()
, as well as with
NavigationView::push_by_tag()
, NavigationView::pop_to_tag()
or
NavigationView::replace_with_tags()
.
Tags must be unique within each NavigationView
.
The tag also must be set to use the navigation.push
action.
§tag
the page tag