ยค stringPopupF, passwdPopupF

Pop-up windows

Types

stringPopupF :: String -> F (Maybe String, Maybe String) ((Maybe String, Maybe String), String)
passwdPopupF :: String -> F (Maybe String, Maybe String) ((Maybe String, Maybe String), String)

Synopsis

stringPopupF default

Description

stringPopupF is a dialog popup that shows a message and waits for the user to enter a text string and press a confirm or cancel button. Pressing the Return key is equivalent to pressing the confirm button.

passwdPopupF works like stringPopupF, except that it shows asterisks for all characters entered.

Input

Input messages are pairs of an optional prompt and an optional default answer string. One or both of these can be Nothing. Sending a message to stringPopupF causes the window to appear on the screen.

Output

The string entered by the user is output when the confirm button is pressed, paired with the latest input. No message is output if the cancel button is pressed. The window disappears when one of the buttons is pressed.

Arguments

default :: String
Default answer string.

Example

 stringPopupF "(enter your name here)"

See Also

Other popup dialogs: messagePopupF, confirmPopupF, passwdPopupF.

Input fudgets: stringF, passwdF.

The combinator used to build popup dialogs: popupShellF.

Bugs

You can set the initial default input with an argument, but you can not set the message.