rasa-0.1.10: A modular text editor

Safe HaskellNone
LanguageHaskell2010

Rasa.Internal.Utility

Synopsis

Documentation

type Width = Int Source #

class Renderable r where Source #

Represents how to render an entity

Minimal complete definition

render

data RenderInfo Source #

RenderInfo is the data necessary to render something; it consists of a block of text with its associated styles. It is a Monoid and can be appended with other RenderInfos.

Constructors

RenderInfo YiString Styles 

Instances

Monoid RenderInfo Source #

Appends to RenderInfo by appending the text and styles while preserving proper text/style alignment

Renderable RenderInfo Source # 

cropToViewport :: Height -> ScrollPos -> RenderInfo -> RenderInfo Source #

Crop text verticaly to only the visible portion according to viewport height and scroll position.

styleText :: YiString -> Style -> RenderInfo Source #

Add a style to some text resulting in a RenderInfo