Consider the case where there is not any layout name.
[lyx.git] / src / lyxrow.C
bloba34be18861b2befaa4bf5dfd7f3ca8ece3bf2b63
1 /**
2  * \file lyxrow.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author unknown
7  * \author Lars Gullik Bjønnes
8  * \author John Levon
9  * \author André Pönitz
10  * \author Jürgen Vigna
11  *
12  * Full author contact details are available in file CREDITS.
13  *
14  * Metrics for an on-screen text row.
15  */
17 #include <config.h>
19 #include "lyxrow.h"
20 #include "debug.h"
22 using lyx::pos_type;
25 RowMetrics::RowMetrics()
26         : separator(0), hfill(0), label_hfill(0), x(0)
30 Row::Row()
31         : pos_(0), end_(0), ascent_(0), descent_(0), width_(0)
35 Row::Row(pos_type pos)
36         : pos_(pos), end_(0), ascent_(0), descent_(0), width_(0)
40 void Row::pos(pos_type p)
42         pos_ = p;
46 pos_type Row::pos() const
48         return pos_;
52 void Row::endpos(pos_type p)
54         end_ = p;
58 pos_type Row::endpos() const
60         return end_;
64 void Row::width(int w)
66         width_ = w;
70 int Row::width() const
72         return width_;
76 void Row::ascent(int b)
78         ascent_ = b;
82 int Row::ascent() const
84         return ascent_;
88 void Row::dump(const char * s) const
90         lyxerr << s << " pos: " << pos_ << " end: " << end_
91                 << " width: " << width_
92                 << " ascent: " << ascent_
93                 << " descent: " << descent_
94                 << std::endl;