class WorkArea;
class LyXFont;
-//class LyXScreen;
/** A painter class to encapsulate all graphics parameters and operations
};
///
- PainterBase(WorkArea & wa) : owner(wa) {}
+ explicit PainterBase(WorkArea & wa) : owner(wa) {}
///
virtual ~PainterBase() {}
int paperMargin() const;
///
int paperWidth() const;
+ ///
+ int paperHeight() const;
/**@Basic drawing routines */
/// Draw a line from point to point
/// Draw a char at position x, y (y is the baseline)
virtual PainterBase & text(int x, int y, char c, LyXFont const & f)=0;
- /// Get the width of text
- int width(string const & s, LyXFont const & f) const;
-
- /** Get the width of text
- This is just for fast width */
- int width(char const * s, int l, LyXFont const & f) const;
-
- /// Get the width of text
- int width(char c, LyXFont const & f) const;
-
/** Draws a string and encloses it inside a rectangle. Returns
the size of the rectangle. If draw is false, we only calculate
the size. */
int & width = PainterBase::dummy1,
int & ascent = PainterBase::dummy2,
int & descent = PainterBase::dummy3);
-private:
+protected:
WorkArea & owner;
};