GIMP Library Reference Manual
<<< Previous Page | Home | Up | Next Page >>>

# gimpdialog

## Name

gimpdialog -- Constructors for GtkDialog's and action_areas as well as other dialog-related stuff.

## Synopsis

    GtkWidget*  gimp_dialog_new                 (const gchar *title,
                                                 const gchar *wmclass_name,
                                                 GimpHelpFunc help_func,
                                                 const gchar *help_data,
                                                 GtkWindowPosition position,
                                                 gint allow_shrink,
                                                 gint allow_grow,
                                                 gint auto_shrink,
                                                 ...);
    GtkWidget*  gimp_dialog_newv                (const gchar *title,
                                                 const gchar *wmclass_name,
                                                 GimpHelpFunc help_func,
                                                 const gchar *help_data,
                                                 GtkWindowPosition position,
                                                 gint allow_shrink,
                                                 gint allow_grow,
                                                 gint auto_shrink,
                                                 va_list args);
    void        gimp_dialog_set_icon            (GtkWindow *dialog);
    void        gimp_dialog_create_action_area  (GtkDialog *dialog,
                                                 ...);
    void        gimp_dialog_create_action_areav (GtkDialog *dialog,
                                                 va_list args);

## Description

## Details

### gimp_dialog_new ()

    GtkWidget*  gimp_dialog_new                 (const gchar *title,
                                                 const gchar *wmclass_name,
                                                 GimpHelpFunc help_func,
                                                 const gchar *help_data,
                                                 GtkWindowPosition position,
                                                 gint allow_shrink,
                                                 gint allow_grow,
                                                 gint auto_shrink,
                                                 ...);

This function simply packs the action_area arguments passed in "..." into a `va_list` variable and passes everything to gimp_dialog_newv().

For a description of the format of the `va_list` describing the action_area buttons see gimp_dialog_create_action_areav().

`title` : | The dialog's title which will be set with gtk_window_set_title().
`wmclass_name` : | The dialog's `wmclass_name` which will be set with gtk_window_set_wmclass(). The `wmclass_class` will be automatically set to "Gimp".
`help_func` : | The function which will be called if the user presses "F1".
`help_data` : | The data pointer which will be passed to `help_func`.
`position` : | The dialog's initial position which will be set with gtk_window_set_position().
`allow_shrink` : | The dialog's `allow_shrink` flag, ...
`allow_grow` : | ... it't `allow_grow` flag and ...
`auto_shrink` : | ... it's `auto_shrink` flag which will all be set with gtk_window_set_policy().
`...` : | A NULL terminated `va_list` destribing the action_area buttons.
Returns : | A GtkDialog.

### gimp_dialog_newv ()

    GtkWidget*  gimp_dialog_newv                (const gchar *title,
                                                 const gchar *wmclass_name,
                                                 GimpHelpFunc help_func,
                                                 const gchar *help_data,
                                                 GtkWindowPosition position,
                                                 gint allow_shrink,
                                                 gint allow_grow,
                                                 gint auto_shrink,
                                                 va_list args);

This function performs all neccessary setps to set up a standard GIMP dialog.

The `va_list` describing the action_area buttons will be passed to gimp_dialog_create_action_areav().

`title` : | The dialog's title which will be set with gtk_window_set_title().
`wmclass_name` : | The dialog's `wmclass_name` which will be set with gtk_window_set_wmclass(). The `wmclass_class` will be automatically set to "Gimp".
`help_func` : | The function which will be called if the user presses "F1".
`help_data` : | The data pointer which will be passed to `help_func`.
`position` : | The dialog's initial position which will be set with gtk_window_set_position().
`allow_shrink` : | The dialog's `allow_shrink` flag, ...
`allow_grow` : | ... it't `allow_grow` flag and ...
`auto_shrink` : | ... it's `auto_shrink` flag which will all be set with gtk_window_set_policy().
`args` : | A `va_list` as obtained with va_start() describing the action_area buttons.
Returns : | A GtkDialog.

### gimp_dialog_set_icon ()

    void        gimp_dialog_set_icon            (GtkWindow *dialog);

This function sets the WM pixmap icon for the dialog which will appear e.g. in GNOME's or KDE's window list.

Note that this function is automatically called by gimp_help_connect_help_accel() which in turn is called by gimp_dialog_newv(), so you only have to call it for GtkWindow's which have no help page (like tear-off menus).

`dialog` : | The GtkWindow you want to set the pixmap icon for.

### gimp_dialog_create_action_area ()

    void        gimp_dialog_create_action_area  (GtkDialog *dialog,
                                                 ...);

This function simply packs the action_area arguments passed in "..." into a `va_list` variable and passes everything to gimp_dialog_create_action_areav().

`dialog` : | The GtkDialog you want to create the action_area for.
`...` : | A NULL terminated `va_list` destribing the action_area buttons.

### gimp_dialog_create_action_areav ()

    void        gimp_dialog_create_action_areav (GtkDialog *dialog,
                                                 va_list args);

The `va_list` describing the action_area GtkButton's has the following format:

gchar *label, | The button's label.
GtkSignalFunc callback, | The callback which will be connected to the button's "clicked" signal
gpointer data, | The callback data which will be used in gtk_signal_connect(). If you pass NULL, then the dialog itself will by passed as `data`.
GtkObject *slot_object, | If you pass a pointer other than NULL, then the button's "clicked" signal will be connected with gtk_signal_connect_object() instead of gtk_signal_connect(). If you want the dialog itself to be the `slot_object`, pass "1".
GtkWidget **widget_ptr, | A pointer to store the created button in.
gboolean default_action, | TRUE if this button should grab the default dialog action with gtk_widget_grab_default().
gboolean connect_delete, | TRUE if the dialog's "delete_event" should be connected to this button's callback. Usually you will connect to the dialog's "Cancel" callback. Note that the callback will be called indirectly, so you don't have to worry about the GdkEvent pointer which comes with the "delete_event", as it will be stripped away before your "Cancel" callback is called.

`dialog` : | The GtkDialog you want to create the action_area for.
`args` : | A `va_list` as obtained with va_start() describing the action_area buttons.

<<< Previous Page | Home | Up | Next Page >>>
GimpUnitMenu | gimpexport