vty-5.11: A simple terminal UI library

Graphics.Vty.Picture

Description

The Picture data structure is representative of the final terminal view.

A Picture is a background paired with a layer of Images.

Synopsis

# Documentation

data Picture Source #

The type of images to be displayed using update.

Can be constructed directly or using picForImage. Which provides an initial instance with reasonable defaults for picCursor and picBackground.

Constructors

 Picture FieldspicCursor :: Cursor picLayers :: [Image] picBackground :: Background

Instances

 Source # MethodsshowList :: [Picture] -> ShowS # Source # Methodsrnf :: Picture -> () #

a picture with no cursor, background or image layers

The given Image is added as the top layer of the Picture

The given Image is added as the bottom layer of the Picture

Create a picture for display for 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 for display with the given layers. Ordered top to bottom.

The picture will not have a displayed cursor and no background apttern (ClearBackgroun) will be used.

The first Image is the top layer.

data Cursor Source #

A picture can be configured either to not show the cursor or show the cursor at the specified character position.

There is not a 1 to 1 map from character positions to a row and column on the screen due to characters that take more than 1 column.

todo: The Cursor can be given a (character,row) offset outside of the visible bounds of the output region. In this case the cursor will not be shown.

Constructors

 NoCursor Hide the cursor Cursor !Int !Int Show the cursor at the given logical column accounting for char width and row AbsoluteCursor !Int !Int Show the cursor at the given absolute terminal column and row

Instances

 Source # Methodsrnf :: Cursor -> () #

A Picture has a background pattern. The background is either ClearBackground. Which shows the layer below or is blank if the bottom layer. Or the background pattern is 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.

todo The current attribute is always set to the default attributes at the start of updating the screen to a picture.

Constructors

 Background Fields ClearBackground A ClearBackground is:the space character if there are remaining non-skip opsEnd of line if there are no remaining non-skip ops.

Instances

 Source # Methodsrnf :: Background -> () #

Compatibility with applications that do not use more than a single layer.