skip to main content

Library Routines : W$MENU

W$MENU
The W$MENU library routine provides a number of functions to manage menus.
Note - Every call to W$MENU performed before the first WMENU-SHOW is buffered and doesn’t update the video. Every call to W$MENU performed after the first WMENU-SHOW immediately updates the video and therefore it might affect performance.
Syntax:
 CALL "W$MENU" USING opCode
Parameters:
Return code:
returnCode definition and meaning depend on the opcode.
Examples:
Example - Building a whole menu with options, sub-options and icons to some sub-options
77  h-img                   pic s9(9comp-4.
78  mnu-new                 value 101.
78  mnu-open                value 102.
78  mnu-save                value 103.
78  mnu-cut                 value 201.
78  mnu-copy                value 202.
78  mnu-paste               value 203.
procedure division.
  perform build-menu
  call "w$bitmap" using wbitmap-load, "files/icone-menu.gif",
  call "w$menu" using wmenu-new giving menu-handle
  call "w$menu" using wmenu-new giving sub-handle-1
  call "w$menu" using wmenu-add, menu-handle, 00,
  call "w$menu" using wmenu-add, sub-handle-1, 00,
  call "w$menu" using wmenu-add-bitmap 
  call "w$menu" using wmenu-add, sub-handle-1, 00,
  call "w$menu" using wmenu-add-bitmap 
  call "w$menu" using wmenu-add, sub-handle-1, 00,
  call "w$menu" using wmenu-add-bitmap 
  call "w$menu" using wmenu-add, sub-handle-1, 0, w-separator
           call "w$menu" using wmenu-add, sub-handle-1, 00,
  "E&xit"27
  call "w$menu" using wmenu-new giving sub-handle-2
  call "w$menu" using wmenu-add, menu-handle, 00,
  call "w$menu" using wmenu-add, sub-handle-2, 00,
  call "w$menu" using wmenu-add-bitmap 
  call "w$menu" using wmenu-add, sub-handle-2, 00,
  call "w$menu" using wmenu-add-bitmap 
  call "w$menu" using wmenu-add, sub-handle-2, 00,
  call "w$menu" using wmenu-add-bitmap 
  call "w$menu" using wmenu-add, sub-handle-2, 0, w-separator
  call "w$menu" using wmenu-add, sub-handle-2, 0, w-disabled,
  call "w$menu" using wmenu-add, sub-handle-2, 0, w-checked,

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left