home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
400-499
/
ff445.lzh
/
TurboText
/
Rexx
/
WindowOrg.ttx
< prev
Wrap
Text File
|
1991-01-24
|
919b
|
46 lines
/** $VER: WindowOrg.ttx Demo 1.0 (23.12.90)
**
** Organize all document window on the screen.
**
** Written by Steve Tibbett
** Modified by Martin Taillefer
**/
OPTIONS RESULTS
GetDocuments
docs = RESULT
numWindows = Words(docs)/2
GetScreenInfo
screenWidth = Word(RESULT,3)
screenHeight = Word(RESULT,4)
wHeight = (screenHeight-2) % numWindows
yPos = 2
DO i=1 TO numWindows
IF (i = numWindows) THEN DO
wHeight = wHeight+2
END
INTERPRET ADDRESS Word(docs,(i*2))
GetWindowInfo
PARSE VAR RESULT dum wX wY sX sY .
/* If sizing first would put it off the screen, size it last */
IF ((wY+wHeight > screenHeight) | (wX>0)) THEN DO
MoveWindow (-wX) (yPos-wY)
SizeWindow screenWidth-sX (wHeight-2)-sY
END; ELSE DO
SizeWindow screenWidth-sX (wHeight-2)-sY
MoveWindow (-wX) (yPos-wY)
END
yPos = yPos+wHeight
END