home *** CD-ROM | disk | FTP | other *** search
/ Boston 2 / boston-2.iso / DOS / PROGRAM / C / TOOLS / MG.TXT < prev    next >
Text File  |  1993-12-01  |  17KB  |  408 lines

  1.  
  2.  
  3.  
  4.                                                                       
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.                                 TOOLS FOR C
  14.                        Application Development Package
  15.                                   MENUGEN
  16.                      Interactive Window and Menu Generator  
  17.  
  18.  
  19.                       Shareware Distribution Version 1.0
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.          This version of TOOLS FOR C and it's associated manuals and
  27.          support files may be freely copied and distributed as long as
  28.          it is distributed in it's entirety and no fees other than
  29.          nominal handling fees are charged.  The routines in this
  30.          library are NOT Public Domain.  This is copyrighted material. 
  31.          The intent behind distributing this version of TOOLS FOR C is
  32.          to allow you to use the package on a trial basis and determine
  33.          if it meets your needs.  If you find yourself using this
  34.          package, you MUST register by sending $45.00 to the address
  35.          listed below.  Upon receipt of your registration fee we will
  36.          send you an expanded manual, compiled libraries for all of the
  37.          memory models available with your compiler, and the complete
  38.          source code to the library. In NO EVENT may you use any of the
  39.          routines in TOOLS FOR C for commercial purposes until you
  40.          register your copy.  We feel that you will find the value of
  41.          TOOLS FOR C far exceeds the registration fee and we at BP
  42.          SOFTWARE SOLUTIONS, INC. thank you in advance for your
  43.          support.
  44.          
  45.  
  46.  
  47.  
  48.  
  49.                         BP Software Solutions, Inc.
  50.                         642 N. Commodore Drive
  51.                         Plantation, Fl.  33325
  52.  
  53.  
  54.  
  55.  
  56.  
  57.                                           Copyright (C) 1987 
  58.                                                 BP Software Solutions Inc.
  59.                                                        All Rights Reserved
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.                                 INTRODUCTION
  70.  
  71.  
  72.  
  73.          MENUGEN is a program which, in concert with the TOOLS FOR C
  74.          function library, allows you to quickly and interactively design
  75.          pop-up windows and menus for your 'C' programs. Because it
  76.          generates 'C' code which you "#include" in the source code of
  77.          your program, implementing these windows and menus is a snap. 
  78.          What you see on the screen is what you get when the file
  79.          that is produced by the generator is incorporated into your 'C'
  80.          code.
  81.  
  82.          MENUGEN has the power you need to exercise full control over the
  83.          development of menus and windows for your programs. You can
  84.          control the size of the window, it's location, type of graphics
  85.          used for the window borders, attribute of the border and the
  86.          attribute of the area inside the window.  There is no limit to
  87.          the number of menu selections allowed in a window.  If you can
  88.          fit it into the window, it will work!  You can put the menu
  89.          selections anywhere within a window you wish... e.g., single
  90.          columns, double columns, triple columns, etc., or even random
  91.          placements!  
  92.  
  93.          Included in the TOOLS FOR C Application Development Package is a
  94.          copy of MENUGEN.EXE, three object module libraries, and
  95.          necessary reference manuals in DOS text form.  There is an
  96.          object module library for the small memory model of each
  97.          supported compiler (Lattice C (R) version 3.x, Microsoft C (R)
  98.          version 4.0, and Turbo C (R) version 1.0).  These are all you
  99.          need to start building your Menus and Windows.  As a matter of
  100.          fact, this was all that was used in producing the MENUGEN
  101.          program.
  102.  
  103.          MENUGEN has two main sections.  The first allows you to define
  104.          a window structure.  If a window is all you need, then you
  105.          simply write the structure to an #include file and leave the
  106.          program.  If you want to define a menu, then you must first
  107.          define a window for it.  After it's window is defined, you enter
  108.          the other section of the program.  This section allows you to
  109.          define the menu's cursor type, title, and the positions,
  110.          video attributes, and functions of each of the menu selections. 
  111.          After you are satisfied with your menu you write it's
  112.          structures to an #include file, just as you would for a window. 
  113.  
  114.          We recommend that you work through the tutorial to get an
  115.          overview of MENUGEN'S capabilities.
  116.  
  117.  
  118.  
  119.                                   TUTORIAL
  120.  
  121.     Getting Started 
  122.  
  123.          First, load and run the program "MENUGEN.EXE". When you're
  124.          through reading the title page, press any key to continue.
  125.  
  126.          The next screen you see will be mostly blank except for the
  127.          Help Lines (two lines on top of the screen) and the Cursor
  128.          Status (an area on the bottom of the screen).  These can be
  129.          toggled on and off independently by pressing [F1] or [ALT-F1]. 
  130.          The [F1] key toggles the Help Lines, and [ALT-F1] toggles the
  131.          Cursor Status Area. 
  132.  
  133.  
  134.     Cursor Movement
  135.  
  136.          The cursor can be moved around the screen using the arrow keys,
  137.          HOME, END, PGUP and PGDN keys.  As you move the cursor around
  138.          the screen notice that the cursor position is being displayed
  139.          near the lower left hand corner of the screen.  The cursor
  140.          location is relative to 0,0 being the upper-left-corner of the
  141.          screen.  The UP,LEFT,RIGHT and DOWN arrow keys will move the
  142.          cursor one character position.  The HOME, PGUP, END and PGDN
  143.          keys will move the cursor to the corners of the screen.
  144.     
  145.               Key      Screen Location                   Col    Row
  146.              ======================================================
  147.              HOME      Upper Left  Corner of screen        0      0
  148.              PGUP      Upper Right Corner of screen       79      0
  149.              END       Lower Left  Corner of screen        0     24
  150.              PGDN      Lower Right Corner of screen       79     24
  151.  
  152.  
  153.     Set Anchor
  154.  
  155.          The 'Anchor' represents one corner of your window.  The SET
  156.          ANCHOR key, [F2], toggles the Anchor ON and OFF.  When the Anchor
  157.          is toggled ON, the "Anchor Set" message is shown in the lower
  158.          left corner (assuming you haven't toggled the status area OFF
  159.          with [ALT-F1]).
  160.  
  161.          To begin defining a window, move the cursor to an area on the
  162.          screen which will represent a corner of your window.  Set the
  163.          Anchor (Press [F2]).  Draw your box using the cursor movement
  164.          keys.  
  165.  
  166.  
  167.     Swap Anchor
  168.  
  169.          Press [F3] to "Swap Anchor".  This function swaps the current
  170.          cursor position with the Anchor.  The original Anchor position
  171.          becomes the new cursor position and the original cursor position
  172.          becomes the new Anchor position.  This greatly adds to the
  173.          flexibility of the window definition.
  174.  
  175.  
  176.  
  177.     Border Type
  178.  
  179.          Press [F4].  A window will pop up in the middle of the screen.
  180.          By pressing the UP and DOWN arrow keys, you can scroll through
  181.          the selection of border types for the window.  The border type
  182.          of your window will change as you move up and down the selection
  183.          list.  (The border of the window which popped up in the middle
  184.          of your screen will change also).  When you find a selection
  185.          you're happy with, press ESC.  You'll be left with the selected
  186.          border type.
  187.  
  188.  
  189.     Border Attribute
  190.  
  191.          Press [F5].  A menu will pop up with attribute options. The UP
  192.          and DOWN arrow keys will move you through the menu selections. 
  193.          Press [RETURN] when the desired selection is high-lighted.  An
  194.          alternate method of selecting an option is by pressing a number
  195.          (1-6) for the 6 predefined attributes or the letters 'U'or 'u'
  196.          for 'User Defined '(if the desired attribute isn't among the
  197.          selections).
  198.  
  199.          Choose an attribute using selections 1-6.  Notice that the
  200.          attribute of the border changes as the selection is made.  Now
  201.          choose the "-USER DEFINED-" option.  A window will open which
  202.          will prompt you for a 'Border Attribute'.  Enter a number in
  203.          hexadecimal form and press [RETURN]. The window will be updated
  204.          with the new attribute and you'll be returned to the 'BORDER
  205.          ATTRIBUTE' menu.  When you've completed your selection, pressing
  206.          ESC will exit this function.
  207.  
  208.  
  209.     Fill Attribute
  210.  
  211.          Press [F6].  A menu will pop up with the Fill Attribute Options.
  212.          You can define the attribute of the inside area of your windows
  213.          (fill attribute).  Selections are made in this menu the same way
  214.          they're mad in the 'Border Attribute Menu' above.  You can
  215.          choose one of the selections offered, or enter the attribute via
  216.          the '-USER DEFINED-" option.  Again, pressing ESC will exit this
  217.          function.
  218.  
  219.  
  220.     Write (Generate) the code.
  221.  
  222.          You've just defined a window!  Let's write the code to a file. 
  223.          Press [F9].  A window will open prompting you for a header
  224.          file name. Enter the name of a file you wish to save this to. 
  225.          (This must be a legal DOS file name format... no spaces allowed,
  226.          8 characters plus an optional 3 character extension separated by
  227.          a period).   Let's call the file "TEST1.HDR".  (Type TEST1.HDR
  228.          as the file name and press [RETURN]).
  229.  
  230.          If the name you've entered as the file name already exists, a
  231.          window will pop up warning you of this.  You're given the options
  232.          of either 'Replacing' the file, 'Browsing' the file, 'Appending'
  233.          to the file or aborting this function. For this example, choose
  234.          the "Replace" option to make sure we have a fresh file called
  235.          "TEST1.HDR".
  236.  
  237.  
  238.  
  239.          You'll next be prompted for the name of the window.  This is the
  240.          name which you'll use to identify this window in your code. It's
  241.          length should conform to the limits set by your compiler. Let's
  242.          call our window "testwndw". Enter "testwndw" (without the
  243.          quotes, of course) as the window name.
  244.  
  245.          The Menu/Window Generator will create a file that can be
  246.          included in your 'C Code'.  Its contents will resemble ...
  247.  
  248.             /******    Include file for testwndw Window   ******/
  249.             struct WNDW testwndw_structure =
  250.                {'║','═','║','═','╔','╗','╚','╝',' ',0x7,0x7,5,4,72,
  251.                                                 20,0,0,0,NULL,NULL,NULL};
  252.             WNDW *testwndw = &testwndw_structure;
  253.  
  254.          This file when #include'd in your code can be used as
  255.          demonstrated in the following code fragment...
  256.     
  257.          #include <stdio.h>
  258.          #include "tools4c.h"
  259.          #include "test1.hdr"
  260.  
  261.          main()
  262.          {
  263.              vid_type();             /* necessary call to determine */
  264.                                      /*   type of video adaptor     */
  265.              open_window(testwndw);
  266.              .
  267.              .
  268.              .
  269.              close_window(testwndw);
  270.          }
  271.     
  272.  
  273.          if preferred, the file can be physically included in your code...
  274.  
  275.          #include <stdio.h>
  276.          #include "tools4c.h"
  277.  
  278.          /******    Include file for testwndw Window   ******/
  279.          struct WNDW testwndw_structure =
  280.             {'║','═','║','═','╔','╗','╚','╝',' ',0x7,0x7,5,4,72,
  281.                                              20,0,0,0,NULL,NULL,NULL};
  282.          WNDW *testwndw = &testwndw_structure;
  283.  
  284.          main()
  285.          {
  286.              vid_type();
  287.              open_window(testwndw);
  288.              .
  289.              .
  290.              .
  291.              close_window(testwndw);
  292.          }
  293.  
  294.  
  295.  
  296.     File Browse
  297.  
  298.          'File Browse' allows you to view any text file.  You can scroll
  299.          up and down through the file a line at a time or a page at a
  300.          time. It allows horizontal scrolling, (good if your text is
  301.          wider than 80 columns), and it allows you to jump to the
  302.          beginning or end of the file.  You can safely use browse to view
  303.          your program code or any other text file without worrying about
  304.          altering the file.
  305.  
  306.              Key                Function
  307.              =================================================
  308.              UP    Arrow       Scroll UP one line 
  309.              DOWN  Arrow       Scroll Down one line
  310.              RIGHT Arrow       Scroll Right 
  311.              LEFT  Arrow       Snap to beginning of the line
  312.              PGUP              Scroll up one Screen
  313.              PGDN              Scroll down one Screen
  314.              HOME              Goto beginning of the file
  315.              END               Goto end of the file
  316.              ESC               EXIT
  317.  
  318.  
  319.     DOS Shell
  320.  
  321.          Pressing the DOS shell key, [F10], loads and executes another
  322.          copy of COMMAND.COM above MENUGEN.  Type "exit" at the DOS
  323.          prompt to return to MENUGEN.  DOS must be able to find a copy of
  324.          COMMAND.COM in the path defined by the environment variable
  325.          "COMSPEC".
  326.  
  327.  
  328.     Define Menu
  329.  
  330.          Pressing [F7] drops you into the menu definition subsection of
  331.          the program.  Before beginning to define a menu, you should
  332.          define the menu's window completely.  Window size and position
  333.          are the only changes you can make to the window after entering
  334.          the menu subsection.  
  335.  
  336.          When you press [F7], you will notice the cursor now moves inside
  337.          the window.  Use the cursor, Home, End, PgUp, and PgDn keys to
  338.          move to the starting position of the first menu selection. 
  339.          Pressing [F7] again begins the selection definition process.
  340.  
  341.          From here on, the best way to learn the power of MENUGEN is to
  342.          experiment.  The help lines on the top of the screen will direct
  343.          you through the each phase of the process.  Pop-up windows and
  344.          sub-menus allow you to define the menu's video attributes, title,
  345.          screen position, window size, and each selection's screen
  346.          position, video attributes, function calls, etc.
  347.  
  348.          Once your menu is defined, pressing [F9] allows you to write the
  349.          structure code for the menu to an #include file, just as you did
  350.          for a window.
  351.  
  352.  
  353.  
  354.          
  355.     Conclusion
  356.  
  357.          This tutorial is not a complete reference manual for MENUGEN, but
  358.          is instead intended only to get you started.  Most of MENUGEN's
  359.          features are obvious from the help line's prompts.  With a
  360.          little experimentation, you will be efficiently defining windows
  361.          and menus in no time at all.  A complete reference manual on
  362.          MENUGEN, an expanded Reference and User Manual for the TOOLS FOR
  363.          C Library, the complete source code to the library and compiled
  364.          libraries for all of the memory models for your compiler is
  365.          included in the package sent to you when you register your copy
  366.          of TOOLS FOR C.  Use the form below to register your copy today.
  367.  
  368.  
  369.  
  370.                               THE TURBO LIBRARY
  371.                             USER REGISTRATION FORM
  372.  
  373.          ============================================================
  374.  
  375.          Please list this form to your printer and use it to register
  376.          your copy.  Send the completed form and a check for $45.00 to:
  377.  
  378.                              BP Software Solutions, Inc.
  379.                              642 N. Commodore Drive
  380.                              Plantation, Fl.  33325
  381.  
  382.          Florida residents please be sure to include the 5% FL. state
  383.          sales tax ($2.25).
  384.  
  385.          ------------------------------------------------------------
  386.  
  387.          Name ______________________________________________________
  388.  
  389.          Company ___________________________________________________
  390.  
  391.          Address ___________________________________________________
  392.  
  393.          City _________________________ State _______ Zip __________
  394.  
  395.  
  396.          Compiler_______________________________  Version __________
  397.  
  398.  
  399.          Comments: _________________________________________________
  400.  
  401.          ___________________________________________________________
  402.  
  403.          ___________________________________________________________
  404.  
  405.          ___________________________________________________________
  406.  
  407.  
  408.