yi-language-0.1.0.5: 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

foreground :: !Color
 
background :: !Color
 
reverseAttr :: !Bool

The text should be show as "active" or "selected". This can be implemented by reverse video on the terminal.

bold :: !Bool
 
italic :: !Bool
 
underline :: !Bool
 

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

modelineAttributes :: Attributes

ground attributes for the modeline

modelineFocusStyle :: Style

transformation of modeline in focus

tabBarAttributes :: Attributes

ground attributes for the tabbar

tabInFocusStyle :: Style

a tab that currently holds the focus

tabNotFocusedStyle :: Style

a tab that does not have the current focus

baseAttributes :: Attributes

ground attributes for the main text views

selectedStyle :: Style

the selected portion

eofStyle :: Style

empty file marker colours

errorStyle :: Style

indicates errors in text

hintStyle :: Style

search matchesparen matchesother hints

strongHintStyle :: Style

current search match

commentStyle :: Style

all comments

blockCommentStyle :: Style

additional only for block comments

keywordStyle :: Style

applied to language keywords

numberStyle :: Style

numbers

preprocessorStyle :: Style

preprocessor directive (often in Haskell or C)

stringStyle :: Style

constant strings

longStringStyle :: Style

additional style for long strings

typeStyle :: Style

type name (such as class in an OO language)

dataConstructorStyle :: Style

data constructor

importStyle :: Style

style of import names

builtinStyle :: Style

builtin things, e.g. Array in JavaScript

regexStyle :: Style

regular expressions

variableStyle :: Style

any standard variable (identifier)

operatorStyle :: Style

infix operators

quoteStyle :: Style

Style of a quotation (e.g. in template haskell)

makeFileAction :: Style

stuff that's passed to the shell in a Makefile

makeFileRuleHead :: Style

makefile rule headers

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

withReverse :: Bool -> Style Source

A style that sets the style to underlined

withUnderline :: Bool -> Style Source

A style that sets the style to underlined

withItlc :: Bool -> Style Source

A style that sets the style to italics

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

Instances

colorToText :: Color -> String Source

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