![]() |
![]() |
![]() |
GIMP Library Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals |
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);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBox +----GtkHBox +----GimpSelectButton +----GimpBrushSelectButton
GimpBrushSelectButton implements GtkBuildable, AtkImplementorIface and GtkOrientable.
"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
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 of the dialog to use or NULL means to use the default
title.
|
|
Initial brush name or NULL to use current selection.
|
|
Initial opacity. -1 means to use current opacity. |
|
Initial spacing. -1 means to use current spacing. |
|
Initial paint mode. -1 means to use current paint mode. |
Returns : |
A GtkWidget that you can use in your UI. |
Since GIMP 2.4
const gchar * gimp_brush_select_button_get_brush (GimpBrushSelectButton *button, gdouble *opacity, gint *spacing, GimpLayerModeEffects *paint_mode);
Retrieves the properties of currently selected brush.
|
A GimpBrushSelectButton |
|
Opacity of the selected brush. |
|
Spacing of the selected brush. |
|
Paint mode of the selected brush. |
Returns : |
an internal copy of the brush name which must not be freed. |
Since GIMP 2.4
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.
|
A GimpBrushSelectButton |
|
Brush name to set; NULL means no change.
|
|
Opacity to set. -1.0 means no change. |
|
Spacing to set. -1 means no change. |
|
Paint mode to set. -1 means no change. |
Since GIMP 2.4
"brush-name"
property"brush-name" gchar* : Read / Write
The name of the currently selected brush.
Default value: NULL
Since GIMP 2.4
"brush-opacity"
property"brush-opacity" gdouble : Read / Write
The opacity of the currently selected brush.
Allowed values: [-1,100]
Default value: -1
"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
"brush-spacing"
property"brush-spacing" gint : Read / Write
The spacing of the currently selected brush.
Allowed values: [-2147483647,1000]
Default value: -1
"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
"brush-set"
signalvoid 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.
|
the object which received the signal. |
|
the name of the currently selected brush. |
|
opacity of the brush |
|
spacing of the brush |
|
paint mode of the brush |
|
width of the brush |
|
height of the brush |
|
brush mask data |
|
whether the dialog was closed or not. |
|
user data set when the signal handler was connected. |
Since GIMP 2.4