CALL "W$MENU" USING opCode parameters GIVING returnCode |
opCode | Function to be executed. Valid values, defined in isgui.def, are: | |
Add an item to an existing menu | ||
Display a bitmap in front of a menu item | ||
Inhibits the user from using the menu menu | ||
Modify a menu item | ||
Modify the bitmap shown in front of a menu item | ||
Show a check mark beside a menu item | ||
Delete a menu item | ||
Delete a bitmap displayed in front of a menu item | ||
Destroy a menu and remove it from the screen | ||
Mark a menu, so that it will be destroyed later | ||
Disable a menu item | ||
Enable a menu item previously disabled | ||
Expands the necessary menus in order to show a given menu item | ||
Gets the menu blocking count | ||
Get the handle of the current menu | ||
Create a new menu bar | ||
Create a new hamburger menu | ||
Create a new pop-up menu | ||
Create a new tray icon with menu | ||
Display a pop-up menu | ||
Logically destroy the current menu, without updating the screen | ||
Sets attributes for the menu bar | ||
Sets the menu blocking count | ||
Display a menu on the screen | ||
Re-enables the user to use the menu menu | ||
Remove a check mark shown beside a menu item | ||
parameters | Parameters depend on the opcode. |
77 h-img pic s9(9) comp-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. main. perform build-menu ... build-menu. call "w$bitmap" using wbitmap-load, "files/icone-menu.gif", giving h-img 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, 0, 0, "&File", 0, sub-handle-1 call "w$menu" using wmenu-add, sub-handle-1, 0, 0, "&New", mnu-new call "w$menu" using wmenu-add-bitmap menu-handle mnu-new h-img 3 24 call "w$menu" using wmenu-add, sub-handle-1, 0, 0, "&Open", mnu-open call "w$menu" using wmenu-add-bitmap menu-handle mnu-open h-img 2 24 call "w$menu" using wmenu-add, sub-handle-1, 0, 0, "&Save", mnu-save call "w$menu" using wmenu-add-bitmap menu-handle mnu-save h-img 5 24 call "w$menu" using wmenu-add, sub-handle-1, 0, w-separator call "w$menu" using wmenu-add, sub-handle-1, 0, 0, "E&xit", 27 |
call "w$menu" using wmenu-new giving sub-handle-2 call "w$menu" using wmenu-add, menu-handle, 0, 0, "&Edit", 0, sub-handle-2 call "w$menu" using wmenu-add, sub-handle-2, 0, 0, "&Cut", mnu-cut call "w$menu" using wmenu-add-bitmap menu-handle mnu-cut h-img 1 24 call "w$menu" using wmenu-add, sub-handle-2, 0, 0, "&Copy", mnu-copy call "w$menu" using wmenu-add-bitmap menu-handle mnu-copy h-img 4 24 call "w$menu" using wmenu-add, sub-handle-2, 0, 0, "&Paste", mnu-paste call "w$menu" using wmenu-add-bitmap menu-handle mnu-paste h-img 6 24 call "w$menu" using wmenu-add, sub-handle-2, 0, w-separator call "w$menu" using wmenu-add, sub-handle-2, 0, w-disabled, " w-disabled", 70 call "w$menu" using wmenu-add, sub-handle-2, 0, w-checked, " w-checked", 80 . |