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

Class

Cvo_Menu

Base

Cvo_Window

Syntax

#include <Cvo/Menu.h++>

new Cvo_Menu ( char *resource_name,
{ Cvo_Object *parent | Display *display },
[ Cvo_MenuItem *menu_items ] )

Overview

A Cvo_Menu object is used to produce an array of choices which can be selected with the mouse, quick-keys, or accelerators. While in operation, a menu takes control of the keyboard and mouse, so they really should be transients. Typically a menu is created due to the pressing of a button (see the Cvo_ButtonMenu object) or by pressing a mouse button in some particular area.

Typically a menu is defined by the NULL terminated array of Cvo_MenuItem structures pointed to by menu_items. A list of Cvo_MenuEntry objects is used to store the various items in a menu. The MenuEntries() member function returns this list.

It is also possible to modify menu entries on the fly. The Cvo_MenuEntry object provides methods to add or remove entries from a menu.

Note that in most cases, the parent argument should be Cvo_MAINWINDOW as menus should display as a transient window on the screen.

Member Functions

This object defines the following member functions in addition to those defined by its parent and ancestor objects.

Cvo Events

This object defines the following Cvo Events in addition to those defined by its parent and ancestor objects.

New X Resources

This object uses the following X resources in addition to those used by its parent and ancestor objects.

Modified X Resources

This object modifies the following X resources which are used by its parent or other ancestors.


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.