frpnow-gtk3-0.2.0: Program GUIs with GTK3 and frpnow!

Copyright(c) George Steel 2017
LicenseBSD3
Maintainergeorge.steel@gmail.org
Safe HaskellNone
LanguageHaskell2010

Control.FRPNow.GTK.Buttons

Contents

Description

Functions for creating buttons which interact with FRPNow.

Synopsis

Documentation

type IconName = Text Source #

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 CheckButtons (use a function on the Containers module to pack them) and the currently-selected items.

createDynamicChecklist :: Eq a => Behavior [(a, Text)] -> Now (VBox, Behavior [a]) Source #

Creates a checklist to select from a dynamic list of objects (updating the displayed checkboxes). Returns the checklist (stacked vertically in a VBox) and the currently selected items.