| Copyright | (c) 2018 Francisco Vallarino |
|---|---|
| License | BSD-3-Clause (see the LICENSE file) |
| Maintainer | fjvallarino@gmail.com |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Monomer.Widgets.Singles.Label
Contents
Description
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
| Monoid (LabelCfg s e) Source # | |
| Semigroup (LabelCfg s e) Source # | |
| Default (LabelCfg s e) Source # | |
Defined in Monomer.Widgets.Singles.Label | |
| CmbEllipsis (LabelCfg s e) Source # | |
| CmbIgnoreTheme (LabelCfg s e) Source # | |
Defined in Monomer.Widgets.Singles.Label | |
| CmbMaxLines (LabelCfg s e) Source # | |
| CmbMultiline (LabelCfg s e) Source # | |
Defined in Monomer.Widgets.Singles.Label | |
| CmbResizeFactor (LabelCfg s e) Source # | |
Defined in Monomer.Widgets.Singles.Label Methods resizeFactor :: Double -> LabelCfg s e Source # | |
| CmbResizeFactorDim (LabelCfg s e) Source # | |
Defined in Monomer.Widgets.Singles.Label Methods resizeFactorW :: Double -> LabelCfg s e Source # resizeFactorH :: Double -> LabelCfg s e Source # | |
| CmbTrimSpaces (LabelCfg s e) Source # | |
Defined in Monomer.Widgets.Singles.Label | |
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).
Constructors
Arguments
| :: Text | The caption. |
| -> WidgetNode s e | The created label. |
Creates a label using the provided Text.
Arguments
| :: Text | The caption. |
| -> [LabelCfg s e] | The config options. |
| -> WidgetNode s e | The created label. |
Creates a label using the provided Text. Accepts config.
Arguments
| :: Show a | |
| => a | The value with a |
| -> WidgetNode s e | The created label. |
Creates a label using the Show instance of the type.