yi-language-0.14.0: Collection of language-related Yi libraries.

Safe HaskellSafe
LanguageHaskell2010

Yi.Style

Description

Colors and friends.

Synopsis

Documentation

data Attributes #

Visual text attributes to be applied during layout.

Constructors

Attributes 

Fields

type Style = Endo Attributes #

The style is used to transform attributes by modifying one or more of the visual text attributes.

data UIStyle #

The UI type

Constructors

UIStyle 

Fields

type StyleName = UIStyle -> Style #

A StyleName determines what style to use, taking into account the set of rendering preferences given by a UIStyle. Typically, style names will be Style-valued field names of UIStyle.

withFg :: Color -> Style #

A style that sets the foreground.

withBg :: Color -> Style #

A style that sets the background.

withBd :: Bool -> Style #

A style that sets the font to bold

withItlc :: Bool -> Style #

A style that sets the style to italics

withUnderline :: Bool -> Style #

A style that sets the style to underlined

withReverse :: Bool -> Style #

A style that sets the style to underlined

defaultStyle :: StyleName #

The identity transform.

data Color #

Constructors

RGB !Word8 !Word8 !Word8 
Default

The system-default color of the engine used. e.g. in Gtk this should pick whatever the user has chosen as default color (background or forground depending on usage) for the text.

Instances

Eq Color # 

Methods

(==) :: Color -> Color -> Bool #

(/=) :: Color -> Color -> Bool #

Ord Color # 

Methods

compare :: Color -> Color -> Ordering #

(<) :: Color -> Color -> Bool #

(<=) :: Color -> Color -> Bool #

(>) :: Color -> Color -> Bool #

(>=) :: Color -> Color -> Bool #

max :: Color -> Color -> Color #

min :: Color -> Color -> Color #

Show Color # 

Methods

showsPrec :: Int -> Color -> ShowS #

show :: Color -> String #

showList :: [Color] -> ShowS #

colorToText :: Color -> String #

Convert a color to its text specification, as to be accepted by XParseColor