#include "support/types.h"
+#include "Dimension.h"
+
namespace lyx {
///
Row(pos_type pos);
///
- void pos(pos_type p);
+ bool changed() const { return changed_; }
///
- pos_type pos() const;
+ void setChanged(bool c) { changed_ = c; }
///
- void endpos(pos_type p);
+ void setCrc(size_type crc);
///
- pos_type endpos() const;
+ void setSelection(pos_type sel_beg, pos_type sel_end);
+
///
- int height() const { return ascent_ + descent_; }
+ void pos(pos_type p);
///
- void width(int w);
+ pos_type pos() const { return pos_; }
///
- int width() const;
+ void endpos(pos_type p);
///
- void ascent(int b);
+ pos_type endpos() const { return end_; }
///
- int ascent() const;
+ void setDimension(Dimension const & dim);
///
- void descent(int b) { descent_ = b; }
+ Dimension const & dimension() const { return dim_; }
///
- int descent() const { return descent_; }
- /// current debugging only
- void dump(const char * = "") const;
-
-private:
- /// first pos covered by this row
- pos_type pos_;
- /// one behind last pos covered by this row
- pos_type end_;
+ int height() const { return dim_.height(); }
///
- int ascent_;
+ int width() const { return dim_.wid; }
///
- int descent_;
+ int ascent() const { return dim_.asc; }
///
- int width_;
-};
+ int descent() const { return dim_.des; }
+ /// current debugging only
+ void dump(char const * = "") const;
-class RowMetrics {
-public:
- RowMetrics();
/// width of a separator (i.e. space)
double separator;
/// width of hfills in the body
double label_hfill;
/// the x position of the row
double x;
+ ///
+ pos_type sel_beg;
+ ///
+ pos_type sel_end;
+private:
+ /// has the Row appearance changed since last drawing?
+ bool changed_;
+ /// CRC of row contents.
+ size_type crc_;
+ /// first pos covered by this row
+ pos_type pos_;
+ /// one behind last pos covered by this row
+ pos_type end_;
+ /// Row dimension.
+ Dimension dim_;
};
-
} // namespace lyx
#endif