rasa-0.1.10: A modular text editor

Safe HaskellNone
LanguageHaskell2010

Rasa.Internal.Styles

Synopsis

Documentation

fg :: Color -> Style Source #

Create a new Style with the given Color as the foreground.

bg :: Color -> Style Source #

Create a new Style with the given Color as the background.

flair :: Flair -> Style Source #

Create a new Style with the given Flair as its flair.

data Color Source #

These represent the possible colors for fg or bg. DefColor represents the renderer's default color.

Instances

Eq Color Source # 

Methods

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

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

Show Color Source # 

Methods

showsPrec :: Int -> Color -> ShowS #

show :: Color -> String #

showList :: [Color] -> ShowS #

data Flair Source #

These represent the possible extra attributes which may be applied. DefFlair represents the renderer's default text attributes.

Instances

Eq Flair Source # 

Methods

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

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

Show Flair Source # 

Methods

showsPrec :: Int -> Flair -> ShowS #

show :: Flair -> String #

showList :: [Flair] -> ShowS #

newtype Style Source #

A container which holds a foreground color, background color, and a flair. a Nothing represents that we should not change that attribute.

Constructors

Style (Maybe Color, Maybe Color, Maybe Flair) 

Instances

Eq Style Source # 

Methods

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

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

Show Style Source # 

Methods

showsPrec :: Int -> Style -> ShowS #

show :: Style -> String #

showList :: [Style] -> ShowS #

Monoid Style Source #

The monoid instance replaces any attributes which have a Just in the new Style and persists any that are Nothing in the new style (using Alternative for Maybe)

Methods

mempty :: Style #

mappend :: Style -> Style -> Style #

mconcat :: [Style] -> Style #

Default Style Source # 

Methods

def :: Style #

addStyleProvider :: BufAction Styles -> BufAction ListenerId Source #

Pass this a BufAction which computes styles based on the current buffer and they'll be collected for the renderer.

getStyles :: BufAction Styles Source #

Collect all provided styles, this is useful for renderers.