VSelectMenuItem


 
Name
  VSelectMenuItem - selects a command in the 3DVIEWNIX menu.
 
Synopsis
  VSelectMenuItem(cmd)
  char cmd[30];                         /*RETURN*/
 
Description
  VSelectMenuItem selects a command in the 3DVIEWNIX menu - both vertical
and horizontal. If the cursor is within the vertical or horizontal menu area,
and the left/middle button is pressed, the selected menu item is highlighted
and VSelectMenuItem returns the string of command selected into *cmd; else
VSelectMenuItem waits for a valid action to happen. If the menu item is
selected, the vertical menu is removed from the image window if it is on,
the horizontal menu below the current one is erased, and the communication
file MENU.COM is updated. VSelectEvents should be called to select
ButtonPress events in the image window. VReadMenucomFile should be called
after VSelectMenuItem to obtain the names of the process or function 
associated with the current command.
 
Return Value
  0 - work successfully.
  1 - memory allocation error.
  2 - read error.
  3 - write error.
  4 - cannot open MENU.COM file.
  251 - no menu is displayed in the image window.
 
Parameters
  cmd - the string of command selected from the menu.
 
Side Effects
  VSelectMenuItem displays the new chain of cammands in the title window.
Extraneous events will be removed from the queue.
 
Entry Conditions
  The menu should be displayed. If cmd is NULL, or VCreateColormap has not 
been called, VSelectMenuItem prints an error message to the standard
error stream, produces a core dump file and exits from the current process.
 
Related Functions
VDisplayMenu, VRemoveMenus, VRedisplayMenus, VWriteMenucomFile, VReadMenucomFile, VGetMenuInformation.