Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module provides border widgets: vertical borders, horizontal
borders, and a box border wrapper widget. All functions in this
module use the rendering context's active BorderStyle
; to change
the BorderStyle
, use withBorderStyle
.
- border :: Widget n -> Widget n
- borderWithLabel :: Widget n -> Widget n -> Widget n
- hBorder :: Widget n
- hBorderWithLabel :: Widget n -> Widget n
- vBorder :: Widget n
- borderElem :: (BorderStyle -> Char) -> Widget n
- borderAttr :: AttrName
- vBorderAttr :: AttrName
- hBorderAttr :: AttrName
- hBorderLabelAttr :: AttrName
- tlCornerAttr :: AttrName
- trCornerAttr :: AttrName
- blCornerAttr :: AttrName
- brCornerAttr :: AttrName
Border wrapper
Put a border around the specified widget with the specified label widget placed in the middle of the top horizontal border.
Note that a border will wrap its child widget as tightly as possible,
which means that if the child widget is narrower than the label
widget, the label widget will be truncated. If you want to avoid
this behavior, add a fill
or other space-filling wrapper to the
bordered widget so that it takes up enough room to make the border
horizontally able to avoid truncating the label.
Horizontal border
A horizontal border with a label placed in the center of the border. Fills all horizontal space.
Vertical border
Drawing single border elements
borderElem :: (BorderStyle -> Char) -> Widget n Source #
Draw the specified border element using the active border style
using borderAttr
.
Border attribute names
borderAttr :: AttrName Source #
The top-level border attribute name.
vBorderAttr :: AttrName Source #
The vertical border attribute name.
hBorderAttr :: AttrName Source #
The horizontal border attribute name.
hBorderLabelAttr :: AttrName Source #
The attribute used for horizontal border labels.
tlCornerAttr :: AttrName Source #
The attribute used for border box top-left corners.
trCornerAttr :: AttrName Source #
The attribute used for border box top-right corners.
blCornerAttr :: AttrName Source #
The attribute used for border box bottom-left corners.
brCornerAttr :: AttrName Source #
The attribute used for border box bottom-right corners.