4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS
11 * Metrics for an on-screen text row.
17 #include "support/types.h"
28 void par(Paragraph * p);
32 Paragraph * par() const;
34 void pos(lyx::pos_type p);
36 lyx::pos_type pos() const;
42 void height(unsigned short h);
44 unsigned short height() const;
46 void width(unsigned int w);
48 unsigned int width() const;
50 void ascent_of_text(unsigned short a);
52 unsigned short ascent_of_text() const;
54 void top_of_text(unsigned int top);
56 unsigned int top_of_text() const;
58 void baseline(unsigned int b);
60 unsigned int baseline() const;
66 void previous(Row * r);
68 Row * previous() const;
70 /// return the position of the last character in this row
71 lyx::pos_type lastPos() const;
72 /// return the position of the last normal, printable character in this row
73 lyx::pos_type lastPrintablePos() const;
76 * Returns the number of separators.
77 * The separator on the very last column doesnt count.
79 int numberOfSeparators() const;
82 * Returns the number of hfills. It works like a LaTeX \hfill:
83 * the hfills at the beginning and at the end are ignored.
84 * This is much more useful than not to ignore!
86 int numberOfHfills() const;
88 /// Returns the number of hfills in the manual label. See numberOfHfills().
89 int numberOfLabelHfills() const;
92 * Returns true if a expansion is needed at the given position.
93 * Rules are given by LaTeX
95 bool hfillExpansion(lyx::pos_type pos) const;
102 /** what is missing to a full row can be negative.
103 Needed for hfills, flushright, block etc. */
106 unsigned short height_;
109 /// ascent from baseline including prelude space
110 unsigned short ascent_of_text_;
111 /// the top of the real text in the row
112 unsigned int top_of_text_;
114 unsigned int baseline_;
123 Paragraph * Row::par()
130 Paragraph * Row::par() const
137 unsigned short Row::height() const
144 Row * Row::next() const