about summary refs log tree commit diff stats
path: root/src/css/box.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-12-20 22:37:15 +0100
committerbptato <nincsnevem662@gmail.com>2024-12-20 22:37:15 +0100
commit4f0524c199902b5e363b63c8df40e03ecc2e069b (patch)
tree4cdc56b16ca922d0ccc847e0094759861e348981 /src/css/box.nim
parent322ad2bc22914e502f0dff5fc524610b8c648526 (diff)
downloadchawan-4f0524c199902b5e363b63c8df40e03ecc2e069b.tar.gz
box: InlineFragment -> InlineBox
It was named "fragment" mainly because I added it back when there was
still a separate InlineBox type and I needed another name.
Now InlineBox is gone, and I'm tired of typing fragment.
Diffstat (limited to 'src/css/box.nim')
-rw-r--r--src/css/box.nim28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/css/box.nim b/src/css/box.nim
index 856fd11c..731fac2a 100644
--- a/src/css/box.nim
+++ b/src/css/box.nim
@@ -48,30 +48,30 @@ type
     offset*: Offset
     size*: Size
 
-  InlineFragmentState* = object
+  InlineBoxState* = object
     startOffset*: Offset # offset of the first word, for position: absolute
-    areas*: seq[Area] # background that should be painted by fragment
+    areas*: seq[Area] # background that should be painted by box
     atoms*: seq[InlineAtom]
 
-  InlineFragmentType* = enum
-    iftParent, iftText, iftNewline, iftBitmap, iftBox
+  InlineBoxType* = enum
+    ibtParent, ibtText, ibtNewline, ibtBitmap, ibtBox
 
-  InlineFragment* = ref object
-    state*: InlineFragmentState
+  InlineBox* = ref object
+    state*: InlineBoxState
     render*: BoxRenderState
     computed*: CSSValues
     node*: StyledNode
     splitType*: set[SplitType]
-    case t*: InlineFragmentType
-    of iftParent:
-      children*: seq[InlineFragment]
-    of iftText:
+    case t*: InlineBoxType
+    of ibtParent:
+      children*: seq[InlineBox]
+    of ibtText:
       text*: StyledNode # note: this has no parent.
-    of iftNewline:
+    of ibtNewline:
       discard
-    of iftBitmap:
+    of ibtBitmap:
       bmp*: NetworkBitmap
-    of iftBox:
+    of ibtBox:
       box*: BlockBox
 
   Span* = object
@@ -88,7 +88,7 @@ type
     render*: BoxRenderState
     computed*: CSSValues
     node*: StyledNode
-    inline*: InlineFragment
+    inline*: InlineBox
     children*: seq[BlockBox]
 
 func offset*(x, y: LayoutUnit): Offset =