Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Extensions | DeriveGeneric |
Types shared by tabular list widgets.
You don't have to import this module because modules for tabular list widgets re-export this module.
Synopsis
- type Index = Int
- type Width = Int
- type Height = Int
- type AvailWidth = Int
- type ListItemHeight = Int
- data FlatContext = FlatContext {}
- type WidthDeficit = Int
- type ListFocused = Bool
- type Selected = Bool
- data RowHdr n e r = RowHdr {
- draw :: ListFocused -> WidthDeficit -> Selected -> r -> Widget n
- width :: AvailWidth -> [r] -> Width
- toRowHdr :: e -> Index -> r
- type DrawColHdrRowHdr n = Maybe (ListFocused -> WidthDeficit -> Widget n)
Documentation
type AvailWidth = Int Source #
Available width
type ListItemHeight = Int Source #
The fixed height for row headers and row columns.
If the height of row headers or row columns is not this height, then the list will look broken.
data FlatContext Source #
Context for one dimensional tabular list components
Instances
Generic FlatContext Source # | |
Defined in Brick.Widgets.TabularList.Types type Rep FlatContext :: Type -> Type # from :: FlatContext -> Rep FlatContext x # to :: Rep FlatContext x -> FlatContext # | |
Show FlatContext Source # | |
Defined in Brick.Widgets.TabularList.Types showsPrec :: Int -> FlatContext -> ShowS # show :: FlatContext -> String # showList :: [FlatContext] -> ShowS # | |
type Rep FlatContext Source # | |
Defined in Brick.Widgets.TabularList.Types type Rep FlatContext = D1 ('MetaData "FlatContext" "Brick.Widgets.TabularList.Types" "brick-tabular-list-1.0.0.1-En9LBR6wT7ZEawsXqx3s8t" 'False) (C1 ('MetaCons "FlatContext" 'PrefixI 'True) (S1 ('MetaSel ('Just "index") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Index) :*: S1 ('MetaSel ('Just "selected") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))) |
type WidthDeficit = Int Source #
widthDeficit = max 0 $ desiredWidth - availableWidth
It is positive when a column is shrunk to the available width.
If it is positive, you may want to remove paddings in your content because it is not followed or preceded by other columns.
type ListFocused = Bool Source #
Whether the list is focused in an application
Row header
RowHdr | |
|
Instances
Generic (RowHdr n e r) Source # | |
type Rep (RowHdr n e r) Source # | |
Defined in Brick.Widgets.TabularList.Types type Rep (RowHdr n e r) = D1 ('MetaData "RowHdr" "Brick.Widgets.TabularList.Types" "brick-tabular-list-1.0.0.1-En9LBR6wT7ZEawsXqx3s8t" 'False) (C1 ('MetaCons "RowHdr" 'PrefixI 'True) (S1 ('MetaSel ('Just "draw") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ListFocused -> WidthDeficit -> Selected -> r -> Widget n)) :*: (S1 ('MetaSel ('Just "width") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (AvailWidth -> [r] -> Width)) :*: S1 ('MetaSel ('Just "toRowHdr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (e -> Index -> r))))) |
type DrawColHdrRowHdr n = Maybe (ListFocused -> WidthDeficit -> Widget n) Source #
The renderer for column header row header.
If row headers and column headers exist and DrawColHdrRowHdr
is Nothing
, then column header row header is
filled with empty space. DrawColHdrRowHdr
merely allows you to customize column header row header.