Baul.MenuItem
Prev | Available Classes | Next

## Baul.MenuItem

Baul.MenuItem — Baul.MenuItem Reference

## Synopsis

    class Baul.MenuItem(gobject.GObject):
        Baul.MenuItem(name, label, tooltip, icon)
        def activate()
        def set_submenu(menu)

## Ancestry

    +-- gobject.GObject
        +-- Baul.MenuItem

## Description

`Baul.MenuItem` objects are appended to lists to create menus and submenus.

## Properties

"icon" | Name of the icon to display in the menu item. Default value: None | Read-Write
"label" | The label to display to the user. Default value: None | Read-Write
"menu" | The Baul.Menu menu object belonging to this item. May be None. | Read-Write
"name" | The name of the item. Default value: None | Read-Write-ConstructOnly
"priority" | Whether or not to show priority text in toolbars. Default value: True | Read-Write
"sensitive" | Whether or not the menu item is sensitive. Default value: True | Read-Write
"tip" | The tooltip for the menu item. Default value: None | Read-Write

## Signals

"activate" | `def callback(`item`, `user_param1`, `...`)`

## Constructor

        Baul.MenuItem(name, label, tooltip, icon)

`name` : | identifier of the item
`label` : | the user-visible label for the item
`tooltip` : | the user-visible tooltip for the item
`icon` : | Name of the icon to display in the item

Creates a new `Baul.MenuItem` object.

## Public Methods

### Baul.MenuItem.activate

        def activate()

Generates the "activate" signal for this `Baul.MenuItem`.

### Baul.MenuItem.set_submenu

        def set_submenu(menu)

`menu` : | a `Baul.Menu`

Attaches a `Baul.Menu` as the submenu for this `Baul.MenuItem`.

## Signal Details

### The "activate" Baul.MenuItem Signal

        def callback(item, user_param1, ...)

`item` : | the `Baul.MenuItem` being activated
`user_param1` : | User-defined parameter the user attaches to the signal connector
`...` : | Additional parameter(s) the user attaches to the signal connector

Emits the "activate" signal.

Prev | Up | Next
Baul.Menu | Home | Baul.PropertyPage