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 "ParagraphList.h"
19 #include "support/types.h"
27 Row(ParagraphList::iterator pit, lyx::pos_type po);
29 void par(ParagraphList::iterator pit);
31 ParagraphList::iterator par();
33 ParagraphList::iterator par() const;
35 void pos(lyx::pos_type p);
37 lyx::pos_type pos() const;
43 void height(unsigned short h);
45 unsigned short height() const;
47 void width(unsigned int w);
49 unsigned int width() const;
51 void ascent_of_text(unsigned short a);
53 unsigned short ascent_of_text() const;
55 void top_of_text(unsigned int top);
57 unsigned int top_of_text() const;
59 void baseline(unsigned int b);
61 unsigned int baseline() const;
62 /// return true if this row is the start of a paragraph
63 bool isParStart() const;
64 /// return the cached y position
65 unsigned int y() const;
66 /// cache the y position
67 void y(unsigned int newy);
70 ParagraphList::iterator pit_;
73 /** what is missing to a full row can be negative.
74 Needed for hfills, flushright, block etc. */
77 unsigned short height_;
82 /// ascent from baseline including prelude space
83 unsigned short ascent_of_text_;
84 /// the top of the real text in the row
85 unsigned int top_of_text_;
87 unsigned int baseline_;