| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Text.ParagraphLayout.Plain
Description
Deprecated: Use Data.Text.ParagraphLayout.Rich instead.
Legacy interface for laying out paragraphs of plain text.
This interface only allows one font with a fixed line height to be used for the entire paragraph. As a consequence, all lines will have the same height.
Synopsis
- data Paragraph d = Paragraph Array Int [Span d] ParagraphOptions
- data LineHeight
- data ParagraphOptions
- defaultParagraphOptions :: ParagraphOptions
- paragraphFont :: ParagraphOptions -> Font
- paragraphLineHeight :: ParagraphOptions -> LineHeight
- paragraphMaxWidth :: ParagraphOptions -> Int32
- data Span d = Span {
- spanUserData :: d
- spanLength :: Int
- spanOptions :: SpanOptions
- data SpanOptions
- defaultSpanOptions :: SpanOptions
- spanLanguage :: SpanOptions -> String
- paragraphSpanBounds :: Paragraph d -> NonEmpty Int
- paragraphSpanTexts :: Paragraph d -> [Text]
- paragraphText :: Paragraph d -> Text
- layoutPlain :: Paragraph d -> ParagraphLayout d
- data ParagraphLayout d = ParagraphLayout {
- paragraphRect :: Rect Int32
- spanLayouts :: [SpanLayout d]
- data SpanLayout d = SpanLayout [Fragment d]
- data Fragment d = Fragment {
- fragmentUserData :: d
- fragmentLine :: Int
- fragmentAncestorBoxes :: [AncestorBox d]
- fragmentRect :: Rect Int32
- fragmentPen :: (Int32, Int32)
- fragmentGlyphs :: [(GlyphInfo, GlyphPos)]
- data AncestorBox d = AncestorBox {
- boxUserData :: d
- boxLeftEdge :: BoxEdge
- boxRightEdge :: BoxEdge
- boxStartEdge :: BoxEdge
- boxEndEdge :: BoxEdge
- data BoxEdge
- = NoEdge
- | SpacedEdge Int32
Documentation
data LineHeight #
Instances
| Eq LineHeight | |
| Read LineHeight | |
Defined in Data.Text.ParagraphLayout.Internal.LineHeight Methods readsPrec :: Int -> ReadS LineHeight readList :: ReadS [LineHeight] readPrec :: ReadPrec LineHeight readListPrec :: ReadPrec [LineHeight] | |
| Show LineHeight | |
Defined in Data.Text.ParagraphLayout.Internal.LineHeight Methods showsPrec :: Int -> LineHeight -> ShowS show :: LineHeight -> String showList :: [LineHeight] -> ShowS | |
data ParagraphOptions #
Instances
| Eq ParagraphOptions | |
Defined in Data.Text.ParagraphLayout.Internal.ParagraphOptions Methods (==) :: ParagraphOptions -> ParagraphOptions -> Bool (/=) :: ParagraphOptions -> ParagraphOptions -> Bool | |
Paragraph options
These are record selectors that can be used for reading as well as updating specific option fields.
paragraphFont :: ParagraphOptions -> Font #
paragraphMaxWidth :: ParagraphOptions -> Int32 #
Text spans
Constructors
| Span | |
Fields
| |
data SpanOptions #
Instances
| Eq SpanOptions | |
Defined in Data.Text.ParagraphLayout.Internal.Span | |
Span options
These are record selectors that can be used for reading as well as updating specific option fields.
spanLanguage :: SpanOptions -> String #
Verification
paragraphSpanBounds :: Paragraph d -> NonEmpty Int #
paragraphSpanTexts :: Paragraph d -> [Text] #
paragraphText :: Paragraph d -> Text #
Output layout
layoutPlain :: Paragraph d -> ParagraphLayout d #
data ParagraphLayout d #
Constructors
| ParagraphLayout | |
Fields
| |
Instances
data SpanLayout d #
Constructors
| SpanLayout [Fragment d] |
Instances
| Eq d => Eq (SpanLayout d) | |
Defined in Data.Text.ParagraphLayout.Internal.Span | |
| Read d => Read (SpanLayout d) | |
Defined in Data.Text.ParagraphLayout.Internal.Span Methods readsPrec :: Int -> ReadS (SpanLayout d) readList :: ReadS [SpanLayout d] readPrec :: ReadPrec (SpanLayout d) readListPrec :: ReadPrec [SpanLayout d] | |
| Show d => Show (SpanLayout d) | |
Defined in Data.Text.ParagraphLayout.Internal.Span Methods showsPrec :: Int -> SpanLayout d -> ShowS show :: SpanLayout d -> String showList :: [SpanLayout d] -> ShowS | |
Constructors
| Fragment | |
Fields
| |
Instances
| Eq d => Eq (Fragment d) | |
| Read d => Read (Fragment d) | |
Defined in Data.Text.ParagraphLayout.Internal.Fragment | |
| Show d => Show (Fragment d) | |
data AncestorBox d #
Constructors
| AncestorBox | |
Fields
| |
Instances
| Eq d => Eq (AncestorBox d) | |
| Read d => Read (AncestorBox d) | |
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) | |
Defined in Data.Text.ParagraphLayout.Internal.AncestorBox Methods showsPrec :: Int -> AncestorBox d -> ShowS show :: AncestorBox d -> String showList :: [AncestorBox d] -> ShowS | |
Constructors
| NoEdge | |
| SpacedEdge Int32 |