diff options
Diffstat (limited to 'src/layout/box.nim')
-rw-r--r-- | src/layout/box.nim | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/src/layout/box.nim b/src/layout/box.nim index 5756a4a6..d607ea68 100644 --- a/src/layout/box.nim +++ b/src/layout/box.nim @@ -39,7 +39,6 @@ type # minimum content width xminwidth*: LayoutUnit size*: Size - children*: seq[InlineBoxBuilder] #TODO remove SplitType* = enum stSplitStart, stSplitEnd @@ -48,14 +47,21 @@ type offset*: Offset size*: Size - InlineFragment* = ref object + InlineFragmentState* = object startOffset*: Offset # offset of the first word, for position: absolute areas*: seq[Area] # background that should be painted by fragment - children*: seq[InlineFragment] atoms*: seq[InlineAtom] + + InlineFragment* = ref object + children*: seq[InlineFragment] computed*: CSSComputedValues node*: StyledNode splitType*: set[SplitType] + state*: InlineFragmentState + text*: seq[string] + newline*: bool #TODO enumify + bmp*: Bitmap + box*: BlockBox RelativeRect* = object top*: LayoutUnit @@ -63,16 +69,6 @@ type left*: LayoutUnit right*: LayoutUnit - InlineBoxBuilder* = ref object - computed*: CSSComputedValues - node*: StyledNode - children*: seq[InlineBoxBuilder] - text*: seq[string] - newline*: bool - splitType*: set[SplitType] - bmp*: Bitmap - box*: BlockBox - BlockBoxLayoutState* = object offset*: Offset size*: Size # padding size |