pub trait StackExt: IsA<Stack> + 'static {
Show 40 methods
// Provided methods
fn add_named(&self, child: &impl IsA<Widget>, name: &str) { ... }
fn add_titled(&self, child: &impl IsA<Widget>, name: &str, title: &str) { ... }
fn child_by_name(&self, name: &str) -> Option<Widget> { ... }
fn is_hhomogeneous(&self) -> bool { ... }
fn is_homogeneous(&self) -> bool { ... }
fn interpolates_size(&self) -> bool { ... }
fn transition_duration(&self) -> u32 { ... }
fn is_transition_running(&self) -> bool { ... }
fn transition_type(&self) -> StackTransitionType { ... }
fn is_vhomogeneous(&self) -> bool { ... }
fn visible_child(&self) -> Option<Widget> { ... }
fn visible_child_name(&self) -> Option<GString> { ... }
fn set_hhomogeneous(&self, hhomogeneous: bool) { ... }
fn set_homogeneous(&self, homogeneous: bool) { ... }
fn set_interpolate_size(&self, interpolate_size: bool) { ... }
fn set_transition_duration(&self, duration: u32) { ... }
fn set_transition_type(&self, transition: StackTransitionType) { ... }
fn set_vhomogeneous(&self, vhomogeneous: bool) { ... }
fn set_visible_child(&self, child: &impl IsA<Widget>) { ... }
fn set_visible_child_full(
&self,
name: &str,
transition: StackTransitionType,
) { ... }
fn set_visible_child_name(&self, name: &str) { ... }
fn child_icon_name<T: IsA<Widget>>(&self, item: &T) -> Option<GString> { ... }
fn set_child_icon_name<T: IsA<Widget>>(
&self,
item: &T,
icon_name: Option<&str>,
) { ... }
fn child_name<T: IsA<Widget>>(&self, item: &T) -> Option<GString> { ... }
fn set_child_name<T: IsA<Widget>>(&self, item: &T, name: Option<&str>) { ... }
fn child_needs_attention<T: IsA<Widget>>(&self, item: &T) -> bool { ... }
fn set_child_needs_attention<T: IsA<Widget>>(
&self,
item: &T,
needs_attention: bool,
) { ... }
fn child_position<T: IsA<Widget>>(&self, item: &T) -> i32 { ... }
fn set_child_position<T: IsA<Widget>>(&self, item: &T, position: i32) { ... }
fn child_title<T: IsA<Widget>>(&self, item: &T) -> Option<GString> { ... }
fn set_child_title<T: IsA<Widget>>(&self, item: &T, title: Option<&str>) { ... }
fn connect_hhomogeneous_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_homogeneous_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_interpolate_size_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_transition_duration_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_transition_running_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_transition_type_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_vhomogeneous_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_visible_child_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_visible_child_name_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}Provided Methods§
Sourcefn add_titled(&self, child: &impl IsA<Widget>, name: &str, title: &str)
fn add_titled(&self, child: &impl IsA<Widget>, name: &str, title: &str)
Adds a child to self.
The child is identified by the name. The title
will be used by StackSwitcher to represent
child in a tab bar, so it should be short.
§child
the widget to add
§name
the name for child
§title
a human-readable title for child
Sourcefn child_by_name(&self, name: &str) -> Option<Widget>
fn child_by_name(&self, name: &str) -> Option<Widget>
Sourcefn is_hhomogeneous(&self) -> bool
fn is_hhomogeneous(&self) -> bool
Gets whether self is horizontally homogeneous.
See set_hhomogeneous().
§Returns
whether self is horizontally homogeneous.
Sourcefn is_homogeneous(&self) -> bool
fn is_homogeneous(&self) -> bool
Sourcefn interpolates_size(&self) -> bool
fn interpolates_size(&self) -> bool
Sourcefn transition_duration(&self) -> u32
fn transition_duration(&self) -> u32
Returns the amount of time (in milliseconds) that
transitions between pages in self will take.
§Returns
the transition duration
Sourcefn is_transition_running(&self) -> bool
fn is_transition_running(&self) -> bool
Sourcefn transition_type(&self) -> StackTransitionType
fn transition_type(&self) -> StackTransitionType
Gets the type of animation that will be used
for transitions between pages in self.
§Returns
the current transition type of self
Sourcefn is_vhomogeneous(&self) -> bool
fn is_vhomogeneous(&self) -> bool
Gets whether self is vertically homogeneous.
See set_vhomogeneous().
§Returns
whether self is vertically homogeneous.
Sourcefn visible_child(&self) -> Option<Widget>
fn visible_child(&self) -> Option<Widget>
Sourcefn visible_child_name(&self) -> Option<GString>
fn visible_child_name(&self) -> Option<GString>
Sourcefn set_hhomogeneous(&self, hhomogeneous: bool)
fn set_hhomogeneous(&self, hhomogeneous: bool)
Sourcefn set_homogeneous(&self, homogeneous: bool)
fn set_homogeneous(&self, homogeneous: bool)
Sets the Stack to be homogeneous or not. If it
is homogeneous, the Stack will request the same
size for all its children. If it isn’t, the stack
may change size when a different child becomes visible.
Since 3.16, homogeneity can be controlled separately
for horizontal and vertical size, with the
hhomogeneous and vhomogeneous.
§homogeneous
true to make self homogeneous
Sourcefn set_interpolate_size(&self, interpolate_size: bool)
fn set_interpolate_size(&self, interpolate_size: bool)
Sets whether or not self will interpolate its size when
changing the visible child. If the interpolate-size
property is set to true, self will interpolate its size between
the current one and the one it’ll take after changing the
visible child, according to the set transition duration.
§interpolate_size
the new value
Sourcefn set_transition_duration(&self, duration: u32)
fn set_transition_duration(&self, duration: u32)
Sets the duration that transitions between pages in self
will take.
§duration
the new duration, in milliseconds
Sourcefn set_transition_type(&self, transition: StackTransitionType)
fn set_transition_type(&self, transition: StackTransitionType)
Sets the type of animation that will be used for
transitions between pages in self. Available
types include various kinds of fades and slides.
The transition type can be changed without problems at runtime, so it is possible to change the animation based on the page that is about to become current.
§transition
the new transition type
Sourcefn set_vhomogeneous(&self, vhomogeneous: bool)
fn set_vhomogeneous(&self, vhomogeneous: bool)
Sourcefn set_visible_child(&self, child: &impl IsA<Widget>)
fn set_visible_child(&self, child: &impl IsA<Widget>)
Makes child the visible child of self.
If child is different from the currently
visible child, the transition between the
two will be animated with the current
transition type of self.
Note that the child widget has to be visible itself
(see WidgetExt::show()) in order to become the visible
child of self.
§child
a child of self
Sourcefn set_visible_child_full(&self, name: &str, transition: StackTransitionType)
fn set_visible_child_full(&self, name: &str, transition: StackTransitionType)
Makes the child with the given name visible.
Note that the child widget has to be visible itself
(see WidgetExt::show()) in order to become the visible
child of self.
§name
the name of the child to make visible
§transition
the transition type to use
Sourcefn set_visible_child_name(&self, name: &str)
fn set_visible_child_name(&self, name: &str)
Makes the child with the given name visible.
If child is different from the currently
visible child, the transition between the
two will be animated with the current
transition type of self.
Note that the child widget has to be visible itself
(see WidgetExt::show()) in order to become the visible
child of self.
§name
the name of the child to make visible
fn child_icon_name<T: IsA<Widget>>(&self, item: &T) -> Option<GString>
fn set_child_icon_name<T: IsA<Widget>>(&self, item: &T, icon_name: Option<&str>)
fn child_name<T: IsA<Widget>>(&self, item: &T) -> Option<GString>
fn set_child_name<T: IsA<Widget>>(&self, item: &T, name: Option<&str>)
fn child_needs_attention<T: IsA<Widget>>(&self, item: &T) -> bool
fn set_child_needs_attention<T: IsA<Widget>>( &self, item: &T, needs_attention: bool, )
fn child_position<T: IsA<Widget>>(&self, item: &T) -> i32
fn set_child_position<T: IsA<Widget>>(&self, item: &T, position: i32)
fn child_title<T: IsA<Widget>>(&self, item: &T) -> Option<GString>
fn set_child_title<T: IsA<Widget>>(&self, item: &T, title: Option<&str>)
fn connect_hhomogeneous_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_homogeneous_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_interpolate_size_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_transition_duration_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_transition_running_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_transition_type_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_vhomogeneous_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_visible_child_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_visible_child_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".