Safe Haskell | None |
---|---|
Language | Haskell98 |
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 :: Text -> Widget HBorder -> IO (Widget HBorder)
- withBorderedLabel :: Text -> Widget (Bordered a) -> IO (Widget (Bordered a))
- setHBorderLabel :: Widget HBorder -> Text -> IO ()
- setBorderedLabel :: Widget (Bordered a) -> Text -> IO ()
Documentation
class HasBorderAttr a where Source
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 a Source
Sets the border attribute of a thing with a border attribute.
withHBorderLabel :: Text -> Widget HBorder -> IO (Widget HBorder) Source
Adds a label to a horizontal border. The label will be horizontally centered.
withBorderedLabel :: Text -> 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.