Copyright | (c) 2018 Francisco Vallarino |
---|---|
License | BSD-3-Clause (see the LICENSE file) |
Maintainer | fjvallarino@gmail.com |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Label widget, with support for multiline text.
Configs:
- trimSpaces: whether to remove leading/trailing spaces in the caption.
- ellipsis: if ellipsis should be used for overflown text.
- multiline: if text may be split in multiple lines.
- maxLines: maximum number of text lines to show.
- ignoreTheme: whether to load default style from theme or start empty.
- resizeFactor: flexibility to have more or less spaced assigned.
- resizeFactorW: flexibility to have more or less horizontal spaced assigned.
- resizeFactorH: flexibility to have more or less vertical spaced assigned.
Synopsis
- data LabelCfg s e = LabelCfg {
- _lscIgnoreTheme :: Maybe Bool
- _lscTextTrim :: Maybe Bool
- _lscTextEllipsis :: Maybe Bool
- _lscTextMultiLine :: Maybe Bool
- _lscTextMaxLines :: Maybe Int
- _lscFactorW :: Maybe Double
- _lscFactorH :: Maybe Double
- _lscCurrentStyle :: Maybe (WidgetEnv s e -> WidgetNode s e -> StyleState)
- label :: Text -> WidgetNode s e
- label_ :: Text -> [LabelCfg s e] -> WidgetNode s e
- labelS :: Show a => a -> WidgetNode s e
- labelS_ :: Show a => a -> [LabelCfg s e] -> WidgetNode s e
Documentation
Configuration options for label widget.
LabelCfg | |
|
Instances
Semigroup (LabelCfg s e) Source # | |
Monoid (LabelCfg s e) Source # | |
Default (LabelCfg s e) Source # | |
Defined in Monomer.Widgets.Singles.Label | |
CmbIgnoreTheme (LabelCfg s e) Source # | |
Defined in Monomer.Widgets.Singles.Label ignoreTheme :: LabelCfg s e Source # ignoreTheme_ :: Bool -> LabelCfg s e Source # | |
CmbResizeFactorDim (LabelCfg s e) Source # | |
Defined in Monomer.Widgets.Singles.Label resizeFactorW :: Double -> LabelCfg s e Source # resizeFactorH :: Double -> LabelCfg s e Source # | |
CmbResizeFactor (LabelCfg s e) Source # | |
Defined in Monomer.Widgets.Singles.Label resizeFactor :: Double -> LabelCfg s e Source # | |
CmbTrimSpaces (LabelCfg s e) Source # | |
Defined in Monomer.Widgets.Singles.Label trimSpaces :: LabelCfg s e Source # trimSpaces_ :: Bool -> LabelCfg s e Source # | |
CmbEllipsis (LabelCfg s e) Source # | |
CmbMultiline (LabelCfg s e) Source # | |
Defined in Monomer.Widgets.Singles.Label | |
CmbMaxLines (LabelCfg s e) Source # | |
label_ :: Text -> [LabelCfg s e] -> WidgetNode s e Source #
Creates a label using the provided Text
. Accepts config.