home *** CD-ROM | disk | FTP | other *** search
- /* DopusScreen.dopus5 */
- options results
- lf = '0a'x
- address 'DOPUS.1'
- dopus front
- dopus screen
- if rc = 5 then do
- address command 'RequestChoice "Opus is iconified" OK'
- exit
- end
- dimensions = result
- text = 'The Opus screen name is: 'word(dimensions,1)
- dopus request '"'text'" OK'
- text = 'The Opus screen is 'word(dimensions,2)' pixels wide'||lf||'and 'word(dimensions,3)' high.'
- dopus request '"'text'" OK'
- text = 'The titlebar is 'word(dimensions,5)' pixels high, and'||lf||'it is a 'word(dimensions,4)' bit screen.'
- dopus request '"'text'" OK'
- x = trunc(word(dimensions,2) / 2) - trunc(word(dimensions,6) / 2)
- y = trunc((word(dimensions,3) - word(dimensions,5)) / 2) - trunc(word(dimensions,7) / 2)
- position = x'/'y'/'word(dimensions,6)'/'word(dimensions,7)
- lister new position
- handle = result
- text = 'This lister is in the screen centre,',
- ||lf||'taking the titlebar height into account',
- ||lf||'and is the default size.'
- lister request handle '"'text'" OK'
- lister close handle
- dopus back
- exit
-