You may return to the Cvo Object Documenation Index from this document. This document contains the following sections describing the Cvo_ButtonMenu object:
Cvo_ButtonMenu
Cvo_MenuLabel
#include
<Cvo/ButtonMenu.h++>
new
Cvo_ButtonMenu ( char *resource_name,
{ Cvo_Object *parent | Display *display },
Cvo_MenuItem *menu,
[ Cvo_MenuBar *menu_bar ] )
A Cvo_ButtonMenu object creates a button, which when pressed, causes
a Cvo_Menu to appear directly below it. The contents of the menu are
initially defined by the menu argument, a NULL
terminated
array of Cvo_MenuItem objects. The Cvo_Menu object will be
constructed with the menu argument. The menu_bar argument is
used to indicate that this Cvo_ButtonMenu object is actually located
on the specified Cvo_MenuBar.
See the parent object, Cvo_MenuLabel, for information on setting the label text for this button, via member functions and X resource values.
This object defines the following member functions in addition to those defined by its parent and ancestor objects.
This function returns the Cvo_Menu object which is associated with this object.
Cvo_MenuBar *Bar (
)
This function returns the Cvo_MenuBar object which is associated with this object.
Accelerate (
)
This function will cause the Cvo_ButtonMenu object to create an
accelerator for displaying the Cvo_Menu associated with this
object. The accelerator key is specified in the label
X resource
for this object. It is actually the quick key, which is set as
described in the documentation for the parent object, Cvo_MenuLabel.
The quick key will be combined with a modifier key to construct an
accelerator. The modifier key will be one of the following:
Alt
Meta
Super
Hyper
CTRL
At run-time, Cvo will search for the first modifier from that list which is valid, and use it to construct the accelerator.
This object defines the following Cvo Events in addition to those defined by its parent and ancestor objects.
CvoButtonUpEvent
struct
Cvo_ButtonUpEvent
CvoButtonDownEvent
struct
Cvo_ButtonDownEvent
Documentation on these events is available in the Cvo_BasicButton object documentation.
This object defines the following event translations in addition to those defined by its parent and ancestor objects.
<ButtonPress>
:
Press()
This translation causes a CvoButtonDownEvent
event to be sent,
and the button to appear as raised.
<ButtonRelease>
:
Release()
This translation causes a CvoButtonUpEvent
event to be sent,
and the button to appear as not raised.
This object modifies the following X resources which are used by its parent or other ancestors.
*CvoButtonMenu.Cursor
(new value:
Top Left Arrow
)
*CvoButtonMenu.Pad
(new value:
2
)
*CvoButtonMenu.BorderWidth
(new value:
0
)
*CvoButtonMenu.FontWeight
(new value:
Bold
)
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.