yi-language-0.19.1: Collection of language-related Yi libraries.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Yi.Style

Description

Colors and friends.

Synopsis

Documentation

data Attributes Source #

Visual text attributes to be applied during layout.

Constructors

Attributes 

Fields

Instances

Instances details
Show Attributes Source # 
Instance details

Defined in Yi.Style

Eq Attributes Source # 
Instance details

Defined in Yi.Style

Ord Attributes Source # 
Instance details

Defined in Yi.Style

type Style = Endo Attributes Source #

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

data UIStyle Source #

The UI type

Constructors

UIStyle 

Fields

type StyleName = UIStyle -> Style Source #

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 Source #

A style that sets the foreground.

withBg :: Color -> Style Source #

A style that sets the background.

withBd :: Bool -> Style Source #

A style that sets the font to bold

withItlc :: Bool -> Style Source #

A style that sets the style to italics

withUnderline :: Bool -> Style Source #

A style that sets the style to underlined

withReverse :: Bool -> Style Source #

A style that sets the style to underlined

defaultStyle :: StyleName Source #

The identity transform.

data Color Source #

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 foreground depending on usage) for the text.

Instances

Instances details
Show Color Source # 
Instance details

Defined in Yi.Style

Methods

showsPrec :: Int -> Color -> ShowS #

show :: Color -> String #

showList :: [Color] -> ShowS #

Eq Color Source # 
Instance details

Defined in Yi.Style

Methods

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

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

Ord Color Source # 
Instance details

Defined in Yi.Style

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 #

colorToText :: Color -> String Source #

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