monomer-1.6.0.1: 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 HaskellSafe-Inferred
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 space assigned.
  • resizeFactorW: flexibility to have more or less horizontal space assigned.
  • resizeFactorH: flexibility to have more or less vertical space assigned.

Instances

Instances details
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 #

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 #

Default (LabelCfg s e) Source # 
Instance details

Defined in Monomer.Widgets.Singles.Label

Methods

def :: LabelCfg s e #

CmbEllipsis (LabelCfg s e) Source # 
Instance details

Defined in Monomer.Widgets.Singles.Label

CmbIgnoreTheme (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 #

CmbMultiline (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

CmbResizeFactorDim (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

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

label Source #

Arguments

:: Text

The caption.

-> WidgetNode s e

The created label.

Creates a label using the provided Text.

label_ Source #

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.

labelS Source #

Arguments

:: Show a 
=> a

The value with a Show instance.

-> WidgetNode s e

The created label.

Creates a label using the Show instance of the type.

labelS_ Source #

Arguments

:: Show a 
=> a

The value with a Show instance.

-> [LabelCfg s e]

The config options.

-> WidgetNode s e

The created label.

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