GtkOptionMenu

## GtkOptionMenu GtkOptionMenu |

## Functions

GtkWidget * | gtk_option_menu_new ()
GtkWidget * | gtk_option_menu_get_menu ()
void | gtk_option_menu_set_menu ()
void | gtk_option_menu_remove_menu ()
void | gtk_option_menu_set_history ()
gint | gtk_option_menu_get_history ()

## Properties

GtkMenu * | menu | Read / Write

## Style Properties

GtkRequisition * | indicator-size | Read
GtkBorder * | indicator-spacing | Read

## Signals

void | changed | Run Last

## Types and Values

struct | GtkOptionMenu

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkObject
                ╰── GtkWidget
                    ╰── GtkContainer
                        ╰── GtkBin
                            ╰── GtkButton
                                ╰── GtkOptionMenu

## Implemented Interfaces

GtkOptionMenu implements AtkImplementorIface, GtkBuildable and GtkActivatable.

## Includes

    #include <gtk/gtk.h>

## Description

## Functions

### gtk_option_menu_new ()

    GtkWidget *
    gtk_option_menu_new (void);

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

### gtk_option_menu_get_menu ()

    GtkWidget *
    gtk_option_menu_get_menu (GtkOptionMenu *option_menu);

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

### gtk_option_menu_set_menu ()

    void
    gtk_option_menu_set_menu (GtkOptionMenu *option_menu,
                              GtkWidget *menu);

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

### gtk_option_menu_remove_menu ()

    void
    gtk_option_menu_remove_menu (GtkOptionMenu *option_menu);

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

### gtk_option_menu_set_history ()

    void
    gtk_option_menu_set_history (GtkOptionMenu *option_menu,
                                 guint index_);

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

### gtk_option_menu_get_history ()

    gint
    gtk_option_menu_get_history (GtkOptionMenu *option_menu);

`gtk_option_menu_get_history` has been deprecated since version 2.4 and should not be used in newly-written code.

Use GtkComboBox instead.

Retrieves the index of the currently selected menu item. The menu items are numbered from top to bottom, starting with 0.

#### Parameters

option_menu | a GtkOptionMenu |

#### Returns

index of the selected menu item, or -1 if there are no menu items

## Types and Values

### struct GtkOptionMenu

    struct GtkOptionMenu;

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

## Property Details

### The `“menu”` property

      “menu”                     GtkMenu *

The menu of options.

Flags: Read / Write

## Style Property Details

### The `“indicator-size”` style property

      “indicator-size”           GtkRequisition *

Size of dropdown indicator.

Flags: Read

### The `“indicator-spacing”` style property

      “indicator-spacing”        GtkBorder *

Spacing around indicator.

Flags: Read

## Signal Details

### The `“changed”` signal

    void
    user_function (GtkOptionMenu *optionmenu,
                   gpointer       user_data)

Flags: Run Last