Call Box Editors Manual
Version 1.0 Aug 15,1989


CHAPTER 3 - THE MENU EDITOR

OVERVIEW
The CALL BOX Menu Editor creates templates for use by the Apple IIgs Menu Manager. This editor can load either OMF2 object code or resources and can output APW/ORCA sourcecode, OMF2 object code and resources. The resource filetype is $1001 and requires a converter to load into memory. The standard programming procedure for resources is presented at the end of this chapter.

ABOUT MENUS
A menu provides a means of displaying choices or options avaliable to the user without having to remember selections,words or special keys.

Menus appear as a panel usually located at the top of the screen. Each menu has a title and a pull-down menu associated with it. The menu contains a series of selections or "Items" available to the user. (See Fig. 3.26)

An I.D. number is associated with each title and item. The LD. number is used by the menu manager to inform you when a title or item is selected.

Figure 3.26
Figure 3.26 Typical Menu Bar and Menu

To use the menu bar the user selects a menu bar title. The title bar is then hi-lited and a pull-down menu appears directly below the title. Keeping the mouse button pressed and moving the cursor up and down the menu, hilites items as you move. When you hilite the menu item you want to select simply release the mouse button and the menu manager will return the I.D. number for the selected item.

Menus can be customized to a certain extent with this editor, some of the features are:

  • Key Equivalents
  • An alternate way of selecting menu items from the keyboard.
  • Text styles
  • You can select bold, underline or italisized for the items text.
  • Check Character
  • You can add check marks, diamonds, open and closed-apples.
  • Underlines and dividing lines
  • Add visual divisions for groups of like items in menus.
  • Disabling
  • Lets you select only applicable items.

    EDITOR OPERATION
    The Menu Editor is a "Desk-top" type PI6 application and follows the standard conventions for desk-top applications. Support for New Desk Accessories (NDA's) is provided via the apple selection in the menu bar and an Edit menu which activates when a "system" window is up.

    To best illustrate how to create a Menu template let's run through an editing session and create one from scratch.

    Let's make this menu in 640 mode. The menu editor functions in 640 mode. You can test in either mode, but the actual editing process is in 640.

    1.     Select FILE-NEW and the BUILD MENU window will appear. (See Fig 3.27)

    The menu bar has the Apple menu already installed, so let's put an ABOUT item in the menu ...

    2.     Click the NEW ITEM button and a new item will appear in the scroll window.

    3.     Type the word ABOUT .... (add three periods just for style). Press RETURN when you are done.

    This is how you build a menu, you can add dividing lines, delete or replace items and titles by hiliting them in the scroll window and clicking the desired button.

    Once you have your menu selections in place you can try your menu by selecting the menu bar selection GOODIES-TRYIT 320 or GOODIES-TRYIT 640. Press the OPTION key to return to the build window.

    There is an additional button present in the build window called ATTRIBUTES. This permits each menu items appearance and mode of operation to be set to reflect a particular status.

    4.     Select the ATTRIBUTES button in the build window (See Fig. 28)

    This window allows you to ...

  • Set the style of the items text.

  • Select enabled or disabled (dimmed) add a narrow dividing line.

  • Add one of 4 item markers and keypress equivalents.

  • Set the attributes for your menu items so that the menu bar is structured the way you want it at initialization.


  • This completes the creation of a menu template there is one more feature which is covered in the next section.

    SPECIAL EXPLANATION
  • The selection FILE-PRINT INFO will print you a list of the menu items cross-referenced by their I.D. numbers. this list is very helpful when integrating your menu into your application.

  • The editor edits in 640 mode only! A menu for 320 mode or 640 mode can be created with the editor. To see the menu in different modes use GOODIES-TRYIT 320 and GOODIES-TRYIT 640.

  • The menu selection GOODIES-DISPLAY INFO will bring up a Control Info scroll window. This window represents a list of the items in your menu box that is kept internally in this editor. (See Fig. 2.18)


  • Double-clicking an item in this window will bring up the item edit menu for that item the same as double-clicking the item itself.

    This window allows you to ...

  • Set the style of the items text
  • Select enabled or disabled (dimmed)
  • Add a narrow dividing line
  • Add one of 4 item markers and keypress equivalents.

  • Set the attributes for your menu items so that the menu bar is structured the way you want it at initialization.

    This completes the creation of a menu template there is one more feature which is covered in the next section.

    Figure 3.28
    Figure 3.28 Attributes Window

    Special Explanation
  • The selection FILE-PRINT INFO will print you a list of the menu items cross-referenced by their I.D. numbers, this list is very helpful when integrationg your menu into your application.

  • The editor edits in 640 mode only! A menu for 320 mode ir 640 mode can be created with this editor. To see the menu in different modes use GOODIES-TRYIT 320 and GOODIES-TRYIT 640.

  • SAVE MENUS
    Once you have created a menu template you will want to save it to disk so it can be incorporated into your program code.

    Select FILE-SAVE AS ... and a save dialog box will appear.

    Figure 3.29
    Figure 3.29 Save Dialog Box

    This box has buttons to select the drive, create a new folder, open or close a folder, cancel this operation and save the file. There is also a box for typing in a filename and 3 radio buttons across the bottom of the menu box. These three buttons select the type of output you will be saving.

  • Object ($B1)
  • Select this button to save the template as an OMF2 object file. This filetype can be loaded back in by the editor.
  • Source ($B0)
  • Select this button to save the template as an APW/ORCA source code file. This filetype can not be loaded back into the editor.
  • Resource (any filetype)
  • Select this button to save the template to a resource fork of an extended ProDOS file. This filetype can be loaded back in by the editor.

    Selecting either Object or Source will create or overwrite a file on a disk and the operation is pretty straight foreward. Selecting Resource however will present some extra windows that control how resources are saved to disk. Resources come in types and I.D.'s, the type for a CALL BOX menu template is $1000 and is hard-set by the editor ... the only thing you need to set is the I.D. for your resource. You can either rewrite an existing resource by double-clicking on its I.D. number if one exists or doubleclicking the ---->New entry to save your resource as the next avaliable I.D. number. (See Fig 3.30).

    Figure 3.30
    Figure 3.30 Save Resource I.D. Window

    You can cancel the resource save operation by clicking the close box in the title bar of the resource LD. window. You can also edit the resource I.D. (re-number or delete) by first pressing and holding the OPTION key while double-clicking the desired I.D. (See Fig 3.31).

    When re-numbering resource I.D.'s be sure to have 8 hex digits in the LD. number window (use leading zeroes to pad small numbers). Failure to do so will cause unpredictable results and could ruin the resource fork of the ProDOS file.

    Figure 3.31
    Figure 3.31 Edit Resource ID. Dialog Box

    If a resource fork does not exist for a given ProDOS file a dialog box will appear that gives you the option of creating one.

    Once you have created menus and saved them to disk you may want to load them back into this editor for further editing.

    LOAD MENUS
    Select FILE-OPEN ... and a load dialog box will appear.

    Figure 3.32
    Figure 3.32 Load Dialog Box

    This box has buttons to select the drive, open or close a folder, cancel this operation and open the file. There are radio buttons to select the type of input you will be loading.

  • Object ($B1)
  • Select this button to load an OMF2 type of menu template file.
  • Resource (any filetype)
  • Select this button to load the template from a resource fork of an extended ProDOS file.

    Selecting Object will load a file from disk and the operation is pretty straight foreward. Selecting Resource however will present some extra windows that control how resources are loaded into memory.

    Resources come in types and I.D.'s, the type for a CALL BOX menu template is $1001 and is hard-set by the editor ... the only thing you need to set is the I.D. for your resource. You can load a resource by double-clicking on the desired resource I.D. number. (See Fig 3.33)

    You can cancel the resource load operation by clicking the close box in the title bar of the resource I.D. window. You can also edit the resource LD. (re-number or delete) by first pressing and holding the OPTION key while double-clicking the desired I.D. (See Fig 3.31) When re-numbering resource I.D.'s be sure to use 8 hex digits in the I.D. number window (use leading zeroes to pad small numbers). Failure to do so will cause unpredictable results and could ruin the resource fork of the ProDOS file.

    Figure 3.33
    Figure 3.33 Load Resource ID. Window

    If a resource fork does not exist for a given ProDOS file then no template will be loaded.


    <- Previous | Next ->