]> git.lyx.org Git - lyx.git/blobdiff - src/lyxrow.C
Point fix, earlier forgotten
[lyx.git] / src / lyxrow.C
index d387cd65bcaf80b97b2124fed40363120ffae4fe..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,6 @@
 #include <config.h>
 
 #include "lyxrow.h"
-#include "paragraph.h"
-#include "layout.h"
-#include "lyxlayout.h"
 #include "debug.h"
 
 using lyx::pos_type;
@@ -24,128 +25,148 @@ using std::max;
 using std::min;
 
 Row::Row()
-       : pos_(0), fill_(0), height_(0), width_(0), y_(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), y_(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)
 {}
 
 
-void Row::y(unsigned int newy)
+void Row::pos(pos_type p)
 {
-       y_ = newy;
+       pos_ = p;
 }
 
 
-unsigned int Row::y() const
+pos_type Row::pos() const
 {
-       return y_;
+       return pos_;
 }
 
 
-ParagraphList::iterator Row::par()
+void Row::end(pos_type p)
 {
-       return pit_;
+       end_ = p;
 }
 
 
-ParagraphList::iterator Row::par() const
+pos_type Row::end() const
 {
-       return pit_;
+       return end_;
 }
 
 
-unsigned short Row::height() const
+void Row::fill(int f)
 {
-       return height_;
+       fill_ = f;
 }
 
 
-void Row::par(ParagraphList::iterator pit)
+int Row::fill() const
 {
-       pit_ = pit;
+       return fill_;
 }
 
 
-void Row::pos(pos_type p)
+void Row::width(unsigned int w)
 {
-       pos_ = p;
+       width_ = w;
 }
 
 
-pos_type Row::pos() const
+unsigned int Row::width() const
 {
-       return pos_;
+       return width_;
 }
 
 
-void Row::fill(int f)
+void Row::ascent_of_text(unsigned int a)
 {
-       fill_ = f;
+       ascent_of_text_ = a;
 }
 
 
-int Row::fill() const
+unsigned int Row::ascent_of_text() const
 {
-       return fill_;
+       return ascent_of_text_;
 }
 
 
-void Row::height(unsigned short h)
+void Row::top_of_text(unsigned int top)
 {
-       height_ = h;
+       top_of_text_ = top;
 }
 
 
-void Row::width(unsigned int w)
+unsigned int Row::top_of_text() const
 {
-       width_ = w;
+       return top_of_text_;
 }
 
 
-unsigned int Row::width() const
+void Row::baseline(unsigned int b)
 {
-       return width_;
+       baseline_ = b;
 }
 
 
-void Row::ascent_of_text(unsigned short a)
+unsigned int Row::baseline() const
 {
-       ascent_of_text_ = a;
+       return baseline_;
 }
 
 
-unsigned short Row::ascent_of_text() const
+float Row::x() const
 {
-       return ascent_of_text_;
+       return x_;
 }
 
 
-void Row::top_of_text(unsigned int top)
+void Row::x(float f)
 {
-       top_of_text_ = top;
+       x_ = f;
 }
 
 
-unsigned int Row::top_of_text() const
+float Row::fill_separator() const
 {
-       return top_of_text_;
+       return fill_separator_;
 }
 
 
-void Row::baseline(unsigned int b)
+void Row::fill_separator(float f)
 {
-       baseline_ = b;
+       fill_separator_ = f;
 }
 
 
-unsigned int Row::baseline() const
+float Row::fill_hfill() const
 {
-       return baseline_;
+       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;
 }
 
 
@@ -162,6 +183,6 @@ void Row::dump(const char * s) const
                << " fill: " << fill_
                << " ascent_of_text: " << ascent_of_text_
                << " top_of_text: " << top_of_text_
-               << " y: " << y_ << "\n";
+               << " y: " << y_ << std::endl;
 }