ยค inputPopupOptF

Pop-up windows

Types

inputPopupOptF :: String ->
                  InF a b ->
                  Maybe b -> F (Maybe String, Maybe a) ((Maybe String, Maybe a), Maybe b)

Synopsis

inputPopupOptF title fudget default

Description

inputPopupOptF is similar to inputPopupF, but inputPopupOptF outputs even if the Cancel button is pressed.

The following is a description of inputPopupOptF. inputListF works analogously.

Input

Input messages are pairs of an optional prompt and and optional message to the argument fudget. One or both of these can be Nothing. Sending a message to inputPopupOptF causes the window to appear on the screen.

Output

The latest value received from the argument fudget is output as Just x when the OK button is pressed, and Nothing if the Cancel button is pressed. In both cases, the output is paired with the latest input. The window disappears when one of the buttons is pressed.

Arguments

title :: String
The window title. Appears in the title bar attached to the window by the window manager.
fudget :: InF a b
A fudget which allows the user to input some value. As a degenerate case, it can also just show some information that the user must confirm or cancel.
default :: Maybe b
Default value that will be output if the user immediately presses Ok.

Example

 inputPopupOptF filePickF

See Also

inputPopupF.