Update of /cvsroot/htoolkit/HToolkit/Examples/ByeDemo
In directory sc8-pr-cvs1:/tmp/cvs-serv15456/ByeDemo
Added Files:
Main.hs
Log Message:
Add ByeDemo
--- NEW FILE: Main.hs ---
module Main where
import Graphics.UI.HGUI
import Data.IORef
bye_form closef ~(frm :+: stRef :+: txt :+: btn) = form [title "Buy!", onclose guiMainExit] $
newIORef True
</>
(text [title "Hello World"])
<|>
(fillXY . expandXY 1 1) (button [title "Bye", onclick bye])
where
bye = do
st <- readIORef stRef
if st
then do
btn # setText "Goodbye"
writeIORef stRef False
else closef >> guiMainExit
main = showForm bye_form >> guiMain
|