home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 2 / fishmore-publicdomainlibraryvol.ii1991xetec.iso / dirs / rexxintuition_463.lzh / RexxIntuition / RexxIntui.lzh / scripts / Line.rexx < prev    next >
OS/2 REXX Batch file  |  1990-06-27  |  865b  |  28 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('Using Line() to draw a line and an unfilled box',,,,,,,,,)
  5. IF wind == '' | wind == 0 THEN SAY 'Window open error'
  6.  
  7. /* Draw a line segment */
  8. origX=20
  9. origY=40
  10. err=Line(wind,origX,origY,origX,origY+50)
  11.  
  12. /* Draw an unfilled box. Note that because we don't specify an origX, origY */
  13. /* the box "starts" where the previous line segment stopped. */
  14. origY=origY+50
  15. boxwidth=100
  16. boxheight=40
  17. err=Line(wind,,,origX,origY+boxheight,origX+boxwidth,origY+boxheight,origX+boxwidth,origY,origX,origY)
  18.  
  19. /* Loop until CLOSEWINDOW, using any MOUSEBUTTON select to draw a box */
  20. class = 1
  21. DO WHILE class > 0
  22. spec=WaitMsg(wind)
  23. PARSE var spec class part1 part2 part3
  24. END
  25.  
  26. /* Close the window, thus freeing any resources for it. */
  27. err=EndWindow(wind)
  28.