vty-6.1: A simple terminal UI library
Safe HaskellSafe-Inferred
LanguageHaskell2010

Graphics.Vty.Picture

Synopsis

Documentation

data Picture Source #

A Vty picture.

These can be constructed directly or using picForImage.

Constructors

Picture 

Fields

Instances

Instances details
Show Picture Source # 
Instance details

Defined in Graphics.Vty.Picture

NFData Picture Source # 
Instance details

Defined in Graphics.Vty.Picture

Methods

rnf :: Picture -> () #

Eq Picture Source # 
Instance details

Defined in Graphics.Vty.Picture

Methods

(==) :: Picture -> Picture -> Bool #

(/=) :: Picture -> Picture -> Bool #

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

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 AbsoluteCursor (True) or logical as with Cursor (False).

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

Instances details
Show Cursor Source # 
Instance details

Defined in Graphics.Vty.Picture

NFData Cursor Source # 
Instance details

Defined in Graphics.Vty.Picture

Methods

rnf :: Cursor -> () #

Eq Cursor Source # 
Instance details

Defined in Graphics.Vty.Picture

Methods

(==) :: Cursor -> Cursor -> Bool #

(/=) :: Cursor -> Cursor -> Bool #

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

Instances details
Show Background Source # 
Instance details

Defined in Graphics.Vty.Picture

NFData Background Source # 
Instance details

Defined in Graphics.Vty.Picture

Methods

rnf :: Background -> () #

Eq Background Source # 
Instance details

Defined in Graphics.Vty.Picture

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.