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;
40 void height(unsigned int h) { height_ = h; }
42 unsigned int height() const { return height_; }
44 void width(unsigned int w);
46 unsigned int width() const;
48 void ascent_of_text(unsigned int a);
50 unsigned int ascent_of_text() const;
52 void top_of_text(unsigned int top);
54 unsigned int top_of_text() const;
56 void baseline(unsigned int b);
58 unsigned int baseline() const;
59 /// return true if this row is the start of a paragraph
60 bool isParStart() const;
61 /// return the cached y position
62 unsigned int y_offset() const { return y_offset_; }
63 /// cache the y position
64 void y_offset(unsigned int newy) { y_offset_ = newy; }
70 float fill_separator() const;
72 void fill_separator(float);
74 float fill_hfill() const;
76 void fill_hfill(float);
78 float fill_label_hfill() const;
80 void fill_label_hfill(float);
81 /// current debugging only
82 void dump(const char * = "") const;
84 /// first pos covered by this row
86 /// one behind last pos covered by this row
88 /** what is missing to a full row. Can be negative.
89 Needed for hfills, flushright, block etc. */
96 unsigned int y_offset_;
97 /// ascent from baseline including prelude space
98 unsigned short ascent_of_text_;
99 /// the top of the real text in the row
100 unsigned int top_of_text_;
102 unsigned int baseline_;
103 /// offet from left border
106 float fill_separator_;
110 float fill_label_hfill_;