Base class for and
The primary purpose of this class is to keep track of the various properties of
<gtk-hbutton-box>
and <gtk-vbutton-box>
widgets.
gtk-button-box-get-child-size
retrieves the minimum width and height for
widgets in a given button box. gtk-button-box-set-child-size
allows those
properties to be changed.
The internal padding of buttons can be retrieved and changed per button box
using gtk-button-box-get-child-ipadding
and
gtk-button-box-set-child-ipadding
respectively.
gtk-button-box-get-spacing
and gtk-button-box-set-spacing
retrieve
and change default number of pixels between buttons, respectively.
gtk-button-box-get-layout
and gtk-button-box-set-layout
retrieve
and alter the method used to spread the buttons in a button box across the
container, respectively.
The main purpose of GtkButtonBox is to make sure the children have all the same
size. Therefore it ignores the homogeneous property which it inherited from
GtkBox, and always behaves as if homogeneous was ‘#t
’.
Derives from
<gtk-box>
.This class defines the following slots:
layout-style
- How to layout the buttons in the box. Possible values are default, spread, edge, start and end
<gtk-button-box>
) ⇒ (ret <gtk-button-box-style>
)Retrieves the method being used to arrange the buttons in a button box.
- widget
- a
<gtk-button-box>
.- ret
- the method used to layout buttons in widget.
<gtk-button-box>
) (child <gtk-widget>
) ⇒ (ret bool
)Returns whether child should appear in a secondary group of children.
- widget
- a
<gtk-button-box>
- child
- a child of widget
- ret
- whether child should appear in a secondary group of children.
Since 2.4
<gtk-button-box>
) (layout_style <gtk-button-box-style>
)Changes the way buttons are arranged in their container.
- widget
- a
<gtk-button-box>
.- layout-style
- the new layout style.
<gtk-button-box>
) (child <gtk-widget>
) (is_secondary bool
)Sets whether child should appear in a secondary group of children. A typical use of a secondary child is the help button in a dialog.
This group appears after the other children if the style is ‘GTK_BUTTONBOX_START’, ‘GTK_BUTTONBOX_SPREAD’ or ‘GTK_BUTTONBOX_EDGE’, and before the other children if the style is ‘GTK_BUTTONBOX_END’. For horizontal button boxes, the definition of before/after depends on direction of the widget (see
gtk-widget-set-direction
). If the style is ‘GTK_BUTTONBOX_START’ or ‘GTK_BUTTONBOX_END’, then the secondary children are aligned at the other end of the button box from the main children. For the other styles, they appear immediately next to the main children.
- widget
- a
<gtk-button-box>
- child
- a child of widget
- is-secondary
- if ‘
#t
’, the child appears in a secondary group of the button box.