Trait libhandy::prelude::LeafletExt
source · pub trait LeafletExt: IsA<Leaflet> + Sealed + 'static {
Show 58 methods
// Provided methods
fn adjacent_child(&self, direction: NavigationDirection) -> Option<Widget> { ... }
fn can_swipe_back(&self) -> bool { ... }
fn can_swipe_forward(&self) -> bool { ... }
fn child_by_name(&self, name: &str) -> Option<Widget> { ... }
fn child_transition_duration(&self) -> u32 { ... }
fn is_child_transition_running(&self) -> bool { ... }
fn is_folded(&self) -> bool { ... }
fn is_homogeneous(&self, folded: bool, orientation: Orientation) -> bool { ... }
fn is_interpolate_size(&self) -> bool { ... }
fn mode_transition_duration(&self) -> u32 { ... }
fn transition_type(&self) -> LeafletTransitionType { ... }
fn visible_child(&self) -> Option<Widget> { ... }
fn visible_child_name(&self) -> Option<GString> { ... }
fn insert_child_after(
&self,
child: &impl IsA<Widget>,
sibling: Option<&impl IsA<Widget>>
) { ... }
fn navigate(&self, direction: NavigationDirection) -> bool { ... }
fn prepend(&self, child: &impl IsA<Widget>) { ... }
fn reorder_child_after(
&self,
child: &impl IsA<Widget>,
sibling: Option<&impl IsA<Widget>>
) { ... }
fn set_can_swipe_back(&self, can_swipe_back: bool) { ... }
fn set_can_swipe_forward(&self, can_swipe_forward: bool) { ... }
fn set_child_transition_duration(&self, duration: u32) { ... }
fn set_homogeneous(
&self,
folded: bool,
orientation: Orientation,
homogeneous: bool
) { ... }
fn set_interpolate_size(&self, interpolate_size: bool) { ... }
fn set_mode_transition_duration(&self, duration: u32) { ... }
fn set_transition_type(&self, transition: LeafletTransitionType) { ... }
fn set_visible_child(&self, visible_child: &impl IsA<Widget>) { ... }
fn set_visible_child_name(&self, name: &str) { ... }
fn is_hhomogeneous_folded(&self) -> bool { ... }
fn set_hhomogeneous_folded(&self, hhomogeneous_folded: bool) { ... }
fn is_hhomogeneous_unfolded(&self) -> bool { ... }
fn set_hhomogeneous_unfolded(&self, hhomogeneous_unfolded: bool) { ... }
fn is_vhomogeneous_folded(&self) -> bool { ... }
fn set_vhomogeneous_folded(&self, vhomogeneous_folded: bool) { ... }
fn is_vhomogeneous_unfolded(&self) -> bool { ... }
fn set_vhomogeneous_unfolded(&self, vhomogeneous_unfolded: bool) { ... }
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_can_swipe_back_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_can_swipe_forward_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_child_transition_duration_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_child_transition_running_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_folded_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_hhomogeneous_folded_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_hhomogeneous_unfolded_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_interpolate_size_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_mode_transition_duration_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_folded_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_vhomogeneous_unfolded_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 { ... }
}
Expand description
Provided Methods§
sourcefn adjacent_child(&self, direction: NavigationDirection) -> Option<Widget>
fn adjacent_child(&self, direction: NavigationDirection) -> Option<Widget>
Finds the previous or next navigatable child.
This will be the same widget navigate()
will navigate to.
If there’s no child to navigate to, NULL
will be returned instead.
direction
the direction
Returns
the previous or next child
sourcefn can_swipe_back(&self) -> bool
fn can_swipe_back(&self) -> bool
Gets whether swipe gestures switch to the previous navigatable child.
Returns
TRUE
if back swipe is enabled
sourcefn can_swipe_forward(&self) -> bool
fn can_swipe_forward(&self) -> bool
Gets whether swipe gestures switch to the next navigatable child.
Returns
TRUE
if forward swipe is enabled
sourcefn child_by_name(&self, name: &str) -> Option<Widget>
fn child_by_name(&self, name: &str) -> Option<Widget>
sourcefn child_transition_duration(&self) -> u32
fn child_transition_duration(&self) -> u32
Gets the amount of time that transitions between children will take.
Returns
the child transition duration, in milliseconds
sourcefn is_child_transition_running(&self) -> bool
fn is_child_transition_running(&self) -> bool
Returns whether @self is currently in a transition from one page to another.
Returns
whether a transition is currently running
sourcefn is_homogeneous(&self, folded: bool, orientation: Orientation) -> bool
fn is_homogeneous(&self, folded: bool, orientation: Orientation) -> bool
Gets whether @self is homogeneous for the given fold and orientation.
folded
the fold
orientation
the orientation
Returns
whether @self is homogeneous for the given fold and orientation
sourcefn is_interpolate_size(&self) -> bool
fn is_interpolate_size(&self) -> bool
Gets whether to interpolate between the sizes of children on page switches.
Returns
TRUE
if child sizes are interpolated
sourcefn mode_transition_duration(&self) -> u32
fn mode_transition_duration(&self) -> u32
Gets the amount of time that transitions between modes in @self will take.
Returns
the mode transition duration, in milliseconds
sourcefn transition_type(&self) -> LeafletTransitionType
fn transition_type(&self) -> LeafletTransitionType
Gets the animation type that will be used for transitions between modes and children.
Returns
the current transition type of @self
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 insert_child_after(
&self,
child: &impl IsA<Widget>,
sibling: Option<&impl IsA<Widget>>
)
fn insert_child_after( &self, child: &impl IsA<Widget>, sibling: Option<&impl IsA<Widget>> )
v1_2
only.sourcefn reorder_child_after(
&self,
child: &impl IsA<Widget>,
sibling: Option<&impl IsA<Widget>>
)
fn reorder_child_after( &self, child: &impl IsA<Widget>, sibling: Option<&impl IsA<Widget>> )
v1_2
only.sourcefn set_can_swipe_back(&self, can_swipe_back: bool)
fn set_can_swipe_back(&self, can_swipe_back: bool)
sourcefn set_can_swipe_forward(&self, can_swipe_forward: bool)
fn set_can_swipe_forward(&self, can_swipe_forward: bool)
sourcefn set_child_transition_duration(&self, duration: u32)
fn set_child_transition_duration(&self, duration: u32)
Sets the duration that transitions between children in @self will take.
duration
the new duration, in milliseconds
sourcefn set_homogeneous(
&self,
folded: bool,
orientation: Orientation,
homogeneous: bool
)
fn set_homogeneous( &self, folded: bool, orientation: Orientation, homogeneous: bool )
Sets whether to be homogeneous for the given fold and orientation.
If it is homogeneous, the Leaflet
will request the same
width or height for all its children depending on the orientation. If it
isn’t and it is folded, the leaflet may change width or height when a
different child becomes visible.
folded
the fold
orientation
the orientation
homogeneous
TRUE
to make @self homogeneous
sourcefn set_interpolate_size(&self, interpolate_size: bool)
fn set_interpolate_size(&self, interpolate_size: bool)
Sets whether @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_mode_transition_duration(&self, duration: u32)
fn set_mode_transition_duration(&self, duration: u32)
Sets the duration that transitions between modes in @self will take.
duration
the new duration, in milliseconds
sourcefn set_transition_type(&self, transition: LeafletTransitionType)
fn set_transition_type(&self, transition: LeafletTransitionType)
Sets the animation type that will be used for transitions between modes and children.
The transition type can be changed without problems at runtime, so it is possible to change the animation based on the mode or child that is about to become current.
transition
the new transition type
sourcefn set_visible_child(&self, visible_child: &impl IsA<Widget>)
fn set_visible_child(&self, visible_child: &impl IsA<Widget>)
sourcefn set_visible_child_name(&self, name: &str)
fn set_visible_child_name(&self, name: &str)
Makes the child with the name @name visible.
See set_visible_child()
for more details.
name
the name of a child
sourcefn is_hhomogeneous_folded(&self) -> bool
fn is_hhomogeneous_folded(&self) -> bool
Whether to allocate the same width for all children when folded.
sourcefn set_hhomogeneous_folded(&self, hhomogeneous_folded: bool)
fn set_hhomogeneous_folded(&self, hhomogeneous_folded: bool)
Whether to allocate the same width for all children when folded.
sourcefn is_hhomogeneous_unfolded(&self) -> bool
fn is_hhomogeneous_unfolded(&self) -> bool
Whether to allocate the same width for all children when unfolded.
sourcefn set_hhomogeneous_unfolded(&self, hhomogeneous_unfolded: bool)
fn set_hhomogeneous_unfolded(&self, hhomogeneous_unfolded: bool)
Whether to allocate the same width for all children when unfolded.
sourcefn is_vhomogeneous_folded(&self) -> bool
fn is_vhomogeneous_folded(&self) -> bool
Whether to allocates the same height for all children when folded.
sourcefn set_vhomogeneous_folded(&self, vhomogeneous_folded: bool)
fn set_vhomogeneous_folded(&self, vhomogeneous_folded: bool)
Whether to allocates the same height for all children when folded.
sourcefn is_vhomogeneous_unfolded(&self) -> bool
fn is_vhomogeneous_unfolded(&self) -> bool
Whether to allocate the same height for all children when unfolded.
sourcefn set_vhomogeneous_unfolded(&self, vhomogeneous_unfolded: bool)
fn set_vhomogeneous_unfolded(&self, vhomogeneous_unfolded: bool)
Whether to allocate the same height for all children when unfolded.