reactive-banana-wx-1.0.0.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

forall a . (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.

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.