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.
Single line label:
label "This is a label"
Multi-line label:
label_ "This is a\nmultiline label" [multiline]
Synopsis
- data LabelCfg s e
- labelCurrentStyle :: (WidgetEnv s e -> WidgetNode s e -> StyleState) -> LabelCfg s e
- 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
Configuration
Configuration options for label.
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.
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 # | |
Constructors
labelCurrentStyle :: (WidgetEnv s e -> WidgetNode s e -> StyleState) -> LabelCfg s e Source #
Custom current style to be used by the label widget. Useful for widgets
with an embedded label (for example, Button
and
ExternalLink
).
label_ :: Text -> [LabelCfg s e] -> WidgetNode s e Source #
Creates a label using the provided Text
. Accepts config.