X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Flyxrow.C;h=179354bad84b0770f3799ff8075a4a9b6f33696e;hb=e5a46922e916a06ad1b958d5895cc3cfb4f13d2c;hp=804cbc7e99517f640363a1a401522f5710e25df1;hpb=ae87b945156585b080ed155919f64b80e48d7a04;p=lyx.git diff --git a/src/lyxrow.C b/src/lyxrow.C index 804cbc7e99..179354bad8 100644 --- a/src/lyxrow.C +++ b/src/lyxrow.C @@ -1,125 +1,99 @@ -/* This file is part of - * ====================================================== +/** + * \file lyxrow.C + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. * - * LyX, The Document Processor + * \author unknown + * \author Lars Gullik Bjønnes + * \author John Levon + * \author André Pönitz + * \author Jürgen Vigna * - * Copyright 1995 Matthias Ettrich - * Copyright 1995-2001 The LyX Team. + * Full author contact details are available in file CREDITS. * - * ====================================================== */ + * Metrics for an on-screen text row. + */ #include -#ifdef __GNUG__ -#pragma implementation -#endif - #include "lyxrow.h" +#include "debug.h" + + +namespace lyx { + + +RowMetrics::RowMetrics() + : separator(0), hfill(0), label_hfill(0), x(0) +{} Row::Row() - : par_(0), pos_(0), fill_(0), height_(0), width_(0), - ascent_of_text_(0), baseline_(0), next_(0), previous_(0) + : pos_(0), end_(0), ascent_(0), descent_(0), width_(0) {} -void Row::par(Paragraph * p) -{ - par_ = p; -} +Row::Row(pos_type pos) + : pos_(pos), end_(0), ascent_(0), descent_(0), width_(0) +{} -void Row::pos(lyx::pos_type p) +void Row::pos(pos_type p) { pos_ = p; } -lyx::pos_type Row::pos() const +pos_type Row::pos() const { return pos_; } -void Row::fill(int f) +void Row::endpos(pos_type p) { - fill_ = f; + end_ = p; } -int Row::fill() const +pos_type Row::endpos() const { - return fill_; + return end_; } -void Row::height(unsigned short h) -{ - height_ = h; -} - - -void Row::width(unsigned int w) +void Row::width(int w) { width_ = w; } -unsigned int Row::width() const +int Row::width() const { return width_; } -void Row::ascent_of_text(unsigned short a) +void Row::ascent(int b) { - ascent_of_text_ = a; + ascent_ = b; } -unsigned short Row::ascent_of_text() const +int Row::ascent() const { - return ascent_of_text_; + return ascent_; } -void Row::top_of_text(unsigned int top) +void Row::dump(const char * s) const { - top_of_text_ = top; + lyxerr << s << " pos: " << pos_ << " end: " << end_ + << " width: " << width_ + << " ascent: " << ascent_ + << " descent: " << descent_ + << std::endl; } - -unsigned int Row::top_of_text() const -{ - return top_of_text_; -} - -void Row::baseline(unsigned int b) -{ - baseline_ = b; -} - - -unsigned int Row::baseline() const -{ - return baseline_; -} - - -void Row::next(Row * r) -{ - next_ = r; -} - - -void Row::previous(Row * r) -{ - previous_ = r; -} - - -Row * Row::previous() const -{ - return previous_; -} +} // namespace lyx