aUCBLogo Demos and Tests / graphtest


to graphtest
   
f=Frame [][MyFrame]
      
wxresize_border+wxcaption+wxsystem_menu+wxclose_box
      
+wxfull_repaint_on_resize+wxstay_on_top
      
;wxDefault_Frame_Style+wxStay_on_Top)
      
[100 100][400 300] 
   
   
g=(Graph f
      
wxdefault_frame_style+wxfull_repaint_on_resize+wxstay_on_top 
      
[0 0][400 300][Graph])

   
WindowOnChar g 
   
[;   sendCharEvent [] KeyboardValue KeyboardRawCode KeyboardRawFlags
      
resendKeyEvent []
   
]
   
WindowOnKeyDown g 
   
[;   sendCharEvent [] KeyboardValue KeyboardRawCode KeyboardRawFlags
      
resendKeyEvent []
   
]
   
WindowOnKeyUp g 
   
[;   sendCharEvent [] KeyboardValue KeyboardRawCode KeyboardRawFlags
      
resendKeyEvent []
   
]
   
singlebuffer

   
WindowSetClientSize 400 300
   
WindowSetFocus g
   
rbox
   
boundingbox
stop
;   pr [;Activate MyFrame and press a key to exit]
   
FrameOnChar graphtest_f 
   
[   pr [;OK] 
      
erase [[][graphtest_f graphtest_g]] 
      
GC
   
]
   
GraphOnMouseLeftDown graphtest_g
   
pr [;click!]
   
]
   
setLightAmbient "white
   
coin1=loadImage "coin1_64x64.png
   
coin1tex=Texture coin1
   
entex
   
forever 
;   until [repcount > 20]   
   
[
;      pr repcount
      
setfc random intmax
      
fillrect [0 0][100 100]
      
updateGraph
      
waitms 500
      
if key? [break]
   
]
end