3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
7 * \author Lars Gullik Bjønnes
10 * \author Jürgen Vigna
12 * Full author contact details are available in file CREDITS.
14 * Metrics for an on-screen text row.
20 #include "support/debug.h"
27 : separator(0), label_hfill(0), x(0),
28 sel_beg(-1), sel_end(-1), changed_(false), crc_(0), pos_(0), end_(0)
32 Row::Row(pos_type pos)
33 : separator(0), label_hfill(0), x(0),
34 sel_beg(-1), sel_end(-1), changed_(false), crc_(0), pos_(pos), end_(0)
38 void Row::setCrc(size_type crc) const
40 changed_ = crc != crc_;
45 void Row::setDimension(Dimension const & dim)
51 void Row::pos(pos_type p)
57 void Row::endpos(pos_type p)
63 void Row::setSelection(pos_type beg, pos_type end)
65 if (pos_ >= beg && pos_ <= end)
67 else if (beg > pos_ && beg <= end_)
72 if (end_ >= beg && end_ <= end)
74 else if (end < end_ && end >= pos_)
81 void Row::dump(char const * s) const
83 LYXERR0(s << " pos: " << pos_ << " end: " << end_
84 << " width: " << dim_.wid
85 << " ascent: " << dim_.asc
86 << " descent: " << dim_.des);