]> git.lyx.org Git - lyx.git/blob - src/lyxrow.C
fix reading the author field.
[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() : separator(0), hfill(0), label_hfill(0), x(0)
26 {}
27
28
29 Row::Row()
30         : pos_(0), end_(0), height_(0), width_(0), y_offset_(0),
31           ascent_of_text_(0), baseline_(0)
32 {}
33
34
35 Row::Row(pos_type pos)
36         : pos_(pos), end_(0), height_(0), width_(0), y_offset_(0),
37           ascent_of_text_(0), baseline_(0)
38 {}
39
40
41 void Row::pos(pos_type p)
42 {
43         pos_ = p;
44 }
45
46
47 pos_type Row::pos() const
48 {
49         return pos_;
50 }
51
52
53 void Row::endpos(pos_type p)
54 {
55         end_ = p;
56 }
57
58
59 pos_type Row::endpos() const
60 {
61         return end_;
62 }
63
64
65 void Row::width(unsigned int w)
66 {
67         width_ = w;
68 }
69
70
71 unsigned int Row::width() const
72 {
73         return width_;
74 }
75
76
77 void Row::ascent_of_text(unsigned int a)
78 {
79         ascent_of_text_ = a;
80 }
81
82
83 unsigned int Row::ascent_of_text() const
84 {
85         return ascent_of_text_;
86 }
87
88
89 void Row::top_of_text(unsigned int top)
90 {
91         top_of_text_ = top;
92 }
93
94
95 unsigned int Row::top_of_text() const
96 {
97         return top_of_text_;
98 }
99
100
101 void Row::baseline(unsigned int b)
102 {
103         baseline_ = b;
104 }
105
106
107 unsigned int Row::baseline() const
108 {
109         return baseline_;
110 }
111
112
113 bool Row::isParStart() const
114 {
115         return !pos();
116 }
117
118
119 void Row::dump(const char * s) const
120 {
121         lyxerr << s << " pos: " << pos_ << " width: " << width_
122                 << " height: " << height_
123                 << " ascent_of_text: " << ascent_of_text_
124                 << " top_of_text: " << top_of_text_
125                 << " y_offset: " << y_offset_ << std::endl;
126 }