home *** CD-ROM | disk | FTP | other *** search
- @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- @@ Purpose: Demo major capabilities/features, with running commentary.
-
- @@ Comments: The double "at"-sign (@@) signifies a comment. Anything
- @@ after @@ is ignored. Blank lines are also ignored.
-
- @@ Hints: The double semi-colon (;;) signifies a hint string.
- @@ Hints may be used for APPLICATION and SUBMENU elements.
-
- @@ Keywords: Keywords are enclosed with brackets, [ keyword ] or [keyword],
- @@ (spacing ignored). When used, they are expected in the order:
-
- @@ [ SWITCH ]
- @@ [ APPLICATION ]
- @@ [ SUBMENU ]
- @@ [ NEWLINE ]
- @@ [ STATUS ]
- @@ [ HINT ]
-
- @@ NOTE: All keywords are optional; the program will generate
- @@ a complete dummy application from an empty file!
- @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- @@ ===================================================================
- @@ ___,/|
- @@ \ o_O|
- @@ =(_|_)= "[SWITCH]" Section.
- @@ U
- @@ ack!
- @@ ===================================================================
- @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- @@ Note order-of-evaluation for switch/options:
- @@ 1. *.CFG file
- @@ 2. Command-line switch(es)
- @@ 3. Definition file switch(es).
- @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- [ SWITCH ]
- /ig- @@ all generated code in one file.
- /c @@ always compile (override *.CFG &
- @@ command-line switches)
-
-
- @@ ===================================================================
- @@ ___,/|
- @@ \ o_O|
- @@ =(_|_)= "[APPLICATION]" Section.
- @@ U
- @@ ack! Only one line long!
- @@ ===================================================================
- @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- @@ See Technical Manual for Syntax.
- @@ The "label" becomes the TApplication descendant's name, prefixed
- @@ with "T" and suffixed with "App". If not present, the filename is
- @@ used. For example, DEMO.DEF --> "TDEMOApp.method"
- @@ * WARNING * Label is also used to re-route Custom Components, and
- @@ should only be used for this purpose. You can use the DefaultHint
- @@ anytime.
- @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- [ APPLICATION ] ;;Optional Default Hint @@ for hcNoContext!
-
-
-
- @@ ===================================================================
- @@ ___,/|
- @@ \ o_O|
- @@ =(_|_)= "[SUBMENU]" Section.
- @@ U
- @@ ack! Usually multiple occurances.
- @@ ===================================================================
- @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- @@ Commands of 2 words or more MUST be enclosed in quotes, because
- @@ the second parameter is placed on the menu.
- @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- [SUBMENU] ≡ hcSystem ;;system functions
- About ;;program information, copyright
- 'Video Mode' ;;Change to 43/50 line mode (EGA/VGA only)
- 'DOS shell' ;;temporary exit to DOS
- [NEWLINE]
- Exit Alt-X cmQuit ;;exit the program, return to DOS
-
- @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- @@ For multi-level menus, match greater-than/less-than to "indent"
- @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- [SUBMENU] file ;;file management commands (open, save, etc)
- Open... f3 ;;locate and open a file in an Edit window
- New f4 ;;create a new file in a new Edit window
- Save f2 ;;save the file in the active Edit window
- [NEWLINE]
- 'Change Dir...' @@ OOPS! There's no hint...
- >[SUBMENU] Print ;;2nd Level menu, prefaced with ">" symbol
- >[SUBMENU] Hardware
- Parallel-1
- Parallel-2
- Serial-1
- Serial-2
- <
- >[SUBMENU] LPTx Port
- Lpt~1~ ;;Where to print @
- Lpt~2~ ;;Print Here?
- Lpt~3~ ;;How 'bout here?
- <
- >[SUBMENU] COMx Port
- Com~1~
- Com~2~
- Com~3~
- Com~4~
- Com~5~
- Com~6~
- Com~7~
- Com~8~
- <
- <
- >[SUBMENU] ;;Deliberately left blank
- <
-
- @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- @@ Show nesting capability.
- @@ NOTE: Compiler croaks at 19th SUBMENU, if options are also added...
- @@ ALSO: Be sure to balance "<" and ">"
- @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- [SUBMENU] SubSubSub ;;Try coding this by hand!
- >[SUBMENU] level2 ;;deeper @@ ───┐
- >[SUBMENU]level3 ;;deeper yet @@ ───┐│
- >[SUBMENU] level4 ;;deeper and deeper @@ ───┐││
- >[ SUBMENU ] level5 ;;yup, another level@@ ───┐│││
- >[SUBMENU] level6 ;;just one more... @@ ───┐││││
- >[SUBMENU] level7 ;;I can't resist! @@ ───┐│││││
- >[SUBMENU] level8 ;;again! @@ ───┐││││││
- >[SUBMENU] level9 ;;AGAIN! @@ ───┐│││││││
- >[SUBMENU] level10 ;;AND AGAIN! @@ ───┐││││││││
- '~0~ Option' ;;hint @@ │││││││││
- '~1~ Option' ;;hint @@ │││││││││ Each ">" must
- '~2~ Option' ;;hint @@ │││││││││ be have a
- '~3~ Option' ;;hint @@ │││││││││ corresponding
- '~4~ Option' ;;hint @@ │││││││││ "<", or all
- '~5~ Option' ;;hint @@ │││││││││ subsequent
- '~6~ Option' ;;hint @@ │││││││││ menus will be
- '~7~ Option' ;;hint @@ │││││││││ SUBMENUs of a
- '~8~ Option' ;;hint @@ │││││││││ previous one!
- '~9~ Option' ;;hint @@ │││││││││
- < @@ ───┘││││││││
- < @@ ───┘│││││││
- < @@ ───┘││││││
- < @@ ───┘│││││
- < @@ ───┘││││
- < @@ ───┘│││
- < @@ ───┘││
- < @@ ───┘│
- < @@ ───┘
-
- @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- @@ Handle multiple SUBMENUs
- @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- [SUBMENU] SUBMENU ;;Single level
- >[SUBMENU] Sub~1~ ;;Create a menu! @@ ──────┐ BALANCE THIS ">"
- 'Select~0~ ' ;;hint @@ │
- 'Select~1~ ' ;;hint @@ │
- 'Select~2~ ' ;;hint @@ │
- 'Select~3~ ' ;;hint @@ │
- 'Select~4~ ' ;;hint @@ │
- 'Select~5~ ' ;;hint @@ │
- 'Select~6~ ' ;;hint @@ │
- 'Select~7~ ' ;;hint @@ │
- 'Select~8~ ' ;;hint @@ │
- 'Select~9~ ' ;;hint @@ │
- [SUBMENU] Sub~2~ ;;Dial a menu! @@ │
- [SUBMENU] Sub~3~ ;;Make a menu! @@ │
- [SUBMENU] Sub~4~ ;;Dig a menu! @@ │
- [SUBMENU] Sub~5~ ;;Dump a menu! @@ │
- [SUBMENU] Sub~6~ ;;Another Menu! @@ │
- [SUBMENU] Sub~7~ ;;Foo @@ │
- [SUBMENU] Sub~8~ ;;Bar @@ │
- [SUBMENU] Sub~9~ ;;If the foo sticks... @@ │
- < @@ ─────────────────────────────────────────────┘ WITH THIS "<"
-
-
- @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- [SUBMENU] Number Items ;;Measure confusion index...
- Option~0~ ;;hint
- Option~1~ ;;hint
- Option~2~ ;;hint
- Option~3~ ;;hint
- Option~4~ ;;hint
- Option~5~ ;;hint
- Option~6~ ;;hint
- Option~7~ ;;hint
- Option~8~ ;;hint
- Option~9~ ;;hint
-
- @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- @@ Past TurboVision screen limit
- @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- [SUBMENU] Letter Items ;;Off the scale (or screen, as the case may be...)
- Option~A~ ;;hint
- Option~B~ ;;hint
- Option~C~ ;;hint
- Option~D~ ;;hint
- Option~E~ ;;hint
- Option~F~ ;;hint
- Option~G~ ;;hint
- Option~H~ ;;hint
- Option~I~ ;;hint
- Option~J~ ;;hint
- Option~K~ ;;hint
- Option~L~ ;;hint
- Option~M~ ;;hint
- Option~N~ ;;hint
- Option~O~ ;;hint
- Option~P~ ;;hint
- Option~Q~ ;;hint
- Option~R~ ;;hint
- Option~S~ ;;hint
- Option~T~ ;;hint
- Option~U~ ;;hint
- Option~V~ ;;hint
- Option~W~ ;;hint
- Option~X~ ;;hint
- Option~Y~ ;;hint
- Option~Z~ ;;hint
-
- @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- @@ A more typical menu...
- @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- [ SUBMENU ] window ;;open, arrange and close windows
- Size/move Ctrl-F5 cmResize ;;change the size or position of the active window
- Zoom F5 ;;enlarge or restore the size of the active window
- Tile Alt-T ;;arrange windows on the desktop by tiling
- C~a~scade Alt-C ;;arrange windows on the desktop by cascading
- Next F6 ;;make the next window active
- Previous Shift-F6 cmPrev ;;make the previous window active
- Close Alt-F3 ;;close the active window
-
-
-
- @@ ===================================================================
- @@ ___,/|
- @@ \ o_O|
- @@ =(_|_)= "[STATUS]" Section.
- @@ U
- @@ ack! Multi-Context StatusLines.
- @@ ===================================================================
- @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- @@ FYI: All are commented out, to demonstrate defaults.
-
- @@ PRECEDENCE. The first defined range takes precedence over subsequent
- @@ definitions. In practice, this means that [STATUS] 0,$FFFF would
- @@ override ALL following definitions!
-
- @@ ITEMS. There are 2 types of StatusLine items: Visible and Invisible.
- @@ Visible: Defaults to F1 cmHelp, F10 cmMenu and Alt-X cmQuit
- @@ Invisible: Defaults include TV's, but add kbF1 for cmHelp.
- @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- @@ [STATUS]0,$FFFF @@ global override of everything below, since
- @@ kbF1 cmHelp @@ 0,$FFFF covers the entire context range
- @@ kbAltX cmQuit @@ only allow "quit"
-
- @@ [ STATUS ] @@ Context defaults to 0,0
- @@ f2 help @@ Visible; creates ~F1~ Help kbF1 cmHelp
- @@ kbF10 cmMenu @@ NOT visible; creates kbF10 cmMenu
-
- @@ [STATUS] 0 @@ 2nd context defaults to same as the first,
- @@ f3 help @@ so [STATUS]45 is the same as [STATUS]45,45
- @@ kbF10 cmMenu
-
- @@ [STATUS]0,0 @@ This, and the 2 preceeding, are identical
- @@ f4 help @@ However, in TurboVision, the 1st definition
- @@ kbF10 cmMenu @@ takes precedence!
-
- @@ [STATUS] 1,1 @@ Redefine StatusLine for "hcDragging" mode
- @@ esc exit @@ since this is IT, "ESC" won't work!
-
- @@ [STATUS]2,999 @@ This redefines the StatusLine for the
- @@ f5 help @@ TurboVision reserved values.
-
- @@ [STATUS]1000,$FFFF @@ Hex notation may be used here
- @@ f6 help
-
-
-
- @@ ===================================================================
- @@ ___,/|
- @@ \ o_O|
- @@ =(_|_)= "[HINT]" Section.
- @@ U
- @@ ack! For hcXXXX constants used elsewhere, needing hints
- @@ ===================================================================
- @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- @@ The [hint] keyword denotes a list of hc... constants which you intend
- @@ to use in dialog boxes, other objects and/or code. Since hc...
- @@ constants are placed in the "??????_X.TPU" unit, you can use that unit
- @@ with other code/units.
- @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- [HINT] @@ Generate hcXXXX constants & hint strings
- hcJunkHint ;;hint for junk
- hcChangeDir ;;This is how you Change Directorys
-