| Copyright | © 2022-2023 Posit Software PBC |
|---|---|
| License | MIT |
| Maintainer | Albert Krewinkel <albert@zeitkraut.de> |
| Safe Haskell | None |
| Language | Haskell2010 |
Text.GridTable.ArrayTable
Description
Grid table representation based on arrays.
Synopsis
- data ArrayTable a = ArrayTable {}
- 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 | |
| Eq a => Eq (ArrayTable a) Source # | |
Defined in Text.GridTable.ArrayTable Methods (==) :: ArrayTable a -> ArrayTable a -> Bool Source # (/=) :: ArrayTable a -> ArrayTable a -> Bool Source # | |
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.
Instances
| Enum RowSpan Source # | |
Defined in Text.GridTable.ArrayTable Methods succ :: RowSpan -> RowSpan Source # pred :: RowSpan -> RowSpan Source # toEnum :: Int -> RowSpan Source # fromEnum :: RowSpan -> Int Source # enumFrom :: RowSpan -> [RowSpan] Source # enumFromThen :: RowSpan -> RowSpan -> [RowSpan] Source # enumFromTo :: RowSpan -> RowSpan -> [RowSpan] Source # enumFromThenTo :: RowSpan -> RowSpan -> RowSpan -> [RowSpan] Source # | |
| Num RowSpan Source # | |
Defined in Text.GridTable.ArrayTable | |
| Read RowSpan Source # | |
| Show RowSpan Source # | |
| Eq RowSpan Source # | |
| Ord RowSpan Source # | |
Defined in Text.GridTable.ArrayTable | |
The number of columns spanned by a cell.
Instances
| Enum ColSpan Source # | |
Defined in Text.GridTable.ArrayTable Methods succ :: ColSpan -> ColSpan Source # pred :: ColSpan -> ColSpan Source # toEnum :: Int -> ColSpan Source # fromEnum :: ColSpan -> Int Source # enumFrom :: ColSpan -> [ColSpan] Source # enumFromThen :: ColSpan -> ColSpan -> [ColSpan] Source # enumFromTo :: ColSpan -> ColSpan -> [ColSpan] Source # enumFromThenTo :: ColSpan -> ColSpan -> ColSpan -> [ColSpan] Source # | |
| Num ColSpan Source # | |
Defined in Text.GridTable.ArrayTable | |
| Read ColSpan Source # | |
| Show ColSpan Source # | |
| Eq ColSpan Source # | |
| Ord ColSpan Source # | |
Defined in Text.GridTable.ArrayTable | |
Row index in a table array.
Constructors
| RowIndex | |
Fields
| |
Instances
| Enum RowIndex Source # | |
Defined in Text.GridTable.ArrayTable Methods succ :: RowIndex -> RowIndex Source # pred :: RowIndex -> RowIndex Source # toEnum :: Int -> RowIndex Source # fromEnum :: RowIndex -> Int Source # enumFrom :: RowIndex -> [RowIndex] Source # enumFromThen :: RowIndex -> RowIndex -> [RowIndex] Source # enumFromTo :: RowIndex -> RowIndex -> [RowIndex] Source # enumFromThenTo :: RowIndex -> RowIndex -> RowIndex -> [RowIndex] Source # | |
| Ix RowIndex Source # | |
Defined in Text.GridTable.ArrayTable | |
| Num RowIndex Source # | |
Defined in Text.GridTable.ArrayTable Methods (+) :: RowIndex -> RowIndex -> RowIndex Source # (-) :: RowIndex -> RowIndex -> RowIndex Source # (*) :: RowIndex -> RowIndex -> RowIndex Source # negate :: RowIndex -> RowIndex Source # abs :: RowIndex -> RowIndex Source # signum :: RowIndex -> RowIndex Source # fromInteger :: Integer -> 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 Methods succ :: ColIndex -> ColIndex Source # pred :: ColIndex -> ColIndex Source # toEnum :: Int -> ColIndex Source # fromEnum :: ColIndex -> Int Source # enumFrom :: ColIndex -> [ColIndex] Source # enumFromThen :: ColIndex -> ColIndex -> [ColIndex] Source # enumFromTo :: ColIndex -> ColIndex -> [ColIndex] Source # enumFromThenTo :: ColIndex -> ColIndex -> ColIndex -> [ColIndex] Source # | |
| Ix ColIndex Source # | |
Defined in Text.GridTable.ArrayTable | |
| Num ColIndex Source # | |
Defined in Text.GridTable.ArrayTable Methods (+) :: ColIndex -> ColIndex -> ColIndex Source # (-) :: ColIndex -> ColIndex -> ColIndex Source # (*) :: ColIndex -> ColIndex -> ColIndex Source # negate :: ColIndex -> ColIndex Source # abs :: ColIndex -> ColIndex Source # signum :: ColIndex -> ColIndex Source # fromInteger :: Integer -> 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 Methods succ :: Alignment -> Alignment Source # pred :: Alignment -> Alignment Source # toEnum :: Int -> Alignment Source # fromEnum :: Alignment -> Int Source # enumFrom :: Alignment -> [Alignment] Source # enumFromThen :: Alignment -> Alignment -> [Alignment] Source # enumFromTo :: Alignment -> Alignment -> [Alignment] Source # enumFromThenTo :: Alignment -> Alignment -> Alignment -> [Alignment] Source # | |
| Read Alignment Source # | |
| 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.