Safe Haskell | Safe-Infered |
---|
This module provides visual borders to be placed between and
around widgets. Border widgets in this module use the active
Skin
in the RenderContext
.
- class HasBorderAttr a where
- setBorderAttribute :: a -> Attr -> IO ()
- data Bordered a
- data HBorder
- data VBorder
- vBorder :: IO (Widget VBorder)
- hBorder :: IO (Widget HBorder)
- bordered :: Show a => Widget a -> IO (Widget (Bordered a))
- withBorderAttribute :: HasBorderAttr a => Attr -> a -> IO a
- withHBorderLabel :: String -> Widget HBorder -> IO (Widget HBorder)
- withBorderedLabel :: String -> Widget (Bordered a) -> IO (Widget (Bordered a))
- setHBorderLabel :: Widget HBorder -> String -> IO ()
- setBorderedLabel :: Widget (Bordered a) -> String -> IO ()
Documentation
class HasBorderAttr a whereSource
The class of types with a border attribute, which differs from the normal and focused attributes.
setBorderAttribute :: a -> Attr -> IO ()Source
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.
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.