Trait libhandy::prelude::DeckExt

source ·
pub trait DeckExt: IsA<Deck> + Sealed + 'static {
Show 39 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 is_homogeneous(&self, orientation: Orientation) -> bool { ... } fn is_interpolate_size(&self) -> bool { ... } fn transition_duration(&self) -> u32 { ... } fn is_transition_running(&self) -> bool { ... } fn transition_type(&self) -> DeckTransitionType { ... } 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_homogeneous(&self, orientation: Orientation, homogeneous: bool) { ... } fn set_interpolate_size(&self, interpolate_size: bool) { ... } fn set_transition_duration(&self, duration: u32) { ... } fn set_transition_type(&self, transition: DeckTransitionType) { ... } fn set_visible_child(&self, visible_child: &impl IsA<Widget>) { ... } fn set_visible_child_name(&self, name: &str) { ... } fn is_hhomogeneous(&self) -> bool { ... } fn set_hhomogeneous(&self, hhomogeneous: bool) { ... } fn is_vhomogeneous(&self) -> bool { ... } fn set_vhomogeneous(&self, vhomogeneous: bool) { ... } 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 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_hhomogeneous_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 { ... }
}
Expand description

Trait containing all Deck methods.

Implementors

Deck

Provided Methods§

source

fn adjacent_child(&self, direction: NavigationDirection) -> Option<Widget>

Finds the previous or next navigatable child.

Gets the previous or next 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 for navigating backward are enabled.

Returns

Whether swipe gestures are enabled.

source

fn can_swipe_forward(&self) -> bool

Gets whether swipe gestures for navigating forward enabled.

Returns

Whether swipe gestures are enabled.

source

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

Finds the child of @self with @name.

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 is_homogeneous(&self, orientation: Orientation) -> bool

Gets whether @self is homogeneous for the given orientation.

orientation

the orientation

Returns

whether @self is homogeneous for the given orientation

source

fn is_interpolate_size(&self) -> bool

Gets whether @self will interpolate its size when changing the visible child.

Returns

whether child sizes are interpolated

source

fn transition_duration(&self) -> u32

Gets the mode transition animation duration for @self.

Returns

the mode transition duration, in milliseconds.

source

fn is_transition_running(&self) -> bool

Gets whether a transition is currently running for @self.

Returns

whether a transition is currently running

source

fn transition_type(&self) -> DeckTransitionType

Gets the type of animation used for transitions between 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 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 for navigating backward are enabled.

can_swipe_back

the new value

source

fn set_can_swipe_forward(&self, can_swipe_forward: bool)

Sets whether swipe gestures for navigating forward are enabled.

can_swipe_forward

the new value

source

fn set_homogeneous(&self, orientation: Orientation, homogeneous: bool)

Sets whether @self is homogeneous for a given orientation.

If set to FALSE, different children can have different size along the opposite orientation.

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.

@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_transition_duration(&self, duration: u32)

Sets the mode transition animation duration for @self.

duration

the new duration, in milliseconds

source

fn set_transition_type(&self, transition: DeckTransitionType)

Sets the type of animation used for transitions between children.

The transition type can be changed without problems at runtime, so it is possible to change the animation based on the 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.

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(&self) -> bool

Horizontally homogeneous sizing.

source

fn set_hhomogeneous(&self, hhomogeneous: bool)

Horizontally homogeneous sizing.

source

fn is_vhomogeneous(&self) -> bool

Vertically homogeneous sizing.

source

fn set_vhomogeneous(&self, vhomogeneous: bool)

Vertically homogeneous sizing.

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 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_hhomogeneous_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_transition_duration_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

fn connect_transition_running_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_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§

source§

impl<O: IsA<Deck>> DeckExt for O