{-# LANGUAGE DeriveGeneric #-}
module Brick.Widgets.TabularList.Types (
ColumnIndex
, RowIndex
, Index
, Width
, Height
, AvailWidth
, ListItemHeight
, Position(..)
, WidthDeficit
, ListFocused
, RowHeaderWidth(..)
) where
import GHC.Generics (Generic)
type ColumnIndex = Int
type RowIndex = Int
type Index = Int
type Width = Int
type Height = Int
type AvailWidth = Int
type ListItemHeight = Int
data Position = Position {
Position -> Index
index :: Index
, Position -> Bool
selected :: Bool
} deriving (Index -> Position -> ShowS
[Position] -> ShowS
Position -> String
forall a.
(Index -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Position] -> ShowS
$cshowList :: [Position] -> ShowS
show :: Position -> String
$cshow :: Position -> String
showsPrec :: Index -> Position -> ShowS
$cshowsPrec :: Index -> Position -> ShowS
Show, forall x. Rep Position x -> Position
forall x. Position -> Rep Position x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Position x -> Position
$cfrom :: forall x. Position -> Rep Position x
Generic)
type WidthDeficit = Int
type ListFocused = Bool
data rowH =
Width
| (AvailWidth -> Width)
| (AvailWidth -> [rowH] -> Width)
deriving forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall rowH x. Rep (RowHeaderWidth rowH) x -> RowHeaderWidth rowH
forall rowH x. RowHeaderWidth rowH -> Rep (RowHeaderWidth rowH) x
$cto :: forall rowH x. Rep (RowHeaderWidth rowH) x -> RowHeaderWidth rowH
$cfrom :: forall rowH x. RowHeaderWidth rowH -> Rep (RowHeaderWidth rowH) x
Generic