2003-02-14 00:41:44 +00:00
|
|
|
|
/**
|
2007-04-26 04:41:58 +00:00
|
|
|
|
* \file Row.cpp
|
2003-02-14 00:41:44 +00:00
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
2002-03-21 17:27:08 +00:00
|
|
|
|
*
|
2003-02-14 00:41:44 +00:00
|
|
|
|
* \author unknown
|
2003-08-23 00:17:00 +00:00
|
|
|
|
* \author Lars Gullik Bj<EFBFBD>nnes
|
|
|
|
|
* \author John Levon
|
|
|
|
|
* \author Andr<EFBFBD> P<EFBFBD>nitz
|
|
|
|
|
* \author J<EFBFBD>rgen Vigna
|
2002-03-21 17:27:08 +00:00
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
|
* Full author contact details are available in file CREDITS.
|
2000-06-08 23:16:16 +00:00
|
|
|
|
*
|
2003-02-14 00:41:44 +00:00
|
|
|
|
* Metrics for an on-screen text row.
|
|
|
|
|
*/
|
2000-06-08 23:16:16 +00:00
|
|
|
|
|
2000-06-15 15:54:05 +00:00
|
|
|
|
#include <config.h>
|
|
|
|
|
|
2007-04-26 04:41:58 +00:00
|
|
|
|
#include "Row.h"
|
2003-08-01 14:12:04 +00:00
|
|
|
|
#include "debug.h"
|
2000-06-08 23:16:16 +00:00
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
|
|
namespace lyx {
|
2003-02-14 00:41:44 +00:00
|
|
|
|
|
2000-06-08 23:16:16 +00:00
|
|
|
|
|
|
|
|
|
Row::Row()
|
2007-08-28 15:47:53 +00:00
|
|
|
|
: pos_(0), end_(0), separator(0), hfill(0), label_hfill(0), x(0)
|
2000-06-08 23:16:16 +00:00
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
2007-08-28 17:39:36 +00:00
|
|
|
|
Row::Row(pos_type pos), separator(0), hfill(0), label_hfill(0), x(0)
|
2007-08-28 09:21:48 +00:00
|
|
|
|
: pos_(pos), end_(0)
|
2003-03-29 23:11:20 +00:00
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
2003-02-14 00:41:44 +00:00
|
|
|
|
void Row::pos(pos_type p)
|
2000-06-08 23:16:16 +00:00
|
|
|
|
{
|
|
|
|
|
pos_ = p;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2003-02-14 00:41:44 +00:00
|
|
|
|
pos_type Row::pos() const
|
2000-06-08 23:16:16 +00:00
|
|
|
|
{
|
|
|
|
|
return pos_;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2003-10-22 16:30:57 +00:00
|
|
|
|
void Row::endpos(pos_type p)
|
2003-08-22 07:49:57 +00:00
|
|
|
|
{
|
|
|
|
|
end_ = p;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2003-10-22 16:30:57 +00:00
|
|
|
|
pos_type Row::endpos() const
|
2003-08-22 07:49:57 +00:00
|
|
|
|
{
|
|
|
|
|
return end_;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2003-08-01 14:12:04 +00:00
|
|
|
|
void Row::dump(const char * s) const
|
|
|
|
|
{
|
2004-11-30 01:59:49 +00:00
|
|
|
|
lyxerr << s << " pos: " << pos_ << " end: " << end_
|
2007-08-28 09:21:48 +00:00
|
|
|
|
<< " width: " << dim_.wid
|
|
|
|
|
<< " ascent: " << dim_.asc
|
|
|
|
|
<< " descent: " << dim_.des
|
2004-11-30 01:59:49 +00:00
|
|
|
|
<< std::endl;
|
2003-08-01 14:12:04 +00:00
|
|
|
|
}
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace lyx
|