GtkButtonBox — Base class for GtkHButtonBox and GtkVButtonBox


#include <gtk/gtk.h>

#define             GTK_BUTTONBOX_DEFAULT
#define             gtk_button_box_get_spacing          (b)
GtkButtonBoxStyle   gtk_button_box_get_layout           (GtkButtonBox *widget);
void                gtk_button_box_get_child_size       (GtkButtonBox *widget,
                                                         gint *min_width,
                                                         gint *min_height);
void                gtk_button_box_get_child_ipadding   (GtkButtonBox *widget,
                                                         gint *ipad_x,
                                                         gint *ipad_y);
gboolean            gtk_button_box_get_child_secondary  (GtkButtonBox *widget,
                                                         GtkWidget *child);
#define             gtk_button_box_set_spacing          (b,s)
void                gtk_button_box_set_layout           (GtkButtonBox *widget,
                                                         GtkButtonBoxStyle layout_style);
void                gtk_button_box_set_child_size       (GtkButtonBox *widget,
                                                         gint min_width,
                                                         gint min_height);
void                gtk_button_box_set_child_ipadding   (GtkButtonBox *widget,
                                                         gint ipad_x,
                                                         gint ipad_y);
void                gtk_button_box_set_child_secondary  (GtkButtonBox *widget,
                                                         GtkWidget *child,
                                                         gboolean is_secondary);

Object Hierarchy


Implemented Interfaces

GtkButtonBox implements AtkImplementorIface and GtkBuildable.


  "layout-style"             GtkButtonBoxStyle     : Read / Write

Child Properties

  "secondary"                gboolean              : Read / Write

Style Properties

  "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_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 TRUE.



typedef struct _GtkButtonBox GtkButtonBox;

This is a read-only struct; no members should be modified directly.



Used internally only.


#define gtk_button_box_get_spacing(b)   gtk_box_get_spacing (GTK_BOX (b))


gtk_button_box_get_spacing is deprecated and should not be used in newly-written code.

Retrieves how much space a button box is placing between each child button.

b : a GtkButtonBox
Returns : the current spacing applied to the buttons in widget.

gtk_button_box_get_layout ()

GtkButtonBoxStyle   gtk_button_box_get_layout           (GtkButtonBox *widget);

Retrieves the method being used to arrange the buttons in a button box.

widget : a GtkButtonBox.
Returns : the method used to layout buttons in widget.

gtk_button_box_get_child_size ()

void                gtk_button_box_get_child_size       (GtkButtonBox *widget,
                                                         gint *min_width,
                                                         gint *min_height);


gtk_button_box_get_child_size is deprecated and should not be used in newly-written code. Use the style properties "child-min-width/-height" instead.

Retrieves the current width and height of all child widgets in a button box. min_width and min_height are filled with those values, respectively.

widget : a GtkButtonBox.
min_width : the width of the buttons contained by widget.
min_height :<