Class: Gtk::Box

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

Instance Method Summary collapse

Instance Method Details

#baseline_positionGtk::BaselinePosition

Returns baseline-position.

Returns:

#baseline_position=(baseline_position) ⇒ Gtk::BaselinePosition

Parameters:

Returns:

#center_widgetGtk::Widget

Retrieves the center widget of the box.

Returns:

  • (Gtk::Widget)

    the center widget or nil in case no center widget is set.

#center_widget=(widget) ⇒ nil

Sets a center widget; that is a child widget that will be centered with respect to the full width of the box, even if the children at either side take up different amounts of space.

Parameters:

Returns:

  • (nil)

#homogeneousTrueClass

Returns whether the box is homogeneous (all children are the same size). See gtk_box_set_homogeneous().

Returns:

  • (TrueClass)

    true if the box is homogeneous.

#homogeneous=(homogeneous) ⇒ TrueClass

Parameters:

  • homogeneous (TrueClass)

Returns:

  • (TrueClass)

    homogeneous

  • (TrueClass)

    homogeneous

#homogeneous?TrueClass

Returns homogeneous.

Returns:

  • (TrueClass)

    homogeneous

#new(orientation, spacing) ⇒ Gtk::Widget

Creates a new Gtk::Box.

Parameters:

  • orientation (Gtk::Orientation)

    the box’s orientation.

  • spacing (Integer)

    the number of pixels to place by default between children.

Returns:

#pack_end(child, expand, fill, padding) ⇒ nil

Adds child to box, packed with reference to the end of box. The child is packed after (away from end of) any other child packed with reference to the end of box.

Parameters:

  • child (Gtk::Widget)

    the Gtk::Widget to be added to box

  • expand (TrueClass)

    true if the new child is to be given extra space allocated to box. The extra space will be divided evenly between all children of box that use this option

  • fill (TrueClass)

    true if space given to child by the expand option is actually allocated to child, rather than just padding it. This parameter has no effect if expand is set to false. A child is always allocated the full height of a horizontal Gtk::Box and the full width of a vertical Gtk::Box. This option affects the other dimension

  • padding (Integer)

    extra space in pixels to put between this child and its neighbors, over and above the global amount specified by Gtk::Box:spacing property. If child is a widget at one of the reference ends of box, then padding pixels are also put between child and the reference edge of box

Returns:

  • (nil)

#pack_start(child, expand, fill, padding) ⇒ nil

Adds child to box, packed with reference to the start of box. The child is packed after any other child packed with reference to the start of box.

Parameters:

  • child (Gtk::Widget)

    the Gtk::Widget to be added to box

  • expand (TrueClass)

    true if the new child is to be given extra space allocated to box. The extra space will be divided evenly between all children that use this option

  • fill (TrueClass)

    true if space given to child by the expand option is actually allocated to child, rather than just padding it. This parameter has no effect if expand is set to false. A child is always allocated the full height of a horizontal Gtk::Box and the full width of a vertical Gtk::Box. This option affects the other dimension

  • padding (Integer)

    extra space in pixels to put between this child and its neighbors, over and above the global amount specified by Gtk::Box:spacing property. If child is a widget at one of the reference ends of box, then padding pixels are also put between child and the reference edge of box

Returns:

  • (nil)

#query_child_packing(child, expand, fill, padding, pack_type) ⇒ nil

Obtains information about how child is packed into box.

Parameters:

  • child (Gtk::Widget)

    the Gtk::Widget of the child to query

  • expand (TrueClass)

    pointer to return location for expand child property

  • fill (TrueClass)

    pointer to return location for fill child property

  • padding (Integer)

    pointer to return location for padding child property

  • pack_type (Gtk::PackType)

    pointer to return location for pack-type child property

Returns:

  • (nil)

#reorder_child(child, position) ⇒ nil

Moves child to a new position in the list of box children. The list contains widgets packed #GTK_PACK_START as well as widgets packed #GTK_PACK_END, in the order that these widgets were added to box.

A widget’s position in the box children list determines where the widget is packed into box. A child widget at some position in the list will be packed just after all other widgets of the same packing type that appear earlier in the list.

Parameters:

  • child (Gtk::Widget)

    the Gtk::Widget to move

  • position (Integer)

    the new position for child in the list of children of box, starting from 0. If negative, indicates the end of the list

Returns:

  • (nil)

#set_child_packing(child, expand, fill, padding, pack_type) ⇒ nil

Sets the way child is packed into box.

Parameters:

  • child (Gtk::Widget)

    the Gtk::Widget of the child to set

  • expand (TrueClass)

    the new value of the expand child property

  • fill (TrueClass)

    the new value of the fill child property

  • padding (Integer)

    the new value of the padding child property

  • pack_type (Gtk::PackType)

    the new value of the pack-type child property

Returns:

  • (nil)

#spacingInteger

Returns spacing.

Returns:

  • (Integer)

    spacing

#spacing=(spacing) ⇒ Integer

Parameters:

  • spacing (Integer)

Returns:

  • (Integer)

    spacing

  • (Integer)

    spacing