aUCBLogo Demos and Tests / frametest
to frametest
ftest
; thread [ftest]
end
to ftest
; local [f f2 f3 f4 hs g x finish]
f=Frame [][MyFrame][][400 200][200 100]
f2=Frame [][MyFrame2]
;wxCaption+wxSystem_Menu+wxClose_Box
wxDefault_Frame_Style+wxStay_on_Top
[100 200][300 300]
FrameOnClose f2 [ftest::finish=true]
f3=Frame f2 [MyFrame3]
wxDefault_Frame_Style+wxFrame_float_on_parent+wxFrame_shaped
[100 400][260 300]
points=[]
radius=125
for [phi 0 360 10]
[ push "points (list 1-sin phi 1-cos phi)*radius
]
points=se points [[-10 0][-10 -30][300 -30][300 0]]
FrameSetBackgroundColor f3 "red
FrameSetColor f3 "blue
FrameSetShape f3 points
x=0
hs=(Slider f3 [X] -400 0 400
[ x=SliderValue
;GraphSetCurrent frametestReal::g
setX x
updateGraph
]
wxSL_horizontal+wxSL_Labels+wxSL_Ticks
[25 80][200 80])
f4=(Frame f2 [MyFrame4]
wxDefault_Frame_Style+wxFrame_shaped+wxFrame_float_on_parent
[100 600][260 300]
[noname])
FrameSetShape f4 points
g=(Graph f4
wxDefault_Frame_Style+wxFull_Repaint_on_Resize+wxStay_on_Top
[0 0][250 250][Graph])
setScreenColor "yellow
setScreenRange -400 -400 400 400
stop
FrameSetFocus f2
pr [;Activate MyFrame2 and press a key to exit]
FrameOnChar f2
[ pr [;OK]
ftest::finish=true
]
finish=false
until [finish]
[ dispatchMessages
waituS 100000
; pr repcount
]
end