]> git.lyx.org Git - lyx.git/blobdiff - src/lyxrow.h
The graphics part of J�rgen S's latest patch + a few tweaks of my own.
[lyx.git] / src / lyxrow.h
index 12c2b835b71e47ebe181935c369bb8f478681947..ac71a2d6615b6b56c1781d4bed02085b52d45103 100644 (file)
  *           LyX, The Document Processor
  *      
  *           Copyright 1995 Matthias Ettrich
- *           Copyright 1995-2000 The LyX Team.
+ *           Copyright 1995-2001 The LyX Team.
  *
  * ====================================================== */
 
 #ifndef LYXROW_H
 #define LYXROW_H
 
-#include "lyxparagraph.h"
+#ifdef __GNUG__
+#pragma interface
+#endif
+
+#include "support/types.h"
+
+class Paragraph;
 
 ///
-struct Row {
+class Row {
+public:
+       ///
+       Row();
+       ///
+       void par(Paragraph * p);
+       ///
+       Paragraph * par();
+       ///
+       Paragraph * par() const;
+       ///
+       void pos(lyx::pos_type p);
+       ///
+       lyx::pos_type pos() const;
+       ///
+       void fill(int f);
+       ///
+       int fill() const;
+       ///
+       void height(unsigned short h);
+       ///
+       unsigned short height() const;
+       ///
+       void width(unsigned int w);
+       ///
+       unsigned int width() const;
+       ///
+       void ascent_of_text(unsigned short a);
        ///
-       Row()
-               : par(0), pos(0), baseline(0), fill(0), height(0),
-                 ascent_of_text(0), next(0), previous(0)
-               {}
+       unsigned short ascent_of_text() const;
        ///
-       LyXParagraph * par;
+       void baseline(unsigned int b);
        ///
-       LyXParagraph::size_type pos;
+       unsigned int baseline() const;
        ///
-       unsigned short  baseline;
+       void next(Row * r);
+       ///
+       Row * next() const;
+       ///
+       void previous(Row * r);
+       ///
+       Row * previous() const;
+private:
+       ///
+       Paragraph * par_;
+       ///
+       lyx::pos_type pos_;
        /** what is missing to a full row can be negative.
          Needed for hfills, flushright, block etc. */
-       mutable int fill;
+       mutable int fill_;
+       ///
+       unsigned short height_;
        ///
-       unsigned short  height;
+       unsigned int width_;
        ///
-       unsigned short ascent_of_text;
-       
+       unsigned short ascent_of_text_;
        ///
-       Row * next;
+       unsigned int baseline_;
        ///
-       Row * previous;
+       Row * next_;
+       ///
+       Row * previous_;
 };
 
+
+inline
+Paragraph * Row::par()
+{
+       return par_;
+}
+
+
+inline
+Paragraph * Row::par() const
+{
+       return par_;
+}
+
+
+inline
+unsigned short Row::height() const
+{
+       return height_;
+}
+
+
+inline
+Row * Row::next() const
+{
+       return next_;
+}
+
 #endif