[][src]Struct libhandy4::Leaflet

pub struct Leaflet(_);

Implementations

impl Leaflet[src]

pub fn new() -> Leaflet[src]

pub fn append<P: IsA<Widget>>(&self, child: &P) -> Option<LeafletPage>[src]

Adds a child to self.

child

the widget to add

Returns

the LeafletPage for child

pub fn get_adjacent_child(
    &self,
    direction: NavigationDirection
) -> Option<Widget>
[src]

Gets the previous or next child that doesn't have 'navigatable' child property set to false, or None if it doesn't exist. This will be the same widget Leaflet::navigate will navigate to.

direction

the direction

Returns

the previous or next child, or None if it doesn't exist.

pub fn get_can_swipe_back(&self) -> bool[src]

Returns whether the Leaflet allows swiping to the previous child.

Returns

true if back swipe is enabled.

pub fn get_can_swipe_forward(&self) -> bool[src]

Returns whether the Leaflet allows swiping to the next child.

Returns

true if forward swipe is enabled.

pub fn get_can_unfold(&self) -> bool[src]

pub fn get_child_by_name(&self, name: &str) -> Option<Widget>[src]

Finds the child of self with the name given as the argument. Returns None if there is no child with this name.

name

the name of the child to find

Returns

the requested child of self

pub fn get_child_transition_duration(&self) -> u32[src]

Returns the amount of time (in milliseconds) that transitions between children in self will take.

Returns

the child transition duration

pub fn get_child_transition_running(&self) -> bool[src]

Returns whether self is currently in a transition from one page to another.

Returns

true if the transition is currently running, false otherwise.

pub fn get_folded(&self) -> bool[src]

Gets whether self is folded.

Returns

whether self is folded.

pub fn get_homogeneous(&self, folded: bool, orientation: Orientation) -> bool[src]

Gets whether self is homogeneous for the given fold and orientation. See Leaflet::set_homogeneous.

folded

the fold

orientation

the orientation

Returns

whether self is homogeneous for the given fold and orientation.

pub fn get_interpolate_size(&self) -> bool[src]

Returns whether the Leaflet is set up to interpolate between the sizes of children on page switch.

Returns

true if child sizes are interpolated

pub fn get_mode_transition_duration(&self) -> u32[src]

Returns the amount of time (in milliseconds) that transitions between modes in self will take.

Returns

the mode transition duration

pub fn get_page<P: IsA<Widget>>(&self, child: &P) -> Option<LeafletPage>[src]

Returns the LeafletPage object for child.

child

a child of self

Returns

the LeafletPage for child

pub fn get_pages(&self) -> Option<SelectionModel>[src]

Returns a gio::ListModel that contains the pages of the leaflet, and can be used to keep an up-to-date view. The model also implements gtk::SelectionModel and can be used to track the visible page.

Returns

a gtk::SelectionModel for the leaflet's children

pub fn get_transition_type(&self) -> LeafletTransitionType[src]

Gets the type of animation that will be used for transitions between modes and children in self.

Returns

the current transition type of self

pub fn get_visible_child(&self) -> Option<Widget>[src]

Gets the visible child widget.

Returns

the visible child widget

pub fn get_visible_child_name(&self) -> Option<GString>[src]

Gets the name of the currently visible child widget.

Returns

the name of the visible child

pub fn insert_child_after<P: IsA<Widget>, Q: IsA<Widget>>(
    &self,
    child: &P,
    sibling: Option<&Q>
) -> Option<LeafletPage>
[src]

Inserts child in the position after sibling in the list of children. If sibling is None, insert child at the first position.

child

the gtk::Widget to insert

sibling

the sibling after which to insert child

Returns

the LeafletPage for child

pub fn navigate(&self, direction: NavigationDirection) -> bool[src]

Switches to the previous or next child that doesn't have 'navigatable' child property set to false, similar to performing a swipe gesture to go in direction.

direction

the direction

Returns

true if visible child was changed, false otherwise.

pub fn prepend<P: IsA<Widget>>(&self, child: &P) -> Option<LeafletPage>[src]

Inserts child at the first position in self.

child

the gtk::Widget to prepend

Returns

the LeafletPage for child

pub fn remove<P: IsA<Widget>>(&self, child: &P)[src]

Removes a child widget from self.

child

the child to remove

pub fn reorder_child_after<P: IsA<Widget>, Q: IsA<Widget>>(
    &self,
    child: &P,
    sibling: Option<&Q>
)
[src]

Moves child to the position after sibling in the list of children. If sibling is None, move child to the first position.

child

the gtk::Widget to move, must be a child of self

sibling

the sibling to move child after, or None

pub fn set_can_swipe_back(&self, can_swipe_back: bool)[src]

Sets whether or not self allows switching to the previous child that has 'navigatable' child property set to true via a swipe gesture

can_swipe_back

the new value

pub fn set_can_swipe_forward(&self, can_swipe_forward: bool)[src]

Sets whether or not self allows switching to the next child that has 'navigatable' child property set to true via a swipe gesture.

can_swipe_forward

the new value

