home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / MGTP4.ZIP / MINIGEN.DOC < prev    next >
Encoding:
Text File  |  1988-05-22  |  29.3 KB  |  626 lines

  1.                                                      January 16, 1988
  2.  
  3.     To :   Minigen Users
  4.     Fm :   Eric H. Snyder
  5.            MiniGen Products
  6.            1417 Evergreen
  7.            Homewood, IL  60430
  8.     Re :   Minigen V1.3 Pascal screen code generator.
  9.  
  10.  
  11.                   Belief is nearly the whole of the Universe,
  12.               whether based on truth or not.
  13.                          - Kurt Vonnegut -
  14.  
  15.  
  16.  
  17.          Minigen is a Turbo Pascal(tm) V4.0 code generator designed to work
  18.     on an IBM PC or compatible with a MonoChrome or Color Graphics Adapter
  19.     installed. With it you can paint data entry screens (constants areas
  20.     and data fields), open and close windows with borders and cursor
  21.     memory, perform controlled data entry with type and range checking, and
  22.     create pull down menus. There are also a number of utility procedures
  23.     and functions which support common DOS calls and disk functions. How
  24.     you use MiniGen is up to you, but its strong points are data entry and
  25.     screen handling.
  26.  
  27.          I have chosen to Copyright this version of MiniGen, but to place
  28.     it to the public domain for free distribution. Like many products of
  29.     this nature, MiniGen is user supported, and carries a modest
  30.     registration fee of $10.00. If you use MiniGen at home, at school, or
  31.     in business, and find that it meets your needs, you are asked to send
  32.     in your registration fee. You will be posted on upcoming versions of
  33.     the product and where to get them. But whether you register or not, let
  34.     me know your reaction to the product pro or con, and how it could be
  35.     made more useful to you.
  36.  
  37.          MiniGen is entirely written in Turbo Pascal (tm) using the same
  38.     source code routines you have received on disk. Now, here's what you
  39.     can do with it.
  40.  
  41.          1)   Screen paint text areas (put words on the screen), fields
  42.     (colored backgrounds of a certain length), and vertical and horizontal
  43.     lines. Thus you lay out the physical appearance of a screen. Your
  44.     default boundaries are 1,1,80,25.
  45.  
  46.          2)   Perform controlled data entry using single line keyboard
  47.     commands as well as the cursor key pad. You can specify what data type
  48.     is being entered as well as the maximum and minimum range values of
  49.     numerics. Exit codes allow you to determine how the user terminated the
  50.     procedure.
  51.  
  52.          3)   Open and close windows with one of eight boxes drawn around
  53.     them. Cursor memory is retained so that when you close the window, it
  54.     will be returned to the same position it had before the window was
  55.     opened.
  56.  
  57.          4)   Create pull down menus with reversible backgrounds controlled
  58.     by the up and down arrow keys. You'll get the idea while working with
  59.     MiniGen in edit mode.
  60.  
  61.  
  62.  
  63.  
  64.  
  65. MiniGen Page 2
  66.  
  67.          Eventually, the package will generate data entry programs which
  68.     will automate the process of gathering data from the screen. Additional
  69.     utility functions will be added as the need arises, or the spirit moves
  70.     me. Any more ideas? Suggestions and constructive criticism are
  71.     encouraged and welcome.
  72.  
  73.  
  74.                  {************}  Screen Painting  {************}
  75.  
  76.          All screen painting is done with MINIGEN.EXE. The options on the
  77.     main menu are pretty much self explanatory, but I'll go into them here
  78.     anyway.
  79.  
  80.          1)  Load a screen data file. You don't have to do all your work in
  81.     one sitting. You can resume working on a screen at a later time with no
  82.     loss of data. ESCape lets you exit the function.
  83.  
  84.          2)  Save the current screen definition file for future
  85.     modifications and abandon it to work on another screen file (or quit
  86.     the program). This feature is convenient when developing an application
  87.     that has similar screen elements, like a series of data entry programs
  88.     which share a common page header and trailer structure. By creating a
  89.     single file containing these elements you can pull it in for every
  90.     screen, and write it out under a different name. If you with to save
  91.     periodically as you go along, use the 'B' for backup command. You can
  92.     then continue editing the screen with option '6'. ESCape lets you exit
  93.     the function.
  94.  
  95.          3)  Define a screen. You will be prompted for the four corners of
  96.     the screen and its background color. You can hop back and forth between
  97.     the corner data fields by using the ^J and ^K, and at he Up arrow and
  98.     Down arrow keys. When selecting the background color, the Up and Down
  99.     arrow keys will move the reverse video block to the selection you want.
  100.     Just press RETURN to make your selection. Hitting escape from any field
  101.     returns you to the home position to make another selection.
  102.  
  103.          4)  Make a procedure. This option will create a Turbo Pascal(tm)
  104.     source code procedure from the loaded screen file, which will display
  105.     your data entry screen. You will be prompted to supply the name of the
  106.     include file into which you wish the procedure to be placed. If the
  107.     file already exists, you will be asked if you wish to overlay it with
  108.     the new file. You will then be prompted for the name of the procedure
  109.     itself. Supply a valid Pascal procedure name.
  110.          At this point, you will be asked whether you wish to create an
  111.     overlay procedure. This is a very important question. For one thing,
  112.     overlays are not supported in version 4.0. However, there are packages
  113.     which let you create them and Borland says that they will build them
  114.     back in to future versions. So I decided to leave this capability in
  115.     MiniGen.
  116.          If you choose not to use an overlay, a standard procedure is
  117.     generated and the calling procedure is as follows;
  118.  
  119.                    OpenWindow(1);
  120.                    MainMenuScreen;  {Or whatever name you pick.}
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127. MiniGen Page 3
  128.  
  129.          Just be sure that the window you open is the one designed for that
  130.     procedure, and the fields you have defined will appear within it. The
  131.     window will be opened, and the screen displayed within it.
  132.          However, if you choose to create an overlay, your program must be
  133.     structured differently. The Overlay procedure will load all your fields
  134.     into a linked list and set a Boolean flag telling MiniGen that it has
  135.     done so. Just issue
  136.  
  137.                    MainMenuScreen(1);
  138.  
  139.     at the start of your program after defining your screens. Notice that
  140.     the procedure now needs a parameter. This tells MiniGen which window
  141.     will own these fields. Now when you issue
  142.  
  143.                    OpenWindow(1);
  144.  
  145.     in your program, the linked list will be searched for the window number
  146.     (in this case 1), and the fields will be written automatically. This
  147.     gives you several advantages. You will save code and data space by
  148.     storing these procedures outside your program. Hence your MiniGen
  149.     programs can now be bigger. Also, your programming life is simplified.
  150.     All you have to do is to open the window. As before, be sure that the
  151.     window you associate with the procedure is the one designed for that
  152.     it. As before, the ESCape sets you free.
  153.  
  154.          5)  Clear the screen. No, not the Pascal procedure! This selection
  155.     will erase the file currently in memory and let you start out fresh.
  156.  
  157.          6)  Resume editing. If you have exited edit mode for any reason
  158.     and wish to resume editing the same window, you may do so. Remember,
  159.     saving a file clears it out of memory (abandons it). To perform a
  160.     periodic save, Press ['B','b'] for backup then resume editing with 6.
  161.  
  162.          7)  Execute Turbo. Executes Turbo Pascal(tm) if it can be found in
  163.     the current directory. Here is a convenienc way to develop your MiniGen
  164.     rograms step by step. Escape to DOS from MiniGen. Copy MGSkel.Pas to a
  165.     file bearing your program name. Exit. Define your screens in MiniGen,
  166.     saving them to data files along the way. Create their procedures, then
  167.     execute Turbo. Modify the skeleton program with screen definitions,
  168.     includes for generated screen procedures, calls to window and screen
  169.     procedures, and  compile a test program to see what the screens look
  170.     like, or how several appear together. Change what you don't like and go
  171.     at it again. Be sure to save your screen data files along the way so
  172.     they can be called back in for future modification. Once you have all
  173.     the fields where they should be it is a simple matter to add in the
  174.     code which writes gathered data to a file, performs a function, etc. I
  175.     generated the WIDGIT example program this way!
  176.  
  177.          8)  Escape to DOS. Lets you get out of MiniGen and go do something
  178.     else for a while. When you tire of that, you can return to MiniGen by
  179.     typing EXIT at the DOS prompt. (Be sure to get yourself back into the
  180.     proper directory first.)
  181.  
  182.          Q)  Exit. You got it.
  183.  
  184.          B)  When you save a screen with option '2', you also abandon it.
  185.  
  186.  
  187.  
  188.  
  189.  
  190. MiniGen Page 4
  191.  
  192.          This is inconvenient if you want to store part of your work as you go
  193.     along so it will not be lost accidentally. 'B' or 'b' will save the
  194.     file you are working on and allow you return to edit mode with option
  195.     '6'.
  196.  
  197.          E)  MGEdit. This is a very straight forward text editor which can
  198.     be executed from within MiniGen in the same way that you execute Turbo.
  199.     It obeys a good number of the Turbo editor commands. It is not terribly
  200.     elaborate, but is more than adequate for the tasks for which it is
  201.     intended, namely, your convenience in getting off to a running start
  202.     with your programs. Any serious editing will of course be done with
  203.     Turbo or a formal programmer's editor. If you select the 'E' function
  204.     right after creating a procedure (option 4), the editor will pull in
  205.     that procedure automatically.
  206.  
  207.  
  208.                     {************}  EDIT MODE  {************}
  209.  
  210.          Once you have defined a screen (option 3), or loaded a screen
  211.     (option 1), or resume editing (option 6), the program hops into edit
  212.     mode. This is where the real work gets done. From edit mode you can;
  213.  
  214.          1)  Move the cursor within defined screen boundaries.
  215.                Up  -  ^E, up arrow,
  216.              Down  -  ^X, down arrow,
  217.             Right  -  ^D, right arrow and
  218.              Left  -  ^S, left arrow.
  219.  
  220.          2)  F1 - Define a screen object. This will take you into object
  221.     definition. You can specify the type of object (text, field, horizontal
  222.     or vertical), its foreground and background colors, length and contents
  223.     of text objects. Here are some points to keep in mind.
  224.               a) If you try to define an object on top of another, you will
  225.                  be prompted to respond (Y)es, (N)o, (O)verlay or
  226.                  (R)eplace.
  227.               b) The color block on the right hand side of the top window
  228.                  lets you know what the field looks like so far.
  229.               c) The right and left arrow keys will let you move back and
  230.                  forth between the pull down menus.
  231.               d) Likewise, ^J and ^K, or the up and down arrow keys, let
  232.                  you get into and out of length and contents description.
  233.               e) ESCape gets you out of object definition.
  234.               f) When defining a horizontal or vertical line, you will have
  235.                  to hold down the ALT key and type in the ASCII value of
  236.                  the box drawing character you wish to enter. These are
  237.                  found from characters 179 to 218 of any complete ASCII
  238.                  character code chart.
  239.  
  240.          3)  F2 - See a display of all possible background and foreground
  241.     combinations (except the ones that blink, which give me the jitters
  242.     anyway and whose use should be restricted to temporary error messages,
  243.     if then).
  244.  
  245.          4)  F10 - Return to main menu. (Also ^Z.)
  246.  
  247.          Now, I will discuss the various procedures which you have in the
  248.  
  249.  
  250.  
  251.  
  252.  
  253. MiniGen Page 5
  254.  
  255.  
  256.     MiniGen environment and how to use them.
  257.  
  258.  
  259.                     {************}  Windowing  {************}
  260.  
  261.          Opens and closes windows with boxes and colored backgrounds which
  262.     you specify. Several procedures and one constants are involved as
  263.     follows. In order of use, they are;
  264.  
  265.                 Const
  266.                   ScreenCount = N;
  267.  
  268.           ScreenCount declares the number of screens you can define (N),
  269.     but not the number of screens you can open at one time.
  270.  
  271.          DefineScreen(Ind,X1,Y1,X2,Y2,BGColor,FrameType,FrameColor);
  272.            Where: Ind = Which window this is - 1,2,3,4, etc.
  273.                   X1,Y1,X2,Y2 = Window coordinates, just like the Turbo
  274.                                 window procedure.
  275.                   BGColor = Background color (1-8), of the opened widow.
  276.                   FrameType =
  277.                      1 - Single bar.                  - 5
  278.                      2 - Double bar.                  - 6
  279.                      3 - Horiz double, vert single.   - 7
  280.                      4 - Vert double, horiz double.   - 8
  281.                   FrameColor : Any valid attribute byte.
  282.                                (See 'A Note on Attributes', below.)
  283.  
  284.          DefineScreen(); describes a window to be opened, and associates it
  285.     with the index number used in OpenWindow. Types 5 thru 8 on the left
  286.     have top corner characters which join nicely to the bottom of their
  287.     corresponding boxes on the left. These are the ones I used when writing
  288.     the field definition section (F1) of the Edit mode.
  289.  
  290.               OpenWindow(N);
  291.  
  292.          OpenWindow(); opens the specified window (the one specified in Ind
  293.     above). OpenWindow received quite a face lift for V1.2. It no longer
  294.     stores all 4000 bytes of screen data. Instead, only that portion of
  295.     video memory within the boundaries of the opened window is saved. This
  296.     reduces the memory requirements of each window down to only what is
  297.     needed. If you are interested in how it is done, take a look at the
  298.     function SaveWindowContents which is internal to procedure OpenWindow.
  299.     I have not seen quite this algorithm used elsewhere. It is based on the
  300.     concept of buffering strings to save space and does its business by
  301.     advancing a pointer in preparation for a move statement.
  302.  
  303.                 CloseWindow;
  304.  
  305.          CloseWindow; closes the current window and restores the screen to
  306.     its original condition.
  307.  
  308.                 TerminateScreens;
  309.  
  310.          TerminateScreens; Cleans up behind the Initialize routine. This
  311.     procedure is called once from the main routine on the way out of your
  312.     program.
  313.  
  314.  
  315.  
  316.  
  317. MiniGen Page 6
  318.  
  319.  
  320.                    {************}  Data Entry  {************}
  321.  
  322.          The EnterData function controls data entry by giving you
  323.     keyboard commands and letting you specify  data type and what key(s)
  324.     exit the routine. Numeric data is entered with range checking and
  325.     commas displayed upon exiting if field size allows. If you do not want
  326.     range checking, call MaxLimits; (described below), at the start of the
  327.     program. Otherwiswe, simply set the Upper??? and Lower??? variables for
  328.     the type you are entering before calling the EnterData function. A
  329.     status code is returned telling you whether the function was terminated
  330.     as the result of an exit key, a carriage return, ^M, or (for 'S'
  331.     strings), by typing past the end of the field. When called initially,
  332.     EnterData displays the value it finds in the field you pass. If an exit
  333.     code is returned, the value of the subject variable is unchanged unless
  334.     you specify otherwise for that exit code in UserExitSet, described
  335.     below.
  336.          One nice feature of this procedure (and pull down menus), is that
  337.     it will blank the screen for you if a certain amount of time goes by
  338.     without receiving any input from the keyboard. A typed constant in
  339.     MGPROG.PAS named MG_TimeOut is initially set to 300, giving you 5
  340.     minutes of inactivity before the ScreenSaver() procedure blanks the
  341.     screen. Once this happens, just hit any key and the screen will come
  342.     back unchanged. I have seen lots of terminals ruined by constantly
  343.     active displays. So protect those phosphors for future generations and
  344.     save yourself or your company a buck in the process! If you do not wish
  345.     this feature to activate, set MG_TimeOut to a very high duration which
  346.     is not likely to expire such as 18,000 for a five hour fuse.
  347.  
  348.          Var
  349.            UpperByte,LowerByte : Byte;     {Range checking limits}
  350.            UpperInt,LowerInt   : Integer;
  351.            UpperReal,LowerReal : Real;
  352.  
  353.          Procedure MaxLimits;    {Sets Range check values to maximum}
  354.  
  355.          Upper??? and Lower??? variables are used to set the limits for
  356.     numeric data entry. Always assign values to the proper set of limit
  357.     variables calling EnterData(); (U/L byte for VarTyp = 'B', etc.),
  358.     because they will be used for range checking regardless.
  359.          Use Maxlimits if numeric ranges are not important to you for any
  360.     particular EnterData(); call. It will set all six limit variables to
  361.     their extreme values.
  362.  
  363.          Type
  364.            Exits = Set of Byte;
  365.  
  366.     EnterDAta(Variable,VarTyp,XLoc,YLoc,Len,Decs,FieldAttr,CursorAttr,Exits);
  367.          Where: Variable = The variable to be entered, of course!
  368.                  VarTyp  = 'B'(Byte),'I'(Integer),'R'(Real),
  369.                            'N'(Numeric only string data) 'S'(String, data:
  370.                               all letters, numbers and special characters)
  371.                            'A'(Alphabetics),U(Upper case),L(Lower case)
  372.                            'M'Here is were you specify which characters
  373.  
  374.  
  375.  
  376.  
  377.  
  378. MiniGen Page 7
  379.  
  380.                               are to be considered valid. Before you call
  381.                               EnterData with a VarTyp of M, assign a set
  382.                               of characters to a MiniGen reserved variable
  383.                               called UserEditSet, which is a Set of Char.
  384.                               This set of characters will be used by
  385.                               MiniGen while the variable is entered.
  386.                            'X'(Anything from #32 to #254)
  387.                XLoc,YLoc = X and Y coordinates.
  388.                      Len = length of field.
  389.                     Decs = Number off decimal points (used with reals).
  390.                FieldAttr = background/foreground attribute.
  391.               CursorAttr = same as FieldAttr, but for the cursor only.
  392.                    Exits = a set of integer values representing the decimal
  393.                            value of the keystrokes you wish to use to
  394.                            exit the routine.
  395.                         13 - Carriage return. Returns your variable.
  396.                            << Always exits. Do not code as an exit!! >>
  397.                          0 - Typing off the field of a string item.
  398.                              Returns your variable.
  399.                            << Always exits. Do not code as an exit!! >>
  400.                         10 - Line feed.
  401.                         27 - ESCape.
  402.                         59..68,84..93,94..103,104..113
  403.                            - All function keys (NoShft,Shft,Ctrl,Alt)
  404.                        119 - Ctrl Home
  405.                        117 - Ctrl End
  406.                     73,132 - PgUp : Unshft, Ctrl
  407.                     81,118 - PgDn : Unshft, Ctrl
  408.                      72,80 - Up arrow, down arrow : Unshft
  409.                      3,114 - ^2, ^*
  410.                    120-131 - Alt's 1..9,0,-,=
  411.                    30,48,46,32,18,33,34,35,23,36,37,38,50,
  412.                    49,24,25,16,19,31,20,22,47,17,45,21,44
  413.                            - Alt'd alphabetics
  414.                    4,9,11,14,15,16,17,18,20,23,25,26
  415.                            - ^C,^I,^K,^N,^O,^P,^Q,^R,^T,^W,^Y,^Z
  416.                        -13 -  ^M produces a negative thirteen to
  417.                               distinguish it from the enter key.
  418.                               Just as 13 (and 0 for 'S'), always exit and
  419.                               return data, -13 always exits without
  420.                               returning your data. Thus, even if you code
  421.                               EnterData(); with Exits = [], the user can
  422.                               always leave the routine without changing
  423.                               anything.
  424.                            << Always exits. Do not code as an exit!! >>
  425.                         -1 -  Negative 1 indicates a parameter error.
  426.                               Included for your convenience during program
  427.                               development.
  428.                            << Always exits. Do not code as an exit!! >>
  429.  
  430.          EnterData obeys the following commands;
  431.  
  432.                   ^D, RArr - Cursor right
  433.                   ^S, LArr - Cursor left
  434.                  ^F, ^RArr - Jump right a word
  435.                  ^A, ^LArr - Jump left a word
  436.  
  437.  
  438.  
  439.  
  440.  
  441. MiniGen Page 8
  442.  
  443.                        Tab - Right justify string fields
  444.                   Shft Tab - Left justify string fields
  445.                    ^G, Del - Delete a character
  446.                    ^V, Ins - Toggle insert function
  447.                   ^H, Bksp - Destructive backspace
  448.                         ^B - Toggle key click noise
  449.                         ^U - Convert an 'S' string to all upper case
  450.                         ^L - Convert an 'S'string to all lower case
  451.                       Home - Go to first position
  452.                        End - Go to last position
  453.                         ^E - Erase from current position forward
  454.                         ^X - Erase entire field
  455.  
  456.          As stated, the data entered will be returned to your Variable when
  457.     EnterData(); terminates with an exit code of 0 or 13. That is to say,
  458.     Exits leave the contents of your Variable unchanged. This is exactly
  459.     what you will want in most cases.
  460.          However, you can override this behavior. MiniGen contains a
  461.     reserved variable called UserExitSet, which is a set of Byte. By
  462.     assigning UserExitSet, you can specify which of your EnterData(); Exits
  463.     will return data upon termination. For example, the sample code below
  464.     {1} initializes UserExitSet to the up and down arrow keys, {2} calls
  465.     EnterData(); with ESC, UpArr and DnArr as exits, {3} returns
  466.     UserExitSet to its initialized value, the null set, and {4} takes some
  467.     action based on the returned Exit. The UpArr (72) and the DnArr (80)
  468.     now return changed data which (for purposes of illustration alone),
  469.     receive special treatment.
  470.          As a general rule when programming for return codes, it is best to
  471.     code for the exception conditions first : the exits. You always have
  472.     two valid return codes in 13 and -13, and 0 for 'S'. These distinct
  473.     codes are there for your use if you need them. But by programming for
  474.     the exceptions, you can lump the remaining three together as valid and
  475.     not be bothered by having to treat them individually.
  476.  
  477.     {1}  UserExitSet := [72,80];
  478.     {2}  ReturnCode  := EnterData(AnyVariable,...,[27,72,80]);
  479.     {3}  UserExitSet := [];
  480.     {4}  Case ReturnCode of
  481.            27 : Exit;   {** Variable remains unchanged. **}
  482.         72,80 : Begin   {** Changed data returns to your program **}
  483.                 ...
  484.                 End;
  485.            Else
  486.                 ...     {** Changed data returns to your program **}
  487.            End;
  488.  
  489.                  {************}  Character Entry {************}
  490.  
  491.          Entering a single character can be performed with the EnterChar
  492.     function. You specify the variable to be accepted from the keyboard,
  493.     provide a set of acceptable characters for which the routine will wait,
  494.     and a set of byte values to serve as exits from the routine. Exits do
  495.     not have to generate extended scan codes to be acceptable. You may
  496.     specify the ord(#?) of any character to be an exit. Screen blanking is
  497.     turned on here as well.
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504. MiniGen Page 9
  505.  
  506.          EnterChar(CharVariable,GoodCharSet,ExitSet);
  507.            Where;
  508.              CharVariable = The Char you want to read
  509.              GoodCharSet  = A set of Char limiting what the routine will
  510.                             accept
  511.              ExitSet      = A set of byte listing the exits.
  512.  
  513.  
  514.  
  515.                  {************}  Pull Down Menus  {************}
  516.  
  517.          Pull down menus can be created with the Menu function. These
  518.     menus are controllable by the up and down keys. Hitting the return
  519.     key terminates the function and tells you the number of the selection
  520.     made. You are informed of exits in the same way, so it is a good idea
  521.     to make the Ord(#?) of the lowest exit higher than number of
  522.     selections you are providing to the user. The escape key causes the
  523.     function to return with a value of zero. Screen blanking is astive in
  524.     Menu. The function takes the following arguments;
  525.  
  526.          Type
  527.            Str255 : String[255];
  528.  
  529.          Function Menu(Window : Byte;
  530.                             S : Str255;
  531.                Selections,NormAttr,ReverseAttr
  532.                               : Byte;
  533.                         Exits : ExitsTyp) : Byte;
  534.  
  535.          Where: Window = the number of the window to be opened,
  536.                      S = a string variable containing a number of equal
  537.                          length sub-strings, each terminated by a back-
  538.                          slash character ('\'). These sub-strings will be
  539.                          written inside the menu window box. It is your
  540.                          responsibility to make sure that each one is the
  541.                          exact width of the box. For example, the
  542.                          following string is used in ScrnGen to display
  543.                          the possible background colors.
  544.     ' Black      \ Blue       \ Green      \ Cyan       \ ', etc, etc.
  545.             Selections = the number of sub-strings found in S.
  546.              Norm Attr = the background attribute of the window as
  547.                          specified in DefineScreen;
  548.            ReverseAttr = the background attribute (colors 1 thru 8), to
  549.                          be displayed when a selection is being
  550.                          indicated.
  551.                  Exits = the decimal value of the keystroke(s) which will
  552.                          exit the routine without making a selection.
  553.                          These are the exits which allow you to move left
  554.                          and right while selecting the attributes of a
  555.                          field in Edit mode (F1). An escape key always
  556.                          returns the value zero (0).
  557.  
  558.  
  559.              {************}  Shift Status Detection {************}
  560.  
  561.          Upon exiting the EnterData, EnterChar and Menu routines, you can
  562.  
  563.  
  564.  
  565.  
  566.  
  567. MiniGen Page 10
  568.  
  569.  
  570.     query four reserved Boolean variables to determine the shift status of
  571.     the keyboard. Such information can be used for even greater keyboard
  572.     and program control. The variables are as follows;
  573.  
  574.              RightShift    LeftShift
  575.              CtrlKey AltKey
  576.  
  577.                 {************}  Skeleton Program  {************}
  578.  
  579.          To give your programs a quick start, copy MGSkel.Pas over to your
  580.     new program name and use it to include all the minigen source files,
  581.     MGProg.Inc (windowing and data entry), MFMenu.Inc (pull down menus),
  582.     Cursor.Inc (play with the cursor), your MiniGen generated window
  583.     procedures, your other include routines, etc.
  584.  
  585.  
  586.               {************}  A Note on Attributes  {************}
  587.  
  588.          Screen color attributes are the one bytes values which determing
  589.     the foreground and background characteristics of the displayed
  590.     character. You should derive color attributes from the following table.
  591.     They are best understood in hexidecimal notation, and are constructed
  592.     as follows;
  593.  
  594.  
  595.       Bit :   7  6  5  4 | 3  2  1  0  Background - First 8 colors only
  596.              BL  R  G  B | I  R  G  B  Foreground - All 16 colors
  597.               Background | Foreground
  598.  
  599.     Black     0  0  0  0   1  0  0  0  Dark Gray       BL = Blinking
  600.     Blue      0  0  0  1   1  0  0  1  Light Blue       I = High Intensity
  601.     Green     0  0  1  0   1  0  1  0  Light Green
  602.     Cyan      0  0  1  1   0  0  1  1  Light Cyan       R = Red
  603.     Red       0  1  0  0   1  1  0  0  Light Red        G = Green
  604.     Magenta   0  1  0  1   1  1  0  1  Light Magenta    B = Blue
  605.     Brown     0  1  1  0   1  1  1  0  Yellow
  606.     Lt. Gray  0  1  1  1   1  1  1  1  White
  607.  
  608.       Source : Assembler for the IBM PC and PC-XT by Peter Abel.
  609.  
  610.  
  611.                     {************}  Warranty  {************}
  612.  
  613.          Here's where I cover my, uh, ... bases.
  614.  
  615.          I make no warranty of any kind, express or implied, including
  616.     without limitation, any warranties of merchantability and/or fitness for
  617.     a particular purpose. I shall not be liable for any damages, whether
  618.     direct, indirect, special or consequential arising from a failure of
  619.     this program to operate in the manner desired by the user. I shall not
  620.     be liable for any damages to data or property which may be caused
  621.     directly or indirectly by the use of this program.
  622.  
  623.          IN NO EVENT WILL I BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING ANY
  624.     LOST PROFITS, LOST SAVINGS OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES
  625.     ARISING OUT OF YOUR USE OR INABILITY TO USE THE PROGRAM, OR FOR ANY
  626.     CLAIM BY ANY OTHER PARTY.