reactive-banana-wx-0.9.0.1: 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 :: Frameworks t => w -> Event w (a -> IO ()) -> Moment t (Event t a) Source

Event with exactly one parameter.

event0 :: Frameworks t => w -> Event w (IO ()) -> Moment t (Event t ()) Source

Event without parameters.

behavior :: Frameworks t => w -> Attr w a -> Moment t (Behavior t a) Source

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

data Prop' t w Source

Variant of wx properties that accept a Behavior.

Constructors

forall a . (Attr w a) :== (Behavior t a) infixr 0 

sink :: Frameworks t => w -> [Prop' t w] -> Moment t () Source

Animate a property with a behavior

Specific widgets

eventText :: Frameworks t => TextCtrl w -> Moment t (Event t String) Source

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

behaviorText :: Frameworks t => TextCtrl w -> String -> Moment t (Behavior t String) Source

Behavior corresponding to user input the text field.

eventSelection :: Frameworks t => SingleListBox b -> Moment t (Event t 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.