## gimpoldwidgets

gimpoldwidgets — Old API that is still available but declared as deprecated.

## Synopsis

    GtkWidget*  gimp_int_option_menu_new        (gboolean menu_only,
                                                 GCallback menu_item_callback,
                                                 gpointer menu_item_callback_data,
                                                 gint initial,
                                                 ...);
    void        gimp_int_option_menu_set_history
                                                (GtkOptionMenu *option_menu,
                                                 gint item_data);
    gboolean    (*GimpIntOptionMenuSensitivityCallback)
                                                (gint item_data,
                                                 gpointer callback_data);
    void        gimp_int_option_menu_set_sensitive
                                                (GtkOptionMenu *option_menu,
                                                 GimpIntOptionMenuSensitivityCallback callback,
                                                 gpointer callback_data);
    GtkWidget*  gimp_option_menu_new            (gboolean menu_only,
                                                 ...);
    GtkWidget*  gimp_option_menu_new2           (gboolean menu_only,
                                                 GCallback menu_item_callback,
                                                 gpointer menu_item_callback_data,
                                                 gpointer initial,
                                                 ...);
    void        gimp_option_menu_set_history    (GtkOptionMenu *option_menu,
                                                 gpointer item_data);
    gboolean    (*GimpOptionMenuSensitivityCallback)
                                                (gpointer item_data,
                                                 gpointer callback_data);
    void        gimp_option_menu_set_sensitive  (GtkOptionMenu *option_menu,
                                                 GimpOptionMenuSensitivityCallback callback,
                                                 gpointer callback_data);
    void        gimp_menu_item_update           (GtkWidget *widget,
                                                 gpointer data);

## Description

These functions are not defined if you define GIMP_DISABLE_DEPRECATED.

## Details

### gimp_int_option_menu_new ()

    GtkWidget*  gimp_int_option_menu_new        (gboolean menu_only,
                                                 GCallback menu_item_callback,
                                                 gpointer menu_item_callback_data,
                                                 gint initial,
                                                 ...);

### Warning

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

Convenience function to create a GtkOptionMenu or a GtkMenu. This function does the same thing as the deprecated function `gimp_option_menu_new2()`, but it takes integers as `item_data` instead of pointers, since that is a very common case (mapping an enum to a menu).

`menu_only` : | `TRUE` if the function should return a GtkMenu only.
`menu_item_callback` : | The callback each menu item's "activate" signal will be connected with.
`menu_item_callback_data` : | The data which will be passed to `g_signal_connect()`.
`initial` : | The `item_data` of the initially selected menu item.
`...` : | A `NULL`-terminated `va_list` describing the menu items.
Returns : | A GtkOptionMenu or a GtkMenu (depending on `menu_only`).

### gimp_int_option_menu_set_history ()

    void        gimp_int_option_menu_set_history
                                                (GtkOptionMenu *option_menu,
                                                 gint item_data);

### Warning

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

Iterates over all entries in a GtkOptionMenu and selects the one with the matching `item_data`. Probably only makes sense to use with a GtkOptionMenu that was created using `gimp_int_option_menu_new()`. This function does the same thing as `gimp_option_menu_set_history()`, but takes integers as `item_data` instead of pointers.

`option_menu` : | A GtkOptionMenu as returned by `gimp_int_option_menu_new()`.
`item_data` : | The `item_data` of the menu item you want to select.

### GimpIntOptionMenuSensitivityCallback ()

    gboolean    (*GimpIntOptionMenuSensitivityCallback)
                                                (gint item_data,
                                                 gpointer callback_data);

### Warning

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

`item_data` : |
`callback_data` : |
Returns : |

### gimp_int_option_menu_set_sensitive ()

    void        gimp_int_option_menu_set_sensitive
                                                (GtkOptionMenu *option_menu,
                                                 GimpIntOptionMenuSensitivityCallback callback,
                                                 gpointer callback_data);

### Warning

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

Calls the given `callback` for each item in the menu and passes it the item_data and the `callback_data`. The menu item's sensitivity is set according to the return value of this function. This function does the same thing as `gimp_option_menu_set_sensitive()`, but takes integers as `item_data` instead of pointers.

`option_menu` : | a GtkOptionMenu as returned by `gimp_option_menu_new()` or `gimp_option_menu_new2()`.
`callback` : | a function called for each item in the menu to determine the the sensitivity state.
`callback_data` : | data to pass to the `callback` function.

### gimp_option_menu_new ()

    GtkWidget*  gimp_option_menu_new            (gboolean menu_only,
                                                 ...);

### Warning

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

Convenience function to create a GtkOptionMenu or a GtkMenu.

`menu_only` : | `TRUE` if the function should return a GtkMenu only.
`...` : | A `NULL`-terminated `va_list` describing the menu items.
Returns : | A GtkOptionMenu or a GtkMenu (depending on `menu_only`).

### gimp_option_menu_new2 ()

    GtkWidget*  gimp_option_menu_new2           (gboolean menu_only,
                                                 GCallback menu_item_callback,
                                                 gpointer menu_item_callback_data,
                                                 gpointer initial,
                                                 ...);

### Warning

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

Convenience function to create a GtkOptionMenu or a GtkMenu.

`menu_only` : | `TRUE` if the function should return a GtkMenu only.
`menu_item_callback` : | The callback each menu item's "activate" signal will be connected with.
`menu_item_callback_data` : | The data which will be passed to `g_signal_connect()`.
`initial` : | The `item_data` of the initially selected menu item.
`...` : | A `NULL`-terminated `va_list` describing the menu items.
Returns : | A GtkOptionMenu or a GtkMenu (depending on `menu_only`).

### gimp_option_menu_set_history ()

    void        gimp_option_menu_set_history    (GtkOptionMenu *option_menu,
                                                 gpointer item_data);

### Warning

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

Iterates over all entries in a GtkOptionMenu and selects the one with the matching `item_data`. Probably only makes sense to use with a GtkOptionMenu that was created using `gimp_option_menu_new()` or `gimp_option_menu_new2()`.

`option_menu` : | A GtkOptionMenu as returned by `gimp_option_menu_new()` or `gimp_option_menu_new2()`.
`item_data` : | The `item_data` of the menu item you want to select.

### GimpOptionMenuSensitivityCallback ()

    gboolean    (*GimpOptionMenuSensitivityCallback)
                                                (gpointer item_data,
                                                 gpointer callback_data);

### Warning

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

`item_data` : |
`callback_data` : |
Returns : |

### gimp_option_menu_set_sensitive ()

    void        gimp_option_menu_set_sensitive  (GtkOptionMenu *option_menu,
                                                 GimpOptionMenuSensitivityCallback callback,
                                                 gpointer callback_data);

### Warning

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

Calls the given `callback` for each item in the menu and passes it the item_data and the `callback_data`. The menu item's sensitivity is set according to the return value of this function.

`option_menu` : | a GtkOptionMenu as returned by `gimp_option_menu_new()` or `gimp_option_menu_new2()`.
`callback` : | a function called for each item in the menu to determine the the sensitivity state.
`callback_data` : | data to pass to the `callback` function.

### gimp_menu_item_update ()

    void        gimp_menu_item_update           (GtkWidget *widget,
                                                 gpointer data);

### Warning

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

`widget` : | A GtkMenuItem.
`data` : | A pointer to a gint variable which will store the value of GPOINTER_TO_INT (g_object_get_data (`widget`, "gimp-item-data")).

## See Also

GimpIntComboBox