|
From: <kr_...@us...> - 2003-03-31 00:12:09
|
Update of /cvsroot/htoolkit/gio/src/Graphics/UI/GIO
In directory sc8-pr-cvs1:/tmp/cvs-serv21987/gio/src/Graphics/UI/GIO
Modified Files:
Events.hs Window.hs
Log Message:
implementation for contextMenu event
Index: Events.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Events.hs,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Events.hs 30 Mar 2003 18:49:07 -0000 1.7
--- Events.hs 31 Mar 2003 00:12:06 -0000 1.8
***************
*** 94,97 ****
--- 94,100 ----
, pgupKey,pgdownKey
, downKey,upKey,leftKey,rightKey
+
+ -- * Context menu
+ , contextMenu
-- * Internal
***************
*** 105,108 ****
--- 108,113 ----
, newMouseEvent
, newKeyboardEvent
+ , newContextMenuEvent
+ -- *** Deadly
, newDismissEvent
, newDestroyEvent
***************
*** 177,182 ****
-- | Reactive widgets react to mouse and keyboard events
class Reactive w where
! mouse :: Event w (MouseEvent -> IO ())
! keyboard :: Event w (KeyboardEvent -> IO ())
-- | Widgets that can be repainted.
--- 182,188 ----
-- | Reactive widgets react to mouse and keyboard events
class Reactive w where
! mouse :: Event w (MouseEvent -> IO ())
! keyboard :: Event w (KeyboardEvent -> IO ())
! contextMenu :: Event w (Point -> Modifiers -> IO ())
-- | Widgets that can be repainted.
***************
*** 336,367 ****
-- Forms
newActivateEvent :: StdWindowEvent w (IO ())
! newActivateEvent = stdWindowEvent Lib.getWindowActivateHandler Lib.setWindowActivateHandler Lib.setWindowActivateDefHandler
newDeactivateEvent:: StdWindowEvent w (IO ())
! newDeactivateEvent= stdWindowEvent Lib.getWindowDeactivateHandler Lib.setWindowDeactivateHandler Lib.setWindowDeactivateDefHandler
newResizeEvent :: StdWindowEvent w (Size -> IO ())
! newResizeEvent = stdWindowEvent Lib.getWindowResizeHandler Lib.setWindowResizeHandler Lib.setWindowResizeDefHandler
newScrollEvent :: StdWindowEvent w (Point -> IO ())
! newScrollEvent = stdWindowEvent Lib.getWindowScrollHandler Lib.setWindowScrollHandler Lib.setWindowScrollDefHandler
-- Reactive
newMouseEvent :: StdWindowEvent w (MouseEvent -> IO ())
! newMouseEvent = stdWindowEvent Lib.getWindowMouseHandler Lib.setWindowMouseHandler Lib.setWindowMouseDefHandler
newKeyboardEvent :: StdWindowEvent w (KeyboardEvent -> IO ())
! newKeyboardEvent = stdWindowEvent Lib.getWindowKeyboardHandler Lib.setWindowKeyboardHandler Lib.setWindowKeyboardDefHandler
-- Deadly
newDismissEvent :: StdWindowEvent w (IO ())
! newDismissEvent = stdWindowEvent Lib.getWindowDismissHandler Lib.setWindowDismissHandler Lib.setWindowDismissDefHandler
newDestroyEvent :: StdWindowEvent w (IO ())
! newDestroyEvent = stdWindowEvent Lib.getWindowDestroyHandler Lib.setWindowDestroyHandler Lib.setWindowDestroyDefHandler
-- commands
newControlCommandEvent :: StdWindowEvent w (IO ())
! newControlCommandEvent = stdWindowEvent Lib.getControlCommandHandler Lib.setControlCommandHandler Lib.setControlCommandDefHandler
{--------------------------------------------------------------------
--- 342,376 ----
-- Forms
newActivateEvent :: StdWindowEvent w (IO ())
! newActivateEvent = stdWindowEvent Lib.getWindowActivateHandler Lib.setWindowActivateHandler Lib.setWindowActivateDefHandler
newDeactivateEvent:: StdWindowEvent w (IO ())
! newDeactivateEvent= stdWindowEvent Lib.getWindowDeactivateHandler Lib.setWindowDeactivateHandler Lib.setWindowDeactivateDefHandler
newResizeEvent :: StdWindowEvent w (Size -> IO ())
! newResizeEvent = stdWindowEvent Lib.getWindowResizeHandler Lib.setWindowResizeHandler Lib.setWindowResizeDefHandler
newScrollEvent :: StdWindowEvent w (Point -> IO ())
! newScrollEvent = stdWindowEvent Lib.getWindowScrollHandler Lib.setWindowScrollHandler Lib.setWindowScrollDefHandler
-- Reactive
newMouseEvent :: StdWindowEvent w (MouseEvent -> IO ())
! newMouseEvent = stdWindowEvent Lib.getWindowMouseHandler Lib.setWindowMouseHandler Lib.setWindowMouseDefHandler
newKeyboardEvent :: StdWindowEvent w (KeyboardEvent -> IO ())
! newKeyboardEvent = stdWindowEvent Lib.getWindowKeyboardHandler Lib.setWindowKeyboardHandler Lib.setWindowKeyboardDefHandler
!
! newContextMenuEvent :: StdWindowEvent w (Point -> Modifiers -> IO ())
! newContextMenuEvent = stdWindowEvent Lib.getWindowContextMenuHandler Lib.setWindowContextMenuHandler Lib.setWindowContextMenuDefHandler
-- Deadly
newDismissEvent :: StdWindowEvent w (IO ())
! newDismissEvent = stdWindowEvent Lib.getWindowDismissHandler Lib.setWindowDismissHandler Lib.setWindowDismissDefHandler
newDestroyEvent :: StdWindowEvent w (IO ())
! newDestroyEvent = stdWindowEvent Lib.getWindowDestroyHandler Lib.setWindowDestroyHandler Lib.setWindowDestroyDefHandler
-- commands
newControlCommandEvent :: StdWindowEvent w (IO ())
! newControlCommandEvent = stdWindowEvent Lib.getControlCommandHandler Lib.setControlCommandHandler Lib.setControlCommandDefHandler
{--------------------------------------------------------------------
Index: Window.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Window.hs,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Window.hs 30 Mar 2003 18:49:07 -0000 1.9
--- Window.hs 31 Mar 2003 00:12:06 -0000 1.10
***************
*** 173,178 ****
instance Reactive Window where
! mouse = newMouseEvent hwindow
! keyboard = newKeyboardEvent hwindow
instance Form Window where
--- 173,179 ----
instance Reactive Window where
! mouse = newMouseEvent hwindow
! keyboard = newKeyboardEvent hwindow
! contextMenu = newContextMenuEvent hwindow
instance Form Window where
|