]> git.lyx.org Git - lyx.git/blobdiff - src/PainterBase.h
Fix small bug in reading \set_color in lyxrc
[lyx.git] / src / PainterBase.h
index ab05dda52249385ae08e6a8a62313652a0ca74c9..22f3a0782b0539b5b478962f2815c7c8523b9735 100644 (file)
@@ -8,8 +8,6 @@
  *
  *======================================================*/
 
-#ifdef USE_PAINTER
-
 #ifndef PAINTERBASE_H
 #define PAINTERBASE_H
 
@@ -22,7 +20,6 @@
 
 class WorkArea;
 class LyXFont;
-class LyXScreen;
 
 /** A painter class to encapsulate all graphics parameters and operations
    
@@ -59,16 +56,18 @@ public:
        };
 
        ///
-       PainterBase(WorkArea & wa) : owner(wa) {}
+       explicit PainterBase(WorkArea & wa) : owner(wa) {}
        
        ///
        virtual ~PainterBase() {}
 
        /** Screen geometry */
        ///
-       int paperMargin();
+       int paperMargin() const;
+       ///
+       int paperWidth() const;
        ///
-       int paperWidth();
+       int paperHeight() const;
        
        /**@Basic drawing routines */
        /// Draw a line from point to point
@@ -164,16 +163,6 @@ public:
        /// 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);
-
-       /** Get the width of text
-           This is just for fast width */
-       int width(char const * s, int l, LyXFont const & f);
-
-       /// Get the width of text
-       int width(char c, LyXFont const & f);
-
        /** Draws a string and encloses it inside a rectangle. Returns
            the size of the rectangle. If draw is false, we only calculate
            the size. */
@@ -194,13 +183,8 @@ public:
                             int & width = PainterBase::dummy1,
                             int & ascent = PainterBase::dummy2, 
                             int & descent = PainterBase::dummy3);
-       /// This is preliminary
-       //BufferView const * getOwner() const {  return &owner; }
-
-private:
+protected:
        WorkArea & owner;
 };
 
 #endif
-
-#endif