Copyright | Copyright (C) 2015 Wasif Hasan Baig |
---|---|
License | MIT |
Maintainer | Wasif Hasan Baig <[email protected]> |
Stability | alpha |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Text.Table.Definition
Description
Definition of Table
data structure for internal representation.
- data TableType
- data CaptionPos
- data Align
- data Cell = Cell Span Width Align Lines
- data Row = Row [Cell]
- data Column = Column Width Align
- data Header
- data Table = Table Caption [Column] Header [Row]
- type Span = Int
- type Width = Int
- type Gutter = Int
- type Lines = [String]
- type Caption = String
- type AtrName = String
- type AtrValue = String
- type Atrs = [(AtrName, AtrValue)]
Documentation
Type of the Table
.
Alignment of a Column in the Table. Not all TableTypes support column alignments.
Constructors
LeftAlign | |
RightAlign | |
CenterAlign | |
DefaultAlign |
A cell in a table has column span, cell width, cell alignment and the number of lines.
- Span: Number of lines spanned by the cell.
- Width: Width of the column this cell is contained inside
- Align: Alignment of the content inside the cells
- Lines: A list of strings where each string represents a line
A Column contain information about its width and alignment.
A Header contains a Row if present, otherwise NoHeader.
A Table has a caption, information about each column's width and alignment, either a header with a row or no header, and a series of rows.