]> git.lyx.org Git - lyx.git/blob - src/Row.cpp
This is one of a series of patches that will merge the layout modules development...
[lyx.git] / src / Row.cpp
1 /**
2  * \file Row.cpp
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  */
16
17 #include <config.h>
18
19 #include "Row.h"
20 #include "debug.h"
21
22
23 namespace lyx {
24
25
26 Row::Row()
27         : pos_(0), end_(0), separator(0), hfill(0), label_hfill(0), x(0)
28 {}
29
30
31 Row::Row(pos_type pos)
32         : pos_(pos), end_(0), separator(0), hfill(0), label_hfill(0), x(0)
33 {}
34
35
36 void Row::pos(pos_type p)
37 {
38         pos_ = p;
39 }
40
41
42 pos_type Row::pos() const
43 {
44         return pos_;
45 }
46
47
48 void Row::endpos(pos_type p)
49 {
50         end_ = p;
51 }
52
53
54 pos_type Row::endpos() const
55 {
56         return end_;
57 }
58
59
60 void Row::dump(const char * s) const
61 {
62         lyxerr << s << " pos: " << pos_ << " end: " << end_
63                 << " width: " << dim_.wid
64                 << " ascent: " << dim_.asc
65                 << " descent: " << dim_.des
66                 << std::endl;
67 }
68
69
70 } // namespace lyx