Top |
GimpWidgetsGimpWidgets — A collection of convenient widget constructors, standard callbacks and helper functions. |
A collection of convenient widget constructors, standard callbacks and helper functions.
GtkWidget * gimp_radio_group_new (gboolean in_frame
,const gchar *frame_title
);
Convenience function to create a group of radio buttons embedded into a GtkFrame or GtkVBox.
GtkWidget * gimp_radio_group_new2 (gboolean in_frame
,const gchar *frame_title
,GCallback radio_button_callback
,gpointer radio_button_callback_data
,gpointer initial
);
Convenience function to create a group of radio buttons embedded into a GtkFrame or GtkVBox.
in_frame |
|
|
frame_title |
The title of the Frame or |
|
radio_button_callback |
The callback each button's "toggled" signal will be connected with. |
|
radio_button_callback_data |
The data which will be passed to |
|
initial |
The |
|
... |
A |
void gimp_radio_group_set_active (GtkRadioButton *radio_button
,gpointer item_data
);
Calls gtk_toggle_button_set_active()
with the radio button that was
created with a matching item_data
.
GtkWidget * gimp_int_radio_group_new (gboolean in_frame
,const gchar *frame_title
,GCallback radio_button_callback
,gpointer radio_button_callback_data
,gint initial
);
Convenience function to create a group of radio buttons embedded into
a GtkFrame or GtkVBox. This function does the same thing as
gimp_radio_group_new2()
, but it takes integers as item_data
instead of
pointers, since that is a very common case (mapping an enum to a radio
group).
in_frame |
|
|
frame_title |
The title of the Frame or |
|
radio_button_callback |
The callback each button's "toggled" signal will be connected with. |
|
radio_button_callback_data |
The data which will be passed to |
|
initial |
The |
|
... |
A |
void gimp_int_radio_group_set_active (GtkRadioButton *radio_button
,gint item_data
);
Calls gtk_toggle_button_set_active()
with the radio button that was created
with a matching item_data
. This function does the same thing as
gimp_radio_group_set_active()
, but takes integers as item_data
instead
of pointers.
GtkWidget * gimp_spin_button_new (GtkObject **adjustment
,gdouble value
,gdouble lower
,gdouble upper
,gdouble step_increment
,gdouble page_increment
,gdouble page_size
,gdouble climb_rate
,guint digits
);
gimp_spin_button_new
has been deprecated since version 2.10 and should not be used in newly-written code.
Use gtk_spin_button_new()
instead.
This function is a shortcut for gtk_adjustment_new()
and a
subsequent gtk_spin_button_new()
. It also calls
gtk_spin_button_set_numeric()
so that non-numeric text cannot be
entered.
adjustment |
Returns the spinbutton's GtkAdjustment. |
|
value |
The initial value of the spinbutton. |
|
lower |
The lower boundary. |
|
upper |
The upper boundary. |
|
step_increment |
The spinbutton's step increment. |
|
page_increment |
The spinbutton's page increment (mouse button 2). |
|
page_size |
Ignored, spin buttons must always have a zero page size. |
|
climb_rate |
The spinbutton's climb rate. |
|
digits |
The spinbutton's number of decimal digits. |
Since: 2.10.10
GtkObject * gimp_scale_entry_new (GtkTable *table
,gint column
,gint row
,const gchar *text
,gint scale_width
,gint spinbutton_width
,gdouble value
,gdouble lower
,gdouble upper
,gdouble step_increment
,gdouble page_increment
,guint digits
,gboolean constrain
,gdouble unconstrained_lower
,gdouble unconstrained_upper
,const gchar *tooltip
,const gchar *help_id
);
This function creates a GtkLabel, a GtkHScale and a GtkSpinButton and attaches them to a 3-column GtkTable.
table |
The GtkTable the widgets will be attached to. |
|
column |
The column to start with. |
|
row |
The row to attach the widgets. |
|
text |
The text for the GtkLabel which will appear left of the GtkHScale. |
|
scale_width |
The minimum horizontal size of the GtkHScale. |
|
spinbutton_width |
The minimum horizontal size of the GtkSpinButton. |
|
value |
The initial value. |
|
lower |
The lower boundary. |
|
upper |
The upper boundary. |
|
step_increment |
The step increment. |
|
page_increment |
The page increment. |
|
digits |
The number of decimal digits. |
|
constrain |
|
|
unconstrained_lower |
The spinbutton's lower boundary
if |
|
unconstrained_upper |
The spinbutton's upper boundary
if |
|
tooltip |
A tooltip message for the scale and the spinbutton. |
|
help_id |
The widgets' help_id (see |
void gimp_scale_entry_set_sensitive (GtkObject *adjustment
,gboolean sensitive
);
Sets the sensitivity of the scale_entry's GtkLabel, GtkHScale and GtkSpinButton.
adjustment |
a GtkAdjustment returned by |
|
sensitive |
a boolean value with the same semantics as the |
void gimp_scale_entry_set_logarithmic (GtkObject *adjustment
,gboolean logarithmic
);
Sets whether the scale_entry's scale widget will behave in a linear or logharithmic fashion. Useful when an entry has to attend large ranges, but smaller selections on that range require a finer adjustment.
adjustment |
a GtkAdjustment as returned by |
|
logarithmic |
a boolean value to set or reset logarithmic behaviour of the scale widget |
Since: 2.2
gboolean
gimp_scale_entry_get_logarithmic (GtkObject *adjustment
);
TRUE
if the the entry's scale widget will behave in
logharithmic fashion, FALSE
for linear behaviour.
Since: 2.2
GtkObject * gimp_color_scale_entry_new (GtkTable *table
,gint column
,gint row
,const gchar *text
,gint scale_width
,gint spinbutton_width
,gdouble value
,gdouble lower
,gdouble upper
,gdouble step_increment
,gdouble page_increment
,guint digits
,const gchar *tooltip
,const gchar *help_id
);
This function creates a GtkLabel, a GimpColorScale and a GtkSpinButton and attaches them to a 3-column GtkTable.
table |
The GtkTable the widgets will be attached to. |
|
column |
The column to start with. |
|
row |
The row to attach the widgets. |
|
text |
The text for the GtkLabel which will appear left of the GtkHScale. |
|
scale_width |
The minimum horizontal size of the GtkHScale. |
|
spinbutton_width |
The minimum horizontal size of the GtkSpinButton. |
|
value |
The initial value. |
|
lower |
The lower boundary. |
|
upper |
The upper boundary. |
|
step_increment |
The step increment. |
|
page_increment |
The page increment. |
|
digits |
The number of decimal digits. |
|
tooltip |
A tooltip message for the scale and the spinbutton. |
|
help_id |
The widgets' help_id (see |
GtkWidget * gimp_random_seed_new (guint32 *seed
,gboolean *random_seed
);
Creates a widget that allows the user to control how the random number generator is initialized.
GtkWidget * gimp_coordinates_new (GimpUnit unit
,const gchar *unit_format
,gboolean menu_show_pixels
,gboolean menu_show_percent
,gint spinbutton_width
,GimpSizeEntryUpdatePolicy update_policy
,gboolean chainbutton_active
,gboolean chain_constrains_ratio
,const gchar *xlabel
,gdouble x
,gdouble xres
,gdouble lower_boundary_x
,gdouble upper_boundary_x
,gdouble xsize_0
,gdouble xsize_100
,const gchar *ylabel
,gdouble y
,gdouble yres
,gdouble lower_boundary_y
,gdouble upper_boundary_y
,gdouble ysize_0
,gdouble ysize_100
);
Convenience function that creates a GimpSizeEntry with two fields for x/y coordinates/sizes with a GimpChainButton attached to constrain either the two fields' values or the ratio between them.
unit |
The initial unit of the GimpUnitMenu. |
|
unit_format |
A printf-like unit-format string as is used with
|
|
menu_show_pixels |
|
|
menu_show_percent |
|
|
spinbutton_width |
The horizontal size of the GimpSizeEntry's GtkSpinButton's. |
|
update_policy |
The update policy for the GimpSizeEntry. |
|
chainbutton_active |
|
|
chain_constrains_ratio |
|
|
xlabel |
The label for the X coordinate. |
|
x |
The initial value of the X coordinate. |
|
xres |
The horizontal resolution in DPI. |
|
lower_boundary_x |
The lower boundary of the X coordinate. |
|
upper_boundary_x |
The upper boundary of the X coordinate. |
|
xsize_0 |
The X value which will be treated as 0%. |
|
xsize_100 |
The X value which will be treated as 100%. |
|
ylabel |
The label for the Y coordinate. |
|
y |
The initial value of the Y coordinate. |
|
yres |
The vertical resolution in DPI. |
|
lower_boundary_y |
The lower boundary of the Y coordinate. |
|
upper_boundary_y |
The upper boundary of the Y coordinate. |
|
ysize_0 |
The Y value which will be treated as 0%. |
|
ysize_100 |
The Y value which will be treated as 100%. |
void gimp_toggle_button_update (GtkWidget *widget
,gpointer data
);
Note that this function calls gimp_toggle_button_sensitive_update()
which is a deprecated hack you shouldn't use. See that function's
documentation for a proper replacement of its functionality.
void gimp_radio_button_update (GtkWidget *widget
,gpointer data
);
Note that this function calls gimp_toggle_button_sensitive_update()
which is a deprecated hack you shouldn't use. See that function's
documentation for a proper replacement of its functionality.
void gimp_int_adjustment_update (GtkAdjustment *adjustment
,gpointer data
);
Note that the GtkAdjustment's value (which is a gdouble) will be
rounded with RINT()
.
void gimp_uint_adjustment_update (GtkAdjustment *adjustment
,gpointer data
);
Note that the GtkAdjustment's value (which is a gdouble) will be rounded with (guint) (value + 0.5).
void gimp_float_adjustment_update (GtkAdjustment *adjustment
,gpointer data
);
void gimp_double_adjustment_update (GtkAdjustment *adjustment
,gpointer data
);
GQuark
gimp_widgets_error_quark (void
);
This function is never called directly. Use GIMP_WIDGETS_ERROR()
instead.
#define GIMP_WIDGETS_ERROR (gimp_widgets_error_quark ())
The GIMP widgets error domain.
Since: 2.8