-- | Interface for laying out paragraphs of rich text.
--
-- The main entry point is the function `layoutRich`.
module Data.Text.ParagraphLayout.Rich
-- * Input paragraph
( Paragraph (Paragraph)
, constructParagraph
, ParagraphAlignment
( AlignStart
, AlignEnd
, AlignLeft
, AlignRight
, AlignCentreH
)
, BoxCollapse (AllowBoxCollapse, AvoidBoxCollapse)
, BoxSpacing (BoxSpacingLeftRight)
, LineHeight (Absolute, Normal)
, ParagraphOptions
, defaultParagraphOptions
-- ** Paragraph options
-- | These are record selectors that can be used for reading
-- as well as updating specific option fields.
, paragraphAlignment
, paragraphMaxWidth
-- NOTE: `paragraphFont` is only used by the legacy plain text interface,
-- and is therefore not exported here.
-- ** Content tree
, RootNode (RootBox)
, InnerNode (InlineBox, TextSequence)
, Box (Box)
, BoxOptions
, defaultBoxOptions
, TextOptions
, defaultTextOptions
-- ** Box options
-- | These are record selectors that can be used for reading
-- as well as updating specific option fields.
, boxSpacing
, boxCollapse
, activateBoxSpacing
-- ** Text options
-- | These are record selectors that can be used for reading
-- as well as updating specific option fields.
, textFont
, textLineHeight
, textLanguage
, textDirection
-- ** Verification
, paragraphSpanBounds
, paragraphSpanTexts
, paragraphText
-- * Output layout
, layoutRich
, ParagraphLayout (ParagraphLayout, paragraphRect, paragraphFragments)
, paragraphSafeWidth
, Fragment
( Fragment
, fragmentUserData
, fragmentLine
, fragmentAncestorBoxes
, fragmentRect
, fragmentPen
, fragmentGlyphs
)
, fragmentSpacedRect
, AncestorBox
( AncestorBox
, boxUserData
, boxLeftEdge
, boxRightEdge
, boxStartEdge
, boxEndEdge
)
, BoxEdge (NoEdge, SpacedEdge)
)
where
import Data.Text.ParagraphLayout.Internal.AncestorBox
import Data.Text.ParagraphLayout.Internal.BoxOptions
import Data.Text.ParagraphLayout.Internal.Fragment
import Data.Text.ParagraphLayout.Internal.LineHeight
import Data.Text.ParagraphLayout.Internal.ParagraphAlignment
import Data.Text.ParagraphLayout.Internal.ParagraphOptions
import Data.Text.ParagraphLayout.Internal.Rich
import Data.Text.ParagraphLayout.Internal.Rich.Paragraph
import Data.Text.ParagraphLayout.Internal.Rich.ParagraphLayout
import Data.Text.ParagraphLayout.Internal.TextOptions
import Data.Text.ParagraphLayout.Internal.Tree