X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Flyxrow.C;h=179354bad84b0770f3799ff8075a4a9b6f33696e;hb=e5a46922e916a06ad1b958d5895cc3cfb4f13d2c;hp=901de6dd2bbdb6aab159b746169eb0d1d6f6183e;hpb=dd306473146eec6098bf9c15ae23107658379360;p=lyx.git diff --git a/src/lyxrow.C b/src/lyxrow.C index 901de6dd2b..179354bad8 100644 --- a/src/lyxrow.C +++ b/src/lyxrow.C @@ -19,22 +19,22 @@ #include "lyxrow.h" #include "debug.h" -using lyx::pos_type; +namespace lyx { -RowMetrics::RowMetrics() : separator(0), hfill(0), label_hfill(0), x(0) + +RowMetrics::RowMetrics() + : separator(0), hfill(0), label_hfill(0), x(0) {} Row::Row() - : pos_(0), end_(0), height_(0), width_(0), y_offset_(0), - ascent_of_text_(0), baseline_(0) + : pos_(0), end_(0), ascent_(0), descent_(0), width_(0) {} Row::Row(pos_type pos) - : pos_(pos), end_(0), height_(0), width_(0), y_offset_(0), - ascent_of_text_(0), baseline_(0) + : pos_(pos), end_(0), ascent_(0), descent_(0), width_(0) {} @@ -62,66 +62,38 @@ pos_type Row::endpos() const } -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 int a) -{ - ascent_of_text_ = a; -} - - -unsigned int Row::ascent_of_text() const -{ - return ascent_of_text_; -} - - -void Row::top_of_text(unsigned int top) -{ - top_of_text_ = top; -} - - -unsigned int Row::top_of_text() const -{ - return top_of_text_; -} - - -void Row::baseline(unsigned int b) +void Row::ascent(int b) { - baseline_ = b; + ascent_ = b; } -unsigned int Row::baseline() const +int Row::ascent() const { - return baseline_; -} - - -bool Row::isParStart() const -{ - return !pos(); + return ascent_; } void Row::dump(const char * s) const { - lyxerr << s << " pos: " << pos_ << " width: " << width_ - << " height: " << height_ - << " ascent_of_text: " << ascent_of_text_ - << " top_of_text: " << top_of_text_ - << " y_offset: " << y_offset_ << std::endl; + lyxerr << s << " pos: " << pos_ << " end: " << end_ + << " width: " << width_ + << " ascent: " << ascent_ + << " descent: " << descent_ + << std::endl; } + +} // namespace lyx