## gimpdrawablecombobox

gimpdrawablecombobox — A widget providing a popup menu of drawables.

## Synopsis

                GimpDrawableComboBox;
    gboolean    (*GimpDrawableConstraintFunc)   (gint32 image_id,
                                                 gint32 drawable_id,
                                                 gpointer data);
    GtkWidget*  gimp_drawable_combo_box_new     (GimpDrawableConstraintFunc constraint,
                                                 gpointer data);
                GimpChannelComboBox;
    GtkWidget*  gimp_channel_combo_box_new      (GimpDrawableConstraintFunc constraint,
                                                 gpointer data);
                GimpLayerComboBox;
    GtkWidget*  gimp_layer_combo_box_new        (GimpDrawableConstraintFunc constraint,
                                                 gpointer data);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkObject
                   +----GtkWidget
                         +----GtkContainer
                               +----GtkBin
                                     +----GtkComboBox
                                           +----GimpIntComboBox
                                                 +----GimpDrawableComboBox

      GObject
       +----GInitiallyUnowned
             +----GtkObject
                   +----GtkWidget
                         +----GtkContainer
                               +----GtkBin
                                     +----GtkComboBox
                                           +----GimpIntComboBox
                                                 +----GimpChannelComboBox

      GObject
       +----GInitiallyUnowned
             +----GtkObject
                   +----GtkWidget
                         +----GtkContainer
                               +----GtkBin
                                     +----GtkComboBox
                                           +----GimpIntComboBox
                                                 +----GimpLayerComboBox

## Implemented Interfaces

GimpDrawableComboBox implements AtkImplementorIface, GtkCellLayout and GtkCellEditable.

GimpChannelComboBox implements AtkImplementorIface, GtkCellLayout and GtkCellEditable.

GimpLayerComboBox implements AtkImplementorIface, GtkCellLayout and GtkCellEditable.

## Description

A widget providing a popup menu of drawables.

## Details

### GimpDrawableComboBox

    typedef struct _GimpDrawableComboBox GimpDrawableComboBox;

### GimpDrawableConstraintFunc ()

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

`image_id` : |
`drawable_id` : |
`data` : |
Returns : |

### gimp_drawable_combo_box_new ()

    GtkWidget*  gimp_drawable_combo_box_new     (GimpDrawableConstraintFunc constraint,
                                                 gpointer data);

Creates a new GimpIntComboBox filled with all currently opened drawables. If a `constraint` function is specified, it is called for each drawable and only if the function returns `TRUE`, the drawable is added to the combobox.

You should use `gimp_int_combo_box_connect()` to initialize and connect the combo. Use `gimp_int_combo_box_set_active()` to get the active drawable ID and `gimp_int_combo_box_get_active()` to retrieve the ID of the selected drawable.

`constraint` : | a GimpDrawableConstraintFunc or `NULL`
`data` : | a pointer that is passed to `constraint`
Returns : | a new GimpIntComboBox.

Since GIMP 2.2

### GimpChannelComboBox

    typedef struct _GimpChannelComboBox GimpChannelComboBox;

### gimp_channel_combo_box_new ()

    GtkWidget*  gimp_channel_combo_box_new      (GimpDrawableConstraintFunc constraint,
                                                 gpointer data);

Creates a new GimpIntComboBox filled with all currently opened channels. See `gimp_drawable_combo_box()` for more info.

`constraint` : | a GimpDrawableConstraintFunc or `NULL`
`data` : | a pointer that is passed to `constraint`
Returns : | a new GimpIntComboBox.

Since GIMP 2.2

### GimpLayerComboBox

    typedef struct _GimpLayerComboBox GimpLayerComboBox;

### gimp_layer_combo_box_new ()

    GtkWidget*  gimp_layer_combo_box_new        (GimpDrawableConstraintFunc constraint,
                                                 gpointer data);

Creates a new GimpIntComboBox filled with all currently opened layers. See `gimp_drawable_combo_box()` for more info.

`constraint` : | a GimpDrawableConstraintFunc or `NULL`
`data` : | a pointer that is passed to `constraint`
Returns : | a new GimpIntComboBox.

Since GIMP 2.2