| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Graphics.UI.Threepenny.Widgets
Synopsis
- data Tidings a
- rumors :: Tidings a -> Event a
- facts :: Tidings a -> Behavior a
- tidings :: Behavior a -> Event a -> Tidings a
- data TextEntry
- entry :: Behavior String -> UI TextEntry
- userText :: TextEntry -> Tidings String
- data ListBox a
- listBox :: forall a. Ord a => Behavior [a] -> Behavior (Maybe a) -> Behavior (a -> UI Element) -> UI (ListBox a)
- userSelection :: ListBox a -> Tidings (Maybe a)
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
tidings :: Behavior a -> Event a -> Tidings a #
Smart constructor. Combine facts and rumors into Tidings.
Widgets
Input widgets
A single-line text entry.
Instances
| Widget TextEntry # | |
Defined in Graphics.UI.Threepenny.Widgets Methods getElement :: TextEntry -> Element # | |
Create a single-line text entry.
ListBox
A list of values. The user can select entries.
Instances
| Widget (ListBox a) # | |
Defined in Graphics.UI.Threepenny.Widgets Methods getElement :: ListBox a -> Element # | |
Arguments
| :: 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) #
User changes to the current selection (possibly empty).