| 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 Source #
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) Source # | |
Defined in Text.GridTable.ArrayTable Methods showsPrec :: Int -> ArrayTable a -> ShowS show :: ArrayTable a -> String showList :: [ArrayTable a] -> ShowS | |
| Eq a => Eq (ArrayTable a) Source # | |
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 Source # | |
Defined in Text.GridTable.ArrayTable | |
| Ix RowIndex Source # | |
Defined in Text.GridTable.ArrayTable | |
| Num RowIndex Source # | |
| Show RowIndex Source # | |
| Eq RowIndex Source # | |
| Ord RowIndex Source # | |
Defined in Text.GridTable.ArrayTable | |
Column index in a table array.
Constructors
| ColIndex | |
Fields
| |
Instances
| Enum ColIndex Source # | |
Defined in Text.GridTable.ArrayTable | |
| Ix ColIndex Source # | |
Defined in Text.GridTable.ArrayTable | |
| Num ColIndex Source # | |
| Show ColIndex Source # | |
| Eq ColIndex Source # | |
| Ord ColIndex Source # | |
Defined in Text.GridTable.ArrayTable | |
Cell alignment
Constructors
| AlignDefault | |
| AlignLeft | |
| AlignCenter | |
| AlignRight |
Instances
| Enum Alignment Source # | |
Defined in Text.GridTable.ArrayTable | |
| Read Alignment Source # | |
Defined in Text.GridTable.ArrayTable | |
| Show Alignment Source # | |
| Eq Alignment Source # | |
| Ord Alignment Source # | |
Defined in Text.GridTable.ArrayTable | |
mapCells :: (a -> b) -> ArrayTable a -> ArrayTable b Source #
Apply a function to all cell contents in a grid table.