]> git.lyx.org Git - lyx.git/blobdiff - src/lyxrow.C
* lyxrow.[Ch]: add end_ member
[lyx.git] / src / lyxrow.C
index 682186c71f8f118d0ca034a5d689f5b697ed1806..40adfda74840f3bb25ce44dd84b84cacde57e842 100644 (file)
@@ -13,9 +13,7 @@
 #include <config.h>
 
 #include "lyxrow.h"
-#include "paragraph.h"
-#include "layout.h"
-#include "lyxlayout.h"
+#include "debug.h"
 
 using lyx::pos_type;
 
@@ -23,13 +21,13 @@ using std::max;
 using std::min;
 
 Row::Row()
-       : pos_(0), fill_(0), height_(0), width_(0), y_(0),
+       : pos_(0), end_(0), fill_(0), height_(0), width_(0), y_(0),
          ascent_of_text_(0), baseline_(0)
 {}
 
 
-Row::Row(ParagraphList::iterator pit, pos_type po)
-       : pit_(pit), pos_(po), fill_(0), height_(0), width_(0), y_(0),
+Row::Row(pos_type pos)
+       : pos_(pos), end_(0), fill_(0), height_(0), width_(0), y_(0),
          ascent_of_text_(0), baseline_(0)
 {}
 
@@ -46,39 +44,33 @@ unsigned int Row::y() const
 }
 
 
-ParagraphList::iterator Row::par()
-{
-       return pit_;
-}
-
-
-ParagraphList::iterator Row::par() const
+unsigned short Row::height() const
 {
-       return pit_;
+       return height_;
 }
 
 
-unsigned short Row::height() const
+void Row::pos(pos_type p)
 {
-       return height_;
+       pos_ = p;
 }
 
 
-void Row::par(ParagraphList::iterator pit)
+pos_type Row::pos() const
 {
-       pit_ = pit;
+       return pos_;
 }
 
 
-void Row::pos(pos_type p)
+void Row::end(pos_type p)
 {
-       pos_ = p;
+       end_ = p;
 }
 
 
-pos_type Row::pos() const
+pos_type Row::end() const
 {
-       return pos_;
+       return end_;
 }
 
 
@@ -152,3 +144,15 @@ bool Row::isParStart() const
 {
        return !pos();
 }
+
+
+void Row::dump(const char * s) const
+{
+       lyxerr << s << " pos: " << pos_ << " width: " << width_
+               << " height: " << height_
+               << " fill: " << fill_
+               << " ascent_of_text: " << ascent_of_text_
+               << " top_of_text: " << top_of_text_
+               << " y: " << y_ << std::endl;
+}
+