## GOOptionMenu

GOOptionMenu

## Functions

GtkWidget * | go_option_menu_get_history ()
GtkWidget * | go_option_menu_new ()
GtkWidget * | go_option_menu_build ()
GtkWidget * | go_option_menu_get_label ()
void | go_option_menu_select_item ()
void | go_option_menu_set_history ()
void | go_option_menu_set_menu ()
GtkWidget * | go_option_menu_get_menu ()

## Properties

GtkMenu * | menu | Read / Write

## Signals

void | changed | Run Last

## Types and Values

struct | GOOptionMenu

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBin
                        ╰── GtkButton
                            ╰── GOOptionMenu

## Implemented Interfaces

GOOptionMenu implements AtkImplementorIface, GtkBuildable, GtkActionable and GtkActivatable.

## Description

## Functions

### go_option_menu_get_history ()

    GtkWidget *
    go_option_menu_get_history (GOOptionMenu *option_menu);

Retrieves the currently selected menu item.

#### Parameters

option_menu | a GOOptionMenu |

#### Returns

the selected menu_item.

[transfer none]

### go_option_menu_new ()

    GtkWidget *
    go_option_menu_new (void);

### go_option_menu_build ()

    GtkWidget *
    go_option_menu_build (const char *first_entry,
                          ...);

#### Parameters

first_entry | text for first entry |
... | further values and text |

#### Returns

a new GOOptionMenu with a filled-in menu.

This function takes a `NULL`-terminated list of string-integer pairs and fills in a menu with the given texts. Each menu entry will have a data property "value" sets to the given value. The menu is then placed inside a new GOOptionMenu which is then returned.

[transfer full]

### go_option_menu_get_label ()

    GtkWidget *
    go_option_menu_get_label (GOOptionMenu *option_menu);

#### Parameters

option_menu | GOOptionMenu |

#### Returns

The GtkLabel used for the button text.

[transfer none]

### go_option_menu_select_item ()

    void
    go_option_menu_select_item (GOOptionMenu *option_menu,
                                GtkMenuItem *item);

### go_option_menu_set_history ()

    void
    go_option_menu_set_history (GOOptionMenu *option_menu,
                                GSList *selection);

Selects an item. The last number in the list is the rank of the item to select in its menu and the previous ones are the ranks of the submenus containing the item to select.

#### Parameters

option_menu | GOOptionMenu |
selection | a list of indices giving the menu to select. | [element-type GtkMenuItem]

### go_option_menu_set_menu ()

    void
    go_option_menu_set_menu (GOOptionMenu *option_menu,
                             GtkWidget *menu);

### go_option_menu_get_menu ()

    GtkWidget *
    go_option_menu_get_menu (GOOptionMenu *option_menu);

#### Parameters

option_menu | GOOptionMenu |

#### Returns

The currently set menu.

[transfer none]

## Types and Values

### struct GOOptionMenu

    struct GOOptionMenu;

## Property Details

### The `“menu”` property

      “menu”                     GtkMenu *

The menu of options.

Owner: GOOptionMenu

Flags: Read / Write

## Signal Details

### The `“changed”` signal

    void
    user_function (GOOptionMenu *gooptionmenu,
                   gpointer      user_data)

Flags: Run Last