Update of /cvsroot/htoolkit/port/src/examples
In directory sc8-pr-cvs1:/tmp/cvs-serv4515
Modified Files:
ByeDemo.hs
Log Message:
Update to the actual version of port
Index: ByeDemo.hs
===================================================================
RCS file: /cvsroot/htoolkit/port/src/examples/ByeDemo.hs,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** ByeDemo.hs 24 Mar 2003 17:07:12 -0000 1.8
--- ByeDemo.hs 27 Oct 2003 19:56:03 -0000 1.9
***************
*** 11,15 ****
import Graphics.UI.Port
! main = start "Bye!" SDI demo
demo :: IO ()
--- 11,15 ----
import Graphics.UI.Port
! main = start "Bye" "1.0" SDI demo
demo :: IO ()
***************
*** 23,26 ****
--- 23,27 ----
lsize <- getLabelRequestSize l -- get the minimal size of the label
moveResizeControl l (rectAt (pt 0 0) lsize) -- position in upperleft corner
+ setControlVisible l True
b <- createButton w
***************
*** 28,37 ****
bsize <- getButtonRequestSize b -- get the minimal size of the button
moveResizeControl b (rectAt (pt 0 (sh lsize)) bsize) -- position under the label
! setControlCommandHandler b (bye w l b) -- register event handler
! showWindow w -- show it all
where
-- called on the first click with the window, label, and button as arguments.
bye w l b
= do setLabelText l "Goodbye"
! setControlCommandHandler b (destroyWindow w) -- overwrite the old event handler
--- 29,39 ----
bsize <- getButtonRequestSize b -- get the minimal size of the button
moveResizeControl b (rectAt (pt 0 (sh lsize)) bsize) -- position under the label
+ setControlVisible b True
! setControlCommandHandler b (bye w l b) -- register event handler
! setWindowVisible w True -- show it all
where
-- called on the first click with the window, label, and button as arguments.
bye w l b
= do setLabelText l "Goodbye"
! setControlCommandHandler b halt -- overwrite the old event handler
|