X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Flyxrow.C;h=179354bad84b0770f3799ff8075a4a9b6f33696e;hb=3f8fa07c6ed38218d6a4048f2993a512aa942c96;hp=a93192a5fb83a990ac3b8b3c1cf7a22d90d369c5;hpb=eaad9ff595befab46fba2909632201b923ba8189;p=lyx.git diff --git a/src/lyxrow.C b/src/lyxrow.C index a93192a5fb..179354bad8 100644 --- a/src/lyxrow.C +++ b/src/lyxrow.C @@ -19,22 +19,22 @@ #include "lyxrow.h" #include "debug.h" -using lyx::pos_type; -using std::max; -using std::min; +namespace lyx { + + +RowMetrics::RowMetrics() + : separator(0), hfill(0), label_hfill(0), x(0) +{} + Row::Row() - : pos_(0), end_(0), fill_(0), height_(0), width_(0), y_(0), - ascent_of_text_(0), baseline_(0), - x_(0), fill_separator_(0), fill_hfill_(0), fill_label_hfill_(0) + : pos_(0), end_(0), ascent_(0), descent_(0), width_(0) {} Row::Row(pos_type pos) - : pos_(pos), end_(0), fill_(0), height_(0), width_(0), y_(0), - ascent_of_text_(0), baseline_(0), - x_(0), fill_separator_(0), fill_hfill_(0), fill_label_hfill_(0) + : pos_(pos), end_(0), ascent_(0), descent_(0), width_(0) {} @@ -50,139 +50,50 @@ pos_type Row::pos() const } -void Row::end(pos_type p) +void Row::endpos(pos_type p) { end_ = p; } -pos_type Row::end() const +pos_type Row::endpos() const { return end_; } -void Row::fill(int f) -{ - fill_ = f; -} - - -int Row::fill() const -{ - return fill_; -} - - -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 +void Row::ascent(int b) { - return ascent_of_text_; + ascent_ = b; } -void Row::top_of_text(unsigned int top) +int Row::ascent() const { - top_of_text_ = top; -} - - -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_; -} - - -float Row::x() const -{ - return x_; -} - - -void Row::x(float f) -{ - x_ = f; -} - - -float Row::fill_separator() const -{ - return fill_separator_; -} - - -void Row::fill_separator(float f) -{ - fill_separator_ = f; -} - - -float Row::fill_hfill() const -{ - return fill_hfill_; -} - - -void Row::fill_hfill(float f) -{ - fill_hfill_ = f; -} - - -float Row::fill_label_hfill() const -{ - return fill_label_hfill_; -} - - -void Row::fill_label_hfill(float f) -{ - fill_label_hfill_ = f; -} - - -bool Row::isParStart() const -{ - return !pos(); + return ascent_; } void Row::dump(const char * s) const { - lyxerr << s << " pos: " << pos_ << " width: " << width_ - << " height: " << height_ - << " fill: " << fill_ - << " ascent_of_text: " << ascent_of_text_ - << " top_of_text: " << top_of_text_ - << " y: " << y_ << std::endl; + lyxerr << s << " pos: " << pos_ << " end: " << end_ + << " width: " << width_ + << " ascent: " << ascent_ + << " descent: " << descent_ + << std::endl; } + +} // namespace lyx