wx-0.10.1: wxHaskell is a portable and native GUI library for Haskell.Source codeContentsIndex
Graphics.UI.WX.Events
Contents
Event
Basic events
Selecting
Commanding
Reactive
Event filters
Mouse filters
Keyboard event filters
Types
Modifiers
Mouse events
Calender event
Keyboard events
Internal
Description
Synopsis
data Event w a
on :: Event w a -> Attr w a
mapEvent :: (a -> b) -> (a -> b -> a) -> Event w a -> Event w b
class Selecting w where
select :: Event w (IO ())
select :: Selecting w => Event w (IO ())
class Commanding w where
command :: Event w (IO ())
command :: Commanding w => Event w (IO ())
class Reactive w where
mouse :: Event w (EventMouse -> IO ())
keyboard :: Event w (EventKey -> IO ())
closing :: Event w (IO ())
idle :: Event w (IO Bool)
resize :: Event w (IO ())
focus :: Event w (Bool -> IO ())
activate :: Event w (Bool -> IO ())
mouse :: Reactive w => Event w (EventMouse -> IO ())
keyboard :: Reactive w => Event w (EventKey -> IO ())
closing :: Reactive w => Event w (IO ())
idle :: Reactive w => Event w (IO Bool)
resize :: Reactive w => Event w (IO ())
focus :: Reactive w => Event w (Bool -> IO ())
activate :: Reactive w => Event w (Bool -> IO ())
class Paint w where
paint :: Event w (DC () -> Rect -> IO ())
paintRaw :: Event w (DC () -> Rect -> [Rect] -> IO ())
repaint :: w -> IO ()
paint :: Paint w => Event w (DC () -> Rect -> IO ())
paintRaw :: Paint w => Event w (DC () -> Rect -> [Rect] -> IO ())
repaint :: Paint w => w -> IO ()
enter :: Reactive w => Event w (Point -> IO ())
leave :: Reactive w => Event w (Point -> IO ())
motion :: Reactive w => Event w (Point -> IO ())
drag :: Reactive w => Event w (Point -> IO ())
click :: Reactive w => Event w (Point -> IO ())
unclick :: Reactive w => Event w (Point -> IO ())
doubleClick :: Reactive w => Event w (Point -> IO ())
clickRight :: Reactive w => Event w (Point -> IO ())
unclickRight :: Reactive w => Event w (Point -> IO ())
anyKey :: Reactive w => Event w (Key -> IO ())
key :: Reactive w => Key -> Event w (IO ())
charKey :: Reactive w => Char -> Event w (IO ())
enterKey :: Reactive w => Event w (IO ())
tabKey :: Reactive w => Event w (IO ())
escKey :: Reactive w => Event w (IO ())
helpKey :: Reactive w => Event w (IO ())
delKey :: Reactive w => Event w (IO ())
homeKey :: Reactive w => Event w (IO ())
endKey :: Reactive w => Event w (IO ())
pgupKey :: Reactive w => Event w (IO ())
pgdownKey :: Reactive w => Event w (IO ())
downKey :: Reactive w => Event w (IO ())
upKey :: Reactive w => Event w (IO ())
leftKey :: Reactive w => Event w (IO ())
rightKey :: Reactive w => Event w (IO ())
rebind :: Event w (IO ()) -> Event w (IO ())
calendarEvent :: Event (CalendarCtrl a) (EventCalendar -> IO ())
newEvent :: String -> (w -> IO a) -> (w -> a -> IO ()) -> Event w a
Event
data Event w a Source
An event for a widget w that expects an event handler of type a.
on :: Event w a -> Attr w aSource
Transform an event to an attribute.
mapEvent :: (a -> b) -> (a -> b -> a) -> Event w a -> Event w bSource
Change the event type.
Basic events
Selecting
class Selecting w whereSource
Selecting widgets fire a select event when an item is selected.
Methods
select :: Event w (IO ())Source
A select event is fired when an item is selected.
select :: Selecting w => Event w (IO ())Source
A select event is fired when an item is selected.
Commanding
class Commanding w whereSource
Commanding widgets fire a command event.
Methods
command :: Event w (IO ())Source
A commanding event, for example a button press.
show/hide Instances
command :: Commanding w => Event w (IO ())Source
A commanding event, for example a button press.
Reactive
class Reactive w whereSource
Reactive widgets are almost all visible widgets on the screen.
Methods
mouse :: Event w (EventMouse -> IO ())Source
keyboard :: Event w (EventKey -> IO ())Source
closing :: Event w (IO ())Source
idle :: Event w (IO Bool)Source
resize :: Event w (IO ())Source
focus :: Event w (Bool -> IO ())Source
activate :: Event w (Bool -> IO ())Source
mouse :: Reactive w => Event w (EventMouse -> IO ())Source
keyboard :: Reactive w => Event w (EventKey -> IO ())Source
closing :: Reactive w => Event w (IO ())Source
idle :: Reactive w => Event w (IO Bool)Source
resize :: Reactive w => Event w (IO ())Source
focus :: Reactive w => Event w (Bool -> IO ())Source
activate :: Reactive w => Event w (Bool -> IO ())Source
class Paint w whereSource
Paint widgets can serve as a canvas. Note: it is illegal to use both a paint and paintRaw event handler at the same widget.
Methods
paint :: Event w (DC () -> Rect -> IO ())Source
Paint double buffered to a device context. The context is always cleared before drawing. Takes the current view rectangle (adjusted for scrolling) as an argument.
paintRaw :: Event w (DC () -> Rect -> [Rect] -> IO ())Source
Paint directly to the on-screen device context. Takes the current view rectangle and a list of dirty rectangles as arguments.\
repaint :: w -> IO ()Source
Emit a paint event to the specified widget.
paint :: Paint w => Event w (DC () -> Rect -> IO ())Source
Paint double buffered to a device context. The context is always cleared before drawing. Takes the current view rectangle (adjusted for scrolling) as an argument.
paintRaw :: Paint w => Event w (DC () -> Rect -> [Rect] -> IO ())Source
Paint directly to the on-screen device context. Takes the current view rectangle and a list of dirty rectangles as arguments.\
repaint :: Paint w => w -> IO ()Source
Emit a paint event to the specified widget.
Event filters
Mouse filters
enter :: Reactive w => Event w (Point -> IO ())Source
leave :: Reactive w => Event w (Point -> IO ())Source
motion :: Reactive w => Event w (Point -> IO ())Source
drag :: Reactive w => Event w (Point -> IO ())Source
click :: Reactive w => Event w (Point -> IO ())Source
unclick :: Reactive w => Event w (Point -> IO ())Source
doubleClick :: Reactive w => Event w (Point -> IO ())Source
clickRight :: Reactive w => Event w (Point -> IO ())Source
unclickRight :: Reactive w => Event w (Point -> IO ())Source
Keyboard event filters
anyKey :: Reactive w => Event w (Key -> IO ())Source
key :: Reactive w => Key -> Event w (IO ())Source
charKey :: Reactive w => Char -> Event w (IO ())Source
enterKey :: Reactive w => Event w (IO ())Source
tabKey :: Reactive w => Event w (IO ())Source
escKey :: Reactive w => Event w (IO ())Source
helpKey :: Reactive w => Event w (IO ())Source
delKey :: Reactive w => Event w (IO ())Source
homeKey :: Reactive w => Event w (IO ())Source
endKey :: Reactive w => Event w (IO ())Source
pgupKey :: Reactive w => Event w (IO ())Source
pgdownKey :: Reactive w => Event w (IO ())Source
downKey :: Reactive w => Event w (IO ())Source
upKey :: Reactive w => Event w (IO ())Source
leftKey :: Reactive w => Event w (IO ())Source
rightKey :: Reactive w => Event w (IO ())Source
rebind :: Event w (IO ()) -> Event w (IO ())Source
Types
Modifiers
Mouse events
Calender event
calendarEvent :: Event (CalendarCtrl a) (EventCalendar -> IO ())Source
Keyboard events
Internal
newEvent :: String -> (w -> IO a) -> (w -> a -> IO ()) -> Event w aSource
Create a new event from a get and set function.
Produced by Haddock version 2.1.0