DESIGN (kwidgets) functions
LIBRARY ROUTINE
xvw_create_menu - create a toolbox menu object Routine Name: xvw_create_menu - create menu GUI object
LIBRARY CALL
xvobject xvw_create_menu(
xvobject parent,
char *name)
INPUT
- parent - parent of the menu object
- name - a name for this particular instance of the menu
object (for use in app-defaults files, etc)
OUTPUT
none
RETURN VALUE
The menu GUI object on success, NULL on failure.
DESCRIPTION
The menu GUI object is the menu which is associated
with a button n which the user can click to pull down a menu
of items; holding the mouse button down, the user may select
an item from the menu. Items in the menu may be button
objects or label objects. Button object items in the
menu will be highlighted when the user moves the pointer over
them. If the mouse button is released with the pointer over
a button in the menu when that button has a callback installed,* the button callback will be fired normally.
It is important to understand that the menubutton GUI
object is a compound object. That is, there are actually
two objects created: the menubutton and the menu itself, where
the menubutton is the button that appears on the GUI,
and the menu is what pops up when the user clicks on the
menubutton.
When you create a menubutton object, the GUI object returned
is the button; this object should be referenced when
setting geometry, relative offset, and so on. Attributes
such as label, width, and height may also be set on the
menubutton.
However, in order to add buttons and labels to the pulldown
menu, you will to call xvw_create_button() and
xvw_create_label() with the menu (not the
menubutton) as the parent. The actual menu component
of the compound menubutton object can be obtained with:
xvw_get_attribute(menubutton, XVW_MENUBUTTON_MENU, &menu);
ADDITIONAL INFORMATION
none
EXAMPLES
none
SIDE EFFECTS
none
RESTRICTIONS
none
MODIFICATION
none
FILES
$DESIGN/objects/library/kwidgets/src/Menu.c
SEE ALSO
kwidgets(3)
COPYRIGHT
Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.