1-- Copyright 2009-2010 Corey O'Connor
2{-# LANGUAGE ScopedTypeVariables #-}
3module Graphics.Vty.Debug ( module Graphics.Vty.Debug
4 , module Graphics.Vty.Debug.Image
8import Graphics.Vty.Attributes
9import Graphics.Vty.Debug.Image
10import Graphics.Vty.Span
11import Graphics.Vty.DisplayRegion
13import qualified Data.Vector as Vector
16row_ops_effected_columns :: DisplayOps -> [Word]
17row_ops_effected_columns spans
18 = Vector.toList $ Vector.map span_ops_effected_columns $ display_ops spans
20all_spans_have_width :: DisplayOps -> Word -> Bool
21all_spans_have_width spans expected
22 = all (== expected) $ Vector.toList $ Vector.map span_ops_effected_columns $ display_ops spans
24span_ops_effected_rows :: DisplayOps -> Word
25span_ops_effected_rows (DisplayOps _ the_row_ops)
26 = toEnum $ length (filter (not . null . Vector.toList) (Vector.toList the_row_ops))
28type SpanConstructLog = [SpanConstructEvent]
29data SpanConstructEvent = SpanSetAttr Attr
31is_set_attr :: Attr -> SpanConstructEvent -> Bool
32is_set_attr expected_attr (SpanSetAttr in_attr)
33 | in_attr == expected_attr = True
34is_set_attr _attr _event = False
36data DebugWindow = DebugWindow Word Word
39region_for_window :: DebugWindow -> DisplayRegion
40region_for_window (DebugWindow w h) = DisplayRegion w h
42type TestWindow = DebugWindow
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