Copyright | © 2022 RStudio PBC |
---|---|
License | MIT |
Maintainer | Albert Krewinkel <[email protected]> |
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 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.
Instances
Enum RowSpan Source # | |
Num RowSpan Source # | |
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 # | |
Num ColSpan Source # | |
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 | |
Ix RowIndex Source # | |
Defined in Text.GridTable.ArrayTable Methods range :: (RowIndex, RowIndex) -> [RowIndex] # index :: (RowIndex, RowIndex) -> RowIndex -> Int # unsafeIndex :: (RowIndex, RowIndex) -> RowIndex -> Int # inRange :: (RowIndex, RowIndex) -> RowIndex -> Bool # rangeSize :: (RowIndex, RowIndex) -> Int # unsafeRangeSize :: (RowIndex, RowIndex) -> Int # | |
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 Methods range :: (ColIndex, ColIndex) -> [ColIndex] # index :: (ColIndex, ColIndex) -> ColIndex -> Int # unsafeIndex :: (ColIndex, ColIndex) -> ColIndex -> Int # inRange :: (ColIndex, ColIndex) -> ColIndex -> Bool # rangeSize :: (ColIndex, ColIndex) -> Int # unsafeRangeSize :: (ColIndex, ColIndex) -> Int # | |
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 Methods succ :: Alignment -> Alignment # pred :: Alignment -> Alignment # fromEnum :: Alignment -> Int # enumFrom :: Alignment -> [Alignment] # enumFromThen :: Alignment -> Alignment -> [Alignment] # enumFromTo :: Alignment -> Alignment -> [Alignment] # enumFromThenTo :: Alignment -> Alignment -> Alignment -> [Alignment] # | |
Read Alignment Source # | |
Show Alignment Source # | |
Eq Alignment Source # | |
Ord Alignment Source # | |
mapCells :: (a -> b) -> ArrayTable a -> ArrayTable b Source #
Apply a function to all cell contents in a grid table.