@@ -1,9 +1,7 @@
11{-# LANGUAGE BangPatterns #-}
2−-- | The Picture data structure is representative of the final terminal view.
2+-- | The 'Picture' data structure is representative of the final terminal view.
33--
4−-- This module re-exports most of the Graphics.Vty.Image and Graphics.Vty.Attributes modules.
5−--
6−-- Copyright 2009-2010 Corey O'Connor
4+-- A 'Picture' is a background paired with a layer of 'Image's.
75module Graphics.Vty.Picture ( module Graphics.Vty.Picture
86 , module Graphics.Vty.Image
97 )
@@ -42,7 +40,7 @@ add_to_bottom :: Picture -> Image -> Picture
4240add_to_bottom p i = p {pic_layers = pic_layers p ++ [i]}
4341
4442-- | Create a picture for display for the given image. The picture will not have a displayed cursor
45−-- and the background display attribute will be `current_attr`.
43+-- and no background pattern (ClearBackground) will be used.
4644pic_for_image :: Image -> Picture
4745pic_for_image i = Picture
4846 { pic_cursor = NoCursor
@@ -51,6 +49,9 @@ pic_for_image i = Picture
5149 }
5250
5351-- | Create a picture for display with the given layers. Ordered top to bottom.
52+--
53+-- The picture will not have a displayed cursor and no background apttern (ClearBackgroun) will be
54+-- used.
5455--
5556-- The first 'Image' is the top layer.
5657pic_for_layers :: [Image] -> Picture
@@ -79,8 +80,7 @@ instance NFData Cursor where
7980-- | A 'Picture' has a background pattern. The background is either ClearBackground. Which shows the
8081-- layer below or is blank if the bottom layer. Or the background pattern is a character and a
8182-- display attribute. If the display attribute used previously should be used for a background fill
82−-- then use `current_attr` for the background attribute. This is the default background display
83−-- attribute.
83+-- then use `current_attr` for the background attribute.
8484--
8585-- \todo The current attribute is always set to the default attributes at the start of updating the
8686-- screen to a picture.
@@ -89,13 +89,11 @@ data Background
8989 { background_char :: Char
9090 , background_attr :: Attr
9191 }
92− -- | The background is:
92+ -- | A ClearBackground is:
9393 --
9494 -- * the space character if there are remaining non-skip ops
95− -- * (?) nothing if there are no remaining non-skip ops.
9695 --
97− -- Might require the terminal interface to do a line clear?
98− -- Or should the nothing case be switched with crlf?
96+ -- * End of line if there are no remaining non-skip ops.
9997 | ClearBackground
10098
10199instance NFData Background where