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

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 ColumnIndex = Int Source #

Index of column among columns

type RowIndex = Int Source #

Index of row among rows

type Index = Int Source #

Index of element among elements

type Width = Int Source #

Width of a list element

type Height = Int Source #

Height of a list element

type AvailWidth = Int Source #

Available width

type ListItemHeight = Int Source #

The fixed height for row headers and cells.

If the height of row headers or cells is not this height, then the list will look broken.

data Position Source #

Linear position for tabular list elements.

Constructors

Position 

Fields

Instances

Instances details
Generic Position Source # 
Instance details

Defined in Brick.Widgets.TabularList.Types

Associated Types

type Rep Position :: Type -> Type #

Methods

from :: Position -> Rep Position x #

to :: Rep Position x -> Position #

Show Position Source # 
Instance details

Defined in Brick.Widgets.TabularList.Types

type Rep Position Source # 
Instance details

Defined in Brick.Widgets.TabularList.Types

type Rep Position = D1 ('MetaData "Position" "Brick.Widgets.TabularList.Types" "brick-tabular-list-0.1.0.2-xtK2tbLVHI135hCs28APH" 'False) (C1 ('MetaCons "Position" '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 an element 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

data RowHeaderWidth rowH Source #

Row header width information

Constructors

FixedRowHeader Width

A fixed width for row header.

AvailRowHeader (AvailWidth -> Width)

Calculate row header width with the width available for each row of a list

VisibleRowHeaders (AvailWidth -> [rowH] -> Width)

Calculate row header width with visible row headers and the width available for each row of a list.

Instances

Instances details
Generic (RowHeaderWidth rowH) Source # 
Instance details

Defined in Brick.Widgets.TabularList.Types

Associated Types

type Rep (RowHeaderWidth rowH) :: Type -> Type #

Methods

from :: RowHeaderWidth rowH -> Rep (RowHeaderWidth rowH) x #

to :: Rep (RowHeaderWidth rowH) x -> RowHeaderWidth rowH #

type Rep (RowHeaderWidth rowH) Source # 
Instance details

Defined in Brick.Widgets.TabularList.Types

type Rep (RowHeaderWidth rowH) = D1 ('MetaData "RowHeaderWidth" "Brick.Widgets.TabularList.Types" "brick-tabular-list-0.1.0.2-xtK2tbLVHI135hCs28APH" 'False) (C1 ('MetaCons "FixedRowHeader" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Width)) :+: (C1 ('MetaCons "AvailRowHeader" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (AvailWidth -> Width))) :+: C1 ('MetaCons "VisibleRowHeaders" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (AvailWidth -> [rowH] -> Width)))))