summoner-tui-0.1.0: Tool for scaffolding fully configured batteries-included production-level Haskell projects using TUI.

Safe HaskellNone
LanguageHaskell2010

Summoner.Tui.Form

Description

Form layout and form fields data types.

Synopsis

Documentation

data SummonForm Source #

Form that is used for new command.

type KitForm e = Form SummonKit e SummonForm Source #

Alias for type of the summoner form.

mkForm :: forall e. SummonKit -> KitForm e Source #

Creates the input form from the given initial SummonKit.

getCurrentFocus :: Form s e n -> Maybe n Source #

Gets current focus of the form.

isActive :: SummonKit -> SummonForm -> Bool Source #

Returns True when form field is active depending on the current state of SummonKit.

recreateForm Source #

Arguments

:: (KitForm e -> KitForm e)

Validation function

-> KitForm e

Original form

-> KitForm e

New form

Create form from scratch using its current state. This is needed to activate/deactivate checkboxes. Should be done with care to preserve focus and fields validation.