vty-ui-1.4: An interactive terminal user interface library for Vty

Graphics.Vty.Widgets.Borders

Contents

Description

This module provides visual borders to be placed between and around widgets. Border widgets in this module use the active Skin in the RenderContext.

Synopsis

Documentation

class HasBorderAttr a whereSource

The class of types with a border attribute, which differs from the normal and focused attributes.

Border Widget Constructors

vBorder :: IO (Widget VBorder)Source

Create a single-column vertical border using the specified attribute and character.

hBorder :: IO (Widget HBorder)Source

Create a single-row horizontal border using the specified attribute and character.

bordered :: Show a => Widget a -> IO (Widget (Bordered a))Source

Wrap a widget in a bordering box.

Setting Attributes and Labels

withBorderAttribute :: HasBorderAttr a => Attr -> a -> IO aSource

Sets the border attribute of a thing with a border attribute.

withHBorderLabel :: String -> Widget HBorder -> IO (Widget HBorder)Source

Adds a label to a horizontal border. The label will be horizontally centered.

withBorderedLabel :: String -> Widget (Bordered a) -> IO (Widget (Bordered a))Source

Adds a label to the top border of a bordered widget. The label will be horizontally centered.

setHBorderLabel :: Widget HBorder -> String -> IO ()Source

Adds a label to a horizontal border. The label will be horizontally centered.

setBorderedLabel :: Widget (Bordered a) -> String -> IO ()Source

Adds a label to the top border of a bordered widget. The label will be horizontally centered.