vty-5.16: A simple terminal UI library

Graphics.Vty.Picture

Synopsis

# Documentation

data Picture Source #

A Vty picture.

These can be constructed directly or using picForImage.

Constructors

 Picture FieldspicCursor :: CursorThe picture's cursor.picLayers :: [Image]The picture's image layers (top-most first).picBackground :: BackgroundThe picture's background to be displayed in locations with no Image data.

Instances

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

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

 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
• 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 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 -> () #

A picture with no cursor, background or image layers.

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

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

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.

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.