home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 April (DVD) / PCWELT_4_2006.ISO / main.dir / 00352.ls < prev    next >
Encoding:
Text File  |  2006-01-19  |  1.2 KB  |  52 lines

  1. on initRearWindow
  2.   global rwObj, gMaxColors, deskTopPattern, black
  3.   if factory("RearWindow") = 0 then
  4.     openXLib("RearWindow.XObj")
  5.   end if
  6.   if objectp(rwObj) then
  7.     rwObj(mdispose)
  8.   end if
  9.   makeObjIfNeeded()
  10. end
  11.  
  12. on releaseRearWindow
  13.   global rwObj
  14.   if objectp(rwObj) then
  15.     rwObj(mdispose)
  16.   end if
  17.   closeXLib()
  18.   put " " into field "stage&Screen"
  19.   put " " into field "colorIndex"
  20. end
  21.  
  22. on makeObjIfNeeded
  23.   global rwObj
  24.   if not objectp(rwObj) then
  25.     rwObj = RearWindow(mnew, "M")
  26.     if value(rwObj) < 0 then
  27.       alert("System error" && rwObj && "trying to create the RearWindow object in RAM (multiple-monitor config).")
  28.       stopMovie()
  29.       exit
  30.     end if
  31.     if the freeBlock < rwObj(mGetMemoryNeeded) then
  32.       if objectp(rwObj) then
  33.         rwObj(mdispose)
  34.         rwObj = RearWindow(mnew, "S")
  35.       end if
  36.       if value(rwObj) < 0 then
  37.         alert("System error" && rwObj && "trying to create the RearWindow object in RAM (single-monitor config).")
  38.         stopMovie()
  39.         exit
  40.       end if
  41.     end if
  42.   end if
  43.   put rwObj
  44. end
  45.  
  46. on fillWithIndexColor
  47.   global rwObj
  48.   makeObjIfNeeded()
  49.   patVar = 255
  50.   rwObj(mIndexColorToWindow, patVar)
  51. end
  52.