Base class for GtkHButtonBox and GtkVButtonBox
Class GtkButtonBox
The primary purpose of this class is to keep track of the various properties of GtkHButtonBox and GtkVButtonBox widgets.
gtk_button_box_get_child_size() retrieves the minimum width and height for widgets in a given button box.
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 TRUE.
Methods | |
get_child_ipadding | Gets the default number of pixels that pad the buttons in a given button box. |
get_child_secondary | Returns whether child should appear in a secondary group of children. |
get_child_size | Retrieves the current width and height of all child widgets in a button box. |
get_layout | Retrieves the method being used to arrange the buttons in a button box. |
set_child_secondary | Sets whether child should appear in a secondary group of children. |
set_layout | Changes the way buttons are arranged in their container. |
Gets the default number of pixels that pad the buttons in a given button box.
GtkButtonBox.get_child_ipadding()
Return | an array ( pad_x, pad_y ). |
get_child_ipadding is deprecated and should not be used in newly-written code. Use the style properties "child-internal-pad-x" and "child-internal-pad-y" instead.
Returns whether child should appear in a secondary group of children.
GtkButtonBox.get_child_secondary( child )
child | a child of widget |
Return | whether child should appear in a secondary group of children. |
Retrieves the current width and height of all child widgets in a button box.
GtkButtonBox.get_child_size()
Return | an array ( minimum width, minimum height ). |
Retrieves the method being used to arrange the buttons in a button box.
GtkButtonBox.get_layout()
Return | the method used to layout buttons in widget (GtkButtonBoxStyle). |
Sets whether child should appear in a secondary group of children.
GtkButtonBox.set_child_secondary( child, is_secondary )
child | a child of widget |
is_secondary | if TRUE, the child appears in a secondary group of the button box. |
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.
Changes the way buttons are arranged in their container.
GtkButtonBox.set_layout( layout_style )
layout_style | the new layout style (GtkButtonBoxStyle). |