]> git.lyx.org Git - lyx.git/blobdiff - src/lyxrow.C
Point fix, earlier forgotten
[lyx.git] / src / lyxrow.C
index 33356ec0d78d20d3fb7314491bfc2e20c1761bc2..a93192a5fb83a990ac3b8b3c1cf7a22d90d369c5 100644 (file)
@@ -4,8 +4,12 @@
  * Licence details can be found in the file COPYING.
  *
  * \author unknown
+ * \author Lars Gullik Bjønnes
+ * \author John Levon
+ * \author André Pönitz
+ * \author Jürgen Vigna
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  *
  * Metrics for an on-screen text row.
  */
@@ -13,9 +17,7 @@
 #include <config.h>
 
 #include "lyxrow.h"
-#include "paragraph.h"
-#include "layout.h"
-#include "lyxlayout.h"
+#include "debug.h"
 
 using lyx::pos_type;
 
@@ -23,50 +25,40 @@ using std::max;
 using std::min;
 
 Row::Row()
-       : pos_(0), fill_(0), height_(0), width_(0),
-         ascent_of_text_(0), baseline_(0)
+       : pos_(0), end_(0), fill_(0), height_(0), width_(0), y_(0),
+         ascent_of_text_(0), baseline_(0),
+         x_(0), fill_separator_(0), fill_hfill_(0), fill_label_hfill_(0)
 {}
 
 
-Row::Row(ParagraphList::iterator pit, pos_type po)
-       : pit_(pit), pos_(po), fill_(0), height_(0), width_(0),
-         ascent_of_text_(0), baseline_(0)
+Row::Row(pos_type pos)
+       : pos_(pos), end_(0), fill_(0), height_(0), width_(0), y_(0),
+         ascent_of_text_(0), baseline_(0),
+         x_(0), fill_separator_(0), fill_hfill_(0), fill_label_hfill_(0)
 {}
 
 
-ParagraphList::iterator Row::par()
+void Row::pos(pos_type p)
 {
-       return pit_;
+       pos_ = p;
 }
 
 
-ParagraphList::iterator Row::par() const
+pos_type Row::pos() const
 {
-       return pit_;
+       return pos_;
 }
 
 
-unsigned short Row::height() const
+void Row::end(pos_type p)
 {
-       return height_;
+       end_ = p;
 }
 
 
-void Row::par(ParagraphList::iterator pit)
+pos_type Row::end() const
 {
-       pit_ = pit;
-}
-
-
-void Row::pos(pos_type p)
-{
-       pos_ = p;
-}
-
-
-pos_type Row::pos() const
-{
-       return pos_;
+       return end_;
 }
 
 
@@ -82,12 +74,6 @@ int Row::fill() const
 }
 
 
-void Row::height(unsigned short h)
-{
-       height_ = h;
-}
-
-
 void Row::width(unsigned int w)
 {
        width_ = w;
@@ -100,13 +86,13 @@ unsigned int Row::width() const
 }
 
 
-void Row::ascent_of_text(unsigned short a)
+void Row::ascent_of_text(unsigned int a)
 {
        ascent_of_text_ = a;
 }
 
 
-unsigned short Row::ascent_of_text() const
+unsigned int Row::ascent_of_text() const
 {
        return ascent_of_text_;
 }
@@ -136,7 +122,67 @@ unsigned int Row::baseline() const
 }
 
 
+float Row::x() const
+{
+       return x_;
+}
+
+
+void Row::x(float f)
+{
+       x_ = f;
+}
+
+
+float Row::fill_separator() const
+{
+       return fill_separator_;
+}
+
+
+void Row::fill_separator(float f)
+{
+       fill_separator_ = f;
+}
+
+
+float Row::fill_hfill() const
+{
+       return fill_hfill_;
+}
+
+
+void Row::fill_hfill(float f)
+{
+       fill_hfill_ = f;
+}
+
+
+float Row::fill_label_hfill() const
+{
+       return fill_label_hfill_;
+}
+
+
+void Row::fill_label_hfill(float f)
+{
+       fill_label_hfill_ = f;
+}
+
+
 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;
+}
+