## gimpmenu

gimpmenu — Menus for selecting images, layers, channels and drawables.

## Synopsis

    gboolean            (*GimpConstraintFunc)               (gint32 image_id,
                                                             gint32 drawable_id,
                                                             gpointer data);
    void                (*GimpMenuCallback)                 (gint32 any_id,
                                                             gpointer data);
    GtkWidget *         gimp_image_menu_new                 (GimpConstraintFunc constraint,
                                                             GimpMenuCallback callback,
                                                             gpointer data,
                                                             gint32 active_image);
    GtkWidget *         gimp_layer_menu_new                 (GimpConstraintFunc constraint,
                                                             GimpMenuCallback callback,
                                                             gpointer data,
                                                             gint32 active_layer);
    GtkWidget *         gimp_channel_menu_new               (GimpConstraintFunc constraint,
                                                             GimpMenuCallback callback,
                                                             gpointer data,
                                                             gint32 active_channel);
    GtkWidget *         gimp_drawable_menu_new              (GimpConstraintFunc constraint,
                                                             GimpMenuCallback callback,
                                                             gpointer data,
                                                             gint32 active_drawable);

## Description

Menus for selecting images, layers, channels and drawables.

## Details

### GimpConstraintFunc ()

    gboolean            (*GimpConstraintFunc)               (gint32 image_id,
                                                             gint32 drawable_id,
                                                             gpointer data);

### Warning

`GimpConstraintFunc` is deprecated and should not be used in newly-written code.

### GimpMenuCallback ()

    void                (*GimpMenuCallback)                 (gint32 any_id,
                                                             gpointer data);

### Warning

`GimpMenuCallback` is deprecated and should not be used in newly-written code.

### gimp_image_menu_new ()

    GtkWidget *         gimp_image_menu_new                 (GimpConstraintFunc constraint,
                                                             GimpMenuCallback callback,
                                                             gpointer data,
                                                             gint32 active_image);

### Warning

`gimp_image_menu_new` is deprecated and should not be used in newly-written code. Use `gimp_image_combo_box_new()` instead.

`constraint` : | a function to filter the menu contents
`callback` : | the callback to call when an image is selected
`data` : | the callback's user_data
`active_image` : | an image to preselect
Returns : | the image menu.

### gimp_layer_menu_new ()

    GtkWidget *         gimp_layer_menu_new                 (GimpConstraintFunc constraint,
                                                             GimpMenuCallback callback,
                                                             gpointer data,
                                                             gint32 active_layer);

### Warning

`gimp_layer_menu_new` is deprecated and should not be used in newly-written code. Use `gimp_layer_combo_box_new()` instead.

`constraint` : | a function to filter the menu contents
`callback` : | the callback to call when a channel is selected
`data` : | the callback's user_data
`active_layer` : | a layer to preselect
Returns : | the layer menu.

### gimp_channel_menu_new ()

    GtkWidget *         gimp_channel_menu_new               (GimpConstraintFunc constraint,
                                                             GimpMenuCallback callback,
                                                             gpointer data,
                                                             gint32 active_channel);

### Warning

`gimp_channel_menu_new` is deprecated and should not be used in newly-written code. Use `gimp_channel_combo_box_new()` instead.

`constraint` : | a function to filter the menu contents
`callback` : | the callback to call when a channel is selected
`data` : | the callback's user_data
`active_channel` : | a channel to preselect
Returns : | the channel menu.

### gimp_drawable_menu_new ()

    GtkWidget *         gimp_drawable_menu_new              (GimpConstraintFunc constraint,
                                                             GimpMenuCallback callback,
                                                             gpointer data,
                                                             gint32 active_drawable);

### Warning

`gimp_drawable_menu_new` is deprecated and should not be used in newly-written code. Use `gimp_drawable_combo_box_new()` instead.

`constraint` : | a function to filter the menu contents
`callback` : | the callback to call when a channel is selected
`data` : | the callback's user_data
`active_drawable` : | a drawable to preselect
Returns : | the drawable menu.