brick-tabular-list-1.0.0.1: Tabular list widgets for brick.
Safe HaskellSafe-Inferred
LanguageHaskell2010
ExtensionsDeriveGeneric

Brick.Widgets.TabularList.Types

Description

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

Documentation

type Index = Int Source #

Index of a tabular list component among the same kind of components

type Width = Int Source #

Width of a tabular list component

type Height = Int Source #

Height of a tabular list component

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

Constructors

FlatContext 

Fields

Instances

Instances details
Generic FlatContext Source # 
Instance details

Defined in Brick.Widgets.TabularList.Types

Associated Types

type Rep FlatContext :: Type -> Type #

Show FlatContext Source # 
Instance details

Defined in Brick.Widgets.TabularList.Types

type Rep FlatContext Source # 
Instance details

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

type Selected = Bool Source #

Whether a tabular list component is selected

data RowHdr n e r Source #

Constructors

RowHdr 

Fields

Instances

Instances details
Generic (RowHdr n e r) Source # 
Instance details

Defined in Brick.Widgets.TabularList.Types

Associated Types

type Rep (RowHdr n e r) :: Type -> Type #

Methods

from :: RowHdr n e r -> Rep (RowHdr n e r) x #

to :: Rep (RowHdr n e r) x -> RowHdr n e r #

type Rep (RowHdr n e r) Source # 
Instance details

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.