Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Sizes inline text & extracts positioned children, wraps Balkón for the actual logic.
Synopsis
- paragraphMap :: (b -> b') -> Paragraph (a, b, c) -> Paragraph (a, b', c)
- layoutMap :: (b -> b') -> ParagraphLayout (a, b, c) -> ParagraphLayout (a, b', c)
- treeMap :: (b -> b') -> FragmentTree (a, b, c) -> FragmentTree (a, b', c)
- inlineMin :: (CastDouble x, CastDouble y) => Paragraph (a, PaddedBox x y, c) -> Size x y
- inlineSize :: (CastDouble x, CastDouble y) => Paragraph (a, PaddedBox x y, c) -> Size x y
- inlineChildren :: (CastDouble x, CastDouble y, Eq x, Eq y, Eq a, Eq c) => Paragraph (a, PaddedBox x y, c) -> [FragmentTree (a, PaddedBox x y, c)]
- layoutSize :: (CastDouble x, CastDouble y) => ParagraphLayout a -> Size x y
- layoutChildren :: Eq a => ParagraphLayout a -> [FragmentTree a]
- treeBox :: (CastDouble m, CastDouble n) => FragmentTree (a, PaddedBox m n, c) -> PaddedBox m n
- positionTree :: (CastDouble m, CastDouble n) => (Double, Double) -> FragmentTree (a, PaddedBox m n, c) -> FragmentTree (a, PaddedBox m n, ((Double, Double), c))
- treeInner :: FragmentTree (a, b, c) -> c
- treeInner' :: FragmentTree a -> a
- glyphs :: FragmentTree x -> [(GlyphInfo, GlyphPos)]
- codepoints :: FragmentTree x -> [Word32]
- data FragmentTree x
- = Branch (AncestorBox x) [FragmentTree x]
- | Leaf (Fragment x)
Documentation
paragraphMap :: (b -> b') -> Paragraph (a, b, c) -> Paragraph (a, b', c) Source #
Apply an operation to the 2nd field of the paragraph's userdata, for it's entire subtree.
layoutMap :: (b -> b') -> ParagraphLayout (a, b, c) -> ParagraphLayout (a, b', c) Source #
Apply an operation to the 2nd field of a laid-out paragraph's userdata, for it's entire subtree.
treeMap :: (b -> b') -> FragmentTree (a, b, c) -> FragmentTree (a, b', c) Source #
Apply an operation to the 2nd field of the tree extracted from a laid-out paragraph, for all nodes.
inlineMin :: (CastDouble x, CastDouble y) => Paragraph (a, PaddedBox x y, c) -> Size x y Source #
Compute minimum width & height for some richtext.
inlineSize :: (CastDouble x, CastDouble y) => Paragraph (a, PaddedBox x y, c) -> Size x y Source #
Compute width & height of some richtext at configured width.
inlineChildren :: (CastDouble x, CastDouble y, Eq x, Eq y, Eq a, Eq c) => Paragraph (a, PaddedBox x y, c) -> [FragmentTree (a, PaddedBox x y, c)] Source #
Retrieve children out of some richtext, associating given userdata with them.
layoutSize :: (CastDouble x, CastDouble y) => ParagraphLayout a -> Size x y Source #
Retrieve a laid-out paragraph's rect & convert to CatTrap types.
layoutChildren :: Eq a => ParagraphLayout a -> [FragmentTree a] Source #
Retrieve a laid-out paragraph's children & associate with given userdata.
treeBox :: (CastDouble m, CastDouble n) => FragmentTree (a, PaddedBox m n, c) -> PaddedBox m n Source #
Compute the paddedbox for a subtree.
positionTree :: (CastDouble m, CastDouble n) => (Double, Double) -> FragmentTree (a, PaddedBox m n, c) -> FragmentTree (a, PaddedBox m n, ((Double, Double), c)) Source #
treeInner :: FragmentTree (a, b, c) -> c Source #
treeInner' :: FragmentTree a -> a Source #
codepoints :: FragmentTree x -> [Word32] Source #
data FragmentTree x Source #
Branch (AncestorBox x) [FragmentTree x] | |
Leaf (Fragment x) |
Instances
Show x => Show (FragmentTree x) Source # | |
Defined in Graphics.Layout.Inline | |
Eq x => Eq (FragmentTree x) Source # | |
Defined in Graphics.Layout.Inline (==) :: FragmentTree x -> FragmentTree x -> Bool Source # (/=) :: FragmentTree x -> FragmentTree x -> Bool Source # |