hbro-1.3.0.0: Minimal extensible web-browser

Safe HaskellNone
LanguageHaskell98

Hbro.Gui.PromptBar

Contents

Description

Designed to be imported as qualified.

Synopsis

Types

data PromptBar

No exported constructor, please use buildFrom

buildFrom :: (ControlIO m, MonadLogger m, Applicative m) => Builder -> m PromptBar

A PromptBar can be built from an XML file.

labelName :: Text

Widget name used in the XML file that describes the UI

entryName :: Text

Widget name used in the XML file that describes the UI

boxName :: Text

Widget name used in the XML file that describes the UI

Functions

clean :: ControlIO m => PromptBar -> m PromptBar

Close prompt, that is: clean its content, signals and callbacks

Prompts

prompt

Arguments

:: (ControlIO m, MonadLogger m, MonadError Text m) 
=> Text

Prompt description

-> Text

Pre-fill value

-> PromptBar 
-> m Text 

Open prompt bar with given description and default value, register a callback to trigger when value is changed, and another one when value is validated.

uriPrompt :: (ControlIO m, MonadLogger m, MonadError Text m, MonadResource m) => Text -> Text -> PromptBar -> m URI

Same as prompt for URI values

iprompt :: (ControlIO m, MonadLogger m, MonadError Text m, MonadResource m) => Text -> Text -> (Text -> m ()) -> PromptBar -> m ()

Monadic versions

ipromptM :: (ControlIO m, MonadResource m, MonadReader r m, Has PromptBar r, MonadLogger m, MonadError Text m) => Text -> Text -> (Text -> m ()) -> m ()