You may return to the Cvo Object Documenation Index from this document. This document contains the following sections describing the Cvo_MenuEntry object:

Class

Cvo_MenuEntry

Syntax

#include <Cvo/Menu.h++>

new Cvo_MenuEntry ( Cvo_Menu *menu,
Cvo_MenuItem *item,
[ Cvo_MenuEntry *entry ] )
new Cvo_MenuEntry ( Cvo_Menu *menu,
Cvo_Window *label,
[ Cvo_MenuEntry *entry ],
[ Cvo_MenuFunc func, [ void *data ] ],
[ int flags ] )

Overview

This object represents entries in menu objects, such as the Cvo_Menu object. It has two major varieties of construction methods.

The first method shown requires a menu argument, which is the Cvo_Menu object which will contain this entry. The next required argument is item, a pointer to a Cvo_MenuItem object. The Cvo_MenuItem object is a structure containing all the information needed to construct a menu entry. The entry object is optional. If it is provided, it should be a pointer to a Cvo_MenuEntry object on menu, and the new Cvo_MenuEntry object will be placed before it in the display hierarchy.

The second method permits the construction of menu entries which do not display default menu labels. While the first method will create a Cvo_MenuLabel object for the entry, this method allows the user to specify which Cvo object will be displayed on the menu. The first argument, menu, is the Cvo_Menu object which will contain this entry. The next required argument is label, a pointer to a Cvo object derived from Cvo_Window. This Cvo object will be displayed on the menu. The entry object is optional. If it is provided, it should be a pointer to a Cvo_MenuEntry object on menu, and the new Cvo_MenuEntry object will be placed before it in the display hierarchy. The func argument should be an event hander function provided to handle CvoMenuEvent events. It should be of the form void func(Cvo_Object *, XEvent *, void *). The data argument is data which will be passed to the func event handler function. The flags argument should be arguments describing the type of menu entry this is. These menu flags are described in the Cvo_MenuItem object documentation.

To remove an entry from a menu, simply delete the Cvo_MenuEntry object corresponding to that menu entry.

Public Data Members

This object defines the following public data members.

Member Functions

This object defines the following member functions.


See the example source code for an example of how to use this object.


See the legend for information about the conventions used in this documentation.