Safe Haskell | None |
---|---|
Language | Haskell2010 |
Screen overlays.
Synopsis
- type AttrLine = [AttrCharW32]
- emptyAttrLine :: Int -> AttrLine
- textToAL :: Text -> AttrLine
- textFgToAL :: Color -> Text -> AttrLine
- stringToAL :: String -> AttrLine
- (<+:>) :: AttrLine -> AttrLine -> AttrLine
- type Overlay = [AttrLine]
- type IntOverlay = [(Int, AttrLine)]
- splitAttrLine :: X -> AttrLine -> Overlay
- indentSplitAttrLine :: X -> AttrLine -> [AttrLine]
- glueLines :: Overlay -> Overlay -> Overlay
- updateLines :: Int -> (AttrLine -> AttrLine) -> Overlay -> Overlay
- data ColorMode
- linesAttr :: AttrLine -> Overlay
- splitAttrPhrase :: X -> AttrLine -> Overlay
AttrLine
type AttrLine = [AttrCharW32] Source #
Line of colourful text.
emptyAttrLine :: Int -> AttrLine Source #
stringToAL :: String -> AttrLine Source #
Overlay
type Overlay = [AttrLine] Source #
A series of screen lines that either fit the width of the screen
or are intended for truncation when displayed. The length of overlay
may exceed the length of the screen, unlike in SingleFrame
.
An exception is lines generated from animation, which have to fit
in either dimension.
type IntOverlay = [(Int, AttrLine)] Source #
Sparse screen overlay representation where only the indicated rows are overlayed and the remaining rows are kept unchanged.
splitAttrLine :: X -> AttrLine -> Overlay Source #
Split a string into lines. Avoids ending the line with a character other than space. Space characters are removed from the start, but never from the end of lines. Newlines are respected.
Note that we only split wrt White
space, nothing else.
Misc
Color mode for the display.