Copyright | © 2022 RStudio PBC |
---|---|
License | MIT |
Maintainer | Albert Krewinkel <albert@zeitkraut.de> |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Text.GridTable.ArrayTable
Description
Grid table representation based on arrays.
Synopsis
- data ArrayTable a = ArrayTable {
- arrayTableCells :: Array CellIndex (GridCell a)
- arrayTableHead :: Maybe RowIndex
- arrayTableFoot :: Maybe RowIndex
- arrayTableColSpecs :: Array ColIndex (Alignment, Int)
- data GridCell a
- newtype RowSpan = RowSpan Int
- newtype ColSpan = ColSpan Int
- type CellIndex = (RowIndex, ColIndex)
- newtype RowIndex = RowIndex {
- fromRowIndex :: Int
- newtype ColIndex = ColIndex {
- fromColIndex :: Int
- data Alignment
- mapCells :: (a -> b) -> ArrayTable a -> ArrayTable b
Documentation
data ArrayTable a #
Table representation based on an array; cells are placed on a grid, with indices spanned by other cells containing placeholder cells that point to the spanning cell.
Constructors
ArrayTable | |
Fields
|
Instances
Show a => Show (ArrayTable a) # | |
Defined in Text.GridTable.ArrayTable Methods showsPrec :: Int -> ArrayTable a -> ShowS show :: ArrayTable a -> String showList :: [ArrayTable a] -> ShowS | |
Eq a => Eq (ArrayTable a) # | |
Defined in Text.GridTable.ArrayTable |
A grid cell contains either a real table cell, or is the continuation of a column or row-spanning cell. In the latter case, the index of the continued cell is provided.
Constructors
ContentCell RowSpan ColSpan a | |
ContinuationCell CellIndex |
The number of rows spanned by a cell.
Constructors
RowSpan Int |
The number of columns spanned by a cell.
Constructors
ColSpan Int |
Row index in a table array.
Constructors
RowIndex | |
Fields
|
Instances
Enum RowIndex # | |
Defined in Text.GridTable.ArrayTable | |
Ix RowIndex # | |
Defined in Text.GridTable.ArrayTable | |
Num RowIndex # | |
Show RowIndex # | |
Eq RowIndex # | |
Ord RowIndex # | |
Defined in Text.GridTable.ArrayTable |
Column index in a table array.
Constructors
ColIndex | |
Fields
|
Instances
Enum ColIndex # | |
Defined in Text.GridTable.ArrayTable | |
Ix ColIndex # | |
Defined in Text.GridTable.ArrayTable | |
Num ColIndex # | |
Show ColIndex # | |
Eq ColIndex # | |
Ord ColIndex # | |
Defined in Text.GridTable.ArrayTable |
Cell alignment
Constructors
AlignDefault | |
AlignLeft | |
AlignCenter | |
AlignRight |
Instances
Enum Alignment # | |
Defined in Text.GridTable.ArrayTable | |
Read Alignment # | |
Defined in Text.GridTable.ArrayTable | |
Show Alignment # | |
Eq Alignment # | |
Ord Alignment # | |
Defined in Text.GridTable.ArrayTable |
mapCells :: (a -> b) -> ArrayTable a -> ArrayTable b #
Apply a function to all cell contents in a grid table.