brick-0.1: A declarative terminal user interface library

Safe HaskellNone
LanguageHaskell2010

Brick.Widgets.Center

Contents

Description

This module provides combinators for centering other widgets.

Synopsis

Centering horizontally

hCenter :: Widget -> Widget Source

Center the specified widget horizontally. Consumes all available horizontal space.

hCenterWith :: Maybe Char -> Widget -> Widget Source

Center the specified widget horizontally. Consumes all available horizontal space. Uses the specified character to fill in the space to either side of the centered widget (defaults to space).

Centering vertically

vCenter :: Widget -> Widget Source

Center a widget vertically. Consumes all vertical space.

vCenterWith :: Maybe Char -> Widget -> Widget Source

Center a widget vertically. Consumes all vertical space. Uses the specified character to fill in the space above and below the centered widget (defaults to space).

Centering both horizontally and vertically

center :: Widget -> Widget Source

Center a widget both vertically and horizontally. Consumes all available vertical and horizontal space.

centerWith :: Maybe Char -> Widget -> Widget Source

Center a widget both vertically and horizontally. Consumes all available vertical and horizontal space. Uses the specified character to fill in the space around the centered widget (defaults to space).

Centering about an arbitrary origin

centerAbout :: Location -> Widget -> Widget Source

Center the widget horizontally and vertically about the specified origin.