home *** CD-ROM | disk | FTP | other *** search
- August 31, 1987
-
- MULTI-LEVEL PULL-DOWN MENUS
- Version 1.5
-
- PURPOSE:
-
- This utility creates incredibly quick multi-level pull-down
- | menus as include files in Turbo Pascal programs for ALL IBM
- | compatibles, including PS/2. It features:
-
- - Work window(s) and complete interface for menus
- | - Pull-down menus with 5 menu modes and 7 line modes
- | - Highlighted command letters
- - Unlimited levels of submenus
- | - Unlimited data entry windows for seven types of data
- - Data entry for the work window(s)
- - Automatic NumLock for numerical data entry
- - Right or left justification for data entry
- - Error messages for invalid data entries
- - Error messages for data entries out of range
- - Allowance for null entries on text data entry
- - Automatic and override configuration for sizes and
- locations for easier development
- - Operation by cursor keys or command keys
- - Pull/Pop between work window and nested submenu(s)
- - Programmable control of pull and pop sequences
- - Full system of self-titled help windows
- - Message lines for prompts and processing
- - Full working shell for user development
- - Can be fully configured by the user including
- add-on features though include files.
-
- | They work on MDA, CGA, EGA, MCGA, VGA, 8514/A adapters in any
- | column mode (40/80/etc.). These procedures use the quick screen
- | writing procedures of QWIK30.INC and the multi-level window
- | procedures of WINDOW34.INC.
-
-
- TEST DRIVE:
-
- Compile and run the program PULLDEMO.PAS to get a feeling for
- | features and speed. Be sure to use the Help function key "F1"
- | everywhere for explanations. WINDOW34.INC and QWIK30.INC are
- | required to run it. The operation should be intuitive. If not,
- then I didn't do a very good job.
-
-
- FILES:
-
- In this version, PULL15.ARC contains:
-
- !read .me!: File that insists you get a copy of
- WINDOW34.ARC for source files and QWIK30.ARC
- for further documentation.
- Pull15 .doc: This document.
- Pull15 .inc: Include file for your programs to use the
- pull-down menus.
- PullDE15.inc: Include file which adds data entry to the
- menus and work window.
- PullDE__.inc: An empty include file which deletes data entry
- features, but still permits compiling.
- Pulluser.inc: Include file which can add user-defined
- features to the menus.
- PullDemo.pas: Fully functional working demo of PULL15.INC.
- PullShel.pas: A shell for your application programs.
- License .arc: ARC file containing license agreements.
-
-
- IMPROVEMENTS:
-
- In this version there are several improvements:
- | . Added combination menu modes ExecSingleChoice and
- | ExecMultipleChoice.
- | . Added line mode type of ExecOnly to be independent of menu
- | Choice.
- | . Added TypeOfDataTypes UserNums and UserStrings for user-
- | defined sets.
- | . Added Lattr (command Letter) and Cattr (Comment) attributes
- | to each menu.
- | . Added StatusAttr for the first row attribute.
- | . InitAttr is now the parameter in InitPull.
- | . Deleted HaveEGA to conform to QWIK30.INC.
- | . Modified cursor handling and eliminated separate cursor
- | modes.
- | . Separated color initialization procedures.
- | . Changed Home and End cursor keys to perform more like
- | WordStar.
-
- | SHAREWARE:
- |
- | Due to the lack of participation and expense, I have decided to
- | abandon the Teamware concept and instead make them into ShareWare.
- | The cost may range from $8 to $45 depending on your application.
- | I do enjoy assisting others in their programming, but lack of
- | reimbursement is expensive for me! Please help out. See the
- | STATMENT.LIC in LICENSE.ARC for details. If the response will let
- | me break even, I will continue support.
-
-
- DEFINITIONS:
-
- So you can understand the program identifiers and this document,
- here's the definitions I'll use:
-
- Work window - The working window of the application program.
- Top menu - The menu always shown (usually in row 1 or 2).
- Main menu - The first menu pulled from the top menu.
- Submenu - All subsequent menus pulled after the main menu.
- Line - A row of text.
- Menu - A list of selectable lines.
- Window - Not a menu.
- Data entry window - window for entering data into the
- application program.
- Selection - A line selected in a menu with a CR.
- "HiLited" - A line pointed at in a menu.
- Message line - The bottom row to display key helps or
- processing status.
- Error message - a short message for data out of range.
- Link - A menu line showing a symbol (three-bar or dot) that
- pulls another menu or window. The symbol is also on
- the same side where it is pulled.
- Pull - pulls menus down to the previous level.
- Pop - removes menus and returns to the work window.
-
-
- BASIC OPERATION:
-
- I'll just put a few words here just in case you may have missed
- some of the capabilities in the demo.
-
- . Status Line - Row 1 just holds the title of this program. It
- can be used to for optional status info.
-
- . Top Menu Line - To access the top menu line, press F10 at any
- time. The exceptions are when the Help window or Error
- messages are displayed. The "/" key does the same thing
- except it is considered data in text data entry windows.
-
- . Main Menu - To access a main menu, press RETURN while the top
- menu is highlighted.
-
- . Submenu - To access a submenu, press RETURN when the HiLite
- is at a menu line with the three-bar symbol (which looks like
- a menu).
-
- . Data Entry Window - To access a data entry (pronounced "dot-
- uh" entry?) window, press RETURN when the HiLite is at a menu
- line with a small dot symbol. Pressing RETURN again will
- exit the window. You can clear any data entered by pressing
- ESC which also removes the window.
-
- . Numerical Data Entry - Depending on the type of data, (byte,
- integer, or real) only the valid characters can be typed in.
- Backspace can be used as well. The "NumLock" is automatic
- and is interactive. After return is pressed, the data is
- checked for validity (bytes less than 256, etc.) and then for
- a range check. If it passes both checks, the data is then
- stored and the window is removed. The "NumLock" status is
- then restored. In "Exec-" type menus like "Files", the
- window may remain until processing is complete. You can
- program this either way though.
-
- . Text Data Entry - ASCII 32 through 126 are valid characters
- for string and character data. Only backspace can be used
- for editing. The entry can be nulled by pressing DEL and
- then RETURN.
-
- . Work Window - This is the 20x78 window for the major part of
- your output and optional input. You can also have multi-
- level work windows.
-
- . Work Window Data Entry - The same procedures used for the
- data entry windows can be used for entering data in the work
- windows.
-
- . Help Windows - A help window is assigned to every window and
- menu. It automatically shows it's title of that menu. They
- can use the same info or different.
-
- . Message Line - The bottom line contains help or error
- messages.
-
- . Function Keys - These are the keys assigned in the demo and
- what they control:
- F1 - Pull/pop the Help windows
- F2 - Pull/pop the pull-down menus
- F10 - Pops to top menu for key commands
- "/" - Same as F10, but not in text data entry windows.
- ESC - Same as F2 in the Work window, but in the menus it
- backs out of the current menu/window.
- LTR - While in the menus, the HiLite will move to and
- execute the menu line with that upper case letter.
- Cursor Keys - refer to comments in PULL15.INC.
-
-
- SCREEN DESIGN:
-
- PULL15.INC is quite flexible and allows you to change the basic
- | screen design in your application program. EGA and VGA users
- | will particularly like it because it will also work in any row
- | mode and column mode.
-
- Status line - The demo shows how to place a title or status line
- in row 1. Some applications may require a status line outside
- of the work window for file names or whatever. But it is not
- required.
-
- Work Window - The demo also shows a 20x78 work window but you
- can modify it to a full 80 columns by setting the MakeWindow to
- NoBrdr and create a 20x80 window. The top and bottom lines
- could be added with a couple of Qfill statements. You can also
- have multi-level work windows if you want.
-
- Main Menu Placement - This design seems to be the defacto
- standard that was started by the Macintosh and is currently
- being used by Microsoft. The top menu row is inverse video
- while the highlight is normal. The main menu is directly below
- and offset a few spaces.
-
- Submenu Placement - Press RETURN at a menu line with a linked
- submenu and notice that the top of a submenu is on the
- same row. This menu line also serves as a title. Let's say you
- nest 5 levels of submenus. Will you still be able to see all of
- the titles? Sure! They won't over lap. However, it's a good
- idea for operation if you keep the linking lines to submenus
- high up on the menu which keeps the subsequent submenus high as
- well. The first pull using F2 in the demo shows how three
- levels of menus are kept high. Keying F10 and "IU" will show
- you how a submenu drops lower. The Submenus that "bottom out"
- on the display will be automatically pushed up when they are
- located. Also look for defaults that reduce keystrokes to get
- around in the menus.
-
- Symbols - the three-line symbol (looks like a menu) tags the
- line that links a submenu. A small dot tags the line that links
- a data window. In addition, the symbol location also shows the
- direction of display - left or right. Right is preferred unless
- there is no room when it is then placed to the left.
-
- Help Window - The help window is centered between the left and
- right margin. The bottom row of the window has a constant
- number of rows below it and the bottom of screen. This can be
- assigned with RowsBelowHelp. It was also given a zoom and
- shadow effect so that it would look and feel separated from the
- working program.
-
- Message Line - The message line is placed relative to the bottom
- of the screen. It can be raised up a number of rows by setting
- RowsBelowMsg greater than zero.
-
- Limits - There are really very few requirements. Two of which
- are:
-
- . All menus and data entry windows cannot use NoBrdr.
- . Data entry windows are fixed with 2 lines.
-
- Keyboard Operation - The operation is designed to be as
- intuitive as possible. The message lines should guide you
- through the options. The idea was to make application programs
- as user friendly as possible.
-
-
- PROGRAMMING:
-
- Configuration - Virtually everything can be reconfigured by the
- user without having to modify PULL15.INC. It may require a
- little study, but the demo has most of the examples.
-
- Demo - PULLDEMO.PAS is an example of a shell you can use for
- your own programs. I used all the capabilities in the demo.
- Even though the source code is lengthy, there are only a few
- procedures. Here is a summary of the 9 steps to get you through
- all of the procedures:
-
- STEP 1: Include files
- STEP 2: GetUserPullStats (forward from PULL15.INC)
- STEP 3: GetOverrideStats (forward from PULL15.INC)
- STEP 4: DataTransfer (forward from PULLDE15.INC)
- STEP 5: Application procedures
- STEP 6: Process (forward from PULL15.INC)
- STEP 7: WorkWndw (forward from PULL15.INC)
- STEP 8: DisplayScreen
- STEP 9: Main program
-
-
- STEP 1: Include files
-
- Constants - The constants for the include files allow the user
- to trim down data memory to only what is needed. While
- developing an application, it's best to balloon these values a
- bit to keep from having to frequently change them. For MaxWndw,
- be sure to use the maximum possibility of the deepest nested
- pull-down menu, plus all work windows, plus the help window.
-
- {$C-} - Remove $C- while developing an application so you can
- halt the program with ^C rather than rebooting if there's a
- problem.
-
- Data Entry File - If you don't want the PULLDE15.INC data entry
- file, you can substitute PULLDE__.INC which contains a couple of
- code lines to still allow compiling.
-
- Custom Links - PULLUSER.INC allows the user to include a custom
- file for linking another type of window to a menu line.
-
-
- STEP 2: GetUserPullStats
-
- Automatic configuration - This is the most significant part.
- PULL15.INC runs this procedure only once to get the basic data
- for the pull-down menus. Much of the drudgery of locating,
- sizing, directing, coloring, command letters is done
- automatically. If submenus are not given enough room to fit, an
- error message will indicate it. If a data entry window won't
- fit, it will reassign it to be centered on the screen which you
- can override by assigning values to RowAlt and ColAlt in the
- "GetOverrideStats" procedure.
-
- | Menu Modes - Every menu can have just one of five modes:
-
- ExecChoice - immediately executes a procedure
- | ExecSingleChoice - executes a procedure first and then
- | flags one line exclusively on the menu
- | ExecMultipleChoice - executes a procedure first and then
- | toggles the line's boolean flag
- SingleChoice - flags one line exclusively on the menu
- MultipleChoice - toggles the line's boolean flag
-
- MenuMode tells how the selection will interact with the other
- and ONLY "Choice" selections on the menu (see below).
-
- Line Modes - In addition, each line in the menu can have one of
- | seven line modes:
-
- Choice - will interact with the assigned menu mode
- | ExecOnly - will only execute a procedure in Process
- Comment - a line that can't be HiLited
- Partition - draws a horizontal line across window
- ToDataWndw - links a data entry window when selected
- ToSubMenu - links a submenu when selected
- ToUserWndw - links a user defined window
-
- In "Choice" mode, the line is a valid selection.
-
- . For ExecSingleChoice..MultipleChoice menus, the boolean data
- for the choice is stored in the menu record for each line.
- And for this reason, all menus are unique; they cannot be
- | linked again to another submenu unless you store a copy of
- | the values before reusing it.
- . For "Exec-" type menus, a selected line executes it's
- procedure through an interface procedure called "Process".
- This will let you do just about anything, including any
- changes to the menus; e.g., take you step-by-step through
- data entry windows using PopLevels and Pull.
- . If a data entry window is linked to an "Exec-" type menu, it
- will execute AFTER the data is entered. An example of this
- is the "save As" line in "Files". Once you select "save
- As", it prompts you for the file name and then executes.
-
- | In "ExecOnly" mode, the line overrides the menu mode and runs
- | through the Process procedure just like a Choice in an
- | "Exec-" type menu, but will not set any flags.
-
- In "Comment" mode, the HiLite will simply skip over the line.
- This allows the user to place descriptions or whatever in the
- menu without being a possible selection. There are two lines in
- the "Files" menu that are comments.
-
- "Partition" is a horizontal line to separate menu lines into
- groups. See ShowMenu in PULL15.INC for the five different
- types. You specify the value of LinkNum in [11,12,21,22]. Any
- other values will simply use the bottom border line for the
- partition. "Files" in the demo has a partition in the second
- line from the bottom.
-
- No matter what the menu mode is, if the line mode is a link
- (ToSubmenu, etc.), it will just pull the linking menu or window.
- However, a ToDataWndw line on an "Exec-" type menu will execute
- a procedure in Process after entry.
-
- Attributes - The definitions of the attribute identifiers are
- suffixes of:
-
- -Attr - normal attribute
- -Hattr - attribute for HiLite
- -Wattr - attribute for Window area
- -Battr - attribute for Border of window
- | -Lattr - attribute for the command Letter
- | -Cattr - attribute for a Comment line
-
- The attributes are handled by groups in PULL15.INC. For
- example, the value for SubMenuWattr sets all SubMenus with the
- same value. For exceptions, use "GetOverrideStats".
-
- | Monochrome - Keep in mind that different displays and monitors
- | don't always appear comparable. Monochrome modes and displays
- | require some special considerations. See SUGGESTIONS and
- | QWIK30.ARC as well.
-
- Status Line - Keep in mind that there may develop several look-
- alike programs, so it would be helpful to have a title for your
- program on row 1 or 2 (unless of course you place it in the work
- window). You can easily delete the line by setting
- "TopMenuRow:=1" and "MainMenuRow:=2".
-
- Command Sequences - PULL15.INC keeps track of the key strokes
- used to access a pull-down menu in the string "CmdSeq". F10 is
- not included since it is understood. When using "Pull" and
- "Pop" (see below), the user can programmably change the sequence
- with string "MoreCmdSeq". The word "More" means that there are
- additional keys yet to be executed. (Be sure to leave "CmdSeq"
- untouched.)
-
- MainMenu Record - Here's a list of what's contained in each
- record:
-
- Title - a string required to appear in the Top Menu.
- CmdLtrs - a string which is done automatically by
- PULL15.INC and contains the first letters of
- each menu line. If you want some other letter,
- you can edit it in "GetOverrideStats".
- Line - string to appear on a menu line.
- LineMode - one of the 6 line modes for each line.
- Flagged - boolean for each line used for MultipleChoice
- and SingleChoice menus.
- LinkNum - the index number of the linking SubMenu or
- DataWndw. (Also for partition numbers)
- LinkDir - linking SubMenu or window to appear Left or
- Right, handled by PULL15.INC.
- MenuMode - one of the 3 menu modes.
- MenuLines - quantity of lines in this menu.
- NameCol - the column of title in the top menu.
- Row,Col,Rows,Cols - location and size of the menu which is
- done by PULL15.INC
- DefaultLine - the HiLite line at startup.
- HiLiteLine - line currently HiLited
- SingleFlagLine - the only line flagged. Needed only in
- SingleChoice menus (only for "Choice" lines).
- | Battr,Wattr,Hattr,Lattr,Cattr - attributes set for this menu.
- Border - one the 10 borders done by PULL15.INC.
- BackToDefault - if true, HiLite will return to DefaultLine
- every time the menu is pulled.
- Changed - set to true if SingleFlagLine or Flagged have
- been altered. The user must reset this back to
- false to be useful.
- MsgLineNum - the index number of the MsgLine.
- HelpWndwNum - the index number of the HelpWndw.
-
- SubMenu Record - The SubMenu record is identical to the MainMenu
- record. There are some differences in use though:
-
- Title - same string of the linking menu line supplied by
- PULL15.INC.
- NameCol - not used.
-
- Practically speaking there is no limit to the number of submenus
- that can be linked (<256).
-
- Data Entry Windows - Data entry windows are different from
- menus because they are merely a scratch pad. They don't save
- any data in the record. The data it picks up is stored by user
- variables in another interface procedure called "DataTransfer".
- Even their locations on the screen are assigned at the time when
- the user presses RETURN on the menu. So, the user can use a
- single window for any number of links. I call them floating
- windows. However, when the window won't fit, the program
- centers it on the screen. The user can keep it from floating by
- assigning non-zero coordinates to RowAlt and ColAlt. Setting
- them back to zero will allow them to float again. Since data
- windows can float, there's no limit for the number of places
- they can be used.
-
- DataWndw Record - The DataWndw must be typed to allow PULL15.INC
- to compile whether PULLDE15.INC is included or not. Here's the
- list:
-
- Line[1] - label for the current value of the data.
- Line[2] - label for the new data entry.
- TypeOfData - type of data expected for this window.
- Row,Col,Rows,Cols - location and size of the window which is
- done by PULL15.INC
- RowAlt,ColAlt - alternate location of window.
- FirstCol - first column of the data field, handled by
- PULLDE15.INC.
- Field - number of columns reserved for data entry.
- Decimals - number of decimal places for Reals only. If
- positive, uses R:F:D format. If negative, uses
- R:F.
- Wattr,Hattr,Battr - attributes set for this window.
- Border - one the 10 borders done by PULL15.INC.
- MsgLineNum - the index number of the MsgLine.
- HelpWndwNum - the index number of the HelpWndw.
-
- HelpWndw Record - The HelpWndw displays a number of HelpLines in
- sequence. It starts with FirstLine and displays each successive
- | HelpLine until the window is full set by LinesToShow. The
- | intialization default assumes LinesToShow is simply the
- | difference between the first and last lines. Here's the list:
-
- FirstLine - the index number of HelpLine.
- LastLine - currently unused.
- LinesToShow - number of lines to show.
- Row,Col,Rows,Cols - location and size of the window which is
- done by PULL15.INC
- Wattr,Battr - attributes set for this window.
- Border - one the 10 borders.
- Zoom - if set true, the window will zoom.
- Shadow - shadow effect on Left, Right, or NoDir.
- MsgLineNum - the index number of the MsgLine.
-
- | Wattr, Battr, Border, Zoom, Shadow, and MsgLineNum for all
- | HelpWndw's are handled as a group by PULL15.INC with
- | HelpWndwWattr, HelpWndwBattr, HelpWndwBrdr, HelpZoom,
- | HelpShadow, and HelpMsgLineNum respectively. Help windows are
- optional. To delete them, assign #00 to HelpKey so they can't
- be accessed.
-
- HelpLine - This is the text for the help windows. It was set up
- as an array rather than a record to help save memory space. The
- length need not be the width of the window.
-
- MessageLine - These lines are intended to show the user the
- number of commands or keys available at any step. The length
- should fill one entire row.
-
- ErrorMsgLine - These lines are shorter than MessageLines and
- temporarily overlays a MessageLine. They need not fill one
- entire row. They are intended of course to indicate errors.
-
-
- STEP 3: GetOverrideStats
-
- Purpose - If the user wants to change any data that PULL15.INC
- has handled as a group with GetUserPullStats, this is the
- procedure to do it. See PULLDEMO.PAS for some examples.
-
-
- STEP 4: DataTransfer
-
- Purpose - If the data entry file PULLDE15.INC is used,
- DataTransfer will be needed to transfer data from the floating
- windows to the appropriate variables. This is done with the
- DataPad.
-
- DataPad Record - Before I give an explanation, here's the
- description of the record:
-
- StoreMode - if true, data will be stored from the data pad to
- the user variable. Otherwise, it reads the
- variable and places it on the pad.
- Valid - if true, numerical data is within typed limits.
- DataStored - if true, data was stored successfully without a
- range error.
- NewData - if true, data will be overwritten on the pad.
- TypeOfData - type of data on the pad. TAG FIELD for VARIANT
- record.
- | Bdata - Byte identifier in field list.
- | Idata - Integer identifier in field list.
- | Rdata - Real identifier in field list.
- | UNdata - UserNum identifier in field list.
- | Cdata - Character identifier in field list.
- | Sdata - String identifier in field list.
- | USdata - UserString identifier in field list.
-
- If your not familiar with variant records, better read the
- manual again. Simply speaking, all variables in the field list
- all occupy the same address. The only way you know what type of
- data you have is by what is assigned to TypeOfData
- | (Bytes..UserStrings). You can check the value on the pad at
- | anytime; just be sure to use the correct identifier. (The names
- | were changed in this version to be unique from global variables.
- | A quirk in TP3.0 will not correctly address "FOR" statements
- | under "with DataPad do" if identifiers of the same name are
- | global and also in the variant field.)
-
- | UserNum/UserStrings - These two types are actually strings and
- | should appear on the data pad as strings. The new type helps to
- | correctly identify and justify the data by default. It also
- | allows you to customize the characters allowed at data entry
- | with the use of UserCharSet.
-
- Menu coordinates - Matching variables with windows is easily
- done by identifying the menu line that pulled the data window.
- The variables used are:
-
- MPulled - index number of MainMenu pulled.
- SPulled - index number of SubMenu pulled. If equal to zero,
- then only a MainMenu was pulled.
- HiLited - menu line that links the data window.
-
- With these, the DataTransfer procedure is just one big case
- statement that narrows down the correct user variable.
-
- Range check - Please note that the data here is not stored
- unless it passes BOTH the validity check and an optional range
- check. The demo shows you how to use a field identifier on the
- DataPad to check for range on the variable PriceLimit. Make
- SURE that the type of data MATCHES! Turbo will not check it.
-
-
- STEP 5: Application Procedures
-
- This is a good place to put all your application procedures,
- both for procedures used by the menus (Process) and the work
- window(s) (WorkWndw). The demo uses only one called
- DummyProcess which is just a one second delay.
-
-
- STEP 6: Process
-
- Purpose - "Process" is the procedure accessed by the menus which
- have and "Exec-" type mode and any menu line of Choice. This is
- where you can make the menus do just about anything.
-
- Menu Coordinates - "Process" uses the same coordinate variables
- as DataTransfer and uses a case statement the same way to locate
- the correct procedure with MPulled, SPulled and HiLited.
-
- Pull/Pop - Programmably you can pull or pop menus in your
- procedures at any time. Try F10 and "IU" in the demo to see
- just a few of the possibilities of programmable control. There
- are 5 flag variables and one function that hook into PULL15.INC
- to do this:
-
- PopToWorkWndw - if set true, control is returned to the work
- window.
- PopToTop - if set true, menus are popped only to the top
- menu.
- PopLevels - the number of levels to pop.
- Popped - a function that will pop all menus before
- processing.
- MoreCmdSeq - a string of pending command letters.
- Pull - if set true, menus will be pulled after pop as
- specified by MoreCmdSeq.
-
- You can combine these in several ways. You can even make data
- windows enter data sequentially for records or to make it easier
- for end users automatically step through data entry. An example
- of this is in the demo under "IRSaccounting" and "Date". You'll
- notice how easy it is to roll through the data windows with
- RETURNs.
-
-
- STEP 7: WorkWndw
-
- Work Window - When the menus are not pulled, this is where there
- is most of the programming activity. You can even have multi-
- level work windows. Note also that you can work with two or
- more windows on the screen at the same time with the use of
- | LIcurrent in WINDOW34.INC provided they don't overlap. In the
- | new version, WINDOW40.INC, all windows can be randomly
- | accessed (revealing a covered window) or moved by the end user.
-
- WorkWndwStep - Since each keystroke goes through the key
- dispatcher, the number of WorkWndwStep tells the program where
- to return upon re-entering WorkWndw. You can change its value,
- even while in the menus.
-
- WorkWndwEntry - You can now use the same data entry procedures
- as the data entry windows for the work window with
- WorkWndwEntry. Notice that you must set DataPad.NewData:=true
- before using it. There is one difference though; the data is
- stored right after it passes the validity test. If it doesn't
- meet the range test, then the data must be restored with
- RestoreData.
-
-
- STEP 8: DisplayScreen
-
- This procedure finally sets up your screen design.
-
-
- STEP 9: Main Program
-
- Initial Values - Here is where you place the initial values for
- user variables.
-
- Reducing code - All procedures executed by InitPull are only
- done once and never used again. There's lots of code there and
- you could probably reduce your code by making an overlay file or
- something.
-
- GotoKeyDispatcher - Since each keystroke needs to be analyzed,
- the dispatcher decides whether it goes to the Menus or WorkWndw.
- Here's a flow chart for the dispatcher:
-
- +------------+
- | START |
- +------------+
- |
- /\
- / \
- +-------------+ No / \ Yes +-------------+
- | Work |<--------< PULL ? >--------->| Pull-down |
- | Window | \ / | Menus |
- +-------------+ \ / +-------------+
- | \/ |
- | /|\ |
- | | |
- | | No |
- | /\ |
- | / \ |
- | / \ |
- ---------------->< QUIT ? ><------------------
- \ /
- \ /
- \/
- | Yes
- \|/
- +------------+
- | END |
- +------------+
-
-
- SUGGESTIONS:
-
- | Full Demonstration - If you would like to see a fully working
- | utility created from these procedures, you can get a file called
- | WSX21.ARC. It is a WordStar Translator program for WordStar
- | 3.31/4.0, but you don't have to have WordStar to examine it. It
- | has pull-down directories, WYSIWYG color modifications, and other
- | ideas. The ARC file does not contain the source code, but it is
- | available upon request. WSX21.ARC can be found on the
- | CompuServe MicroPro (GO MICROPRO) in the WordStar 4.0 Data
- | Library (DL3).
-
- | On-line source - All updated files can be found on the CompuServe
- | Borland Forum (GO BORPRO) in the MSDOS Turbo Pascal Data Library.
-
- Compiling Speed - Since there is a significant amount of code in
- the include files, you will find that you can decrease compiling
- time by accessing the files from RAM disk.
-
- Fast Keyboard Repeat - The best utility I've found to double the
- typematic rate is a utility called HOTKEY.ARC. It's better than
- PC Magazine's QUICKEYS, because it doesn't "run away" in the
- buffer. Available on CompuServe's IBM Hardware Forum.
-
-
- LIABILITY:
-
- No liabilities are assumed in the use or misuse of these
- procedures.
-
-
- AUTHOR:
-
- These procedures are now Shareware. If there are any problems,
- please let me know.
-
- Copyright (c) 1987 by James H. LeMay
- All rights reserved
- Jim LeMay, 6341 Klamath Rd., Ft. Worth, TX 76116
- CIS 76011,217, 1-(817) 732-7150 (after 1730 PST)
-
-
- CREDITS:
-
- Art Hill started some initial ideas on this with PullDown.arc
-
- Art Hill, 936 S. Kensington Ave., La Grange, IL 60525
- CIS 72307,3570
-
-
- REVISIONS:
-
- Version 1.1 (02-27-87):
- . Initial release
-
- Version 1.2 (04-08-87): [limited release]
- . Separated data entry procedures into separate include file.
- . Created a key dispatcher and added WorkWndw procedure.
- . Improved Pull/Pop hooks.
- . Made menus 2 columns wider for readability.
- . Made title arrows a different symbol than the Choice flags.
- . Added data entry capability to the work window.
- . Changed "Ch" to "Key".
- . Changed key codes to constant identifiers.
- . Changed command key from "/" to F10.
- . Changed attribute identifiers for consistency.
-
- Version 1.3 (04-20-87):
- . Added Partition to the LineMode.
- . Made both "/" and F10 to be command keys.
- . Changed the following identifiers:
- SelectMode -> LineMode
- NoChoice -> Comment
- SingleSel -> SingleFlagLine
- Selected -> Flagged
- (These were changed for the sake of better understanding.
- I don't plan on changing any more to keep compatibility.)
- . Changed the Teamware restrictions.
-
- Version 1.4 (06-30-87): [limited release]
-
- | Version 1.5 (08-31-87):
- | . Incorporated QWIK30.INC and WINDOW34.INC for full IBM
- | compatibility.
- | . Used names (typed scalars) rather than numbers to identify
- | menus, windows, and help lines.
- | . Added combination menu modes ExecSingleChoice and
- | ExecMultipleChoice.
- | . Added line mode type of ExecOnly to be independent of menu
- | Choice.
- | . Added TypeOfDataTypes UserNums and UserStrings for user-
- | defined sets.
- | . Added Lattr (command Letter) and Cattr (Comment) attributes
- | to each menu.
- | . Added StatusAttr for the first row attribute.
- | . InitAttr is now the parameter in InitPull.
- | . Deleted HaveEGA to conform to QWIK30.INC.
- | . Changed names of variant identifiers in DataPadRec.
- | . Modified cursor handling and eliminated separate cursor
- | modes.
- | . Separated color initialization procedures.
- | . Changed Home and End cursor keys to perform more like
- | WordStar.
- | . Released as Shareware.