## GimpBrushSelectButton GimpBrushSelectButton |

## Synopsis

                        GimpBrushSelectButton;
    GtkWidget*          gimp_brush_select_button_new        (const gchar *title,
                                                             const gchar *brush_name,
                                                             gdouble opacity,
                                                             gint spacing,
                                                             GimpLayerModeEffects paint_mode);
    const  gchar*       gimp_brush_select_button_get_brush  (GimpBrushSelectButton *button,
                                                             gdouble *opacity,
                                                             gint *spacing,
                                                             GimpLayerModeEffects *paint_mode);
    void                gimp_brush_select_button_set_brush  (GimpBrushSelectButton *button,
                                                             const gchar *brush_name,
                                                             gdouble opacity,
                                                             gint spacing,
                                                             GimpLayerModeEffects paint_mode);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkObject
                   +----GtkWidget
                         +----GtkContainer
                               +----GtkBox
                                     +----GtkHBox
                                           +----GimpSelectButton
                                                 +----GimpBrushSelectButton

## Implemented Interfaces

GimpBrushSelectButton implements AtkImplementorIface and GtkBuildable.

## Properties

      "brush-name"               gchar*                : Read / Write
      "brush-opacity"            gdouble               : Read / Write
      "brush-paint-mode"         gint                  : Read / Write
      "brush-spacing"            gint                  : Read / Write
      "title"                    gchar*                : Read / Write / Construct Only

## Signals

      "brush-set"                                      : Run First

## Description

## Details

### GimpBrushSelectButton

    typedef struct _GimpBrushSelectButton GimpBrushSelectButton;

### gimp_brush_select_button_new ()

    GtkWidget*          gimp_brush_select_button_new        (const gchar *title,
                                                             const gchar *brush_name,
                                                             gdouble opacity,
                                                             gint spacing,
                                                             GimpLayerModeEffects paint_mode);

Creates a new GtkWidget that completely controls the selection of a GimpBrush. This widget is suitable for placement in a table in a plug-in dialog.

`title` : | Title of the dialog to use or `NULL` means to use the default title.
`brush_name` : | Initial brush name or `NULL` to use current selection.
`opacity` : | Initial opacity. -1 means to use current opacity.
`spacing` : | Initial spacing. -1 means to use current spacing.
`paint_mode` : | Initial paint mode. -1 means to use current paint mode.
Returns : | A GtkWidget that you can use in your UI.

Since GIMP 2.4

### gimp_brush_select_button_get_brush ()

    const  gchar*       gimp_brush_select_button_get_brush  (GimpBrushSelectButton *button,
                                                             gdouble *opacity,
                                                             gint *spacing,
                                                             GimpLayerModeEffects *paint_mode);

Retrieves the properties of currently selected brush.

`button` : | A GimpBrushSelectButton
`opacity` : | Opacity of the selected brush.
`spacing` : | Spacing of the selected brush.
`paint_mode` : | Paint mode of the selected brush.
Returns : | an internal copy of the brush name which must not be freed.

Since GIMP 2.4

### gimp_brush_select_button_set_brush ()

    void                gimp_brush_select_button_set_brush  (GimpBrushSelectButton *button,
                                                             const gchar *brush_name,
                                                             gdouble opacity,
                                                             gint spacing,
                                                             GimpLayerModeEffects paint_mode);

Sets the current brush and other values for the brush select button.

`button` : | A GimpBrushSelectButton
`brush_name` : | Brush name to set; `NULL` means no change.
`opacity` : | Opacity to set. -1.0 means no change.
`spacing` : | Spacing to set. -1 means no change.
`paint_mode` : | Paint mode to set. -1 means no change.

Since GIMP 2.4

## Property Details

### The `"brush-name"` property

      "brush-name"               gchar*                : Read / Write

The name of the currently selected brush.

Default value: NULL

Since GIMP 2.4

### The `"brush-opacity"` property

      "brush-opacity"            gdouble               : Read / Write

The opacity of the currently selected brush.

Allowed values: [-1,100]

Default value: -1

### The `"brush-paint-mode"` property

      "brush-paint-mode"         gint                  : Read / Write

The paint mode of the currently selected brush.

Allowed values: [-1,22]

Default value: -1

### The `"brush-spacing"` property

      "brush-spacing"            gint                  : Read / Write

The spacing of the currently selected brush.

Allowed values: [-2147483647,1000]

Default value: -1

### The `"title"` property

      "title"                    gchar*                : Read / Write / Construct Only

The title to be used for the brush selection popup dialog.

Default value: "Brush Selection"

Since GIMP 2.4

## Signal Details

### The `"brush-set"` signal

    void                user_function                      (GimpBrushSelectButton *widget,
                                                            gchar                 *brush_name,
                                                            gdouble                opacity,
                                                            gint                   spacing,
                                                            gint                   paint_mode,
                                                            gint                   width,
                                                            gint                   height,
                                                            gpointer               mask_data,
                                                            gboolean               dialog_closing,
                                                            gpointer               user_data)           : Run First

The ::brush-set signal is emitted when the user selects a brush.

`widget` : | the object which received the signal.
`brush_name` : | the name of the currently selected brush.
`opacity` : | opacity of the brush
`spacing` : | spacing of the brush
`paint_mode` : | paint mode of the brush
`width` : | width of the brush
`height` : | height of the brush
`mask_data` : | brush mask data
`dialog_closing` : | whether the dialog was closed or not.
`user_data` : | user data set when the signal handler was connected.

Since GIMP 2.4