Copyright | (c) George Steel 2017 |
---|---|
License | BSD3 |
Maintainer | george.steel@gmail.org |
Safe Haskell | None |
Language | Haskell2010 |
Functions for creating buttons which interact with FRPNow.
- type IconName = Text
- createButton :: Maybe IconName -> Maybe Text -> Now (Button, EvStream ())
- createDynamicButton :: Behavior Text -> Now (Button, EvStream ())
- createToggleButton :: Maybe IconName -> Maybe Text -> Bool -> Now (ToggleButton, Behavior Bool)
- createCheckButton :: Text -> Bool -> Now (CheckButton, Behavior Bool)
- createStaticChecklist :: Eq a => [(a, Text)] -> [a] -> Now ([CheckButton], Behavior [a])
- createDynamicChecklist :: Eq a => Behavior [(a, Text)] -> Now (VBox, Behavior [a])
Documentation
Type for standard icon names. The value should be contained in the standard list at https://developer.gnome.org/icon-naming-spec/.
createButton :: Maybe IconName -> Maybe Text -> Now (Button, EvStream ()) Source #
Creates a button with (optionally) text and an icon. Returns the button and when it is pressed.
createDynamicButton :: Behavior Text -> Now (Button, EvStream ()) Source #
Creates a button with dynamic text.
createToggleButton :: Maybe IconName -> Maybe Text -> Bool -> Now (ToggleButton, Behavior Bool) Source #
Creates a toggle button with an initial state. Breutns the button and it's current state.
Checkboxes
createCheckButton :: Text -> Bool -> Now (CheckButton, Behavior Bool) Source #
Creates a checkbox with text an an initial state. Returns the widget and its current state
createStaticChecklist :: Eq a => [(a, Text)] -> [a] -> Now ([CheckButton], Behavior [a]) Source #
Creates a set of checkboxes from a list of (item,label) pairs and a list of initially-checked items. Returns a list of CheckButton
s (use a function on the Containers module to pack them) and the currently-selected items.