home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / progm / flash-c1.zip / CH2_1.DOC < prev    next >
Text File  |  1990-02-11  |  30KB  |  1,133 lines

  1. ..pgno01
  2. ..foot63A2-##
  3. ..head02L──────────────────────────────────────────────────────────────────────
  4. ..head04L──────────────────────────────────────────────────────────────────────
  5. ..head03LDeclarations
  6. #define FPENTRY             pascal far
  7. #define PTR                 far *
  8.  
  9. typedef char                CHAR;
  10. typedef unsigned char       BYTE;
  11. typedef signed int          INT;
  12. typedef unsigned int        UINT;
  13. typedef signed short int    INT2;
  14. typedef unsigned short int  UINT2;
  15. typedef long                INT4;
  16. typedef unsigned long       UINT4;
  17. typedef float               REAL4;
  18. typedef double              REAL8;
  19. typedef unsigned int        WORD;
  20.  
  21.  
  22. BYTE CheckSnow     enables or disables snow-checking when reading or
  23.                    writing data directly to video memory.
  24.  
  25. BYTE TextAttr      global variable that contains the currently
  26.                    selected video attribute.
  27.  
  28. INT2 InsMode       global variable used by EditSt to indicate if the
  29.                    cursor is in insert or overwrite mode.
  30.  
  31. INT2 VioBaseSeg    contains the base segment address of the current
  32.                    video page.
  33.  
  34. INT2 VioCols       contains the screen width which is the total number
  35.                    of characters per line.
  36.  
  37. INT2 VioCursor     contains the size of the cursor with the starting
  38.                    scan line in the high byte and the ending scan line
  39.                    in the low byte.
  40.  
  41. INT2 VioPage       contains the active video page in use.  The value
  42.                    should always be zero for a monochrome adapter.
  43.  
  44. INT2 WindMax       defines the lower right corner of the window that
  45.                    is currenlty defined thru the use of the Window
  46.                    function.
  47.  
  48. INT2 WindMin       defines the upper left corner of the window that is
  49.                    currently defined thru the use of the Window
  50.                    function.
  51. ..page
  52. ..head03ABorderColor
  53. ■ Description
  54.  
  55.   Sets the color for the border screen.
  56.  
  57.  
  58. ■ Summary
  59.  
  60.   void FPENTRY BorderColor( INT Color );
  61.  
  62.   Color       defines the color of the border screen.
  63.  
  64.  
  65. ■ Remarks
  66.  
  67.   The following colors are allowed for the border color if you have a
  68.   Color/Graphics Monitor Adapter.  BorderColor does not have any
  69.   effect on a monochrome display.
  70.  
  71.   0  Black         8  Gray
  72.   1  Blue          9  Light Blue
  73.   2  Green        10  Light Green
  74.   3  Cyan         11  Light Cyan
  75.   4  Red          12  Light Red
  76.   5  Magenta      13  Light Magenta
  77.   6  Brown        14  Yellow
  78.   7  White        15  High-intensity White
  79.  
  80.  
  81. ■ Example
  82.  
  83.   #include <fpclib.h>
  84.  
  85.   main()
  86.   {
  87.      int i;
  88.  
  89.      VioInit();
  90.      for ( i = 0; i < 16; i++ ) {
  91.         BorderColor( i );
  92.         GetKey();
  93.      }
  94.   }
  95.  
  96.   In this example the sixteen available colors for the border will be
  97.   displayed. A new color will be displayed each time a key is pressed.
  98. ..page
  99. ..head03AClrWin
  100. ■ Description
  101.  
  102.   Clear window area with the specified color.
  103.  
  104.  
  105. ■ Summary
  106.  
  107.   void FPENTRY ClrWin( INT x1, INT y1, INT x2, INT y2, INT Attr );
  108.  
  109.   x1          left column of window.
  110.  
  111.   y1          top row of window.
  112.  
  113.   x2          right column of window.
  114.  
  115.   y2          bottom row of window.
  116.  
  117.   Attr        integer in the range 0-255 defining the foreground and
  118.               background byte combination for the color of the window.
  119.  
  120.  
  121. ■ Remarks
  122.  
  123.   This procedure will blank the window area for the window coordinates
  124.   that are passed.  ClrWin does not move the cursor from its current
  125.   position.
  126.  
  127.  
  128. ■ Example
  129.  
  130.   #include <fpclib.h>
  131.  
  132.   main()
  133.   {
  134.      VioInit();
  135.      ClrWin( 5, 5, 40, 20, 7 );
  136.   }
  137.  
  138.   When ClrWin is called in this example the window area (5,5,40,20)
  139.   will be cleared with the attribute value of 7.
  140. ..page
  141. ..head03AColorMsg
  142. ■ Description
  143.  
  144.   Display string on the screen using the color attribute specified.
  145.  
  146.  
  147. ■ Summary
  148.  
  149.   void FPENTRY ColorMsg( INT x, INT y, INT Attr, CHAR PTR Message );
  150.  
  151.   x           column to begin display of message.
  152.  
  153.   y           row to begin display of message.
  154.  
  155.   Attr        integer in the range 0-255.  It is the color to use for
  156.               displaying the message.
  157.  
  158.   Message     string message to be displayed.
  159.  
  160.  
  161. ■ Remarks
  162.  
  163.   ColorMsg is NOT sensitive to Turbo's currently defined window and
  164.   will wrap around to column one on the next line of the screen when
  165.   necessary. ColorMsg will not scroll the screen if the data to be
  166.   displayed is to extend beyond the last row of the screen.
  167.  
  168.  
  169. ■ See Also
  170.  
  171.   DspMsg, WriteSt, WriteStln
  172.  
  173. ..page
  174. ■ Example
  175.  
  176.   #include <fpclib.h>
  177.   #include <stdlib.h>
  178.   #include <string.h>
  179.  
  180.   main()
  181.   {
  182.      CHAR *p,st[30];
  183.      INT  i;
  184.  
  185.      VioInit();
  186.      ClrWin( 1, 1, 80, 25, 7 );
  187.      strcpy( st, "Color-line " );
  188.  
  189.      for ( i = 0; i <= 8; i++ ) {
  190.         st1[11] = '\0'
  191.         p = itoa( i, &st[11], 10 );
  192.         ColorMsg( 1, i+1, 1+i, st );
  193.         ColorMsg( 1, i+10, 48+i, st );
  194.      }
  195.   }
  196.  
  197.   This program example will display nine lines on the upper and lower
  198.   half of the screen.  The upper half of the screen will display black
  199.   as the background color. The lower half will use cyan as the
  200.   background color.
  201. ..page
  202. ..head03ADspMsg
  203. ■ Description
  204.  
  205.   Display string on the screen without changing the color attribute
  206.   that is currently on the display screen.
  207.  
  208.  
  209. ■ Summary
  210.  
  211.   void FPENTRY DspMsg( INT x, INT y, CHAR PTR Message );
  212.  
  213.   x           column to begin display of message.
  214.  
  215.   y           row to begin display of message.
  216.  
  217.   Message     string message to display.
  218.  
  219.  
  220. ■ Remarks
  221.  
  222.   DspMsg is NOT sensitive to Turbo's currently defined window and will
  223.   wrap around to column one on the next line of the screen when
  224.   necessary. DspMsg will not scroll the screen if the data to be
  225.   displayed is to extend beyond the last row of the screen.
  226.  
  227.  
  228. ■ See Also
  229.  
  230.   ColorMsg, WriteSt, WriteStln
  231.  
  232.  
  233. ■ Example
  234.  
  235.   #include <fpclib.h>
  236.   main()
  237.   {
  238.      INT i;
  239.  
  240.      VioInit();
  241.      ClrWin( 1, 1, 80, 25, 7 );
  242.      for ( i = 1; i <= 25; i++ )
  243.         FillRowAttr( 1, i, 80, i );
  244.      for ( i = 1; i <= 25; i++ )
  245.         DspMsg( 1, i, "This is a test message" );
  246.   }
  247.  
  248.   This program example will display a different attribute color to
  249.   each row of the display, then a message will be displayed on each
  250.   line without changing the attribute bytes that already exist on the
  251.   screen.
  252. ..page
  253. ..head03AEditSt
  254. ■ Description
  255.  
  256.   Edit an existing or null string from the keyboard.
  257.  
  258.  
  259. ■ Summary
  260.  
  261.   void FPENTRY EditSt( INT      Row,
  262.                        INT      StCol,
  263.                        INT      SpCol,
  264.                        INT      Len,
  265.                        INT      CharCase,
  266.                        INT      FillCh,
  267.                        INT      AutoSkip,
  268.                        UINT     ErrTone,
  269.                        UINT     ErrDur,
  270.                        CHAR PTR VCSet,
  271.                        CHAR PTR TCSet,
  272.                        INT  PTR ChOfs,
  273.                        INT  PTR TE,
  274.                        CHAR PTR St    );
  275.  
  276.   Row         defines row to edit string on.
  277.  
  278.   StCol       defines left or start column of field to edit. This
  279.               value must be less than or equal to SpCol.
  280.  
  281.   SpCol       defines right or stop column of the field to edit. This
  282.               value must be greater than or equal to StCol.
  283.  
  284.   Len         integer in the range of 1-255.  It is the maximum length
  285.               of the string to be edited.
  286.  
  287.   CharCase    integer in the range 1-3. The Case Mode indicator
  288.               defines how a character is displayed on the screen and
  289.               stored in the string variable being edited.
  290.                  1 = Do nothing to character
  291.                  2 = Convert all characters to upper case
  292.                  3 = Convert all characters to lower case
  293.  
  294.   FillCh      integer in the range of 0-255.  This defines the ascii
  295.               character that is displayed in the field for undefined
  296.               character positions in the field being edited.
  297.  
  298.   AutoSkip    integer indicating if an auto exit is desired when the
  299.               last character in the field has been typed.
  300.                  0 - No auto exit
  301.                  1 - Auto exit after last character in field is
  302.                      entered.
  303. ..page
  304.   ErrTone     integer in units giving the frequency for beeping the
  305.               speaker.
  306.  
  307.   ErrDur      integer in units giving the length of time the speaker
  308.               is to beep.
  309.  
  310.   VCSet       set of valid characters, [0..255], that will be accepted
  311.               for data entry.
  312.  
  313.   TCSet       set of extended keyboard characters, [0..255], that are
  314.               allowed to terminate this procedure. (Refer to appendix
  315.               C for a listing of these codes.)
  316.  
  317.   CharOfs     an integer that indicates the beginning cursor position
  318.               within the string.  If CharOfs is a 1 then editing will
  319.               begin in the first column of the field input area.  If
  320.               CharOfs is 256 or greater than the length of the string
  321.               to be edited, the cursor will be positioned after the
  322.               last character in the string. On exit from EditSt
  323.               CharOfs will contain the cursor position within the
  324.               string.
  325.  
  326.   TE          is the terminating element number that terminated the
  327.               string input procedure. TE will be in the range of 0-255
  328.               which corresponds to the element number in appendix C.
  329.  
  330.   St          string buffer area to receive the input data.
  331.  
  332.  
  333. ■ Remarks
  334.  
  335.   The maximum length of the string to edit is 255 characters.  The
  336.   data will be entered on one line. If the maximum length of the
  337.   string exceeds the number of display columns, SpCol - StCol + 1, the
  338.   string will scroll horizontally on the screen within the StCol and
  339.   SpCol columns.
  340. ..page
  341.  Editing Keys:
  342.     The following gives an explanation of the editing keys that may be
  343.     used with EditSt, provided the key pressed is not defined in the
  344.     terminating character set. EditSt calls the function GetKey, in
  345.     the unit SSGetKey, which returns an integer.  This integer is a
  346.     value from 0-384 which corresponds to an element number that is
  347.     defined in Appendix C.  The function GetKey is provided with a
  348.     table that maps the key element numbers to the index number.
  349.     Example, If the cursor is to move right one character position
  350.     using the Ctrl-D key combination the value for Ctrl-D index key
  351.     (element number 136) must map to the right arrow key (element
  352.     number 77). The initialization of the Ctrl-D key for KeyTable[136]
  353.     would be 77.
  354.  
  355.     LeftArr       will move the cursor left one character position on
  356.                   the screen until the StCol is reached.  If the
  357.                   beginning of the string has not been reached the
  358.                   string will be scrolled on the screen within the
  359.                   StCol and SpCol boundaries.
  360.  
  361.     RightArr      will move the cursor right one character position on
  362.                   the screen until the end of the string is reached.
  363.                   If the cursor is in the SpCol and there is still
  364.                   more in the string that can be displayed the string
  365.                   will then be scrolled within the StCol and SpCol
  366.                   boundaries.
  367.  
  368.     Home          will place the cursor in the StCol on the screen and
  369.                   positioned under the first character in the edit
  370.                   string.
  371.  
  372.     End           will position the cursor after the last character in
  373.                   the edit string.
  374.  
  375.     BackSpace     If the StCol is displaying the first character in
  376.                   the string being edited the cursor will move to the
  377.                   left one column and delete the character in that
  378.                   column. If the character being displayed in the
  379.                   StCol is not the first character in the string being
  380.                   edited the cursor will remain in the same column
  381.                   position and delete the character to the left of the
  382.                   cursor and pull the string towards the cursor.
  383.  
  384.     Esc           will blank the string currently in the field.  If
  385.                   the field is already blank the procedure will
  386.                   restore the string that was passed to this
  387.                   procedure.
  388.  
  389.     Tab           will move the cursor to the right five column
  390.                   positions if the SpCol has not been reached.  If the
  391.                   StCol has been reached then the string display will
  392.                   be shifted right.
  393. ..page
  394.     ^LeftArrow    will move the cursor to the left five column
  395.                   positions if the StCol has not been reached.  If the
  396.                   cursor is in the StCol then only the display string
  397.                   will be adjusted to reflect the movement of the
  398.                   cursor.
  399.  
  400.     Del           removes the character the cursor is under and
  401.                   decrements the string length by one. All the
  402.                   characters to the right of the cursor position are
  403.                   moved left one position within the string and
  404.                   display area.
  405.  
  406.     Ctrl-X        will delete all characters from the current string
  407.                   position to the end of the string.  All deleted
  408.                   characters will be replaced with the FillCh that was
  409.                   specified when calling this procedure.
  410.  
  411. ■ Example
  412.  
  413.   #include <fpclib.h>
  414.  
  415.   TCSet[32] = { 64,  4,  0,  0,  0,  0,  0,  0,
  416.                  0,128,128,  0,  0 , 0,  0,  0,
  417.                  0,  0,  0,  0,  0,  0,  0,  0,
  418.                  0,  0,  0,  0,  0,  0,  0,  0 };
  419.  
  420.   VCSet[32] = {  0,  0,  0,  0,255,255,255,255,
  421.                255,255,255,255,255,255,255,255,
  422.                255,255,255,255,255,255,255,255,
  423.                255,255,255,255,255,255,255,255 };
  424.  
  425.   main()
  426.   {
  427.      char   St[256];
  428.      int    te,ChOfs = 1;
  429.  
  430.      VioInit();
  431.      EditSt(5,10,20,30,2,7,0,5000,5000,VCSet,TCSet,ChOfs,TE,St);
  432.   }
  433.  
  434.   This example will edit a string of up to thirty characters into St.
  435.   The screen will display each character as entered starting in column
  436.   ten on row five.  The display area of the screen goes from columns
  437.   ten to twenty and will do a horizontal scroll in that area when the
  438.   eleventh character is entered.
  439.  
  440.   All alphabetic characters, ['a'..'z'], will automatically be
  441.   converted to upper case.
  442.  
  443.   The keys that will terminate this procedure are the Esc, Enter, Up
  444.   and Down Arrow keys.  TE will return the proper terminating element
  445.   number as given in appendix C.
  446. ..page
  447. ..head03AFillColAttr
  448. ■ Description
  449.  
  450.   Display a column of attribute bytes on the screen.
  451.  
  452.  
  453. ■ Summary
  454.  
  455.   void FPENTRY FillColAttr( INT x, INT y, INT NRows, INT Attr );
  456.  
  457.   x           defines column to begin display of attribute.
  458.  
  459.   y           defines row to begin display of attribute.
  460.  
  461.   NRows       integer in the range 1-25 for the number of rows to
  462.               display the attribute byte on.
  463.  
  464.   Attr        integer in the range 0-255. It is the attribute byte to
  465.               be displayed on the screen.
  466.  
  467.  
  468. ■ Remarks
  469.  
  470.   FillColAttr always acts on the entire screen and is NOT sensitive to
  471.   Turbo's currently defined window.
  472.  
  473.  
  474. ■ See Also
  475.  
  476.   FillColCell, FillColChar
  477.  
  478.  
  479. ■ Example
  480.  
  481.   #include <fpclib.h>
  482.  
  483.   main();
  484.   {
  485.      int i;
  486.  
  487.      VioInit();
  488.      ClrWin( 1, 1, 80, 25, 7 );
  489.      for ( i = 1; i <= 80; i++ )
  490.         FillColAttr( i, 1, 20, 48+i );
  491.      GetKey();
  492.    }
  493.  
  494.   In this example the attribute 48+i will be displayed twenty times in
  495.   each column of the display starting on row one of the screen.
  496. ..page
  497. ..head03AFillColCell
  498. ■ Description
  499.  
  500.   Fill a column on the screen with a character.
  501.  
  502.  
  503. ■ Summary
  504.  
  505.   void FPENTRY FillColCell( INT x, INT y, INT NRows, INT Cell );
  506.  
  507.   x           defines column to begin display of data.
  508.  
  509.   y           defines row to begin display of data.
  510.  
  511.   NRows       integer in the range 1-25 for the number of rows to
  512.               display the character and attribute bytes on the screen.
  513.  
  514.   Cell        integer in the range 0-0xffff.  This is the character
  515.               and attribute word combination where the high order byte
  516.               is the character and the low order byte is the attribute
  517.               to be displayed.
  518.  
  519.  
  520. ■ Remarks
  521.  
  522.   FillColCell always acts on the entire screen and is NOT sensitive to
  523.   Turbo's currently defined window.
  524.  
  525.  
  526. ■ See Also
  527.  
  528.   FillColAttr, FillColChar
  529.  
  530.  
  531. ■ Example
  532.  
  533.   #include <fpclib.h>
  534.  
  535.   main()
  536.   {
  537.      int i;
  538.      VioInit();
  539.      for ( i = 1; i <= 80; i++ )
  540.         FillColCell( i, 1, 20, ( (65+i) << 8 ) + 48+i );
  541.   }
  542.  
  543.   In this example the character is ordinal value of 'A' plus i and
  544.   attribute value is 48+i.  The character attribute cell combination
  545.   will be displayed twenty times in each column of the display
  546.   starting on row one of the screen.
  547. ..page
  548. ..head03AFillColChar
  549. ■ Description
  550.  
  551.   Fill a column on the screen with a character.
  552.  
  553.  
  554. ■ Summary
  555.  
  556.   void FPENTRY FillColChar( INT x, INT y, INT NRows, CHAR Ch );
  557.  
  558.   x           defines column to begin display of character.
  559.  
  560.   y           defines row to begin display of character.
  561.  
  562.   NRows       integer in the range 1-25 for the number of rows to
  563.               display the character on.
  564.  
  565.   Ch          char in the range 0-255. It is the character to be
  566.               displayed on the screen.
  567.  
  568.  
  569. ■ Remarks
  570.  
  571.   FillColChar always acts on the entire screen and is NOT sensitive to
  572.   Turbo's currently defined window.
  573.  
  574.  
  575. ■ See Also
  576.  
  577.   FillColAttr, FillColCell
  578.  
  579.  
  580. ■ Example
  581.  
  582.   #include <fpclib.h>
  583.  
  584.   main()
  585.   {
  586.      int i;
  587.  
  588.      VioInit();
  589.      for ( i = 1; i <= 80; i++ )
  590.         FillColChar( i, 1, 20, 64+i );
  591.   }
  592.  
  593.   In this example the character '@'+i will be displayed twenty times
  594.   in each column of the display starting on row one of the screen.
  595. ..page
  596. ..head03AFillFrameAttr
  597. ■ Description
  598.  
  599.   Fill the frame area defined by x1,y1,x2,y2 coordinates with the
  600.   attribute byte defined.
  601.  
  602.  
  603. ■ Summary
  604.  
  605.   void FPENTRY FillFrameAttr( INT x1, INT y1,
  606.                               INT x2, INT y2, INT Attr );
  607.  
  608.   x1          left column of window.
  609.  
  610.   y1          top row of window.
  611.  
  612.   x2          right column of window.
  613.  
  614.   y2          bottom row of window.
  615.  
  616.   Attr        integer in the range 0-255.  It is the attribute to be
  617.               displayed on the screen in the specified frame area.
  618.  
  619.  
  620. ■ See Also
  621.  
  622.   FillFrameCell, FillFrameChar
  623.  
  624.  
  625. ■ Example
  626.  
  627.   #include <fpclib.h>
  628.  
  629.   main()
  630.   {
  631.      VioInit();
  632.      FillFrameAttr( 1, 1, 80, 25, 48 );
  633.   }
  634.  
  635.   FillFrameAttr in this example will, on a color display, make the
  636.   background color cyan and all display characters black for the
  637.   foreground color.
  638. ..page
  639. ..head03AFillFrameCell
  640. ■ Description
  641.  
  642.   Fill the frame area defined by x1,y1,x2,y2 coordinates with the cell
  643.   defined.
  644.  
  645.  
  646. ■ Summary
  647.  
  648.   void FPENTRY FillFrameCell( INT x1, INT y1,
  649.                               INT x2, INT y2, INT2 Cell );
  650.  
  651.   x1          left column of window.
  652.  
  653.   y1          top row of window.
  654.  
  655.   x2          right column of window.
  656.  
  657.   y2          bottom row of window.
  658.  
  659.   Cell        integer in the range 0-255.  This is the character and
  660.               attribute word combination where the high byte is the
  661.               character and the low byte is the attribute for the cell
  662.               to be displayed on the screen in the specified frame
  663.               area.
  664.  
  665.  
  666. ■ See Also
  667.  
  668.   FillFrameAttr, FillFrameChar
  669.  
  670.  
  671. ■ Example
  672.  
  673.   #include <fpclib.h>
  674.  
  675.   main()
  676.   {
  677.      VioInit();
  678.      FillFrameCell( 1, 1, 80, 25, 0x2007 );
  679.   }
  680.  
  681.   FillFrameCell in this example will move spaces to every character
  682.   byte on the screen and the attribute byte will get the decimal
  683.   character 07. This call will have the same effect as a cls from DOS.
  684. ..page
  685. ..head03AFillFrameChar
  686. ■ Description
  687.  
  688.   Fill the frame area defined by x1,y1,x2,y2 coordinates with the
  689.   character byte defined.
  690.  
  691.  
  692. ■ Summary
  693.  
  694.   void FPENTRY FillFrameChar( INT x1, INT y1,
  695.                               INT x2, INT y2, CHAR Ch );
  696.  
  697.   x1          left column of window.
  698.  
  699.   y1          top row of window.
  700.  
  701.   x2          right column of window.
  702.  
  703.   y2          bottom row of window.
  704.  
  705.   Ch          character that will be displayed on the screen in the
  706.               specified frame area.
  707.  
  708.  
  709. ■ See Also
  710.  
  711.   FillFrameAttr, FillFrameCell
  712.  
  713.  
  714. ■ Example
  715.  
  716.   #include <fpclib.h>
  717.  
  718.   main()
  719.   {
  720.      VioInit();
  721.      FillFrameChar( 1, 1, 80, 25, ' ' );
  722.   }
  723.  
  724.   FillFrameChar in this example will move spaces to every character
  725.   byte on the screen.  It will have almost the same effect as a ClrScr
  726.   call.
  727. ..page
  728. ..head03AFillRowAttr
  729. ■ Description
  730.  
  731.   Write N copies of the attribute byte on the screen starting at the
  732.   specified x,y coordinates.
  733.  
  734.  
  735. ■ Summary
  736.  
  737.   void FPENTRY FillRowAttr( INT x, INT y, INT NBytes, INT Attr );
  738.  
  739.   x           defines column to begin display of attribute byte.
  740.  
  741.   y           defines row to begin display of attribute byte.
  742.  
  743.   NBytes      gives number of times to display the attribute byte on
  744.               the screen.
  745.  
  746.   Attr        integer in the range 0-255.  It is the attribute byte to
  747.               be displayed on the screen.
  748.  
  749.  
  750. ■ Remarks
  751.  
  752.   FillRowAttr always acts on the entire screen and is NOT sensitive to
  753.   Turbo's currently defined window.
  754.  
  755.  
  756. ■ See Also
  757.  
  758.   FillRowCell, FillFrameChar
  759.  
  760.  
  761. ■ Example
  762.  
  763.   #include <fpclib.h>
  764.  
  765.   main()
  766.   {
  767.      VioInit();
  768.      FillRowAttr( 1, 1, 80, 48 );
  769.   }
  770.  
  771.   In this example, starting at row one, column one of the screen, the
  772.   color attribute byte 48 will be used.
  773. ..page
  774. ..head03AFillRowCell
  775. ■ Description
  776.  
  777.   Write N copies of the character and attribute byte on the screen
  778.   starting at the specified x,y coordinates.
  779.  
  780.  
  781. ■ Summary
  782.  
  783.   void FPENTRY FillRowCell( INT x, INT y, INT NWords, INT2 Cell );
  784.  
  785.   x           defines column to begin display of cell word.
  786.  
  787.   y           defines row to begin display of cell word.
  788.  
  789.   NWords      gives the number times to display the character and
  790.               attribute bytes on the screen.
  791.  
  792.   Cell        character and attribute bytes to be displayed on the
  793.               screen.
  794.  
  795.  
  796. ■ Remarks
  797.  
  798.   FillRowCell always acts on the entire screen and is NOT sensitive to
  799.   Turbo's currently defined window.
  800.  
  801.  
  802. ■ See Also
  803.  
  804.   FillRowAttr, FillFrameChar
  805.  
  806.  
  807. ■ Example
  808.  
  809.   #include <fpclib.h>
  810.  
  811.   main()
  812.   {
  813.      VioInit();
  814.      FillRowCell( 1, 1, 80, ('-' << 8) + 7 );
  815.   }
  816.  
  817.   In this example eighty minus sign characters will be displayed
  818.   starting on row one, column one of the screen.  The attribute value
  819.   is 7.
  820. ..page
  821. ..head03AFillRowChar
  822. ■ Description
  823.  
  824.   Write N copies of the character byte on the screen starting at the
  825.   specified x,y coordinates.
  826.  
  827.  
  828. ■ Summary
  829.  
  830.   void FPENTRY FillRowChar( INT x, INT y, INT NBytes, CHAR Ch );
  831.  
  832.   x           defines column to begin display of character.
  833.  
  834.   y           defines row to begin display of character.
  835.  
  836.   NBytes      gives number of times to display the character on the
  837.               screen.
  838.  
  839.   Ch          integer in the range 0-255.  It is the character to be
  840.               displayed on the screen.
  841.  
  842.  
  843. ■ Remarks
  844.  
  845.   FillRowChar always acts on the entire screen and is NOT sensitive to
  846.   Turbo's currently defined window.
  847.  
  848.  
  849. ■ See Also
  850.  
  851.   FillRowAttr, FillFrameCell
  852.  
  853.  
  854. ■ Example
  855.  
  856.   #include <fpclib.h>
  857.  
  858.   main()
  859.   {
  860.      VioInit();
  861.      FillRowChar( 1, 1, 80, '-' );
  862.   }
  863.  
  864.   In this example eighty minus sign characters will be displayed
  865.   starting on row one, column one of the screen.
  866. ..page
  867. ..head03AFrameWin
  868. ■ Description
  869.  
  870.   Frames the window currently defined by the global variables WindMax
  871.   and WindMin with the specified characters.
  872.  
  873.  
  874. ■ Summary
  875.  
  876.   void FPENTRY FrameWin( CHAR UL,  CHAR UR,
  877.                          CHAR LL,  CHAR LR,
  878.                          CHAR Hor, CHAR Ver, INT Attr );
  879.  
  880.   UL          character in upper left corner of the window.
  881.  
  882.   UR          character in upper right corner of the window.
  883.  
  884.   LL          character in lower left corner of the window.
  885.  
  886.   LR          character in lower right corner of the window.
  887.  
  888.   Hor         horizontal character for top and bottom rows of the
  889.               window.
  890.  
  891.   Ver         vertical character for the left and right columns of the
  892.               window.
  893.  
  894.   Attr        attribute color to use for the window frame display.
  895.  
  896.  
  897. ■ Remarks
  898.  
  899.   FrameWin will outline the window that is currently defined by the
  900.   global variables WindMin and WindMax with the characters passed.
  901.   The coordinates given by WindMin and WindMax are used to frame the
  902.   window area.
  903.  
  904.   Once the window frame has been displayed WindMin and WindMax will be
  905.   adjusted so the window will fit within the framed area.  (e.g. if if
  906.   the current window is defined as 1,1,80,25 then after FrameWin the
  907.   current window will be 2,2,79,24).
  908. ..page
  909. ■ Example
  910.  
  911.   #include <fpclib.h>
  912.  
  913.   main()
  914.   {
  915.      VioInit();
  916.      WindowFP( 1, 1, 80, 25 );
  917.      FrameWin('-','-','-','-','-','|',7);
  918.   }
  919.  
  920.   The above statement will use minus signs for the top and bottom
  921.   lines and the single bar for the two sides. The frame will be normal
  922.   color.
  923.  
  924.  
  925. ■ Example
  926.  
  927.   #include <fpclib.h>
  928.  
  929.   main()
  930.   {
  931.      VioInit();
  932.      WindowFP( 1, 1, 80, 25 );
  933.      FrameWin('L','R','l','r','H','V',48);
  934.   }
  935.  
  936.   The frame this statement will draw is shown below; the color for the
  937.   frame of the window is attribute value 48.
  938.  
  939.  
  940.                  LHHHHHHHHHHHHHHHHHHHHHHHHHHR
  941.                  V                          V
  942.                  V                          V
  943.                  V                          V
  944.                  V                          V
  945.                  V                          V
  946.                  V                          V
  947.                  V                          V
  948.                  lHHHHHHHHHHHHHHHHHHHHHHHHHHr
  949. ..page
  950. ..head03AGetCursorSize
  951. ■ Description
  952.  
  953.   Reports the starting and ending scan lines of the current cursor.
  954.  
  955.  
  956. ■ Summary
  957.  
  958.   INT2 FPENTRY GetCursorSize( void );
  959.  
  960.  
  961. ■ Remarks
  962.  
  963.   Gets the cursor size by reporting the starting scan line in the high
  964.   byte and the ending scan line in the low byte of the word.
  965.  
  966.      High byte -- starting scan line
  967.      Low byte  -- ending scan line
  968.  
  969.  
  970. ■ Example
  971.  
  972.   #include <fpclib.h>
  973.  
  974.   main()
  975.   {
  976.      VioInit();
  977.      printf("%u %u\n",GetCursorSize() >> 8,GetCursorSize() & 0x00ff );
  978.   }
  979.  
  980.   This example will print on one line the current starting scan line
  981.   and ending scan line respectively.
  982.  
  983.  
  984. ■ See Also
  985.  
  986.   SetCursorSize
  987.  
  988.  
  989. ■ Example
  990.  
  991.   j = GetCursorSize();
  992.  
  993.   In this example j will receive the starting and ending scan line of
  994.   the cursor where:
  995.      hi byte - starting scan line
  996.      lo byte - ending scan line
  997. ..page
  998. ..head03AGetFrameAttr
  999. ■ Description
  1000.  
  1001.   Read the attribute bytes for the specified area on the screen into
  1002.   the buffer area.
  1003.  
  1004.  
  1005. ■ Summary
  1006.  
  1007.   void FPENTRY GetFrameAttr( INT x1, INT y1,
  1008.                              INT x2, INT y2, CHAR PTR Buffer );
  1009.  
  1010.   x1          left column of window.
  1011.  
  1012.   y1          top row of window.
  1013.  
  1014.   x2          right column of window.
  1015.  
  1016.   y2          bottom row of window.
  1017.  
  1018.   Buffer      data area where data from screen will be placed.
  1019.  
  1020.  
  1021. ■ See Also
  1022.  
  1023.   GetFrameCell, GetFrameChar
  1024.  
  1025.  
  1026. ■ Example
  1027.  
  1028.   #include <fpclib.h>
  1029.  
  1030.   main()
  1031.   {
  1032.      char  buffer[2000];
  1033.      int   i;
  1034.  
  1035.      VioInit();
  1036.      GetFrameAttr( 1, 1, 80, 25, Buffer );
  1037.   }
  1038.  
  1039.   This example will read the 2000 attribute bytes from the screen and
  1040.   place every byte that is read into its corresponding byte position
  1041.   in the buffer array.
  1042. ..page
  1043. ..head03AGetFrameCell
  1044. ■ Description
  1045.  
  1046.   Read the character and attributes bytes for the specified area on
  1047.   the screen into the buffer area.
  1048.  
  1049.  
  1050. ■ Summary
  1051.  
  1052.   void FPENTRY GetFrameCell( INT x1, INT y1,
  1053.                              INT x2, INT y2, CHAR PTR Buffer );
  1054.  
  1055.   x1          left column of window.
  1056.  
  1057.   y1          top row of window.
  1058.  
  1059.   x2          right column of window.
  1060.  
  1061.   y2          bottom row of window.
  1062.  
  1063.   Buffer      data area where data from screen will be placed.
  1064.  
  1065.  
  1066. ■ See Also
  1067.  
  1068.   GetFrameAttr, GetFrameChar
  1069.  
  1070.  
  1071. ■ Example
  1072.  
  1073.   #include <fpclib.h>
  1074.  
  1075.   main()
  1076.   {
  1077.      char  buffer[4000];
  1078.      int   i;
  1079.  
  1080.      VioInit();
  1081.      GetFrameCell( 1, 1, 80, 25, Buffer );
  1082.   }
  1083.  
  1084.   This example will read the 4000 character and attribute bytes from
  1085.   the screen and place every byte that is read into its corresponding
  1086.   character attribute byte position in the buffer array.
  1087. ..page
  1088. ..head03AGetFrameChar
  1089. ■ Description
  1090.  
  1091.   Read the character bytes for the specified area on the screen into
  1092.   the buffer area.
  1093.  
  1094.  
  1095. ■ Summary
  1096.  
  1097.   void FPENTRY GetFrameChar( INT x1, INT y1,
  1098.                              INT x2, INT y2, CHAR PTR Buffer );
  1099.  
  1100.   x1          left column of window.
  1101.  
  1102.   y1          top row of window.
  1103.  
  1104.   x2          right column of window.
  1105.  
  1106.   y2          bottom row of window.
  1107.  
  1108.   Buffer      data area where data from screen will be placed.
  1109.  
  1110.  
  1111. ■ See Also
  1112.  
  1113.   GetFrameAttr, GetFrameCell
  1114.  
  1115.  
  1116. ■ Example
  1117.  
  1118.   #include <fpclib.h>
  1119.  
  1120.   main()
  1121.   {
  1122.      char  buffer[2000];
  1123.      int   i;
  1124.  
  1125.      VioInit();
  1126.      GetFrameChar( 1, 1, 80, 25, Buffer );
  1127.   }
  1128.  
  1129.   This example will read the 2000 characters from the screen and place
  1130.   every character that is read into its corresponding character
  1131.   position in the buffer array.
  1132. ..page
  1133.