+//------------------------------------------------------------------------
+// TextBlock
+//------------------------------------------------------------------------
+
+class TextBlock {
+public:
+
+ TextBlock();
+ ~TextBlock();
+
+private:
+
+ GBool yxBefore(TextBlock *blk2);
+ void mergeRight(TextBlock *blk2);
+ void mergeBelow(TextBlock *blk2);
+
+ double xMin, xMax; // bounding box x coordinates
+ double yMin, yMax; // bounding box y coordinates
+ double xSpaceL, xSpaceR; // whitespace to left and right of this block
+ double ySpaceT, ySpaceB; // whitespace above and below this block
+ double maxFontSize; // max primary font size
+ TextLine *lines; // lines in block
+ TextBlock *next; // next block in flow
+ TextBlock *stackNext; // next block on traversal stack
+
+ friend class TextFlow;
+ friend class TextPage;
+};
+
+//------------------------------------------------------------------------
+// TextFlow
+//------------------------------------------------------------------------
+
+class TextFlow {
+public:
+
+ TextFlow();
+ ~TextFlow();
+
+private:
+
+ double yMin, yMax; // bounding box y coordinates
+ double ySpaceT, ySpaceB; // whitespace above and below this flow
+ TextBlock *blocks; // blocks in flow
+ TextLine *lines; // lines in flow
+ TextFlow *next; // next flow on page
+
+ friend class TextPage;
+};
+
+