So What Techncial Notes

Call Box
Setting up a Special Edit Menu

Written by: William Stephens - February 16,1990

This technical note describes how to modify a menu entity to respond with Special Edit Menu features activated by System Windows.

A Special Edit Menu is a menu which contains the menu items UNDO, CUT, COPY, PASTE, CLEAR and CLOSE. These items have I.D. numbers of250 through 255 and are activated whenever a system window is the topmost window on the desktop. Most New Desk Accessories (NDA's) use these items because NDA's are in system windows.

The Call Box Menu Editor is capable of including these items by name but not by I.D. number. I.D. numbers are automatically assigned in this editor starting at 256 and are in sequential order, so the special edit menu items in your menu would have I.D. numbers larger than 256. You can use Long Call (CALL LC) to make SetMltemID ($380F) calls to change these items I.D.'s to the range 250 - 255 which would setup the Special Edit Menu.

Make a simple menu entity using the Call Box Menu Editor with the following items:
        Apple              (enabled)
                About      (enabled - underlined) 
        File               (enabled)
                Close      (disabled - underlined)
                Quit       (enabled - Key = Q) 
        Edit               (enabled)
                Undo       (disabled - underlined - key = Z)
                Cut        (disabled - Key = X)
                Copy       (disabled - Key = C)
                Paste      (disabled - Key = V)
                Clear      (disabled) 
About = 256, Close = 257, Quit = 258, Undo = 259, Cut = 260, Copy = 261, Paste = 262 and Clear = 263. After you load and display this menu from within your program use the following statements to convert the menu item I.D.'s to the Special Edit Menu item I.D.'s.

CALL LC,255,257\$380F\
FOR 1 = 0 TO 4: CALL LC,250 + 1,259 + 1\$380F\: NEXT

Putting the Call Box BASIC Drivers Menu command Check Menu (CALL ME,2,N) in your programs event loop will detect the presence or absence of a system window and enable or disable these items automatically.

Further Reference
Apple IIgs Toolbox Reference: Volume(s) 1,2 and 3
Call Box BASIC Manual V 2.0

Call Box - So What Software 10221 Slater Ave. Suite 103 Fountain Valley, CA. 92708