## NemoMenu

NemoMenu — A menu added to Nemo's context menus by an extension

## Functions

NemoMenu * | nemo_menu_new ()
void | nemo_menu_append_item ()
GList * | nemo_menu_get_items ()
void | nemo_menu_item_list_free ()
NemoMenuItem * | nemo_menu_item_new ()
void | nemo_menu_item_activate ()
void | nemo_menu_item_set_submenu ()

## Properties

char * | icon | Read / Write
char * | label | Read / Write
NemoMenu * | menu | Read / Write
char * | name | Read / Write / Construct Only
gboolean | priority | Read / Write
gboolean | sensitive | Read / Write
gboolean | separator | Read / Write
char * | tip | Read / Write
GtkWidget * | widget-a | Read / Write
GtkWidget * | widget-b | Read / Write

## Signals

void | activate | Run Last

## Types and Values

#define | NEMO_TYPE_MENU_ITEM
| NemoMenu
| NemoMenuItem

## Object Hierarchy

        GObject
        ├── NemoMenu
        ╰── NemoMenuItem

## Description

Menu items and submenus can be added to Nemo's selected item and background context menus by a NemoMenuProvider. Separators and embedded widgets are also possible (see NemoSimpleButton.)

## Functions

### nemo_menu_new ()

    NemoMenu *
    nemo_menu_new (void);

### nemo_menu_append_item ()

    void
    nemo_menu_append_item (NemoMenu *menu,
                           NemoMenuItem *item);

### nemo_menu_get_items ()

    GList *
    nemo_menu_get_items (NemoMenu *menu);

#### Parameters

menu | a NemoMenu |

#### Returns

the provided NemoMenuItem list.

[element-type NemoMenuItem][transfer full]

### nemo_menu_item_list_free ()

    void
    nemo_menu_item_list_free (GList *item_list);

#### Parameters

item_list | a list of NemoMenuItem. | [element-type NemoMenuItem]

### nemo_menu_item_new ()

    NemoMenuItem *
    nemo_menu_item_new (const char *name,
                        const char *label,
                        const char *tip,
                        const char *icon);

Creates a new menu item that can be added to the toolbar or to a contextual menu.

#### Parameters

name | the identifier for the menu item |
label | the user-visible label of the menu item |
tip | the tooltip of the menu item |
icon | the name of the icon to display in the menu item |

#### Returns

a newly create NemoMenuItem

### nemo_menu_item_activate ()

    void
    nemo_menu_item_activate (NemoMenuItem *item);

emits the activate signal.

#### Parameters

item | pointer to a NemoMenuItem |

### nemo_menu_item_set_submenu ()

    void
    nemo_menu_item_set_submenu (NemoMenuItem *item,
                                NemoMenu *menu);

Attachs a menu to the given NemoMenuItem.

#### Parameters

item | pointer to a NemoMenuItem |
menu | pointer to a NemoMenu to attach to the button |

## Types and Values

### NEMO_TYPE_MENU_ITEM

    #define NEMO_TYPE_MENU_ITEM    nemo_menu_item_get_type()

### NemoMenu

    typedef struct _NemoMenu NemoMenu;

### NemoMenuItem

    typedef struct _NemoMenuItem NemoMenuItem;

## Property Details

### The `“icon”` property

      “icon”                     char *

Name of the icon to display in the menu item.

Owner: NemoMenuItem

Flags: Read / Write

Default value: NULL

### The `“label”` property

      “label”                    char *

Label to display to the user.

Owner: NemoMenuItem

Flags: Read / Write

Default value: NULL

### The `“menu”` property

      “menu”                     NemoMenu *

The menu belonging to this item. May be null.

Owner: NemoMenuItem

Flags: Read / Write

### The `“name”` property

      “name”                     char *

Name of the item.

Owner: NemoMenuItem

Flags: Read / Write / Construct Only

Default value: NULL

### The `“priority”` property

      “priority”                 gboolean

Show priority text in toolbars.

Owner: NemoMenuItem

Flags: Read / Write

Default value: TRUE

### The `“sensitive”` property

      “sensitive”                gboolean

Whether the menu item is sensitive.

Owner: NemoMenuItem

Flags: Read / Write

Default value: TRUE

### The `“separator”` property

      “separator”                gboolean

Is a separator.

Owner: NemoMenuItem

Flags: Read / Write

Default value: FALSE

### The `“tip”` property

      “tip”                      char *

Tooltip for the menu item.

Owner: NemoMenuItem

Flags: Read / Write

Default value: NULL

### The `“widget-a”` property

      “widget-a”                 GtkWidget *

The custom widget to use in place of text.

Owner: NemoMenuItem

Flags: Read / Write

### The `“widget-b”` property

      “widget-b”                 GtkWidget *

The custom widget to use in place of text.

Owner: NemoMenuItem

Flags: Read / Write

## Signal Details

### The `“activate”` signal

    void
    user_function (NemoMenuItem *nemomenuitem,
                   gpointer      user_data)

Flags: Run Last