GTK+ 3 Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Child Properties | Style Properties |
#include <gtk/gtk.h> struct GtkButtonBox; GtkWidget * gtk_button_box_new (GtkOrientation orientation
); GtkButtonBoxStyle gtk_button_box_get_layout (GtkButtonBox *widget
); gboolean gtk_button_box_get_child_secondary (GtkButtonBox *widget
,GtkWidget *child
); void gtk_button_box_set_layout (GtkButtonBox *widget
,GtkButtonBoxStyle layout_style
); void gtk_button_box_set_child_secondary (GtkButtonBox *widget
,GtkWidget *child
,gboolean is_secondary
);
GObject +----GInitiallyUnowned +----GtkWidget +----GtkContainer +----GtkBox +----GtkButtonBox +----GtkHButtonBox +----GtkVButtonBox
"child-internal-pad-x" gint : Read "child-internal-pad-y" gint : Read "child-min-height" gint : Read "child-min-width" gint : Read
The primary purpose of this class is to keep track of the various properties of GtkHButtonBox and GtkVButtonBox widgets.
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. GtkButtonBox gives all children the same size, but it does allow
'outliers' to keep their own larger size. To force all children to be
strictly the same size without exceptions, you can set the
"homogeneous" property to TRUE
.
GtkWidget * gtk_button_box_new (GtkOrientation orientation
);
Creates a new GtkButtonBox.
|
the box' orientation. |
Returns : |
a new GtkButtonBox. |
Since 3.0
GtkButtonBoxStyle gtk_button_box_get_layout (GtkButtonBox *widget
);
Retrieves the method being used to arrange the buttons in a button box.
|
a GtkButtonBox |
Returns : |
the method used to lay out buttons in widget . |
gboolean gtk_button_box_get_child_secondary (GtkButtonBox *widget
,GtkWidget *child
);
Returns whether child
should appear in a secondary group of children.
|
a GtkButtonBox |
|
a child of widget
|
Returns : |
whether child should appear in a secondary group of children. |
Since 2.4
void gtk_button_box_set_layout (GtkButtonBox *widget
,GtkButtonBoxStyle layout_style
);
Changes the way buttons are arranged in their container.
|
a GtkButtonBox |
|
the new layout style |
void gtk_button_box_set_child_secondary (GtkButtonBox *widget
,GtkWidget *child
,gboolean is_secondary
);
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.
|
a GtkButtonBox |
|
a child of widget
|
|
if TRUE , the child appears in a secondary group of the
button box. |
"layout-style"
property"layout-style" GtkButtonBoxStyle : Read / Write
How to lay out the buttons in the box. Possible values are: spread, edge, start and end.
Default value: GTK_BUTTONBOX_EDGE
"secondary"
child property"secondary" gboolean : Read / Write
If TRUE, the child appears in a secondary group of children, suitable for, e.g., help buttons.
Default value: FALSE
"child-internal-pad-x"
style property"child-internal-pad-x" gint : Read
Amount to increase child's size on either side.
Allowed values: >= 0
Default value: 4
"child-internal-pad-y"
style property"child-internal-pad-y" gint : Read
Amount to increase child's size on the top and bottom.
Allowed values: >= 0
Default value: 0
"child-min-height"
style property"child-min-height" gint : Read
Minimum height of buttons inside the box.
Allowed values: >= 0
Default value: 27
"child-min-width"
style property"child-min-width" gint : Read
Minimum width of buttons inside the box.
Allowed values: >= 0
Default value: 85