home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / proglc / scrn.lzh / SCRN_MAN.DOC < prev    next >
Text File  |  1987-10-15  |  12KB  |  219 lines

  1.   
  2.  
  3.  
  4.                            SCREEN-MAN Ver 1.0LS
  5.                 (C) Copyright Daniel Burke Associates 1987
  6.                     2 Cole Road, Haydenville, MA. 01039
  7.                           Compuserve ID 71036,157
  8.  
  9.     I. INTRODUCTION
  10.     SCREEN-MAN is a screen managment program which allows C language 
  11.     programmers to quickly and easily display screens and accept input on 
  12.     IBM PC's and compatibles.   This document will explain how to create 
  13.     and display screens. SCREEN-MAN differs from other screen management 
  14.     packages in that it is a very powerful but extremely easy to use 
  15.     tool.  Just link with the SCREEN-MAN library and pass the name of 
  16.     your screen to a SCREEN-MAN routine. This documentation will cover 
  17.     the main features of SCREEN-MAN.  Complete documentation is available 
  18.     upon registration.
  19.  
  20.     II. HOW TO CREATE A SCREEN
  21.     SCREEN-MAN requires a screen (slide) of character attribute pairs.  
  22.     The best way to create such a slide is by using Dan Bricklin's Demo 
  23.     program.  Using demo, design your slide, position your fields, 
  24.     prompts, titles, etc.  Any field with the attribute of yellow on blue 
  25.     ( yellow foreground and blue background ) will be considered an input 
  26.     field by SCREEN-MAN.  You can specify the data type of an input field 
  27.     by placing a character in the first position of the field.  The 
  28.     currently supported data types are discussed below.  When the slide 
  29.     is displayed by your application, SCREEN-MAN routines will accept 
  30.     data for those yellow/blue fields.  If using Demo, save the slide by 
  31.     using the ESC, I/O, Print commands.  On the print menu select:
  32.          Output to:  Name the slide (e.g. slide1)
  33.          Character mapping: No Mapping
  34.          Output:
  35.               Text: Yes, Without CR/LF
  36.               Attributes: Interspersed
  37.          Everything else: No or None.
  38.  
  39.     Make as many slides as you want: give each one a distinct name.  When 
  40.     you run your application, the slides must be in your current 
  41.     directory.
  42.  
  43.  
  44.     III. DATA TYPES
  45.     Each input field on a slide you create must be given a data type.  You 
  46.     specify the data type by putting a one character id in the first 
  47.     position of the field.  Remember, any blue on yellow field is 
  48.     considered an input field by SCREEN-MAN.  The types currently 
  49.     supported are listed below, including type name, character which you 
  50.     place in the first position of the field to identify the type to 
  51.     SCREEN-MAN, and a description of the type.  
  52.  
  53.          Name     ID         Description
  54.          Numeric: a  Field will accept decimal digits (0 - 9) only.
  55.          ASCII:   b  All ASCII characters.
  56.          Alpha:   c  Alphabetic characters
  57.          Day:     d  Day of the month, 1 to 31
  58.          Month:   e  Month 1 to 12.
  59.          Year:    f  2 digit year between 80 and 99.
  60.          Year4:   g  4 digit year between 1900 and 1999
  61.          Second:  h  0 to 59
  62.          Minute:  i  0 to 69
  63.          Hour:    j  0 to 23
  64.          E-YesNo  k  Enumerated Yes or No
  65.          E-Day    l  Enumerated Days of the week.
  66.  
  67.     More types will be supported in the next version of SCREEN-MAN.  In 
  68.     addition, you will be able to easily define your own types.  As noted 
  69.     above, each field on a slide corresponds to a member of a data-values 
  70.     structure which is passed as an argument to the routine fullscrn.  
  71.     The members corresponding to the types Numeric, ASCII, and Alpha are 
  72.     character arrays and can be initialized with strings (see example 
  73.     below).  Structure members corrresponding to all other types can be 
  74.     initialized with ints.  Most are obvious: initializing a field  of 
  75.     type Day to 13 will cause the value 13 to be displayed in that field 
  76.     when the slide is first displayed.  You can initailize all members to 
  77.     NULL, in which case all fields will be blank when the slide is first 
  78.     displayed.  If your structure is static and unitialized, it will be 
  79.     all NULL.
  80.  
  81.     The enumerated types deserve special mention.  The corresponding 
  82.     structure member can be initialized as an int between 0 and 9.  When 
  83.     the user moves to an enumerated type field, a window pops up listing 
  84.     the possible values for that field, e.g. Yes and No, along with the 
  85.     Function keys to use to select one of the possible values.  
  86.     Initializing the corresponding member to 0 causes the field to be 
  87.     blank initially.  Initializing the member to 1 causes the first 
  88.     possible value to be displayed, 2 the second, etc.  As the user 
  89.     selects from the window of possible values the contents of the field 
  90.     change.  Currently two enumerated types are supported, Yes/No and the 
  91.     days of the week.  More will be added and the next version of 
  92.     SCREEN-MAN will allow you to define your own enumerated types.
  93.     
  94.     IV. HOW TO DISPLAY A SLIDE IN AN APPLICATION
  95.     You can display a slide at any point in your application by making the 
  96.     call:
  97.          fullscrn( slide, datavals )
  98.          char *slide;       /* the name of the slide you have created */ 
  99.          char *datavals;    /* address of struct with initial values */
  100.                               (described below).
  101.     Fullscrn displays a full 24 by 80 slide. To display a smaller slide 
  102.     call:
  103.          adjmenu( slide, datavals, top, bottom, left, right);
  104.          char *slide;   /* name of the slide */
  105.          char *datavals;    /* address of struct with initial values */
  106.          int top;           /* top line of slide on screen */
  107.          int bottom;        /* bottom line of slide on screen */
  108.          int left;          /* left most column of slide on screen */
  109.          int right;         /* right most column of slide on screen */
  110.  
  111.     The slide must be in the current directory.  If you have created a 
  112.     slide with no input fields, pass NULL for the datavals parameter.
  113.  
  114.     V. HOW TO MAKE A STRUCTURE TO INITIALIZE INPUT FIELDS AND HOW TO GET
  115.        DATA BACK FROM A SLIDE
  116.     The second argument to fullscrn or adjmenu is a pointer to a 
  117.     structure.  This structure has one member for each input field on the 
  118.     corresponding slide.  The initial values of this structure are 
  119.     displayed when the slide is first displayed.  If the user changes any 
  120.     field, the modified data is passed back to your application in the 
  121.     structure.  Structure members are either ints or character arrays, 
  122.     depending on the type of the corresponding field.  SCREEN-MAN 
  123.     includes a utility to make these structures.  If you run DBASTRUC, 
  124.     passing it the name of your slide file, it will output a file with a 
  125.     structure template that corresponds to your slide.  For example, if 
  126.     you have created a slide called myslide.txt, run "dbastruct 
  127.     myslide.txt".  The output will be a file called myslide.dba that 
  128.     looks something like this:
  129.          struct myslide 
  130.          {
  131.               char var0[19];   /* Row 0 Col 50 Ascii */
  132.               int var3;        /* Row 7 Col 16 Day: 1 - 31 */
  133.               int var4;        /* Row 8 Col 16 Month: 1 - 12 */
  134.               int var5;        /* Row 9 Col 16 Year: 86 - 99 */
  135.               int var7;        /* Row 11 Col 16 Minute: 0 - 59 */
  136.               int var8;        /* Row 14 Col 61 Minute: 0 - 59 */
  137.               int var9;        /* Row 15 Col 61 Hour: 0 - 23 */
  138.               char var10[13];  /* Row 16 Col 64 Ascii decimal*/
  139.               int var11;       /* Row 24 Col 29 Enumerated Yes-No Field */
  140.          };
  141.     Read this file into your source file, create a structure of this type, 
  142.     initialize the members ( all uninitialized ints should be set to 0, 
  143.     and all character arrays should be NULL terminated; this will be true 
  144.     if your structure is static), and pass a pointer to this structure to 
  145.     fullscrn or adjmenu.  If your slide has no input fields, pass a NULL 
  146.     pointer.  That's all there is to it.  When your application returns 
  147.     from the call to fullscrn or adjmenu, data for any fields the user 
  148.     filled in will be in the corresponding members of the structure.
  149.  
  150.  
  151.     VI.  MOVING FROM FIELD TO FIELD IN A SLIDE; MOVING WITHIN A FIELD;
  152.     SAVING DATA A USER ENTERS INTO FIELDS OF A SLIDE
  153.     When your application displays a SCREEN-MAN slide, you can use various 
  154.     keys to move among the fields of the slide.  
  155.          TAB takes you to the next field.
  156.          BACK TAB takes you to the previous field.
  157.          UP ARROW takes you to the next field above the currrent field 
  158.          that starts in the same column as the current field.
  159.          DOWN ARROW is like UP ARROW, except it takes you down.
  160.          ENTER takes you to the next field.
  161.     Within a field you can use these keystrokes:
  162.          INSERT toggles you between insert and overstrike modes within a 
  163.          field.
  164.          DEL deletes the character at the cursor position.
  165.          RIGHT ARROW moves the cursor right.
  166.          LEFT ARROW moves the cursor left.
  167.          BACKSPACE is destructive backspace within a field.
  168.     And to leave a slide:
  169.          ESC and F10 exit the slide and return to the routine that called 
  170.          fullscrn or adjmenu.  Any fields the user changed are saved in 
  171.          the corrsponding members of the data values structure.  It is 
  172.          suggested that an F10 return indicate that the user has entered 
  173.          valid data and an ESC return indicate an abort, i.e. that 
  174.          modified data in the data values structure be discarded.
  175.          
  176.          
  177.     VII. ETC.
  178.     Version 1.0LS of the SCREEN-MAN library has been compiled with Lattice 
  179.     3.1 for the small model. Libraries for Lattice C, all other models, 
  180.     are available upon registration if requested.  Libraries for 
  181.     Microsoft 4.0 are also available.  Versions for other popular 
  182.     compilers will follow shortly.  The current version runs on CGA and 
  183.     EGA systems.  Support for mono will be available by October 20.  DBA 
  184.     Software encourages your comments and suggestions.  We will attempt 
  185.     to make any additions or enhancements to SCREEN-MAN you may request.  
  186.     The registration fee is $25.00 for which you will receive complete 
  187.     documentation, all updates for one year at no additional cost other 
  188.     than shipping and handling, and phone support.  The complete 
  189.     documentation includes extensive examples, descriptions of many more 
  190.     DBA screen functions included in the SCREEN-MAN library, such as 
  191.     window functions and error reporting functions, information on adding 
  192.     your own types, and more.  To register, please send your check for 
  193.     $25.00 to DBA Software at the above address.  You will receive a disk 
  194.     with documentation and libraries for the compilers and models you 
  195.     request.  
  196.  
  197.     VIII. FILES.
  198.     The files on this disk are:
  199.     DBA_DEMO.EXE - A short demo of SCREEN-MAN.
  200.     DBA_0.TXT, DBA_1.TXT, and DBA_2.TXT are ouptput from DAN Bricklin's 
  201.     Demo program.  Running DBASTRUCT on a .TXT file produces the 
  202.     corresponding .DBA file.
  203.     DBA_1.DBA AND DBA_2.DBA are files containing structures corresponding
  204.     to the slides.  Since DBA_0.TXT has no input fields, it has no
  205.     structure associated with it and therefore has no .DBA file.
  206.     DBA_DEMO.C is the source file which displays the slides.  Use this as 
  207.     an example of how to create your structures and call SCREEN-MAN 
  208.     functions.
  209.     DBA_DEMO.LNK is an example link file, in Plink86 format.
  210.     SCRN_MAN.LIB is the Lattice Small model library of all SCREEN-MAN 
  211.     functions.  Include this library in your link before Lattice 
  212.     libraries.
  213.  
  214.     IX. DISCLAIMER
  215.     For obvious reasons the user is totally responsible for use of
  216.     this program and determining that it is suitable for his/her use,
  217.     and she/he uses this program with no warranty.
  218.  
  219.