home *** CD-ROM | disk | FTP | other *** search
/ Car Screensaver - Toyota / TOYOTA.iso / mjparty / hsqdemo.dxr / 00006.ls < prev    next >
Encoding:
Text File  |  1996-09-26  |  1.4 KB  |  55 lines

  1. on initrearwindow
  2.   global rwobj
  3.   openXLib("RearWindow.XObj")
  4.   if objectp(rwobj) then
  5.     rwobj(mdispose)
  6.   end if
  7.   makeobjifneeded()
  8.   set retvalue to rwobj(mpattowindow, -5)
  9. end
  10.  
  11. on makeobjifneeded
  12.   global rwobj
  13.   if not objectp(rwobj) then
  14.     set rwobj to rearwindow(mnew, "M")
  15.     if value(rwobj) < 0 then
  16.       alert("System error" && rwobj && "trying to create the RearWindow object in RAM (multiple-monitor config).")
  17.       exit
  18.     end if
  19.     writestageandscreenbounds()
  20.     if the freeBlock < rwobj(mgetmemoryneeded) then
  21.       if objectp(rwobj) then
  22.         rwobj(mdispose)
  23.         set rwobj to rearwindow(mnew, "S")
  24.       end if
  25.       if value(rwobj) < 0 then
  26.         alert("System error" && rwobj && "trying to create the RearWindow object in RAM (single-monitor config).")
  27.         exit
  28.       end if
  29.       writestageandscreenbounds()
  30.     end if
  31.   end if
  32. end
  33.  
  34. on writestageandscreenbounds
  35.   global rwobj
  36.   set s to "Minimum Rect around All Screens:"
  37.   set s to s && rwobj(mgetscreentop) & ", "
  38.   set s to s && rwobj(mgetscreenleft) & ", "
  39.   set s to s && rwobj(mgetscreenbottom) & ", "
  40.   set s to s && rwobj(mgetscreenright) & RETURN
  41.   set s to s & "Stage dimensions are:"
  42.   set s to s && the stageTop & ", "
  43.   set s to s && the stageLeft & ", "
  44.   set s to s && the stageBottom & ", "
  45.   set s to s && the stageRight
  46. end
  47.  
  48. on releaserearwindow
  49.   global rwobj
  50.   if objectp(rwobj) then
  51.     rwobj(mdispose)
  52.   end if
  53.   closeXLib("RearWindow.XObj")
  54. end
  55.