## GimpEnumWidgets

GimpEnumWidgets —

## Synopsis

    GtkWidget*  gimp_enum_radio_box_new         (GType enum_type,
                                                 GCallback callback,
                                                 gpointer callback_data,
                                                 GtkWidget **first_button);
    GtkWidget*  gimp_enum_radio_box_new_with_range
                                                (GType enum_type,
                                                 gint minimum,
                                                 gint maximum,
                                                 GCallback callback,
                                                 gpointer callback_data,
                                                 GtkWidget **first_button);
    GtkWidget*  gimp_enum_radio_frame_new       (GType enum_type,
                                                 GtkWidget *label_widget,
                                                 GCallback callback,
                                                 gpointer callback_data,
                                                 GtkWidget **first_button);
    GtkWidget*  gimp_enum_radio_frame_new_with_range
                                                (GType enum_type,
                                                 gint minimum,
                                                 gint maximum,
                                                 GtkWidget *label_widget,
                                                 GCallback callback,
                                                 gpointer callback_data,
                                                 GtkWidget **first_button);
    GtkWidget*  gimp_enum_stock_box_new         (GType enum_type,
                                                 const gchar *stock_prefix,
                                                 GtkIconSize icon_size,
                                                 GCallback callback,
                                                 gpointer callback_data,
                                                 GtkWidget **first_button);
    GtkWidget*  gimp_enum_stock_box_new_with_range
                                                (GType enum_type,
                                                 gint minimum,
                                                 gint maximum,
                                                 const gchar *stock_prefix,
                                                 GtkIconSize icon_size,
                                                 GCallback callback,
                                                 gpointer callback_data,
                                                 GtkWidget **first_button);
    void        gimp_enum_stock_box_set_child_padding
                                                (GtkWidget *stock_box,
                                                 gint xpad,
                                                 gint ypad);

## Description

## Details

### gimp_enum_radio_box_new ()

    GtkWidget*  gimp_enum_radio_box_new         (GType enum_type,
                                                 GCallback callback,
                                                 gpointer callback_data,
                                                 GtkWidget **first_button);

Creates a new group of GtkRadioButtons representing the enum values. A group of radiobuttons is a good way to represent enums with up to three or four values. Often it is better to use a GimpEnumComboBox instead.

`enum_type` : | the GType of an enum.
`callback` : | a callback to connect to the "toggled" signal of each GtkRadioButton that is created.
`callback_data` : | data to pass to the `callback`.
`first_button` : | returns the first button in the created group.
Returns : | a new GtkVBox holding a group of GtkRadioButtons.

Since GIMP 2.4

### gimp_enum_radio_box_new_with_range ()

    GtkWidget*  gimp_enum_radio_box_new_with_range
                                                (GType enum_type,
                                                 gint minimum,
                                                 gint maximum,
                                                 GCallback callback,
                                                 gpointer callback_data,
                                                 GtkWidget **first_button);

Just like `gimp_enum_radio_box_new()`, this function creates a group of radio buttons, but it allows to limit the range of available enum values.

`enum_type` : | the GType of an enum.
`minimum` : |
`maximum` : |
`callback` : | a callback to connect to the "toggled" signal of each GtkRadioButton that is created.
`callback_data` : | data to pass to the `callback`.
`first_button` : | returns the first button in the created group.
Returns : | a new GtkVBox holding a group of GtkRadioButtons.

Since GIMP 2.4

### gimp_enum_radio_frame_new ()

    GtkWidget*  gimp_enum_radio_frame_new       (GType enum_type,
                                                 GtkWidget *label_widget,
                                                 GCallback callback,
                                                 gpointer callback_data,
                                                 GtkWidget **first_button);

Calls `gimp_enum_radio_box_new()` and puts the resulting vbox into a GtkFrame.

`enum_type` : | the GType of an enum.
`label_widget` : | a widget to use as label for the frame that will hold the radio box.
`callback` : | a callback to connect to the "toggled" signal of each GtkRadioButton that is created.
`callback_data` : | data to pass to the `callback`.
`first_button` : | returns the first button in the created group.
Returns : | a new GtkFrame holding a group of GtkRadioButtons.

Since GIMP 2.4

### gimp_enum_radio_frame_new_with_range ()

    GtkWidget*  gimp_enum_radio_frame_new_with_range
                                                (GType enum_type,
                                                 gint minimum,
                                                 gint maximum,
                                                 GtkWidget *label_widget,
                                                 GCallback callback,
                                                 gpointer callback_data,
                                                 GtkWidget **first_button);

Calls `gimp_enum_radio_box_new_with_range()` and puts the resulting vbox into a GtkFrame.

`enum_type` : | the GType of an enum.
`minimum` : |
`maximum` : |
`label_widget` : | a widget to put into the frame that will hold the radio box.
`callback` : | a callback to connect to the "toggled" signal of each GtkRadioButton that is created.
`callback_data` : | data to pass to the `callback`.
`first_button` : | returns the first button in the created group.
Returns : | a new GtkFrame holding a group of GtkRadioButtons.

Since GIMP 2.4

### gimp_enum_stock_box_new ()

    GtkWidget*  gimp_enum_stock_box_new         (GType enum_type,
                                                 const gchar *stock_prefix,
                                                 GtkIconSize icon_size,
                                                 GCallback callback,
                                                 gpointer callback_data,
                                                 GtkWidget **first_button);

Creates a horizontal box of radio buttons with stock icons. The stock_id for each icon is created by appending the enum_value's nick to the given `stock_prefix`.

`enum_type` : | the GType of an enum.
`stock_prefix` : | the prefix of the group of stock ids to use.
`icon_size` : |
`callback` : | a callback to connect to the "toggled" signal of each GtkRadioButton that is created.
`callback_data` : | data to pass to the `callback`.
`first_button` : | returns the first button in the created group.
Returns : | a new GtkHbox holding a group of GtkRadioButtons.

Since GIMP 2.4

### gimp_enum_stock_box_new_with_range ()

    GtkWidget*  gimp_enum_stock_box_new_with_range
                                                (GType enum_type,
                                                 gint minimum,
                                                 gint maximum,
                                                 const gchar *stock_prefix,
                                                 GtkIconSize icon_size,
                                                 GCallback callback,
                                                 gpointer callback_data,
                                                 GtkWidget **first_button);

Just like `gimp_enum_stock_box_new()`, this function creates a group of radio buttons, but it allows to limit the range of available enum values.

`enum_type` : | the GType of an enum.
`minimum` : |
`maximum` : |
`stock_prefix` : | the prefix of the group of stock ids to use.
`icon_size` : |
`callback` : | a callback to connect to the "toggled" signal of each GtkRadioButton that is created.
`callback_data` : | data to pass to the `callback`.
`first_button` : | returns the first button in the created group.
Returns : | a new GtkHbox holding a group of GtkRadioButtons.

Since GIMP 2.4

### gimp_enum_stock_box_set_child_padding ()

    void        gimp_enum_stock_box_set_child_padding
                                                (GtkWidget *stock_box,
                                                 gint xpad,
                                                 gint ypad);

Sets the padding of all buttons in a box created by `gimp_enum_stock_box_new()`.

`stock_box` : | a stock box widget
`xpad` : | horizontal padding
`ypad` : | vertical padding

Since GIMP 2.4