gimpquerybox

Name

gimpquerybox -- Some simple dialogs to enter a single int, double, string or boolean value.

Synopsis



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,
                                             GObject *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,
                                             GObject *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,
                                             GObject *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,
                                             GObject *object,
                                             const gchar *signal,
                                             GimpQuerySizeCallback callback,
                                             gpointer data);
GtkWidget*  gimp_query_boolean_box          (const gchar *title,
                                             GimpHelpFunc help_func,
                                             const gchar *help_data,
                                             const gchar *stock_id,
                                             const gchar *message,
                                             const gchar *true_button,
                                             const gchar *false_button,
                                             GObject *object,
                                             const gchar *signal,
                                             GimpQueryBooleanCallback callback,
                                             gpointer data);

Description

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.

Details

GimpQueryStringCallback ()

void        (*GimpQueryStringCallback)      (GtkWidget *query_box,
                                             gchar *string,
                                             gpointer data);

Note that you have to g_free() the returned string.


GimpQueryIntCallback ()

void        (*GimpQueryIntCallback)         (GtkWidget *query_box,
                                             gint value,
                                             gpointer data);


GimpQueryDoubleCallback ()

void        (*GimpQueryDoubleCallback)      (GtkWidget *query_box,
                                             gdouble value,
                                             gpointer data);


GimpQuerySizeCallback ()

void        (*GimpQuerySizeCallback)        (GtkWidget *query_box,
                                             gdouble size,
                                             GimpUnit unit,
                                             gpointer data);


GimpQueryBooleanCallback ()

void        (*GimpQueryBooleanCallback)     (GtkWidget *query_box,
                                             gboolean value,
                                             gpointer data);


gimp_query_string_box ()

GtkWidget*  gimp_query_string_box           (const gchar *title,
                                             GimpHelpFunc help_func,
                                             const gchar *help_data,
                                             const gchar *message,
                                             const gchar *initial,
                                             GObject *object,
                                             const gchar *signal,
                                             GimpQueryStringCallback callback,
                                             gpointer data);


gimp_query_int_box ()

GtkWidget*  gimp_query_int_box              (const gchar *title,
                                             GimpHelpFunc help_func,
                                             const gchar *help_data,
                                             const gchar *message,
                                             gint initial,
                                             gint lower,
                                             gint upper,
                                             GObject *object,
                                             const gchar *signal,
                                             GimpQueryIntCallback callback,
                                             gpointer data);


gimp_query_double_box ()

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,
                                             GObject *object,
                                             const gchar *signal,
                                             GimpQueryDoubleCallback callback,
                                             gpointer data);


gimp_query_size_box ()

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,
                                             GObject *object,
                                             const gchar *signal,
                                             GimpQuerySizeCallback callback,
                                             gpointer data);


gimp_query_boolean_box ()

GtkWidget*  gimp_query_boolean_box          (const gchar *title,
                                             GimpHelpFunc help_func,
                                             const gchar *help_data,
                                             const gchar *stock_id,
                                             const gchar *message,
                                             const gchar *true_button,
                                             const gchar *false_button,
                                             GObject *object,
                                             const gchar *signal,
                                             GimpQueryBooleanCallback callback,
                                             gpointer data);

See Also

GimpSizeEntry

GimpUnitMenu