home *** CD-ROM | disk | FTP | other *** search
- May 14, 1990
-
- Welcome to Ogg's Menuing Module.
-
- This is a module that will eventually define a complete SAA compatible
- menuing system (though it will not be limited to SAA compatibility). It
- is being included here at the conference as an example of Clipper 5.0
- code that makes use of many of the new features and that follows modular
- programming techniques. The final version will be distributed with
- Clipper 5.0 as one of the example programs.
-
-
- SAMPLE1.PRG is an example of proper usage of the menu system. Please note
- that it keeps a real-time clock going without the use of interrupts.
-
-
- Instructions for use:
-
- You must "hash include" OMENU.CH before attempting to use the commands.
-
- The commands are:
-
- DEFINE MENU
-
- This must proceed any menu definition.
-
- PROMPT <prompt> [COLOR <color>] [DO <do>] [INACTIVE]
-
- There should be one prompt command for every menu option.
-
- <prompt> - the actual text for the prompt in quotes
- <color> - the color string for this prompt in this order:
- <Norm>,<Lett>,<Sel>,<OffNorm>,<OffSel>
- where:
- <Norm> - color for unselected prompt (active)
- <Lett> - color for hotkey in unselected prompt (active)
- <Sel> - color for selected prompt (active)
- <OffNorm> - color for unselected prompt (inactive)
- <OffSel> - color for selected prompt (inactive)
- <do> - function name to execute (minus parens and paramters, will
- be passed the menu object as its only paramter). Default
- is MenuExit, which will exit menu and leave the current
- selection as chosen.
-
- INACTIVE - Make option unselectable
-
- PROMPT LINE
-
- Draw line across menu here separating items
-
- HOTKEY <key> DO <do>
-
- <key> - ASCII value of hotkey
- <do> - function name to execute (minus parens and paramters, will
- be passed the menu array and key pressed as its paramters).
-
- IDLE <sec> [SECONDS] DO <do>
-
- <sec> - idle number of seconds to wait before executing <do>. This
- action will happen every multiple of <sec> seconds. Make sure
- that longest pauses are defined first so that they have
- priority.
- <do> - function name to execute (minus parens and paramters, will
- be passed the menu array and time passed as its paramters).
-
- NOTE: SECONDS designation is optional, but makes code clearer to
- read.
-
- CREATE <menu> @ <y>, <x> ALIGN [LEFT | RIGHT | CENTER] ;
- [COLOR <color>] ;
- [BORDER SINGLE | DOUBLE | NONE] ;
-
- <menu> - Menu variable to put menu in. Should be declared first.
- <y>,<x> - "Reference" row and column
- ALIGN - This determines where menu is placed. If LEFT is chosen,
- the upper left hand corner of the menu will be at <y>,<x>.
- If RIGHT is chosen, it will be the upper right hand corner.
- If CENTER is chosen, the menu will be horizontally and
- vertically centered around that point (@ 12,40 ALIGN CENTER
- puts the menu in the center of the screen).
- COLOR - Default menu color in form listed under "PROMPT." This can
- be overridden for each prompt.
- BORDER - SINGLE line, DOUBLE line or NONE - No Border.
-
-
- See OMENU.CH for list of "public" functions for this module. Please keep
- in mind that this module is just included as an example (though it does
- work) and may be changed before final release.
-
- ARRAYFUN.PRG and ARRAYFUN.CH define a smaller module that gives a good
- example of how code blocks are properly used. Though Ogg's Menuing Module
- is the only module that currently uses ACOMP() it was moved to a new module
- because it is of general use. It was not "published" in the Menuing
- Module because it is not specific to menus.
-
- Have at!
-