gimpbrushselectbutton

gimpbrushselectbutton — A button that pops up a brush selection dialog.

Functions

Properties

char * brush-name Read / Write
double brush-opacity Read / Write
int brush-paint-mode Read / Write
int brush-spacing Read / Write
char * title Read / Write / Construct Only

Signals

void brush-set Run First

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkObject
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBox
                        ╰── GimpSelectButton
                            ╰── GimpBrushSelectButton

Implemented Interfaces

GimpBrushSelectButton implements AtkImplementorIface, GtkBuildable and GtkOrientable.

Description

A button that pops up a brush selection dialog.

Functions

gimp_brush_select_button_new ()

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

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

Parameters

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: 2.4


gimp_brush_select_button_get_brush ()

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

Retrieves the properties of currently selected brush.

Parameters

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: 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,
                                    GimpLayerMode paint_mode);

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

Parameters

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: 2.4

Types and Values

GimpBrushSelectButton

typedef struct _GimpBrushSelectButton GimpBrushSelectButton;

Property Details

The “brush-name” property

  “brush-name”               char *

The name of the currently selected brush.

Owner: GimpBrushSelectButton

Flags: Read / Write

Default value: NULL

Since: 2.4


The “brush-opacity” property

  “brush-opacity”            double

The opacity of the currently selected brush.

Owner: GimpBrushSelectButton

Flags: Read / Write

Allowed values: [-1,100]

Default value: -1


The “brush-paint-mode” property

  “brush-paint-mode”         int

The paint mode of the currently selected brush.

Owner: GimpBrushSelectButton

Flags: Read / Write

Allowed values: [-1,56]

Default value: -1


The “brush-spacing” property

  “brush-spacing”            int

The spacing of the currently selected brush.

Owner: GimpBrushSelectButton

Flags: Read / Write

Allowed values: [-2147483647,1000]

Default value: -1


The “title” property

  “title”                    char *

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

Owner: GimpBrushSelectButton

Flags: Read / Write / Construct Only

Default value: "Brush Selection"

Since: 2.4

Signal Details

The “brush-set” signal

void
user_function (GimpBrushSelectButton *widget,
               char                  *brush_name,
               double                 opacity,
               int                    spacing,
               int                    paint_mode,
               int                    width,
               int                    height,
               gpointer               mask_data,
               gboolean               dialog_closing,
               gpointer               user_data)

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

Parameters

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.

 

Flags: Run First

Since: 2.4