Copyright | © 2022 RStudio 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 #
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.
Instances
Enum RowSpan # | |
Num RowSpan # | |
Read RowSpan # | |
Show RowSpan # | |
Eq RowSpan # | |
Ord RowSpan # | |
Defined in Text.GridTable.ArrayTable |
The number of columns spanned by a cell.
Instances
Enum ColSpan # | |
Num ColSpan # | |
Read ColSpan # | |
Show ColSpan # | |
Eq ColSpan # | |
Ord ColSpan # | |
Defined in Text.GridTable.ArrayTable |
Row index in a table array.
Constructors
RowIndex | |
Fields
|
Instances
Enum RowIndex # | |
Defined in Text.GridTable.ArrayTable | |
Ix RowIndex # | |
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 # | |
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 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 # | |
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 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 # | |
Show Alignment # | |
Eq Alignment # | |
Ord Alignment # | |
mapCells :: (a -> b) -> ArrayTable a -> ArrayTable b #
Apply a function to all cell contents in a grid table.