~jaro/balkon

1fe9721d7be50e19e68cd8a8ec85f0adbb1c68e4 — Jaro 1 year, 6 months ago 68d4a51
Define ResolvedBox.
2 files changed, 16 insertions(+), 0 deletions(-)

M balkon.cabal
A src/Data/Text/ParagraphLayout/Internal/ResolvedBox.hs
M balkon.cabal => balkon.cabal +1 -0
@@ 117,6 117,7 @@ library balkon-internal
        Data.Text.ParagraphLayout.Internal.Plain.Paragraph,
        Data.Text.ParagraphLayout.Internal.Plain.ParagraphLayout,
        Data.Text.ParagraphLayout.Internal.Rect,
        Data.Text.ParagraphLayout.Internal.ResolvedBox,
        Data.Text.ParagraphLayout.Internal.ResolvedSpan,
        Data.Text.ParagraphLayout.Internal.Rich,
        Data.Text.ParagraphLayout.Internal.Rich.Paragraph,

A src/Data/Text/ParagraphLayout/Internal/ResolvedBox.hs => src/Data/Text/ParagraphLayout/Internal/ResolvedBox.hs +15 -0
@@ 0,0 1,15 @@
module Data.Text.ParagraphLayout.Internal.ResolvedBox (ResolvedBox (..))
where

import Data.Text.ParagraphLayout.Internal.BoxOptions

-- | Internal structure describing an inline box.
-- May be shared by multiple fragments.
data ResolvedBox d = ResolvedBox
    { boxUserData :: d
    , boxIndex :: Int
    , boxOptions :: BoxOptions
    }

instance Eq (ResolvedBox d) where
    a == b = boxIndex a == boxIndex b