]> git.lyx.org Git - lyx.git/blobdiff - src/lyxrow.h
- Link against qt-mt333.lib which is what the current qt3 cvs produces
[lyx.git] / src / lyxrow.h
index b68b91b0764570aa23b21ad454a037fd168cd804..58329a13385e9359b50371e1ab36ca3252dbbda8 100644 (file)
@@ -29,85 +29,52 @@ public:
        ///
        lyx::pos_type pos() const;
        ///
-       void end(lyx::pos_type p);
+       void endpos(lyx::pos_type p);
        ///
-       lyx::pos_type end() const;
+       lyx::pos_type endpos() const;
        ///
-       void fill(int f);
+       int height() const { return ascent_ + descent_; }
        ///
-       int fill() const;
+       void width(int w);
        ///
-       void height(unsigned short h);
+       int width() const;
        ///
-       unsigned short height() const;
+       void ascent(int b);
        ///
-       void width(unsigned int w);
+       int ascent() const;
        ///
-       unsigned int width() const;
+       void descent(int b) { descent_ = b; }
        ///
-       void ascent_of_text(unsigned short a);
-       ///
-       unsigned short ascent_of_text() const;
-       ///
-       void top_of_text(unsigned int top);
-       ///
-       unsigned int top_of_text() const;
-       ///
-       void baseline(unsigned int b);
-       ///
-       unsigned int baseline() const;
-       /// return true if this row is the start of a paragraph
-       bool isParStart() const;
-       /// return the cached y position
-       unsigned int y() const;
-       /// cache the y position
-       void y(unsigned int newy);
-       ///
-       float x() const;
-       ///
-       void x(float);
-       ///
-       float fill_separator() const;
-       ///
-       void fill_separator(float);
-       ///
-       float fill_hfill() const;
-       ///
-       void fill_hfill(float);
-       ///
-       float fill_label_hfill() const;
-       ///
-       void fill_label_hfill(float);
+       int descent() const { return descent_; }
        /// current debugging only
        void dump(const char * = "") const;
+
 private:
        /// first pos covered by this row
        lyx::pos_type pos_;
        /// one behind last pos covered by this row
        lyx::pos_type end_;
-       /** what is missing to a full row. Can be negative.
-         Needed for hfills, flushright, block etc. */
-       mutable int fill_;
-       ///
-       unsigned short height_;
-       ///
-       unsigned int width_;
-       /// cached y position
-       unsigned int y_;
-       /// ascent from baseline including prelude space
-       unsigned short ascent_of_text_;
-       /// the top of the real text in the row
-       unsigned int top_of_text_;
-       ///
-       unsigned int baseline_;
-       /// offet from left border
-       float x_;
        ///
-       float fill_separator_;
+       int ascent_;
        ///
-       float fill_hfill_;
+       int descent_;
        ///
-       float fill_label_hfill_;
+       int width_;
 };
 
+
+class RowMetrics {
+public:
+       RowMetrics();
+       /// width of a separator (i.e. space)
+       double separator;
+       /// width of hfills in the body
+       double hfill;
+       /// width of hfills in the label
+       double label_hfill;
+       /// the x position of the row
+       double x;
+};
+
+
 #endif