Class: Handy::Leaflet

Inherits:
Gtk::Container
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Constructor Details

#initializeGtk::Widget

Creates a new HdyLeaflet.

Instance Method Details

#can_swipe_backBoolean

Gets whether swipe gestures switch to the previous navigatable child.

Returns:

  • (Boolean)

    TRUE if back swipe is enabled

#can_swipe_back=(can_swipe_back) ⇒ Boolean

Whether swipe gestures allow switching to the previous navigatable child.

Parameters:

  • can_swipe_back (Boolean)

Returns:

  • (Boolean)

    can-swipe-back

  • (Boolean)

    can-swipe-back

#can_swipe_back?Boolean

Whether swipe gestures allow switching to the previous navigatable child.

Returns:

  • (Boolean)

    can-swipe-back

#can_swipe_forwardBoolean

Gets whether swipe gestures switch to the next navigatable child.

Returns:

  • (Boolean)

    TRUE if forward swipe is enabled

#can_swipe_forward=(can_swipe_forward) ⇒ Boolean

Whether swipe gestures allow switching to the next navigatable child.

Parameters:

  • can_swipe_forward (Boolean)

Returns:

  • (Boolean)

    can-swipe-forward

  • (Boolean)

    can-swipe-forward

#can_swipe_forward?Boolean

Whether swipe gestures allow switching to the next navigatable child.

Returns:

  • (Boolean)

    can-swipe-forward

#child_transition_durationInteger

The child transition animation duration, in milliseconds.

Returns:

  • (Integer)

    child-transition-duration

#child_transition_duration=(child_transition_duration) ⇒ Integer

The child transition animation duration, in milliseconds.

Parameters:

  • child_transition_duration (Integer)

Returns:

  • (Integer)

    child-transition-duration

  • (Integer)

    child-transition-duration

#child_transition_runningBoolean

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

Returns:

  • (Boolean)

    whether a transition is currently running

#child_transition_running=(child_transition_running) ⇒ Boolean

Whether a child transition is currently running.

Parameters:

  • child_transition_running (Boolean)

Returns:

  • (Boolean)

    child-transition-running

  • (Boolean)

    child-transition-running

#child_transition_running?Boolean

Whether a child transition is currently running.

Returns:

  • (Boolean)

    child-transition-running

#foldedBoolean

Gets whether self is folded.

Returns:

  • (Boolean)

    whether self is folded

#folded=(folded) ⇒ Boolean

Whether the leaflet is folded.

The leaflet will be folded if the size allocated to it is smaller than the sum of the natural size of its children, it will be unfolded otherwise.

Parameters:

  • folded (Boolean)

Returns:

  • (Boolean)

    folded

  • (Boolean)

    folded

#folded?Boolean

Whether the leaflet is folded.

The leaflet will be folded if the size allocated to it is smaller than the sum of the natural size of its children, it will be unfolded otherwise.

Returns:

  • (Boolean)

    folded

#get_adjacent_child(direction) ⇒ Gtk::Widget

Finds the previous or next navigatable child.

This will be the same widget [methodLeaflet.navigate] will navigate to.

If there's no child to navigate to, NULL will be returned instead.

Parameters:

Returns:

  • (Gtk::Widget)

    the previous or next child

#get_child_by_name(name) ⇒ Gtk::Widget

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

Returns NULL if there is no child with this name.

Parameters:

  • name (String)

    the name of the child to find

Returns:

  • (Gtk::Widget)

    the requested child of self

#get_homogeneous(folded, orientation) ⇒ Boolean

Gets whether self is homogeneous for the given fold and orientation.

Parameters:

  • folded (Boolean)

    the fold

  • orientation (Gtk::Orientation)

    the orientation

Returns:

  • (Boolean)

    whether self is homogeneous for the given fold and orientation

#hhomogeneous_folded=(hhomogeneous_folded) ⇒ Boolean

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

Parameters:

  • hhomogeneous_folded (Boolean)

Returns:

  • (Boolean)

    hhomogeneous-folded

  • (Boolean)

    hhomogeneous-folded

#hhomogeneous_folded?Boolean

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

Returns:

  • (Boolean)

    hhomogeneous-folded

#hhomogeneous_unfolded=(hhomogeneous_unfolded) ⇒ Boolean

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

Parameters:

  • hhomogeneous_unfolded (Boolean)

Returns:

  • (Boolean)

    hhomogeneous-unfolded

  • (Boolean)

    hhomogeneous-unfolded

#hhomogeneous_unfolded?Boolean

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

