hledger-lib-1.19.1: A reusable library providing the core functionality of hledger

Safe Haskell | None
Language | Haskell2010

Text.Tabular.AsciiWide

Description

Text.Tabular.AsciiArt from tabular-0.2.2.7, modified to treat wide characters as double width.

Synopsis

- render :: Bool -> (rh -> String) -> (ch -> String) -> (a -> String) -> Table rh ch a -> String
- verticalBar :: Bool -> Char
- leftBar :: Bool -> String
- rightBar :: Bool -> String
- midBar :: Bool -> String
- doubleMidBar :: Bool -> String
- renderColumns :: Bool -> [Int] -> Header String -> String
- renderHLine :: VPos -> Bool -> [Int] -> Header String -> Properties -> [String]
- renderHLine' :: VPos -> Bool -> Properties -> [Int] -> Header String -> String
- data VPos
  - = VT
  - | VM
  - | VB
- data HPos
  - = HL
  - | HM
  - | HR
- boxchar :: VPos -> HPos -> Properties -> Properties -> Bool -> String
- pick :: String -> String -> Bool -> String
- lineart :: Properties -> Properties -> Properties -> Properties -> Bool -> String

# Documentation

render Source #

Arguments

:: Bool | pretty tables
-> (rh -> String) |
-> (ch -> String) |
-> (a -> String) |
-> Table rh ch a |
-> String |

for simplicity, we assume that each cell is rendered on a single line

verticalBar :: Bool -> Char Source #

leftBar :: Bool -> String Source #

rightBar :: Bool -> String Source #

midBar :: Bool -> String Source #

doubleMidBar :: Bool -> String Source #

renderColumns Source #

Arguments

:: Bool | pretty
-> [Int] | max width for each column
-> Header String |
-> String |

We stop rendering on the shortest list!

renderHLine Source #

Arguments

:: VPos |
-> Bool | pretty
-> [Int] | width specifications
-> Header String |
-> Properties |
-> [String] |

renderHLine' :: VPos -> Bool -> Properties -> [Int] -> Header String -> String Source #

data VPos Source #

Constructors

VT |
VM |
VB |

data HPos Source #

Constructors

HL |
HM |
HR |

boxchar :: VPos -> HPos -> Properties -> Properties -> Bool -> String Source #

pick :: String -> String -> Bool -> String Source #

lineart :: Properties -> Properties -> Properties -> Properties -> Bool -> String Source #