tinytools-vty-0.1.0.1: a terminal based unicode diagram editing tool
Safe HaskellSafe-Inferred
LanguageHaskell2010

Potato.Flow.Vty.Common

Synopsis

Documentation

oneLineButton Source #

Arguments

:: forall t m. (MonadFix m, MonadHold t m, HasDisplayRegion t m, HasImageWriter t m, HasInput t m) 
=> Behavior t (Attr, Attr) 
-> Dynamic t Text

button content

-> m (Event t ())

event when button is clicked

buttonList Source #

Arguments

:: forall t m. (MonadFix m, MonadHold t m, HasDisplayRegion t m, HasImageWriter t m, HasInput t m, HasTheme t m) 
=> Dynamic t [Text]

list of button contents

-> Maybe (Dynamic t Int)

optional width (displayWidth is used if Nothing)

-> m (Event t Int, Dynamic t Int)

(event when button is clicked, height)

option to pass in height is a hack to work around circular dependency issues as when using Layout, displayWidth may be dependent on returned dynamic height

radioList Source #

Arguments

:: forall t m. (Reflex t, MonadNodeId m, HasDisplayRegion t m, HasImageWriter t m, HasInput t m, HasTheme t m) 
=> Dynamic t [Text]

list of button contents

-> Dynamic t [Int]

which buttons are "active"

-> Maybe (Dynamic t Int)

optional width (displayWidth is used if Nothing)

-> m (Event t Int, Dynamic t Int)

(event when button is clicked, height)

option to pass in height is a hack to work around circular dependency issues as when using Layout, displayWidth may be dependent on returned dynamic height override style: does not modify state internally, instead state must be passed back in

radioListSimple Source #

Arguments

:: forall t m. (Reflex t, MonadFix m, MonadHold t m, MonadNodeId m, HasDisplayRegion t m, HasImageWriter t m, HasInput t m, HasTheme t m) 
=> Int

initial choice

-> [Text]

list of button contents (must be at least one)

-> m (Dynamic t Int)

which radio is selected

checkBox :: forall t m. (Reflex t, MonadFix m, HasDisplayRegion t m, HasImageWriter t m, HasInput t m, HasTheme t m) => Dynamic t Bool -> m (Event t Bool) Source #

creates a check box "[x]" in upper left corner of region override style: does not modify state internally, instead state must be passed back in