reactive-banana-wx-1.1.1.0: Examples for the reactive-banana library, using wxHaskell.

Safe HaskellNone
LanguageHaskell98

Reactive.Banana.WX

Contents

Synopsis

Synopsis

Utility functions for interfacing with wxHaskell. Note: Useful, but I haven't done any serious design work on these.

General

event1 :: w -> Event w (a -> IO ()) -> MomentIO (Event a) Source #

Event with exactly one parameter.

event0 :: w -> Event w (IO ()) -> MomentIO (Event ()) Source #

Event without parameters.

behavior :: w -> Attr w a -> MomentIO (Behavior a) Source #

Behavior from an attribute. Uses fromPoll, so may behave as you expect.

data Prop' w Source #

Variant of wx properties that accept a Behavior.

Constructors

(Attr w a) :== (Behavior a) infixr 0 

sink :: w -> [Prop' w] -> MomentIO () Source #

Animate a property with a behavior

Specific widgets

eventText :: TextCtrl w -> MomentIO (Event String) Source #

Event that occurs when the user changed the text in text edit widget.

behaviorText :: TextCtrl w -> String -> MomentIO (Behavior String) Source #

Behavior corresponding to user input the text field.

eventSelection :: SingleListBox b -> MomentIO (Event Int) Source #

Event that occurs when the user changed the selection marker in a list box widget.

Mouse event helpers

mouseMotion :: EventMouse -> Maybe (Point, Modifiers) Source #

Return Just in the case that the mouse moves.

mouseEnter :: EventMouse -> Maybe (Point, Modifiers) Source #

Return Just in the case that the mouse enters the boundary.

mouseLeave :: EventMouse -> Maybe (Point, Modifiers) Source #

Return Just in the case that the mouse leaves the boundary.

leftDown :: EventMouse -> Maybe (Point, Modifiers) Source #

Return Just in the case that the left mouse button is pressed.

leftUp :: EventMouse -> Maybe (Point, Modifiers) Source #

Return Just in the case that the left mouse button is released.

leftDClick :: EventMouse -> Maybe (Point, Modifiers) Source #

Return Just in the case that the left mouse button is double-clicked.

leftDrag :: EventMouse -> Maybe (Point, Modifiers) Source #

Return Just in the case that the mouse is dragged around with the left button pressed.

rightDown :: EventMouse -> Maybe (Point, Modifiers) Source #

Return Just in the case that the right mouse button is pressed.

rightUp :: EventMouse -> Maybe (Point, Modifiers) Source #

Return Just in the case that the right mouse button is released.

rightDClick :: EventMouse -> Maybe (Point, Modifiers) Source #

Return Just in the case that the right mouse button is double-clicked.

rightDrag :: EventMouse -> Maybe (Point, Modifiers) Source #

Return Just in the case that the mouse is dragged around with the right button pressed.

middleDown :: EventMouse -> Maybe (Point, Modifiers) Source #

Return Just in the case that the middle mouse button is pressed.

middleUp :: EventMouse -> Maybe (Point, Modifiers) Source #

Return Just in the case that the middle mouse button is released.

middleDClick :: EventMouse -> Maybe (Point, Modifiers) Source #

Return Just in the case that the middle mouse button is double-clicked.

middleDrag :: EventMouse -> Maybe (Point, Modifiers) Source #

Return Just in the case that the mouse is dragged around with the middle button pressed.

mouseWheel :: EventMouse -> Maybe (Bool, Point, Modifiers) Source #

Return Just in the case that the mouse wheel is scrolled.

mouseWheelDown :: EventMouse -> Maybe (Point, Modifiers) Source #

Return Just in the case that the mouse wheel is scrolled downward.

mouseWheelUp :: EventMouse -> Maybe (Point, Modifiers) Source #

Return Just in the case that the mouse wheel is scrolled upward.

Utilities

event1ToAddHandler :: w -> Event w (a -> IO ()) -> IO (AddHandler a) Source #

Obtain an AddHandler from a Event.

event0ToEvent1 :: Event w (IO ()) -> Event w (() -> IO ()) Source #

Obtain an AddHandler from a Event.