1-- Copyright 2009-2010 Corey O'Connor
2module Graphics.Vty.Picture ( module Graphics.Vty.Picture
19 -- | The possible display attributes used in constructing an `Image`.
20 , module Graphics.Vty.Attributes
24import Graphics.Vty.Attributes
25import Graphics.Vty.Image hiding ( attr )
29-- |The type of images to be displayed using 'update'.
30-- Can be constructed directly or using `pic_for_image`. Which provides an initial instance with
31-- reasonable defaults for pic_cursor and pic_background.
33 { pic_cursor :: Cursor
35 , pic_background :: Background
38-- | Create a picture for display for the given image. The picture will not have a displayed cursor
39-- and the background display attribute will be `current_attr`.
40pic_for_image :: Image -> Picture
41pic_for_image i = Picture
42 { pic_cursor = NoCursor
44 , pic_background = Background ' ' current_attr
47-- | A picture can be configured either to not show the cursor or show the cursor at the specified
50-- There is not a 1 to 1 map from character positions to a row and column on the screen due to
51-- characters that take more than 1 column.
53-- todo: The Cursor can be given a (character,row) offset outside of the visible bounds of the
54-- output region. In this case the cursor will not be shown.
59-- | Unspecified regions are filled with the picture's background pattern. The background pattern
60-- can specify a character and a display attribute. If the display attribute used previously should
61-- be used for a background fill then use `current_attr` for the background attribute. This is the
62-- default background display attribute.
64-- (tofix) The current attribute is always set to the default attributes at the start of updating the
65-- screen to a picture.
67-- (tofix) The background character *must* occupy a single column and no more.
68data Background = Background
69 { background_char :: Char
70 , background_attr :: Attr
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list