Name

struct _EPopupItem — A popup menu item definition.

Synopsis

struct _EPopupItem {
  enum _e_popup_t type;
  char * path;
  char * label;
  EPopupActivateFunc activate;
  void * user_data;
  void * image;
  guint32 visible;
  guint32 enable;
};  

Members

type

The type of the popup. See the &enum _epopup_t definition for possible values.

path

An absolute path, which when sorted using a simple ASCII sort, will put the menu item in the right place in the menu heirarchy. '/' is used to separate menus from submenu items.

label

The text of the menyu item.

activate

A function conforming to &EPopupActivateFunc which will be called when the menu item is activated.

user_data

Extra per-item user-data available to the application. This is not passed to the data field of activate.

image

For most types, the name of the icon in the icon theme to display next to the menu item, if required. For the E_POPUP_IMAGE type, it is a pointer to the &GtkWidget instead.

visible

Visibility mask. Used together with the &EPopupTarget mask to determine if the item should be part of the menu or not.

enable

Sensitivity mask. Similar to the visibility mask, but currently unimplemented.

Description

The EPopupItem defines a single popup menu item, or submenu item, or menu separator based on the type. Any number of these are merged at popup display type to form the popup menu.

The application may extend this structure using simple C structure containers to add any additional fields it may require.