Class: Handy::Squeezer

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

Instance Method Summary collapse

Constructor Details

#initializeGtk::Widget

Creates a new HdySqueezer.

Instance Method Details

#get_child_enabled(child) ⇒ Boolean

Gets whether child is enabled.

See [methodSqueezer.set_child_enabled].

Parameters:

  • child (Gtk::Widget)

    a child of self

Returns:

  • (Boolean)

    whether child is enabled

#homogeneousBoolean

Gets whether self is homogeneous.

Returns:

  • (Boolean)

    whether self is homogeneous

#homogeneous=(homogeneous) ⇒ Boolean

Whether all children have the same size for the opposite orientation.

For example, if a squeezer is horizontal and is homogeneous, it will request the same height for all its children. If it isn't, the squeezer may change size when a different child becomes visible.

Parameters:

  • homogeneous (Boolean)

Returns:

  • (Boolean)

    homogeneous

  • (Boolean)

    homogeneous

#homogeneous?Boolean

Whether all children have the same size for the opposite orientation.

For example, if a squeezer is horizontal and is homogeneous, it will request the same height for all its children. If it isn't, the squeezer may change size when a different child becomes visible.

Returns:

  • (Boolean)

    homogeneous

#interpolate_sizeBoolean

Gets whether self should interpolate its size on visible child change.

Returns:

  • (Boolean)

    whether self interpolates its size on visible child change

#interpolate_size=(interpolate_size) ⇒ Boolean

Whether the squeezer interpolates its size when changing the visible child.

If TRUE, the squeezer will interpolate its size between the one of the previous visible child and the one of the new visible child, according to the set transition duration and the orientation, e.g. if the squeezer is horizontal, it will interpolate the its height.

Parameters:

  • interpolate_size (Boolean)

Returns:

  • (Boolean)

    interpolate-size

  • (Boolean)

    interpolate-size

#interpolate_size?Boolean

Whether the squeezer interpolates its size when changing the visible child.

If TRUE, the squeezer will interpolate its size between the one of the previous visible child and the one of the new visible child, according to the set transition duration and the orientation, e.g. if the squeezer is horizontal, it will interpolate the its height.

Returns:

  • (Boolean)

    interpolate-size

#set_child_enabled(child, enabled) ⇒ nil

Sets whether child is enabled.

If a child is disabled, it will be ignored when looking for the child fitting the available size best. This allows to programmatically and prematurely hide a child of self even if it fits in the available space.

This can be used e.g. to ensure a certain child is hidden below a certain window width, or any other constraint you find suitable.

Parameters:

  • child (Gtk::Widget)

    a child of self

  • enabled (Boolean)

    whether to enable the child

Returns:

  • (nil)

#transition_durationInteger

The animation duration, in milliseconds.

Returns:

  • (Integer)

    transition-duration

#transition_duration=(transition_duration) ⇒ Integer

The animation duration, in milliseconds.

Parameters:

  • transition_duration (Integer)

Returns:

  • (Integer)

    transition-duration

  • (Integer)

    transition-duration

#transition_runningBoolean

Gets whether a transition is currently running for self.

Returns:

  • (Boolean)

    whether a transition is currently running

#transition_running=(transition_running) ⇒ Boolean

Whether a transition is currently running.

Parameters:

  • transition_running (Boolean)

Returns:

  • (Boolean)

    transition-running

  • (Boolean)

    transition-running

#transition_running?Boolean

Whether a transition is currently running.

Returns:

  • (Boolean)

    transition-running

#transition_typeHandy::SqueezerTransitionType

The type of animation used for transitions between children.

Available types include various kinds of fades and slides.

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.

Returns:

#transition_type=(transition_type) ⇒ Handy::SqueezerTransitionType

The type of animation used for transitions between children.

Available types include various kinds of fades and slides.

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.

Parameters:

Returns:

#visible_childGtk::Widget

The currently visible child.

Returns:

  • (Gtk::Widget)

    visible-child

#visible_child=(visible_child) ⇒ Gtk::Widget

The currently visible child.

Parameters:

  • visible_child (Gtk::Widget)

Returns:

  • (Gtk::Widget)

    visible-child

  • (Gtk::Widget)

    visible-child

#xalignHandy::gfloat

The horizontal alignment, from 0 (start) to 1 (end).

The xalign property determines the horizontal alignment of the children inside the squeezer's size allocation. Compare this to [propertyGtk.Widget:halign], which determines how the squeezer's size allocation is positioned in the space available for the squeezer.

This will affect the position of children too wide to fit in the squeezer as they are fading out.

Returns:

  • (Handy::gfloat)

    xalign

#xalign=(xalign) ⇒ Handy::gfloat

The horizontal alignment, from 0 (start) to 1 (end).

The xalign property determines the horizontal alignment of the children inside the squeezer's size allocation. Compare this to [propertyGtk.Widget:halign], which determines how the squeezer's size allocation is positioned in the space available for the squeezer.

This will affect the position of children too wide to fit in the squeezer as they are fading out.

Parameters:

  • xalign (Handy::gfloat)

Returns:

  • (Handy::gfloat)

    xalign

  • (Handy::gfloat)

    xalign

#yalignHandy::gfloat

The vertical alignment, from 0 (start) to 1 (end).

The yalign property determines the vertical alignment of the children inside the squeezer's size allocation. Compare this to [propertyGtk.Widget:valign], which determines how the squeezer's size allocation is positioned in the space available for the squeezer.

This will affect the position of children too tall to fit in the squeezer as they are fading out.

Returns:

  • (Handy::gfloat)

    yalign

#yalign=(yalign) ⇒ Handy::gfloat

The vertical alignment, from 0 (start) to 1 (end).

The yalign property determines the vertical alignment of the children inside the squeezer's size allocation. Compare this to [propertyGtk.Widget:valign], which determines how the squeezer's size allocation is positioned in the space available for the squeezer.

This will affect the position of children too tall to fit in the squeezer as they are fading out.

Parameters:

  • yalign (Handy::gfloat)

Returns:

  • (Handy::gfloat)

    yalign

  • (Handy::gfloat)

    yalign