]> git.lyx.org Git - lyx.git/blob - src/lyxrow.C
Fix breakage caused by bad commits.
[lyx.git] / src / lyxrow.C
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  */
16
17 #include <config.h>
18
19 #include "lyxrow.h"
20 #include "debug.h"
21
22 using lyx::pos_type;
23
24
25 RowMetrics::RowMetrics()
26         : separator(0), hfill(0), label_hfill(0), x(0)
27 {}
28
29
30 Row::Row()
31         : pos_(0), end_(0), ascent_(0), descent_(0), width_(0)
32 {}
33
34
35 Row::Row(pos_type pos)
36         : pos_(pos), end_(0), ascent_(0), descent_(0), width_(0)
37 {}
38
39
40 void Row::pos(pos_type p)
41 {
42         pos_ = p;
43 }
44
45
46 pos_type Row::pos() const
47 {
48         return pos_;
49 }
50
51
52 void Row::endpos(pos_type p)
53 {
54         end_ = p;
55 }
56
57
58 pos_type Row::endpos() const
59 {
60         return end_;
61 }
62
63
64 void Row::width(int w)
65 {
66         width_ = w;
67 }
68
69
70 int Row::width() const
71 {
72         return width_;
73 }
74
75
76 void Row::ascent(int b)
77 {
78         ascent_ = b;
79 }
80
81
82 int Row::ascent() const
83 {
84         return ascent_;
85 }
86
87
88 void Row::dump(const char * s) const
89 {
90         lyxerr << s << " pos: " << pos_ << " end: " << end_
91                 << " width: " << width_
92                 << " ascent: " << ascent_
93                 << " descent: " << descent_
94                 << std::endl;
95 }