monomer-1.4.0.0: A GUI library for writing native Haskell applications.
Copyright(c) 2018 Francisco Vallarino
LicenseBSD-3-Clause (see the LICENSE file)
Maintainerfjvallarino@gmail.com
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Monomer.Widgets.Singles.Label

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

Configuration

data LabelCfg s e Source #

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

Instances details
Semigroup (LabelCfg s e) Source # 
Instance details

Defined in Monomer.Widgets.Singles.Label

Methods

(<>) :: LabelCfg s e -> LabelCfg s e -> LabelCfg s e #

sconcat :: NonEmpty (LabelCfg s e) -> LabelCfg s e #

stimes :: Integral b => b -> LabelCfg s e -> LabelCfg s e #

Monoid (LabelCfg s e) Source # 
Instance details

Defined in Monomer.Widgets.Singles.Label

Methods

mempty :: LabelCfg s e #

mappend :: LabelCfg s e -> LabelCfg s e -> LabelCfg s e #

mconcat :: [LabelCfg s e] -> LabelCfg s e #

Default (LabelCfg s e) Source # 
Instance details

Defined in Monomer.Widgets.Singles.Label

Methods

def :: LabelCfg s e #

CmbIgnoreTheme (LabelCfg s e) Source # 
Instance details

Defined in Monomer.Widgets.Singles.Label

CmbResizeFactorDim (LabelCfg s e) Source # 
Instance details

Defined in Monomer.Widgets.Singles.Label

CmbResizeFactor (LabelCfg s e) Source # 
Instance details

Defined in Monomer.Widgets.Singles.Label

CmbTrimSpaces (LabelCfg s e) Source # 
Instance details

Defined in Monomer.Widgets.Singles.Label

CmbEllipsis (LabelCfg s e) Source # 
Instance details

Defined in Monomer.Widgets.Singles.Label

CmbMultiline (LabelCfg s e) Source # 
Instance details

Defined in Monomer.Widgets.Singles.Label

CmbMaxLines (LabelCfg s e) Source # 
Instance details

Defined in Monomer.Widgets.Singles.Label

Methods

maxLines :: Int -> 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 -> WidgetNode s e Source #

Creates a label using the provided Text.

label_ :: Text -> [LabelCfg s e] -> WidgetNode s e Source #

Creates a label using the provided Text. Accepts config.

labelS :: Show a => a -> WidgetNode s e Source #

Creates a label using the Show instance of the type.

labelS_ :: Show a => a -> [LabelCfg s e] -> WidgetNode s e Source #

Creates a label using the Show instance of the type. Accepts config.