Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Picture = Picture {
- picCursor :: Cursor
- picLayers :: [Image]
- picBackground :: Background
- data Cursor
- data Background
- = Background { }
- | ClearBackground
- emptyPicture :: Picture
- addToTop :: Picture -> Image -> Picture
- addToBottom :: Picture -> Image -> Picture
- picForImage :: Image -> Picture
- picForLayers :: [Image] -> Picture
- picImage :: Picture -> Image
Documentation
A Vty picture.
These can be constructed directly or using picForImage
.
Picture | |
|
A picture can be configured to hide the cursor or to show the cursor at the specified character position.
There is not a 1:1 map from character positions to a row and column on the screen due to characters that take more than 1 column.
NoCursor | Hide the cursor |
PositionOnly !Bool !Int !Int | Set the terminal's cursor position without displaying a cursor
character. This is important for accessibility with screen
readers where a cursor position needs to be reported but we may
not want to show a block cursor in that location for cosmetic
reasons. The boolean argument indicates whether the positioning
should be absolute as with |
Cursor !Int !Int | Show the cursor at the given logical column accounting for character width in the presence of multi-column characters. |
AbsoluteCursor !Int !Int | Show the cursor at the given absolute terminal column and row |
data Background Source #
A Picture
has a background pattern. The background is either:
- ClearBackground, which shows the layer below or is blank if the bottom layer
- A character and a display attribute
If the display attribute used previously should be used for a
background fill then use currentAttr
for the background attribute.
Background | |
| |
ClearBackground | A ClearBackground is:
|
Instances
Show Background Source # | |
Defined in Graphics.Vty.Picture showsPrec :: Int -> Background -> ShowS # show :: Background -> String # showList :: [Background] -> ShowS # | |
NFData Background Source # | |
Defined in Graphics.Vty.Picture rnf :: Background -> () # | |
Eq Background Source # | |
Defined in Graphics.Vty.Picture (==) :: Background -> Background -> Bool # (/=) :: Background -> Background -> Bool # |
emptyPicture :: Picture Source #
A picture with no cursor, background or image layers.
picForImage :: Image -> Picture Source #
Create a picture from the given image. The picture will not have a displayed cursor and no background pattern (ClearBackground) will be used.
picForLayers :: [Image] -> Picture Source #
Create a picture with the given layers, top-most first.
The picture will not have a displayed cursor and no background pattern (ClearBackgroun) will be used.