brick-2.4: A declarative terminal user interface library
Safe HaskellSafe-Inferred
LanguageHaskell2010

Brick.Widgets.Border.Style

Description

This module provides styles for borders as used in terminal applications. Your mileage may vary on some of the fancier styles due to varying support for some border characters in the fonts your users may be using. Because of this, we provide the ascii style in addition to the Unicode styles. The unicode style is also a safe bet.

To use these in your widgets, see withBorderStyle. By default, widgets rendered without a specified border style use unicode style.

Synopsis

Documentation

data BorderStyle Source #

A border style for use in any widget that needs to render borders in a consistent style.

Constructors

BorderStyle 

Fields

  • bsCornerTL :: Char

    Top-left corner character

  • bsCornerTR :: Char

    Top-right corner character

  • bsCornerBR :: Char

    Bottom-right corner character

  • bsCornerBL :: Char

    Bottom-left corner character

  • bsIntersectFull :: Char

    Full intersection (cross)

  • bsIntersectL :: Char

    Left side of a horizontal border intersecting a vertical one

  • bsIntersectR :: Char

    Right side of a horizontal border intersecting a vertical one

  • bsIntersectT :: Char

    Top of a vertical border intersecting a horizontal one

  • bsIntersectB :: Char

    Bottom of a vertical border intersecting a horizontal one

  • bsHorizontal :: Char

    Horizontal border character

  • bsVertical :: Char

    Vertical border character

Instances

Instances details
NFData BorderStyle Source # 
Instance details

Defined in Brick.Widgets.Border.Style

Methods

rnf :: BorderStyle -> ()

Generic BorderStyle Source # 
Instance details

Defined in Brick.Widgets.Border.Style

Associated Types

type Rep BorderStyle 
Instance details

Defined in Brick.Widgets.Border.Style

type Rep BorderStyle = D1 ('MetaData "BorderStyle" "Brick.Widgets.Border.Style" "brick-2.4-IiFSGb0clxX3zoabO5gC2v" 'False) (C1 ('MetaCons "BorderStyle" 'PrefixI 'True) (((S1 ('MetaSel ('Just "bsCornerTL") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char) :*: S1 ('MetaSel ('Just "bsCornerTR") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char)) :*: (S1 ('MetaSel ('Just "bsCornerBR") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char) :*: (S1 ('MetaSel ('Just "bsCornerBL") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char) :*: S1 ('MetaSel ('Just "bsIntersectFull") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char)))) :*: ((S1 ('MetaSel ('Just "bsIntersectL") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char) :*: (S1 ('MetaSel ('Just "bsIntersectR") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char) :*: S1 ('MetaSel ('Just "bsIntersectT") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char))) :*: (S1 ('MetaSel ('Just "bsIntersectB") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char) :*: (S1 ('MetaSel ('Just "bsHorizontal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char) :*: S1 ('MetaSel ('Just "bsVertical") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char))))))

Methods

from :: BorderStyle -> Rep BorderStyle x

to :: Rep BorderStyle x -> BorderStyle

Read BorderStyle Source # 
Instance details

Defined in Brick.Widgets.Border.Style

Methods

readsPrec :: Int -> ReadS BorderStyle

readList :: ReadS [BorderStyle]

readPrec :: ReadPrec BorderStyle

readListPrec :: ReadPrec [BorderStyle]

Show BorderStyle Source # 
Instance details

Defined in Brick.Widgets.Border.Style

Methods

showsPrec :: Int -> BorderStyle -> ShowS

show :: BorderStyle -> String

showList :: [BorderStyle] -> ShowS

Eq BorderStyle Source # 
Instance details

Defined in Brick.Widgets.Border.Style

Methods

(==) :: BorderStyle -> BorderStyle -> Bool

(/=) :: BorderStyle -> BorderStyle -> Bool

type Rep BorderStyle Source # 
Instance details

Defined in Brick.Widgets.Border.Style

type Rep BorderStyle = D1 ('MetaData "BorderStyle" "Brick.Widgets.Border.Style" "brick-2.4-IiFSGb0clxX3zoabO5gC2v" 'False) (C1 ('MetaCons "BorderStyle" 'PrefixI 'True) (((S1 ('MetaSel ('Just "bsCornerTL") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char) :*: S1 ('MetaSel ('Just "bsCornerTR") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char)) :*: (S1 ('MetaSel ('Just "bsCornerBR") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char) :*: (S1 ('MetaSel ('Just "bsCornerBL") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char) :*: S1 ('MetaSel ('Just "bsIntersectFull") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char)))) :*: ((S1 ('MetaSel ('Just "bsIntersectL") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char) :*: (S1 ('MetaSel ('Just "bsIntersectR") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char) :*: S1 ('MetaSel ('Just "bsIntersectT") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char))) :*: (S1 ('MetaSel ('Just "bsIntersectB") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char) :*: (S1 ('MetaSel ('Just "bsHorizontal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char) :*: S1 ('MetaSel ('Just "bsVertical") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char))))))

borderStyleFromChar :: Char -> BorderStyle Source #

Make a border style using the specified character everywhere.

ascii :: BorderStyle Source #

An ASCII border style which will work in any terminal.

unicode :: BorderStyle Source #

A unicode border style with real corner and intersection characters.

unicodeBold :: BorderStyle Source #

A unicode border style in a bold typeface.

unicodeRounded :: BorderStyle Source #

A unicode border style with rounded corners.