balkon-1.0.0.0: Text layout engine built on top of HarfBuzz.
Safe HaskellNone
LanguageHaskell2010

Data.Text.ParagraphLayout.Rich

Description

Interface for laying out paragraphs of rich text.

The main entry point is the function layoutRich.

Synopsis

Documentation

data Paragraph d #

Constructors

Paragraph Array Int (RootNode Int d) ParagraphOptions 

data BoxSpacing #

Constructors

BoxSpacingLeftRight Int32 Int32 

Instances

Instances details
Eq BoxSpacing 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.BoxOptions

Methods

(==) :: BoxSpacing -> BoxSpacing -> Bool

(/=) :: BoxSpacing -> BoxSpacing -> Bool

Read BoxSpacing 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.BoxOptions

Methods

readsPrec :: Int -> ReadS BoxSpacing

readList :: ReadS [BoxSpacing]

readPrec :: ReadPrec BoxSpacing

readListPrec :: ReadPrec [BoxSpacing]

Show BoxSpacing 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.BoxOptions

Methods

showsPrec :: Int -> BoxSpacing -> ShowS

show :: BoxSpacing -> String

showList :: [BoxSpacing] -> ShowS

data LineHeight #

Constructors

Normal 
Absolute Int32 

Instances

Instances details
Eq LineHeight 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.LineHeight

Methods

(==) :: LineHeight -> LineHeight -> Bool

(/=) :: LineHeight -> LineHeight -> Bool

Read LineHeight 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.LineHeight

Methods

readsPrec :: Int -> ReadS LineHeight

readList :: ReadS [LineHeight]

readPrec :: ReadPrec LineHeight

readListPrec :: ReadPrec [LineHeight]

Show LineHeight 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.LineHeight

Methods

showsPrec :: Int -> LineHeight -> ShowS

show :: LineHeight -> String

showList :: [LineHeight] -> ShowS

data ParagraphOptions #

Instances

Instances details
Eq ParagraphOptions 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.ParagraphOptions

Paragraph options

These are record selectors that can be used for reading as well as updating specific option fields.

Content tree

data RootNode t d #

Constructors

RootBox (Box t d) 

data InnerNode t d #

Constructors

InlineBox d (Box t d) BoxOptions 
TextSequence d t 

data Box t d #

Constructors

Box [InnerNode t d] TextOptions 

data BoxOptions #

Instances

Instances details
Eq BoxOptions 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.BoxOptions

Methods

(==) :: BoxOptions -> BoxOptions -> Bool

(/=) :: BoxOptions -> BoxOptions -> Bool

data TextOptions #

Instances

Instances details
Eq TextOptions 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.TextOptions

Methods

(==) :: TextOptions -> TextOptions -> Bool

(/=) :: TextOptions -> TextOptions -> Bool

Box options

These are record selectors that can be used for reading as well as updating specific option fields.

Text options

These are record selectors that can be used for reading as well as updating specific option fields.

Verification

paragraphSpanBounds :: Paragraph d -> NonEmpty Int #

Output layout

data ParagraphLayout d #

Constructors

ParagraphLayout 

Instances

Instances details
Eq d => Eq (ParagraphLayout d) 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.Rich.ParagraphLayout

Methods

(==) :: ParagraphLayout d -> ParagraphLayout d -> Bool

(/=) :: ParagraphLayout d -> ParagraphLayout d -> Bool

Read d => Read (ParagraphLayout d) 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.Rich.ParagraphLayout

Methods

readsPrec :: Int -> ReadS (ParagraphLayout d)

readList :: ReadS [ParagraphLayout d]

readPrec :: ReadPrec (ParagraphLayout d)

readListPrec :: ReadPrec [ParagraphLayout d]

Show d => Show (ParagraphLayout d) 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.Rich.ParagraphLayout

Methods

showsPrec :: Int -> ParagraphLayout d -> ShowS

show :: ParagraphLayout d -> String

showList :: [ParagraphLayout d] -> ShowS

Line (ParagraphLayout d) 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.Rich.ParagraphLayout

Methods

lineHeight :: ParagraphLayout d -> Int32

Paginable (ParagraphLayout d) 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.Paginable

data Fragment d #

Constructors

Fragment 

Instances

Instances details
Eq d => Eq (Fragment d) 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.Fragment

Methods

(==) :: Fragment d -> Fragment d -> Bool

(/=) :: Fragment d -> Fragment d -> Bool

Read d => Read (Fragment d) 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.Fragment

Methods

readsPrec :: Int -> ReadS (Fragment d)

readList :: ReadS [Fragment d]

readPrec :: ReadPrec (Fragment d)

readListPrec :: ReadPrec [Fragment d]

Show d => Show (Fragment d) 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.Fragment

Methods

showsPrec :: Int -> Fragment d -> ShowS

show :: Fragment d -> String

showList :: [Fragment d] -> ShowS

data AncestorBox d #

Instances

Instances details
Eq d => Eq (AncestorBox d) 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.AncestorBox

Methods

(==) :: AncestorBox d -> AncestorBox d -> Bool

(/=) :: AncestorBox d -> AncestorBox d -> Bool

Read d => Read (AncestorBox d) 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.AncestorBox

Methods

readsPrec :: Int -> ReadS (AncestorBox d)

readList :: ReadS [AncestorBox d]

readPrec :: ReadPrec (AncestorBox d)

readListPrec :: ReadPrec [AncestorBox d]

Show d => Show (AncestorBox d) 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.AncestorBox

Methods

showsPrec :: Int -> AncestorBox d -> ShowS

show :: AncestorBox d -> String

showList :: [AncestorBox d] -> ShowS

data BoxEdge #

Constructors

NoEdge 
SpacedEdge Int32 

Instances

Instances details
Eq BoxEdge 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.AncestorBox

Methods

(==) :: BoxEdge -> BoxEdge -> Bool

(/=) :: BoxEdge -> BoxEdge -> Bool

Read BoxEdge 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.AncestorBox

Methods

readsPrec :: Int -> ReadS BoxEdge

readList :: ReadS [BoxEdge]

readPrec :: ReadPrec BoxEdge

readListPrec :: ReadPrec [BoxEdge]

Show BoxEdge 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.AncestorBox

Methods

showsPrec :: Int -> BoxEdge -> ShowS

show :: BoxEdge -> String

showList :: [BoxEdge] -> ShowS