
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide to Clip-4-Win version 3.0 - <b>@ ... say</b>
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
@ ... SAY
Display data at a specified screen row and column
------------------------------------------------------------------------------
Syntax
#include "say.ch"
@ <nRow>, <nCol> SAY <xpr>
[ PICTURE <cPicture> ]
[ COLOR <cColour> ]
[ TEXTCOLOR <nTextRGB> ]
[ BKCOLOR <nBkRGB> ]
[ STYLE <nStyle> ]
[ CHARWIDTH <nWc> ]
[ CHARHEIGHT <nHc> ]
[ WIDTH <nW> ]
[ HEIGHT <nH> ]
[ FONT <hFont> ]
[ IN [ WINDOW ] <hWnd> ]
Arguments
<nRow>, <nCol> are the row and column.
<xpr> is the data to be displayed.
<cPicture> is an optional formatting string.
<cColour> is an optional Clipper colour string.
<nTextRGB> is an optional Windows colour value (e.g. from RGB()),
specifying the colour of the characters that are displayed.
<nBkRGB> is an optional Windows colour value (e.g. from RGB()),
specifying the background colour of the characters that are displayed.
<nStyle> is an optional numeric value used to control the way
the data is displayed. This is reserved for future use.
<nWc>, <nHc> are optional numeric values specifying the width
and height of each character (in pixels). <nWc> defaults to 8.
<nHc> defaults to <nH>, or 12 if <nH> is nil.
<nW>, <nH> are optional numeric values specifying the width
and height of the rectangle in which the data gets displayed.
<nW> defaults to the length of the text multiplied by <nWc>.
<nH> defaults to <nHc>, or 12 if <nHc> is nil.
<hFont> is an optional handle of a font to be used. The
default can be set by SET DEFAULT SAY FONT. The initial default is
the default Windows font.
<hWnd> is an optional handle of a window in which the data is
displayed. The default is the window returned by SelectWindow().
Description
This command can be used to output data in a window, with
control over the font type and size, as well as the colour(s)
used. The characters output are re-drawn automatically, as
needed (there is no need to handle EVENT_REDRAW for the data).
This command adds information to the SayList variable, which
should be initialised to an empty array (and is usually
declared as a LOCAL).
You can keep Clipper's normal @ ... SAY by defining the pre-
processor symbol SAY_IN_WINDOW (using #define) before you
#include "say.ch". If you do that, you need to specify IN
WINDOW <hWnd> to use the @ ... SAY command described here.
(See the SAY.CH file.)
Example
#include "say.ch"
#define C_GREEN RGB( 0, 255, 0 )
#define C_RED RGB( 255, 0, 0 )
local SayList := { } // NOTE: need to initialise like this
@ 10, 1 SAY "Some sample text" TEXTCOLOR C_RED
@ 12, 1 SAY "Some more text" TEXTCOLOR C_GREEN
CLEAR SAYS // removes the output
See Also: @ PIXEL ... SAY CLEAR SAYS SET DEFAULT SAY FONT
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson