From: <kr_...@us...> - 2003-11-22 10:50:44
|
Update of /cvsroot/htoolkit/gio/src/examples/simple In directory sc8-pr-cvs1:/tmp/cvs-serv30817/src/examples/simple Modified Files: SimpleMenu.hs Log Message: Updated example Index: SimpleMenu.hs =================================================================== RCS file: /cvsroot/htoolkit/gio/src/examples/simple/SimpleMenu.hs,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** SimpleMenu.hs 15 Nov 2003 10:53:23 -0000 1.12 --- SimpleMenu.hs 22 Nov 2003 10:50:41 -0000 1.13 *************** *** 11,14 **** --- 11,19 ---- bmpOpen <- readBitmap "res/open.bmp" [] bmpSave <- readBitmap "res/save.bmp" [] + + set sb [visible =: True] + indicator [title =: "Click Me", on command =: messageAlert "CLICK!"] sb + icolor <- indicator [title =: "NONE"] sb + itrans <- indicator [title =: "NORM"] sb fm <- menu [title =: "&File"] mainMenu *************** *** 45,69 **** , tooltip =: "Set transparency on/off" , accel =: KeyChar '\^T' ! , on command =:: onToggleTransparent ] mColor menuline mColor mRed <- menuRadioItem [ title =: "&Red" , tooltip =: "Select red color" ! , on command =: messageAlert "RED COLOR" ] mColor mGreen <- menuRadioItem [ title =: "&Green" , tooltip =: "Select green color" ! , on command =: messageAlert "GREEN COLOR" ] mColor mBlue <- menuRadioItem [ title =: "&Blue" , tooltip =: "Select blue color" ! , on command =: messageAlert "BLUE COLOR" ] mColor setMenuRadioGroup [mRed, mGreen, mBlue] - - set sb [visible =: True] where ! onToggleTransparent tgl = do chk <- get tgl checked ! messageAlert (if chk then "TRANSPARENT ON" else "TRANSPARENT OFF") --- 50,72 ---- , tooltip =: "Set transparency on/off" , accel =: KeyChar '\^T' ! , on command =:: onToggleTransparent itrans ] mColor menuline mColor mRed <- menuRadioItem [ title =: "&Red" , tooltip =: "Select red color" ! , on command =: set icolor [title =: "RED"] ] mColor mGreen <- menuRadioItem [ title =: "&Green" , tooltip =: "Select green color" ! , on command =: set icolor [title =: "GREEN"] ] mColor mBlue <- menuRadioItem [ title =: "&Blue" , tooltip =: "Select blue color" ! , on command =: set icolor [title =: "BLUE"] ] mColor setMenuRadioGroup [mRed, mGreen, mBlue] where ! onToggleTransparent itrans tgl = do chk <- get tgl checked ! set itrans [title =: (if chk then "TRANSPARENT" else "NORM")] |