HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulevty-6.5Haskell2010

Graphics.Vty.Picture

  • 3 types
  • 6 values
  • Packagevty-6.5
  • Exports9
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourcePicture.hs
datadata Picture
#

A Vty picture.

These can be constructed directly or using picForImage.

Constructors

Instances3Eq, Show, NFData
datadata Cursor
#

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

Instances3Eq, Show, NFData
  • Eq CursorDefined in vty-6.5 · Graphics.Vty.Picture
  • Show CursorDefined in vty-6.5 · Graphics.Vty.Picture
  • NFData CursorDefined in vty-6.5 · Graphics.Vty.Picture
datadata Background
#

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

Instances3Eq, Show, NFData
valuepicForImage :: Image -> Picture
#

Create a picture from the given image. The picture will not have a displayed cursor and no background pattern (ClearBackground) will be used.

valuepicForLayers :: [Image] -> Picture
#

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.

valuepicImage :: Picture -> Image
#

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.