cattrap-0.1.0.0: Lays out boxes according to the CSS Box Model.
Safe HaskellNone
LanguageHaskell2010

Graphics.Layout.Inline

Description

Sizes inline text & extracts positioned children, wraps Balkón for the actual logic.

Synopsis

Documentation

inlineMinWidth :: Font' -> Paragraph -> Double Source #

Compute minimum width for some richtext.

inlineMin :: (CastDouble x, CastDouble y) => Font' -> Paragraph -> Size x y Source #

Compute minimum width & height for some richtext.

inlineNatWidth :: Font' -> Paragraph -> Double Source #

Compute natural (single-line) width for some richtext.

inlineHeight :: Font' -> Double -> Paragraph -> Double Source #

Compute height for rich text at given width.

inlineSize :: (CastDouble x, CastDouble y) => Font' -> Paragraph -> Size x y Source #

Compute width & height of some richtext at configured width.

inlineChildren :: [x] -> Paragraph -> [(x, Fragment)] Source #

Retrieve children out of some richtext, associating given userdata with them.

layoutSize :: (CastDouble x, CastDouble y) => Font' -> ParagraphLayout -> Size x y Source #

Retrieve a laid-out paragraph's rect & convert to CatTrap types.

layoutChildren :: [x] -> ParagraphLayout -> [(x, Fragment)] Source #

Retrieve a laid-out paragraph's children & associate with given userdata.

fragmentSize :: (CastDouble x, CastDouble y) => Font' -> Fragment -> Size x y Source #

Retrieve the rect for a fragment & convert to CatTrap types.

fragmentSize' :: CastDouble x => Font' -> Fragment -> Size x x Source #

Variant of fragmentSize asserting to the typesystem that both fields of the resulting Size are of the same type.

fragmentPos :: Font' -> (Double, Double) -> Fragment -> (Double, Double) Source #

Retrieve the position of a fragment.