Copyright | (c) 2015 Nikita Churaev |
---|---|
License | BSD3 |
Safe Haskell | Safe |
Language | Haskell2010 |
- data DialogT m a where
- type DialogIO = DialogT IO
- changeTitle :: String -> DialogT m ()
- changeEndMessage :: String -> DialogT m ()
- displayLine :: String -> DialogT m ()
- askLine :: String -> DialogT m String
- display :: [Paragraph] -> DialogT m ()
- data Paragraph
- data FormattedText
- data PictureSource = PictureFromURL String
- data ListStyle
- newtype ListItem = ListItem [Paragraph]
- newtype TableRow = TableRow [TableCell]
- data TableCell = TableCell CellStyle [Paragraph]
- data CellStyle
- data FontSize = FontSize Int
- mkFontSize :: Int -> FontSize
- data Color = Color Word8 Word8 Word8
- white :: Color
- black :: Color
- red :: Color
- green :: Color
- blue :: Color
- rgb :: Word8 -> Word8 -> Word8 -> Color
- toRGB :: Color -> (Word8, Word8, Word8)
Documentation
Dialog monad transformer.
Pure :: a -> DialogT m a | |
Bind :: (forall r. (forall b. DialogT m b -> (b -> DialogT m a) -> r) -> r) -> DialogT m a | |
Lift :: m a -> DialogT m a | |
ChangeTitle :: String -> DialogT m () | |
ChangeEndMessage :: String -> DialogT m () | |
Display :: [Paragraph] -> DialogT m () | |
AskLine :: String -> DialogT m String |
changeTitle :: String -> DialogT m () Source
Changes the title of the dialog window. Default: "Dialog"
changeEndMessage :: String -> DialogT m () Source
Changes the end message of the dialog. Default: "End of program."
displayLine :: String -> DialogT m () Source
Displays a plain-text single-line message.
data FormattedText Source
data PictureSource Source
Font size (in percent of the base font size).
mkFontSize :: Int -> FontSize Source