WMENU_CREATE(3W)
Series 300 and 500 Only
NAME
wmenu_create − create a menu
SYNOPSIS
#include <window.h>
int wmenu_create (fd, cbits, button_mask, parent_menuid, parent_item)
int fd;
int cbits;
int button_mask;
int parent_menuid, parent_item;
DESCRIPTION
fd is the file descriptor of the window for which the menu is to be created.
cbits control bits, see window.h for supported options.
button_mask
the enabling mask for the start of a menu and the selection of an item within the menu. The lower byte represents the start menu enable mask where 0x7F are buttons 1-7, button one being the least significant bit, and 0x80 enables the Select key. Likewise the byte above that represents the select item enable mask where 0x7F00 are buttons 1-7, button one being the least significant bit, and 0x8000 enables the Select key.
parent_menuid
menu id of the parent menu to this one. MENU_NOPARENT, from window.h, indicates there is no parent menu. At this time, parent menus are NOT supported, so always use MENU_NOPARENT.
parent_item
item id of the parent item within the parent menu. Always use MENU_NOPARENT, from window.h, for this parameter.
DISCUSSION
This routine creates a user-defined pop-up menu according to the parameters described above. It returns as its value the id of the created menu.
SEE ALSO
wmenu_activate(3W), wmenu_delete(3W), wmenu_eventread(3W), wmenu_item(3W).
DIAGNOSTICS
If any of the following conditions occur, -1 is returned; otherwise 0 is returned:
∗ fd is invalid
∗ there are no buttons enabled for selecting an item
∗ parent_menuid is anything greater than -1
∗ no more menus can be created.
See errno(2) for further information.
Hewlett-Packard Company — May 11, 2021