Window management: Difference between revisions

({{omit from|Lotus 123 Macro Scripting}})
Line 40:
WINDOW(Kill=wh) ! close
END</lang>
 
=={{header|Icon}} and {{header|Unicon}}==
The demo program opens three windows, one with a running commentary on the action.
<lang Icon>link graphics
 
procedure main()
 
Delay := 3000
 
W1 := open("Window 1","g","resize=on","size=400,400","pos=100,100","bg=black","fg=red") |
stop("Unbale to open window 1")
W2 := open("Window 2","g","resize=on","size=400,400","pos=450,450","bg=blue","fg=yellow") |
stop("Unbale to open window 2")
W3 := open("Window 3","g","resize=on","size=400,400","pos=600,150","bg=orange","fg=black") |
stop("Unbale to open window 3")
WWrite(W3,"Opened three windows")
WWrite(W3,"Window 1&2 with rectangles")
every Wx := W1 | W2 | W3 do
if Wx ~=== W3 then
FillRectangle(Wx,50,50,100,100)
delay(Delay)
WWrite(W3,"Window 1 rasied")
Raise(W1)
delay(Delay)
WWrite(W3,"Window 2 hidden")
WAttrib(W2,"canvas=hidden")
delay(Delay)
WWrite(W3,"Window 2 maximized")
WAttrib(W2,"canvas=maximal")
Raise(W3)
 
delay(Delay)
WWrite(W3,"Window 2 restored & resized")
WAttrib(W2,"canvas=normal")
WAttrib(W2,"size=600,600")
delay(Delay)
WWrite(W3,"Window 2 moveded")
WAttrib(W2,"posx=700","posy=300")
delay(Delay)
WWrite(W3,"Window 2 minimized")
WAttrib(W2,"canvas=iconic")
delay(Delay)
WWrite(W3,"Window 2 restored")
WAttrib(W2,"canvas=normal") # restore as maximal, possible bug
delay(Delay)
WWrite(W3,"Enter Q or q here to quit")
WDone(W3)
end</lang>
 
{{libheader|Icon Programming Library}}
[http://www.cs.arizona.edu/icon/library/src/procs/graphics.icn graphics.icn provides graphics]
 
=={{header|Oz}}==
Anonymous user