4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Matthias Ettrich
8 * \author Lars Gullik Bjønnes
10 * Full author contact details are available in file CREDITS.
12 * Metrics for an on-screen text row.
18 #include "support/types.h"
26 Row(lyx::pos_type pos);
28 void pos(lyx::pos_type p);
30 lyx::pos_type pos() const;
32 void endpos(lyx::pos_type p);
34 lyx::pos_type endpos() const;
36 void height(unsigned int h) { height_ = h; }
38 unsigned int height() const { return height_; }
40 void width(unsigned int w);
42 unsigned int width() const;
44 void ascent_of_text(unsigned int a);
46 unsigned int ascent_of_text() const;
48 void top_of_text(unsigned int top);
50 unsigned int top_of_text() const;
52 void baseline(unsigned int b);
54 unsigned int baseline() const;
55 /// return true if this row is the start of a paragraph
56 bool isParStart() const;
57 /// return the cached y position
58 unsigned int y_offset() const { return y_offset_; }
59 /// cache the y position
60 void y_offset(unsigned int newy) { y_offset_ = newy; }
61 /// current debugging only
62 void dump(const char * = "") const;
65 /// first pos covered by this row
67 /// one behind last pos covered by this row
74 unsigned int y_offset_;
75 /// ascent from baseline including prelude space
76 unsigned short ascent_of_text_;
77 /// the top of the real text in the row
78 unsigned int top_of_text_;
80 unsigned int baseline_;
87 /// width of a separator (i.e. space)
89 /// width of hfills in the body
91 /// width of hfills in the label
93 /// the x position of the row