Returns:

  • (Boolean)

    hhomogeneous-unfolded

#insert_child_after(child, sibling) ⇒ nil

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

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

Parameters:

  • child (Gtk::Widget)

    the widget to insert

  • sibling (Gtk::Widget)

    the sibling after which to insert child

Returns:

  • (nil)

#interpolate_sizeBoolean

Gets whether to interpolate between the sizes of children on page switches.

Returns:

  • (Boolean)

    TRUE if child sizes are interpolated

#interpolate_size=(interpolate_size) ⇒ Boolean

Whether the size should smoothly change when changing between children.

Parameters:

  • interpolate_size (Boolean)

Returns:

  • (Boolean)

    interpolate-size

  • (Boolean)

    interpolate-size

#interpolate_size?Boolean

Whether the size should smoothly change when changing between children.

Returns:

  • (Boolean)

    interpolate-size

#mode_transition_durationInteger

The mode transition animation duration, in milliseconds.

Returns:

  • (Integer)

    mode-transition-duration

#mode_transition_duration=(mode_transition_duration) ⇒ Integer

The mode transition animation duration, in milliseconds.

Parameters:

  • mode_transition_duration (Integer)

Returns:

  • (Integer)

    mode-transition-duration

  • (Integer)

    mode-transition-duration

Navigates to the previous or next navigatable child.

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

Parameters:

Returns:

  • (Boolean)

    whether the visible child was changed

#prepend(child) ⇒ nil

Inserts child at the first position in self.

Parameters:

  • child (Gtk::Widget)

    the widget to prepend

Returns:

  • (nil)

#reorder_child_after(child, sibling) ⇒ nil

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

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

Parameters:

  • child (Gtk::Widget)

    the widget to move, must be a child of self

  • sibling (Gtk::Widget)

    the sibling to move child after

Returns:

  • (nil)

#set_homogeneous(folded, orientation, homogeneous) ⇒ nil

Sets whether to be homogeneous for the given fold and orientation.

If it is homogeneous, the [classLeaflet] 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.

Parameters:

  • folded (Boolean)

    the fold

  • orientation (Gtk::Orientation)

    the orientation

  • homogeneous (Boolean)

    TRUE to make self homogeneous

Returns:

  • (nil)

#transition_typeHandy::LeafletTransitionType

The animation type 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.

Returns:

#transition_type=(transition_type) ⇒ Handy::LeafletTransitionType

The animation type 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.

Parameters:

Returns:

#vhomogeneous_folded=(vhomogeneous_folded) ⇒ Boolean

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

Parameters:

  • vhomogeneous_folded (Boolean)

Returns:

  • (Boolean)

    vhomogeneous-folded

  • (Boolean)

    vhomogeneous-folded

#vhomogeneous_folded?Boolean

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

Returns:

  • (Boolean)

    vhomogeneous-folded

#vhomogeneous_unfolded=(vhomogeneous_unfolded) ⇒ Boolean

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

Parameters:

  • vhomogeneous_unfolded (Boolean)

Returns:

  • (Boolean)

    vhomogeneous-unfolded

  • (Boolean)

    vhomogeneous-unfolded

#vhomogeneous_unfolded?Boolean

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

Returns:

  • (Boolean)

    vhomogeneous-unfolded

#visible_childGtk::Widget

The widget currently visible when the leaflet is folded.

The transition is determined by [propertyLeaflet:transition-type] and [propertyLeaflet:child-transition-duration]. The transition can be cancelled by the user, in which case visible child will change back to the previously visible child.

Returns:

  • (Gtk::Widget)

    visible-child

#visible_child=(visible_child) ⇒ Gtk::Widget

The widget currently visible when the leaflet is folded.

The transition is determined by [propertyLeaflet:transition-type] and [propertyLeaflet:child-transition-duration]. The transition can be cancelled by the user, in which case visible child will change back to the previously visible child.

Parameters:

  • visible_child (Gtk::Widget)

Returns:

  • (Gtk::Widget)

    visible-child

  • (Gtk::Widget)

    visible-child

#visible_child_nameString

The name of the widget currently visible when the leaflet is folded.

See [propertyLeaflet:visible-child].

Returns:

  • (String)

    visible-child-name

#visible_child_name=(visible_child_name) ⇒ String

The name of the widget currently visible when the leaflet is folded.

See [propertyLeaflet:visible-child].

Parameters:

  • visible_child_name (String)

Returns:

  • (String)

    visible-child-name

  • (String)

    visible-child-name