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.
21 #include "support/debug.h"
28 : separator(0), label_hfill(0), x(0),
29 sel_beg(-1), sel_end(-1), changed_(false), crc_(0), pos_(0), end_(0)
33 Row::Row(pos_type pos)
34 : separator(0), label_hfill(0), x(0),
35 sel_beg(-1), sel_end(-1), changed_(false), crc_(0), pos_(pos), end_(0)
39 void Row::setCrc(size_type crc) const
41 changed_ = crc != crc_;
46 void Row::setDimension(Dimension const & dim)
52 void Row::pos(pos_type p)
58 void Row::endpos(pos_type p)
64 void Row::setSelection(pos_type beg, pos_type end) const
66 if (pos_ >= beg && pos_ <= end)
68 else if (beg > pos_ && beg <= end_)
73 if (end_ >= beg && end_ <= end)
75 else if (end < end_ && end >= pos_)
82 void Row::dump(char const * s) const
84 LYXERR0(s << " pos: " << pos_ << " end: " << end_
85 << " width: " << dim_.wid
86 << " ascent: " << dim_.asc
87 << " descent: " << dim_.des);