home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 2
/
fishmore-publicdomainlibraryvol.ii1991xetec.iso
/
dirs
/
rexxintuition_463.lzh
/
RexxIntuition
/
TextModes.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1991-03-09
|
2KB
|
67 lines
/* An example of using the dissidents rx_intui.library */
/* Open a window on WB. Let it be the default IDCMP. */
wind=GetWindow('Effects of DrawModes and pen colors',,,,,,,,)
IF wind == '' | wind == 0 THEN SAY 'Window open error'
/* Print a message with default pens, mode (JAM1 = background color ignored) */
mytext = 'Printed in default pens, mode (JAM1)'
y=20
err=Text(mytext,wind,10,y)
/* Change penA = 1, JAM2. Note how we move down 8 pixels because the default */
/* font is 8 pixels high. Also note how we pass a NULL string for PenB so that */
/* we don't change it. */
err=SetDraw(wind,1,,1)
y = y+8
err=Text('Pen A = 1, Mode = JAM2',wind,10,y)
/* Change penA = 0, penB = 3. */
err=SetDraw(wind,2,3,)
y = y+8
err=Text('Pen A = 2, Pen B = 3',wind,10,y)
/* Change penB = 1. */
err=SetDraw(wind,,1,)
y = y+8
err=Text('Pen A same, Pen B = 1',wind,10,y)
/* Change penA = 0. */
err=SetDraw(wind,3,,)
y = y+8
err=Text('Pen A = 3, Pen B same',wind,10,y)
/* Change DrawMode = 4 (INVERSVID). Note that we don't want to change */
/* PenA or PenB, so we pass null strings */
err=SetDraw(wind,,,4)
y = y+8
mytext = 'Same pens, INVERSVID mode'
err=Text(mytext,wind,10,y)
/* ITALICS */
err=SetFont(wind,4,)
err=SetDraw(wind,1,0,1)
y = y+8
err=Text('This is italics',wind,10,y)
/* BOLD */
err=SetFont(wind,2,)
y = y+8
err=Text('This is bold',wind,10,y)
/* UNDERLINE */
err=SetFont(wind,1,)
y = y+8
err=Text('This is underlined',wind,10,y)
/* ITALICS + UNDERLINE */
err=SetFont(wind,1+4,)
y = y+8
err=Text('This is underlined AND italics',wind,10,y)
/* Wait for - ANY - IDCMP message to drop us through */
msg=WaitMsg(wind)
/* Close the window, thus freeing any resources for it. */
err=EndWindow(wind)