hydra-tui-0.19.0: TUI for managing a Hydra node
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.TUI.Forms

Documentation

utxoCheckboxField :: forall s e n. (s ~ Map TxIn (TxOut CtxUTxO, Bool), n ~ Text) => Map TxIn (TxOut CtxUTxO) -> Form s e n Source #

utxoRadioField :: forall s e n. (s ~ (TxIn, TxOut CtxUTxO), n ~ Text) => Map TxIn (TxOut CtxUTxO) -> Form s e n Source #

confirmRadioField :: forall s e n. (s ~ Bool, n ~ Text) => Form s e n Source #

checkboxGroupField Source #

Arguments

:: (Ord k, Ord n) 
=> LeftBracketChar 
-> CheckmarkChar 
-> RightBracketChar 
-> Lens' (Map k (a, Bool)) (Map k (a, Bool))

The state lens for this value.

-> [((k, a, Bool), n, Text)]

The available choices, in order. Each choice is represented by a resource name n, a text label, and a triplet of type @(k, a, Bool)@; where k is the unique identifier for the choice, a the value carried by the key and Bool being the default choice.

-> Map k (a, Bool)

The initial form state.

-> FormFieldState (Map k (a, Bool)) e n 

type FormFieldRenderHelper a n = a -> Text -> Bool -> Widget n -> Widget n Source #

customRadioField Source #

Arguments

:: (Ord n, Eq a) 
=> LeftBracketChar 
-> CheckmarkChar 
-> RightBracketChar 
-> Lens' s a

The state lens for this value.

-> [(a, n, Text)]

The available choices, in order. Each choice has a value of type a, a resource name, and a text label.

-> FormFieldRenderHelper a n

Render widget helper.

-> s

The initial form state.

-> FormFieldState s e n