GIMP Library Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
void (*GimpQueryStringCallback) (GtkWidget *query_box, gchar *string, gpointer data); void (*GimpQueryIntCallback) (GtkWidget *query_box, gint value, gpointer data); void (*GimpQueryDoubleCallback) (GtkWidget *query_box, gdouble value, gpointer data); void (*GimpQuerySizeCallback) (GtkWidget *query_box, gdouble size, GimpUnit unit, gpointer data); void (*GimpQueryBooleanCallback) (GtkWidget *query_box, gboolean value, gpointer data); GtkWidget* gimp_query_string_box (const gchar *title, GimpHelpFunc help_func, const gchar *help_data, const gchar *message, const gchar *initial, GtkObject *object, const gchar *signal, GimpQueryStringCallback callback, gpointer data); GtkWidget* gimp_query_int_box (const gchar *title, GimpHelpFunc help_func, const gchar *help_data, const gchar *message, gint initial, gint lower, gint upper, GtkObject *object, const gchar *signal, GimpQueryIntCallback callback, gpointer data); GtkWidget* gimp_query_double_box (const gchar *title, GimpHelpFunc help_func, const gchar *help_data, const gchar *message, gdouble initial, gdouble lower, gdouble upper, gint digits, GtkObject *object, const gchar *signal, GimpQueryDoubleCallback callback, gpointer data); GtkWidget* gimp_query_size_box (const gchar *title, GimpHelpFunc help_func, const gchar *help_data, const gchar *message, gdouble initial, gdouble lower, gdouble upper, gint digits, GimpUnit unit, gdouble resolution, gboolean dot_for_dot, GtkObject *object, const gchar *signal, GimpQuerySizeCallback callback, gpointer data); GtkWidget* gimp_query_boolean_box (const gchar *title, GimpHelpFunc help_func, const gchar *help_data, gboolean eek, const gchar *message, const gchar *true_button, const gchar *false_button, GtkObject *object, const gchar *signal, GimpQueryBooleanCallback callback, gpointer data); |
These functions provide simple dialogs for entering a single string, integer, double, boolean or pixel size value.
They return a pointer to a GtkDialog which has to be shown with gtk_widget_show() by the caller.
The dialogs contain an entry widget for the kind of value they ask for and "OK" and "Cancel" buttons. On "Cancel", all query boxes except the boolean one silently destroy themselves. On "OK" the user defined callback function is called and returns the entered value.
void (*GimpQueryStringCallback) (GtkWidget *query_box, gchar *string, gpointer data); |
Note that you have to g_free() the returned string.
void (*GimpQueryIntCallback) (GtkWidget *query_box, gint value, gpointer data); |
void (*GimpQueryDoubleCallback) (GtkWidget *query_box, gdouble value, gpointer data); |
void (*GimpQuerySizeCallback) (GtkWidget *query_box, gdouble size, GimpUnit unit, gpointer data); |
query_box : | The query box. |
size : | The entered size in pixels. |
unit : | The selected unit from the GimpUnitMenu. |
data : | The user data. |
void (*GimpQueryBooleanCallback) (GtkWidget *query_box, gboolean value, gpointer data); |
GtkWidget* gimp_query_string_box (const gchar *title, GimpHelpFunc help_func, const gchar *help_data, const gchar *message, const gchar *initial, GtkObject *object, const gchar *signal, GimpQueryStringCallback callback, gpointer data); |
title : | The query box dialog's title. |
help_func : | The help function to show this dialog's help page. |
help_data : | A string pointing to this dialog's html help page. |
message : | A string which will be shown above the dialog's entry widget. |
initial : | The initial value. |
object : | The object this query box is associated with. |
signal : | The object's signal which will cause the query box to be closed. |
callback : | The function which will be called when the user selects "OK". |
data : | The callback's user data. |
Returns : | A pointer to the new GtkDialog. |
GtkWidget* gimp_query_int_box (const gchar *title, GimpHelpFunc help_func, const gchar *help_data, const gchar *message, gint initial, gint lower, gint upper, GtkObject *object, const gchar *signal, GimpQueryIntCallback callback, gpointer data); |
title : | The query box dialog's title. |
help_func : | The help function to show this dialog's help page. |
help_data : | A string pointing to this dialog's html help page. |
message : | A string which will be shown above the dialog's entry widget. |
initial : | The initial value. |
lower : | The lower boundary of the range of possible values. |
upper : | The upper boundray of the range of possible values. |
object : | The object this query box is associated with. |
signal : | The object's signal which will cause the query box to be closed. |
callback : | The function which will be called when the user selects "OK". |
data : | The callback's user data. |
Returns : | A pointer to the new GtkDialog. |
GtkWidget* gimp_query_double_box (const gchar *title, GimpHelpFunc help_func, const gchar *help_data, const gchar *message, gdouble initial, gdouble lower, gdouble upper, gint digits, GtkObject *object, const gchar *signal, GimpQueryDoubleCallback callback, gpointer data); |
title : | The query box dialog's title. |
help_func : | The help function to show this dialog's help page. |
help_data : | A string pointing to this dialog's html help page. |
message : | A string which will be shown above the dialog's entry widget. |
initial : | The initial value. |
lower : | The lower boundary of the range of possible values. |
upper : | The upper boundray of the range of possible values. |
digits : | The number of decimal digits the GtkSpinButton will provide. |
object : | The object this query box is associated with. |
signal : | The object's signal which will cause the query box to be closed. |
callback : | The function which will be called when the user selects "OK". |
data : | The callback's user data. |
Returns : | A pointer to the new GtkDialog. |
GtkWidget* gimp_query_size_box (const gchar *title, GimpHelpFunc help_func, const gchar *help_data, const gchar *message, gdouble initial, gdouble lower, gdouble upper, gint digits, GimpUnit unit, gdouble resolution, gboolean dot_for_dot, GtkObject *object, const gchar *signal, GimpQuerySizeCallback callback, gpointer data); |
title : | The query box dialog's title. |
help_func : | The help function to show this dialog's help page. |
help_data : | A string pointing to this dialog's html help page. |
message : | A string which will be shown above the dialog's entry widget. |
initial : | The initial value. |
lower : | The lower boundary of the range of possible values. |
upper : | The upper boundray of the range of possible values. |
digits : | The number of decimal digits the GimpSizeEntry provide in "pixel" mode. |
unit : | The unit initially shown by the GimpUnitMenu. |
resolution : | The resolution (in dpi) which will be used for pixel/unit calculations. |
dot_for_dot : | TRUE if the GimpUnitMenu's initial unit should be "pixels". |
object : | The object this query box is associated with. |
signal : | The object's signal which will cause the query box to be closed. |
callback : | The function which will be called when the user selects "OK". |
data : | The callback's user data. |
Returns : | A pointer to the new GtkDialog. |
GtkWidget* gimp_query_boolean_box (const gchar *title, GimpHelpFunc help_func, const gchar *help_data, gboolean eek, const gchar *message, const gchar *true_button, const gchar *false_button, GtkObject *object, const gchar *signal, GimpQueryBooleanCallback callback, gpointer data); |
title : | The query box dialog's title. |
help_func : | The help function to show this dialog's help page. |
help_data : | A string pointing to this dialog's html help page. |
eek : | TRUE if you want the "Eek" wilber to appear left of the dialog's message. |
message : | A string which will be shown in the query box. |
true_button : | The string to be shown in the dialog's left button. |
false_button : | The string to be shown in the dialog's right button. |
object : | The object this query box is associated with. |
signal : | The object's signal which will cause the query box to be closed. |
callback : | The function which will be called when the user clicks one of the buttons. |
data : | The callback's user data. |
Returns : | A pointer to the new GtkDialog. |