threepenny-gui-0.9.4.0: GUI framework that uses the web browser as a display.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Graphics.UI.Threepenny.Widgets

Synopsis

Synopsis

Widgets are reusable building blocks for a graphical user interface. This module collects useful widgets that are designed to work with functional reactive programming (FRP).

For more details and information on how to write your own widgets, see the widget design guide.

Tidings

data Tidings a Source #

Data type representing a behavior (facts) and suggestions to change it (rumors).

Instances

Instances details
Applicative Tidings Source #

The applicative instance combines rumors and uses facts when some of the rumors are not available.

Instance details

Defined in Reactive.Threepenny

Methods

pure :: a -> Tidings a #

(<*>) :: Tidings (a -> b) -> Tidings a -> Tidings b #

liftA2 :: (a -> b -> c) -> Tidings a -> Tidings b -> Tidings c #

(*>) :: Tidings a -> Tidings b -> Tidings b #

(<*) :: Tidings a -> Tidings b -> Tidings a #

Functor Tidings Source # 
Instance details

Defined in Reactive.Threepenny

Methods

fmap :: (a -> b) -> Tidings a -> Tidings b #

(<$) :: a -> Tidings b -> Tidings a #

tidings :: Behavior a -> Event a -> Tidings a Source #

Smart constructor. Combine facts and rumors into Tidings.

Widgets

Input widgets

data TextEntry Source #

A single-line text entry.

Instances

Instances details
Widget TextEntry Source # 
Instance details

Defined in Graphics.UI.Threepenny.Widgets

entry Source #

Arguments

:: Behavior String

Display value when the element does not have focus.

-> UI TextEntry 

Create a single-line text entry.

userText :: TextEntry -> Tidings String Source #

User changes to the text value.

ListBox

data ListBox a Source #

A list of values. The user can select entries.

Instances

Instances details
Widget (ListBox a) Source # 
Instance details

Defined in Graphics.UI.Threepenny.Widgets

listBox Source #

Arguments

:: forall a. Ord a 
=> Behavior [a]

list of items

-> Behavior (Maybe a)

selected item

-> Behavior (a -> UI Element)

display for an item

-> UI (ListBox a) 

Create a ListBox.

userSelection :: ListBox a -> Tidings (Maybe a) Source #

User changes to the current selection (possibly empty).