pub fn set_can_unfold(&self, can_unfold: bool)[src]

pub fn set_child_transition_duration(&self, duration: u32)[src]

Sets the duration that transitions between children in self will take.

duration

the new duration, in milliseconds

pub fn set_homogeneous(
    &self,
    folded: bool,
    orientation: Orientation,
    homogeneous: bool
)
[src]

Sets the Leaflet to be homogeneous or not 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

pub fn set_interpolate_size(&self, interpolate_size: bool)[src]

Sets whether or not self will interpolate its size when changing the visible child. If the Leaflet: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

pub fn set_mode_transition_duration(&self, duration: u32)[src]

Sets the duration that transitions between modes in self will take.

duration

the new duration, in milliseconds

pub fn set_transition_type(&self, transition: LeafletTransitionType)[src]

Sets the type of animation that will be used for transitions between modes and children in self.

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

pub fn set_visible_child<P: IsA<Widget>>(&self, visible_child: &P)[src]

Makes visible_child visible using a transition determined by HdyLeaflet:transition-type and HdyLeaflet:child-transition-duration. The transition can be cancelled by the user, in which case visible child will change back to the previously visible child.

visible_child

the new child

pub fn set_visible_child_name(&self, name: &str)[src]

Makes the child with the name name visible.

See Leaflet::set_visible_child for more details.

name

the name of a child

pub fn get_property_hhomogeneous_folded(&self) -> bool[src]

pub fn set_property_hhomogeneous_folded(&self, hhomogeneous_folded: bool)[src]

pub fn get_property_hhomogeneous_unfolded(&self) -> bool[src]

pub fn set_property_hhomogeneous_unfolded(&self, hhomogeneous_unfolded: bool)[src]

pub fn get_property_vhomogeneous_folded(&self) -> bool[src]

pub fn set_property_vhomogeneous_folded(&self, vhomogeneous_folded: bool)[src]

pub fn get_property_vhomogeneous_unfolded(&self) -> bool[src]

pub fn set_property_vhomogeneous_unfolded(&self, vhomogeneous_unfolded: bool)[src]

pub fn connect_property_can_swipe_back_notify<F: Fn(&Leaflet) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_can_swipe_forward_notify<F: Fn(&Leaflet) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_can_unfold_notify<F: Fn(&Leaflet) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_child_transition_duration_notify<F: Fn(&Leaflet) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_child_transition_running_notify<F: Fn(&Leaflet) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_folded_notify<F: Fn(&Leaflet) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_hhomogeneous_folded_notify<F: Fn(&Leaflet) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_hhomogeneous_unfolded_notify<F: Fn(&Leaflet) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_interpolate_size_notify<F: Fn(&Leaflet) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_mode_transition_duration_notify<F: Fn(&Leaflet) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_pages_notify<F: Fn(&Leaflet) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_transition_type_notify<F: Fn(&Leaflet) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_vhomogeneous_folded_notify<F: Fn(&Leaflet) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_vhomogeneous_unfolded_notify<F: Fn(&Leaflet) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_visible_child_notify<F: Fn(&Leaflet) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_visible_child_name_notify<F: Fn(&Leaflet) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

Trait Implementations

impl Clone for Leaflet[src]

impl Debug for Leaflet[src]

impl Default for Leaflet[src]

impl Display for Leaflet[src]

impl Eq for Leaflet[src]

impl Hash for Leaflet[src]

impl IsA<Accessible> for Leaflet[src]

impl IsA<Buildable> for Leaflet[src]

impl IsA<ConstraintTarget> for Leaflet[src]

impl IsA<Orientable> for Leaflet[src]

impl IsA<Swipeable> for Leaflet[src]

impl IsA<Widget> for Leaflet[src]

impl Ord for Leaflet[src]

impl ParentClassIs for Leaflet[src]

type Parent = Widget

impl<T: ObjectType> PartialEq<T> for Leaflet[src]

impl<T: ObjectType> PartialOrd<T> for Leaflet[src]

impl StaticType for Leaflet[src]

impl StructuralEq for Leaflet[src]

Auto Trait Implementations

impl RefUnwindSafe for Leaflet[src]

impl !Send for Leaflet[src]

impl !Sync for Leaflet[src]

impl Unpin for Leaflet[src]

impl UnwindSafe for Leaflet[src]

Blanket Implementations

impl<O> AccessibleExt for O where
    O: IsA<Accessible>, 

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<O> BuildableExt for O where
    O: IsA<Buildable>, 

impl<Super, Sub> CanDowncast<Sub> for Super where
    Sub: IsA<Super>,
    Super: IsA<Super>, 

impl<T> Cast for T where
    T: ObjectType, 

impl<O> ConstraintTargetExt for O where
    O: IsA<ConstraintTarget>, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ObjectExt for T where
    T: ObjectType, 

impl<O> OrientableExt for O where
    O: IsA<Orientable>, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToSendValue for T where
    T: ToValue + SetValue + Send + ?Sized

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<O> WidgetExt for O where
    O: IsA<Widget>, 

impl<O> WidgetExtManual for O where
    O: IsA<Widget>,