vty-5.18: A simple terminal UI library

Safe HaskellNone
LanguageHaskell2010

Graphics.Vty.Picture

Synopsis

Documentation

data Picture Source #

A Vty picture.

These can be constructed directly or using picForImage.

Constructors

Picture 

Fields

Instances

data Cursor Source #

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.

Constructors

NoCursor

Hide the cursor

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

Instances

NFData Cursor Source # 

Methods

rnf :: Cursor -> () #

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.

Constructors

Background 
ClearBackground

A ClearBackground is:

  • the space character if there are remaining non-skip ops
  • End of line if there are no remaining non-skip ops.

Instances

emptyPicture :: Picture Source #

A picture with no cursor, background or image layers.

addToTop :: Picture -> Image -> Picture Source #

Add an Image as the top-most layer of a Picture.

addToBottom :: Picture -> Image -> Picture Source #

Add an Image as the bottom-most layer of a Picture.

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.

picImage :: Picture -> Image Source #

Return the top-most Image layer for a picture. This is unsafe for Pictures without at least one layer.

This is provided for compatibility with applications that do not use more than a single layer.