dzen-dhall-1.0.2: Configure dzen2 bars in Dhall language

Safe HaskellNone
LanguageHaskell2010

DzenDhall.AST.Render

Contents

Description

Everything needed to convert an AST to Text.

Synopsis

Documentation

data RenderState Source #

Stacks are used to backtrack various dzen markup language tags.

Dzen itself does not perform backtracking, thus, for example, the letter "c" in ^fg(red)a^fg(green)b^fg()c^fg() will not be colorized, but render definition for AST mitigates this flaw.

For example,

runRender $
  ASTProp (FG $ Color "red")
    (ASTs (ASTs (ASTText "a")
                (ASTProp (FG $ Color "green")
                  (ASTText "b")))
          (ASTText "c"))

will be rendered as ^fg(red)a^fg(green)b^fg(red)c^fg() (so that "c" will be red).

Constructors

RenderState 

data IgnoreBackground Source #

A flag that indicates that background should be ignored (analogous to ^ib() dzen markup command).

Constructors

IgnoreBackground 
Instances
Renderable IgnoreBackground Source # 
Instance details

Defined in DzenDhall.AST.Render

class Renderable a where Source #

Methods

render :: a -> Render () Source #

Instances
Renderable Event Source # 
Instance details

Defined in DzenDhall.AST.Render

Methods

render :: Event -> Render () Source #

Renderable Button Source # 
Instance details

Defined in DzenDhall.AST.Render

Methods

render :: Button -> Render () Source #

Renderable AbsolutePosition Source # 
Instance details

Defined in DzenDhall.AST.Render

Renderable Color Source # 
Instance details

Defined in DzenDhall.AST.Render

Methods

render :: Color -> Render () Source #

Renderable ClickableArea Source # 
Instance details

Defined in DzenDhall.AST.Render

Renderable Shape Source # 
Instance details

Defined in DzenDhall.AST.Render

Methods

render :: Shape -> Render () Source #

Renderable AST Source # 
Instance details

Defined in DzenDhall.AST.Render

Methods

render :: AST -> Render () Source #

Renderable IgnoreBackground Source # 
Instance details

Defined in DzenDhall.AST.Render

Helper functions

usingStackWithTag :: Renderable a => Stack a -> Text -> a -> AST -> Render () Source #

^fg(), ^bg() and ^ib() are rendered using the same algorithm.

push :: Stack a -> a -> Render () Source #

renew :: Renderable a => Stack a -> Text -> Render () Source #