home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 499.lha / RexxIntuition_rel2 / TextModes.rexx < prev    next >
OS/2 REXX Batch file  |  1991-04-08  |  2KB  |  67 lines

  1. /* An example of using the dissidents rx_intui.library */
  2.  
  3. /* Open a window on WB. Let it be the default IDCMP. */
  4. wind=GetWindow('Effects of DrawModes and pen colors',,,,,,,,)
  5. IF wind == '' | wind == 0 THEN SAY 'Window open error'
  6.  
  7. /* Print a message with default pens, mode (JAM1 = background color ignored) */
  8. mytext = 'Printed in default pens, mode (JAM1)'
  9. y=20
  10. err=Text(mytext,wind,10,y)
  11.  
  12. /* Change penA = 1, JAM2. Note how we move down 8 pixels because the default */
  13. /* font is 8 pixels high. Also note how we pass a NULL string for PenB so that */
  14. /* we don't change it. */
  15. err=SetDraw(wind,1,,1)
  16. y = y+8
  17. err=Text('Pen A = 1, Mode = JAM2',wind,10,y)
  18.  
  19. /* Change penA = 0, penB = 3. */
  20. err=SetDraw(wind,2,3,)
  21. y = y+8
  22. err=Text('Pen A = 2, Pen B = 3',wind,10,y)
  23.  
  24. /* Change penB = 1. */
  25. err=SetDraw(wind,,1,)
  26. y = y+8
  27. err=Text('Pen A same, Pen B = 1',wind,10,y)
  28.  
  29. /* Change penA = 0. */
  30. err=SetDraw(wind,3,,)
  31. y = y+8
  32. err=Text('Pen A = 3, Pen B same',wind,10,y)
  33.  
  34. /* Change DrawMode = 4 (INVERSVID). Note that we don't want to change */
  35. /* PenA or PenB, so we pass null strings */
  36. err=SetDraw(wind,,,4)
  37. y = y+8
  38. mytext = 'Same pens, INVERSVID mode'
  39. err=Text(mytext,wind,10,y)
  40.  
  41. /* ITALICS */
  42. err=SetFont(wind,4,)
  43. err=SetDraw(wind,1,0,1)
  44. y = y+8
  45. err=Text('This is italics',wind,10,y)
  46.  
  47. /* BOLD */
  48. err=SetFont(wind,2,)
  49. y = y+8
  50. err=Text('This is bold',wind,10,y)
  51.  
  52. /* UNDERLINE */
  53. err=SetFont(wind,1,)
  54. y = y+8
  55. err=Text('This is underlined',wind,10,y)
  56.  
  57. /* ITALICS + UNDERLINE */
  58. err=SetFont(wind,1+4,)
  59. y = y+8
  60. err=Text('This is underlined AND italics',wind,10,y)
  61.  
  62. /* Wait for - ANY - IDCMP message to drop us through */
  63. msg=WaitMsg(wind)
  64.  
  65. /* Close the window, thus freeing any resources for it. */
  66. err=EndWindow(wind)
  67.