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

Trait containing all Leaflet methods.

Implementors

Leaflet

Provided Methods§

source

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

source

fn can_swipe_back(&self) -> bool

Gets whether swipe gestures switch to the previous navigatable child.

Returns

TRUE if back swipe is enabled

source

fn can_swipe_forward(&self) -> bool

Gets whether swipe gestures switch to the next navigatable child.

Returns

TRUE if forward swipe is enabled

source

fn child_by_name(&self, name: &str) -> Option<Widget>

Finds the child of @self with the name given as the argument.

Returns NULL if there is no child with this name.

name

the name of the child to find

Returns

the requested child of @self

source

fn child_transition_duration(&self) -> u32

Gets the amount of time that transitions between children will take.

Returns

the child transition duration, in milliseconds

source

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

source

fn is_folded(&self) -> bool

Gets whether @self is folded.

Returns

whether @self is folded

source

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

source

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

source

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

source

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

source

fn visible_child(&self) -> Option<Widget>

Gets the visible child widget.

Returns

the visible child widget

source

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

Gets the name of the currently visible child widget.

Returns

the name of the visible child

source

fn insert_child_after( &self, child: &impl IsA<Widget>, sibling: Option<&impl IsA<Widget>> )

Available on crate feature v1_2 only.

Inserts @child in the position after @sibling in the list of children.

If @sibling is NULL, inserts @child at the first position.

child

the widget to insert

sibling

the sibling after which to insert @child

source

fn navigate(&self, direction: NavigationDirection) -> bool

Navigates to the previous or next navigatable child.

The switch is similar to performing a swipe gesture to go in @direction.

direction

the direction

Returns

whether the visible child was changed

source

fn prepend(&self, child: &impl IsA<Widget>)

Available on crate feature v1_2 only.

Inserts @child at the first position in @self.

child

the widget to prepend

source

fn reorder_child_after( &self, child: &impl IsA<Widget>, sibling: Option<&impl IsA<Widget>> )

Available on crate feature v1_2 only.

Moves @child to the position after @sibling in the list of children.

If @sibling is NULL, move @child to the first position.

child

the widget to move, must be a child of @self

sibling

the sibling to move @child after

source

fn set_can_swipe_back(&self, can_swipe_back: bool)

Sets whether swipe gestures switch to the previous navigatable child.

can_swipe_back

the new value

source

fn set_can_swipe_forward(&self, can_swipe_forward: bool)

Sets whether swipe gestures switch to the next navigatable child.

can_swipe_forward

the new value

source

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

source

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

source

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

source

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

source

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

source

fn set_visible_child(&self, visible_child: &impl IsA<Widget>)

Sets the currently visible widget when the leaflet is folded.

visible_child

the new child

source

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

source

fn is_hhomogeneous_folded(&self) -> bool

Whether to allocate the same width for all children when folded.

source

fn set_hhomogeneous_folded(&self, hhomogeneous_folded: bool)

Whether to allocate the same width for all children when folded.

source

fn is_hhomogeneous_unfolded(&self) -> bool

Whether to allocate the same width for all children when unfolded.

source

fn set_hhomogeneous_unfolded(&self, hhomogeneous_unfolded: bool)

Whether to allocate the same width for all children when unfolded.

source

fn is_vhomogeneous_folded(&self) -> bool

Whether to allocates the same height for all children when folded.

source

fn set_vhomogeneous_folded(&self, vhomogeneous_folded: bool)

Whether to allocates the same height for all children when folded.

source

fn is_vhomogeneous_unfolded(&self) -> bool

Whether to allocate the same height for all children when unfolded.

source

fn set_vhomogeneous_unfolded(&self, vhomogeneous_unfolded: bool)

Whether to allocate the same height for all children when unfolded.

source

fn child_icon_name<T: IsA<Widget>>(&self, item: &T) -> Option<GString>

source

fn set_child_icon_name<T: IsA<Widget>>(&self, item: &T, icon_name: Option<&str>)

source

fn child_name<T: IsA<Widget>>(&self, item: &T) -> Option<GString>

source

fn set_child_name<T: IsA<Widget>>(&self, item: &T, name: Option<&str>)

source

fn child_needs_attention<T: IsA<Widget>>(&self, item: &T) -> bool

source

fn set_child_needs_attention<T: IsA<Widget>>( &self, item: &T, needs_attention: bool )

source

fn child_position<T: IsA<Widget>>(&self, item: &T) -> i32

source

fn set_child_position<T: IsA<Widget>>(&self, item: &T, position: i32)

source

fn child_title<T: IsA<Widget>>(&self, item: &T) -> Option<GString>

source

fn set_child_title<T: IsA<Widget>>(&self, item: &T, title: Option<&str>)

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

Object Safety§

This trait is not object safe.

Implementors§