home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 19 / CD_ASCQ_19_010295.iso / dos / prg / c / boss / boss_doc.exe / BOSS.MAN next >
Text File  |  1994-10-16  |  291KB  |  10,371 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.                                  The Window BOSS
  12.                                         &
  13.                                    Data Clerk
  14.  
  15.  
  16.                                 Revision 08.15.94
  17.                                   Version 8.02
  18.  
  19.  
  20.  
  21.  
  22.                          Star Guidance Consulting, Inc.
  23.                                  273 Windy Drive
  24.                           Waterbury, Connecticut 06705
  25.  
  26.                                  (203) 574-2449
  27.  
  28.  
  29.  
  30.  
  31.                                _______
  32.                           ____|__     |               (tm)
  33.                        --|       |    |-------------------
  34.                          |   ____|__  |  Association of
  35.                          |  |       |_|  Shareware
  36.                          |__|   o   |    Professionals
  37.                        -----|   |   |---------------------
  38.                             |___|___|    MEMBER
  39.  
  40.  
  41.  
  42.  
  43.  
  44.                 Copyright (c) 1984-1991 by Philip A. Mongelluzzo
  45.                                All Rights Reserved.
  46.  
  47.  
  48.  
  49.  
  50.  
  51.         The Window BOSS Shareware diskette,  containing a copy of this 
  52.         manual  may  be freely copied and shared,  but printed copies  of 
  53.         this document may not be copied in any way without permission  in 
  54.         writing from Star Guidance Consulting.  Thank you.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.                                    1
  62.  
  63.  
  64.  
  65.         1. Introduction
  66.  
  67.         The Window BOSS is one of the most powerful and cost-effective 
  68.         products available to enhance and accelerate the development of 
  69.         system and applications programs in the "C" language.  The BOSS 
  70.         will let you create programs that have the same look and feel as 
  71.         top sellers like Lotus, Sidekick, dBASE, and Framework!  Pop-up 
  72.         windows, pull down menus, status lines, and in context on-line 
  73.         help functions can be easily implemented.  Your applications can 
  74.         drag windows around the screen and automatically sense the video 
  75.         card installed.  All of this without snow, flicker, or delay! 
  76.  
  77.         The BOSS's assistant, The Data Clerk is always on call to handle 
  78.         the tasks associated with data entry.  Whether they be as simple 
  79.         as fetching a line of text or as complicated as the coordination 
  80.         of filling out a form, the Data Clerk will be there to assist, 
  81.         and if necessary, validate precious information as it is entered.
  82.  
  83.         Registered users can take advantage of our "Source Plus" policy 
  84.         that provides meticulously commented source code, technical 
  85.         support, and minimal fee updates.
  86.  
  87.         2. Technical Nitty Gritties
  88.  
  89.         The Window BOSS supports PC/MSDOS for the IBM PC/XT/AT, PS/2 and 
  90.         compatibles.   However, you'll need one of the following 
  91.         compilers in order to take advantage of the state-of-the-art 
  92.         techniques available from the BOSS:
  93.  
  94.                     Microsoft Visual C++ 1.5, Watcom C++ 10.X
  95.               Borland C++ 3.X, Borland C++ 4.X, Borland Turbo C 2.X
  96.              Microsoft C 7.X, Microsoft C 8.X, Microsoft Quick C 2.5
  97.  
  98.         The BOSS is written in "C" and assembly language.  You'll need 
  99.         the Microsoft Assembler, MASM, to assemble any local changes to 
  100.         the assembler source.
  101.  
  102.           Stats:
  103.  
  104.              Maximum windows:    limited only by compiler and memory
  105.              Maximum window:     full screen (25x80, 43x80, 50x80)
  106.              Minimum window:     1 row 1 column (borderless)
  107.                                  3 rows 3 columns (framed)
  108.              Minimum fields:     none
  109.              Maximum fields:     limited only by compiler and memory
  110.  
  111.           Operation:
  112.  
  113.              Simply include the library at link time and invoke the 
  114.              function desired.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.                                    2
  123.  
  124.  
  125.  
  126.         3. User Supported Software
  127.  
  128.         Star Guidance Consulting distributes The Window BOSS with a 
  129.         unique marketing approach called Shareware.  The Shareware 
  130.         diskette and its programs and manual may be freely copied and 
  131.         shared.  It is also available from Star Guidance for $20.00. We 
  132.         ask you to help us distribute The Window BOSS by sharing 
  133.         unmodified copies of the Shareware diskette with others.  We also 
  134.         encourage you to register your copy for $55.00.  You'll find a 
  135.         registration form at the end of this manual.  Thank you for your 
  136.         support and enjoy the BOSS.  
  137.  
  138.         3.1. Registering
  139.  
  140.         Shareware is a term for software that can be freely copied and 
  141.         shared.  The term describes copyrighted software which the author 
  142.         supports and encourages people to copy and share.
  143.  
  144.         Shareware is like public television:  the programming is freely 
  145.         distributed, but support from users is encouraged.  The concept 
  146.         is based on these principles:
  147.  
  148.           1. People need to try programs to see if they are useful.
  149.           2. Software authors can be supported directly by users.
  150.           3. Copying and networking of programs can be encouraged.
  151.  
  152.         We encourage you to register your copy of The Window BOSS for 
  153.         $55.00.  Registration has a number of benefits to you:
  154.  
  155.           1. Serialized diskette containing all source code for all 
  156.              supported compilers.
  157.           2. Telephone Support and minimal fee updates. Minimal fees 
  158.              cover the cost of media, packaging materials, shipping, 
  159.              handling, and update preparation.
  160.           3. Thanks from us for your support and encouragement!
  161.  
  162.         3.2. Support Services
  163.  
  164.         You may call, write, or send EMAIL to us on CompuServe. Our 
  165.         CompuServe mailbox is checked on daily basis (excluding weekends 
  166.         & holidays) and is very effective way of communicating. 
  167.         Electronic mailboxes are great for passing problem code samples 
  168.         and receiving work-arounds and/or problem specific updates. If 
  169.         you write, please include a phone number and the times when you 
  170.         will be available. Our response to written questions is much 
  171.         slower, but we do give priority to overseas users. We are 
  172.         available between 9AM and 5PM Monday through Friday, and 
  173.         sometimes on Saturday and Sunday.
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.                                    3
  184.  
  185.  
  186.  
  187.         Support Services - continued.
  188.  
  189.  
  190.  
  191.         With reference to calls, if we do not call back, please remember 
  192.         that about 50% of our call backs do not get completed because of 
  193.         faulty phone numbers, unanswered, or busy phones. If we have not 
  194.         called back within 1 business day, call us again.  Frequent, 
  195.         difficult to reach, or foreign callers can expect "person to 
  196.         person" collect return calls.
  197.  
  198.         3.2.1. Electronic Support
  199.  
  200.         Electronic support is provided on  CompuServe.  Our Internet 
  201.         address is "71565.1001@CompuServe.COM".
  202.  
  203.         CompuServe electronic correspondence is limited to EMAIL.  Our 
  204.         EMAIL ID is [71565,1001].  EMAIL messages are answered on 
  205.         a daily basis.  If you need information on obtaining a CompuServe 
  206.         account you can call CompuServe toll free at 800-848-8199.
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.                                    4
  245.  
  246.  
  247.  
  248.         4. The Basics
  249.  
  250.         The Window BOSS is an extensive library of C functions for the 
  251.         creation, the management and the manipulation of text windows.  
  252.         We take care of all the housekeeping and let you, the programmer, 
  253.         get on with developing your application with a minimum of fuss.
  254.  
  255.         Both The Window BOSS and The Data Clerk are based on a layered 
  256.         software design in which powerful, easy to use functions are 
  257.         created from a series of lower level primitives.  As a 
  258.         programmer, you will quickly appreciate our clean and uncluttered 
  259.         approach to getting the job done.
  260.  
  261.         Windows are created and defined by opening them. Once created, 
  262.         you can write to them, move them around, change their attributes, 
  263.         use them as the basis for data entry, or "kill" them by closing 
  264.         them.  Windows are nothing more than a sub display of a larger 
  265.         display - the physical screen.  They are defined to have size, 
  266.         location, and attributes like foreground color, background color, 
  267.         border colors and so on.  The BOSS includes a whole host of 
  268.         functions for defining and manipulating your windows.
  269.  
  270.         Windows can also serve as the backdrop for data entry.  Once a 
  271.         window is created, you can use it to convey information or to 
  272.         retrieve it!  The Data Clerk will assist you in obtaining the 
  273.         desired goal, whether it be as simple as a single line of text or 
  274.         as complex as a complete form. 
  275.  
  276.         Forms are an ordered collection of input requests (fields) that 
  277.         occur within a specific window.  Fields have size, location 
  278.         (relative to the window which they will be displayed in), and 
  279.         attributes (foreground color, background color, mask values, fill 
  280.         characters, type [integer, float, long, text], validation 
  281.         ranges and so on).  Like windows, forms are created by opening 
  282.         them.  Their contents must then be defined by using the field 
  283.         definition functions provided, or with your own custom field 
  284.         definition functions.  Once created and defined, a form becomes 
  285.         part of the window and moves with it. Forms are "killed" by 
  286.         closing them (n.b. killing a form has no effect on the window to 
  287.         which it was anchored or to the information displayed in it, form 
  288.         or otherwise). The same functions used to input single data items 
  289.         are used to build forms.  This consistency, coupled with an 
  290.         uncluttered approach and flexibility, gives The Window BOSS its 
  291.         power.    
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.                                    5
  306.  
  307.  
  308.  
  309.         4.1. Window Basics
  310.  
  311.         Here is the famous "hello" program!  As you can see it's pretty 
  312.         simple to get windows into your applications with The Window 
  313.         BOSS!!  You should review this code in conjunction with the 
  314.         function descriptions found in this manual and the concepts 
  315.         outlined in the Important Concepts section following the 
  316.         examples.
  317.  
  318.         #include "winboss.h"            /* REQUIRED */
  319.         main()
  320.         {
  321.         WINDOWPTR w1;                   /* window handle */
  322.         int batrib;                     /* border atrib */
  323.         int watrib;                     /* window atrib */
  324.  
  325.         /*
  326.          * Set attributes:
  327.          *
  328.          *      border - blue/white box
  329.          *      window - white background/black letters
  330.          *
  331.         */
  332.  
  333.           batrib = (BLUE << 4) | WHITE; /* border atrib */
  334.           watrib = (WHITE <<4) | BLACK; /* window atrib */
  335.  
  336.         /*
  337.          * Open window at 0,0 - 25 cells wide and 10 cells high
  338.         */
  339.  
  340.           w1 = wn_open(0,0,0,25,10,watrib,batrib);
  341.           if(!w1) exit();       
  342.  
  343.         /*
  344.          * Print the famous string and wait for key to be struck.
  345.          * Close window on key strike.. exit.
  346.         */
  347.  
  348.           wn_printf(w1,"Hello World...");
  349.           v_getch();                    /* wait for key */
  350.           wn_close(w1);                 /* close the window */
  351.           exit(0);                      /* and exit */
  352.         }
  353.  
  354.         /* End */
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.                                    6
  367.  
  368.  
  369.  
  370.         4.2. Data Entry Basics
  371.  
  372.         Lets expand our "hello" program to prompt and fetch a name.
  373.  
  374.         #include "winboss.h"            /* REQUIRED */
  375.         main()
  376.         {
  377.         WINDOWPTR w1;                   /* window handle */
  378.         int batrib;                     /* border atrib */
  379.         int watrib;                     /* window atrib */
  380.         char name[15];                  /* name */
  381.  
  382.         /*
  383.          * Set attributes:
  384.          *
  385.          *      border - blue/white box
  386.          *      window - white background/black letters
  387.          *
  388.         */
  389.  
  390.           batrib = (BLUE << 4) | WHITE; /* border atrib */
  391.           watrib = (WHITE <<4) | BLACK; /* window atrib */
  392.  
  393.         /*
  394.          * Open window at 0,0 - 25 cells wide and 10 cells high
  395.         */
  396.  
  397.           w1 = wn_open(0,0,0,25,10,watrib,batrib);
  398.           if(!w1) exit();       
  399.  
  400.         /*
  401.          * Print the famous string, prompt and fetch a name, 
  402.          * wait for key to be struck.
  403.          * Close window on key strike.. exit.
  404.         */
  405.  
  406.           wn_printf(w1,"Hello World...");
  407.  
  408.           *name = NUL;                  /* init buffer for name */
  409.           wn_gtext(XEQ,NFRM,NFLD,w1,2,1,"Name: ",watrib,'_',15,name,NSTR,NSTR);
  410.  
  411.           v_getch();                    /* wait for key */
  412.           wn_close(w1);                 /* close the window */
  413.           exit(0);                      /* and exit */
  414.         }
  415.  
  416.         /* End */
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.                                    7
  428.  
  429.  
  430.  
  431.         4.3. Form Basics
  432.  
  433.         Now we will expand a bit further to read a 2 field form.
  434.  
  435.         #include "winboss.h"            /* REQUIRED */
  436.         main()
  437.         {
  438.         WINDOWPTR w1;                   /* window handle */
  439.         WIFORM f1;                      /* form handle */
  440.         int batrib;                     /* border atrib */
  441.         int watrib;                     /* window atrib */
  442.         char name[15];                  /* name */
  443.         char city[15];                  /* city */
  444.  
  445.         /*
  446.          * Set attributes:
  447.          *
  448.          *      border - blue/white box
  449.          *      window - white background/black letters
  450.          *
  451.         */
  452.  
  453.           batrib = (BLUE << 4) | WHITE; /* border atrib */
  454.           watrib = (WHITE <<4) | BLACK; /* window atrib */
  455.  
  456.         /*
  457.          * Open window at 0,0 - 25 cells wide and 10 cells high
  458.         */
  459.  
  460.           w1 = wn_open(0,0,0,25,10,watrib,batrib);
  461.           if(!w1) exit();       
  462.  
  463.         /*
  464.          * Print the famous string, create, define, and fetch form
  465.          * wait for key to be struck.
  466.          * Close window on key strike.. exit.
  467.         */
  468.  
  469.           wn_printf(w1,"Hello World...");
  470.  
  471.           *name = NUL;                  /* init buffer for name */
  472.           *city = NUL;                  /* init buffer for city */
  473.           f1 = wn_frmopn(3);            /* open form 2 + 1 Fields */
  474.           wn_gtext(SET,f1,0,w1,2,1,"Name: ",watrib,'_',15,name,NSTR,NSTR);
  475.           wn_gtext(SET,f1,1,w1,3,1,"City: ",watrib,'_',15,city,NSTR,NSTR);
  476.           wn_frmget(f1);                /* read the form */
  477.  
  478.           v_getch();                    /* wait for key */
  479.           wn_frmcls(f1);                /* first close the form */
  480.           wn_close(w1);                 /* then close the window */
  481.           exit(0);                      /* and exit */
  482.         }
  483.  
  484.  
  485.  
  486.  
  487.  
  488.                                    8
  489.  
  490.  
  491.  
  492.         4.4. Popup Menu Basics
  493.  
  494.         Popup and pulldown menus add that extra sparkle to your 
  495.         applications.  The Window BOSS includes a simple popup menu 
  496.         system that is fast and easy to use.  The system consists of two 
  497.         functions; wn_popup() and wn_qpopup().  wn_popup() is an 
  498.         interactive version of wn_qpopup().  That is to say that 
  499.         wn_popup() can be used to solicit user input while wn_qpopup is a 
  500.         *information only* popup.  The "q" in qpopup stands for 'quick'.  
  501.         Both functions have function parameters and require the menu 
  502.         structure "pmenu" to be initialized.  "pmenu" is defined in 
  503.         "winboss.h".
  504.  
  505.         Popup menus, like windows, have size (height & width), an origin 
  506.         (row & column), and attributes (text & border).  These are passed 
  507.         as parameters to both wn_popup and wn_qpopup in the same fashion 
  508.         as they would be for a call to wn_open.  In addition to the 
  509.         normal window stuff, popup menus also have information that needs 
  510.         to be displayed and, in some cases, information that needs to be 
  511.         returned, to the calling function.  This additional information 
  512.         is passed to popup via the pmenu structure.  The pmenu structure 
  513.         allows us to tell wn_popup what text is to be displayed where, 
  514.         and what value (return code), if any, is to be provided back to 
  515.         the calling function.
  516.  
  517.         Both wn_popup and wn_qpopup call wn_open to open a window defined 
  518.         by the calling parameters. Calls to wn_putsa are then made to 
  519.         display the text defined in pmenu within the window just opened 
  520.         at the location in the window specified by the values defined in 
  521.         pmenu.  A menu item is highlighted by moving either the cursor 
  522.         keys, space bar, or by pressing the first character of the menu 
  523.         item desired.  Control is passed back to the calling function 
  524.         when the 'Enter' or 'Escape' key is pressed. Here is a typical 
  525.         call to wn_popup:
  526.  
  527.             wat = (WHITE<<4|BLACK);
  528.             bat = (BLUE<<4|WHITE); 
  529.             rv = wn_popup(0, 0, 0, 33, 14, wat, bat, &intelc, FALSE);
  530.                           |                       |  |     |  |   |
  531.                           +-------\/--------------+  |     |  |   |
  532.                              Normal wn_open parms    |     |  |   |
  533.                                                      |     |  |   |
  534.                                   pmenu structure  <-+-----+  |   |
  535.                                                               |   |
  536.                                         window close flag   <-+---+
  537.  
  538.         The normal wn_open parameters define the popup menu's location, 
  539.         size, and color.  The pmenu structure address allows wn_popup and 
  540.         wn_qpopup to access the contents of the intelc pmenu structure.  
  541.         The window close flag is used to tell wn_popup whether or not to 
  542.         close the popup menu when returning to the calling function. 
  543.         Telling wn_popup not to close the menu when returning to the 
  544.         calling function allows you to create nested popups.
  545.  
  546.  
  547.  
  548.  
  549.                                    9
  550.  
  551.  
  552.  
  553.         Popup Menu Basics - continued.
  554.  
  555.  
  556.  
  557.         Lets examine the pmenu structure definition from winboss.h:
  558.  
  559.           struct mitem {              /* POPUP menu item template */
  560.             int r;                    /* row */
  561.             int c;                    /* col */
  562.             char *t;                  /* text */
  563.             int rv;                   /* return value */
  564.           };
  565.  
  566.           struct pmenu {              /* POPUP menu structure */
  567.             WINDOWPTR wpsave;         /* place to hold window id */
  568.             int winopn;               /* leave window open flag */
  569.             int lndx;                 /* last index */
  570.             int fm;                   /* first menu item index */
  571.             int lm;                   /* last menu item index */
  572.             struct mitem scrn[WN_MXROWS*4]; /* a bunch of menu items */
  573.           };                          /* NOTE RELATIVE LIMIT */
  574.  
  575.           mitem - Popup menus contain a number of menu items. Each menu 
  576.           item has a location (within the window), text (to be displayed 
  577.           in the window), and an integer return code that is passed back 
  578.           to the calling function to let the caller know which menu item 
  579.           was selected.  "r" and "c" define the row and column, "t" is a 
  580.           pointer to the text, and rv is integer return code.
  581.              
  582.           pmenu - In addition to the information needed about each menu 
  583.           item, we need to do some internal housekeeping on the popup 
  584.           menu itself.  "wpsave" is used to store the WINDOWPTR that was 
  585.           returned from the call to wn_open made by popup. "winopn" is 
  586.           used internally by popup as an indicator of whether or not the 
  587.           window referenced by wpsave is currently open.  "lndx" is used 
  588.           internally to hold the index of the menu item last referenced 
  589.           or selected.  The combination of "wpsave", "winopn", and "lndx" 
  590.           provide wn_popup with the ability to correctly handle both 
  591.           nested and non-nested popups.  The structure members "wpsave", 
  592.           "winopn", "lndx" should not be modified, only initialized. 
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.                                    10
  611.  
  612.  
  613.  
  614.         Popup Menu Basics - continued.
  615.  
  616.  
  617.  
  618.           The Window BOSS's popup menus allow you to have informational 
  619.           headers and trailers.  This is handy for providing multiple 
  620.           line titles and or trailing instructional messages.  Consider 
  621.           the following:
  622.  
  623.              +---------------------------------+
  624.              |                                 |
  625.              |           Intellicom            |   <- Informational
  626.              |          Quick - Help           |   <- Informational
  627.              |                                 |
  628.              |     1 General Information       |   <- Action item
  629.              |     2 Terminal Mode Options     |   <- Action item
  630.              |     3 XMODEM File Send          |   <- Action item
  631.              |     4 XMODEM File Receive       |   <- Action item
  632.              |     5 CompuServe Exec Mode      |   <- Action item  
  633.              |                                 |
  634.              |  Press: ESC to quit or Cursor   |   <- Informational
  635.              |   Keys to Position Cursor then  |   <- Informational 
  636.              |   press RETURN for MORE info.   |   <- Informational
  637.              |                                 |
  638.              +---------------------------------+
  639.  
  640.           In the above popup there are 10 menu items, 5 are action 
  641.           oriented, and 5 are informational.  They are numbered 0 through 
  642.           9 and correspond to the "scrn" array of pointers in the pmenu 
  643.           structure. "fm" and "lm" are the indexes of the first and last 
  644.           action items in scrn array.  In the case of the above popup, fm 
  645.           and lm would be initialized to 2 and 6 respectively. "fm" and 
  646.           "lm", like the other housekeeping structure members, should not 
  647.           be modified, only initialized.  The pmenu structure for this 
  648.           popup is as follows: 
  649.  
  650.           static struct pmenu intelc = {
  651.             0, FALSE, 0,                     /* wpsave, winopn, lndx */
  652.              2, 6, {                         /* fm, lm */
  653.              1, 2, "         Intellicom", 0,            /** ----- **/
  654.              2, 2, "        Quick - Help", 0,           /*    |    */ 
  655.              4, 5, "1 General Information  ", 1,        /*    |    */
  656.              5, 5, "2 Terminal Mode Options", 2,        /*    |    */
  657.              6, 5, "3 XMODEM File Send     ", 3,        /* 10 menu */
  658.              7, 5, "4 XMODEM File Receive  ", 4,        /*  items  */
  659.              8, 5, "5 CompuServe Exec Mode ", 5,        /*         */
  660.             10, 2, "Press: ESC to quit or Cursor", 0,   /*         */
  661.             11, 2, " Keys to Position Cursor then", 0,  /*         */
  662.             12, 2, " press RETURN for MORE info.", 0,   /** ----- **/
  663.             99, 99, "",99 }                 /* ALWAYS ADD THIS LINE */
  664.           };
  665.           
  666.  
  667.  
  668.  
  669.  
  670.  
  671.                                    11
  672.  
  673.  
  674.  
  675.         Popup Menu Basics - continued.
  676.  
  677.  
  678.  
  679.         The end of the pmenu structure is designated by defining a menu 
  680.         item at row 99, column 99, with null text, with a return code of 
  681.         99.  THIS MUST ALWAYS BE DONE!
  682.  
  683.           Example:
  684.              
  685.              #include "winboss.h"
  686.  
  687.              static struct pmenu intelc = {
  688.                0, FALSE, 0,
  689.                2, 6, {
  690.                1, 2, "         Intellicom", 0,
  691.                2, 2, "        Quick - Help", 0,
  692.                4, 5, "1 General Information  ", 1,
  693.                5, 5, "2 Terminal Mode Options", 2,
  694.                6, 5, "3 XMODEM File Send     ", 3,
  695.                7, 5, "4 XMODEM File Receive  ", 4,
  696.                8, 5, "5 CompuServe Exec Mode ", 5,
  697.               10, 2, "Press: ESC to quit or Cursor", 0,
  698.               11, 2, " Keys to Position Cursor then", 0,
  699.               12, 2, " press RETURN for MORE info.", 0,
  700.               99, 99, "",99 }
  701.              };
  702.             
  703.              main()
  704.              {
  705.              WINDOWPTR w1;
  706.              int wat, bat, rv;
  707.  
  708.                wn_init();
  709.                w1 = wn_open(0,11,1,31,2,NORMAL,NORMAL);
  710.                if(!w1) exit(1);
  711.                wat = (WHITE<<4|BLACK);
  712.                bat = (BLUE<<4|WHITE); 
  713.                rv = wn_popup(0, 0, 0, 33, 14, wat, bat, &intelc, FALSE);
  714.                wn_printf(w1, "wn_popup returned: %d\n",rv);
  715.                wn_printf(w1, "Press any key to continue..");
  716.                v_getch();
  717.                wn_close(w1);
  718.                wn_exit();
  719.                exit(0);
  720.              }
  721.              /* End */
  722.  
  723.           To make the popup menu disappear upon return, change the call 
  724.           to wn_popup to be:
  725.  
  726.                rv = wn_popup(0, 0, 0, 33, 14, wat, bat, &intelc, TRUE);
  727.  
  728.  
  729.  
  730.  
  731.  
  732.                                    12
  733.  
  734.  
  735.  
  736.         Popup Menu Basics - continued.
  737.  
  738.  
  739.  
  740.         The calling sequence and setup of wn_qpopup is similar to 
  741.         wn_popup but the functions significantly differ operationally.  
  742.         The parameter list differs in that there is no window close flag 
  743.         parameter.  The operational differences are more significant. 
  744.         wn_qpopup places the popup window on the screen and then 
  745.         immediately returns a WINDOWPTR to the open and active popup 
  746.         window.  The calling function assumes full responsibility for  
  747.         the window from then on (i.e. moving, closing, etc.).
  748.  
  749.         Quick popups are used to display information only and do not 
  750.         contain action menu items.  
  751.  
  752.         Example:
  753.  
  754.              #include "winboss.h"
  755.  
  756.              static struct pmenu m1 = {
  757.                0, FALSE, 0,
  758.                0, 0, {
  759.                1, 2, "Presenting", 0,
  760.                99, 99, "",99 }
  761.              };
  762.  
  763.              main()
  764.              {
  765.              int wat, bat;
  766.              WINDOWPTR w2;
  767.  
  768.                wat = (WHITE<<4|BLACK);
  769.                bat = (BLUE<<4|WHITE);
  770.                w2 = wn_qpopup(0,0,0,16,3,wat,bat,&m1);
  771.                v_getch();
  772.                wn_close(w2);
  773.                wn_exit();
  774.                exit();
  775.              }
  776.              /* End */
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.                                    13
  794.  
  795.  
  796.  
  797.         Popup Menu Basics - continued.
  798.  
  799.  
  800.  
  801.         4.4.1. Notes
  802.  
  803.         Popup menu items are highlighted by moving the cursor bar with 
  804.         the arrow keys, space bar, or by pressing the first letter/digit 
  805.         of the menu item.  wn_popup will return as soon as the Enter or 
  806.         Escape key is struck.  The return code specified in the pmenu 
  807.         structure is returned when the Enter key is pressed, Escape 
  808.         causes return code of 99 to be passed back to the calling 
  809.         function. 
  810.  
  811.         Menu navigation is from the current to next or current to 
  812.         previous menu item when using the cursor keys or space bar.  Item 
  813.         skipping can only be accomplished by using the "first character" 
  814.         selection method.  Skip selection will only work as anticipated, 
  815.         if the first character of each action menu item is unique.
  816.  
  817.         Source code is provided (WN_HELP.C) to allow you to customize 
  818.         and/or enhance the popup menu system to meet your needs.
  819.  
  820.         The BOSSDEMO program contains coding samples showing the use of 
  821.         wn_popup, wn_qpopup, and how to implement pulldown menus using 
  822.         wn_popup.
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.                                    14
  855.  
  856.  
  857.  
  858.         4.5. Help System Basics
  859.  
  860.         The Window BOSS includes a file based help system that can be 
  861.         used to provide your applications with "context sensitive" help.  
  862.  
  863.         It would be helpful for you to print out a few pages of 
  864.         "INTELC.HLP" to refer to during the following discussion.  You 
  865.         should also run the BOSSDEMO program and exercise the Intellicom 
  866.         Quick Help popup menu. This code uses the help system to produce 
  867.         the displays when menu selections are made.
  868.  
  869.         The system uses plain ASCII text files you create with your 
  870.         favorite editor.  A special, but easy to follow, file layout is 
  871.         used.  The file layout we have chosen allows the plain ASCII text 
  872.         files to be indexed using the supplied index generation utility 
  873.         GENINDEX.  The indexing provides the system with the ability to 
  874.         rapidly locate and display help messages when called upon to do 
  875.         so.  Since the source (WN_HELP.C & GENINDEX.C) to the entire help 
  876.         system is provided, you can modify it to meet your own needs.  
  877.  
  878.         In order to use the help system in your application you must take 
  879.         two preparatory steps: (1) prepare the ASCII text file in the 
  880.         specified format and (2) run the GENINDEX program.  For example, 
  881.         you first create a text file called "TAXES.HLP" using Brief, 
  882.         Vedit, Edlin, or your favorite word processor in non_document 
  883.         (ASCII) mode and then run the GENINDEX program by:
  884.  
  885.                             C> GENINDEX TAXES.HLP
  886.  
  887.         The GENINDEX program reads "TAXES.HLP" and produces "TAXES.NDX".  
  888.         Both "TAXES.HLP" and "TAXES.NDX" must be available to the 
  889.         application program at run time.
  890.  
  891.         To actually use the help system in your application you must 
  892.         first initialize the help system by calling wn_hlinit.  This 
  893.         must be done before any attempt is made to display help messages.
  894.         The help system must only be initialized once.  The call to 
  895.         initialize the help system is of the form:
  896.  
  897.              .....                              /* code */
  898.           rv = wn_hlinit(row, col, width, height, atrib, batrib, file)
  899.              .....                              /* code */
  900.  
  901.         The parameters define the location, size, and attributes of the 
  902.         window in which the help messages will be displayed, along with 
  903.         the name of the help file to be used.  wn_hlinit returns TRUE if 
  904.         all is well, FALSE otherwise.
  905.  
  906.         Initialization does not cause a window to be displayed, it merely 
  907.         sets the system up for later use by opening and reading the index 
  908.         file into memory.
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.                                    15
  916.  
  917.  
  918.  
  919.         Help System Basics - continued.
  920.  
  921.  
  922.  
  923.         To initialize the system for full screen help messages in a 
  924.         window with white letters on blue background and a similar border 
  925.         using the file "INTELC.HLP", the call to wn_hlinit would be:
  926.  
  927.          wn_hlinit(0,0,78,23,(BLUE<<4|WHITE),(BLUE<<4|WHITE),"intelc");
  928.  
  929.         The help system is now initialized to display full screen help 
  930.         messages using "INTELC.HLP" and "INTELC.NDX" as the help message 
  931.         database. (The BOSSDEMO program uses the above code.)
  932.  
  933.         Important - Unless you intend to modify the help system, the 
  934.         above call to wn_hlinit should always be used - modified only to 
  935.         reflect the name of your help file. 
  936.  
  937.         Obtaining help at run time is accomplished by calling the wn_help 
  938.         function with a subject key word.  For example:
  939.  
  940.              rv = wn_help("%general information%");
  941.  
  942.         Subject key words are located in the ASCII help file you prepare 
  943.         and are processed by the GENINDEX program.  The usage of 
  944.         wn_help() should be clear once we complete the discussion of the 
  945.         file layout.
  946.  
  947.         The text file you prepare consists of help system commands, 
  948.         subject key words, and the actual text to be displayed which is 
  949.         formatted to fit inside the window defined by wn_hlinit.  
  950.  
  951.         Commands 
  952.  
  953.           .cp   - signals end of page 
  954.           *END* - signals end of page and end of help for this subject
  955.  
  956.           Text is sequentially displayed one screen at a time from the 
  957.           subject keyword through any number of .cp delimited screens 
  958.           through and including the screen delimited by *END*.  The 
  959.           system allows for forward and reverse display via the PgDn and 
  960.           PgUp keys.  The .cp signals the end of a single screen in a 
  961.           series of 2 or more screens.  When .cp is detected the message  
  962.           "Esc to quit help, PgUp for previous screen, any other key to 
  963.           continue..." will be displayed.  When *END* is detected, the 
  964.           message "End of help, PgUp for previous screen, any other key 
  965.           to continue..." is displayed.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.                                    16
  977.  
  978.  
  979.  
  980.         Help System Basics - continued.
  981.  
  982.  
  983.  
  984.         Keywords:
  985.  
  986.           Keywords are always enclosed within percent signs (%) and 
  987.           signal the beginning of text on a particular subject.  They are 
  988.           used by the GENINDEX program to create the index (NDX) file and 
  989.           are used by you as parameters to the wn_help() function.
  990.  
  991.           In the case of "INTELC.HLP" you will find the following 
  992.           keywords:
  993.  
  994.           %ksend%, %ksend1%, %krecv%, %krecv1%, %checksum xmit1%, 
  995.           %checksum recv1%, %terminal/c1%, %cistty1%, %terminal%, 
  996.           %terminal/c%, %cistty%, %status%, %dos window%, %exit to dos%,
  997.           %close capture%, %autodial%, %ascii xmit%, %checksum xmit%,
  998.           %checksum recv%, %general information%, %bossinfo%, 
  999.           %end-of-file%
  1000.  
  1001.         Text:
  1002.              
  1003.           Each screen of text is delimited by either a keyword, the .cp 
  1004.           command, or the *END* command.  Text is always formatted to fit 
  1005.           inside the help window.  In the case of "INTELC.HLP" there are 
  1006.           two leading spaces and the text is right justified to end at 
  1007.           column 76.  The two leading and trailing spaces center the text 
  1008.           between the borders.  Blank lines at the top of each screen 
  1009.           (page full) can be used to vertically center the text.  Spaces 
  1010.           on the left can be used to horizontally center text.
  1011.  
  1012.           Important - Unless you intend to modify the help system, the 
  1013.           format defined by "INTELC.HLP" should always be followed for 
  1014.           any help files you create for your own use.
  1015.  
  1016.         4.5.1. Notes
  1017.  
  1018.           The help system is configured to provide a full screen text 
  1019.           message, subject keys are limited to 25 characters, and there 
  1020.           is a limit of 255 subject keys per file.  This can be changed 
  1021.           by modifying the functions found in "wn_help.c"  THERE IS A 
  1022.           DIRECT CORRELATION BETWEEN THE PARAMETERS USED TO INITIALIZE 
  1023.           THE HELP SYSTEM AND THE LAYOUT OF THE ASCII TEXT FILE READ BY 
  1024.           THE GENINDEX PROGRAM.  If you modify the code be sure to also 
  1025.           modify location and text of the messages to be displayed when 
  1026.           .cp and/or *END* are detected.
  1027.          
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.                                    17
  1038.  
  1039.  
  1040.  
  1041.         Help System Basics - continued.
  1042.  
  1043.  
  1044.  
  1045.           The GENINDEX program is provided in source form.  An EXEcutable 
  1046.           will have to be created locally.  You may also have to adjust 
  1047.           the logic to account for the way the various compilers treat 
  1048.           <CR><LF> sequences.  This usually amounts to nothing more than 
  1049.           changing the "rb" to "r" in the fopen statement.  The best way 
  1050.           to determine if you have built a properly functioning GENINDEX 
  1051.           program is to run your newly created GENINDEX program against 
  1052.           "INTELC.HLP" to create a new "INTELC.NDX".  Then rebuild the 
  1053.           BOSSDEMO program and test to see if the Intellicom Quick Help 
  1054.           popup is functioning properly.  If it is, you are all set.  If 
  1055.           you receive a "Sorry - No info on... " message, then you will 
  1056.           need to edit GENINDEX to make the "rb"/"r" change.  
  1057.  
  1058.           This help system has nothing in common with the way in which 
  1059.           the data entry help and error messages get displayed.
  1060.  
  1061.           Help files always have a filename extension of "HLP".  Index 
  1062.           files always have a filename extension of "NDX".
  1063.  
  1064.  
  1065.  
  1066.  
  1067.  
  1068.  
  1069.  
  1070.  
  1071.  
  1072.  
  1073.  
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.                                    18
  1099.  
  1100.  
  1101.  
  1102.         Help System Basics - continued.
  1103.  
  1104.  
  1105.  
  1106.         Here is a sample program that uses INTELC.HLP.
  1107.  
  1108.              #include "winboss.h"
  1109.              main()
  1110.              {
  1111.              WINDOWPTR w1;                   /* window handle */
  1112.              int batrib;                     /* border atrib */
  1113.              int watrib;                     /* window atrib */
  1114.  
  1115.                wn_init();
  1116.                batrib = BLUE<<4 | WHITE;
  1117.                watrib = WHITE<<4 | BLACK;
  1118.                w1 = wn_open(0,0,0,25,10,watrib,batrib);
  1119.                if(!w1) exit(1);
  1120.  
  1121.                wn_hlinit(0,0,78,23,(BLUE<<4|WHITE),(BLUE<<4|WHITE),"intelc");
  1122.  
  1123.                wn_printf(w1, "Press any key\n"); v_getch();
  1124.                wn_help("%ksend%");
  1125.                wn_printf(w1, "Press any key\n"); v_getch();
  1126.                wn_help("%ksend1%");
  1127.                wn_printf(w1, "Press any key\n"); v_getch();
  1128.                wn_help("%krecv%");
  1129.                wn_printf(w1, "Press any key\n"); v_getch();
  1130.                wn_help("%krecv1%");
  1131.                wn_printf(w1, "Press any key\n"); v_getch();
  1132.                wn_help("%checksum xmit1%");
  1133.  
  1134.                wn_printf(w1, "Press any key\n"); v_getch();
  1135.                wn_close(w1);
  1136.                wn_exit();
  1137.                exit(0);
  1138.              }
  1139.  
  1140.              /* End */
  1141.  
  1142.  
  1143.  
  1144.  
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.                                    19
  1160.  
  1161.  
  1162.  
  1163.         4.6. Mouse Basics
  1164.  
  1165.         The Window BOSS includes a collection of routines that provide 
  1166.         the building blocks for developing applications that incorporate 
  1167.         Mouse support.  As a programmer you will need following:
  1168.  
  1169.              . The mouse and its associated hardware
  1170.  
  1171.              . The mouse driver software
  1172.  
  1173.              . C and/or Assembly level functions to communicate with the 
  1174.                mouse
  1175.  
  1176.         The first two are provided by the mouse manufacturer and must be 
  1177.         installed as outlined in the manufacturer's literature.  The last 
  1178.         item is provided as part of The Window BOSS. The Window BOSS's 
  1179.         mouse functions adhere to the de facto Microsoft standard. 
  1180.         However, all of the routines have been extensively tested with 
  1181.         both Microsoft and Logitech mice.
  1182.  
  1183.         Mouse Communication
  1184.  
  1185.         The only practical method of communicating with the mouse is 
  1186.         through the mouse device driver, which is accessible via software 
  1187.         interrupt 33H.  This interrupt is not used by DOS and is claimed 
  1188.         by the mouse device driver at its invocation.  Information is 
  1189.         exchanged between the mouse device driver and calling software 
  1190.         via the standard 8086/88 registers. As a Window BOSS user you 
  1191.         will be pleased to know that the burden of having to deal with 
  1192.         the mouse at this level has been replaced by a collection of "C" 
  1193.         level routines that handle all of the aforementioned setup, 
  1194.         software interrupts and register loading/unloading!!
  1195.  
  1196.         Mouse Usage
  1197.  
  1198.         Once the mouse has been initialized (reset), you can show it, 
  1199.         hide it, move it, ask it where it is, check to see if its buttons 
  1200.         have been pressed or released, make it emulate a light pen, put a 
  1201.         cage around it (set its region), define its shape and associated 
  1202.         attribute, or ask it how many buttons it has!
  1203.  
  1204.         Mouse Functions
  1205.  
  1206.         The standard Microsoft mouse supports 16 functions. Logitech's 
  1207.         are the same, although some are tweaked a tad to handle the 3rd 
  1208.         button.  The Window BOSS provides an easy to use interface to the 
  1209.         low level mouse functions and several higher level functions to 
  1210.         ease your applications level programming.
  1211.  
  1212.  
  1213.  
  1214.  
  1215.  
  1216.  
  1217.  
  1218.  
  1219.  
  1220.                                    20
  1221.  
  1222.  
  1223.  
  1224.         Mouse Basics - continued.
  1225.  
  1226.  
  1227.  
  1228.         Mouse Functions - continued.
  1229.  
  1230.         The following table summarizes the 16 Microsoft Mouse Functions:
  1231.  
  1232.              Function       Description              Window BOSS Function
  1233.                 0           Initialize mouse         mo_reset()
  1234.                 1           Show mouse               mo_show()
  1235.                 2           Hide mouse cursor        mo_hide()
  1236.                 3           Get position & status    mo_pos()
  1237.                 4           Set mouse position       mo_move()
  1238.                 5           Get button press info    mo_pbinfo()
  1239.                 6           Get button release info  mo_rbinfo()
  1240.                 7           Set min/max columns      mo_clim()
  1241.                 8           Set min/max rows         mo_rlim()
  1242.                 9 *         Define graphics pointer  mo_sgcursor()
  1243.                10           Define text pointer      mo_scursor()
  1244.                11           Read motion counters     mo_motion()
  1245.                12 *         Define event handler     mo_task()
  1246.                13           Light pen emulation on   mo_lpon()
  1247.                14           Light pen emulation off  mo_lpoff()
  1248.                15 *         Set motion pixel ratio   mo_ratio()
  1249.  
  1250.         In addition to the above low level interface routines, the 
  1251.         following application's level functions have been implemented to 
  1252.         ease the mouse's natural display adapter sensitivity.  Without 
  1253.         these routines, mouse applications would have to deal with the 
  1254.         mouse in a 640x200-pixel plane - even in text mode!
  1255.  
  1256.              mo_rcpos()     Return current mouse position (row, col)
  1257.              mo_locate()    Locate mouse (row, col)
  1258.              mo_press()     Get button pressed info (button, location..)
  1259.              mo_release()   Get button released info ( " " " " " " " " )
  1260.              mo_region()    Set mouse hot area (row, col, width, height)
  1261.              mo_setptr()    Set mouse pointer (style, attributes)
  1262.              mo_wait()      Wait for mouse to settle (de bouncing logic)
  1263.              mo_nbut()      Return # of buttons on mouse
  1264.  
  1265.         Most mouse applications will use and generally only need to use: 
  1266.         mo_reset(), mo_show(), mo_hide(), and most or all of the 
  1267.         application level functions.  
  1268.  
  1269.         The low level functions are provided for those who prefer to deal 
  1270.         with the mouse on its 640 x 200 pixel plane.
  1271.  
  1272.         All of the above supported functions are documented in the 
  1273.         FUNCTION CALL SYNOPSIS section of this manual.
  1274.  
  1275.         * Interfaces to these functions are provided, but are not 
  1276.         supported, by Star Guidance. 
  1277.  
  1278.  
  1279.  
  1280.  
  1281.                                    21
  1282.  
  1283.  
  1284.  
  1285.         Mouse Basics - continued.
  1286.  
  1287.  
  1288.  
  1289.         Mouse Programming Example (Basic)
  1290.  
  1291.         #include "winboss.h"                    /* ALWAYS */
  1292.  
  1293.         main()
  1294.         {
  1295.         MOUSEPTR m1;                            /* my mouse ptr */
  1296.         int mstat, mclik, mrow, mcol;           /* mouse stuff */
  1297.         int i;                                  /* scratch */
  1298.  
  1299.           v_cls(NORMAL);                        /* clear the screen */
  1300.           v_locate(0,0,0);                      /* locate the cursor */
  1301.  
  1302.           m1 = mo_reset();                      /* init mouse */
  1303.  
  1304.           if(m1) {                              /* mouse exists */
  1305.             printf("Mouse exists with %d buttons.\n", mo_nbutt(m1));
  1306.             mo_setptr(m1, 0x1E, NORMAL);        /* set mouse pointer style */
  1307.             mo_reigon(m1, 0, 0, 80, 25);        /* set mouse "window" */
  1308.             mo_show(m1);                        /* show the critter */
  1309.  
  1310.             v_locate(0,5,0);
  1311.             printf("Roll test... move mouse, click left or right to end.\n");
  1312.             do {                                /* rolling test */
  1313.               mo_rcpos(m1, &mstat, &mrow, &mcol);
  1314.               v_locate(0,6,0);
  1315.               printf("Mouse @ %03d,%03d", mrow, mcol);
  1316.             } while (!mstat);
  1317.  
  1318.             v_cls(NORMAL);                      /* clear screen */
  1319.             v_locate(0,0,0);                    /* home cursor */
  1320.             mo_hide(m1);                        /* hide mouse */
  1321.             m1 = mo_reset();                    /* reset mouse */
  1322.             exit(0);                            /* finito */
  1323.           }
  1324.           else {
  1325.             printf("NO MICE HERE!!\n");         /* tell of woe... */
  1326.             exit(0);                            /* exit */
  1327.           }
  1328.         }
  1329.  
  1330.         /* End */
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.                                    22
  1343.  
  1344.  
  1345.  
  1346.         4.7. Important Concepts
  1347.  
  1348.         The preceding programming examples serve as the foundation for 
  1349.         some fundamental, but very important, concepts.  
  1350.  
  1351.         4.7.1. WINBOSS.H
  1352.  
  1353.         The Window BOSS requires the file "winboss.h" to be included in 
  1354.         any source code files that are going to reference any of the 
  1355.         windowing, data entry, or form control functions.  Take the time 
  1356.         to peruse this file as it contains all of the constants and 
  1357.         structures used by both The Window BOSS and Data Clerk.  
  1358.         Also, please note that WINBOSS.H includes other standard compiler 
  1359.         header files.
  1360.  
  1361.         4.7.2. Window Handles
  1362.  
  1363.         All windowing functions (any function beginning with "wn_") 
  1364.         either explicitly require an associated window pointer to work, 
  1365.         or assume one already is, or will be, created.  
  1366.  
  1367.         4.7.3. Mouse Handles
  1368.  
  1369.         All mouse functions (any function beginning with "mo_") 
  1370.         either explicitly require an associated mouse pointer to work, 
  1371.         or assume one already is, or will be, created.  
  1372.  
  1373.         4.7.4. Window Origin
  1374.  
  1375.         Windows have an origin relative to the upper left hand corner of 
  1376.         the screen which is always row 0, and column 0.
  1377.  
  1378.         4.7.5. Text and Data Field Origins
  1379.  
  1380.         Text and data fields have an origin relative to the upper left 
  1381.         hand corner of the window, which is always row 0, column 0.
  1382.  
  1383.         4.7.6. Attributes
  1384.  
  1385.         Attributes (foreground/background colors) must be specified for 
  1386.         windows, borders, and data entry fields.  Prompts for data entry 
  1387.         fields always have the same attributes as the window. The fields 
  1388.         themselves can have, but do not require, a different attribute 
  1389.         set.
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  
  1403.                                    23
  1404.  
  1405.  
  1406.  
  1407.         4.7.7. Fields and Forms
  1408.  
  1409.         Fields are defined by calling the field definition functions 
  1410.         (wn_gdate, wn_gtime, wn_gphone, ...) with "SET" as the function 
  1411.         code (1st arg), a valid form handle (2nd arg), a field sequence 
  1412.         number (3rd arg), and the window handle (4th arg) belonging to 
  1413.         the window in which the form is to be displayed.  The same 
  1414.         functions that are used to retrieve discrete information can be 
  1415.         combined to create a form when used in conjunction with 
  1416.         wn_frmopn() and wn_frmget().  Note the use of XEQ vs. SET, NFRM 
  1417.         vs. f1, and NFLD in the preceding two program examples.  XEQ 
  1418.         stands for "execute now", while SET stands for "set up for later 
  1419.         execution under wn_frmget()".
  1420.  
  1421.         Forms are anchored to a particular window and must be created by 
  1422.         wn_frmopn() and defined with field definition functions.
  1423.  
  1424.         Data entry fields can be edited, pre-filled, have validation 
  1425.         ranges, and have both help and error messages associated with 
  1426.         them.  
  1427.  
  1428.         4.7.8. Return Values
  1429.  
  1430.         Some functions return an indication of success or failure which 
  1431.         you can foolishly ignore, or check to determine what action to 
  1432.         take.
  1433.  
  1434.         4.7.9. Closing Forms and Windows
  1435.  
  1436.         Both forms and windows should be closed when they are no longer 
  1437.         needed.  Although you can close them in any order, it makes sense 
  1438.         to close all forms associated with a window before closing the 
  1439.         window itself.  As a side note - attempting to reference either 
  1440.         forms or windows which have been closed can lead to unpredictable 
  1441.         results.
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.                                    24
  1465.  
  1466.  
  1467.  
  1468.         Important Concepts - continued.
  1469.  
  1470.  
  1471.  
  1472.         4.7.10. Overlapping Windows
  1473.  
  1474.         The Window BOSS fully supports the concept of overlapping 
  1475.         windows, that is to say that you can have several windows on the 
  1476.         screen at the same time and freely access any one of them without 
  1477.         having to be concerned with the order in which they were opened 
  1478.         or whether or not any other windows overlap the one you wish to 
  1479.         access.  The Window BOSS employs the "most recently used is 
  1480.         active" concept.  This concept is based on the following:
  1481.  
  1482.              . The last window referenced is the current active 
  1483.                window.  
  1484.  
  1485.              . The current active window is always the top window.
  1486.  
  1487.         For example, let us assume that you have opened three overlapping 
  1488.         windows in the following order; w1, w2, w3. w3 is considered to 
  1489.         be the top window because it was the last window referenced. If 
  1490.         you now reference, or explicitly activate w2, The Window BOSS 
  1491.         will automatically adjust the screen image to insure that w2 is 
  1492.         now the top window with w3 and w1 being partially hidden by w2.
  1493.  
  1494.                   Before                   After
  1495.  
  1496.                   +----------+             +----------+
  1497.                   |  W1      |             | W1       |
  1498.                   |  +----------+          |  +----------+
  1499.                   |  | W2       |          |  | W2       |
  1500.                   |  |  +------------+     |  |          |----+
  1501.                   |  |  | W3         |     |  |          | W3 |
  1502.                   |  |  |            |     |  |          |    |
  1503.                   |  |  +------------+     |  |          |----+
  1504.                   |  |          |          |  |          |
  1505.                   |  +----------+          |  +----------+
  1506.                   |          |             |          |
  1507.                   +----------+             +----------+
  1508.  
  1509.         It is extremely important to keep in mind that The Window BOSS 
  1510.         will automatically activate (bring to the top) the window being 
  1511.         referenced.  By keeping your screen layouts attractive and 
  1512.         uncluttered there will be a minimum of window thrashing which is 
  1513.         both annoying and time consuming.
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.                                    25
  1526.  
  1527.  
  1528.  
  1529.         Important Concepts - continued.
  1530.  
  1531.  
  1532.  
  1533.         4.7.11. Functions
  1534.  
  1535.         The Window BOSS's functions fall into four major groups: those 
  1536.         that manipulate windows, those that deal with data entry, those 
  1537.         that deal with the mouse, and those that deal with the video or 
  1538.         keyboard interface at a relatively low level.  All window and 
  1539.         data manipulation functions begin with the prefix "wn_" as in 
  1540.         "wn_open".  All mouse functions begin with "mo_" as in 
  1541.         "mo_reset", while all video and keyboard based functions begin 
  1542.         with "v_" or "_" as in "v_getch" and "_putch".  This convention 
  1543.         makes it easy to remember where to look when you want to do 
  1544.         something.  Additionally, there are several global functions 
  1545.         which begin with "wns_".  These functions, although visible to 
  1546.         the outside world, are used internally by The Window BOSS. 
  1547.  
  1548.         So ends the tale of the basics, you are now ready to add sizzle, 
  1549.         bright lights, and artistic touches to all your applications!  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.                                    26
  1587.  
  1588.  
  1589.  
  1590.         5. Distribution Methods & Media Kits 
  1591.  
  1592.         The Window BOSS is distributed on HIGH DENSITY diskettes.  There 
  1593.         are two media kits available: The Shareware diskette kit and The 
  1594.         Source diskette kit.  This doucument describes both media kits.  
  1595.         Neither media kit contains ALL of the files listed.
  1596.  
  1597.         The Shareware diskettes can be freely copied and shared.  The 
  1598.         Source diskettes cannot. In either case, you receive a bundled 
  1599.         product -- that is to say, we do not require you to order a 
  1600.         separate media kit for Microsoft, another for Borland, and so on.  
  1601.         All our products include support for all the compilers we 
  1602.         support. This makes moving from one compiler to another child's 
  1603.         play, and it also helps to protect your software development 
  1604.         investment, while at the same time saving you a significant sum 
  1605.         of money!
  1606.  
  1607.         5.1. CompuServe, GENIE, & Bulletin Board Files
  1608.  
  1609.         We always upload the latest release of shareware files to GENIE, 
  1610.         CompuServe, and selected BBS(s) around the country.  These 
  1611.         files can be found in the Vendor Support Software Library on the 
  1612.         IBM Round Table (M 616) of GENIE and in the "C" Language Section on 
  1613.         the IBM Programming Sig (GO IBMPRO) of CompuServe.  In all cases 
  1614.         we try to name the required files as BOSS01.EXE (code++), 
  1615.         BOSS2A.EXE, BOSS2B.EXE, BOSS2C.EXE (libs), BOSS03.EXE 
  1616.         (documentation).  Naturally, this naming convention is subject to 
  1617.         the approval of the respective service provider.  However, it is 
  1618.         reasonable to assume that the required files will always conform 
  1619.         to a naming convention that begins with "BOSS" or "BOS" and have 
  1620.         the keyword "windows" associated with them.  
  1621.  
  1622.         If you can not find The Window BOSS files on GENIE or 
  1623.         CompuServe it may be due to a restructuring of the SIGs by the 
  1624.         respective service provider.  Try looking in the vendor support, 
  1625.         systems, or language areas of the SIGS.
  1626.  
  1627.         Bulletin Board files follow the same naming conventions as GENIE 
  1628.         and CompuServe files.  
  1629.  
  1630.         5.2. The SHAREWARE Distribution Diskette(s)
  1631.  
  1632.           The SHAREWARE diskette(s) contain the following files:
  1633.  
  1634.              BOSS_DOC.EXE        <- Window BOSS Documentation archive
  1635.              BOSS_SUP.EXE        <- Support archive (code, etc.)
  1636.              READ.ME             <- Important notes
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.                                    27
  1648.  
  1649.  
  1650.  
  1651.         The Shareware Distribution Diskette - continued.
  1652.  
  1653.  
  1654.              BOSS_LB1.EXE        <- Library archive (Microsoft)
  1655.              BOSS_LB2.EXE        <- Library archive (Borland)
  1656.              BOSS_LB3.EXE        <- Library archive (Watcom)
  1657.  
  1658.            =============================================================  
  1659.  
  1660.              Contents of BOSS_DOC
  1661.  
  1662.                BOSS.MAN          <- This manual
  1663.                BOSS.TOC          <- Table of Contents
  1664.  
  1665.              Contents of BOSS_SUP
  1666.  
  1667.                MSC7.BAT          <- Compiler Driver - MSC 7.0
  1668.                MSC8.BAT          <- Compiler Driver - MSC 8.0
  1669.                MSQC25.BAT        <- Compiler Driver - Quick C 2.5
  1670.                TCPPS.BAT         <- Compiler Driver - Borland Turbo C++
  1671.                TC21.BAT          <- Compiler Driver - Borland TC 2.01
  1672.                BC3S.BAT          <- Compiler Driver - Borland C 3.X
  1673.                BC4S.BAT          <- Compiler Driver - Borland C 4.X
  1674.                WOCS.BAT          <- Compiler Driver - Watcom C
  1675.                LOADMS7.BAT       <- Link Batch file - Microsoft C 7.X
  1676.                LOADMS8.BAT       <- Link Batch file - Microsoft C 8.X
  1677.                LOADQC25.BAT      <- Link Batch file - Quick C 
  1678.                LOADTC21.BAT      <- Link Batch file - Borland Turbo C
  1679.                LOADTCPP.BAT      <- Link Batch file - Borland Turbo C++   
  1680.                LOADBC3.BAT       <- Link Batch file - Borland C 3.X
  1681.                LOADBC4.BAT       <- Link Batch file - Borland C 4.X
  1682.                LOADWAT.BAT       <- Link Batch file - Watcom C
  1683.  
  1684.  
  1685.  
  1686.  
  1687.  
  1688.  
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.                                    28
  1709.  
  1710.  
  1711.  
  1712.         The Shareware Distribution Diskette - continued.
  1713.  
  1714.  
  1715.              Contents of BOSS_SUP - continued.
  1716.  
  1717.                BOSSDEMO.C        <- Source to BOSSDEMO
  1718.                BOSSDEMO.EXE      <- DEMO Program
  1719.                PDDEMO.C          <- Source to PDDEMO (Pulldown Demo)
  1720.                PDDEMO.EXE        <- Pulldown Demo Progarm
  1721.                GENINDEX.C        <- Source to GENINDEX
  1722.                HELLO.C           <- The Classic...
  1723.                INTELC.HLP        <- Demo DATA file
  1724.                INTELC.NDX        <- Index for Demo DATA file
  1725.                REV.HST           <- Revision History
  1726.                REV.LEV           <- Revision Level
  1727.                SAMPLE.C          <- Data entry sample program
  1728.                WINBOSS.FN7       <- Function Prototype INCLUDE file
  1729.                WINBOSS.FN8       <- Function Prototype INCLUDE file
  1730.                WINBOSS.FNB       <- Function Prototype INCLUDE file 
  1731.                WINBOSS.EXT       <- External Definition INCLUDE file
  1732.                WINBOSS.H         <- BOSS INCLUDE file
  1733.                WN_FRMGE.C        <- Data Entry form reader
  1734.                WN_GBOOL.C        <- Data Entry function (logical)
  1735.                WN_GDATE.C        <- Data Entry function (dates)
  1736.                WN_GDOUB.C        <- Data Entry function (double)
  1737.                WN_GEDAT.C        <- Data Entry function (dates, Europe)
  1738.                WN_GFLOA.C        <- Data Entry function (floats)
  1739.                WN_GPHON.C        <- Data Entry function (phone)
  1740.                WN_GTIME.C        <- Data Entry function (time)
  1741.                WN_GULON.C        <- Data Entry function (unsigned long)
  1742.                WN_GINT.C         <- Data Entry function (integer)
  1743.                WN_GLONG.C        <- Data Entry function (long)
  1744.                WN_GPWOR.C        <- Data Entry function (password)
  1745.                WN_GTEXT.C        <- Data Entry function (various text)
  1746.                WN_GUINT.C        <- Data Entry function (unsigned int)
  1747.                WN_GSSN.C         <- Data Entry function (social sec. #)
  1748.                WN_IEMSG.C        <- Data Entry error message handler
  1749.                WN_IHMSG.C        <- Data Entry help message hander
  1750.                WN_HELP.C         <- Help function source
  1751.                WN_PDOWN.C        <- Pull down function source
  1752.                WN_POPUP.C        <- Popup function source
  1753.                WN_PUTS.C         <- Source to wn_puts()
  1754.  
  1755.              Contents of BOSS_LB1
  1756.  
  1757.                SMSC7.LIB         <- BOSS library - Microsoft C 7.X
  1758.                SMSC8.LIB         <- BOSS library - Microsoft C 8.X 
  1759.                SMSQC25.LIB       <- BOSS library - Microsoft Q/C 
  1760.                WINBOSS.FNS       <- Function Prototype INCLUDE File
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.                                    29
  1770.  
  1771.  
  1772.  
  1773.         The Shareware Distribution Diskette - continued.
  1774.  
  1775.  
  1776.              Contents of BOSS_LB3
  1777.  
  1778.                WATOC.LIB         <- BOSS library - Watcom C
  1779.                WINBOSS.FNS       <- Function Prototype INCLUDE File
  1780.  
  1781.              Contents of BOSS_LB2
  1782.  
  1783.                STC201.LIB        <- BOSS library - Borland Turbo C
  1784.                STC.LIB           <- BOSS library - Borland Turbo C++ 
  1785.                SBC3.LIB          <- BOSS Library - Borland C++ 3.X
  1786.                SBC4.LIB          <- BOSS Library - Borland C++ 4.X
  1787.                WINBOSS.FNS       <- Function Prototype INCLUDE File
  1788.  
  1789.  
  1790.  
  1791.  
  1792.  
  1793.  
  1794.  
  1795.  
  1796.  
  1797.  
  1798.  
  1799.  
  1800.  
  1801.  
  1802.  
  1803.  
  1804.  
  1805.  
  1806.  
  1807.  
  1808.  
  1809.  
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.  
  1829.  
  1830.                                    30
  1831.  
  1832.  
  1833.  
  1834.         5.3. The SOURCE Distribution Diskette(s)
  1835.  
  1836.          The SOURCE diskette(s) contain the following self extracting LHA 
  1837.          archive and support files:
  1838.  
  1839.              DOC.EXE             <- Manual 
  1840.              DEMO.EXE            <- DEMO program & data files 
  1841.              READ.ME             <- Important notes
  1842.              REVHST.EXE          <- Revision History 
  1843.              REV.LEV             <- Revision Level 
  1844.  
  1845.              CFILES.EXE          <- Source to all "C" modules
  1846.              ASMFILES.EXE        <- Source to all "Assembly" modules
  1847.  
  1848.              MSC7.EXE            <- Microsoft C 7.X Specific files
  1849.              MSC8.EXE            <- Microsoft C 8.X Specific files
  1850.              MSQC25.EXE          <- Microsoft Quick C Specific files
  1851.              BC3.EXE             <- Borland C++ 3.X Specific files
  1852.              BC4.EXE             <- Borland C++ 4.X Specific files
  1853.              TCPP.EXE            <- Borland Turbo C++ Specific files
  1854.              TC201.EXE           <- Borland Turbo C Specific files
  1855.              WATCOM.EXE          <- Watcom Specific files
  1856.  
  1857.          Contents of DEMO.EXE (Demo programs and demo data files)
  1858.  
  1859.              BOSSDEMO.EXE        <- All purpose demo program
  1860.              PDDEMO.EXE          <- Pulldown Demo
  1861.              INTELC.HLP          <- BOSSDEMO data file
  1862.              INTELC.NDX          <- BOSSDEMO data file   
  1863.  
  1864.  
  1865.  
  1866.  
  1867.  
  1868.  
  1869.  
  1870.  
  1871.  
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.  
  1890.  
  1891.                                    31
  1892.  
  1893.  
  1894.  
  1895.         The SOURCE Distribution Diskette - continued.
  1896.              
  1897.  
  1898.  
  1899.              Contents of CFILES.EXE (C Source Files)
  1900.  
  1901.                BOSSDEMO.C        <- BOSSDEMO Source
  1902.                PDDEMO.C          <- Pulldown Demo Source
  1903.                GENINDEX.C        <- GENINDEX Source
  1904.                HELLO.C           <- The classic...
  1905.                SCANCODE.C        <- Quickie to display KB scancodes
  1906.                SAMPLE.C          <- Data entry sample program
  1907.                WINDOWS.C         <- Globals 
  1908.                WINBOSS.H         <- Window BOSS INCLUDE file
  1909.                WINBOSS.EXT       <- Window BOSS INCLUDE file 
  1910.                WN_ACTIV.C        <- Window activation, memory mgmt ++
  1911.                WN_BIOS.C         <- BIOS video functions
  1912.                WN_BOXSE.C        <- Set box drawing character set
  1913.                WN_CLOSE.C        <- Window Close
  1914.                WN_CLR.C          <- Clear window
  1915.                WN_CLRFN.C        <- Clear line, end of window
  1916.                WN_COLOR.C        <- Set window colors
  1917.                WN_DBORD.C        <- Draw window borders
  1918.                WN_DELRO.C        <- Delete row in window
  1919.                WN_DMA.C          <- Set video access mode
  1920.                WN_SCROL.C        <- Set window scrolling method
  1921.                WN_HELP.C         <- Help function source
  1922.                WN_POPUP.C        <- Popup menu source
  1923.                WN_PDOWN.C        <- Pulldown menu source
  1924.                WN_INIT.C         <- Initialize window system
  1925.                WN_DMODE.C        <- Set window display mode
  1926.                WN_FIXCS.C        <- Fix physical cursor location
  1927.                WN_GETS.C         <- Get string with validation   
  1928.                WN_INSRO.C        <- Insert row in window
  1929.                WN_LOCAT.C        <- Locate cursor in window
  1930.                WN_MOVE.C         <- Move window
  1931.                WN_MOUSE.C        <- Mouse interface routines
  1932.                WN_NATRI.C        <- Set new attributes NOW
  1933.                WN_OPEN.C         <- Window open
  1934.                WN_PRINT.C        <- Window printf
  1935.                WN_PUTS.C         <- Put string in window
  1936.                WN_RESTO.C        <- Restore window image
  1937.                WN_SAVE.C         <- Save window image
  1938.                WN_STRING.C       <- String (char) functions
  1939.                WN_SUP.C          <- Internal support functions
  1940.                WN_SYNC.C         <- Set/Clear cursor sync
  1941.                WN_TITLE.C        <- Title window (BASIC)
  1942.                WM_STITLE.C       <- Title window (SUPER)
  1943.                WN_WRAP.C         <- Set/Clear text wrap
  1944.                WPRINTF.C         <- Alternate window printf
  1945.  
  1946.  
  1947.  
  1948.  
  1949.  
  1950.  
  1951.  
  1952.                                    32
  1953.  
  1954.  
  1955.  
  1956.         The SOURCE Distribution Diskette - continued.
  1957.              
  1958.  
  1959.  
  1960.              Contents of CFILES.EXE (C Source Files - continued.)
  1961.  
  1962.  
  1963.                WINBOSS.FNT       <- Prototype header
  1964.                WINBOSS.FNB       <- Prototype header (Borland)
  1965.                WINBOSS.FN7       <- Prototype header (Microsoft 7.X)
  1966.                WINBOSS.FN8       <- Prototype header (Microsoft 8.X)
  1967.                WN_GDATE.C        <- Data entry - get date
  1968.                WN_GEDATE.C       <- Data entry - get date (Europe)
  1969.                WN_GDOUBLE.C      <- Data entry - get double
  1970.                WN_GTIME.C        <- Data entry - get time
  1971.                WN_GTEXT.C        <- Data entry - get text
  1972.                WN_GPHONE.C       <- Data entry - get phone #
  1973.                WN_GPWORD.C       <- Data entry - get password
  1974.                WN_GINT.C         <- Data entry - get integer
  1975.                WN_GUINT.C        <- Data entry - get unsigned integer
  1976.                WN_GULONG.C       <- Data entry - get unsigned long
  1977.                WN_GLONG.C        <- Data entry - get long
  1978.                WN_GFLOAT.C       <- Data entry - get float 
  1979.                WN_GBOOL.C        <- Data entry - get logical  
  1980.                WN_GSSN           <- Data entry - get social security #
  1981.                WN_DTEXT.C        <- Data entry - display text
  1982.                WN_FRMOPN.C       <- Data entry - FORM open
  1983.                WN_FRMGET.C       <- Data entry - FORM read
  1984.                WN_FRMCLS.C       <- Data entry - FORM close
  1985.                WN_INPUT.C        <- Data entry - common input 
  1986.                WN_IEMSG.C        <- Data entry - error msg handler
  1987.                WN_IHMSG.C        <- Data entry - help msg handler
  1988.            
  1989.              Contents of ASMFILES.EXE (ASM Source Files)
  1990.  
  1991.                MSVLIB.ASM        <- ASM routines for Microsoft
  1992.                WCVLIB.ASM        <- ASM routines for WATCOM C
  1993.                TCVLIB.ASM        <- ASM routines for Borland C++ & Turbo C++
  1994.  
  1995.  
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003.  
  2004.  
  2005.  
  2006.  
  2007.  
  2008.  
  2009.  
  2010.  
  2011.  
  2012.  
  2013.                                    33
  2014.  
  2015.  
  2016.  
  2017.         The SOURCE Distribution Diskette - continued.
  2018.  
  2019.  
  2020.  
  2021.              Contents of BC3.EXE and BC4.EXE (Borland C++ Compiler)
  2022.  
  2023.                LCOMPILE.BAT      <- TCC - Large model - compile *.c 
  2024.                SCOMPILE.BAT      <- TCC - Small model - compile *.c
  2025.                CCOMPILE.BAT      <- TCC - Compact model - compile *.c
  2026.                MCOMPILE.BAT      <- TCC - Medium model - compile *.c
  2027.                HCOMPILE.BAT      <- TCC - Huge model - compile *.c
  2028.                LOADBC.BAT        <- Compile and link driver for BOSSDEMO
  2029.                LOADS.BAT         <- Small model compile and link driver
  2030.                LOADC.BAT         <- Compact model compile and link driver
  2031.                LOADM.BAT         <- Medium model compile and link driver
  2032.                LOADL.BAT         <- Large model compile and link driver
  2033.                LOADH.BAT         <- Huge model compile and link driver
  2034.                LWIN.LIB          <- Large model library
  2035.                MAKELIB.BAT       <- Build LIB from OBJ(s)
  2036.                MAKELIB.CMD       <- Data file for MAKELIB.BAT
  2037.                SWIN.LIB          <- Small model library
  2038.                BCCL.BAT          <- Large model BCC compiler driver
  2039.                BCCS.BAT          <- Small model BCC compiler driver
  2040.                BCCM.BAT          <- Medium model BCC compiler driver
  2041.                BCCC.BAT          <- Compact model BCC compiler driver
  2042.                BCCH.BAT          <- Huge model BCC compiler driver
  2043.                WINBOSS.FNS       <- Type checking header
  2044.                ?TCVLIB.OBJ       <- Memory model specific object file
  2045.  
  2046.              Contents of TCPP.EXE (Borland TurboC++ Compiler)
  2047.              Contents of TC201.EXE (Borland TurboC Compiler)
  2048.  
  2049.                LCOMPILE.BAT      <- TCC - Large model - compile *.c 
  2050.                SCOMPILE.BAT      <- TCC - Small model - compile *.c
  2051.                CCOMPILE.BAT      <- TCC - Compact model - compile *.c
  2052.                MCOMPILE.BAT      <- TCC - Medium model - compile *.c
  2053.                HCOMPILE.BAT      <- TCC - Huge model - compile *.c
  2054.                LOADTC.BAT        <- Compile & link driver for BOSSDEMO
  2055.                LWIN.LIB          <- Large model library
  2056.                MAKELIB.BAT       <- Build LIB from OBJ(s)
  2057.                MAKELIB.CMD       <- Data file for MAKELIB.BAT
  2058.                SWIN.LIB          <- Small model library
  2059.                TCCL.BAT          <- Large model TCC compiler driver
  2060.                TCCS.BAT          <- Small model TCC compiler driver
  2061.                TCCM.BAT          <- Medium model TCC compiler driver
  2062.                TCCC.BAT          <- Compact model TCC compiler driver
  2063.                TCCH.BAT          <- Huge model TCC compiler driver
  2064.                LOADS.BAT         <- Small model compile and link driver
  2065.                LOADC.BAT         <- Compact model compile and link driver
  2066.                LOADM.BAT         <- Medium model compile and link driver
  2067.                LOADL.BAT         <- Large model compile and link driver
  2068.                LOADH.BAT         <- Huge model compile and link driver
  2069.                WINBOSS.FNS       <- Type checking header
  2070.                ?TCVLIB.OBJ       <- Memory model specific object file 
  2071.  
  2072.  
  2073.  
  2074.                                    34
  2075.  
  2076.  
  2077.  
  2078.         The SOURCE Distribution Diskette - continued.
  2079.              
  2080.  
  2081.  
  2082.              Contents of MSC7.EXE and MSC8.EXE (Microsoft C Specific Files)
  2083.  
  2084.                LCOMPILE.BAT      <- Large model - compile *.c
  2085.                SCOMPILE.BAT      <- Small model - compile *.c
  2086.                MCOMPILE.BAT      <- Medium model - compile *.c
  2087.                CCOMPILE.BAT      <- Compact model - compile *.c
  2088.                HCOMPILE.BAT      <- Huge model - compile *.c
  2089.                MCCL.BAT          <- Large model compiler driver
  2090.                MCCS.BAT          <- Small model compiler driver
  2091.                MCCM.BAT          <- Medium model compiler driver
  2092.                MCCC.BAT          <- Compact model compiler driver
  2093.                MCCH.BAT          <- Huge mode compiler driver
  2094.                LOADS.BAT         <- Small model compile and link driver
  2095.                LOADC.BAT         <- Compact model compile and link driver
  2096.                LOADM.BAT         <- Medium model compile and link driver
  2097.                LOADL.BAT         <- Large model compile and link driver
  2098.                LOADH.BAT         <- Huge model compile and link driver
  2099.                LOADMS.BAT        <- Compile & link driver for BOSSDEMO
  2100.                LWIN.LIB          <- Large model library
  2101.                SWIN.LIB          <- Small model library
  2102.                MAKELIB.BAT       <- Build LIB from OBJ(s)
  2103.                MAKELIB.CMD       <- Data file for MAKELIB.BAT
  2104.                WINBOSS.FNS       <- Type checking header
  2105.                ?MSVLIB.OBJ       <- Memory model specific object file
  2106.  
  2107.              Contents of MSQC25.EXE  (Microsoft Quick C Specific Files)
  2108.  
  2109.                SCOMPILE.BAT      <- Small model - compile *.c
  2110.                LCOMPILE.BAT      <- Large model - compile *.c
  2111.                MCOMPILE.BAT      <- Medium model - compile *.c
  2112.                CCOMPILE.BAT      <- Compact model - compile *.c
  2113.                HCOMPILE.BAT      <- Huge model - compile *.c
  2114.                MCCL.BAT          <- Large model compiler driver
  2115.                MCCS.BAT          <- Small model compiler driver
  2116.                MCCM.BAT          <- Medium model compiler driver
  2117.                MCCC.BAT          <- Compact model compiler driver
  2118.                MCCH.BAT          <- Huge model compiler driver
  2119.                LOADMS.BAT        <- Compile & link driver for BOSSDEMO
  2120.                LOADS.BAT         <- Small model compile and link driver
  2121.                LOADC.BAT         <- Compact model compile and link driver
  2122.                LOADM.BAT         <- Medium model compile and link driver
  2123.                LOADL.BAT         <- Large model compile and link driver
  2124.                LOADH.BAT         <- Huge model compile and link driver
  2125.                LWIN.LIB          <- Large model library
  2126.                SWIN.LIB          <- Small model library
  2127.                MAKELIB.BAT       <- Build LIB from OBJ(s)
  2128.                MAKELIB.CMD       <- Data file for MAKELIB.BAT
  2129.                WINBOSS.FNS       <- Type checking header
  2130.                ?MSVLIB.OBJ       <- Memory model specific object file
  2131.                   
  2132.  
  2133.  
  2134.  
  2135.                                    35
  2136.  
  2137.  
  2138.  
  2139.         The SOURCE Distribution Diskette - continued.
  2140.              
  2141.  
  2142.  
  2143.  
  2144.              Contents of WATCOM.EXE (Watcom Specific Files)
  2145.  
  2146.                WCCS.BAT          <- Small model compiler driver
  2147.                WCCL.BAT          <- Large model compiler driver
  2148.                WCCM.BAT          <- Medium model compiler driver
  2149.                WCCC.BAT          <- Compact model compiler driver
  2150.                WCCH.BAT          <- Huge model compiler driver
  2151.                LOADS.BAT         <- Small model compile and link driver
  2152.                LOADC.BAT         <- Compact model compile and link driver
  2153.                LOADM.BAT         <- Medium model compile and link driver
  2154.                LOADL.BAT         <- Large model compile and link driver
  2155.                LOADH.BAT         <- Huge model compile and link driver
  2156.                CCOMPILE.BAT      <- Compact model - compile *.c
  2157.                LCOMPILE.BAT      <- Large model   - compile *.c
  2158.                MCOMPILE.BAT      <- Medium model  - compile *.c
  2159.                SCOMPILE.BAT      <- Small model   - compile *.c
  2160.                HCOMPILE.BAT      <- Huge model    - compile *.c
  2161.                LOADWAT.BAT       <- Link driver for BOSSDEMO
  2162.                MAKELIB.BAT       <- Build LIB from OBJ(s)
  2163.                MAKELIB.CMD       <- Data file for MAKELIB.BAT
  2164.                SWIN.LIB          <- Small model library
  2165.                LWIN.LIB          <- Large model library
  2166.                WINBOSS.FNS       <- Type checking header
  2167.                ?WCVLIB.OBJ       <- Memory model specific object files
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.  
  2186.  
  2187.  
  2188.  
  2189.  
  2190.  
  2191.  
  2192.  
  2193.  
  2194.  
  2195.  
  2196.                                    36
  2197.  
  2198.  
  2199.  
  2200.         6. Installation, Compiling, Linking 
  2201.  
  2202.         6.1. Installation
  2203.  
  2204.              By the numbers:
  2205.  
  2206.                 1) MAKE A BACKUP OF ALL DISKS !!!
  2207.  
  2208.                 2) Shareware diskettes - Execute  
  2209.                    BOSS_SUP.EXE and the BOSS_LB?.EXE file that 
  2210.                    corresponds to the compiler you normally use. If you 
  2211.                    use more than one compiler then perform the 
  2212.                    installation procedure from start to finish for each 
  2213.                    compiler. For example (Microsoft):
  2214.  
  2215.                           C:\WINBOSS>A:BOSS_SUP
  2216.                           C:\WINBOSS>A:BOSS_LB1 
  2217.  
  2218.                 2) Source Code diskettes - Depending upon the 
  2219.                    compiler you intend to use, execute one of the 
  2220.                    following: MSC7.EXE, MSC8.EXE, MSQC25.EXE, 
  2221.                    BC3.EXE, BC4.EXE, TCPP.EXE, TC201.EXE,
  2222.                    or WATCOM.EXE. 
  2223.  
  2224.                    If you use more than one compiler then perform the 
  2225.                    installation procedure from start to finish for each 
  2226.                    compiler.
  2227.  
  2228.                 3) Copy the LIBrary that corresponds to the compiler you 
  2229.                    are using onto the disk(s) and/or sub-directories that 
  2230.                    contain your "C" compiler's run time libraries . Be 
  2231.                    sure that the small model library is named "SWIN.LIB" 
  2232.                    (see notes below). The large model library should be 
  2233.                    named "LWIN.LIB". 
  2234.  
  2235.  
  2236.                    ** Shareware Users Note ** - The examples used in the 
  2237.                    documentation assume the library's name to be SWIN.LIB 
  2238.                    for the small memory model. 
  2239.  
  2240.                    You should rename the library you extracted to conform 
  2241.                    to this naming convention to eliminate any possible 
  2242.                    confusion.  For example:
  2243.  
  2244.                             B:>RENAME SMSC7.LIB SWIN.LIB
  2245.  
  2246.                 4) Copy "WINBOSS.H", "WINBOSS.FNS", and "WINBOSS.EXT" to 
  2247.                    the disk(s) and/or sub-directories that contain your 
  2248.                    "C" compiler's include files. 
  2249.  
  2250.  
  2251.  
  2252.  
  2253.  
  2254.  
  2255.  
  2256.  
  2257.                                    37
  2258.  
  2259.  
  2260.  
  2261.         Installation - continued.
  2262.  
  2263.  
  2264.  
  2265.                 5) Copy (or rename) the small memory model compile and 
  2266.                    link driver batch file that corresponds to the 
  2267.                    compiler you are using to:
  2268.  
  2269.                                      CSM.BAT
  2270.  
  2271.                 5) Read the "Compiling", "Linking", and "General Notes" 
  2272.                    sections of this manual.  The "General Notes" section 
  2273.                    has across the board information that everyone should 
  2274.                    review and compiler specific tips that are very 
  2275.                    important.
  2276.  
  2277.                 6) Suggestion - After installing The Window BOSS, build 
  2278.                    the HELLO program using either the command line 
  2279.                    compiler or your integrated environment.  If you have 
  2280.                    any difficulty, review both the "Hints on Resolving 
  2281.                    Common Problems" and "General Notes" section of this 
  2282.                    manual.  Pay special attention to the notes on your 
  2283.                    specific compiler.
  2284.  
  2285.                 7) Remember there is no magic to using The Window BOSS. 
  2286.                    It's simple!!
  2287.  
  2288.         6.1.1. Installation Notes and Cautions
  2289.  
  2290.           1) If WINBOSS.FNS is not contained in the archive for your 
  2291.              compiler, or is not present after you unarchive the required 
  2292.              files, copy (or rename) WINBOSS.FN7, WINBOSS.FN8, WINBOSS.FNB 
  2293.              to WINBOSS.FNS according to the following table:
  2294.  
  2295.                        Compiler                 File
  2296.                        ---------                -----
  2297.                        Microsoft 8.0            WINBOSS.FN8
  2298.                        All OTHER Microsof       WINBOSS.FN7
  2299.                        All Borland              WINDOWS.FNB
  2300.                        WATCOM                   WINDOWS.FNB
  2301.  
  2302.           2) If you are installing The Window Boss for multiple compilers 
  2303.              it is imperative that you complete the installation 
  2304.              procedure from start to finish for each compiler.  This will 
  2305.              eliminate any potential problems due to common names across 
  2306.              compilers (WINBOSS.FNS, SWIN.LIB...).
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.  
  2317.  
  2318.                                    38
  2319.  
  2320.  
  2321.  
  2322.         Installation/Compiling/Linking - continued.
  2323.  
  2324.  
  2325.  
  2326.         6.2. Compiling and Linking (Command line)
  2327.  
  2328.              Compile and link your application source code in the 
  2329.              following manner:
  2330.  
  2331.                                   C>csm hello
  2332.  
  2333.              Notes:
  2334.  
  2335.                ** ALL compilers should be invoked with the compiler 
  2336.                driver batch files supplied with The Window BOSS.  Some 
  2337.                compilers require ".c" to be added to the name of the 
  2338.                source file e.g. "csm hello.c".  The examples in this 
  2339.                manual assume you are creating small memory model 
  2340.                programs.
  2341.  
  2342.                The Window BOSS includes "winboss.h", "winboss.fns", and 
  2343.                "winboss.ext".  These files can be placed with your 
  2344.                compiler's other INCLUDE files or they can remain in the 
  2345.                same directory as your "C" programs.  Depending upon your 
  2346.                installation, you may have to edit HELLO.C and/or 
  2347.                WINBOSS.H to follow the "" .vs. <> include file 
  2348.                convention.  All of BOSS's includes are of the form:
  2349.  
  2350.                              #include "include_file_name"
  2351.  
  2352.                If you examine CSM.BAT you will notice some command line 
  2353.                parameters that are passed to your compiler.  These 
  2354.                command line parameters are an absolute requirement and 
  2355.                must always be present.  They are used by "winboss.h" to 
  2356.                set various conditions required by your specific compiler.
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.                                    39
  2380.  
  2381.  
  2382.  
  2383.         Installation/Compiling/Linking - continued.
  2384.  
  2385.  
  2386.  
  2387.         Fixup offset errors are always the result attempting of to link 
  2388.         code compiled under one memory model with libraries created for 
  2389.         use with another memory model.
  2390.  
  2391.         Unresolved externals can be caused by missing user functions, 
  2392.         missing library functions, linking command errors, missing 
  2393.         project files, missing MAKE files, or attempting to link a non 
  2394.         conforming library. Misplaced commas on the command line and C 
  2395.         code typing errors are the most common problems.  In the case of 
  2396.         integrated environment fans (Quick C, MSC PWB, Turbo C) it is 
  2397.         almost always due to forgetting to SET THE PROGRAM LIST to 
  2398.         include The Window BOSS library or, in the case of Turbo C, 
  2399.         forgetting to create a project file that includes an entry for 
  2400.         The Window BOSS library.
  2401.  
  2402.  
  2403.  
  2404.  
  2405.  
  2406.  
  2407.  
  2408.  
  2409.  
  2410.  
  2411.  
  2412.  
  2413.  
  2414.  
  2415.  
  2416.  
  2417.  
  2418.  
  2419.  
  2420.  
  2421.  
  2422.  
  2423.  
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.                                    40
  2441.  
  2442.  
  2443.  
  2444.         7. General and Compiler Specific Notes
  2445.  
  2446.         Source code is provided for all of the high level data entry 
  2447.         functions, the help system, and the popup menu functions.  This 
  2448.         is done so that you (1) have a wide variety of templates to base 
  2449.         any local data entry functions on and (2) have the source to the 
  2450.         code to those functions (help & popup) which are commonly changed 
  2451.         to suit individual taste.
  2452.  
  2453.         WN_BIOS.C and the various assembler files (*.ASM) contain all of 
  2454.         the BIOS interface functions.  Only v_kstat(), v_border(), 
  2455.         _vidblt(), and xferdata() are written in assembly language!!  
  2456.  
  2457.         This one is REAL important - Both the C and assembly functions 
  2458.         make very heavy use of pointers.  The code contains numerous 
  2459.         checks to ensure that memory, outside of that in use by the 
  2460.         program, is not corrupted.  If you attempt to do something that 
  2461.         would cause memory to be corrupted an error message will appear 
  2462.         and your program will exit.  This message will usually say that a 
  2463.         bad handle was passed to some function.  This error is normally 
  2464.         caused by a stray pointer in the application code!  Check all 
  2465.         your pointer operations.  Doing strcpy's to arrays with 
  2466.         insufficient space will always cause this type of problem.
  2467.  
  2468.         Generally speaking, the members of the window control block 
  2469.         (refer to winboss.h) should not be modified unless you are 
  2470.         familiar with how they are used by the various functions.  We 
  2471.         suggest you obtain a hard copy of "winboss.h" and review it even 
  2472.         if you don't have any intentions of modifying the code.  There is 
  2473.         a great deal of information contained in "winboss.h" that you may 
  2474.         find helpful when writing your application.
  2475.  
  2476.         Although the routines appear to support the multi page 
  2477.         capabilities of the IBM Color Card, actual support of this 
  2478.         feature has not been implemented.  Invoking the functions with 
  2479.         references to video pages other than than those documented might 
  2480.         produce interesting, but undesired results.  
  2481.  
  2482.         DOS programs such as Wordstar and Lotus change the video mode when 
  2483.         they run.  If your system is equipped with a color monitor and 
  2484.         your windows are appearing in black and white, issue a call to 
  2485.         v_smode to set the video mode to 3.  Alternatively, you can use 
  2486.         the "MODE CO80" command at DOS level before you run your 
  2487.         application.  
  2488.  
  2489.         The best way to manipulate the method by which windows are 
  2490.         updated is via the wn_dmode() function.  Calling wn_dmode(PAINT) 
  2491.         causes the image to be painted while wn_dmode(FLASH) causes the 
  2492.         image to be flash updated.  Flash updating is the preferred 
  2493.         (default) method.  Please keep in mind that windows are always 
  2494.         flash updated on monochrome systems. 
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.                                    41
  2502.  
  2503.  
  2504.  
  2505.         7.1. Upgrading - Existing Applications Impact
  2506.  
  2507.         If you are upgrading from a previous version of The Window BOSS 
  2508.         be sure to re-compile and re-link your application.  This will 
  2509.         eliminate the possibility of any "unusual" problems.
  2510.  
  2511.         7.2. Current Compilers & Libraries
  2512.  
  2513.         The distribution libraries were created under DOS 6.22 using
  2514.         Microsoft 7.00, Microsoft 8.00c, Microsoft QuickC 2.51, Borland 
  2515.         Turbo C 2.01, Borland Turbo C++ 3.0, Borland C++ 3.1, Borland 
  2516.         C++ 4.02, Watcom C/C++ 10.0.  Compatability and/or support for 
  2517.         other compilers or versions is not clamied or provided.
  2518.  
  2519.         Test hardware: IBMPC/XT/AT, PS/2, with IBM Monochrome, CGA, EGA, 
  2520.         and VGA video adapters.  Additionally, a wide variety of clones 
  2521.         (8088, 8086, 80186, 80286, 80386, 80486, Pentium) with brand name 
  2522.         and noname components were also tested.
  2523.  
  2524.         Several of the compilers support a compile time command line 
  2525.         parameter that results in structures being byte aligned instead 
  2526.         of word aligned.  In all cases, the compiler default option was 
  2527.         used to compile the modules in the various libraries.
  2528.  
  2529.         7.3. EGA & VGA Expanded Line & Column Modes
  2530.  
  2531.         The Window BOSS supports the Expanded Line and Column modes of 
  2532.         both the EGA and VGA video adapters.  However, in order to 
  2533.         preserve The Window BOSS's device independence you will have to 
  2534.         do a little extra work if you intend to write an application that 
  2535.         is going to take advantage of one of these expanded modes.  The 
  2536.         rules are quite simple.  Your application must remain in one 
  2537.         mode.  It can be (25 x 80), (80 x 132), (80 x 43), (80 x 50), or 
  2538.         whatever size your adapter supports.  The adapter must be in the 
  2539.         mode you chose prior to calling ANY of The Window BOSS functions.  
  2540.         WN_PSINIT() must be called first, called only once, and be called 
  2541.         with parameters that reflect the physical screen size that your 
  2542.         application is going to use.  That's all there is to it!  
  2543.  
  2544.         7.4. Terminate and Stay Resident (TSR) Programming
  2545.  
  2546.         The Window BOSS has been successfully incorporated in TSR 
  2547.         programs. Due to the complexities involved in writing and 
  2548.         resolving conflicts associated with TSR(s) and the lack of any 
  2549.         real standards for TSR(s) Star Guidance Consulting, Inc. can not 
  2550.         provide any form of support or assistance for TSR related 
  2551.         problems.  We will, however, work with you in resolving any 
  2552.         problem you can replicate when the program is not resident.
  2553.  
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.                                    42
  2563.  
  2564.  
  2565.  
  2566.         General Notes - continued.
  2567.  
  2568.  
  2569.         7.5. Important Globals
  2570.  
  2571.         Several global symbols are used by the various functions. All are 
  2572.         defined in "windows.c" and referenced in "winboss.ext".  A few 
  2573.         are worthy of special mention:
  2574.  
  2575.                                  int wn_dmaflg;
  2576.                                  int wn_sbit;
  2577.                                  int wns_escape;
  2578.  
  2579.         7.5.1. wns_dmaflg
  2580.  
  2581.              wn_dmaflg when TRUE enables direct writes into video ram. 
  2582.              This is the default setting and should work in all cases.  
  2583.              Setting wn_dmaflg to FALSE will disable these direct writes. 
  2584.              When wn_dmaflg is FALSE the BIOS video routines are used. 
  2585.              This results in slower screen updates.  However, this method 
  2586.              does have the advantage of being considered "well behaved" 
  2587.              by IBM's Topview, Microsoft's Windows, and DESQ.  
  2588.              
  2589.         7.5.2. wn_sbit
  2590.  
  2591.              wn_sbit controls the window refresh rate on systems with  
  2592.              color cards.  When set to SLOW (defined in winboss.h), 
  2593.              window displays will appear to be painted on the screen 
  2594.              rather than flash displayed. This is the default value.  
  2595.              Setting wn_sbit to FAST enables flash displays. Artistic use 
  2596.              of wn_sbit can give your application that extra visual 
  2597.              touch. Experiment!
  2598.  
  2599.              From a performance standpoint, the fastest (flicker & snow 
  2600.              free) screen updates will occur with wn_dmaflg=TRUE 
  2601.              (default) and wn_sbit=FAST (default).  The key words here 
  2602.              are flicker and snow free.  Scrolling speed can be 
  2603.              increased, with a proportional increase in flicker 
  2604.              (perhaps), by using wn_scroll() function to set the 
  2605.              scrolling method for the window to BIOS.  This technique 
  2606.              will provide the fastest screen updates and scrolling on 
  2607.              color systems.
  2608.  
  2609.          7.5.3. wns_escape
  2610.  
  2611.              wns_escape is set to TRUE whenever wn_input detects that the 
  2612.              escape key has been pressed.  Since wn_input is the 
  2613.              underlying logic for the entire data entry package, 
  2614.              knowledge of this global may help you manage your data entry 
  2615.              activities better.  For example, you may want to follow one 
  2616.              logic path if data entry completed normally and another if 
  2617.              data entry was terminated because the escape key was 
  2618.              pressed.
  2619.  
  2620.  
  2621.  
  2622.  
  2623.                                    43
  2624.  
  2625.  
  2626.  
  2627.         General Notes - continued.
  2628.  
  2629.  
  2630.  
  2631.         7.6. Microsoft C
  2632.  
  2633.         Some large model programs may require a stack greater than 4096 
  2634.         bytes.
  2635.  
  2636.         PWB and Integrated Development Environment fans take note - If 
  2637.         program and/or data space is at a premium - disabling debugging 
  2638.         can sometimes restore significant program and/or data space.  
  2639.  
  2640.         7.7. Microsoft QuickC
  2641.  
  2642.         Microsoft QuickC - All Integrated Development Environment users 
  2643.         MUST create MAKe files in order to be able to create EXEcutable 
  2644.         programs from within the Developmental Environment.  The MAKe
  2645.         file must contain the names of all of the programs that comprise 
  2646.         the application along with specific entries for all 3rd party 
  2647.         libraries being used.  In the case of 3rd party libraries, the 
  2648.         complete path specification for the library must be provided 
  2649.         (e.g. c:\msc\lib\swin.lib).  The MAKe file is created when you set 
  2650.         the program list.  Select the MAKE dialog BOX, then SET PROGRAM 
  2651.         LIST. Follow the standard rules for the creation of "MAK" files.
  2652.  
  2653.         QuickC 2.5 Integrated Development Environment
  2654.  
  2655.         MSCV6=1 must be defined in "COMPILER FLAGS" "DEFINES" dialog box 
  2656.         (select OPTIONS, MAKE, COMPILER FLAGS, then fill in DEFINES with 
  2657.         MSCV6=1).
  2658.  
  2659.  
  2660.  
  2661.  
  2662.  
  2663.  
  2664.  
  2665.  
  2666.  
  2667.  
  2668.  
  2669.  
  2670.  
  2671.  
  2672.  
  2673.  
  2674.  
  2675.  
  2676.  
  2677.  
  2678.  
  2679.  
  2680.  
  2681.  
  2682.  
  2683.  
  2684.                                    44
  2685.  
  2686.  
  2687.  
  2688.         General Notes - continued.
  2689.  
  2690.  
  2691.  
  2692.         7.8. Borland Turbo C, Borland C++ and Borland Turbo C++
  2693.  
  2694.         IDE (Integrated Development Environment) - Window BOSS users who 
  2695.         prefer the IDE over the command line compiler *MAY* have to 
  2696.         disable source level debugging when attempting to run their 
  2697.         applications from within the IDE via ^F9.  There are also 
  2698.         problems with running Window BOSS applications from within the 
  2699.         IDE when Sidekick (1.56A) is loaded.  Borland has been notified 
  2700.         of these problems.  PLEASE KEEP IN MIND THAT THESE 
  2701.         PROBLEMS ONLY APPLY WHEN USING THE IDE - THEY DO NOT IMPACT THE 
  2702.         FINAL APPLICATION.
  2703.  
  2704.           To disable source level debugging from within the IDE, select 
  2705.           Options, then Debugger, then set "Source Debugging" to NONE.  
  2706.           It may also help to disable debugging information from being 
  2707.           placed in the OBJ files.  This is done by selecting Options, 
  2708.           then Compiler, then Code Generation, then More - then disable 
  2709.           "Debug info in OBJs".
  2710.  
  2711.         IDE users MUST create PROJECT files in order to be able to create 
  2712.         EXEcutable programs from within the Integrated Environment.  The 
  2713.         PROJECT file must contain the names of all of the programs that 
  2714.         comprise the application along with specific entries for all 3rd 
  2715.         party libraries being used.  In the case of 3rd party libraries, 
  2716.         the complete path specification for the library must be provided 
  2717.         (e.g. c:\turboc\lib\swin.lib).
  2718.  
  2719.  
  2720.  
  2721.  
  2722.  
  2723.  
  2724.  
  2725.  
  2726.  
  2727.  
  2728.  
  2729.  
  2730.  
  2731.  
  2732.  
  2733.  
  2734.  
  2735.  
  2736.  
  2737.  
  2738.  
  2739.  
  2740.  
  2741.  
  2742.  
  2743.  
  2744.  
  2745.                                    45
  2746.  
  2747.  
  2748.  
  2749.         General Notes - continued.
  2750.  
  2751.  
  2752.  
  2753.         7.9. Feedback
  2754.  
  2755.         PLEASE - Pass along your comments.  The Window BOSS is your tool.  
  2756.         If you find any logic errors let us know.  We are committed to 
  2757.         making The Window BOSS the best price performer available.  Call, 
  2758.         write, or if you prefer, you can reach us via CompuServe, GENIE, 
  2759.         or BIX.  Our CompuServe electronic mail ID is [71565,1001], our 
  2760.         GENIE mail address is "MONGELLUZZO", our BIX NAME is 
  2761.         "pmongelluzzo". Remember, there is no reason to sit, steam, or 
  2762.         complain to those who can not provide any real form of support.  
  2763.         Lastly, if you use The Window BOSS, register your copy.  The 
  2764.         Shareware System will only work if you support it!
  2765.  
  2766.  
  2767.  
  2768.  
  2769.  
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.  
  2777.  
  2778.  
  2779.  
  2780.  
  2781.  
  2782.  
  2783.  
  2784.  
  2785.  
  2786.  
  2787.  
  2788.  
  2789.  
  2790.  
  2791.  
  2792.  
  2793.  
  2794.  
  2795.  
  2796.  
  2797.  
  2798.  
  2799.  
  2800.  
  2801.  
  2802.  
  2803.  
  2804.  
  2805.  
  2806.                                    46
  2807.  
  2808.  
  2809.  
  2810.         8. Hints on Resolving Common Problems
  2811.  
  2812.         8.1. Unresolved Externals
  2813.  
  2814.         Unresolved externals are most common with the programming 
  2815.         environments of Borland C++, Borland Turbo C++, Microsoft PWB, 
  2816.         and Microsoft Quick C.  All of these programming environments 
  2817.         require "program lists" or "make files".  This type of error can 
  2818.         also be caused by not explicitly specifying a Window BOSS library 
  2819.         on the link command line.  All linkers must have explicit 
  2820.         knowledge of what 3rd party libraries are to be linked with the 
  2821.         compiler libraries and your applications object files. This 
  2822.         problem is usually resolved by creating a program list or make 
  2823.         file that includes a explicit reference to one of The Window BOSS 
  2824.         libraries, or explicitly specifying the correct Window BOSS 
  2825.         library as part of the link command line.  Refer to your compiler 
  2826.         documentation for further information.
  2827.  
  2828.         8.2. Fixup Offset Errors
  2829.  
  2830.         These are always the result of attempting to link code compiled 
  2831.         under one memory model with libraries created for use with 
  2832.         another memory model.
  2833.  
  2834.         8.3. Bad Handle Exits
  2835.  
  2836.         Both the C and assembly functions make very heavy use of 
  2837.         pointers.  The code contains numerous checks to ensure that 
  2838.         memory does not get corrupted or randomly written over.  This 
  2839.         error is normally caused by a stray pointer in the application 
  2840.         code!  Check and recheck all of your pointer operations.  Doing 
  2841.         strcpy's to arrays with insufficient space will always cause this 
  2842.         type of problem.
  2843.  
  2844.         Oftentimes switching from the small memory model to large memory 
  2845.         model will initially produce these errors in programs that were 
  2846.         working fine in the small model.  In nearly every case the 
  2847.         problem was traced to a stray pointer or improper pointer usage.
  2848.  
  2849.         8.4. Fatal Compilation Errors
  2850.  
  2851.         All command line compilers should be invoked with the compiler 
  2852.         driver batch files provided as part of The Window BOSS.  This 
  2853.         insures the compiler specific compile time parameters are 
  2854.         specified correctly.  If you elect to use you own method, be sure 
  2855.         to include ALL of the command line parameters that are specified 
  2856.         in the provided batch files.  
  2857.  
  2858.         8.5. Missing Files
  2859.  
  2860.         Remember, the documentation covers two media kits (Shareware and 
  2861.         Source) and neither kit contains ALL files.  If you are missing 
  2862.         files that are listed for your media kit, please contact us.
  2863.  
  2864.  
  2865.  
  2866.  
  2867.                                    47
  2868.  
  2869.  
  2870.  
  2871.         Hints on Resolving Common Problems - continued.
  2872.  
  2873.  
  2874.  
  2875.         8.6. Linking Errors
  2876.  
  2877.         (A) See "Unresolved Externals" above. (B) Most linking errors are 
  2878.         the result of; (1) forgetting to specify the library to link, (2) 
  2879.         specifying the wrong library, or (3) command line syntax errors.  
  2880.         Double check your compiler documentation for the proper way to 
  2881.         link "other libraries" or "3rd party libraries".
  2882.  
  2883.         8.7. Other Problems
  2884.  
  2885.         Double check this manual for proper usage, review your compiler 
  2886.         documentation, then contact us.
  2887.  
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900.  
  2901.  
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.  
  2909.  
  2910.  
  2911.  
  2912.  
  2913.  
  2914.  
  2915.  
  2916.  
  2917.  
  2918.  
  2919.  
  2920.  
  2921.  
  2922.  
  2923.  
  2924.  
  2925.  
  2926.  
  2927.  
  2928.                                    48
  2929.  
  2930.  
  2931.  
  2932.         9. Making Changes
  2933.  
  2934.         Incorporating local modifications or enhancements is, in part, 
  2935.         why you acquired the source code to begin with.  Incorporating 
  2936.         your modifications or enhancements should be be a relatively 
  2937.         straight forward task provided you follow the basic guidelines 
  2938.         outlined in the subsequent sections of this manual.  
  2939.  
  2940.         If you feel you have developed a significant enhancement that is 
  2941.         both well documented and written please let us know.  We have, 
  2942.         from time to time, incorporated customer supplied enhancements to 
  2943.         our products.  Contact us for further details.
  2944.  
  2945.         9.1. General Considerations
  2946.  
  2947.         First, be sure that you are familiar with the existing 
  2948.         conventions and compiler specific feature test switches. Refer to 
  2949.         the various BATch files for specific examples of compiler 
  2950.         specific defines (etc.).  
  2951.  
  2952.         Please note that we assume that you have installed your compiler 
  2953.         exactly as suggested in the compiler's manual.  This includes 
  2954.         suggested sub-directories, PATH specifiers, and environment 
  2955.         setup.  Check and double check the "include" file requirements - 
  2956.         make sure you have the required files and that they have been 
  2957.         edited to correspond to the memory model you are writing code 
  2958.         for. Creating code that compiles under numerous compilers is not 
  2959.         an easy task.  If you run into problems review your compilers 
  2960.         documentation and browse through the batch files provided.  If 
  2961.         you still have problems - call!  
  2962.  
  2963.         Carefully review the area of code you wish to modify or enhance - 
  2964.         be sure to get a complete understanding of what's currently going 
  2965.         on before you add your own code.  With the exception of the ASM 
  2966.         files, compiler and memory model specific feature test switches 
  2967.         are specified on the command line. 
  2968.  
  2969.         Depending upon the compiler being used, several warning errors 
  2970.         will be generated.  Warnings created by the unmodified 
  2971.         distribution code can be safely ignored - all others should be 
  2972.         investigated.
  2973.  
  2974.         A note of caution... PC/MS-DOS Version 2.XX's LINK can complain 
  2975.         if you build a new library that takes advantage of later LINK 
  2976.         enhancements.  If this occurs, you can (1) upgrade to DOS 3.1++ 
  2977.         or, (2) get a librarian that isn't so smart!!  We suggest going 
  2978.         to the later revision of DOS.
  2979.  
  2980.  
  2981.  
  2982.  
  2983.  
  2984.  
  2985.  
  2986.  
  2987.  
  2988.  
  2989.                                    49
  2990.  
  2991.  
  2992.  
  2993.         Making Changes - continued.
  2994.  
  2995.  
  2996.         9.2. Specific Changes to Consider
  2997.  
  2998.         Both the Shareware and Source versions of The Window BOSS and 
  2999.         Data Clerk are supplied with the numerous common source code 
  3000.         files.
  3001.  
  3002.         The source code was provided to serve as the basis upon which you 
  3003.         could develop your own enhancements to the product and to provide 
  3004.         you with those modules which may need to be modified for your 
  3005.         particular application.  The latter is true of wn_frmget, 
  3006.         wn_iemsg, and wn_ihmsg.  You should consider modifying these 
  3007.         routines if you want to change the way in which data entry forms 
  3008.         are handled when completed (wn_frmget), the way in which data 
  3009.         entry field help messages are displayed  (wn_ihmsg), or the way 
  3010.         in which data entry field error messages are displayed 
  3011.         (wn_iemsg).
  3012.  
  3013.         In the case of wn_frmget, the code to modify is at the tail end 
  3014.         of the file and is clearly labeled.  Data entry Help messages are 
  3015.         displayed by wn_ihmsg whenever the HELP key is depressed.  Data 
  3016.         entry error messages are displayed by wn_iemsg whenever 
  3017.         validation for a particular field fails.  Refer to the source 
  3018.         code files and the descriptions of these functions in the 
  3019.         function synopsis section of this document.
  3020.  
  3021.  
  3022.  
  3023.  
  3024.  
  3025.  
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.  
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.  
  3041.  
  3042.  
  3043.  
  3044.  
  3045.  
  3046.  
  3047.  
  3048.  
  3049.  
  3050.                                    50
  3051.  
  3052.  
  3053.  
  3054.         Making Changes - continued.
  3055.  
  3056.  
  3057.         9.3. Microsoft, Borland, Watcom  
  3058.  
  3059.              9.4. 1) If applicable, edit the assembler level modules as 
  3060.                 needed.  Be sure to set LPROG and LDATA (if they apply).  
  3061.                 ASSEMBLE.
  3062.  
  3063.              2) If applicable, edit the "C" level modules.  COMPILE.
  3064.  
  3065.              3) Test your changes by linking the new/modified code 
  3066.                 with the existing libraries. For example to link your 
  3067.                 modified wn_move.c and v_getch:  (Microsoft example)
  3068.  
  3069.                   C> link myapp+wn_move+msvlib,,,swin
  3070.                 
  3071.                 If required, refer to your compiler documentation for 
  3072.                 explicit instructions on linking.
  3073.                                
  3074.              4) Update the existing Window BOSS libraries with the new 
  3075.                 "obj" files.  This is done with the librarian provided 
  3076.                 with your compiler.  Alternatively, you can use the batch 
  3077.                 files provided with the source code to recompile the 
  3078.                 entire library and rebuild, rather than update The 
  3079.                 Window BOSS libraries.
  3080.  
  3081.                 If required, refer to your compiler documentation for 
  3082.                 explicit instructions on how to use their librarians to 
  3083.                 update libraries.
  3084.  
  3085.         Remember, the memory model of the assembly "obj" file must 
  3086.         correspond to the memory model of the C "obj" files and the 
  3087.         memory model of any existing libraries. 
  3088.  
  3089.         9.4.1. Assembly Language Object Files
  3090.  
  3091.         The Source Media Kit now includes the object files of the 
  3092.         assembly language functions used by The Window BOSS. This will 
  3093.         free you from having to acquire, or use, an assembler unless you 
  3094.         intend to make changes to those functions written in assembly 
  3095.         language!  Now, all you have to do is copy and or rename the 
  3096.         appropriate object file before running the "MAKELIB" batch file!  
  3097.         A object file matrix is provided to assist you in determining 
  3098.         which object file should be used with which compiler and memory 
  3099.         model.
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109.  
  3110.  
  3111.                                    51
  3112.  
  3113.  
  3114.  
  3115.         Making Changes - continued.
  3116.  
  3117.  
  3118.         9.4.2. Assembly Language Object File Matrix
  3119.  
  3120.         The matrix that follows identifies the relationship between the 
  3121.         object filename, compiler memory model, and the filename used as 
  3122.         part of the "MAKELIB" batch utility provided as part of The 
  3123.         Window BOSS.  Use this matrix to determine what file to rename 
  3124.         (or copy) when recreating Window BOSS libraries that DO NOT 
  3125.         include any changes or additions to existing assembly language 
  3126.         functions.
  3127.                        
  3128.                                Object File Matrix
  3129.  
  3130.         Compiler     SMALL     MEDIUM   COMPACT  LARGE      MAKELIB NAME
  3131.  
  3132.         MSC Q/C Win  SMSVLIB   MMSVLIB  CMSVLIB  LMSVLIB    MSVLIB.OBJ
  3133.         MSC 7 & 8    SMSVLIB   MMSVLIB  CMSVLIB  LMSVLIB    MSVLIB.OBJ
  3134.         Turbo C      STCVLIB   MTCVLIB  CTCVLIB  LTCVLIB    TCVLIB.OBJ
  3135.         Turbo C++    STCVLIB   MTCVLIB  CTCVLIB  LTCVLIB    TCVLIB.OBJ
  3136.         Borland C++  STCVLIB   MTCVLIB  CTCVLIB  LTCVLIB    TCVLIB.OBJ
  3137.         Watcom       SWCVLIB   MWCVLIB  CWCVLIB  LWCVLIB    WCVLIB.OBJ
  3138.  
  3139.         Example: Rebuild the Large model library for Microsoft C 8.X, or 
  3140.         Quick C.  
  3141.  
  3142.         You would:
  3143.  
  3144.              (1) Use LCOMPILE to compile all C functions
  3145.  
  3146.                        C>LCOMPILE
  3147.  
  3148.              (2) Copy LMSVLIB.OBJ to MSVLIB.OBJ
  3149.  
  3150.                        C>COPY LMSVLIB.OBJ MSVLIB.OBJ
  3151.              
  3152.              (3) Rebuild the LARGE model library 
  3153.  
  3154.                        C>MAKELIB LWIN
  3155.  
  3156.  
  3157.  
  3158.  
  3159.  
  3160.  
  3161.  
  3162.  
  3163.  
  3164.  
  3165.  
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.                                    52
  3173.  
  3174.  
  3175.  
  3176.         Making Changes - continued.
  3177.  
  3178.  
  3179.         Borland C++ and Turbo C++
  3180.  
  3181.         The following table outlines the values that LPROG, LDATA, and 
  3182.         HUGE need to have assigned for the various memory models.  This 
  3183.         information is provided for those who need to modify the assembly 
  3184.         language files to incorporate their local changes.
  3185.               
  3186.              Memory Model                    LPROG   LDATA   HUGE  *
  3187.              SMALL   (64k Code, 64k Data)    FALSE   FALSE   FALSE
  3188.              MEDIUM  (1MB Code, 64k Data)    TRUE    FALSE   FALSE
  3189.              COMPACT (64k Code, 1MB Data)    FALSE   TRUE    FALSE
  3190.              LARGE   (1MB Code, 1MB Data)    TRUE    TRUE    FALSE
  3191.              HUGE    (1MB Code, 1MB Data) *  TRUE    TRUE    TRUE
  3192.  
  3193.              * HUGE is only defined in TCVLIB.ASM.  The HUGE memory 
  3194.                model allows arrays to exceed 64k.
  3195.  
  3196.         9.4.3. Assembler Code
  3197.  
  3198.           Selecting the Memory Model:
  3199.  
  3200.              Microsoft C, QuickC and Watcom C
  3201.  
  3202.                 1) msvlib.asm   Set LDATA & LPROG to TRUE or FALSE 
  3203.                    wcvlib.asm   according to the following
  3204.                                 LDATA is TRUE for LARGE DATA
  3205.                                 LPROG is TRUE for LARGE CODE
  3206.                                 Assemble using:
  3207.                                   MASM /MX MSVLIB;   <- Microsoft
  3208.                                   MASM /MX WCVLIB;   <- Watcom
  3209.  
  3210.  
  3211.  
  3212.  
  3213.  
  3214.  
  3215.  
  3216.  
  3217.  
  3218.  
  3219.  
  3220.  
  3221.  
  3222.  
  3223.  
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.  
  3232.  
  3233.                                    53
  3234.  
  3235.  
  3236.  
  3237.         Making Changes - continued.
  3238.  
  3239.  
  3240.  
  3241.         9.5. C Code
  3242.  
  3243.         Pattern your enhancements after existing code.  The most common 
  3244.         mistakes are: (1) failing to call wn_activate, (2) failing to 
  3245.         check for error returns, and (3) failing to rebuild the libraries 
  3246.         correctly.
  3247.  
  3248.         Incorporating custom data entry functions is a straight forward 
  3249.         task if you follow the guidelines below.
  3250.  
  3251.              . Pattern your data entry routine after wn_gfloat.
  3252.  
  3253.              . Study the relationship between wn_gfloat and wn_frmget. 
  3254.  
  3255.              . Study the way in which arguments are loaded using the 
  3256.                unions v1 through v8.
  3257.  
  3258.              . Edit winboss.h and expand the table of data entry function 
  3259.                codes to include a new code above 100, for example:
  3260.  
  3261.                        #define GCUSTOM  101
  3262.  
  3263.                The table of data entry function codes is located towards 
  3264.                the tail end of "winboss.h" and begins with:
  3265.  
  3266.                        #define GDONE    0
  3267.  
  3268.              . Edit wn_frmget.c and expand the large case statement to 
  3269.                include a case for your custom data entry function.  
  3270.                Pattern the code you are adding after the existing code.
  3271.  
  3272.              . Rebuild the libraries adding your custom function and 
  3273.                replacing wn_frmget with the new version.
  3274.  
  3275.         Refer to wn_gfloat and wn_frmget....
  3276.  
  3277.              The general logic is to call the data entry function with 
  3278.              the argument list corresponding to this occurrence of this 
  3279.              type of field. The data entry function tests the value of 
  3280.              "fun". If it is "XEQ" then control immediately passes to the 
  3281.              logic that handles data entry.  If fun is "SET" then the 
  3282.              data entry function loads the form control block (indexed by 
  3283.              "fld") with the arguments being passed. This sets the stage 
  3284.              for subsequent calls (in a predetermined order) from 
  3285.              wn_frmget! When called, wn_frmget first displays all the 
  3286.              prompt fields, and then calls the data entry functions in 
  3287.              the order determined by the form control block.
  3288.  
  3289.  
  3290.  
  3291.  
  3292.  
  3293.  
  3294.                                    54
  3295.  
  3296.  
  3297.  
  3298.         10. Function Call Synopsis
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304.  
  3305.  
  3306.  
  3307.  
  3308.  
  3309.  
  3310.  
  3311.  
  3312.  
  3313.  
  3314.  
  3315.  
  3316.  
  3317.  
  3318.  
  3319.  
  3320.  
  3321.  
  3322.                  The Window BOSS and Data Clerk Function Library
  3323.  
  3324.  
  3325.  
  3326.  
  3327.  
  3328.  
  3329.  
  3330.  
  3331.  
  3332.  
  3333.  
  3334.  
  3335.  
  3336.  
  3337.  
  3338.  
  3339.  
  3340.  
  3341.  
  3342.  
  3343.  
  3344.  
  3345.  
  3346.  
  3347.  
  3348.  
  3349.  
  3350.  
  3351.  
  3352.  
  3353.  
  3354.  
  3355.                                    55
  3356.  
  3357.  
  3358.  
  3359.         10.1. wn_init -- init window system
  3360.         10.2. wn_exit -- exit window system
  3361.         10.3. wn_psinit() -- init window system - physical size
  3362.  
  3363.         USAGE
  3364.  
  3365.           wn_init()
  3366.  
  3367.           wn_psinit(rows, columns)
  3368.           int rows, columns
  3369.  
  3370.              rows = # of rows on physical screen
  3371.              cols = # of columns on physical screen
  3372.  
  3373.           wn_exit()
  3374.  
  3375.           wn_init() or wn_psinit() and wn_exit(), if used, should be the 
  3376.           first and last functions called. Both wn_init() and wn_psinit() 
  3377.           save the video state and application entry screen.  wn_init() 
  3378.           or wn_psinit() is typically the very first function called in 
  3379.           the main program. wn_exit() restores the saved video state and 
  3380.           screen image.  wn_exit() is typically called just prior to 
  3381.           calling exit().
  3382.  
  3383.           wn_init() is the general case of wn_psinit().  It assumes a 
  3384.           physical screen size of 25x80 and therefore is the most 
  3385.           portable across video adapters.
  3386.  
  3387.           wn_psinit() allows those who need to use either the EGA 43x80
  3388.           or VGA 50x80 line modes a handy way to save the existing 43 or 
  3389.           50 line screen image.  Examples:
  3390.  
  3391.              wn_psinit(43,80);             /* saves 43 line EGA screen */
  3392.              wn_psinit(50,80);             /* saves 50 line VGA screen */
  3393.           
  3394.         RETURNS
  3395.  
  3396.           TRUE if successful, FALSE if error.
  3397.  
  3398.         CAUTIONS and ADDITIONAL NOTES
  3399.  
  3400.           wn_psinit() does not check to see if the parameters passed are 
  3401.           valid for the adapter in use.
  3402.  
  3403.           wn_psinit() does not change video modes based on the parameters 
  3404.           passed.  It is the programmers responsibility to insure that 
  3405.           the video adapter is in the correct mode for the application.
  3406.  
  3407.           Calling wn_psinit() with parameters greater than can be handled 
  3408.           by the machines video adapter can have interesting but 
  3409.           undesirable results.
  3410.  
  3411.           Use of wn_psinit() should be restricted to machines equipped 
  3412.           with EGA or VGA adapters only.
  3413.  
  3414.  
  3415.  
  3416.                                    56
  3417.  
  3418.  
  3419.  
  3420.         10.4. wn_dmode -- set window display mode
  3421.  
  3422.         USAGE
  3423.  
  3424.           wn_dmode(mode)
  3425.           int mode
  3426.  
  3427.                   mode = PAINT for painted windows
  3428.                   mode = FLASH for instant windows
  3429.  
  3430.           wn_dmode sets the windows display mode as per mode, PAINT style 
  3431.           windows appear to be painted (top to bottom) where FLASH style 
  3432.           windows instantly appear.
  3433.  
  3434.         RETURNS
  3435.  
  3436.           Nothing.
  3437.  
  3438.         CAUTIONS and ADDITIONAL NOTES
  3439.  
  3440.           CGA, EGA, and VGA only. Updates are made directly to video 
  3441.           memory.
  3442.  
  3443.  
  3444.  
  3445.  
  3446.  
  3447.  
  3448.  
  3449.  
  3450.  
  3451.  
  3452.  
  3453.  
  3454.  
  3455.  
  3456.  
  3457.  
  3458.  
  3459.  
  3460.  
  3461.  
  3462.  
  3463.  
  3464.  
  3465.  
  3466.  
  3467.  
  3468.  
  3469.  
  3470.  
  3471.  
  3472.  
  3473.  
  3474.  
  3475.  
  3476.  
  3477.                                    57
  3478.  
  3479.  
  3480.  
  3481.         10.5. wn_open -- open window 
  3482.  
  3483.         USAGE
  3484.  
  3485.           wn = (WINDOWPTR)wn_open(page, row, col, width, height, atrib,
  3486.                 batrib)
  3487.           int page, row, col, width, height, atrib, batrib;
  3488.  
  3489.                 page -  0 500, 510, 800, or 1000
  3490.                         1000 opens a borderless page
  3491.                          800 opens an exploding window
  3492.                          510 opens a window with transparent shadows
  3493.                          500 opens a window with black shadows
  3494.                            0 opens a bordered window (NORMAL)
  3495.                 row  -  row of upper left hand corner of the window
  3496.                 col  -  column of upper left hand corner of the window
  3497.                 width - INSIDE dimension (max value is 78 for a 80 column 
  3498.                         wide display, 80 if borderless)
  3499.                 height- INSIDE dimension (max value is 23 for a 25 row 
  3500.                         high display, 25 if borderless)
  3501.                 atrib - attribute to be used IN the window
  3502.                 batrib- attribute to be used for the border
  3503.  
  3504.           wn_open is usually the first function called to create and use 
  3505.           a window.  wn_open dynamically allocates memory to save the 
  3506.           area defined (by row, col, width, and height), saves the image, 
  3507.           opens the window and homes the logical cursor to row 0, col 0 
  3508.           of the window.  The window is now ready to be used by the 
  3509.           various window management routines.  
  3510.  
  3511.           Attributes (COLORS) are defined in winboss.h.
  3512.  
  3513.         RETURNS
  3514.  
  3515.           wn = window handle or NULL if error (no memory and/or bad 
  3516.           parameters can cause NULL returns)
  3517.  
  3518.         CAUTIONS and ADDITIONAL NOTES
  3519.  
  3520.           Width and height are inside dimensions. If you want a NORMAL 
  3521.           window with a work area of 10 rows and 5 columns, the width is 
  3522.           7 and the height is 12.  Maximum values are linked to the 
  3523.           actual physical screen size and are dependent upon whether or 
  3524.           not a borderless window is being opened.  The window, its 
  3525.           borders (if they exist), and its shadow (if it exists) must all 
  3526.           fit and be visible on the physical screen.
  3527.           
  3528.  
  3529.  
  3530.  
  3531.  
  3532.  
  3533.  
  3534.  
  3535.  
  3536.  
  3537.  
  3538.                                    58
  3539.  
  3540.  
  3541.  
  3542.         wn_open - continued.
  3543.  
  3544.  
  3545.  
  3546.           The flashing cursor will not be displayed unless wn_sync() has 
  3547.           been called with a value of TRUE.  
  3548.  
  3549.           The window "wn" automatically becomes the top window tile upon 
  3550.           return.
  3551.  
  3552.           Exploding windows are linked to the time of day clock.  This is 
  3553.           done by reading the time of day (in ticks) directly from low 
  3554.           memory.  If you would like to vary the explosion time it can be 
  3555.           done by calling the internal routine "wns_stdiv" with a long 
  3556.           integer constant in the range of 1 to 10.  The default value is 
  3557.           5L.  Increasing the value will cause the explosion to be 
  3558.           faster.  For example:
  3559.  
  3560.                                  wns_stdiv(10L);
  3561.  
  3562.           Window types can not be combined.  That is to say that you can 
  3563.           not have shadowed borderless windows, borderless exploding 
  3564.           windows, or exploding windows with shadows.
  3565.  
  3566.           Windows with transparent shadows should not be moved, hidden, 
  3567.           then accessed. This limitation is due to the fact that the 
  3568.           transparent shadow area is treated as if it were the contents 
  3569.           of a window and is therefore preserved as the window it is 
  3570.           attached to is manipulated.  In some cases, this causes the 
  3571.           transparent shadow area to appear invalid.  This restriction 
  3572.           does not apply to windows with black shadows.
  3573.  
  3574.         See Also - wn_psinit and wn_init
  3575.  
  3576.  
  3577.  
  3578.  
  3579.  
  3580.  
  3581.  
  3582.  
  3583.  
  3584.  
  3585.  
  3586.  
  3587.  
  3588.  
  3589.  
  3590.  
  3591.  
  3592.  
  3593.  
  3594.  
  3595.  
  3596.  
  3597.  
  3598.  
  3599.                                    59
  3600.  
  3601.  
  3602.  
  3603.         10.6. wn_title -- title window
  3604.  
  3605.         USAGE
  3606.  
  3607.           wn_title(wn,title)
  3608.           WINDOWPTR wn;
  3609.           char *title;
  3610.  
  3611.                 wn    - window handle
  3612.                 title - string pointer to title
  3613.  
  3614.           The title is displayed on the top border of the window using 
  3615.           the currently defined border attribute.  The cursor is 
  3616.           positioned off the screen after the title is written.  
  3617.  
  3618.         RETURNS
  3619.  
  3620.           TRUE if all is well, NULL if the title is to large to fit on 
  3621.           the top border or error.
  3622.  
  3623.         CAUTIONS and ADDITIONAL NOTES
  3624.  
  3625.           The window "wn" automatically becomes the top window tile upon 
  3626.           return.
  3627.  
  3628.  
  3629.  
  3630.         10.7. wn_titla -- title window with attribute
  3631.  
  3632.         USAGE
  3633.  
  3634.           wn_titla(wn,title,atrib)
  3635.           WINDOWPTR wn;
  3636.           char *title;
  3637.           int atrib;
  3638.  
  3639.                 wn    - window handle
  3640.                 title - string pointer to title
  3641.                 atrib - attribute to use for text
  3642.  
  3643.           The title is displayed on the top border of the window using 
  3644.           the attribute specified by atrib.  The cursor is positioned off 
  3645.           the screen after the title is written.  
  3646.  
  3647.         RETURNS
  3648.  
  3649.           TRUE if all is well, NULL if the title is to large to fit on 
  3650.           the top border or error.
  3651.  
  3652.         CAUTIONS and ADDITIONAL NOTES
  3653.  
  3654.           The window "wn" automatically becomes the top window tile upon 
  3655.           return.
  3656.  
  3657.  
  3658.  
  3659.  
  3660.                                    60
  3661.  
  3662.  
  3663.  
  3664.         10.8. wn_stitle -- super title window
  3665.  
  3666.         USAGE
  3667.  
  3668.           wn_title(wn,title,location)
  3669.           WINDOWPTR wn;
  3670.           char *title;
  3671.           int location;
  3672.  
  3673.                 wn    -    window handle
  3674.                 title -    string pointer to title
  3675.                 location - border location
  3676.  
  3677.             Location can be any of the following (defined in winboss.h):
  3678.  
  3679.                 WNTOPR  - top right 
  3680.                 WNTOPL  - top left 
  3681.                 WNTOPC  - top center 
  3682.                 WNBOTR  - bottom right 
  3683.                 WNBOTL  - bottom left 
  3684.                 WNBOTC  - bottom center 
  3685.  
  3686.           The title is displayed on the border at the location specified 
  3687.           using the currently defined border attribute.  The cursor is 
  3688.           positioned off the screen after the title is written.  
  3689.  
  3690.         RETURNS
  3691.  
  3692.           TRUE if all is well, NULL if the title is to large to fit on 
  3693.           the border.
  3694.  
  3695.         CAUTIONS and ADDITIONAL NOTES
  3696.  
  3697.           The window "wn" automatically becomes the top window tile upon 
  3698.           return.
  3699.  
  3700.  
  3701.  
  3702.  
  3703.  
  3704.  
  3705.  
  3706.  
  3707.  
  3708.  
  3709.  
  3710.  
  3711.  
  3712.  
  3713.  
  3714.  
  3715.  
  3716.  
  3717.  
  3718.  
  3719.  
  3720.  
  3721.                                    61
  3722.  
  3723.  
  3724.  
  3725.         10.9. wn_stitla -- super title window with attribute
  3726.  
  3727.         USAGE
  3728.  
  3729.           wn_stitla(wn,title,atrib,location)
  3730.           WINDOWPTR wn;
  3731.           char *title;
  3732.           int atrib;
  3733.           int location;
  3734.  
  3735.                 wn    - window handle
  3736.                 title - string pointer to title
  3737.                 atrib - attribute to use for text
  3738.                 location - border location
  3739.  
  3740.             Location can be any of the following (defined in winboss.h):
  3741.  
  3742.                 WNTOPR  - top right 
  3743.                 WNTOPL  - top left 
  3744.                 WNTOPC  - top center 
  3745.                 WNBOTR  - bottom right 
  3746.                 WNBOTL  - bottom left 
  3747.                 WNBOTC  - bottom center 
  3748.  
  3749.  
  3750.           The title is displayed on the border at the location specified 
  3751.           using the using the attribute specified by atrib.  The cursor 
  3752.           is positioned off the screen after the title is written.  
  3753.  
  3754.         RETURNS
  3755.  
  3756.           TRUE if all is well, NULL if the title is to large to fit on 
  3757.           the border.
  3758.  
  3759.         CAUTIONS and ADDITIONAL NOTES
  3760.  
  3761.           The window "wn" automatically becomes the top window tile upon 
  3762.           return.
  3763.  
  3764.  
  3765.  
  3766.  
  3767.  
  3768.  
  3769.  
  3770.  
  3771.  
  3772.  
  3773.  
  3774.  
  3775.  
  3776.  
  3777.  
  3778.  
  3779.  
  3780.  
  3781.  
  3782.                                    62
  3783.  
  3784.  
  3785.  
  3786.         10.10. wn_close -- close window
  3787.  
  3788.         USAGE
  3789.  
  3790.           wn_close(wn) 
  3791.           WINDOWPTR wn; 
  3792.  
  3793.                 wn - handle of a previously opened window.
  3794.  
  3795.           wn_close removes the window specified by wn and restores the 
  3796.           screen area under the window to its previous contents.  The 
  3797.           memory allocated by wn_open is returned to the free list.  The 
  3798.           cursor is positioned to where it was located prior to the 
  3799.           wn_open call.  
  3800.  
  3801.         RETURNS 
  3802.  
  3803.           TRUE or NULL if error
  3804.  
  3805.         CAUTIONS and ADDITIONAL NOTES 
  3806.  
  3807.           None.
  3808.  
  3809.  
  3810.  
  3811.         10.11. wn_save -- save screen image 
  3812.  
  3813.         USAGE
  3814.  
  3815.           wn = (WINDOWPTR)wn_save(page, row, col, width, height)
  3816.           int page, row, col, width, height;
  3817.  
  3818.                 page -  always 0.
  3819.                 row  -  row of upper left hand corner of the window
  3820.                 col  -  column of upper left hand corner of the window
  3821.                 width - INSIDE dimension (max value is 78)
  3822.                 height- INSIDE dimension (max value is 23)
  3823.  
  3824.           wn_save can be used to save areas of the screen for purposes 
  3825.           other than windows.  
  3826.  
  3827.           Memory for the screen image is dynamically allocated.
  3828.  
  3829.         RETURNS
  3830.  
  3831.           wn = window handle or NULL if error
  3832.  
  3833.         CAUTIONS and ADDITIONAL NOTES
  3834.  
  3835.           The window handle returned by wn_save should only be used with 
  3836.           wn_restore. Use with other routines could produce unpredictable 
  3837.           results.
  3838.  
  3839.  
  3840.  
  3841.  
  3842.  
  3843.                                    63
  3844.  
  3845.  
  3846.  
  3847.         10.12. wn_restore -- restore saved screen image
  3848.  
  3849.         USAGE
  3850.  
  3851.           wn_restore(wn)
  3852.           WINDOWPTR wn;
  3853.  
  3854.                 wn - handle of previously wn_save(ed) window.
  3855.  
  3856.           Restores the screen image corresponding to the window handle 
  3857.           wn, and allocated memory is returned to the free list.
  3858.  
  3859.         RETURNS
  3860.  
  3861.           TRUE or NULL if error
  3862.  
  3863.         CAUTIONS and ADDITIONAL NOTES
  3864.  
  3865.           This function should only be used with window handles obtained 
  3866.           from wn_save.
  3867.  
  3868.  
  3869.  
  3870.         10.13. wn_move -- move window
  3871.  
  3872.         USAGE
  3873.  
  3874.           wn = (WINDOWPTR)wn_move(wn,row,col)
  3875.  
  3876.                 wn -  handle of window to be moved
  3877.                 row - destination row
  3878.                 col - destination column
  3879.  
  3880.           Moves the window corresponding to wn to a new location.  The 
  3881.           cursor is positioned off the screen after the call.  
  3882.  
  3883.         RETURNS
  3884.  
  3885.           Window handle of the window moved or NULL if error.
  3886.  
  3887.         CAUTIONS and ADDITIONAL NOTES
  3888.  
  3889.           The window "wn" automatically becomes the top window tile upon 
  3890.           return.
  3891.  
  3892.  
  3893.  
  3894.  
  3895.  
  3896.  
  3897.  
  3898.  
  3899.  
  3900.  
  3901.  
  3902.  
  3903.  
  3904.                                    64
  3905.  
  3906.  
  3907.  
  3908.         10.14. wn_locate -- locate cursor in window
  3909.  
  3910.         USAGE
  3911.  
  3912.           wn_locate(wn, row, col)
  3913.           WINDOWPTR wn;
  3914.           int row, col;
  3915.  
  3916.                 wn  - window handle
  3917.                 row - row to position to (relative to window origin)
  3918.                 col - column to position to (relative to window origin)
  3919.  
  3920.           Position the cursor to the row and column specified.  Row and  
  3921.           Column values are relative to the origin of the window (0,0 
  3922.           locates the cursor in the upper left hand corner of the window 
  3923.           referenced by wn).
  3924.  
  3925.         RETURNS
  3926.  
  3927.           TRUE or NULL if error
  3928.  
  3929.         CAUTIONS and ADDITIONAL NOTES
  3930.  
  3931.           Values of row & col are not checked.
  3932.  
  3933.           The window "wn" automatically becomes the top window tile upon 
  3934.           return.
  3935.  
  3936.  
  3937.  
  3938.  
  3939.  
  3940.  
  3941.  
  3942.  
  3943.  
  3944.  
  3945.  
  3946.  
  3947.  
  3948.  
  3949.  
  3950.  
  3951.  
  3952.  
  3953.  
  3954.  
  3955.  
  3956.  
  3957.  
  3958.  
  3959.  
  3960.  
  3961.  
  3962.  
  3963.  
  3964.  
  3965.                                    65
  3966.  
  3967.  
  3968.  
  3969.         10.15. wn_printf -- window printf
  3970.  
  3971.         USAGE
  3972.  
  3973.           wn_printf(wn, cs, args)
  3974.           WINDOWPTR wn;
  3975.           char *cs;
  3976.           ?? arg1 ... argn;
  3977.  
  3978.                 wn   - window handle
  3979.                 cs   - format control string
  3980.                 args - argument list
  3981.  
  3982.           printf function for windows!
  3983.  
  3984.         RETURNS
  3985.  
  3986.           TRUE or NULL if error
  3987.  
  3988.         CAUTIONS and ADDITIONAL NOTES
  3989.  
  3990.           Output string length is limited to 254 bytes.
  3991.  
  3992.           Registered users can edit the wn_printf function and set the 
  3993.           limit to whatever they wish.
  3994.  
  3995.           Integer only for Microsoft 3.0 and Aztec.  This limitation 
  3996.           be overcome by using sprintf in conjunction with wn_printf.  
  3997.           For example:
  3998.  
  3999.                   char buf[256];
  4000.                        ..
  4001.                        ..
  4002.                   sprintf(buf,"%d %l %x\n", intval, longval, hexval);
  4003.                   wn_printf(wn, buf);
  4004.  
  4005.           Full support for all others.  
  4006.  
  4007.           The window "wn" automatically becomes the top window tile upon 
  4008.           return.
  4009.  
  4010.  
  4011.  
  4012.  
  4013.  
  4014.  
  4015.  
  4016.  
  4017.  
  4018.  
  4019.  
  4020.  
  4021.  
  4022.  
  4023.  
  4024.  
  4025.  
  4026.                                    66
  4027.  
  4028.  
  4029.  
  4030.         10.16. wn_puts -- put string (high speed)
  4031.         10.17. wn_putc -- put character 
  4032.  
  4033.         USAGE
  4034.  
  4035.           wn_puts(wn, row, col, string)
  4036.           WINDOWPTR wn;
  4037.           int row, col;
  4038.           char *string;
  4039.  
  4040.           wn_putc(wn, row, col, c)
  4041.           WINDOWPTR wn;
  4042.           int row, col;
  4043.           char c;
  4044.              
  4045.                 wn -    window handle
  4046.                 row -   row to print the string at
  4047.                 col -   column to print the string at
  4048.                 string- the string to print
  4049.                 c -     the character to print
  4050.  
  4051.           Row and Col are relative to the origin of the window.
  4052.  
  4053.           The cursor is displayed only if wn_synflg has been called with 
  4054.           a value of TRUE.
  4055.  
  4056.         RETURNS
  4057.  
  4058.           TRUE or NULL if error
  4059.  
  4060.         CAUTIONS and ADDITIONAL NOTES
  4061.  
  4062.           wn_puts writes the string directly to the video ram. Tabs, line 
  4063.           feeds, carriage returns and other control characters are not 
  4064.           filtered or processed in any way.
  4065.  
  4066.           Range checks are not performed to insure the specified string 
  4067.           can be contained in the window.  
  4068.  
  4069.           The window "wn" automatically becomes the top window tile upon 
  4070.           return.
  4071.  
  4072.  
  4073.  
  4074.  
  4075.  
  4076.  
  4077.  
  4078.  
  4079.  
  4080.  
  4081.  
  4082.  
  4083.  
  4084.  
  4085.  
  4086.  
  4087.                                    67
  4088.  
  4089.  
  4090.  
  4091.         10.18. wn_gets -- get string with validation
  4092.  
  4093.         USAGE
  4094.  
  4095.           (char *) wn_gets(wn, buf, va, uva)
  4096.           WINDOWPTR wn;
  4097.           char *buf;
  4098.           int va;
  4099.           char *uva;
  4100.  
  4101.                 wn -    window handle
  4102.                 buf -   user buffer for string
  4103.                 va -    input validation to be used
  4104.                 uva -   user validation list [optional]
  4105.  
  4106.           va specifies the type of input validation to be performed as 
  4107.           data is being entered. Options are:
  4108.  
  4109.                 (1) none                no restrictions - accept everything
  4110.                 (2) integer             accept: 0 thru 9 + -
  4111.                 (3) floating point      accept: 0 thru 9 + - .
  4112.                 (4) alpha only          accept: a thru z 
  4113.                                         (upper & lower case)
  4114.                 (5) upper case only     accept: A thru Z 
  4115.                 (6) validation list     accept: only those characters
  4116.                     (optional)                  specified via uva string.
  4117.  
  4118.                 ORing va with 0x8000 disables data entry character echo.
  4119.  
  4120.           The following editing functions are supported:
  4121.  
  4122.                 . backspace & rubout do the logical things
  4123.                 . ^U, ^X, and ^C wipe the field clean
  4124.                 . Return and Esc end the input function 
  4125.  
  4126.           Data entry takes place at the current logical cursor location. 
  4127.           You  can, of course, position the cursor to where you wish 
  4128.           prior to calling wn_gets.
  4129.  
  4130.           Example:
  4131.  
  4132.                 wn_printf(wn,"Enter your name > ");
  4133.                 wn_gets(wn,buf,4,0);
  4134.  
  4135.         RETURNS
  4136.  
  4137.           Pointer to buf or NULL if error
  4138.  
  4139.         CAUTIONS and ADDITIONAL NOTES
  4140.  
  4141.           The window "wn" automatically becomes the top window tile upon   
  4142.           return.  This function is provided for historical purposes, 
  4143.           more complete and flexible functions are included as part of 
  4144.           the Data Clerk.
  4145.  
  4146.  
  4147.  
  4148.                                    68
  4149.  
  4150.  
  4151.  
  4152.         10.19. wn_putsa -- put string and attribute (high speed)
  4153.         10.20. wn_putca -- put character and attribute
  4154.  
  4155.         USAGE
  4156.  
  4157.           wn_putsa(wn, row, col, string, atrib)
  4158.           WINDOWPTR wn;
  4159.           int row, col;
  4160.           char *string;
  4161.           int atrib;
  4162.  
  4163.           wn_putca(wn, row, col, c, atrib)
  4164.           WINDOWPTR wn;
  4165.           int row, col;
  4166.           char c;
  4167.           int atrib;
  4168.  
  4169.                 wn -    window handle
  4170.                 row -   row to print the string at
  4171.                 col -   column to print the string at
  4172.                 string- the string to print
  4173.                 c -     the character to print
  4174.                 atrib - attribute to be used with string
  4175.  
  4176.           Row and Col are relative to the origin of the window.
  4177.  
  4178.           The cursor is displayed only if wn_synflg has been called with 
  4179.           a value of TRUE.
  4180.  
  4181.         RETURNS
  4182.  
  4183.           TRUE or NULL if error
  4184.  
  4185.         CAUTIONS and ADDITIONAL NOTES
  4186.  
  4187.           wn_puts writes the string directly to the video ram. Tabs, line 
  4188.           feeds, carriage returns and other control characters are not 
  4189.           filtered or processed in any way.
  4190.  
  4191.           Range checks are not performed to insure the specified string 
  4192.           can be contained in the window.  
  4193.  
  4194.           The window "wn" automatically becomes the top window tile upon 
  4195.           return.
  4196.  
  4197.  
  4198.  
  4199.  
  4200.  
  4201.  
  4202.  
  4203.  
  4204.  
  4205.  
  4206.  
  4207.  
  4208.  
  4209.                                    69
  4210.  
  4211.  
  4212.  
  4213.         wn_getca -- get character and attribute from window
  4214.  
  4215.         USAGE
  4216.  
  4217.           unsigned int wn_getca(wn, row, col)
  4218.           WINDOWPTR wn;
  4219.           int row, col;
  4220.  
  4221.                 wn -    window handle
  4222.                 row -   row to fetch character/attribute from 
  4223.                 col -   column to fetch character/attribute from 
  4224.  
  4225.           Row and Col are relative to the origin of the window.
  4226.  
  4227.           The cursor is displayed only if wn_synflg has been called with 
  4228.           a value of TRUE.
  4229.  
  4230.         RETURNS
  4231.  
  4232.           The character attribute pair.  Attribute in the upper 8 bits, 
  4233.           character in the lower 8 bits.
  4234.  
  4235.         CAUTIONS and ADDITIONAL NOTES
  4236.  
  4237.           wn_getca calls _getca.
  4238.  
  4239.           The window "wn" automatically becomes the top window tile upon 
  4240.           return.
  4241.  
  4242.           Range checks are not performed.
  4243.  
  4244.  
  4245.  
  4246.  
  4247.  
  4248.  
  4249.  
  4250.  
  4251.  
  4252.  
  4253.  
  4254.  
  4255.  
  4256.  
  4257.  
  4258.  
  4259.  
  4260.  
  4261.  
  4262.  
  4263.  
  4264.  
  4265.  
  4266.  
  4267.  
  4268.  
  4269.  
  4270.                                    70
  4271.  
  4272.  
  4273.  
  4274.         10.21. wn_insrow -- insert row in window
  4275.  
  4276.         USAGE
  4277.  
  4278.           wn_insrow(wn, row)
  4279.           WINDOWPTR wn;
  4280.           int row;
  4281.  
  4282.                 wn -  window handle
  4283.                 row - row at which a line is to be inserted
  4284.  
  4285.           Row is relative to the origin of the window.  All lines below 
  4286.           the row specified are scrolled down.  The currently defined 
  4287.           window attribute is used to clear the lines inserted.  
  4288.  
  4289.         RETURNS
  4290.  
  4291.           TRUE or NULL if error
  4292.  
  4293.         CAUTIONS and ADDITIONAL NOTES
  4294.  
  4295.           The window "wn" automatically becomes the top window tile upon 
  4296.           return.
  4297.  
  4298.  
  4299.  
  4300.         10.22. wn_delrow -- delete row from window
  4301.  
  4302.         USAGE
  4303.  
  4304.           wn_delrow(wn, row)
  4305.           WINDOWPTR wn;
  4306.           int row;
  4307.  
  4308.                 wn -  window handle
  4309.                 row - row at which a line is to be deleted
  4310.  
  4311.           Row is relative to the origin of the window.  All lines below 
  4312.           the row specified are scrolled up. The currently defined window 
  4313.           attribute is used to clear the lines inserted.  
  4314.  
  4315.         RETURNS
  4316.  
  4317.           TRUE or NULL if error
  4318.  
  4319.         CAUTIONS and ADDITIONAL NOTES
  4320.  
  4321.           The window "wn" automatically becomes the top window tile upon 
  4322.           return.
  4323.  
  4324.  
  4325.  
  4326.  
  4327.  
  4328.  
  4329.  
  4330.  
  4331.                                    71
  4332.  
  4333.  
  4334.  
  4335.         10.23. wn_clr -- window: clear entire window
  4336.         10.24. wn_clrrow -- window: clear single row 
  4337.         10.25. wn_clreol -- window: clear cursor to end of line
  4338.         10.26. wn_clreow -- window: clear cursor to end of window
  4339.  
  4340.         USAGE
  4341.  
  4342.           wn_clr(wn)
  4343.           wn_clrrow(wn,row)
  4344.           wn_clreol(wn,row,col)
  4345.           wn_clreow(wn,row,col);
  4346.  
  4347.           WINDOWPTR wn;
  4348.           int row, col;
  4349.            
  4350.                 wn - window handle
  4351.                 row - row in window where clear function begins
  4352.                 col - column in window where clear function begins
  4353.           
  4354.         RETURNS
  4355.  
  4356.           TRUE or NULL if error
  4357.  
  4358.         CAUTIONS and ADDITIONAL NOTES
  4359.  
  4360.           The window "wn" automatically becomes the top window tile upon 
  4361.           return.
  4362.  
  4363.           The currently defined window attribute is used to clear the 
  4364.           interior portion of the window.  
  4365.  
  4366.           wn_clr homes the virtual cursor other functions position cursor 
  4367.           to the location specified by row and col.
  4368.  
  4369.         10.27. wn_activate -- activate window
  4370.  
  4371.         USAGE
  4372.  
  4373.           wn_activate(wn)
  4374.           WINDOWPTR wn;
  4375.  
  4376.              wn - window handle
  4377.  
  4378.           Activate a previously opened window.  The window specified by 
  4379.           "wn" becomes the top window tile.
  4380.  
  4381.         RETURNS
  4382.  
  4383.           TRUE or NULL if error
  4384.  
  4385.         CAUTIONS and ADDITIONAL NOTES
  4386.  
  4387.           None.
  4388.  
  4389.  
  4390.  
  4391.  
  4392.                                    72
  4393.  
  4394.  
  4395.  
  4396.         10.28. wn_color -- set window & border attribute
  4397.  
  4398.         USAGE
  4399.  
  4400.           wn_color(wn, atrib, batrib)
  4401.           WINDOWPTR wn;
  4402.           unsigned int atrib, batrib;
  4403.  
  4404.                 wn -    window handle
  4405.                 atrib - attribute to be used for the window
  4406.                 batrib- attribute to be used for the border
  4407.  
  4408.           wn_color sets the attribute to be used for all subsequent 
  4409.           operations in the window.  The attribute byte contains the 
  4410.           background specific data in the upper 4 bits and the foreground 
  4411.           specific data in the lower 4 bits.  Color and bit definitions 
  4412.           can be found in winboss.h. You can use a statement of the form:
  4413.  
  4414.                          atrib = (bground << 4 | fground);
  4415.  
  4416.           to set the attribute to the correct format.  
  4417.  
  4418.           Attributes are defined in winboss.h.
  4419.  
  4420.         RETURNS
  4421.  
  4422.           Nothing.
  4423.  
  4424.         CAUTIONS and ADDITIONAL NOTES
  4425.  
  4426.           None.
  4427.  
  4428.  
  4429.  
  4430.  
  4431.  
  4432.  
  4433.  
  4434.  
  4435.  
  4436.  
  4437.  
  4438.  
  4439.  
  4440.  
  4441.  
  4442.  
  4443.  
  4444.  
  4445.  
  4446.  
  4447.  
  4448.  
  4449.  
  4450.  
  4451.  
  4452.  
  4453.                                    73
  4454.  
  4455.  
  4456.  
  4457.         10.29. wn_wrap -- set/clear line wrap flag
  4458.  
  4459.         USAGE
  4460.  
  4461.           wn_wrap(wn, flag) 
  4462.           WINDOWPTR wn;     
  4463.           int flag;
  4464.  
  4465.                 wn -   window handle
  4466.                 flag - wrap flag (TRUE or FALSE)
  4467.  
  4468.           Sets the line wrap flag for window functions.  If line wrap is 
  4469.           true, output that exceeds the width of a window is 
  4470.           automatically placed on the next line.  When the line wrap flag 
  4471.           is false, output that exceeds the width of the window is lost.  
  4472.  
  4473.         RETURNS
  4474.  
  4475.           Nothing.
  4476.  
  4477.         CAUTIONS and ADDITIONAL NOTES
  4478.  
  4479.           None.
  4480.  
  4481.  
  4482.  
  4483.         10.30. wn_sync -- set/clear cursor synchronization flag
  4484.  
  4485.         USAGE
  4486.  
  4487.           wn_sync(wn, flag) 
  4488.           WINDOWPTR wn;     
  4489.           int flag;
  4490.  
  4491.                 wn -   window handle
  4492.                 flag - synchronization flag (TRUE or FALSE)
  4493.  
  4494.           When wn_sync is called with a value of TRUE all subsequent text 
  4495.           output to the window will have a flashing (normal) cursor 
  4496.           displayed following the last character output. Calling wn_sync 
  4497.           with a value of false inhibits the cursor from physically 
  4498.           advancing (it is always logically advanced).  
  4499.  
  4500.         RETURNS
  4501.  
  4502.           Nothing.
  4503.  
  4504.         CAUTIONS and ADDITIONAL NOTES
  4505.  
  4506.           None.
  4507.  
  4508.  
  4509.  
  4510.  
  4511.  
  4512.  
  4513.  
  4514.                                    74
  4515.  
  4516.  
  4517.  
  4518.         10.31. wn_scroll -- set scrolling method for window
  4519.  
  4520.         USAGE
  4521.  
  4522.           wn_scroll(wn,method)
  4523.           WINDOWPTR wn;
  4524.           int method;
  4525.  
  4526.                   wn -      window handle.
  4527.                   method -  BIOS or DMAS
  4528.  
  4529.            Set the method to be used to scroll the contents of the window 
  4530.            to use either the ROM BIOS (BIOS), or the flicker free DMA 
  4531.            logic.  BIOS and DMAS are defined in "winboss.h".  
  4532.  
  4533.            The default scrolling mode is DMAS.
  4534.  
  4535.            The Window BOSS incorporates machine independent logic that 
  4536.            ensures that scrolling on color systems is performed in such a 
  4537.            way as to totally eliminate snow and flicker.  This logic, 
  4538.            although bulletproof, can slow scrolling down.  Setting the 
  4539.            scrolling method to BIOS provides a machine independent way to 
  4540.            improve the scrolling speed with a (perhaps) proportional 
  4541.            increase in flicker.  Keep in mind that recent developments in 
  4542.            CGA and EGA technology have, for the most part, eliminated 
  4543.            scrolling flicker at the hardware level.  If your system is 
  4544.            equipped with one of these boards, you may achieve a 
  4545.            noticeable improvement in scrolling speed by using wn_scroll() 
  4546.            to set the scrolling method to BIOS.  Additionally, there are 
  4547.            several console device drivers (FANSI and NANSI to mention 
  4548.            two) that "patch" the BIOS routines to achieve the same 
  4549.            result.  
  4550.  
  4551.            Setting the scrolling method to BIOS when wn_dmaflg=FALSE has 
  4552.            no effect.
  4553.  
  4554.         RETURNS
  4555.  
  4556.            Nothing.
  4557.  
  4558.         CAUTIONS and ADDITIONAL NOTES
  4559.  
  4560.            Color systems only.
  4561.  
  4562.  
  4563.  
  4564.  
  4565.  
  4566.  
  4567.  
  4568.  
  4569.  
  4570.  
  4571.  
  4572.  
  4573.  
  4574.  
  4575.                                    75
  4576.  
  4577.  
  4578.  
  4579.         10.32. wn_dma -- set/clear write RAM directly flag
  4580.  
  4581.         USAGE
  4582.  
  4583.           wn_dma(flag)      
  4584.           int flag;         
  4585.  
  4586.                 flag - write to video RAM flag (TRUE or FALSE).
  4587.  
  4588.           The windowing routines assume that your video card supports 
  4589.           direct access to the video RAM (normal for monochrome 
  4590.           monitors).  
  4591.  
  4592.         RETURNS
  4593.  
  4594.           Nothing.
  4595.  
  4596.         CAUTIONS and ADDITIONAL NOTES
  4597.  
  4598.           None.
  4599.  
  4600.  
  4601.  
  4602.         10.33. wn_fixcsr -- update window cursor position
  4603.  
  4604.         USAGE
  4605.  
  4606.           wn_fixcsr(wn)     
  4607.           WINDOWPTR wn;     
  4608.  
  4609.                 wn - window handle
  4610.  
  4611.           wn_fixcsr is a companion routine to wn_sync.  Causes the 
  4612.           physical cursor to be placed at the logical cursor location.  
  4613.           It is typically called after wn_sync has been called to disable 
  4614.           cursor synchronization.  wn_fixcsr does not alter the state of 
  4615.           the windows cursor synchronization flag.  
  4616.  
  4617.         RETURNS
  4618.  
  4619.           TRUE or NULL if error
  4620.  
  4621.         CAUTIONS and ADDITIONAL NOTES
  4622.  
  4623.           The window "wn" automatically becomes the top window tile upon 
  4624.           return.
  4625.  
  4626.  
  4627.  
  4628.  
  4629.  
  4630.  
  4631.  
  4632.  
  4633.  
  4634.  
  4635.  
  4636.                                    76
  4637.  
  4638.  
  4639.  
  4640.         10.34. wn_boxset -- set box drawing character set
  4641.  
  4642.         USAGE
  4643.  
  4644.           wn_boxset(ul, ur, tb, sd, ll, lr);
  4645.           int ul, ur, tb, sd, ll, lr;
  4646.  
  4647.             ul - upper left corner character
  4648.             ur - upper right corner character
  4649.             tb - top/bottom line character
  4650.             sd - left/right side character
  4651.             ll - lower left corner character
  4652.             lr - lower right corner character
  4653.  
  4654.           wn_boxset set the characters to be used to frame all future 
  4655.           windows.
  4656.  
  4657.         RETURNS
  4658.  
  4659.           Nothing.
  4660.  
  4661.         CAUTIONS and ADDITIONAL NOTES
  4662.  
  4663.           None.
  4664.  
  4665.  
  4666.  
  4667.         10.35. wn_natrib -- set new attribute in window NOW!
  4668.  
  4669.         USAGE
  4670.  
  4671.           wn_natrib(wn,atrib)
  4672.           WINDOWPTR wn;
  4673.           int atrib;
  4674.  
  4675.             wn    - window handle
  4676.             atrib - attribute to set the window specified by wn to.  
  4677.  
  4678.           The attributes of the window are changed immediately.
  4679.  
  4680.           Attributes are defined in window.h
  4681.  
  4682.           The border is not altered.
  4683.  
  4684.         RETURNS
  4685.  
  4686.           TRUE or NULL if error
  4687.  
  4688.         CAUTIONS and ADDITIONAL NOTES
  4689.  
  4690.           The window "wn" automatically becomes the top window tile upon 
  4691.           return.
  4692.  
  4693.  
  4694.  
  4695.  
  4696.  
  4697.                                    77
  4698.  
  4699.  
  4700.  
  4701.         10.36. wn_dborder -- draw (replace) border on window
  4702.  
  4703.         USAGE
  4704.  
  4705.           wn_dborder(wn, ul, ur, tb, sd, ll, lr);
  4706.           WINDOWPTR wn;
  4707.           int ul, ur, tb, sd, ll, lr;
  4708.  
  4709.             wn - window handle
  4710.             ul - upper left corner character
  4711.             ur - upper right corner character
  4712.             tb - top/bottom line character
  4713.             sd - left/right side character
  4714.             ll - lower left corner character
  4715.             lr - lower right corner character
  4716.  
  4717.           The currently defined border attribute is used when drawing the 
  4718.           border.
  4719.  
  4720.         RETURNS
  4721.  
  4722.           TRUE or NULL if error
  4723.  
  4724.         CAUTIONS and ADDITIONAL NOTES
  4725.  
  4726.           The window "wn" automatically becomes the top window tile upon 
  4727.           return.
  4728.  
  4729.  
  4730.  
  4731.  
  4732.  
  4733.  
  4734.  
  4735.  
  4736.  
  4737.  
  4738.  
  4739.  
  4740.  
  4741.  
  4742.  
  4743.  
  4744.  
  4745.  
  4746.  
  4747.  
  4748.  
  4749.  
  4750.  
  4751.  
  4752.  
  4753.  
  4754.  
  4755.  
  4756.  
  4757.  
  4758.                                    78
  4759.  
  4760.  
  4761.  
  4762.         10.37. wn_input -- general purpose window input
  4763.  
  4764.         USAGE
  4765.  
  4766.           wn_input(wn, row, col, prmpt, mask, fill, atrib, ubuff,hlpmsg)
  4767.           
  4768.              (WINDOWPTR) wn  - window pointer
  4769.              int        row  - row in window where prompt is displayed
  4770.              int        col  - col in window where prompt is displayed
  4771.              char *    prmpt - field prompt 
  4772.              char *    mask  - data entry mask
  4773.              char      fill  - fill character
  4774.              unsigned  atrib - attributes to be used 
  4775.                                (fground<<4 | background)
  4776.              char *    ubuff - user text buffer of MAXSTR size
  4777.              char *    hlpmsg- user help message - displayed
  4778.                                when HELP is pressed.  F1 is the default 
  4779.                                HELP key.  This can be changed by calling 
  4780.                                the wn_shkey() function.
  4781.             
  4782.              wn_input is the Data Clerk's kernel. It is called by  
  4783.              virtually all the higher level data entry functions.
  4784.           
  4785.         RETURNS:
  4786.           
  4787.              NULL if error, else non zero value (ASCII value of last 
  4788.              valid exit key).
  4789.  
  4790.              Sets the global "wns_escape" to TRUE if the ESCape key was 
  4791.              pressed causing wn_input to terminate. Set to FALSE 
  4792.              otherwise.
  4793.           
  4794.         CAUTIONS and ADDITIONAL NOTES:
  4795.           
  4796.              prmpt - If a prompt message is not to be provided, wn_input 
  4797.                      should be called with NSTR (null string) in  the 
  4798.                      place of the prompt message text pointer, for 
  4799.                      example:
  4800.           
  4801.                       wn_input(wn,row,col,NSTR,mask,fill,atrib,ubuff,hlpmsg)
  4802.                                           +--+
  4803.                      #defined in winboss.h --^
  4804.           
  4805.                      The prompt is displayed with the current window 
  4806.                      attributes at the row and column specified in the 
  4807.                      call. Data entry begins immediately after the 
  4808.                      prompt.
  4809.  
  4810.  
  4811.  
  4812.  
  4813.  
  4814.  
  4815.  
  4816.  
  4817.  
  4818.  
  4819.                                    79
  4820.  
  4821.  
  4822.  
  4823.         wn_input -- continued.
  4824.  
  4825.  
  4826.  
  4827.              mask -  The mask determines what type of data may be entered 
  4828.                      on a character by character basis.  The control 
  4829.                      characters are as follows:
  4830.           
  4831.                       # - Number (0 thru 9, -, +)
  4832.                       a - Any ASCII character 
  4833.                           (0x01 thru 0xff excluding 0x08)
  4834.                       x - Same as 'a', but without echo (password)
  4835.                       t - Any printable ASCII char (' ' thru '~')
  4836.                       l - lower case character (a thru z)
  4837.                       u - upper case character (A thru Z)
  4838.                       Mask Examples:
  4839.           
  4840.                        Date Mask           "##/##/##"
  4841.                        Time Mask           "##:##:##"
  4842.                        Integer Mask        "#######"
  4843.                        Float Mask          "FFFF.FF"
  4844.                        Phone Number        "(###) ###-####"
  4845.                        Upper Case Mask     "uuuuu" or "UUUUU"
  4846.                        Lower Case Mask     "lllll" or "LLLLL"
  4847.                        ASCII Mask          "aaaaa" or "AAAAA"
  4848.                        No Echo ASCII       "xxxxx" or "XXXXX"
  4849.                        Text Mask           "ttttt" or "TTTTT"
  4850.           
  4851.              fill -  The character to be used to fill the field where 
  4852.                      mask characters appear.  The typical choice for fill 
  4853.                      char is '_'.
  4854.           
  4855.              help  - If a HELP message is not to be provided, wn_input 
  4856.                      should be called with NSTR (null string) in the 
  4857.                      place of the help message text pointer, for example:
  4858.           
  4859.                       wn_input(wn,row,col,NSTR,mask,fill,atrib,ubuff,NSTR)
  4860.                                                                      +--+
  4861.                                                #defined in winboss.h --^
  4862.                     
  4863.                      wn_ihmsg is called to display this message whenever 
  4864.                      the HELP key is depressed while the cursor is in the 
  4865.                      field.  F1 is the default HELP key.  This can be 
  4866.                      changed by calling the wn_shkey() function.
  4867.           
  4868.  
  4869.  
  4870.  
  4871.  
  4872.  
  4873.  
  4874.  
  4875.  
  4876.  
  4877.  
  4878.  
  4879.  
  4880.                                    80
  4881.  
  4882.  
  4883.  
  4884.         wn_input -- continued.
  4885.  
  4886.  
  4887.  
  4888.              ubuff - Editing buffer.  Must be of sufficient size to hold 
  4889.                      the data as it is entered.  Typical size is the 
  4890.                      length of the mask + 2 bytes (strlen(mask)+2). 
  4891.                      Maximum length is MAXSTR.
  4892.           
  4893.                      On entry the first byte of ubuff should be a null, 
  4894.                      otherwise wn_input assumes there is valid data there 
  4895.                      and will enter edit mode.  This can be handy if 
  4896.                      there is a need for prefilled, but editable fields.  
  4897.                      In actual practice, wn_input uses this buffer for 
  4898.                      both initial character data entry and subsequent 
  4899.                      editing.
  4900.           
  4901.                      On return, ubuff contains the actual data entered in 
  4902.                      character format with fill and mask characters as 
  4903.                      spaces (e.g. "Now is the time          "). 
  4904.  
  4905.                      ubuff is returned left justified for non numeric 
  4906.                      masks.  If a completely numeric mask (#) was 
  4907.                      specified and the mask does not contain any other 
  4908.                      characters, ubuff is returned right justified.  
  4909.  
  4910.  
  4911.  
  4912.  
  4913.  
  4914.  
  4915.  
  4916.  
  4917.  
  4918.  
  4919.  
  4920.  
  4921.  
  4922.  
  4923.  
  4924.  
  4925.  
  4926.  
  4927.  
  4928.  
  4929.  
  4930.  
  4931.  
  4932.  
  4933.  
  4934.  
  4935.  
  4936.  
  4937.  
  4938.  
  4939.  
  4940.  
  4941.                                    81
  4942.  
  4943.  
  4944.  
  4945.         wn_input -- continued.
  4946.  
  4947.  
  4948.  
  4949.              Editing Keys
  4950.  
  4951.                      Pressing the ESCape, RETURN/ENTER, UARROW, or DARROW 
  4952.                      key terminates input.  Since wn_input can be called 
  4953.                      alone, or from any of the custom data entry routines 
  4954.                      wn_gint, (wn_gfloat via wn_frmget), etc., wn_input 
  4955.                      must be able to exit in a variety of ways. If 
  4956.                      wn_input has been called as the result of a call to 
  4957.                      wn_frmget, the UARROW and DARROW keys move to the 
  4958.                      previous and next fields respectively.  The global 
  4959.                      wns_escape is set to TRUE if the ESCape key caused 
  4960.                      wn_input to terminate (set to FALSE otherwise).
  4961.  
  4962.                      Backspace and the cursor RIGHT ARROW and LEFT ARROW 
  4963.                      can be used to move the cursor one position at a 
  4964.                      time during entry. Control+RIGHT ARROW and 
  4965.                      Control+LEFT ARROW move the cursor to the 
  4966.                      previous/next word. The space bar can also be 
  4967.                      pressed when entering numeric fields provided that 
  4968.                      no "digits", "+", or "-" has been struck. Naturally, 
  4969.                      the HOME and END key work in a predictable fashion 
  4970.                      as do the INSert and DELete keys. The HOME key 
  4971.                      positions the cursor at the start of the field, END 
  4972.                      to end of the field.  The INSert key inserts a space 
  4973.                      at the current cursor position (pushing the contents 
  4974.                      of the field to the right.  DELete deletes the 
  4975.                      character at the cursor location (dragging the 
  4976.                      contents of the field to the left).
  4977.           
  4978.                      When the field fills and RETURN/ENTER has not been 
  4979.                      struck, the cursor waits at the end of the field for 
  4980.                      RETURN/ENTER to be pressed.  You may also press 
  4981.                      Backspace, HOME, or LEFT ARROW - these allow the 
  4982.                      field to be edited again.
  4983.  
  4984.                      The cursor shape indicates whether or not data can 
  4985.                      be entered, or if you are beyond the fields edge.  
  4986.                      The cursor is half size (bottom half) when data can 
  4987.                      be entered, and half size (top half) when you are 
  4988.                      beyond the edge of the field.
  4989.           
  4990.                      BELLs automatically ring when you strike an invalid 
  4991.                      key or attempt to enter data beyond the edge of the 
  4992.                      field.  
  4993.  
  4994.  
  4995.  
  4996.  
  4997.  
  4998.  
  4999.  
  5000.  
  5001.  
  5002.                                    82
  5003.  
  5004.  
  5005.  
  5006.         wn_input -- continued.
  5007.  
  5008.  
  5009.  
  5010.              Miscellaneous
  5011.           
  5012.                      Choose your fill character wisely, as you can not 
  5013.                      enter that character as data in a field.  
  5014.           
  5015.                      The data entry routines are pointer intensive. 
  5016.                      Failure to insure that they are called with 
  5017.                      arguments of the right type, size, and dimension 
  5018.                      will certainly cause undesired results.
  5019.  
  5020.  
  5021.  
  5022.  
  5023.  
  5024.  
  5025.  
  5026.  
  5027.  
  5028.  
  5029.  
  5030.  
  5031.  
  5032.  
  5033.  
  5034.  
  5035.  
  5036.  
  5037.  
  5038.  
  5039.  
  5040.  
  5041.  
  5042.  
  5043.  
  5044.  
  5045.  
  5046.  
  5047.  
  5048.  
  5049.  
  5050.  
  5051.  
  5052.  
  5053.  
  5054.  
  5055.  
  5056.  
  5057.  
  5058.  
  5059.  
  5060.  
  5061.  
  5062.  
  5063.                                    83
  5064.  
  5065.  
  5066.  
  5067.         10.38. wn_frmopn -- open data entry form
  5068.  
  5069.         USAGE
  5070.  
  5071.           wn_frmopn(nfields)
  5072.           
  5073.              int     nfields - number of fields in form plus 1.
  5074.  
  5075.         RETURNS:
  5076.           
  5077.              Pointer to an array of field control blocks. (WIFORM)
  5078.           
  5079.                 or
  5080.           
  5081.              NULL if error (memory could not be allocated)
  5082.           
  5083.         CAUTIONS and ADDITIONAL NOTES:
  5084.           
  5085.              If wn_frmopn returns NULL, no attempt should be made to use 
  5086.              the data entry form in question.  NULL indicates that memory 
  5087.              could not be allocated for the form!
  5088.               
  5089.              This routine must be called before  wn_frmget and wn_frmcls.
  5090.  
  5091.              If your form contains 4 fields the call wn_frmopn as 
  5092.              follows:
  5093.  
  5094.                 WIFORM frm;
  5095.                   
  5096.                   frm = wn_frmopn(5);
  5097.  
  5098.              Fields are sequentially numbered starting from 0 ending at 
  5099.              nfields-2.  The extra field is used for internal purposes.
  5100.  
  5101.              Refer to "SAMPLE.C" for example(s) of usage.
  5102.  
  5103.  
  5104.  
  5105.  
  5106.  
  5107.  
  5108.  
  5109.  
  5110.  
  5111.  
  5112.  
  5113.  
  5114.  
  5115.  
  5116.  
  5117.  
  5118.  
  5119.  
  5120.  
  5121.  
  5122.  
  5123.  
  5124.                                    84
  5125.  
  5126.  
  5127.  
  5128.         10.39. wn_frmget -- get (read) data entry form
  5129.  
  5130.         USAGE
  5131.  
  5132.           wn_frmget(frm)
  5133.           
  5134.              WIFORM   frm - valid field pointer.
  5135.           
  5136.         RETURNS:
  5137.           
  5138.              TRUE  - indicating all fields of the form in question have 
  5139.                      been fetched and verified (where required).
  5140.  
  5141.              ESC_CODE - indicating ESCape was pressed and form processing
  5142.                      was terminated.
  5143.           
  5144.                 or
  5145.           
  5146.              Never Returns!!
  5147.           
  5148.         CAUTIONS and ADDITIONAL NOTES:
  5149.           
  5150.              As provided, wn_frmget is very usable, however, you may wish 
  5151.              to modify it (source has been provided for this purpose) to 
  5152.              include some of your own custom forms or the way in which 
  5153.              forms are processed when completed. 
  5154.  
  5155.              As distributed, wn_frmget first displays all field prompts 
  5156.              and then positions to the first field, performs data entry 
  5157.              on a field by field basis from the first to the last 
  5158.              (allowing editing along the way), asks for a confirmation to 
  5159.              accept the fields on the form after the last field is 
  5160.              entered, either accepts the form, or drops into edit mode 
  5161.              for all the fields on the form starting at the first field.
  5162.  
  5163.              Refer to wn_input for a discussion of editing keys during 
  5164.              data entry.
  5165.           
  5166.              wn_frmget will not return unless ESCape is pressed or  all 
  5167.              data has been entered and verified (where required).
  5168.               
  5169.              This routine must be called after wn_frmopn, and before 
  5170.              wn_frmcls.
  5171.  
  5172.              Refer to "SAMPLE.C" for example(s) of usage.
  5173.  
  5174.  
  5175.  
  5176.  
  5177.  
  5178.  
  5179.  
  5180.  
  5181.  
  5182.  
  5183.  
  5184.  
  5185.                                    85
  5186.  
  5187.  
  5188.  
  5189.         10.40. wn_frmcls -- close data entry form
  5190.  
  5191.         USAGE
  5192.  
  5193.              wn_frmcls(frm)
  5194.           
  5195.              (WIFORM) frm - pointer to an array of field control blocks
  5196.           
  5197.         RETURNS:
  5198.           
  5199.              TRUE 
  5200.           
  5201.         CAUTIONS and ADDITIONAL NOTES:
  5202.           
  5203.              This routine should only be called if memory is scarce or 
  5204.              there is no further need for the form you wish to close.  
  5205.              Once a form is closed, all traces of it vanish, the only way 
  5206.              to get it back is to start from scratch with wn_frmopn, 
  5207.              wn_frmget and so on.
  5208.  
  5209.              Closing a form has no impact on its visual image, just its 
  5210.              logical existence. If you wish to make a form vanish both 
  5211.              logically and visually - close the window it is anchored to 
  5212.              after, and only after, closing the form.
  5213.  
  5214.              In this release, a form is not automatically closed when the 
  5215.              window to which it is anchored is closed.  
  5216.  
  5217.              Refer to "SAMPLE.C" for example(s) of usage.
  5218.  
  5219.  
  5220.  
  5221.  
  5222.  
  5223.  
  5224.  
  5225.  
  5226.  
  5227.  
  5228.  
  5229.  
  5230.  
  5231.  
  5232.  
  5233.  
  5234.  
  5235.  
  5236.  
  5237.  
  5238.  
  5239.  
  5240.  
  5241.  
  5242.  
  5243.  
  5244.  
  5245.  
  5246.                                    86
  5247.  
  5248.  
  5249.  
  5250.         10.41. wn_gdate - input date in window (MM/DD/YY)
  5251.  
  5252.         USAGE
  5253.  
  5254.           wn_gdate(fun,frm,fld,wn,row,col,prmpt,atrib,fill,month,day,year,
  5255.                    ubuff,hlpmsg,errmsg)
  5256.           
  5257.              int        fun - function code (SET || XEQ)
  5258.              (WIFORM)   frm - form pointer  (actual || NFRM)
  5259.              int        fld - field # in form (actual || NULL)
  5260.              (WINDOWPTR) wn - window pointer
  5261.              int        row - row in window where data input begins
  5262.              int        col - col in window where data input begins
  5263.              (char *) prmpt - field prompt (call with NSTR for none)
  5264.              unsigned atrib - field (not prompt) attributes 
  5265.              char      fill - field fill character
  5266.              (int *)  month - pointer to int for month (1-12)
  5267.              (int *)    day - pointer to int for day (1-31)
  5268.              (int *)   year - pointer to int for year (0-99)
  5269.              (char *) ubuff - pointer to char array of 10 bytes 
  5270.              (char *)hlpmsg - pointer to help message 
  5271.                               (call with NSTR for none)
  5272.              (char *)errmsg - pointer to err message
  5273.                               (call with NSTR for none)
  5274.           
  5275.         RETURNS:
  5276.           
  5277.              month, day, and year via pointers.
  5278.           
  5279.              NULL if error, else the non zero value returned from 
  5280.              wn_input.
  5281.  
  5282.              "wns_escape" is set to TRUE if the ESCape key caused 
  5283.              wn_input to terminate.  Set to FALSE otherwise.
  5284.           
  5285.         CAUTIONS and ADDITIONAL NOTES:
  5286.           
  5287.              fun - fun can only be SET for form setup, or XEQ for 
  5288.                    immediate execution.  When called with SET, valid 
  5289.                    arguments for both "frm" and "fld" must be specified.  
  5290.                    frm is the field pointer returned from wn_frmopn(), and 
  5291.                    fld is the field sequence number in the form for this 
  5292.                    field.  When called with XEQ frm must be NFRM and fld 
  5293.                    must be NFLD.
  5294.           
  5295.             ubuff - Editing buffer.  Must be of sufficient size to hold 
  5296.                    the data as it is entered.  Minimum size is 10.
  5297.           
  5298.  
  5299.  
  5300.  
  5301.  
  5302.  
  5303.  
  5304.  
  5305.  
  5306.  
  5307.                                    87
  5308.  
  5309.  
  5310.  
  5311.         wn_gdate continued.
  5312.  
  5313.  
  5314.  
  5315.                    On entry, the first byte of ubuff should be a null, 
  5316.                    otherwise wn_input assumes there is valid data there 
  5317.                    and will enter edit mode.  This can be handy if there 
  5318.                    is a need for prefilled, but editable fields.  In 
  5319.                    actual practice, wn_input uses this buffer for both 
  5320.                    initial character data entry and subsequent editing.
  5321.  
  5322.                    On return, ubuff contains the actual data entered in 
  5323.                    character format with fill and mask characters as 
  5324.                    spaces (e.g. "12 12 88").
  5325.  
  5326.              Only basic reasonability checks are made.  Therefore, dates 
  5327.              like 02/31/88 can be returned.
  5328.           
  5329.              Calls wn_input to perform data entry.
  5330.           
  5331.              Data must satisfy validation checks for function to return.
  5332.  
  5333.              Refer to "SAMPLE.C" for example(s) of usage.
  5334.  
  5335.  
  5336.  
  5337.  
  5338.  
  5339.  
  5340.  
  5341.  
  5342.  
  5343.  
  5344.  
  5345.  
  5346.  
  5347.  
  5348.  
  5349.  
  5350.  
  5351.  
  5352.  
  5353.  
  5354.  
  5355.  
  5356.  
  5357.  
  5358.  
  5359.  
  5360.  
  5361.  
  5362.  
  5363.  
  5364.  
  5365.  
  5366.  
  5367.  
  5368.                                    88
  5369.  
  5370.  
  5371.  
  5372.         10.42. wn_gedate - input European date in window (DD/MM/YY)
  5373.  
  5374.         USAGE
  5375.  
  5376.           wn_gedate(fun,frm,fld,wn,row,col,prmpt,atrib,fill,day,month,year,
  5377.                    ubuff,hlpmsg,errmsg)
  5378.           
  5379.              int        fun - function code (SET || XEQ)
  5380.              (WIFORM)   frm - form pointer  (actual || NFRM)
  5381.              int        fld - field # in form (actual || NULL)
  5382.              (WINDOWPTR) wn - window pointer
  5383.              int        row - row in window where data input begins
  5384.              int        col - col in window where data input begins
  5385.              (char *) prmpt - field prompt (call with NSTR for none)
  5386.              unsigned atrib - field (not prompt) attributes 
  5387.              char      fill - field fill character
  5388.              (int *)    day - pointer to int for day (1-31)
  5389.              (int *)  month - pointer to int for month (1-12)
  5390.              (int *)   year - pointer to int for year (0-99)
  5391.              (char *) ubuff - pointer to char array of 10 bytes 
  5392.              (char *)hlpmsg - pointer to help message 
  5393.                               (call with NSTR for none)
  5394.              (char *)errmsg - pointer to err message
  5395.                               (call with NSTR for none)
  5396.           
  5397.         RETURNS:
  5398.           
  5399.              day, month, and year via pointers.
  5400.           
  5401.              NULL if error, else the non zero value returned from 
  5402.              wn_input.
  5403.  
  5404.              "wns_escape" is set to TRUE if the ESCape key caused 
  5405.              wn_input to terminate.  Set to FALSE otherwise.
  5406.           
  5407.         CAUTIONS and ADDITIONAL NOTES:
  5408.           
  5409.              fun - fun can only be SET for form setup, or XEQ for 
  5410.                    immediate execution.  When called with SET, valid 
  5411.                    arguments for both "frm" and "fld" must be specified.  
  5412.                    frm is the field pointer returned from wn_frmopn(), and 
  5413.                    fld is the field sequence number in the form for this 
  5414.                    field.  When called with XEQ frm must be NFRM and fld 
  5415.                    must be NFLD.
  5416.           
  5417.             ubuff - Editing buffer.  Must be of sufficient size to hold 
  5418.                    the data as it is entered.  Minimum size is 10.
  5419.           
  5420.  
  5421.  
  5422.  
  5423.  
  5424.  
  5425.  
  5426.  
  5427.  
  5428.  
  5429.                                    89
  5430.  
  5431.  
  5432.  
  5433.         wn_gedate continued.
  5434.  
  5435.  
  5436.  
  5437.                    On entry, the first byte of ubuff should be a null, 
  5438.                    otherwise wn_input assumes there is valid data there 
  5439.                    and will enter edit mode.  This can be handy if there 
  5440.                    is a need for prefilled, but editable fields.  In 
  5441.                    actual practice, wn_input uses this buffer for both 
  5442.                    initial character data entry and subsequent editing.
  5443.  
  5444.                    On return, ubuff contains the actual data entered in 
  5445.                    character format with fill and mask characters as 
  5446.                    spaces (e.g. "29 02 88").
  5447.  
  5448.              Only basic reasonability checks are made.  Therefore, dates 
  5449.              like 30/02/88 can be returned.
  5450.           
  5451.              Calls wn_input to perform data entry.
  5452.           
  5453.              Data must satisfy validation checks for function to return.
  5454.  
  5455.              Refer to "SAMPLE.C" for example(s) of usage.
  5456.  
  5457.  
  5458.  
  5459.  
  5460.  
  5461.  
  5462.  
  5463.  
  5464.  
  5465.  
  5466.  
  5467.  
  5468.  
  5469.  
  5470.  
  5471.  
  5472.  
  5473.  
  5474.  
  5475.  
  5476.  
  5477.  
  5478.  
  5479.  
  5480.  
  5481.  
  5482.  
  5483.  
  5484.  
  5485.  
  5486.  
  5487.  
  5488.  
  5489.  
  5490.                                    90
  5491.  
  5492.  
  5493.  
  5494.         10.43. wn_gtime -- input time in window
  5495.  
  5496.         USAGE
  5497.  
  5498.           wn_gtime(fun,frm,fld,wn,row,col,prmpt,atrib,fill,hrs,mins,
  5499.                    secs,ubuff,hlpmsg,errmsg)
  5500.           
  5501.              int        fun - function code (SET || XEQ)
  5502.              (WIFORM)   frm - form pointer  (actual || NFRM)
  5503.              int        fld - field # in form (actual || NFLD)
  5504.              (WINDOWPTR) wn - window pointer
  5505.              int        row - row in window where data input begins
  5506.              int        col - col in window where data input begins
  5507.              (char *) prmpt - field prompt (call with NSTR for none)
  5508.              unsigned atrib - field (not prompt) attributes 
  5509.              char      fill - field fill character
  5510.              (int *)    hrs - pointer to int for hours (0-24)
  5511.              (int *)   mins - pointer to int for minutes (0-59)
  5512.              (int *)   secs - pointer to int for seconds (0-59)
  5513.              (char *) ubuff - pointer to char array of 10 bytes 
  5514.              (char *)hlpmsg - pointer to help message 
  5515.                               (call with NSTR for none)
  5516.              (char *)errmsg - pointer to err message 
  5517.                               (call with NSTR for none)
  5518.           
  5519.         RETURNS:
  5520.           
  5521.              hrs, mins, and secs via pointers.
  5522.           
  5523.              NULL if error, else the non zero value returned from  
  5524.              wn_input.
  5525.           
  5526.              "wns_escape" is set to TRUE if the ESCape key caused 
  5527.              wn_input to terminate.  Set to FALSE otherwise.
  5528.  
  5529.         CAUTIONS and ADDITIONAL NOTES:
  5530.           
  5531.              fun - fun can only be SET for form setup, or XEQ for 
  5532.                    immediate execution.  When called with SET, valid 
  5533.                    arguments for both "frm" and "fld" must be specified.  
  5534.                    frm is the field pointer returned from wn_frmopn(), and 
  5535.                    fld is the field sequence number in the form for this 
  5536.                    field.  When called with XEQ frm must be NFRM and fld 
  5537.                    must be NFLD.
  5538.           
  5539.  
  5540.  
  5541.  
  5542.  
  5543.  
  5544.  
  5545.  
  5546.  
  5547.  
  5548.  
  5549.  
  5550.  
  5551.                                    91
  5552.  
  5553.  
  5554.  
  5555.         wn_gtime - continued.
  5556.  
  5557.  
  5558.              
  5559.              ubuff - Editing buffer.  Must be of sufficient size to hold 
  5560.                    the data as it is entered.  Minimum size is 10.
  5561.           
  5562.                    On entry, the first byte of ubuff should be a null, 
  5563.                    otherwise wn_input assumes there is valid data there 
  5564.                    and will enter edit mode.  This can be handy if there 
  5565.                    is a need for prefilled, but editable fields.  In 
  5566.                    actual practice, wn_input uses this buffer for both 
  5567.                    initial character data entry and subsequent editing.
  5568.  
  5569.                     On return, ubuff contains the actual data entered in 
  5570.                     character format with fill and mask characters as 
  5571.                     spaces (e.g. "23 59 22").
  5572.           
  5573.              Only basic reasonability checks are made.  Therefore, times 
  5574.              like 24:59:59 can be returned.
  5575.           
  5576.              Calls wn_input to perform data entry.
  5577.           
  5578.              Data must satisfy validation checks for function to return.
  5579.  
  5580.              Refer to "SAMPLE.C" for example(s) of usage.
  5581.  
  5582.  
  5583.  
  5584.  
  5585.  
  5586.  
  5587.  
  5588.  
  5589.  
  5590.  
  5591.  
  5592.  
  5593.  
  5594.  
  5595.  
  5596.  
  5597.  
  5598.  
  5599.  
  5600.  
  5601.  
  5602.  
  5603.  
  5604.  
  5605.  
  5606.  
  5607.  
  5608.  
  5609.  
  5610.  
  5611.  
  5612.                                    92
  5613.  
  5614.  
  5615.  
  5616.         10.44. wn_gphone -- input phone number in window
  5617.  
  5618.         USAGE
  5619.  
  5620.           wn_gphone(fun,frm,fld,wn,row,col,prmpt,atrib,fill,acode,
  5621.                     nnx,num,ubuff,hlpmsg,errmsg)
  5622.           
  5623.              int        fun - function code (SET || XEQ)
  5624.              (WIFORM)   frm - form pointer  (actual || NFRM)
  5625.              int        fld - field # in form (actual || NFLD)
  5626.              (WINDOWPTR) wn - window pointer
  5627.              int        row - row in window where data input begins
  5628.              int        col - col in window where data input begins
  5629.              (char *) prmpt - field prompt (call with NSTR for none)
  5630.              unsigned atrib - field (not prompt) attributes 
  5631.              char      fill - field fill character
  5632.              (int *)  acode - pointer to int for area code (3 digits)
  5633.              (int *)    nnx - pointer to int for nnx (3 digits)
  5634.              (int *)    num - pointer to int for number (4 digits)
  5635.              (char *) ubuff - pointer to char array of 18 bytes 
  5636.              (char *)hlpmsg - pointer to help message 
  5637.                               (call with NSTR for none)
  5638.              (char *)errmsg - pointer to err message 
  5639.                               (call with NSTR for none)
  5640.           
  5641.         RETURNS:
  5642.           
  5643.              acode, nnx, and num via pointers.
  5644.           
  5645.              NULL if error, else the non zero value returned from 
  5646.              wn_input.
  5647.                
  5648.              "wns_escape" is set to TRUE if the ESCape key caused 
  5649.              wn_input to terminate.  Set to FALSE otherwise.
  5650.  
  5651.         CAUTIONS and ADDITIONAL NOTES:
  5652.           
  5653.              fun - fun can only be SET for form setup, or XEQ for 
  5654.                    immediate execution.  When called with SET, valid 
  5655.                    arguments for both "frm" and "fld" must be specified.  
  5656.                    frm is the field pointer returned from wn_frmopn(), and 
  5657.                    fld is the field sequence number in the form for this 
  5658.                    field.  When called with XEQ frm must be NFRM and fld 
  5659.                    must be NFLD.
  5660.           
  5661.  
  5662.  
  5663.  
  5664.  
  5665.  
  5666.  
  5667.  
  5668.  
  5669.  
  5670.  
  5671.  
  5672.  
  5673.                                    93
  5674.  
  5675.  
  5676.  
  5677.         wn_gphone - continued.  
  5678.  
  5679.  
  5680.  
  5681.              ubuff - Editing buffer.  Must be of sufficient size to hold 
  5682.                    the data as it is entered.  Minimum size is 18 bytes.
  5683.           
  5684.                    On entry, the first byte of ubuff should be a null, 
  5685.                    otherwise wn_input assumes there is valid data there 
  5686.                    and will enter edit mode.  This can be handy if there 
  5687.                    is a need for prefilled, but editable fields.  In 
  5688.                    actual practice, wn_input uses this buffer for both 
  5689.                    initial character data entry and subsequent editing.
  5690.  
  5691.                    On return, ubuff contains the actual data entered in 
  5692.                    character format with fill and mask characters as 
  5693.                    spaces (e.g. 800 555 1212).
  5694.           
  5695.             No validation is performed.
  5696.           
  5697.             Leaving the field blank returns 0 for ACODE, NNX, and NUM.
  5698.           
  5699.             Calls wn_input to perform data entry.
  5700.  
  5701.             Refer to "SAMPLE.C" for example(s) of usage.
  5702.  
  5703.  
  5704.  
  5705.  
  5706.  
  5707.  
  5708.  
  5709.  
  5710.  
  5711.  
  5712.  
  5713.  
  5714.  
  5715.  
  5716.  
  5717.  
  5718.  
  5719.  
  5720.  
  5721.  
  5722.  
  5723.  
  5724.  
  5725.  
  5726.  
  5727.  
  5728.  
  5729.  
  5730.  
  5731.  
  5732.  
  5733.  
  5734.                                    94
  5735.  
  5736.  
  5737.  
  5738.         10.45. wn_gssn -- input social security number in window
  5739.  
  5740.         USAGE
  5741.  
  5742.           wn_gssn(fun,frm,fld,wn,row,col,prmpt,atrib,fill,n1,
  5743.                     n2,n3,ubuff,hlpmsg,errmsg)
  5744.           
  5745.              int        fun - function code (SET || XEQ)
  5746.              (WIFORM)   frm - form pointer  (actual || NFRM)
  5747.              int        fld - field # in form (actual || NFLD)
  5748.              (WINDOWPTR) wn - window pointer
  5749.              int        row - row in window where data input begins
  5750.              int        col - col in window where data input begins
  5751.              (char *) prmpt - field prompt (call with NSTR for none)
  5752.              unsigned atrib - field (not prompt) attributes 
  5753.              char      fill - field fill character
  5754.              (int *)     n1 - pointer to int for 1st part of ssn     
  5755.              (int *)     n2 - pointer to int for 2nd part of ssn
  5756.              (int *)     n3 - pointer to int for 3rd part of ssn  
  5757.              (char *) ubuff - pointer to char array of 13 bytes 
  5758.              (char *)hlpmsg - pointer to help message 
  5759.                               (call with NSTR for none)
  5760.              (char *)errmsg - pointer to err message 
  5761.                               (call with NSTR for none)
  5762.           
  5763.         RETURNS:
  5764.           
  5765.              Social security number in three parts: n1,n2,n3 via pointers.
  5766.           
  5767.              NULL if error, else the non zero value returned from 
  5768.              wn_input.
  5769.                
  5770.              "wns_escape" is set to TRUE if the ESCape key caused 
  5771.              wn_input to terminate.  Set to FALSE otherwise.
  5772.  
  5773.         CAUTIONS and ADDITIONAL NOTES:
  5774.           
  5775.              fun - fun can only be SET for form setup, or XEQ for 
  5776.                    immediate execution.  When called with SET, valid 
  5777.                    arguments for both "frm" and "fld" must be specified.  
  5778.                    frm is the field pointer returned from wn_frmopn(), and 
  5779.                    fld is the field sequence number in the form for this 
  5780.                    field.  When called with XEQ frm must be NFRM and fld 
  5781.                    must be NFLD.
  5782.           
  5783.  
  5784.  
  5785.  
  5786.  
  5787.  
  5788.  
  5789.  
  5790.  
  5791.  
  5792.  
  5793.  
  5794.  
  5795.                                    95
  5796.  
  5797.  
  5798.  
  5799.         wn_gssn - continued.  
  5800.  
  5801.                      
  5802.  
  5803.              ubuff - Editing buffer.  Must be of sufficient size to hold 
  5804.                    the data as it is entered.  Minimum size is 13 bytes.
  5805.           
  5806.                    On entry, the first byte of ubuff should be a null, 
  5807.                    otherwise wn_input assumes there is valid data there 
  5808.                    and will enter edit mode.  This can be handy if there 
  5809.                    is a need for prefilled, but editable fields.  In 
  5810.                    actual practice, wn_input uses this buffer for both 
  5811.                    initial character data entry and subsequent editing.
  5812.  
  5813.                    On return, ubuff contains the actual data entered in 
  5814.                    character format with fill and mask characters as 
  5815.                    spaces (e.g. 045 12 8971).
  5816.           
  5817.             No validation is performed.
  5818.           
  5819.             Leaving the field blank returns 0 for N1, N2, and N3
  5820.  
  5821.             Calls wn_input to perform data entry.
  5822.  
  5823.             Refer to "SAMPLE.C" for example(s) of usage.
  5824.  
  5825.  
  5826.  
  5827.  
  5828.  
  5829.  
  5830.  
  5831.  
  5832.  
  5833.  
  5834.  
  5835.  
  5836.  
  5837.  
  5838.  
  5839.  
  5840.  
  5841.  
  5842.  
  5843.  
  5844.  
  5845.  
  5846.  
  5847.  
  5848.  
  5849.  
  5850.  
  5851.  
  5852.  
  5853.  
  5854.  
  5855.  
  5856.                                    96
  5857.  
  5858.  
  5859.  
  5860.         10.46. wn_gtext -- input text in window
  5861.         10.47. wn_gutext -- input upper case text in window
  5862.         10.48. wn_gltext -- input lower case text in window
  5863.         10.49. wn_gatext -- input text & graphics characters  
  5864.  
  5865.         USAGE
  5866.  
  5867.           wn_gtext(fun,frm,fld,wn,row,col,prmpt,atrib,fill,fwidth,
  5868.                    ubuff,hlpmsg,errmsg)
  5869.           wn_gutext(..same as wn_gtext)
  5870.           wn_gltext(..same as wn_gtext)
  5871.           wn_gatext(..same as wn_gtext)
  5872.  
  5873.              int        fun - function code (SET || XEQ)
  5874.              (WIFORM)   frm - form pointer  (actual || NFRM)
  5875.              int        fld - field # in form (actual || NFLD)
  5876.              (WINDOWPTR) wn - window pointer
  5877.              int        row - row in window where data input begins
  5878.              int        col - col in window where data input begins
  5879.              (char *) prmpt - field prompt (call with NSTR for none)
  5880.              unsigned atrib - field (not prompt) attributes 
  5881.              char      fill - field fill character
  5882.              int     fwidth - width of mask (maximum # of digits is MAXSTR)
  5883.              (char *) ubuff - pointer to char array of fwidth+2 bytes 
  5884.              (char *)hlpmsg - pointer to help message 
  5885.                               (call with NSTR for none)
  5886.              (char *)errmsg - pointer to err message 
  5887.                               (call with NSTR for none)
  5888.           
  5889.         RETURNS:
  5890.           
  5891.              ubuff with text data via pointer.
  5892.           
  5893.              NULL if error, else the non zero value returned from 
  5894.              wn_input.
  5895.           
  5896.              "wns_escape" is set to TRUE if the ESCape key caused 
  5897.              wn_input to terminate.  Set to FALSE otherwise.
  5898.  
  5899.         CAUTIONS and ADDITIONAL NOTES:
  5900.  
  5901.              wn_gatext - wn_gatext allows graphics characters to be input.  It 
  5902.                    is otherwise identical to wn_gtext.
  5903.              
  5904.              fun - fun can only be SET for form setup, or XEQ for 
  5905.                    immediate execution.  When called with SET, valid 
  5906.                    arguments for both "frm" and "fld" must be specified.  
  5907.                    frm is the field pointer returned from wn_frmopn(), and 
  5908.                    fld is the field sequence number in the form for this 
  5909.                    field.  When called with XEQ frm must be NFRM and fld 
  5910.                    must be NFLD.
  5911.           
  5912.  
  5913.  
  5914.  
  5915.  
  5916.  
  5917.                                    97
  5918.  
  5919.  
  5920.  
  5921.         wn_gtext - continued.
  5922.  
  5923.  
  5924.  
  5925.              ubuff - Editing buffer.  Must be of sufficient size to hold 
  5926.                     the data as it is entered.  Minimum size is fwidth+2.
  5927.           
  5928.                     On entry, the first byte of ubuff should be a null, 
  5929.                     otherwise wn_input assumes there is valid data there 
  5930.                     and will enter edit mode.  This can be handy if there 
  5931.                     is a need for prefilled, but editable fields.  In 
  5932.                     actual practice, wn_input uses this buffer for both 
  5933.                     initial character data entry and subsequent editing.
  5934.  
  5935.                     On return, ubuff contains the actual data entered in 
  5936.                     character format with fill and mask characters as 
  5937.                     spaces (e.g. "This is a line of text ").
  5938.  
  5939.                     Case conversion is automatically performed when 
  5940.                     wn_gutext() or wn_gltext() are called.
  5941.           
  5942.             Calls wn_input to perform data entry.
  5943.           
  5944.             No validation is performed.
  5945.  
  5946.             Parameters are not range checked.  
  5947.  
  5948.             Refer to "SAMPLE.C" for example(s) of usage.
  5949.  
  5950.  
  5951.  
  5952.  
  5953.  
  5954.  
  5955.  
  5956.  
  5957.  
  5958.  
  5959.  
  5960.  
  5961.  
  5962.  
  5963.  
  5964.  
  5965.  
  5966.  
  5967.  
  5968.  
  5969.  
  5970.  
  5971.  
  5972.  
  5973.  
  5974.  
  5975.  
  5976.  
  5977.  
  5978.                                    98
  5979.  
  5980.  
  5981.  
  5982.         10.50. wn_gmltext -- input multi-line text in window
  5983.  
  5984.         USAGE
  5985.  
  5986.           wn_gmltext(fun,frm,fld,wn,row,col,prmpt,atrib,fill,fwidth,
  5987.                    nl,ubuff,hlpmsg,errmsg)
  5988.  
  5989.              int        fun - function code (SET || XEQ)
  5990.              (WIFORM)   frm - form pointer  (actual || NFRM)
  5991.              int        fld - field # in form (actual || NFLD)
  5992.              (WINDOWPTR) wn - window pointer
  5993.              int        row - row in window where data input begins
  5994.              int        col - col in window where data input begins
  5995.              (char *) prmpt - field prompt (call with NSTR for none)
  5996.              unsigned atrib - field (not prompt) attributes 
  5997.              char      fill - field fill character
  5998.              int     fwidth - width of mask (maximum # of digits is MAXSTR)
  5999.              int         nl - number of lines (height)
  6000.              (char **)ubuff - array of pointers to char arrays of fwidth+2 bytes 
  6001.              (char *)hlpmsg - pointer to help message 
  6002.                               (call with NSTR for none)
  6003.              (char *)errmsg - pointer to err message 
  6004.                               (call with NSTR for none)
  6005.           
  6006.         RETURNS:
  6007.           
  6008.              text in buffers pointed to by *ubuff[...].
  6009.           
  6010.              NULL if error, else the non zero value returned from 
  6011.              wn_input.
  6012.           
  6013.              "wns_escape" is set to TRUE if the ESCape key caused 
  6014.              wn_input to terminate.  Set to FALSE otherwise.
  6015.  
  6016.         CAUTIONS and ADDITIONAL NOTES:
  6017.  
  6018.              fun - fun can only be SET for form setup, or XEQ for 
  6019.                    immediate execution.  When called with SET, valid 
  6020.                    arguments for both "frm" and "fld" must be specified.  
  6021.                    frm is the field pointer returned from wn_frmopn(), and 
  6022.                    fld is the field sequence number in the form for this 
  6023.                    field.  When called with XEQ frm must be NFRM and fld 
  6024.                    must be NFLD.
  6025.           
  6026.  
  6027.  
  6028.  
  6029.  
  6030.  
  6031.  
  6032.  
  6033.  
  6034.  
  6035.  
  6036.  
  6037.  
  6038.  
  6039.                                    99
  6040.  
  6041.  
  6042.  
  6043.         wn_gmltext - continued.
  6044.  
  6045.  
  6046.  
  6047.              ubuff - THIS IS AN ARRAY OF POINTERS!! EACH ELEMENT OF UBUFF 
  6048.                     IS A POINTER TO AN ARRAY OF CHARACTERS THAT ARE USED 
  6049.                     AS THE LINE BUFFERS FOR EACH LINE OF THE MULTI-LINE 
  6050.                     TEXT FIELD.  Each line buffer must be of sufficient 
  6051.                     size to hold the data as it is entered.  Minimum size 
  6052.                     is fwidth+2.
  6053.           
  6054.                     On entry, the first byte of of all of the line 
  6055.                     buffers pointed to by ubuff[...] should be a null, 
  6056.                     otherwise wn_input assumes there is valid data there 
  6057.                     and will enter edit mode.  This can be handy if there 
  6058.                     is a need for prefilled, but editable fields.  In 
  6059.                     actual practice, wn_input uses these line buffers for 
  6060.                     both initial character data entry and subsequent 
  6061.                     editing.
  6062.  
  6063.                     On return, the line buffers contain the actual data 
  6064.                     entered in character format with fill and mask 
  6065.                     characters as spaces, eg: "This is a line of text ".
  6066.  
  6067.                     Editing keys are the same as wn_input with logical 
  6068.                     extensions for the UP and DOWN ARROW cursor keys.  
  6069.                     Normally both the UP and DOWN ARROW keys terminate 
  6070.                     input, they behave slightly differently here.  
  6071.                     Pressing the UP ARROW cursor key moves to the 
  6072.                     previous line homing the cursor if one exists or 
  6073.                     terminates input if a previous line does not exist.  
  6074.                     The DOWN ARROW cursor key behaves in a similar 
  6075.                     fashion for the next line.
  6076.  
  6077.             Calls wn_input to perform data entry.
  6078.           
  6079.             No validation is performed.
  6080.  
  6081.             No parameter checks are performed.  Pay particular attention 
  6082.             to the values passed for both fwidth and nl.
  6083.  
  6084.             Refer to "SAMPLE.C" for example(s) of usage.
  6085.  
  6086.  
  6087.  
  6088.  
  6089.  
  6090.  
  6091.  
  6092.  
  6093.  
  6094.  
  6095.  
  6096.  
  6097.  
  6098.  
  6099.  
  6100.                                    100
  6101.  
  6102.  
  6103.  
  6104.         10.51. wn_gpword -- input password in window
  6105.  
  6106.         USAGE
  6107.  
  6108.           wn_gpword(fun,frm,fld,wn,row,col,prmpt,atrib,fill,fwidth,
  6109.                    ubuff,hlpmsg,errmsg)
  6110.           
  6111.              int        fun - function code (SET || XEQ)
  6112.              (WIFORM)   frm - form pointer  (actual || NFRM)
  6113.              int        fld - field # in form (actual || NFLD)
  6114.              (WINDOWPTR) wn - window pointer
  6115.              int        row - row in window where data input begins
  6116.              int        col - col in window where data input begins
  6117.              (char *) prmpt - field prompt (call with NSTR for none)
  6118.              unsigned atrib - field (not prompt) attributes 
  6119.              char      fill - field fill character
  6120.              int     fwidth - width of mask (maximum # of digits is MAXSTR)
  6121.              (char *) ubuff - pointer to char array of fwidth+2 bytes 
  6122.              (char *)hlpmsg - pointer to help message 
  6123.                               (call with NSTR for none)
  6124.              (char *)errmsg - pointer to err message 
  6125.                               (call with NSTR for none)
  6126.           
  6127.         RETURNS:
  6128.           
  6129.              ubuff with text data via pointer.
  6130.           
  6131.              NULL if error, else the non zero value returned from 
  6132.              wn_input.
  6133.           
  6134.              "wns_escape" is set to TRUE if the ESCape key caused 
  6135.              wn_input to terminate.  Set to FALSE otherwise.
  6136.  
  6137.         CAUTIONS and ADDITIONAL NOTES:
  6138.           
  6139.              fun - fun can only be SET for form setup, or XEQ for 
  6140.                    immediate execution.  When called with SET, valid 
  6141.                    arguments for both "frm" and "fld" must be specified.  
  6142.                    frm is the field pointer returned from wn_frmopn(), and 
  6143.                    fld is the field sequence number in the form for this 
  6144.                    field.  When called with XEQ frm must be NFRM and fld 
  6145.                    must be NFLD.
  6146.           
  6147.              ubuff - Editing buffer.  Must be of sufficient size to hold 
  6148.                    the data as it is entered.  Minimum size is fwidth+2.
  6149.           
  6150.                    On entry, the first byte of ubuff should be a null. 
  6151.                    Since this function is for PASSWORD entry, editing is 
  6152.                    not available. The contents of the edit buffer on 
  6153.                    entry is ignored.
  6154.  
  6155.  
  6156.  
  6157.  
  6158.  
  6159.  
  6160.  
  6161.                                    101
  6162.  
  6163.  
  6164.  
  6165.         wn_gpword - continued.
  6166.  
  6167.  
  6168.  
  6169.                     On return, ubuff contains the actual data entered in 
  6170.                     character format with fill and mask characters as 
  6171.                     spaces (e.g. "This is a line of text ").
  6172.           
  6173.             Calls wn_input to perform data entry.
  6174.           
  6175.             No validation is performed. 
  6176.  
  6177.  
  6178.  
  6179.  
  6180.  
  6181.  
  6182.  
  6183.  
  6184.  
  6185.  
  6186.  
  6187.  
  6188.  
  6189.  
  6190.  
  6191.  
  6192.  
  6193.  
  6194.  
  6195.  
  6196.  
  6197.  
  6198.  
  6199.  
  6200.  
  6201.  
  6202.  
  6203.  
  6204.  
  6205.  
  6206.  
  6207.  
  6208.  
  6209.  
  6210.  
  6211.  
  6212.  
  6213.  
  6214.  
  6215.  
  6216.  
  6217.  
  6218.  
  6219.  
  6220.  
  6221.  
  6222.                                    102
  6223.  
  6224.  
  6225.  
  6226.         10.52. wn_gint -- input integer in window
  6227.  
  6228.         USAGE
  6229.  
  6230.            wn_gint(fun,frm,fld,wn,row,col,prmpt,atrib,fill,value,
  6231.                    fwidth,low,high,ubuff,hlpmsg,errmsg)
  6232.           
  6233.               int        fun - function code (SET || XEQ)
  6234.               (WIFORM)   frm - form pointer  (actual || NFRM)
  6235.               int        fld - field # in form (actual || NFLD)
  6236.               (WINDOWPTR) wn - window pointer
  6237.               int        row - row in window where data input begins
  6238.               int        col - col in window where data input begins
  6239.               (char *) prmpt - field prompt (call with NSTR for none)
  6240.               unsigned atrib - field (not prompt) attributes 
  6241.               char      fill - field fill character
  6242.               (int *)  value - pointer to int for return value (low-high)
  6243.               int     fwidth - width of mask 
  6244.                                (maximum # of digits is 6 with sign)
  6245.               int        low - minimum value (lower limit of value)
  6246.               int       high - maximum value (upper limit of value)
  6247.               (char *) ubuff - pointer to char array of 10 bytes 
  6248.               (char *)hlpmsg - pointer to help message 
  6249.                                (call with NSTR for none)
  6250.               (char *)errmsg - pointer to err message 
  6251.                                (call with NSTR for none)
  6252.           
  6253.         RETURNS:
  6254.           
  6255.               value via pointer.
  6256.           
  6257.               NULL if error, else the non zero value returned from 
  6258.               wn_input.
  6259.           
  6260.               "wns_escape" is set to TRUE if the ESCape key caused 
  6261.               wn_input to terminate.  Set to FALSE otherwise.
  6262.  
  6263.         CAUTIONS and ADDITIONAL NOTES:
  6264.           
  6265.             fun -  fun can only be SET for form setup, or XEQ for 
  6266.                    immediate execution.  When called with SET, valid 
  6267.                    arguments for both "frm" and "fld" must be specified.  
  6268.                    frm is the field pointer returned from wn_frmopn(), and 
  6269.                    fld is the field sequence number in the form for this 
  6270.                    field.  When called with XEQ frm must be NFRM and fld 
  6271.                    must be NFLD.
  6272.           
  6273.  
  6274.  
  6275.  
  6276.  
  6277.  
  6278.  
  6279.  
  6280.  
  6281.  
  6282.  
  6283.                                    103
  6284.  
  6285.  
  6286.  
  6287.         wn_gint - continued.  
  6288.  
  6289.  
  6290.  
  6291.             ubuff - Editing buffer.  Must be of sufficient size to hold 
  6292.                     the data as it is entered.  Minimum size is 10 bytes.
  6293.           
  6294.                     On entry, the first byte of ubuff should be a null, 
  6295.                     otherwise wn_input assumes there is valid data there 
  6296.                     and will enter edit mode.  This can be handy if there 
  6297.                     is a need for prefilled, but editable fields.  In 
  6298.                     actual practice, wn_input uses this buffer for both 
  6299.                     initial character data entry and subsequent editing.
  6300.  
  6301.                     On return, ubuff contains the actual data entered in 
  6302.                     character format with fill and mask characters as 
  6303.                     spaces.
  6304.           
  6305.             Calls wn_input to perform data entry.
  6306.           
  6307.             Data must satisfy validation checks for function to return.
  6308.           
  6309.             Calls wn_iemsg(errmsg) when validation fails.
  6310.  
  6311.             Refer to "SAMPLE.C" for example(s) of usage.
  6312.  
  6313.  
  6314.  
  6315.  
  6316.  
  6317.  
  6318.  
  6319.  
  6320.  
  6321.  
  6322.  
  6323.  
  6324.  
  6325.  
  6326.  
  6327.  
  6328.  
  6329.  
  6330.  
  6331.  
  6332.  
  6333.  
  6334.  
  6335.  
  6336.  
  6337.  
  6338.  
  6339.  
  6340.  
  6341.  
  6342.  
  6343.  
  6344.                                    104
  6345.  
  6346.  
  6347.  
  6348.         10.53. wn_guint - input unsigned integer in window
  6349.  
  6350.         USAGE
  6351.  
  6352.            wn_guint(fun,frm,fld,wn,row,col,prmpt,atrib,fill,v,
  6353.                     fwidth,low,high,ubuff,hlpmsg,errmsg)
  6354.           
  6355.               int        fun - function code (SET || XEQ)
  6356.               (WIFORM)   frm - form pointer  (actual || NFRM)
  6357.               int        fld - field # in form (actual || NFLD)
  6358.               (WINDOWPTR)wn  - window pointer
  6359.               int        row - row in window where data input begins
  6360.               int        col - col in window where data input begins
  6361.               (char *) prmpt - field prompt (call with NSTR for none)
  6362.               unsigned atrib - field (not prompt) attributes 
  6363.               char      fill - field fill character
  6364.               (unsigned *) v - pointer to int for return value (low-high)
  6365.               int     fwidth - width of mask 
  6366.                                (maximum # of digits is 6 with sign)
  6367.               unsigned   low - minimum value (lower limit of value)
  6368.               unsigned  high - maximum value (upper limit of value)
  6369.               (char *) ubuff - pointer to char array of 10 bytes 
  6370.               (char *)hlpmsg - pointer to help message 
  6371.                                (call with NSTR for none)
  6372.               (char *)errmsg - pointer to err message 
  6373.                                (call with NSTR for none)
  6374.           
  6375.         RETURNS:
  6376.           
  6377.               v via pointer.
  6378.           
  6379.               NULL if error, else the non zero value returned from 
  6380.               wn_input.
  6381.           
  6382.               "wns_escape" is set to TRUE if the ESCape key caused 
  6383.               wn_input to terminate.  Set to FALSE otherwise.
  6384.  
  6385.         CAUTIONS and ADDITIONAL NOTES:
  6386.           
  6387.             fun -  fun can only be SET for form setup, or XEQ for 
  6388.                    immediate execution.  When called with SET, valid 
  6389.                    arguments for both "frm" and "fld" must be specified.  
  6390.                    frm is the field pointer returned from wn_frmopn(), and 
  6391.                    fld is the field sequence number in the form for this 
  6392.                    field.  When called with XEQ frm must be NFRM and fld 
  6393.                    must be NFLD.
  6394.           
  6395.  
  6396.  
  6397.  
  6398.  
  6399.  
  6400.  
  6401.  
  6402.  
  6403.  
  6404.  
  6405.                                    105
  6406.  
  6407.  
  6408.  
  6409.         wn_guint - continued.
  6410.  
  6411.  
  6412.  
  6413.             ubuff - Editing buffer.  Must be of sufficient size to hold 
  6414.                    the data as it is entered.  Minimum size is 10 bytes.
  6415.  
  6416.                    On entry, the first byte of ubuff should be a null, 
  6417.                    otherwise wn_input assumes there is valid data there 
  6418.                    and will enter edit mode.  This can be handy if there 
  6419.                    is a need for prefilled, but editable fields.  In 
  6420.                    actual practice, wn_input uses this buffer for both 
  6421.                    initial character data entry and subsequent editing.
  6422.  
  6423.                    On return, ubuff contains the actual data entered in 
  6424.                    character format with fill and mask characters as 
  6425.                    spaces (e.g. "-24000").
  6426.           
  6427.             Calls wn_input to perform data entry.
  6428.           
  6429.             Data must satisfy validation checks for function to return.
  6430.           
  6431.             Calls wn_iemsg(errmsg) when validation fails.
  6432.  
  6433.             Refer to "SAMPLE.C" for example(s) of usage.
  6434.  
  6435.  
  6436.  
  6437.  
  6438.  
  6439.  
  6440.  
  6441.  
  6442.  
  6443.  
  6444.  
  6445.  
  6446.  
  6447.  
  6448.  
  6449.  
  6450.  
  6451.  
  6452.  
  6453.  
  6454.  
  6455.  
  6456.  
  6457.  
  6458.  
  6459.  
  6460.  
  6461.  
  6462.  
  6463.  
  6464.  
  6465.  
  6466.                                    106
  6467.  
  6468.  
  6469.  
  6470.         10.54. wn_glong -- input long integer in window
  6471.  
  6472.         USAGE
  6473.  
  6474.            wn_glong(fun,frm,fld,wn,row,col,prmpt,atrib,fill,value,
  6475.                     fwidth,low,high,ubuff,hlpmsg,errmsg)
  6476.           
  6477.               int        fun - function code (SET || XEQ)
  6478.               (WIFORM)   frm - form pointer  (actual || NFRM)
  6479.               int        fld - field # in form (actual || NFLD)
  6480.               (WINDOWPTR) wn - window pointer
  6481.               int        row - row in window where data input begins
  6482.               int        col - col in window where data input begins
  6483.               (char *) prmpt - field prompt (call with NSTR for none)
  6484.               unsigned atrib - field (not prompt) attributes 
  6485.               char      fill - field fill character
  6486.               (long*)  value - pointer to long for return value (low-high)
  6487.               int     fwidth - width of mask 
  6488.                                (maximum # of digits is 10 with sign)
  6489.               long       low - minimum value (lower limit of value)
  6490.               long      high - maximum value (upper limit of value)
  6491.               (char *) ubuff - pointer to char array of fwidth+2 bytes 
  6492.               (char *)hlpmsg - pointer to help message 
  6493.                                (call with NSTR for none)
  6494.               (char *)errmsg - pointer to err message 
  6495.                                (call with NSTR for none)
  6496.           
  6497.         RETURNS:
  6498.           
  6499.               v via pointer.
  6500.           
  6501.               NULL if error, else the non zero value returned from 
  6502.               wn_input.
  6503.           
  6504.               "wns_escape" is set to TRUE if the ESCape key caused 
  6505.               wn_input to terminate.  Set to FALSE otherwise.
  6506.  
  6507.         CAUTIONS and ADDITIONAL NOTES:
  6508.           
  6509.             fun -  fun can only be SET for form setup, or XEQ for 
  6510.                    immediate execution.  When called with SET, valid 
  6511.                    arguments for both "frm" and "fld" must be specified.  
  6512.                    frm is the field pointer returned from wn_frmopn(), and 
  6513.                    fld is the field sequence number in the form for this 
  6514.                    field.  When called with XEQ frm must be NFRM and fld 
  6515.                    must be NFLD.
  6516.           
  6517.  
  6518.  
  6519.  
  6520.  
  6521.  
  6522.  
  6523.  
  6524.  
  6525.  
  6526.  
  6527.                                    107
  6528.  
  6529.  
  6530.  
  6531.         wn_glong - continued.  
  6532.  
  6533.  
  6534.  
  6535.             ubuff - Editing buffer.  Must be of sufficient size to hold 
  6536.                    the data as it is entered.  Minimum size is fwidth+2.
  6537.           
  6538.                    On entry, the first byte of ubuff should be a null, 
  6539.                    otherwise wn_input assumes there is valid data there 
  6540.                    and will enter edit mode.  This can be handy if there 
  6541.                    is a need for prefilled, but editable fields.  In 
  6542.                    actual practice, wn_input uses this buffer for both 
  6543.                    initial character data entry and subsequent editing.
  6544.  
  6545.                    On return, ubuff contains the actual data entered in 
  6546.                    character format with fill and mask characters as 
  6547.                    spaces (e.g. "-24000").
  6548.           
  6549.             Calls wn_input to perform data entry.
  6550.           
  6551.             Data must satisfy validation checks for function to return.
  6552.           
  6553.             Calls wn_iemsg(errmsg) when validation fails.
  6554.  
  6555.             Refer to "SAMPLE.C" for example(s) of usage.
  6556.  
  6557.  
  6558.  
  6559.  
  6560.  
  6561.  
  6562.  
  6563.  
  6564.  
  6565.  
  6566.  
  6567.  
  6568.  
  6569.  
  6570.  
  6571.  
  6572.  
  6573.  
  6574.  
  6575.  
  6576.  
  6577.  
  6578.  
  6579.  
  6580.  
  6581.  
  6582.  
  6583.  
  6584.  
  6585.  
  6586.  
  6587.  
  6588.                                    108
  6589.  
  6590.  
  6591.  
  6592.         10.55. wn_gulong -- input unsigned long integer in window
  6593.  
  6594.         USAGE
  6595.  
  6596.            wn_gulong(fun,frm,fld,wn,row,col,prmpt,atrib,fill,value,
  6597.                     fwidth,low,high,ubuff,hlpmsg,errmsg)
  6598.           
  6599.               int        fun - function code (SET || XEQ)
  6600.               (WIFORM)   frm - form pointer  (actual || NFRM)
  6601.               int        fld - field # in form (actual || NFLD)
  6602.               (WINDOWPTR) wn - window pointer
  6603.               int        row - row in window where data input begins
  6604.               int        col - col in window where data input begins
  6605.               (char *) prmpt - field prompt (call with NSTR for none)
  6606.               unsigned atrib - field (not prompt) attributes 
  6607.               char      fill - field fill character
  6608.               (unsigned long*) value - 
  6609.                                pointer to long for return value (low-high)
  6610.               int     fwidth - width of mask 
  6611.                                (maximum # of digits is 10 with sign)
  6612.               unsigned long low -
  6613.                                minimum value (lower limit of value)
  6614.               unsigned long high -
  6615.                                maximum value (upper limit of value)
  6616.               (char *) ubuff - pointer to char array of fwidth+2 bytes 
  6617.               (char *)hlpmsg - pointer to help message 
  6618.                                (call with NSTR for none)
  6619.               (char *)errmsg - pointer to err message 
  6620.                                (call with NSTR for none)
  6621.           
  6622.         RETURNS:
  6623.           
  6624.               v via pointer.
  6625.           
  6626.               NULL if error, else the non zero value returned from 
  6627.               wn_input.
  6628.           
  6629.               "wns_escape" is set to TRUE if the ESCape key caused 
  6630.               wn_input to terminate.  Set to FALSE otherwise.
  6631.  
  6632.         CAUTIONS and ADDITIONAL NOTES:
  6633.           
  6634.             fun -  fun can only be SET for form setup, or XEQ for 
  6635.                    immediate execution.  When called with SET, valid 
  6636.                    arguments for both "frm" and "fld" must be specified.  
  6637.                    frm is the field pointer returned from wn_frmopn(), and 
  6638.                    fld is the field sequence number in the form for this 
  6639.                    field.  When called with XEQ frm must be NFRM and fld 
  6640.                    must be NFLD.
  6641.  
  6642.  
  6643.  
  6644.  
  6645.  
  6646.  
  6647.  
  6648.  
  6649.                                    109
  6650.  
  6651.  
  6652.  
  6653.         wn_gulong - continued.  
  6654.  
  6655.  
  6656.  
  6657.             ubuff - Editing buffer.  Must be of sufficient size to hold 
  6658.                    the data as it is entered.  Minimun size is fwidth+2.
  6659.           
  6660.                    On entry, the first byte of ubuff should be a null, 
  6661.                    otherwise wn_input assumes there is valid data there 
  6662.                    and will enter edit mode.  This can be handy if there 
  6663.                    is a need for prefilled, but editable fields.  In 
  6664.                    actual practice, wn_input uses this buffer for both 
  6665.                    initial character data entry and subsequent editing.
  6666.                    On return, ubuff contains the actual data entered in 
  6667.                    character format with fill and mask characters as 
  6668.                    spaces (e.g. "-24000").
  6669.           
  6670.             Calls wn_input to perform data entry.
  6671.           
  6672.             Data must satisfy validation checks for function to return.
  6673.           
  6674.             Calls wn_iemsg(errmsg) when validation fails.
  6675.  
  6676.  
  6677.  
  6678.  
  6679.  
  6680.  
  6681.  
  6682.  
  6683.  
  6684.  
  6685.  
  6686.  
  6687.  
  6688.  
  6689.  
  6690.  
  6691.  
  6692.  
  6693.  
  6694.  
  6695.  
  6696.  
  6697.  
  6698.  
  6699.  
  6700.  
  6701.  
  6702.  
  6703.  
  6704.  
  6705.  
  6706.  
  6707.  
  6708.  
  6709.  
  6710.                                    110
  6711.  
  6712.  
  6713.  
  6714.         10.56. wn_gfloat -- input float in window
  6715.  
  6716.         USAGE
  6717.  
  6718.            wn_gfloat(fun,frm,fld,wn,row,col,prmpt,atrib,fill,v,
  6719.                      fwidth,ndec,low,high,ubuff,hlpmsg,errmsg)
  6720.           
  6721.               int        fun - function code (SET || XEQ)
  6722.               (WIFORM)   frm - form pointer  (actual || NFRM)
  6723.               int        fld - field # in form (actual || NFLD)
  6724.               (WINDOWPTR) wn - window pointer
  6725.               int        row - row in window where data input begins
  6726.               int        col - col in window where data input begins
  6727.               (char *) prmpt - field prompt (call with NSTR for none)
  6728.               unsigned atrib - field (not prompt) attributes 
  6729.               char      fill - field fill character
  6730.               (float  *)   v - pointer to float for return value
  6731.               int     fwidth - width of mask 
  6732.                                (maximum # of digits is 20 with sign)
  6733.               int       ndec - # of decimal places 
  6734.               float      low - minimum value (lower limit of value)
  6735.               float     high - maximum value (upper limit of value)
  6736.               (char *) ubuff - pointer to char array of fwidth+2 bytes 
  6737.               (char *)hlpmsg - pointer to help message 
  6738.                                (call with NSTR for none)
  6739.               (char *)errmsg - pointer to err message 
  6740.                                (call with NSTR for none)
  6741.           
  6742.         RETURNS:
  6743.           
  6744.               v via pointer.
  6745.           
  6746.               NULL if error, else the non zero value returned from 
  6747.               wn_input.
  6748.           
  6749.               "wns_escape" is set to TRUE if the ESCape key caused 
  6750.               wn_input to terminate.  Set to FALSE otherwise.
  6751.  
  6752.         CAUTIONS and ADDITIONAL NOTES:
  6753.           
  6754.             fun -  fun can only be SET for form setup, or XEQ for 
  6755.                    immediate execution.  When called with SET, valid 
  6756.                    arguments for both "frm" and "fld" must be specified.  
  6757.                    frm is the field pointer returned from wn_frmopn(), and 
  6758.                    fld is the field sequence number in the form for this 
  6759.                    field.  When called with XEQ frm must be NFRM and fld 
  6760.                    must be NFLD.
  6761.           
  6762.             ubuff - Editing buffer.  Must be of sufficient size to hold 
  6763.                    the data as it is entered.  Minimum size is fwidth+2. 
  6764.           
  6765.  
  6766.  
  6767.  
  6768.  
  6769.  
  6770.  
  6771.                                    111
  6772.  
  6773.  
  6774.  
  6775.         wn_gfloat - continued.
  6776.  
  6777.  
  6778.                     
  6779.                    On entry, the first byte of ubuff should be a null, 
  6780.                    otherwise wn_input assumes there is valid data there 
  6781.                    and will enter edit mode.  This can be handy if there 
  6782.                    is a need for prefilled, but editable fields.  In 
  6783.                    actual practice, wn_input uses this buffer for both 
  6784.                    initial character data entry and subsequent editing.
  6785.  
  6786.                    On return, ubuff contains the actual data entered in 
  6787.                    character format with fill and mask characters as 
  6788.                    spaces (e.g. "   -1240.20").
  6789.           
  6790.             Calls wn_input to perform data entry.
  6791.           
  6792.             Data must satisfy validation checks for function to return.
  6793.           
  6794.             Calls wn_iemsg(errmsg) when validation fails.
  6795.  
  6796.             Refer to "SAMPLE.C" for example(s) of usage.
  6797.  
  6798.             WN_GFLOAT.C is provided in source form.
  6799.  
  6800.  
  6801.  
  6802.  
  6803.  
  6804.  
  6805.  
  6806.  
  6807.  
  6808.  
  6809.  
  6810.  
  6811.  
  6812.  
  6813.  
  6814.  
  6815.  
  6816.  
  6817.  
  6818.  
  6819.  
  6820.  
  6821.  
  6822.  
  6823.  
  6824.  
  6825.  
  6826.  
  6827.  
  6828.  
  6829.  
  6830.  
  6831.  
  6832.                                    112
  6833.  
  6834.  
  6835.  
  6836.         10.57. wn_gdouble -- input double in window
  6837.  
  6838.         USAGE
  6839.  
  6840.            wn_gdouble(fun,frm,fld,wn,row,col,prmpt,atrib,fill,v,
  6841.                      fwidth,ndec,low,high,ubuff,hlpmsg,errmsg)
  6842.           
  6843.               int        fun - function code (SET || XEQ)
  6844.               (WIFORM)   frm - form pointer  (actual || NFRM)
  6845.               int        fld - field # in form (actual || NFLD)
  6846.               (WINDOWPTR) wn - window pointer
  6847.               int        row - row in window where data input begins
  6848.               int        col - col in window where data input begins
  6849.               (char *) prmpt - field prompt (call with NSTR for none)
  6850.               unsigned atrib - field (not prompt) attributes 
  6851.               char      fill - field fill character
  6852.               (double *)   v - pointer to float for return value
  6853.               int     fwidth - width of mask 
  6854.                                (maximum # of digits is 20 with sign)
  6855.               int       ndec - # of decimal places 
  6856.               double     low - minimum value (lower limit of value)
  6857.               double    high - maximum value (upper limit of value)
  6858.               (char *) ubuff - pointer to char array of fwidth+2 bytes 
  6859.               (char *)hlpmsg - pointer to help message 
  6860.                                (call with NSTR for none)
  6861.               (char *)errmsg - pointer to err message 
  6862.                                (call with NSTR for none)
  6863.           
  6864.         RETURNS:
  6865.           
  6866.               v via pointer.
  6867.           
  6868.               NULL if error, else the non zero value returned from 
  6869.               wn_input.
  6870.           
  6871.               "wns_escape" is set to TRUE if the ESCape key caused  
  6872.               wn_input to terminate.  Set to FALSE otherwise.
  6873.  
  6874.         CAUTIONS AND ADDITIONAL NOTES:
  6875.                       
  6876.               fun - fun can only be SET for form setup, or XEQ for 
  6877.                    immediate execution.  When called with SET, valid 
  6878.                    arguments for both "frm" and "fld" must be specified.  
  6879.                    frm is the field pointer returned from wn_frmopn(), 
  6880.                    and fld is the field sequence number in the form for 
  6881.                    this field.  When called with XEQ frm must be NFRM and 
  6882.                    fld must be NFLD.
  6883.                       
  6884.               ubuff - Editing buffer.  Must be of sufficient size to hold 
  6885.                    the data as it is entered.  Minimum size is fwidth+2. 
  6886.                       
  6887.  
  6888.  
  6889.  
  6890.  
  6891.  
  6892.  
  6893.                                    113
  6894.  
  6895.  
  6896.  
  6897.                     wn_gdouble - continued.
  6898.  
  6899.  
  6900.                       
  6901.                    On entry, the first byte of ubuff should be a null, 
  6902.                    otherwise wn_input assumes there is valid data there 
  6903.                    and will enter edit mode.  This can be handy if there 
  6904.                    is a need for prefilled, but editable fields.  In 
  6905.                    actual practice, wn_input uses this buffer for both 
  6906.                    initial character data entry and subsequent editing.
  6907.  
  6908.                    On return, ubuff contains the actual data entered in 
  6909.                    character format with fill and mask characters as 
  6910.                    spaces (e.g. "   -1240.20").
  6911.                       
  6912.                         Calls wn_input to perform data entry.
  6913.                       
  6914.                    Data must satisfy validation checks for function to 
  6915.                    return.
  6916.                       
  6917.                    Calls wn_iemsg(errmsg) when validation fails.
  6918.  
  6919.  
  6920.  
  6921.  
  6922.  
  6923.  
  6924.  
  6925.  
  6926.  
  6927.  
  6928.  
  6929.  
  6930.  
  6931.  
  6932.  
  6933.  
  6934.  
  6935.  
  6936.  
  6937.  
  6938.  
  6939.  
  6940.  
  6941.  
  6942.  
  6943.  
  6944.  
  6945.  
  6946.  
  6947.  
  6948.  
  6949.  
  6950.  
  6951.  
  6952.  
  6953.  
  6954.                                    114
  6955.  
  6956.  
  6957.  
  6958.         10.58. wn_gbool -- input logical in window
  6959.  
  6960.         USAGE
  6961.  
  6962.           wn_gbool(fun,frm,fld,wn,row,col,prmpt,atrib,fill,value,
  6963.                    ubuff,hlpmsg,errmsg)
  6964.                       
  6965.               int        fun - function code (SET || XEQ)
  6966.               (WIFORM)   frm - form pointer  (actual || NFRM)
  6967.               int        fld - field # in form (actual || NFLD)
  6968.               (WINDOWPTR) wn - window pointer
  6969.               int        row - row in window where data input begins
  6970.               int        col - col in window where data input begins
  6971.               (char *) prmpt - field prompt (call with NSTR for none)
  6972.               unsigned atrib - field (not prompt) attributes 
  6973.               char      fill - field fill character
  6974.               (int *)  value - pointer to int for value (0=FALSE, 1=TRUE)
  6975.               (char *) ubuff - pointer to char array of 3 bytes 
  6976.               (char *)hlpmsg - pointer to help message 
  6977.                                (call with NSTR for none)
  6978.               (char *)errmsg - pointer to err message 
  6979.                                (call with NSTR for none)
  6980.           
  6981.         RETURNS:
  6982.           
  6983.               value via pointer (0=FALSE, 1=TRUE)
  6984.           
  6985.               NULL if error, else the non zero value returned from 
  6986.               wn_input.
  6987.           
  6988.               "wns_escape" is set to TRUE if the ESCape key caused 
  6989.               wn_input to terminate.  Set to FALSE otherwise.
  6990.  
  6991.         CAUTIONS and ADDITIONAL NOTES:
  6992.           
  6993.             fun -  fun can only be SET for form setup, or XEQ for 
  6994.                    immediate execution.  When called with SET, valid 
  6995.                    arguments for both "frm" and "fld" must be specified.  
  6996.                    frm is the field pointer returned from wn_frmopn(), and 
  6997.                    fld is the field sequence number in the form for this 
  6998.                    field.  When called with XEQ frm must be NFRM and fld 
  6999.                    must be NFLD.
  7000.           
  7001.             ubuff - Editing buffer.  Must be of sufficient size to hold 
  7002.                    the data as it is entered.  Minimum size is 3 bytes.f
  7003.           
  7004.                    On entry, the first byte of ubuff should be a null, 
  7005.                    otherwise wn_input assumes there is valid data there 
  7006.                    and will enter edit mode.  This can be handy if there 
  7007.                    is a need for prefilled, but editable fields.  In 
  7008.                    actual practice, wn_input uses this buffer for both 
  7009.                    initial character data entry and subsequent editing.
  7010.  
  7011.  
  7012.  
  7013.  
  7014.  
  7015.                                    115
  7016.  
  7017.  
  7018.  
  7019.         wn_gbool - continued.
  7020.  
  7021.  
  7022.  
  7023.                    On return, ubuff contains the actual data entered in 
  7024.                    character format with fill and mask characters as 
  7025.                    spaces (e.g. "T").
  7026.           
  7027.             Calls wn_input to perform data entry.
  7028.           
  7029.             User MUST enter T,F,Y, or N.
  7030.           
  7031.             Data must satisfy validation checks for function to return.
  7032.           
  7033.             Calls wn_iemsg(errmsg) when validation fails.
  7034.           
  7035.             Refer to "SAMPLE.C" for example(s) of usage.
  7036.  
  7037.  
  7038.  
  7039.  
  7040.  
  7041.  
  7042.  
  7043.  
  7044.  
  7045.  
  7046.  
  7047.  
  7048.  
  7049.  
  7050.  
  7051.  
  7052.  
  7053.  
  7054.  
  7055.  
  7056.  
  7057.  
  7058.  
  7059.  
  7060.  
  7061.  
  7062.  
  7063.  
  7064.  
  7065.  
  7066.  
  7067.  
  7068.  
  7069.  
  7070.  
  7071.  
  7072.  
  7073.  
  7074.  
  7075.  
  7076.                                    116
  7077.  
  7078.  
  7079.  
  7080.         10.59. wn_dtext -- display text on input form
  7081.  
  7082.         USAGE
  7083.  
  7084.            wn_dtext(fun,frm,fld,wn,row,col,prmpt)
  7085.           
  7086.               int        fun - function code (SET || XEQ)
  7087.               (WIFORM)   frm - form pointer  (actual || NFRM)
  7088.               int        fld - field # in form (actual || NFLD)
  7089.               (WINDOWPTR) wn - window pointer
  7090.               int        row - row in window where data input begins
  7091.               int        col - col in window where data input begins
  7092.               (char *) prmpt - field prompt (call with NSTR for none)
  7093.           
  7094.         RETURNS:
  7095.           
  7096.               TRUE if fun==SET 
  7097.           
  7098.                or
  7099.           
  7100.               Normal return value of wn_puts if fun==XEQ
  7101.           
  7102.         CAUTIONS and ADDITIONAL NOTES:
  7103.           
  7104.             fun -  fun can only be SET for form setup, or XEQ for 
  7105.                    immediate execution.  When called with SET, valid 
  7106.                    arguments for both "frm" and "fld" must be specified.  
  7107.                    frm is the field pointer returned from wn_frmopn(), and 
  7108.                    fld is the field sequence number in the form for this 
  7109.                    field.  When called with XEQ frm must be NFRM and fld 
  7110.                    must be NFLD.
  7111.  
  7112.             Refer to "SAMPLE.C" for example(s) of usage.
  7113.  
  7114.  
  7115.  
  7116.  
  7117.  
  7118.  
  7119.  
  7120.  
  7121.  
  7122.  
  7123.  
  7124.  
  7125.  
  7126.  
  7127.  
  7128.  
  7129.  
  7130.  
  7131.  
  7132.  
  7133.  
  7134.  
  7135.  
  7136.  
  7137.                                    117
  7138.  
  7139.  
  7140.  
  7141.         10.60. wn_iemsg -- display input error message
  7142.  
  7143.         USAGE
  7144.  
  7145.            wn_iemsg(msg)
  7146.           
  7147.               (char *)   msg - pointer to message to be displayed.
  7148.           
  7149.         RETURNS:
  7150.           
  7151.               NULL if error, else TRUE
  7152.           
  7153.         CAUTIONS and ADDITIONAL NOTES:
  7154.           
  7155.             This routine should be modified or replaced with code to suit 
  7156.             your application's specific needs.  It hooks to wn_g???? 
  7157.             such that whenever the field validation fails wn_g???? calls 
  7158.             wn_iemsg to display an error message for the field in 
  7159.             question.  The hooks in wn_g????? are of the form:
  7160.           
  7161.                 if(validation failed) wn_iemsg(msg);
  7162.           
  7163.             This routine displays a single line of text on the 25th line 
  7164.             and waits for a key to be struck before returning to accept 
  7165.             new data for the field in question.
  7166.           
  7167.             The error message can be a maximum of 80 characters, and must 
  7168.             not contain any formatting directives (\n\t...).
  7169.           
  7170.             Some wn_g???? functions (i.e. wn_gtext) have no provision to 
  7171.             validate data and therefore never attempt to call this 
  7172.             routine.
  7173.  
  7174.             WN_IEMSG.C is provided in source form.
  7175.  
  7176.  
  7177.  
  7178.  
  7179.  
  7180.  
  7181.  
  7182.  
  7183.  
  7184.  
  7185.  
  7186.  
  7187.  
  7188.  
  7189.  
  7190.  
  7191.  
  7192.  
  7193.  
  7194.  
  7195.  
  7196.  
  7197.  
  7198.                                    118
  7199.  
  7200.  
  7201.  
  7202.         10.61. wn_ihmsg -- display input help message
  7203.           
  7204.         USAGE
  7205.           
  7206.            wn_ihmsg(msg)
  7207.           
  7208.               (char *)   msg - pointer to message to be displayed.
  7209.           
  7210.         RETURNS:
  7211.           
  7212.             NULL if error, else TRUE
  7213.           
  7214.         CAUTIONS and ADDITIONAL NOTES:
  7215.           
  7216.             This routine should be modified or replaced with code to suit 
  7217.             your application's specific needs.  It hooks to wn_input 
  7218.             such that whenever the HELP key is pressed wn_input calls 
  7219.             wn_ihmsg to display a help message for the field in question.  
  7220.             The hooks in wn_input are of the form:
  7221.           
  7222.                 if(key_struck == HELP) wn_ihmsg(msg);
  7223.           
  7224.             The F1 key is the default HELP key.  This can be changed by 
  7225.             calling the wns_shkey() function.
  7226.  
  7227.             This routine displays a single line of help on the 25th line 
  7228.             and waits for a key to be struck before returning.
  7229.           
  7230.             The help message can be a maximum of 80 characters, and must 
  7231.             not contain any formatting directives (\n\t...).
  7232.  
  7233.             WN_IHMSG is provided in source form.
  7234.  
  7235.  
  7236.         10.62. wn_shkey -- set HELP key code
  7237.  
  7238.         USAGE
  7239.  
  7240.             wn_shkey(code)
  7241.             unsigned int code;
  7242.  
  7243.               code - scancode of the key to be defined as the HELP key.
  7244.  
  7245.             F1 is the default HELP key.  The scancode for F1 is 0x3B00.              
  7246.  
  7247.         RETURNS
  7248.  
  7249.              Nothing.
  7250.  
  7251.         CAUTIONS and ADDITIONAL NOTES:
  7252.  
  7253.              SCANCODE.C can be used to determine the scancodes for any 
  7254.              and all keys.
  7255.  
  7256.  
  7257.  
  7258.  
  7259.                                    119
  7260.  
  7261.  
  7262.  
  7263.         10.63. wn_popup -- display and act on popup menu
  7264.  
  7265.         USAGE
  7266.  
  7267.           wn_popup(page,row,col,width,height,atrib,batrib,mx,cflag)
  7268.           int page, row, col, width, height, cflag;
  7269.           unsigned int atrib, batrib;
  7270.           struct pmenu *mx;
  7271.  
  7272.              page -    video page (Always 0)
  7273.              row  -    row of origin 
  7274.              col  -    col of origin 
  7275.              width -   width (inside dimension)
  7276.              height -  height (inside dimension)
  7277.              atrib -   window attribute
  7278.              batrib -  border attribute
  7279.              mx -      pointer to menu structure
  7280.              cflag -   close on return flag (FALSE to leave open)
  7281.  
  7282.           The pmenu structure is defined in "winboss.h" (replicated here 
  7283.           for clarity) and must be initialized prior to calling wn_popup.
  7284.  
  7285.           struct mitem {              /* POPUP menu item template */
  7286.             int r;                    /* row */
  7287.             int c;                    /* col */
  7288.             char *t;                  /* text */
  7289.             int rv;                   /* return value */
  7290.           };
  7291.  
  7292.           struct pmenu {              /* POPUP menu structure */
  7293.             WINDOWPTR wpsave;         /* place to hold window id */
  7294.             int winopn;               /* leave window open flag */
  7295.             int lndx;                 /* last index */
  7296.             int fm;                   /* first menu item index */
  7297.             int lm;                   /* last menu item index */
  7298.             struct mitem scrn[WN_MXROWS*4]; /* a bunch of menu items */
  7299.           };                          /* NOTE RELATIVE LIMIT */
  7300.  
  7301.         RETURNS:
  7302.  
  7303.           The return code for the menu item selected or 99 if ESCape is 
  7304.           pressed.
  7305.  
  7306.         CAUTIONS and ADDITIONAL NOTES:
  7307.  
  7308.           None.
  7309.  
  7310.         SEE ALSO
  7311.  
  7312.           Popup menu basics.
  7313.  
  7314.  
  7315.  
  7316.  
  7317.  
  7318.  
  7319.  
  7320.                                    120
  7321.  
  7322.  
  7323.  
  7324.         10.64. wn_qpopup -- display quick popup window
  7325.  
  7326.         USAGE
  7327.  
  7328.           WINDOPTR wn_qpopup(page,row,col,width,height,atrib,batrib,mx)
  7329.           int page, row, col, width, height, cflag;
  7330.           unsigned int atrib, batrib;
  7331.           struct pmenu *mx;
  7332.  
  7333.              page -    video page (Always 0)
  7334.              row  -    row of origin (0 to WN_MAXROWS)
  7335.              col  -    col of origin (0 to WN_MAXCOLS)
  7336.              width -   width (inside dimension)
  7337.              height -  height (inside dimension)
  7338.              atrib -   window attribute
  7339.              batrib -  border attribute
  7340.              mx -      pointer to menu structure
  7341.  
  7342.           The pmenu structure is defined in "winboss.h" (replicated here 
  7343.           for clarity) and must be initialized prior to calling wn_popup.
  7344.  
  7345.           struct mitem {              /* POPUP menu item template */
  7346.             int r;                    /* row */
  7347.             int c;                    /* col */
  7348.             char *t;                  /* text */
  7349.             int rv;                   /* return value */
  7350.           };
  7351.  
  7352.           struct pmenu {              /* POPUP menu structure */
  7353.             WINDOWPTR wpsave;         /* place to hold window id */
  7354.             int winopn;               /* leave window open flag */
  7355.             int lndx;                 /* last index */
  7356.             int fm;                   /* first menu item index */
  7357.             int lm;                   /* last menu item index */
  7358.             struct mitem scrn[WN_MXROWS*4]; /* a bunch of menu items */
  7359.           };                          /* NOTE RELATIVE LIMIT */
  7360.  
  7361.         RETURNS:
  7362.  
  7363.           A WINDOWPTR to the popup window that has been displayed.
  7364.  
  7365.         CAUTIONS and ADDITIONAL NOTES:
  7366.  
  7367.           None.
  7368.  
  7369.         SEE ALSO
  7370.  
  7371.           Popup menu basics.
  7372.  
  7373.  
  7374.  
  7375.  
  7376.  
  7377.  
  7378.  
  7379.  
  7380.  
  7381.                                    121
  7382.  
  7383.  
  7384.  
  7385.         10.65. wh_hlinit -- initialize help system
  7386.  
  7387.         USAGE
  7388.  
  7389.           wn_hlinit(row, col, width, height, atrib, batrib, file)
  7390.           int page, row, col, width, height, atrib, batrib;
  7391.           char *file;
  7392.  
  7393.                 row  -  row of upper left hand corner of the window
  7394.                 col  -  column of upper left hand corner of the window
  7395.                 width - INSIDE dimension (max value is 78 for a 80 column 
  7396.                         wide display)
  7397.                 height- INSIDE dimension (max value is 23 for a 25 row 
  7398.                         high display)
  7399.                 atrib - attribute to be used IN the window
  7400.                 batrib- attribute to be used for the border
  7401.                 file  - help file name (assumes ".HLP" extension)
  7402.           
  7403.           Unless you modify the code in WN_HELP.C, wn_hlint calls should 
  7404.           always take the form of:
  7405.  
  7406.             wn_hlinit(0,0,78,23,(BLUE<<4|WHITE),(BLUE<<4|WHITE),file);
  7407.                       |                                       |  | 
  7408.                       +--------------\/-----------------------+  |
  7409.                                   Use as is                      |
  7410.                                                                  |
  7411.                                     YOUR ".HLP" file's name -----+                                                    
  7412.  
  7413.           Unless you modify the code in WN_HELP.C, "HLP" files should be 
  7414.           formatted according to the following convention:
  7415.  
  7416.              %key_word%  - max 25 characters, ALWAYS begin in position 1,
  7417.                            always enclosed within percent signs.
  7418.  
  7419.              text        - starts in column 3, ends in 76, contains a                  
  7420.                            maximum of 20 lines per screen. Text, 
  7421.                            including any leading and/or trailing blank 
  7422.                            lines and/or spaces is always immediately 
  7423.                            preceded by a key word or the .cp command. 
  7424.                            (Use blank lines at the top to center 
  7425.                            vertically.  Use spaces at the left of each 
  7426.                            line to center horizontally.)
  7427.  
  7428.              .cp         - starts in column 1. Command that signals end 
  7429.                            of screen in a series of 2 or more help 
  7430.                            screens.  Precedes or succeeds text.
  7431.  
  7432.              *END*       - starts in column 1. Command that signals end
  7433.                            of help. Succeeds text.
  7434.  
  7435.  
  7436.  
  7437.  
  7438.  
  7439.  
  7440.  
  7441.  
  7442.                                    122
  7443.  
  7444.  
  7445.  
  7446.         wn_hlinit - continued.
  7447.  
  7448.  
  7449.  
  7450.           A typical HLP file would look something like.
  7451.  
  7452.              00000...............................................77778
  7453.              12345...............................................67890
  7454.  
  7455.              %subject 1%
  7456.                            Title of Screen 1 - Subject 1
  7457.              
  7458.                This is a sample help screen for screen number 1 
  7459.                of a multi screen message.
  7460.              .cp
  7461.                            Title of Screen 2 - Subject 1
  7462.  
  7463.                This the second screen of a multi screen help 
  7464.                message for subject1.
  7465.              *END*
  7466.  
  7467.              %subject 2%
  7468.                            Title of Screen 1 - Subject 2     
  7469.  
  7470.                This is a sample help screen for a single screen 
  7471.                help message.
  7472.              *END*
  7473.  
  7474.           Later, when wn_help is called, text will be sequentially 
  7475.           displayed a screen at a time from the subject keyword through 
  7476.           any number of .cp delimited screens through and including the 
  7477.           screen delimited by *END*.  The system allows for forward and 
  7478.           reverse display via the PgUp and PgDn keys.  The .cp signals 
  7479.           the end of a single screen in a series of 2 or more screens.  
  7480.           When .cp is detected, the message  "Esc to quit help, PgUp for 
  7481.           previous screen, any other key to continue..." will be 
  7482.           displayed.  When *END* is detected, the message "End of help, 
  7483.           PgUp for previous screen, any other key to continue..." is 
  7484.           displayed.  
  7485.  
  7486.         RETURNS:
  7487.  
  7488.           TRUE if all is well.
  7489.  
  7490.           FALSE the help file (.HLP) or its index file (.NDX) could not 
  7491.           be found or open.  A FALSE return can also be caused by a lack 
  7492.           of free memory for the memory resident file index or the file 
  7493.           buffers themselves.
  7494.  
  7495.  
  7496.  
  7497.  
  7498.  
  7499.  
  7500.  
  7501.  
  7502.  
  7503.                                    123
  7504.  
  7505.  
  7506.  
  7507.         wn_hlinit - continued.
  7508.  
  7509.  
  7510.  
  7511.         CAUTIONS and ADDITIONAL NOTES:
  7512.  
  7513.           wn_hlinit requires both the ".HLP" and ".NDX" files to be 
  7514.           present when called. "NDX" files are produced by GENINDEX.  The 
  7515.           source to GENINDEX can be found in GENINDEX.C.  
  7516.  
  7517.           As implemented, the help system is configured to provide a full 
  7518.           screen text message, subject keys are limited to 25 characters, 
  7519.           and there is a limit of 255 subject keys per file.  This can be 
  7520.           changed by modifying the functions found in "wn_help.c"  THERE 
  7521.           IS A DIRECT CORRELATION BETWEEN THE PARAMETERS USED TO 
  7522.           INITIALIZE THE HELP SYSTEM AND THE LAYOUT OF THE ASCII TEXT 
  7523.           FILE READ BY THE GENINDEX PROGRAM.  If you modify the code be 
  7524.           sure to modify the location and text of the messages to be 
  7525.           displayed when .cp and/or *END* are dectected.
  7526.  
  7527.         SEE ALSO
  7528.  
  7529.           Help system basics, wn_help
  7530.  
  7531.  
  7532.  
  7533.  
  7534.  
  7535.  
  7536.  
  7537.  
  7538.  
  7539.  
  7540.  
  7541.  
  7542.  
  7543.  
  7544.  
  7545.  
  7546.  
  7547.  
  7548.  
  7549.  
  7550.  
  7551.  
  7552.  
  7553.  
  7554.  
  7555.  
  7556.  
  7557.  
  7558.  
  7559.  
  7560.  
  7561.  
  7562.  
  7563.  
  7564.                                    124
  7565.  
  7566.  
  7567.  
  7568.         10.66. wn_help -- display help message 
  7569.  
  7570.         USAGE
  7571.  
  7572.           wn_help(key_word)
  7573.           char *key_word;
  7574.  
  7575.              char *key_word - valid keyword contained in help file named 
  7576.                               in the call to wn_hlinit.
  7577.  
  7578.           The text associated with the key_word will be sequentially 
  7579.           displayed a screen at a time from the subject keyword through 
  7580.           any number of .cp delimited screens through and including the 
  7581.           screen delimited by *END*.  The system allows for forward and 
  7582.           reverse display via the PgUp and PgDn keys.  The .cp signals 
  7583.           the end of a single screen in a series of 2 or more screens.  
  7584.           When .cp is detected, the message  "Esc to quit help, PgUp for 
  7585.           previous screen, any other key to continue..." will be 
  7586.           displayed.  When *END* is detected, the message "End of help, 
  7587.           PgUp for previous screen, any other key to continue..." is 
  7588.           displayed.  
  7589.  
  7590.         RETURNS:
  7591.                                
  7592.           TRUE if all is well. 
  7593.  
  7594.           FALSE if system has not been initialzied, the . HLP file can 
  7595.           not be found,  or the keyword passed could not be found in the 
  7596.           memory resident index.
  7597.  
  7598.         CAUTIONS and ADDITIONAL NOTES:
  7599.  
  7600.           None.
  7601.  
  7602.         SEE ALSO
  7603.  
  7604.           wn_hlinit
  7605.  
  7606.  
  7607.  
  7608.  
  7609.  
  7610.  
  7611.  
  7612.  
  7613.  
  7614.  
  7615.  
  7616.  
  7617.  
  7618.  
  7619.  
  7620.  
  7621.  
  7622.  
  7623.  
  7624.  
  7625.                                    125
  7626.  
  7627.  
  7628.  
  7629.         10.67. wn_sleftj -- (string) left justify 
  7630.  
  7631.         USAGE
  7632.  
  7633.              wn_sleftj(str)
  7634.  
  7635.                   (char *) str - string to left justify
  7636.           
  7637.         RETURNS:
  7638.  
  7639.              Pointer to str.
  7640.           
  7641.         CAUTIONS and ADDITIONAL NOTES:
  7642.  
  7643.              The string str is left justified in place. 
  7644.  
  7645.              This funtion should not be used with literal character 
  7646.              strings (e.g. wn_sleft(" left justify this");).
  7647.  
  7648.              Leading white space is converted to trailing white space.
  7649.  
  7650.  
  7651.         10.68. wn_srightj -- (string) right justify 
  7652.  
  7653.         USAGE
  7654.  
  7655.              wn_srightj(str)
  7656.  
  7657.                   (char *) str - string to right justify.
  7658.  
  7659.         RETURNS:
  7660.  
  7661.              Pointer to str.
  7662.  
  7663.         CAUTIONS and ADDITIONAL NOTES:
  7664.  
  7665.              The string str is right justified in place.  
  7666.  
  7667.              This funtion should not be used with literal character 
  7668.              strings (e.g. wn_srightj("right justify this   ");).
  7669.  
  7670.              Trailing white space is converted to leading white space.
  7671.  
  7672.  
  7673.  
  7674.  
  7675.  
  7676.  
  7677.  
  7678.  
  7679.  
  7680.  
  7681.  
  7682.  
  7683.  
  7684.  
  7685.  
  7686.                                    126
  7687.  
  7688.  
  7689.  
  7690.         10.69. wn_scenter -- (string) center 
  7691.  
  7692.         USAGE
  7693.  
  7694.              wn_scenter(sr,tr,w)
  7695.  
  7696.                   (char *) sr - the string to center - source
  7697.                   (char *) tr - the centered string  - target
  7698.                                 tr contains the results of centering
  7699.                   int w       - desired width of centered string 
  7700.           
  7701.         RETURNS:
  7702.  
  7703.              Pointer to tr.
  7704.           
  7705.         CAUTIONS and ADDITIONAL NOTES:
  7706.  
  7707.              tr must be a pointer to a character array of at least
  7708.              w+1 in size.
  7709.  
  7710.              The source string pointed to by sr is not altered in any 
  7711.              way.
  7712.  
  7713.              Both leading and trailing white space of the source string 
  7714.              are considered part of the string to be centered.
  7715.                                       
  7716.                                       Desired Width (W)
  7717.                         |------------------------------------------|
  7718.  
  7719.                   source "this is a simple example"
  7720.                   target|         this is a simple example         |
  7721.  
  7722.                   source "        this is an example toooo"
  7723.                   target|             this is an example toooo     |
  7724.  
  7725.              This fuction is intended to deal with strings that do not 
  7726.              have leading or trailing white space.  WN_SDELSPC can be 
  7727.              called to prepare the string for centering.
  7728.  
  7729.  
  7730.  
  7731.  
  7732.  
  7733.  
  7734.  
  7735.  
  7736.  
  7737.  
  7738.  
  7739.  
  7740.  
  7741.  
  7742.  
  7743.  
  7744.  
  7745.  
  7746.  
  7747.                                    127
  7748.  
  7749.  
  7750.  
  7751.         10.70. wn_sdelspc -- (string) delete leading/trailing spaces
  7752.  
  7753.         USAGE
  7754.  
  7755.              wn_sdelspc(str, code)
  7756.  
  7757.                   char *str - string to be treated
  7758.                   int code  - operation code:
  7759.                                 1 = delete leading
  7760.                                 2 = delete trailing
  7761.                                 3 = delete both
  7762.           
  7763.         RETURNS:
  7764.  
  7765.              Pointer to str.
  7766.  
  7767.         CAUTIONS and ADDITIONAL NOTES:
  7768.  
  7769.              All operations are performed in place.
  7770.  
  7771.              This funtion should not be used with literal character 
  7772.              strings (e.g. wn_sdelspc(" mumble fratz  ", 3);).
  7773.  
  7774.  
  7775.         10.71. wn_strndx -- (string) return index of s2 in s1
  7776.  
  7777.         USAGE
  7778.  
  7779.              wn_strndx(s1,s2,off)
  7780.  
  7781.                   (char *) s1 - pointer to string s1
  7782.                   (char *) s2 - pointer to string s2
  7783.                   int off     - s1 offset for search start
  7784.                     
  7785.         RETURNS:
  7786.  
  7787.              The index (a.k.a. subscript or offset) of where s2 begins in 
  7788.              s1, or (-1) if s2 could not be found in s1.
  7789.  
  7790.  
  7791.         CAUTIONS and ADDITIONAL NOTES:
  7792.  
  7793.              A value for "off" must be provided. 
  7794.  
  7795.  
  7796.  
  7797.  
  7798.  
  7799.  
  7800.  
  7801.  
  7802.  
  7803.  
  7804.  
  7805.  
  7806.  
  7807.  
  7808.                                    128
  7809.  
  7810.  
  7811.  
  7812.         10.72. mo_reset -- reset/init mouse
  7813.  
  7814.         USAGE
  7815.  
  7816.              ms = (MOUSEPTR) mo_reset()
  7817.              MOUSEPTR ms;
  7818.  
  7819.                   ms - mouse handle 
  7820.  
  7821.              mo_reset() must be the 1st mouse function called.
  7822.  
  7823.              Low level and applications level interface function.
  7824.  
  7825.         RETURNS
  7826.  
  7827.              mo = mouse handle or MOLPTR (null) if error
  7828.  
  7829.         CAUTIONS and ADDITIONAL NOTES
  7830.  
  7831.              Any program that uses a mouse must first initialize it in 
  7832.              order to avoid dealing with the mouse in an unknown state.  
  7833.              This function clears the mouse status to a "power on" state, 
  7834.              places the mouse's cursor in the center of the screen 
  7835.              (although hidden) and sets the mouse's active region to the 
  7836.              full screen.
  7837.  
  7838.              Requires "winboss.h" to be "#include"d.
  7839.  
  7840.              MOUSEPTR is defined in "winboss.h"     
  7841.  
  7842.              Example:
  7843.  
  7844.                   #include "winboss.h"
  7845.                   main()
  7846.                   {
  7847.                   MOUSEPTR ms;
  7848.                        ms=mo_reset();           /* init mouse */
  7849.                        if(ms) {
  7850.                             .....               /* do other things */
  7851.                             exit(0);            /* finito */
  7852.                        }
  7853.                        else {
  7854.                             ... no mouse
  7855.                        }
  7856.                   }
  7857.                   /* End */
  7858.  
  7859.  
  7860.  
  7861.  
  7862.  
  7863.  
  7864.  
  7865.  
  7866.  
  7867.  
  7868.  
  7869.                                    129
  7870.  
  7871.  
  7872.  
  7873.         10.73. mo_show -- show mouse
  7874.  
  7875.         USAGE
  7876.  
  7877.              mo_show(ms)
  7878.              MOUSEPTR ms;
  7879.  
  7880.                   ms - mouse handle
  7881.  
  7882.              Display (show, unhide) the mouse cursor.  
  7883.              
  7884.              Low level and applications level interface function.
  7885.  
  7886.         RETURNS
  7887.  
  7888.              Nothing.     
  7889.  
  7890.         CAUTIONS and ADDITIONAL NOTES
  7891.  
  7892.              Example:
  7893.  
  7894.                   #include "winboss.h"
  7895.                   main()
  7896.                   {
  7897.                   MOUSEPTR ms;
  7898.                        ms=mo_reset();           /* init mouse */
  7899.                        if(ms) {
  7900.                             mo_show(ms);        /* show mouse */
  7901.                             .....               /* do other things */
  7902.                             exit(0);            /* finito */
  7903.                        }
  7904.                        else {
  7905.                             ... no mouse
  7906.                        }
  7907.                   }
  7908.                   /* End */
  7909.  
  7910.              Failure to call mo_show() will cause the mouse to never be 
  7911.              displayed.  mo_show() is usually called after mo_reset().
  7912.  
  7913.  
  7914.  
  7915.  
  7916.  
  7917.  
  7918.  
  7919.  
  7920.  
  7921.  
  7922.  
  7923.  
  7924.  
  7925.  
  7926.  
  7927.  
  7928.  
  7929.  
  7930.                                    130
  7931.  
  7932.  
  7933.  
  7934.         10.74. mo_hide -- hide mouse
  7935.  
  7936.         USAGE
  7937.  
  7938.              mo_hide(ms)
  7939.              MOUSEPTR ms;
  7940.  
  7941.                   ms - mouse handle
  7942.  
  7943.              Hide (unshow, make invisible) the mouse cursor.  
  7944.  
  7945.              Low level and applications level interface function.
  7946.  
  7947.         RETURNS
  7948.  
  7949.              Nothing.
  7950.  
  7951.         CAUTIONS and ADDITIONAL NOTES
  7952.  
  7953.              The only way to display the mouse cursor after it is hidden 
  7954.              is by calling mo_show().
  7955.  
  7956.              Example:
  7957.  
  7958.                   #include "winboss.h"
  7959.                   main()
  7960.                   {
  7961.                   MOUSEPTR ms;
  7962.                        ms=mo_reset();           /* init mouse */
  7963.                        if(ms) {
  7964.                             mo_show(ms);        /* show mouse */
  7965.                             v_getch();          /* wait for key hit */
  7966.                             mo_hide(ms);        /* hide mouse */
  7967.                             exit(0);            /* finito */
  7968.                        }
  7969.                        else {
  7970.                             ... no mouse
  7971.                        }
  7972.                   }
  7973.                   /* End */
  7974.  
  7975.  
  7976.  
  7977.  
  7978.  
  7979.  
  7980.  
  7981.  
  7982.  
  7983.  
  7984.  
  7985.  
  7986.  
  7987.  
  7988.  
  7989.  
  7990.  
  7991.                                    131
  7992.  
  7993.  
  7994.  
  7995.         10.75. mo_pos -- get mouse pixel position & status
  7996.  
  7997.         USAGE
  7998.  
  7999.              mo_pos(ms)
  8000.              MOUSEPTR ms;
  8001.  
  8002.                   ms - mouse handle
  8003.  
  8004.              This function updates the mouse control block with current 
  8005.              mouse status information - physical location and button 
  8006.              status.  This information is provided in real time and in 
  8007.              the mouse's 640 x 200 pixel array corrdinate system.
  8008.  
  8009.              Low level interface function.
  8010.  
  8011.         RETURNS
  8012.  
  8013.              Nothing. 
  8014.  
  8015.              Updates - Members of the mouse control block:
  8016.  
  8017.                ms->bstat - bit 0 set if left button is CURRENTLY down 
  8018.                            bit 1 set if right button is CURRENTLY down
  8019.                            bit 2 set if center button is CURRENTLY down
  8020.                                       
  8021.                ms->row   - mouse pixel row location 
  8022.                ms->col   - mouse pixel col location
  8023.  
  8024.         CAUTIONS and ADDITIONAL NOTES
  8025.  
  8026.              All information is reported in real time.  If the mouse is 
  8027.              in the process of being moved, the information returned may 
  8028.              not be indicative of the final destination. 
  8029.  
  8030.              This funtion is typically used in graphics mode (which The 
  8031.              Window BOSS does not support).  It is handy for "etch-a-
  8032.              sketch" type pixel drawing programs.  
  8033.  
  8034.              Making infrequent calls to this routine can cause your 
  8035.              program to miss button clicks. 
  8036.  
  8037.              Text (80x25) row and column coordinates can be determined by 
  8038.              dividing m->row and m->col by 8.
  8039.  
  8040.              The recommended way to obtain accurate information in a more 
  8041.              useful format is by using mo_wait in conjunction with 
  8042.              mo_rcpos.
  8043.  
  8044.  
  8045.              Also see "mo_rcpos", "mo_wait".
  8046.  
  8047.  
  8048.  
  8049.  
  8050.  
  8051.  
  8052.                                    132
  8053.  
  8054.  
  8055.  
  8056.         10.76. mo_move -- move mouse pixel cursor
  8057.  
  8058.         USAGE
  8059.  
  8060.              mo_move(ms, row, col)
  8061.              MOUSEPTR ms;
  8062.              int row,col;
  8063.  
  8064.                   ms -  mouse handle
  8065.                   row - new pixel row value 
  8066.                   col - new pixel col value
  8067.  
  8068.              This function moves the mouse to a new physical location in 
  8069.              the mouse's 640 x 200 pixel array coordinate system.
  8070.  
  8071.              Low level interface function.
  8072.  
  8073.         RETURNS
  8074.  
  8075.              Nothing.
  8076.  
  8077.         CAUTIONS and ADDITIONAL NOTES
  8078.  
  8079.              Pixel row and column coordinates can be determined by 
  8080.              multiplying the text (80x25) coordinates by 8.  
  8081.  
  8082.              Also see "mo_locate".
  8083.  
  8084.  
  8085.  
  8086.  
  8087.  
  8088.  
  8089.  
  8090.  
  8091.  
  8092.  
  8093.  
  8094.  
  8095.  
  8096.  
  8097.  
  8098.  
  8099.  
  8100.  
  8101.  
  8102.  
  8103.  
  8104.  
  8105.  
  8106.  
  8107.  
  8108.  
  8109.  
  8110.  
  8111.  
  8112.  
  8113.                                    133
  8114.  
  8115.  
  8116.  
  8117.         10.77. mo_pbinfo -- get pressed mouse botton status
  8118.  
  8119.         USAGE
  8120.  
  8121.              mo_pbinfo(ms,button)
  8122.              MOUSEPTR ms;
  8123.              int button;
  8124.  
  8125.                   ms     -  mouse handle
  8126.                   button -  button of interest (MO_LEFT or MO_RIGHT)
  8127.  
  8128.              Low level interface function.
  8129.  
  8130.         RETURNS
  8131.  
  8132.              Nothing. 
  8133.  
  8134.              Updates - Members of the mouse control block:
  8135.  
  8136.                ms->bstat  - bit 0 set if left button is CURRENTLY down 
  8137.                             bit 1 set if right button is CURRENTLY down
  8138.                             bit 2 set if center button is CURRENTLY down
  8139.                ms->nclick - number of times the requseted button has 
  8140.                             been pressed since last call.
  8141.                ms->row    - mouse pixel row location of last press
  8142.                ms->col    - mouse pixel col location of last press
  8143.  
  8144.         CAUTIONS and ADDITIONAL NOTES
  8145.  
  8146.              The mouse device driver is a pretty smart critter.  It keeps 
  8147.              track of a number of things, one of them being the number of 
  8148.              times a particular button has been pressed or released since 
  8149.              the last time someone has asked about it.  This function 
  8150.              returns pressed button information about a specific button 
  8151.              (MO_LEFT or MO_RIGHT), and it also returns the real time 
  8152.              button status in the same format as mo_pos().  
  8153.  
  8154.              The ms->row and ms->column locations in the mouse control 
  8155.              block are from the last press of the specified button.
  8156.  
  8157.              This function, like mo_pos, provides limited value for most 
  8158.              applications programs.  A better choice is mo_rbinfo 
  8159.              (released button information and status), since the mouse 
  8160.              device driver waits for the user to RELEASE the specified 
  8161.              button before it updates the internal counters.
  8162.  
  8163.              MO_LEFT and MO_RIGHT are defined in "winboss.h"
  8164.  
  8165.              Calling mo_pbinfo clears the mouse's pressed button history 
  8166.              counters.
  8167.  
  8168.              Also see "mo_press", "mo_release", "mo_rbinfo"
  8169.  
  8170.  
  8171.  
  8172.  
  8173.  
  8174.                                    134
  8175.  
  8176.  
  8177.  
  8178.         10.78. mo_rbinfo -- get released mouse button status
  8179.  
  8180.              mo_rbinfo(ms,button)
  8181.              MOUSEPTR ms;
  8182.              int button;
  8183.  
  8184.                   ms     -  mouse handle
  8185.                   button -  button of interest (MO_LEFT or MO_RIGHT)
  8186.  
  8187.              Low level interface function.
  8188.  
  8189.         RETURNS
  8190.  
  8191.              Nothing. 
  8192.  
  8193.              Updates - Members of the mouse control block:
  8194.  
  8195.                ms->bstat  - bit 0 set if left has been released 
  8196.                             bit 1 set if right button has been released
  8197.                             bit 2 set if center button "   "    "
  8198.                ms->nclick - number of times the requseted button has 
  8199.                             been pressed and released since last call.
  8200.                ms->row    - mouse pixel row location of last release
  8201.                ms->col    - mouse pixel col location of last release 
  8202.  
  8203.         CAUTIONS and ADDITIONAL NOTES
  8204.  
  8205.              The mouse device driver is a pretty smart critter.  It keeps 
  8206.              track of a number of things, one of them being the number of 
  8207.              times a particular button has been pressed or released since 
  8208.              the last time someone has asked about it.  This function 
  8209.              returns released button information about a specific button 
  8210.              (MO_LEFT or MO_RIGHT), and it also returns the real time 
  8211.              button status in the same format as mo_pos().  
  8212.  
  8213.              The ms->row and ms->column locations in the mouse control 
  8214.              block are from the last button release  of the specified 
  8215.              button.
  8216.  
  8217.              The mouse device driver waits for the user to RELEASE the 
  8218.              specified button before it updates the internal counters.
  8219.  
  8220.              MO_LEFT and MO_RIGHT are defined in "winboss.h"
  8221.  
  8222.              Calling mo_rbinfo clears the mouse's pressed button history 
  8223.              counters.
  8224.  
  8225.              Also see "mo_release", "mo_press", "mo_pbinfo"
  8226.  
  8227.  
  8228.  
  8229.  
  8230.  
  8231.  
  8232.  
  8233.  
  8234.  
  8235.                                    135
  8236.  
  8237.  
  8238.  
  8239.         10.79. mo_clim -- set mouse min/max pixel column limits
  8240.  
  8241.         USAGE
  8242.  
  8243.              mo_clim(ms,min,max)
  8244.              MOUSEPTR ms;
  8245.              int min, mix;
  8246.  
  8247.                   ms   - mouse handle
  8248.                   min  - column minimum in pixels (0 to 639)
  8249.                   max  - column maximum in pixels (0 to 639)
  8250.  
  8251.              mo_clim and mo_rlim limit the operational area of the mouse.  
  8252.              Together they define the mouse's hot area, or if you prefer, 
  8253.              they establish a fence/cage around the mouse. 
  8254.  
  8255.              Low level interface function.
  8256.  
  8257.         RETURNS
  8258.  
  8259.              Nothing.
  8260.  
  8261.         CAUTIONS and ADDITIONAL NOTES
  8262.  
  8263.              min and max are not range checked, 0 is on the left.
  8264.  
  8265.              Also see "mo_reigon"
  8266.  
  8267.         10.80. mo_rlim -- set mouse min/max pixel row limits
  8268.  
  8269.         USAGE
  8270.  
  8271.              mo_clim(ms,min,max)
  8272.              MOUSEPTR ms;
  8273.              int min, mix;
  8274.  
  8275.                   ms   - mouse handle
  8276.                   min  - row minimum in pixels (0 to 199)
  8277.                   max  - row maximum in pixels (0 to 199)
  8278.  
  8279.              mo_clim and mo_rlim limit the operational area of the mouse.  
  8280.              Together they define the mouse's hot area, or if you prefer, 
  8281.              they establish a fence/cage around the mouse. 
  8282.  
  8283.              Low level interface function.
  8284.  
  8285.         RETURNS
  8286.  
  8287.              Nothing.
  8288.  
  8289.         CAUTIONS and ADDITIONAL NOTES
  8290.  
  8291.              min and max are not range checked, 0 is at the top.
  8292.  
  8293.  
  8294.  
  8295.  
  8296.                                    136
  8297.  
  8298.  
  8299.  
  8300.         10.81. mo_sgcursor -- set mouse graphics cursor
  8301.  
  8302.         USAGE
  8303.  
  8304.              mo_sgcursor(ms, hhot, vhot, seg, off)
  8305.              MOUSEPTR ms;
  8306.              int hhot, vhot;
  8307.              unsigned int seg, off;
  8308.  
  8309.                   ms         - mouse handle
  8310.                   hhot, vhot - X & Y relative coordinates of hot spot
  8311.                   seg, off   - segment and offset of mask set
  8312.  
  8313.              Low level interface function.
  8314.  
  8315.         RETURNS
  8316.  
  8317.              Nothing.
  8318.  
  8319.         CAUTIONS and ADDITIONAL NOTES
  8320.  
  8321.              This is an unsupported function that is useful in graphics 
  8322.              mode only.  
  8323.  
  8324.              This function is not to be used in conjunction with The 
  8325.              Window BOSS or Data Clerk.
  8326.  
  8327.              Refer to the Microsoft and/or Logitech API manuals for a 
  8328.              complete description of mouse function 9.
  8329.  
  8330.              Use "mo_scursor" or "mo_setptr" to set the mouse cursor.
  8331.  
  8332.  
  8333.  
  8334.  
  8335.  
  8336.  
  8337.  
  8338.  
  8339.  
  8340.  
  8341.  
  8342.  
  8343.  
  8344.  
  8345.  
  8346.  
  8347.  
  8348.  
  8349.  
  8350.  
  8351.  
  8352.  
  8353.  
  8354.  
  8355.  
  8356.  
  8357.                                    137
  8358.  
  8359.  
  8360.  
  8361.         10.82. mo_scursor -- set mouse cursor
  8362.  
  8363.         USAGE
  8364.  
  8365.              mo_scursor(ms, type, start, stop)
  8366.              MOUSEPTR ms;
  8367.              int type, start, stop;
  8368.  
  8369.                   ms    - mouse pointer
  8370.                   type  - cursor type: 
  8371.                             MO_HDW for hardware
  8372.                             MO_SFT for software
  8373.                   start - start scan line
  8374.                   stop  - stop scan line
  8375.  
  8376.              When using a mouse, you can choose between two types of text 
  8377.              cursors, which are hardware or software.  The hardware 
  8378.              (MO_HDW) cursor puts the video adapters text cursor under 
  8379.              control of the mouse.  This results in a single cursor 
  8380.              appearing on the screen for both the mouse and text.  The 
  8381.              software cursor (MO_SFT) allows two cursors to appear on the 
  8382.              screen, the normal text cursor and a mouse cursor that can 
  8383.              take on a user defined shape and attribute.  The software 
  8384.              cursor is the default and is a simple full-cell inverse 
  8385.              video cursor.
  8386.  
  8387.              Using the hardware cursor type MO_HDW:
  8388.  
  8389.                   start - start scan line (usually 0)
  8390.                   stop  - stop scan line:
  8391.                             monochrome max = 12
  8392.                             non mon    max =  7
  8393.  
  8394.              Using the software cursor type MO_SFT:
  8395.  
  8396.                Option 1 (user defined):
  8397.                   
  8398.                   start - 0x00 
  8399.                   stop  - display attributes in upper 8 bits.
  8400.                           ASCII character to be used as cursor in lower 8 
  8401.                           bits.
  8402.  
  8403.                   For example, to set the software cursor to a white 
  8404.                   happy face on a black background:
  8405.  
  8406.                        mo_scursor(ms, MO_SFT, 0x00, 0x0703);     
  8407.  
  8408.  
  8409.                                                      continued...    
  8410.  
  8411.  
  8412.  
  8413.  
  8414.  
  8415.  
  8416.  
  8417.  
  8418.                                    138
  8419.  
  8420.  
  8421.  
  8422.         mo_scursor - continued.
  8423.  
  8424.  
  8425.  
  8426.                Option 2 (see through rectangle):
  8427.  
  8428.                   start - 0x77ff
  8429.                   stop  - 0x00
  8430.  
  8431.                   For example, to set the software cursor to a see 
  8432.                   through block:
  8433.  
  8434.                        mo_scursor(ms, MO_SOFT, 0x77ff, 7700);     
  8435.  
  8436.              Low level interface function.
  8437.  
  8438.         RETURNS
  8439.  
  8440.              Nothing.
  8441.  
  8442.         CAUTIONS and ADDITIONAL NOTES
  8443.  
  8444.              See also "mo_setptr".
  8445.  
  8446.  
  8447.  
  8448.  
  8449.  
  8450.  
  8451.  
  8452.  
  8453.  
  8454.  
  8455.  
  8456.  
  8457.  
  8458.  
  8459.  
  8460.  
  8461.  
  8462.  
  8463.  
  8464.  
  8465.  
  8466.  
  8467.  
  8468.  
  8469.  
  8470.  
  8471.  
  8472.  
  8473.  
  8474.  
  8475.  
  8476.  
  8477.  
  8478.  
  8479.                                    139
  8480.  
  8481.  
  8482.  
  8483.         10.83. mo_motion  -- get mouse motion counters
  8484.  
  8485.         USAGE
  8486.  
  8487.              mo_motion(ms)
  8488.              MOUSEPTR ms;
  8489.  
  8490.                   ms - mouse handle
  8491.  
  8492.              Low level interface function.
  8493.  
  8494.         RETURNS
  8495.  
  8496.              Nothing.
  8497.  
  8498.              Updates - Members of the mouse control block:
  8499.  
  8500.                ms->vmove - vertical move counter since last call
  8501.                ms->hmove - horizontal move counter since last call
  8502.  
  8503.         CAUTIONS and ADDITIONAL NOTES
  8504.  
  8505.              The mouse motion counters are reset after each call.
  8506.  
  8507.  
  8508.  
  8509.  
  8510.  
  8511.  
  8512.  
  8513.  
  8514.  
  8515.  
  8516.  
  8517.  
  8518.  
  8519.  
  8520.  
  8521.  
  8522.  
  8523.  
  8524.  
  8525.  
  8526.  
  8527.  
  8528.  
  8529.  
  8530.  
  8531.  
  8532.  
  8533.  
  8534.  
  8535.  
  8536.  
  8537.  
  8538.  
  8539.  
  8540.                                    140
  8541.  
  8542.  
  8543.  
  8544.         10.84. mo_task -- define mouse event handler
  8545.  
  8546.         USAGE
  8547.  
  8548.              mo_task(m, mask, seg, off)
  8549.              WINDOWPTR m;
  8550.              unsigned int mask, seg, off;
  8551.  
  8552.                   m    - mouse handle
  8553.                   mask - event mask
  8554.                             BIT            EVENT
  8555.                              0             Mouse cursor moved
  8556.                              1             Left Button pressed
  8557.                              2             Left button released
  8558.                              3             Right button pressed
  8559.                              4             Right button released
  8560.                              5             Middle button pressed
  8561.                              6             Middle button released
  8562.                   seg  - segment address of handler routine
  8563.                   off  - offset portion of handler routine address
  8564.  
  8565.              This function, if properly implemented, can keep your code 
  8566.              free of frequent mouse checks.  The basic notion is to 
  8567.              "attach" a function in your program to the mouse device 
  8568.              driver.  This function would be invoked whenever any one of 
  8569.              the above events took place.  Your function would then 
  8570.              execute at interrupt level.  There are a few shortcomings, 
  8571.              however, your function can not perform any I/O, make any 
  8572.              calls to DOS or call any of the ROM BIOS routines.  What can 
  8573.              it do?  Actually not much other than record the fact than an 
  8574.              event took place and dismiss the interupt.  Your program can 
  8575.              then process the event at its convenience.  
  8576.  
  8577.              The difficulty with using this function is due to the fact 
  8578.              that your function MUST look like an interupt service 
  8579.              routine in both the way it beings and finishes executing.  
  8580.              This form of code generation is something most "C" compilers 
  8581.              are not very good at, and as a result most of these handler 
  8582.              routines have to be written in assembly language.  This 
  8583.              function is provided as a convenience to those who are 
  8584.              familar with writing these types of programs - it is not 
  8585.              supported by Star Guidance.
  8586.  
  8587.         RETURNS
  8588.  
  8589.              Nothing.
  8590.  
  8591.         CAUTIONS and ADDITIONAL NOTES
  8592.  
  8593.              This is an unsupported function.
  8594.  
  8595.              Refer to the Microsoft and/or Logitech API manuals for a 
  8596.              complete description of mouse function 12.
  8597.  
  8598.  
  8599.  
  8600.  
  8601.                                    141
  8602.  
  8603.  
  8604.  
  8605.         10.85. mo_lpon -- mouse light pen emulation on
  8606.         10.86. mo_lpoff -- mouse light pen emulation off
  8607.  
  8608.         USAGE
  8609.  
  8610.              mo_lpon(ms)
  8611.              MOUSEPTR ms;
  8612.  
  8613.              mo_lpoff(ms)
  8614.              MOUSEPTR ms;
  8615.  
  8616.                   ms - mouse handle
  8617.  
  8618.              These functions allow software that exepects to find a light 
  8619.              pen to respond (or not to respond) to the mouse as if it 
  8620.              were a light pen.  By default, light pen emluation is 
  8621.              enabled - mo_reset() automatically turns on light pen 
  8622.              emulation.
  8623.  
  8624.              Low level and applications level interface function.
  8625.  
  8626.         RETURNS
  8627.  
  8628.              Nothing.
  8629.  
  8630.         CAUTIONS and ADDITIONAL NOTES
  8631.  
  8632.              None.
  8633.  
  8634.  
  8635.         10.87. mo_ratio -- set motion to pixel ratio
  8636.  
  8637.         USAGE
  8638.  
  8639.              mo_ratio(ms)
  8640.              MOUSEPTR ms;
  8641.  
  8642.                   ms - mouse handle
  8643.  
  8644.              Set the motion to pixel ratio (graphics mode).
  8645.  
  8646.              Low level interface function.
  8647.  
  8648.         RETURNS
  8649.  
  8650.              Nothing.
  8651.  
  8652.         CAUTIONS and ADDITIONAL NOTES
  8653.  
  8654.              This is an unsupported function.
  8655.  
  8656.              Refer to the Microsoft and/or Logitech API manuals for a 
  8657.              complete description of mouse function 15.
  8658.  
  8659.  
  8660.  
  8661.  
  8662.                                    142
  8663.  
  8664.  
  8665.  
  8666.         10.88. mo_rcpos -- return current position of mouse
  8667.  
  8668.         USAGE
  8669.  
  8670.              mo_rcpos(ms, status, row, col)
  8671.              MOUSEPTR ms;
  8672.              int *status, *row, *col;
  8673.  
  8674.                   ms      - mouse handle
  8675.                   *status - pointer to int to receive mouse status
  8676.                               bit 0 set if left button is CURRENTLY down 
  8677.                               bit 1 set if right button is CURRENTLY down
  8678.                               bit 2 set if center button is CURRENTLY down
  8679.                   *row    - pointer to int to receive position
  8680.                             of mouse row (0-25)
  8681.                   *col    - pointer to int to receive position
  8682.                             of mouse column (0-79)
  8683.  
  8684.              Applications level interface function.
  8685.  
  8686.         RETURNS
  8687.  
  8688.              Nothing.
  8689.  
  8690.              Updates - Members of the mouse control block:
  8691.  
  8692.                ms->bstat - bit 0 set if left button is CURRENTLY down 
  8693.                            bit 1 set if right button is CURRENTLY down
  8694.                            bit 2 set if center button is CURRENTLY down
  8695.                                       
  8696.                ms->row   - mouse pixel row location 
  8697.                ms->col   - mouse pixel col location
  8698.  
  8699.  
  8700.                                                      continued....
  8701.  
  8702.  
  8703.  
  8704.  
  8705.  
  8706.  
  8707.  
  8708.  
  8709.  
  8710.  
  8711.  
  8712.  
  8713.  
  8714.  
  8715.  
  8716.  
  8717.  
  8718.  
  8719.  
  8720.  
  8721.  
  8722.  
  8723.                                    143
  8724.  
  8725.  
  8726.  
  8727.         mo_rcpos - continued.
  8728.  
  8729.  
  8730.  
  8731.              CAUTIONS and ADDITIONAL NOTES
  8732.  
  8733.              Example:
  8734.  
  8735.                   #include "winboss.h"
  8736.                   main()
  8737.                   {
  8738.                   MOUSEPTR ms;
  8739.                   int st, row, col;
  8740.                        ms=mo_reset();           /* init mouse */
  8741.                        if(ms) {
  8742.                                                 /* fetch status */
  8743.                             mo_rcpos(ms, &st, &row, &col);
  8744.                             mo_show(ms);        /* show mouse */
  8745.                             v_getch();          /* wait for key hit */
  8746.                             mo_hide(ms);        /* hide mouse */
  8747.                             exit(0);            /* finito */
  8748.                        }
  8749.                        else {
  8750.                             ... no mouse
  8751.                        }
  8752.                   }
  8753.                   /* End */
  8754.  
  8755.              Note the use of pointers.
  8756.  
  8757.              All information is reported in real time.  If the mouse is 
  8758.              in the process of being moved the information returned may 
  8759.              not be indicative of the final destination. 
  8760.  
  8761.              Making infrequent calls to this routine can cause your 
  8762.              program to miss button clicks. 
  8763.  
  8764.              The recommended way to obtain accurate information is by 
  8765.              using mo_wait in conjunction with mo_rcpos.
  8766.  
  8767.              See also mo_pos(), mo_wait()
  8768.  
  8769.  
  8770.  
  8771.  
  8772.  
  8773.  
  8774.  
  8775.  
  8776.  
  8777.  
  8778.  
  8779.  
  8780.  
  8781.  
  8782.  
  8783.  
  8784.                                    144
  8785.  
  8786.  
  8787.  
  8788.         10.89. mo_locate -- locate (position) mouse cursor
  8789.  
  8790.         USAGE
  8791.  
  8792.              mo_locate(ms, row, col)
  8793.              MOUSEPTR ms;
  8794.              int row, col;
  8795.  
  8796.                   ms   - mouse handle
  8797.                   row  - destination row (0-24)
  8798.                   col  - destination column (0-79)
  8799.  
  8800.              mo_locate positions the mouse to the row and column 
  8801.              specified.
  8802.  
  8803.              Applications level interface function.
  8804.  
  8805.         RETURNS
  8806.  
  8807.              Nothing.
  8808.  
  8809.         CAUTIONS and ADDITIONAL NOTES
  8810.  
  8811.              Example:
  8812.  
  8813.                   #include "winboss.h"
  8814.                   main()
  8815.                   {
  8816.                   MOUSEPTR ms;
  8817.                   int st, row, col;
  8818.                        ms=mo_reset();           /* init mouse */
  8819.                        if(ms) {
  8820.                                                 /* fetch status */
  8821.                             mo_rcpos(ms, &st, &row, &col);
  8822.                             if(row != 0)        /* home the mouse ?? */
  8823.                               mo_locate(ms, 0, 0);
  8824.                             mo_show(ms);        /* show mouse */
  8825.                             v_getch();          /* wait for key hit */
  8826.                             mo_hide(ms);        /* hide mouse */
  8827.                             exit(0);            /* finito */
  8828.                        }
  8829.                        else {
  8830.                             ... no mouse
  8831.                        }
  8832.                   }
  8833.                   /* End */
  8834.  
  8835.              Values are not range checked.
  8836.  
  8837.  
  8838.  
  8839.  
  8840.  
  8841.  
  8842.  
  8843.  
  8844.  
  8845.                                    145
  8846.  
  8847.  
  8848.  
  8849.         10.90. mo_press -- get mouse button press status
  8850.  
  8851.         USAGE
  8852.  
  8853.              mo_press(ms, button, status, nclick, row, col)
  8854.              MOUSEPTR ms;
  8855.              int button;
  8856.              int *status, *nclick, *row, *col;
  8857.  
  8858.                   ms      - mouse handle
  8859.                   button  - button of interest (MO_LEFT or MO_RIGHT)
  8860.                   status  - pointer to int to receive status information.
  8861.                               bit 0 set if left button is CURRENTLY down 
  8862.                               bit 1 set if right button is CURRENTLY down
  8863.                               bit 2 set if center button is CURRENTLY down
  8864.                   nclick  - pointer to int to receive number of times the 
  8865.                             mouse button specified by button has been 
  8866.                             pressed since last call. Zero indicates the 
  8867.                             button has not been pressed since the last 
  8868.                             call.
  8869.                   row     - pointer to int to receive row (0-24) of last 
  8870.                             button press.
  8871.                   col     - pointer to int to receive column (0-79) of 
  8872.                             last button press.
  8873.  
  8874.              Applications level interface function.
  8875.  
  8876.         RETURNS
  8877.  
  8878.              Nothing.
  8879.  
  8880.              Updates - Members of the mouse control block:
  8881.  
  8882.                ms->bstat  - bit 0 set if left button is CURRENTLY down 
  8883.                             bit 1 set if right button is CURRENTLY down
  8884.                             bit 2 set if center button is CURRENTLY down
  8885.                ms->nclick - number of times the requested button has been 
  8886.                             pressed since last call.
  8887.                ms->row    - mouse pixel row location of last press
  8888.                ms->col    - mouse pixel col location of last press
  8889.  
  8890.  
  8891.                                                      continued....
  8892.  
  8893.  
  8894.  
  8895.  
  8896.  
  8897.  
  8898.  
  8899.  
  8900.  
  8901.  
  8902.  
  8903.  
  8904.  
  8905.  
  8906.                                    146
  8907.  
  8908.  
  8909.  
  8910.         mo_press - continued.
  8911.  
  8912.  
  8913.  
  8914.         CAUTIONS and ADDITIONAL NOTES
  8915.  
  8916.              Example:
  8917.  
  8918.                   #include "winboss.h"
  8919.                   main()
  8920.                   {
  8921.                   MOUSEPTR ms;
  8922.                   int st, row, col;
  8923.                        ms=mo_reset();           /* init mouse */
  8924.                        if(ms) {
  8925.                                                 /* fetch status */
  8926.                           mo_rcpos(ms, &st, &row, &col);
  8927.                           if(row != 0)          /* home the mouse ?? */
  8928.                             mo_locate(ms, 0, 0);
  8929.                           mo_show(ms);          /* show mouse */
  8930.                           do {                  /* loop till press */
  8931.                             mo_wait(ms);        /* let mouse settle */
  8932.                             mo_press(ms, MO_LEFT, &st, &nc, &row, &col);
  8933.                           } while(!nc); 
  8934.                           mo_hide(ms);          /* hide mouse */
  8935.                           exit(0);              /* finito */
  8936.                        }
  8937.                        else {
  8938.                             ... no mouse
  8939.                        }
  8940.                   }
  8941.                   /* End */
  8942.  
  8943.              Note use of POINTERS.
  8944.  
  8945.              MO_LEFT and MO_RIGHT are defined in "winboss.h"
  8946.  
  8947.              Calling mo_press clears the mouse's pressed button history 
  8948.              counters.
  8949.  
  8950.              Since mo_release waits for the mouse button to be released 
  8951.              before updating the device drivers internal tables, it is a 
  8952.              better choice for most applications.
  8953.  
  8954.              Also see "mo_pbinfo"
  8955.  
  8956.  
  8957.  
  8958.  
  8959.  
  8960.  
  8961.  
  8962.  
  8963.  
  8964.  
  8965.  
  8966.  
  8967.                                    147
  8968.  
  8969.  
  8970.  
  8971.         10.91. mo_release -- get mouse button release status
  8972.  
  8973.         USAGE
  8974.  
  8975.              mo_release(ms, button, status, nclick, row, col)
  8976.              MOUSEPTR ms;
  8977.              int button;
  8978.              int *status, *nclick, *row, *col;
  8979.  
  8980.                   ms      - mouse handle
  8981.                   button  - button of interest (MO_LEFT or MO_RIGHT)
  8982.                   status  - pointer to int to receive status information.
  8983.                               bit 0 set if left button has been pressed 
  8984.                               and released.
  8985.                               bit 1 set if right button has been pressed 
  8986.                               and released.
  8987.                               bit 2 set if center button has been pressed 
  8988.                               and released.
  8989.                   nclick  - pointer to int to receive number of times the 
  8990.                             mouse button specified by button has been 
  8991.                             pressed and released since last call. Zero 
  8992.                             indicates the button has not been released
  8993.                             since the last call.
  8994.                   row     - pointer to int to receive row (0-24) of last 
  8995.                             button release.
  8996.                   col     - pointer to int to receive column (0-79) of 
  8997.                             last button release.
  8998.  
  8999.              Applications level interface function.
  9000.  
  9001.         RETURNS
  9002.  
  9003.              Nothing. 
  9004.  
  9005.              Updates - Members of the mouse control block:
  9006.  
  9007.                ms->bstat  - bit 0 set if left has been released 
  9008.                             bit 1 set if right button has been released
  9009.                             bit 2 set if center button "   "    "
  9010.                ms->nclick - number of times the requested button has been 
  9011.                             pressed and released since last call.
  9012.                ms->row    - mouse pixel row location of last release
  9013.                ms->col    - mouse pixel col location of last release 
  9014.  
  9015.  
  9016.                                                 continued....
  9017.  
  9018.  
  9019.  
  9020.  
  9021.  
  9022.  
  9023.  
  9024.  
  9025.  
  9026.  
  9027.  
  9028.                                    148
  9029.  
  9030.  
  9031.  
  9032.         mo_release - continued.
  9033.  
  9034.  
  9035.  
  9036.         CAUTIONS and ADDITIONAL NOTES
  9037.  
  9038.              Example:
  9039.  
  9040.                   #include "winboss.h"
  9041.                   main()
  9042.                   {
  9043.                   MOUSEPTR ms;
  9044.                   int st, nc, row, col;
  9045.                        ms=mo_reset();           /* init mouse */
  9046.                        if(ms) {
  9047.                                                 /* fetch status */
  9048.                           mo_rcpos(ms, &st, &row, &col);
  9049.                           if(row != 0)          /* home the mouse ?? */
  9050.                             mo_locate(ms, 0, 0);
  9051.                           mo_show(ms);          /* show mouse */
  9052.                           do {                  /* loop till release */
  9053.                             mo_wait(ms);        /* let mouse settle */
  9054.                             mo_release(ms, MO_LEFT, &st, &nc, &row, &col);
  9055.                           } while(!nc); 
  9056.                           mo_hide(ms);          /* hide mouse */
  9057.                           exit(0);              /* finito */
  9058.                        }
  9059.                        else {
  9060.                             ... no mouse
  9061.                        }
  9062.                   }
  9063.                   /* End */
  9064.  
  9065.              Note use of POINTERS.
  9066.  
  9067.              The mouse device driver waits for the user to RELEASE the 
  9068.              specified button before it updates the internal counters.
  9069.  
  9070.              MO_LEFT and MO_RIGHT are defined in "winboss.h"
  9071.  
  9072.              Calling mo_release clears the mouse's pressed button history 
  9073.              counters.
  9074.  
  9075.              Also see "mo_rbinfo", "mo_pbinfo", "mo_press"
  9076.  
  9077.  
  9078.  
  9079.  
  9080.  
  9081.  
  9082.  
  9083.  
  9084.  
  9085.  
  9086.  
  9087.  
  9088.  
  9089.                                    149
  9090.  
  9091.  
  9092.  
  9093.         10.92. mo_reigon -- set mouse region
  9094.  
  9095.         USAGE
  9096.  
  9097.              mo_reigon(ms, row, col, width, height)
  9098.              MOUSEPTR ms;
  9099.              int row, col, width, height;
  9100.  
  9101.                   ms     - mouse pointer
  9102.                   row    - upper left hand corner row
  9103.                   col    - upper left hand corner column
  9104.                   width  - width of region (# of columns 1 to 80)
  9105.                   height - height of region (# of rows 1 to 25)
  9106.  
  9107.              mo_reigon defines the boundaries of where the mouse may 
  9108.              move.  Establishes a fence/cage around the mouse.
  9109.  
  9110.         RETURNS
  9111.  
  9112.              Nothing.
  9113.  
  9114.         CAUTIONS and ADDITIONAL NOTES
  9115.  
  9116.              Example:
  9117.  
  9118.                   #include "winboss.h"
  9119.                   main()
  9120.                   {
  9121.                   MOUSEPTR ms;
  9122.                   int st, nc, row, col;
  9123.                        ms=mo_reset();           /* init mouse */
  9124.                        if(ms) {
  9125.                                                 /* fetch status */
  9126.                           mo_rcpos(ms, &st, &row, &col);
  9127.                           if(row != 0)          /* home the mouse ?? */
  9128.                             mo_locate(ms, 0, 0);
  9129.                           mo_reigon(ms, 0, 0, 40, 12); /* 40x12 */
  9130.                           mo_show(ms);          /* show mouse */
  9131.                           do {                  /* loop till release */
  9132.                             mo_wait(ms);        /* let mouse settle */
  9133.                             mo_release(ms, MO_LEFT, &st, &nc, &row, &col);
  9134.                           } while(!nc); 
  9135.                           mo_hide(ms);          /* hide mouse */
  9136.                           exit(0);              /* finito */
  9137.                        }
  9138.                        else {
  9139.                             ... no mouse
  9140.                        }
  9141.                   }
  9142.                   /* End */
  9143.  
  9144.  
  9145.  
  9146.  
  9147.  
  9148.  
  9149.  
  9150.                                    150
  9151.  
  9152.  
  9153.  
  9154.         10.93. mo_setptr -- set mouse pointer and attributes
  9155.  
  9156.         USAGE
  9157.  
  9158.              mo_setptr(ms, tchar, atrib)
  9159.              MOUSEPTR ms;
  9160.              unsigned int tchar, atrib;
  9161.  
  9162.                   ms    - mouse handle
  9163.                   tchar - character to be used as the mouse cursor, valid 
  9164.                           range is 0 to 255 although a value of 0 makes 
  9165.                           no sense at all!
  9166.                   atrib - attribute to be used.  The attribute byte 
  9167.                           contains the background specific data in the 
  9168.                           upper 4 bits and the foreground specific data 
  9169.                           in the lower 4 bits.  Color and bit definitions 
  9170.                           can be found in winboss.h. You can use a 
  9171.                           statement as follows to set atrib:
  9172.  
  9173.                             atrib = (bground << 4 | fground);
  9174.  
  9175.         RETURNS
  9176.  
  9177.              Nothing.
  9178.  
  9179.         CAUTIONS and ADDITIONAL NOTES
  9180.  
  9181.              To set the mouse cursor to a white happy face on a backgound 
  9182.              use the following:
  9183.  
  9184.                   atrib = BLACK<<4 | WHITE;
  9185.                   mo_setptr(ms, 0x03, atrib);
  9186.  
  9187.              Attributes are defined in winboss.h.
  9188.  
  9189.  
  9190.  
  9191.  
  9192.  
  9193.  
  9194.  
  9195.  
  9196.  
  9197.  
  9198.  
  9199.  
  9200.  
  9201.  
  9202.  
  9203.  
  9204.  
  9205.  
  9206.  
  9207.  
  9208.  
  9209.  
  9210.  
  9211.                                    151
  9212.  
  9213.  
  9214.  
  9215.         10.94. mo_wait -- wait for mouse to settle
  9216.  
  9217.         USAGE
  9218.  
  9219.              mo_wait(ms)
  9220.              MOUSEPTR ms;
  9221.  
  9222.                   ms - mouse handle.
  9223.  
  9224.              Calling mo_wait causes your progam to pause until the mouse 
  9225.              has settled - completely stopped and with its buttons up and 
  9226.              no activity in progress.  
  9227.  
  9228.         RETURNS
  9229.  
  9230.              Nothing.
  9231.  
  9232.         CAUTIONS and ADDITIONAL NOTES
  9233.  
  9234.              Example:
  9235.  
  9236.                   #include "winboss.h"
  9237.                   main()
  9238.                   {
  9239.                   MOUSEPTR ms;
  9240.                   int st, nc, row, col;
  9241.                   unsigned atrib;
  9242.                        ms=mo_reset();           /* init mouse */
  9243.                        if(ms) {                 /* fetch status */
  9244.                           mo_rcpos(ms, &st, &row, &col);
  9245.                           if(row != 0)          /* home the mouse ?? */
  9246.                             mo_locate(ms, 0, 0);
  9247.                           mo_reigon(ms, 0, 0, 40, 12); /* 40x12 */
  9248.                           atrib = BLACK<<4 | WHITE;
  9249.                           mo_setptr(ms, 0x03, atrib);
  9250.                           mo_show(ms);          /* show mouse */
  9251.                           do {                  /* loop till release */
  9252.                             mo_wait(ms);        /* let mouse settle */
  9253.                             mo_release(ms, MO_LEFT, &st, &nc, &row, &col);
  9254.                           } while(!nc); 
  9255.                           mo_hide(ms);          /* hide mouse */
  9256.                           exit(0);              /* finito */
  9257.                        }
  9258.                        else {
  9259.                             ... no mouse
  9260.                        }
  9261.                   }
  9262.                   /* End */
  9263.  
  9264.  
  9265.  
  9266.  
  9267.  
  9268.  
  9269.  
  9270.  
  9271.  
  9272.                                    152
  9273.  
  9274.  
  9275.  
  9276.         10.95. mo_nbutt -- get mouse button count
  9277.  
  9278.         USAGE
  9279.  
  9280.              (int) mo_nbutt(ms)
  9281.              MOUSEPTR ms;
  9282.  
  9283.                   ms - mouse handle
  9284.  
  9285.         RETURNS
  9286.  
  9287.              Number of buttons on mouse.
  9288.  
  9289.         CAUTIONS and ADDITIONAL NOTES
  9290.  
  9291.              None.
  9292.  
  9293.  
  9294.  
  9295.  
  9296.  
  9297.  
  9298.  
  9299.  
  9300.  
  9301.  
  9302.  
  9303.  
  9304.  
  9305.  
  9306.  
  9307.  
  9308.  
  9309.  
  9310.  
  9311.  
  9312.  
  9313.  
  9314.  
  9315.  
  9316.  
  9317.  
  9318.  
  9319.  
  9320.  
  9321.  
  9322.  
  9323.  
  9324.  
  9325.  
  9326.  
  9327.  
  9328.  
  9329.  
  9330.  
  9331.  
  9332.  
  9333.                                    153
  9334.  
  9335.  
  9336.  
  9337.         10.96. _getca -- get character and attribute
  9338.  
  9339.         USAGE
  9340.  
  9341.           unsigned int _getca(page, row, col)
  9342.           int page, row, col;
  9343.  
  9344.  
  9345.                 page - video page #
  9346.                 row -  row value (0-24)
  9347.                 col -  column value (0-79)
  9348.  
  9349.           _getca fetches the character and attribute at the screen 
  9350.           coordinates defined by row and column.  _getca is a general 
  9351.           purpose routine and can be used outside of the window 
  9352.           environment.
  9353.  
  9354.         RETURNS
  9355.  
  9356.           The character and attribute as an unsigned int.  The attribute 
  9357.           is in the upper byte, the character is in the lower byte.
  9358.  
  9359.         CAUTIONS and ADDITIONAL NOTES
  9360.  
  9361.           None.
  9362.  
  9363.  
  9364.  
  9365.         10.97. _putca -- put character and attribute 
  9366.  
  9367.         USAGE
  9368.  
  9369.           _putca(page, atch, row, col);
  9370.           int page, row, col;
  9371.           unsigned atch;
  9372.  
  9373.                 page - video page #
  9374.                 atch - attribute and character
  9375.                          attribute in high order byte
  9376.                          character in low order byte
  9377.                 row -  row position for character (0-24)
  9378.                 col -  column position for character (0-79)
  9379.  
  9380.           _putch is a general purpose routine that can be used outside of 
  9381.           the window environment.
  9382.  
  9383.         RETURNS
  9384.  
  9385.           Nothing.
  9386.  
  9387.         CAUTIONS and ADDITIONAL NOTES
  9388.  
  9389.           None.
  9390.  
  9391.  
  9392.  
  9393.  
  9394.                                    154
  9395.  
  9396.  
  9397.  
  9398.         10.98. _vidblt -- video block transfer
  9399.  
  9400.         USAGE
  9401.  
  9402.           _vidblt(sseg, soff, dseg, doff, n);
  9403.           unsigned sseg, soff, dseg, doff;
  9404.           int n;
  9405.  
  9406.                 sseg - source segment
  9407.                 soff - source offset
  9408.                 dseg - destination segment
  9409.                 doff - destination offset
  9410.                 n -    number of bytes to BLT
  9411.  
  9412.           _vidblt is similar to the lattice movedata() function except 
  9413.           that it waits for the video retrace signal before performing 
  9414.           the block transfer.
  9415.  
  9416.           _vidblt is a general purpose function that can be used outside 
  9417.           of the window environment.
  9418.  
  9419.         RETURNS
  9420.  
  9421.           Nothing
  9422.  
  9423.         CAUTIONS and ADDITIONAL NOTES
  9424.  
  9425.           For use in color systems only.
  9426.  
  9427.           _vidblt references wn_sbit.
  9428.  
  9429.  
  9430.  
  9431.         10.99. v_spage -- set active display page
  9432.  
  9433.         USAGE
  9434.  
  9435.           v_spage(page)
  9436.           int page;
  9437.  
  9438.                 page - video page to switch the display to
  9439.  
  9440.           v_spage is a general purpose routine that can be used outside 
  9441.           of the window environment.  
  9442.  
  9443.         RETURNS
  9444.  
  9445.           Nothing.
  9446.  
  9447.         CAUTIONS and ADDITIONAL NOTES
  9448.  
  9449.           Color card only.
  9450.  
  9451.  
  9452.  
  9453.  
  9454.  
  9455.                                    155
  9456.  
  9457.  
  9458.  
  9459.         10.100. v_cls -- clear entire video screen 
  9460.  
  9461.         USAGE
  9462.  
  9463.           v_cls(atrib)
  9464.           int atrib;
  9465.  
  9466.                 atrib - attribute to be used 
  9467.  
  9468.           v_cls clears the entire video screen to the specified attribute 
  9469.           and places the cursor in the upper left hand corner of the 
  9470.           screen.
  9471.  
  9472.           v_cls is a general purpose routine that can be used outside of 
  9473.           the window environment.
  9474.  
  9475.           Attributes are defined in winboss.h.
  9476.  
  9477.         RETURNS
  9478.  
  9479.           Nothing.
  9480.  
  9481.         CAUTIONS and ADDITIONAL NOTES
  9482.  
  9483.           References Window BOSS globals defined in "winboss.ext".
  9484.  
  9485.  
  9486.  
  9487.         10.101. v_smode -- set video mode
  9488.  
  9489.         USAGE
  9490.  
  9491.           v_smode(mode)
  9492.           int mode;
  9493.  
  9494.                 mode - mode to set the display to
  9495.  
  9496.           v_smode is a general purpose routine which can be used outside 
  9497.           of the window environment.
  9498.  
  9499.           Modes are defined in winboss.h.
  9500.  
  9501.         RETURNS
  9502.  
  9503.           Nothing.
  9504.  
  9505.         CAUTIONS and ADDITIONAL NOTES
  9506.  
  9507.           None.
  9508.  
  9509.  
  9510.  
  9511.  
  9512.  
  9513.  
  9514.  
  9515.  
  9516.                                    156
  9517.  
  9518.  
  9519.  
  9520.         10.102. v_wca -- write character and attribute
  9521.  
  9522.         USAGE
  9523.  
  9524.           v_wca(page, char, atrib, count);
  9525.           int page, char, atrib, count;
  9526.  
  9527.                 page -  video page #
  9528.                 char -  character to write
  9529.                 atrib - attribute to use
  9530.                 count - number of times to repeat
  9531.  
  9532.           v_wca writes the character defined by char count times starting 
  9533.           at the current cursor location.     
  9534.  
  9535.           v_wca is a general purpose routine that can be used outside of 
  9536.           the window environment. 
  9537.  
  9538.           Attributes are defined in winboss.h.
  9539.  
  9540.         RETURNS
  9541.  
  9542.           Nothing.
  9543.  
  9544.         CAUTIONS and ADDITIONAL NOTES
  9545.  
  9546.           None.
  9547.  
  9548.  
  9549.  
  9550.         10.103. v_wtty -- write character TTY mode
  9551.  
  9552.         USAGE
  9553.  
  9554.           v_wtty(char);
  9555.           int  char;
  9556.  
  9557.                 char -  character to write
  9558.  
  9559.         v_wtty writes the character defined by char at the current cursor 
  9560.         location.  
  9561.  
  9562.           v_wtty is a general purpose routine that can be used outside of 
  9563.           the window environment. 
  9564.  
  9565.         RETURNS
  9566.  
  9567.           Nothing.
  9568.  
  9569.         CAUTIONS and ADDITIONAL NOTES
  9570.  
  9571.           None.
  9572.  
  9573.  
  9574.  
  9575.  
  9576.  
  9577.                                    157
  9578.  
  9579.  
  9580.  
  9581.         10.104. v_locate -- locate (position) cursor
  9582.  
  9583.         USAGE
  9584.  
  9585.           v_locate(page, row, col);
  9586.           int page, row, col;
  9587.  
  9588.                 page - video page #
  9589.                 row  - row to position to
  9590.                 col  - column to position to
  9591.           
  9592.           v_locate positions the cursor to the absolute coordinates 
  9593.           specified by row and col on the specified page.  The upper left 
  9594.           hand corner of the screen is (0,0).
  9595.  
  9596.           v_locate is a general purpose routine that can be used outside 
  9597.           of the window environment.
  9598.  
  9599.           Row and Col are range checked.  You CAN position the cursor 
  9600.           slightly (25,80) off the screen.
  9601.  
  9602.         RETURNS
  9603.  
  9604.           Nothing.
  9605.  
  9606.         CAUTIONS and ADDITIONAL NOTES
  9607.  
  9608.           References Window BOSS globals defined in "winboss.ext".
  9609.  
  9610.  
  9611.  
  9612.         10.105. v_hidec -- hide cursor
  9613.  
  9614.         USAGE
  9615.  
  9616.           v_hidec();
  9617.  
  9618.           The physical cursor is located off the screen.
  9619.  
  9620.           This function does not affect any virtual cursor coordinates, 
  9621.           it simply hides the physical cursor from view.
  9622.  
  9623.         RETURNS
  9624.  
  9625.           Nothing.
  9626.  
  9627.         CAUTIONS and ADDITIONAL NOTES
  9628.  
  9629.           References Window BOSS globals defined in "winboss.ext".
  9630.  
  9631.  
  9632.  
  9633.  
  9634.  
  9635.  
  9636.  
  9637.  
  9638.                                    158
  9639.  
  9640.  
  9641.  
  9642.         10.106. v_sctype -- set cursor type (style)
  9643.         10.107. v_gctype -- get cursor type (style)
  9644.  
  9645.         USAGE
  9646.  
  9647.           v_sctype(type, start, end);
  9648.           int type, start, end;
  9649.  
  9650.                 type -  cursor style code 
  9651.                         (0=hidden, 1=normal, 2=slow, 3=fast)
  9652.                 start - start scan line
  9653.                 end -   end scan line
  9654.  
  9655.                   As an example, to set a slow flashing block style 
  9656.                   cursor invoke this function with type=1, start=6, and 
  9657.                   end=12 (color card).
  9658.  
  9659.                        v_sctype(1, 6, 12);
  9660.  
  9661.           v_gctype(page, start, end);
  9662.           int page, *start, *end;                    <- NOTE POINTERS
  9663.              
  9664.                 page -  always 0
  9665.                 start - start scan line
  9666.                 end -   end scan line
  9667.  
  9668.         RETURNS
  9669.  
  9670.           Nothing (v_sctype).
  9671.  
  9672.           Start and end scan line via pointers (v_gctype).
  9673.  
  9674.         CAUTIONS and ADDITIONAL NOTES
  9675.  
  9676.           None.
  9677.  
  9678.  
  9679.  
  9680.  
  9681.  
  9682.  
  9683.  
  9684.  
  9685.  
  9686.  
  9687.  
  9688.  
  9689.  
  9690.  
  9691.  
  9692.  
  9693.  
  9694.  
  9695.  
  9696.  
  9697.  
  9698.  
  9699.                                    159
  9700.  
  9701.  
  9702.  
  9703.         10.108. v_sapu -- scroll active display page up
  9704.  
  9705.         USAGE
  9706.  
  9707.           v_sapu(nl, rul, cul, rlr, clr, atrib);
  9708.           int nl, rul, cul, rlr, clr, atrib;
  9709.  
  9710.                 nl  - number of lines to scroll
  9711.                 rul - row of upper left hand corner of scroll area
  9712.                 cul - column of upper left hand corner of scroll area
  9713.                 rlr - row of lower right corner of scroll area
  9714.                 clr - column of lower right corner of scroll area
  9715.                 atrib - attribute to be used for blanking
  9716.  
  9717.           A value of 0 for nl scrolls (blanks) the entire area.  To clear 
  9718.           the entire video screen use v_sapu(0, 0, 0, 24, 79, NORMAL).
  9719.  
  9720.           v_sapu is a general purpose routine that can be used outside of 
  9721.           the window environment.  
  9722.  
  9723.           Attributes are defined in winboss.h.
  9724.  
  9725.         RETURNS
  9726.  
  9727.           Nothing.
  9728.  
  9729.         CAUTIONS and ADDITIONAL NOTES
  9730.  
  9731.           None.
  9732.  
  9733.  
  9734.  
  9735.  
  9736.  
  9737.  
  9738.  
  9739.  
  9740.  
  9741.  
  9742.  
  9743.  
  9744.  
  9745.  
  9746.  
  9747.  
  9748.  
  9749.  
  9750.  
  9751.  
  9752.  
  9753.  
  9754.  
  9755.  
  9756.  
  9757.  
  9758.  
  9759.  
  9760.                                    160
  9761.  
  9762.  
  9763.  
  9764.         10.109. v_sapd -- scroll active display page down
  9765.  
  9766.         USAGE
  9767.  
  9768.           v_sapd(nl, rul, cul, rlr, clr, atrib);
  9769.           int nl, rul, cul, rlr, clr, atrib;
  9770.  
  9771.                 nl  - number of lines to scroll
  9772.                 rul - row of upper left hand corner of scroll area
  9773.                 cul - column of upper left hand corner of scroll area
  9774.                 rlr - row of lower right corner of scroll area
  9775.                 clr - column of lower right corner of scroll area
  9776.                 atrib - attribute to be used for blanking
  9777.  
  9778.           v_sapd is a general purpose routine that can be used outside of 
  9779.           the window environment.  
  9780.  
  9781.           A value of 0 for nl scrolls (blanks) the entire area.  To clear 
  9782.           the entire video screen use v_sapd(0, 0, 0, 24, 79, NORMAL).
  9783.  
  9784.           Attributes are defined in winboss.h.
  9785.  
  9786.         RETURNS
  9787.  
  9788.           Nothing.
  9789.  
  9790.         CAUTIONS and ADDITIONAL NOTES
  9791.  
  9792.           None.
  9793.  
  9794.  
  9795.         10.110. v_rcpos -- return current cursor position
  9796.  
  9797.         USAGE
  9798.  
  9799.           v_rcpos(page, row, col);
  9800.           int page;
  9801.           int *row, *col;       /* POINTERS */
  9802.  
  9803.                 int page - video page #     
  9804.                 int *row - pointer to int to receive row value
  9805.                 int *col - pointer to int to receive column value
  9806.  
  9807.           v_rcpos is a general purpose routine that can be used outside 
  9808.           of the window environment.  
  9809.  
  9810.         RETURNS
  9811.  
  9812.           Nothing.
  9813.  
  9814.         CAUTIONS and ADDITIONAL NOTES
  9815.  
  9816.           None.
  9817.  
  9818.  
  9819.  
  9820.  
  9821.                                    161
  9822.  
  9823.  
  9824.  
  9825.         10.111. v_rcvs -- return current video state
  9826.  
  9827.         USAGE
  9828.  
  9829.           v_rcvs(page, vm, cols);
  9830.           int *page, *vm, *cols;        /* POINTERS */
  9831.  
  9832.                 int *page - pointer to int to receive current video page #
  9833.                 int *vm   - pointer to int to receive current video mode
  9834.                 int *cols - pointer to int to receive current screen width
  9835.           
  9836.           v_rcvs is a general purpose routine that can be used outside of 
  9837.           the window environment.
  9838.  
  9839.           Modes are defined in winboss.h.
  9840.  
  9841.         RETURNS
  9842.  
  9843.           Nothing.
  9844.  
  9845.         CAUTIONS and ADDITIONAL NOTES
  9846.  
  9847.           None.
  9848.  
  9849.  
  9850.  
  9851.         10.112. v_getch -- get keyboard character and scan code
  9852.  
  9853.         USAGE
  9854.  
  9855.           v_getch();
  9856.  
  9857.           v_getch is a general purpose routine that can be used outside 
  9858.           of the window environment.
  9859.  
  9860.         RETURNS
  9861.  
  9862.           The character and scan code.  The character is in the low order 
  9863.           byte, the scan code in the high order byte.
  9864.  
  9865.         CAUTIONS and ADDITIONAL NOTES
  9866.  
  9867.           v_getch waits for a key to be struck.
  9868.  
  9869.  
  9870.  
  9871.  
  9872.  
  9873.  
  9874.  
  9875.  
  9876.  
  9877.  
  9878.  
  9879.  
  9880.  
  9881.  
  9882.                                    162
  9883.  
  9884.  
  9885.  
  9886.         10.113. v_kstat -- get keyboard status
  9887.  
  9888.         USAGE
  9889.  
  9890.           v_kstat();
  9891.  
  9892.           v_kstat is a general purpose routine that can be used outside 
  9893.           of the window environment.
  9894.  
  9895.         RETURNS
  9896.  
  9897.           TRUE if a character is available, FALSE if not.
  9898.  
  9899.         CAUTIONS and ADDITIONAL NOTES
  9900.  
  9901.           None.
  9902.  
  9903.  
  9904.  
  9905.         10.114. v_kflush -- flush keyboard buffer
  9906.  
  9907.         USAGE
  9908.  
  9909.           v_kflush();
  9910.  
  9911.           v_kflush clears the keyboard buffer of any pending input.
  9912.  
  9913.         RETURNS
  9914.  
  9915.           Nothing.
  9916.  
  9917.         CAUTIONS and ADDITIONAL NOTES
  9918.  
  9919.           None.
  9920.  
  9921.  
  9922.  
  9923.         10.115. v_border -- set border color
  9924.  
  9925.         USAGE
  9926.  
  9927.           v_border(color)
  9928.           int color;
  9929.  
  9930.              Set overscan border to specified color. 
  9931.  
  9932.         RETURNS
  9933.  
  9934.           Nothing.
  9935.  
  9936.         CAUTIONS and ADDITIONAL NOTES
  9937.  
  9938.           None.
  9939.  
  9940.  
  9941.  
  9942.  
  9943.                                    163
  9944.  
  9945.  
  9946.  
  9947.         10.116. v_setatr -- set color attribute
  9948.  
  9949.         USAGE
  9950.  
  9951.           v_setatr(bg, fg, blink, bold)
  9952.           int bg, fg, blink, bold;
  9953.  
  9954.              bg   -    background color
  9955.              fg   -    foreground color
  9956.              bold -    bold flag
  9957.                          BOLD if bold is desired
  9958.                          FALSE or 0 if bold is not desired
  9959.              blink -   blink flag
  9960.                          BLINK if blink is desired
  9961.                          FALSE or 0 if blink is not desired
  9962.  
  9963.         RETURNS
  9964.  
  9965.           Nothing.
  9966.  
  9967.         CAUTIONS and ADDITIONAL NOTES
  9968.  
  9969.           BLINK, BOLD, FALSE, and all colors are defined in winboss.h
  9970.  
  9971.           BLINK and BOLD apply to foreground colors only.  
  9972.  
  9973.           Example:
  9974.  
  9975.              watrib = v_setatr(WHITE,BLUE,0,BOLD);
  9976.              batrib = v_setatr(WHITE,RED,0,BOLD);
  9977.              wn_open(0, 0, 0, 10, 10, watrib, batrib);
  9978.  
  9979.         10.117. v_setrev -- set reverse attribute
  9980.  
  9981.         USAGE
  9982.  
  9983.           v_setrev(atrib)
  9984.           int atrib;
  9985.  
  9986.              atrib   -    current attribute 
  9987.  
  9988.         RETURNS
  9989.  
  9990.           Reverse video of current attribute.
  9991.  
  9992.         CAUTIONS and ADDITIONAL NOTES
  9993.  
  9994.           See wn_popup for example usage.
  9995.  
  9996.  
  9997.  
  9998.  
  9999.  
  10000.  
  10001.  
  10002.  
  10003.  
  10004.                                    164
  10005.  
  10006.  
  10007.  
  10008.         11. Registration Form
  10009.  
  10010.                                 Registration Form
  10011.                             Star Guidance Consulting
  10012.                                  273 Windy Drive 
  10013.                           Waterbury, Connecticut 06705
  10014.                                  (203) 574-2449
  10015.  
  10016.  
  10017.            Company Name:       _______________________________________
  10018.  
  10019.            Name:               _______________________________________
  10020.  
  10021.            Address:            _______________________________________
  10022.  
  10023.                                _______________________________________
  10024.  
  10025.            City, State, Zip:   _______________________________________
  10026.  
  10027.            Country:            _______________________________________
  10028.  
  10029.            Phone:              _______________________________________  
  10030.  
  10031.  
  10032.                   ___ Library Source @ $55.00 USD      $________._____
  10033.                   ___ Shareware      @ $20.00 USD      $________._____
  10034.                       Shipping (Outside USA) $7.00 USD $________._____
  10035.                       Shipping (USA)         $6.00 USD $________._____
  10036.                       Connecticut Sales Tax 6.0%       $________._____ *
  10037.                       (Connecticut residents only)  * 
  10038.                                            TOTAL ------>________._____
  10039.  
  10040.            
  10041.            Favorite compiler: Microsoft C,  Microsoft Quick C
  10042.            (Circle one)       Borland Turbo C++, Borland C++
  10043.  
  10044.  
  10045.            MasterCard/Visa: ______________________ Exp Date: ____/____
  10046.            (Circle one)
  10047.  
  10048.            Printed Name:    __________________________________________
  10049.            (On Card)
  10050.                    
  10051.            Signature:       ______________________ Date:____/____/____
  10052.            (Of Card Holder)
  10053.  
  10054.            All funds must be in US Dollars, Call for UPS COD (USA only),
  10055.            Personal and Company Checks Accepted. all checks must be drawn 
  10056.            against a US Bank and payable in US Dollars.
  10057.  
  10058.  
  10059.  
  10060.  
  10061.  
  10062.  
  10063.  
  10064.  
  10065.                                    165
  10066.  
  10067.  
  10068.  
  10069.  
  10070.         A
  10071.         ASMFILES.EXE, 31
  10072.  
  10073.         B
  10074.         Bad Handle Exits, 41
  10075.         Basics
  10076.           Forms, 5
  10077.           Mouse, 20
  10078.           Windows, 5
  10079.         BC3.EXE, 31, 34
  10080.         BC4.EXE, 31, 34
  10081.         BIOS, 43
  10082.         Borland C++, 53
  10083.         Borland Turbo C, 45
  10084.         Borland Turbo C++, 45
  10085.         BOSS_DOC.EXE, 27, 28
  10086.         BOSS_LB1.EXE, 27, 28, 29, 37
  10087.         BOSS_LB2, 30
  10088.         BOSS_LB2.EXE, 27, 28
  10089.         BOSS_LB3, 30
  10090.         BOSS_LB3.EXE, 27, 28
  10091.         BOSS_SUP.EXE, 27, 28, 29, 37
  10092.         Bulletin Board
  10093.           Files, 27
  10094.           Support, 27
  10095.  
  10096.         C
  10097.         CFILES.EXE, 31, 32, 33
  10098.         CSM.BAT, 38
  10099.  
  10100.         D
  10101.         Data Entry (Basics), 7
  10102.         DEMO.EXE, 31
  10103.         DOC.EXE, 31
  10104.  
  10105.         F
  10106.         fields, 24
  10107.         Fixup Errors, 40
  10108.         FLASH, 43
  10109.         forms, 24
  10110.           closing, 24
  10111.         Forms (Basics), 8
  10112.  
  10113.         G
  10114.         GENINDEX, 15, 16, 18, 124
  10115.         Globals, 43
  10116.  
  10117.         H
  10118.         Help System
  10119.           Basics, 15
  10120.           Notes, 17, 18
  10121.  
  10122.  
  10123.  
  10124.  
  10125.  
  10126.                                    166
  10127.  
  10128.  
  10129.  
  10130.         I
  10131.         INCLUDE Files, 38, 39
  10132.  
  10133.         L
  10134.         LDATA, 53
  10135.         LPROG, 53
  10136.         LWIN.LIB, 37
  10137.         LZH Files, 27
  10138.  
  10139.         M
  10140.         macros.asm, 53
  10141.         Microsoft C, 44
  10142.         Microsoft Quick C, 44
  10143.         mitem, 10
  10144.         Mouse (Basics), 20, 21, 22
  10145.         mo_clim, 136
  10146.         mo_hide, 131
  10147.         mo_locate, 145
  10148.         mo_lpoff, 142
  10149.         mo_lpon, 142
  10150.         mo_motion, 140
  10151.         mo_move, 133
  10152.         mo_nbutt, 153
  10153.         mo_pbinfo, 134
  10154.         mo_pos, 132
  10155.         mo_press, 146
  10156.         mo_ratio, 142
  10157.         mo_rbinfo, 135
  10158.         mo_rcpos, 143
  10159.         mo_reigon, 150
  10160.         mo_release, 148
  10161.         mo_reset, 129
  10162.         mo_rlim, 136
  10163.         mo_scursor, 138
  10164.         mo_setptr, 151
  10165.         mo_sgcursor, 137
  10166.         mo_show, 130
  10167.         mo_task, 141
  10168.         mo_wait, 152
  10169.         MSC7.EXE, 31, 35
  10170.         MSC8.EXE, 31, 35
  10171.         MSQC25.EXE, 31, 35
  10172.         msvlib.asm, 53
  10173.  
  10174.         O
  10175.         Offset Errors, 40
  10176.  
  10177.         P
  10178.         PAINT, 43
  10179.         pmenu, 10, 11, 12
  10180.         Popup Menus (Basics), 9
  10181.  
  10182.  
  10183.  
  10184.  
  10185.  
  10186.  
  10187.                                    167
  10188.  
  10189.  
  10190.  
  10191.         R
  10192.         REVHST.EXE, 31
  10193.  
  10194.         S
  10195.         Shareware Diskette, 27
  10196.         Source Diskette, 27
  10197.         Support, 3
  10198.         Support Services, 3
  10199.           Internet, 4
  10200.         SWIN.LIB, 37
  10201.  
  10202.         T
  10203.         TC201.EXE, 31, 34
  10204.         TCPP.EXE, 31, 34
  10205.         tcvlib.asm, 53
  10206.         Turbo C++, 53
  10207.  
  10208.         U
  10209.         Unresolved Externals, 40
  10210.  
  10211.         V
  10212.         video attributes, 23
  10213.         v_border, 163
  10214.         v_cls, 156
  10215.         v_gctype, 159
  10216.         v_getch, 162
  10217.         v_hidec, 158
  10218.         v_kflush, 163
  10219.         v_kstat, 163
  10220.         v_locate, 158
  10221.         v_rcpos, 161
  10222.         v_rcvs, 162
  10223.         v_sapd, 161
  10224.         v_sapu, 160
  10225.         v_sctype, 159
  10226.         v_setatr, 164
  10227.         v_setrev, 164
  10228.         v_smode, 156
  10229.         v_spage, 155
  10230.         v_wca, 157
  10231.         v_wtty, 157
  10232.  
  10233.         W
  10234.         WATCOM.EXE, 31, 36
  10235.         wcvlib.asm, 53
  10236.         WINBOSS.EXT, 38, 39, 43
  10237.         WINBOSS.FN7, 38
  10238.         WINBOSS.FN8, 38
  10239.         WINBOSS.FNS, 38, 39
  10240.         WINBOSS.H, 38, 39
  10241.         window handles, 23
  10242.         window origin, 23
  10243.         windows
  10244.           closing, 24
  10245.           overlapping, 25
  10246.  
  10247.  
  10248.                                    168
  10249.  
  10250.  
  10251.  
  10252.           tiled, 25
  10253.         Windows (Basics), 6
  10254.         WINDOWS.C, 43
  10255.         wns_escape, 43
  10256.         wn_activate, 72
  10257.         wn_boxset, 77
  10258.         wn_close, 63
  10259.         wn_clr, 72
  10260.         wn_color, 73
  10261.         wn_dborder, 78
  10262.         wn_delrow, 71
  10263.         wn_dma, 76
  10264.         wn_dmaflg, 43
  10265.         wn_dmode, 43, 57
  10266.         wn_dtext, 117
  10267.         wn_exit, 56
  10268.         wn_fixcsr, 76
  10269.         wn_frmcls, 86
  10270.         wn_frmget, 85
  10271.         wn_frmopn, 84
  10272.         wn_gatext, 97
  10273.         wn_gbool, 115
  10274.         wn_gdate, 87
  10275.         wn_gdouble, 113
  10276.         wn_gedate, 89
  10277.         wn_getca, 70
  10278.         wn_gets, 68
  10279.         wn_gfloat, 111
  10280.         wn_gint, 103
  10281.         wn_glong, 107
  10282.         wn_gltext, 97
  10283.         wn_gmltext, 99
  10284.         wn_gphone, 93
  10285.         wn_gpword, 101
  10286.         wn_gssn, 95
  10287.         wn_gtext, 97
  10288.         wn_gtime, 91
  10289.         wn_guint, 105
  10290.         wn_gulong, 109
  10291.         wn_gutext, 97
  10292.         wn_help, 125
  10293.         wn_hlinit, 15, 16, 122
  10294.         wn_iemsg, 118
  10295.         wn_ihmsg, 119
  10296.         wn_init, 56
  10297.         wn_input, 79
  10298.         wn_insrow, 71
  10299.         wn_locate, 65
  10300.         wn_move, 64
  10301.         wn_natrib, 77
  10302.         wn_open, 58
  10303.         wn_pmenu, 13
  10304.         wn_popup, 9, 12, 120
  10305.         wn_printf, 66
  10306.         wn_psinit, 56
  10307.  
  10308.  
  10309.                                    169
  10310.  
  10311.  
  10312.  
  10313.         wn_putc, 67
  10314.         wn_putca, 69
  10315.         wn_puts, 67
  10316.         wn_putsa, 69
  10317.         wn_qpopup, 9, 13, 121
  10318.         wn_restore, 64
  10319.         wn_save, 63
  10320.         wn_sbit, 43
  10321.         wn_scenter, 127
  10322.         wn_scroll, 75
  10323.         wn_sdelspc, 128
  10324.         wn_shkey, 79, 80, 119
  10325.         wn_sleftj, 126
  10326.         wn_srightj, 126
  10327.         wn_stitla, 62
  10328.         wn_stitle, 61
  10329.         wn_strndx, 128
  10330.         wn_sync, 74
  10331.         wn_titla, 60
  10332.         wn_title, 60
  10333.         wn_wrap, 74
  10334.  
  10335.         _
  10336.         _getca, 154
  10337.         _putca, 154
  10338.         _vidblt, 155
  10339.  
  10340.         W
  10341.         wn_scroll, 43
  10342.  
  10343.  
  10344.  
  10345.  
  10346.  
  10347.  
  10348.  
  10349.  
  10350.  
  10351.  
  10352.  
  10353.  
  10354.  
  10355.  
  10356.  
  10357.  
  10358.  
  10359.  
  10360.  
  10361.  
  10362.  
  10363.  
  10364.  
  10365.  
  10366.  
  10367.  
  10368.  
  10369.  
  10370.                                    170
  10371.