From: <kr_...@us...> - 2003-11-15 10:53:26
|
Update of /cvsroot/htoolkit/gio/src/examples/simple In directory sc8-pr-cvs1:/tmp/cvs-serv4336/src/examples/simple Modified Files: SimpleMenu.hs Log Message: Update example after last changes Index: SimpleMenu.hs =================================================================== RCS file: /cvsroot/htoolkit/gio/src/examples/simple/SimpleMenu.hs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** SimpleMenu.hs 14 Nov 2003 22:36:28 -0000 1.11 --- SimpleMenu.hs 15 Nov 2003 10:53:23 -0000 1.12 *************** *** 4,8 **** main ! = start "SimpleMenu" "1.0" SDI [visibleStatusBar =: True] $ do w <- window [view =: sz 200 200] showWindow w --- 4,8 ---- main ! = start "SimpleMenu" "1.0" SDI [] $ do w <- window [view =: sz 200 200] showWindow w *************** *** 14,29 **** fm <- menu [title =: "&File"] mainMenu menuitem [ title =: "&New" , accel =: KeyChar '\^N' , on command =: messageAlert "NEW" , icon =: Just bmpNew ] fm ! menuitem [title =: "&Open" , accel =: KeyChar '\^O' , on command =: messageAlert "OPEN" , icon =: Just bmpOpen ] fm ! menuitem [title =: "&Close"] fm menuline fm menuitem [ title =: "&Save" , accel =: KeyChar '\^S' , on command =: messageAlert "SAVE" --- 14,34 ---- fm <- menu [title =: "&File"] mainMenu menuitem [ title =: "&New" + , tooltip =: "Create a new document" , accel =: KeyChar '\^N' , on command =: messageAlert "NEW" , icon =: Just bmpNew ] fm ! menuitem [ title =: "&Open" ! , tooltip =: "Open an existing document" , accel =: KeyChar '\^O' , on command =: messageAlert "OPEN" , icon =: Just bmpOpen ] fm ! menuitem [ title =: "&Close" ! , tooltip =: "Close the active document" ! ] fm menuline fm menuitem [ title =: "&Save" + , tooltip =: "Save the active document" , accel =: KeyChar '\^S' , on command =: messageAlert "SAVE" *************** *** 31,43 **** ] fm menuline fm ! menuitem [title =: "&Exit", on command =: halt] fm mColor <- menu [title =: "&Color"] mainMenu ! menucheck [title =: "&Transparent", accel =: KeyChar '\^T', on command =:: onToggleTransparent] mColor menuline mColor ! mRed <- menuRadioItem [title =: "&Red", on command =: messageAlert "RED COLOR" ] mColor ! mGreen <- menuRadioItem [title =: "&Green", on command =: messageAlert "GREEN COLOR"] mColor ! mBlue <- menuRadioItem [title =: "&Blue", on command =: messageAlert "BLUE COLOR" ] mColor setMenuRadioGroup [mRed, mGreen, mBlue] where onToggleTransparent tgl = do --- 36,66 ---- ] fm menuline fm ! menuitem [ title =: "&Exit" ! , tooltip =: "Quit the application" ! , on command =: halt ! ] fm mColor <- menu [title =: "&Color"] mainMenu ! menucheck [ title =: "&Transparent" ! , 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 |