home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 2 / fishmore-publicdomainlibraryvol.ii1991xetec.iso / dirs / rexxintuition_463.lzh / RexxIntuition / RexxIntui.lzh / scripts / Box.rexx next >
OS/2 REXX Batch file  |  1990-06-27  |  1KB  |  34 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('Drawing a box',,,,,,,,,)
  5. IF wind == '' | wind == 0 THEN SAY 'Window open error'
  6.  
  7. /* Note that I set COMPLEMENT drawmode. So if the box covers the printed */
  8. /* message, the letters will be reversed as long as I draw the box with  */
  9. /* the same colors. This can be used as a "highlighting box" effect. Note */
  10. /* that redrawing the box again, reverses the highlight (original state). */
  11. /* If a wanted a box to erase over text/graphics, I'd use JAM1 or JAM2. */
  12. err=SetDraw(wind,3,1,2)
  13.  
  14. /* Print a message */
  15. mytext = 'Click in window to see the box drawn using current pens, mode'
  16. err=Text(mytext,wind,10,40)
  17.  
  18. /* Loop until CLOSEWINDOW, using any MOUSEBUTTON select to draw a box */
  19. class = 1
  20. DO WHILE class > 0
  21. spec=WaitMsg(wind)
  22. PARSE var spec class part1 part2 part3
  23. IF class = 3 THEN DO
  24. err=FBox(wind,part2,part3,200,100)
  25. class=0 /* knock us out */
  26. END
  27. END
  28.  
  29. /* Wait for - ANY - IDCMP message to drop us through */
  30. msg=WaitMsg(wind)
  31.  
  32. /* Close the window, thus freeing any resources for it. */
  33. err=EndWindow(wind)
  34.