Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - box() draw a box within specified coordinates http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 box()               Draw a box within specified coordinates
------------------------------------------------------------------------------
 Declaration
   screen.hdr

 Syntax
   proc box extern
   param value int     iTop, ;
         value int     iLeft, ;
         value int     iBottom, ;
         value int     iRight, ;
         const char(9) cBorder, ;
         value uint    uFillAttribute

 Arguments
   iTop is the top row of the box.

   iLeft is the leftmost column of the box.

   iBottom is the bottom row of the box.

   iRight is the rightmost column of the box.

   cBorder is a border character string that defines the appearance
   of the box. The string must have a length of 8 or 9 characters. The
   first 8 characters are used to draw the box frame (starting with the
   upper left corner), and the optional 9th character is used to fill the
   box. The example string "123456789" results in the following box:

      12222223
      89999994
      89999994
      89999994
      89999994
      76666665

   Constants for frequently used box frames are defined in screen.hdr.

   uFillAttribute is the color attribute used to fill the box.
   The parameter only has an effect when cBorder has a 9th character.

 Return
   None.

 Description
   The box() function draws a box within the specified coordinates, using the
   specified border characters. Optionally, the box can be filled with a
   character and an attribute. The box is drawn using the
   __syscolor[ CLR_STD ] color setting.

 Example
   #define EXAMPLE_SCREEN
   #include example.hdr

   proc Test_box
   // set box frame color
   __syscolor[ CLR_STD ] := BLUE_WHITE
   // make a "desktop window"
   box( 0, 0, __max_row, __max_col, replicate( chr( 176 ), 9 ), BLUE_WHITE )
   __syscolor[ CLR_STD ] := BLACK_LIGHT_GREY
   // draw a box filled with white-on-red asterisks
   box(  1,  5, 10, 50, BOX_DOUBLE + "*", RED_WHITE )
   // draw a thick-bordered box
   box( 15, 10, 22, 35, BOX_THICK, 0 )
   endproc

   proc main
   Test_box()
   endproc

See Also: @ to box3d() fill() popbox() zoombox()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson