gtk2hsContentsIndex
Markup
Description

This module defines some helper functions for generating texts with embedded attributes.

TODO

Synopsis
type Markup = String
data SpanAttribute
= FontDescr String
| FontFamily String
| FontSize FontSizeDef
| FontStyle FontStyleDef
| FontWeight FontWeightDef
| FontVariant FontVariantDef
| FontStretch FontStretchDef
| FontForeground String
| FontBackground String
| FontUnderline FontUnderlineDef
| FontRise Double
| FontLang String
data FontSizeDef
= FSPoint Double
| FSunreadable
| FStiny
| FSsmall
| FSmedium
| FSlarge
| FShuge
| FSgiant
| FSsmaller
| FSlarger
data FontStyleDef
= FYnormal
| FYoblique
| FYitalic
data FontWeightDef
= FWultralight
| FWlight
| FWnormal
| FWbold
| FWultrabold
| FWheavy
data FontVariantDef
= FVnormal
| FVsmallcaps
data FontStretchDef
= FTultracondensed
| FTextracondensed
| FTcondensed
| FTsemicondensed
| FTnormal
| FTsemiexpanded
| FTexpanded
| FTextraexpanded
| FTultraexpanded
data FontUnderlineDef
= FUsingle
| FUdouble
| FUlow
| FUnone
markSpan :: [SpanAttribute] -> String -> String
Documentation
type Markup = String

Define a synonym for text with embedded markup commands.

  • Markup strings are just simple strings. But it's easier to tell if a method expects text with or without markup.
data SpanAttribute
These are all the attributes the markSpan function can express.
Constructors
FontDescr String

Choose a font by textual description.

  • Takes a string to completely describe the font, example: FontDescr "Sans Italic 12"
FontFamily String

Specify the family of font to use.

  • Example: FontFamily "Sans"
FontSize FontSizeDef

Change the size of the current font.

  • The constuctor takes the size in points (pt) or as predefined sizes. Setting the absolute size 12.5pt can be achieved by passing FontSize (FSPoint 12.5) to markSpan. Next to predefined absolute sizes such as FSsmall the size can be changed by asking for the next larger or smaller front with FSlarger and FSsmaller, respectively.
FontStyle FontStyleDef

Change the slant of the current font.

FontWeight FontWeightDef

Change the thickness of the current font.

  • The constructor takes one of the six predefined weights. Most likely to be supported: FWbold.
FontVariant FontVariantDef

Choosing an alternative rendering for lower case letters.

  • The argument FVsmallcaps will display lower case letters as smaller upper case letters, if this option is available.
FontStretch FontStretchDef

Choose a different width.

FontForeground String

Foreground color.

  • This constructor and FontBackground take both a description of the color to be used for rendering.
FontBackground StringBackground color.
FontUnderline FontUnderlineDef

Specify underlining of text.

FontRise Double

Specify a vertical displacement.

  • Takes the vertical displacement in em (the width of the 'm' character in the current font).
FontLang StringGive a hint about the language to be displayed.
Instances
Show SpanAttribute
data FontSizeDef
Define attributes for FontSize.
Constructors
FSPoint Double
FSunreadable
FStiny
FSsmall
FSmedium
FSlarge
FShuge
FSgiant
FSsmaller
FSlarger
Instances
Show FontSizeDef
data FontStyleDef
Define attributes for FontStyle.
Constructors
FYnormal
FYoblique
FYitalic
Instances
Show FontStyleDef
data FontWeightDef
Define attributes for FontWeight.
Constructors
FWultralight
FWlight
FWnormal
FWbold
FWultrabold
FWheavy
Instances
Show FontWeightDef
data FontVariantDef
Define attributes for FontVariant.
Constructors
FVnormal
FVsmallcaps
Instances
Show FontVariantDef
data FontStretchDef
Define attributes for FontStretch.
Constructors
FTultracondensed
FTextracondensed
FTcondensed
FTsemicondensed
FTnormal
FTsemiexpanded
FTexpanded
FTextraexpanded
FTultraexpanded
Instances
Show FontStretchDef
data FontUnderlineDef
Define attributes for FontUnderline.
Constructors
FUsingle
FUdouble
FUlow
FUnone
Instances
Show FontUnderlineDef
markSpan :: [SpanAttribute] -> String -> String
Create the most generic span attribute.
Produced by Haddock version 0.6