These are the changes I have in my tree now:

Index: PainterBase.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/PainterBase.C,v
retrieving revision 1.10
diff -u -p -r1.10 PainterBase.C
--- PainterBase.C       30 Jul 2001 11:55:47 -0000      1.10
+++ PainterBase.C       13 Mar 2002 12:23:00 -0000
@@ -18,9 +18,6 @@
 #include "WorkArea.h"
 #include "font.h"
 
-int PainterBase::dummy1 = 0;
-int PainterBase::dummy2 = 0;
-int PainterBase::dummy3 = 0;
 
 int PainterBase::paperMargin() const
 {
@@ -67,23 +64,23 @@ PainterBase & PainterBase::buttonFrame(i
 {
        //  Width of a side of the button
        int d = 2;
-
+       
        fillRectangle(x, y, w, d, LColor::top);
        fillRectangle(x, (y+h-d), w, d, LColor::bottom);
- 
+       
        // Now a couple of trapezoids
        int x1[4], y1[4];
- 
-       x1[0] = x+d;   y1[0] = y+d;
-       x1[1] = x+d;   y1[1] = (y+h-d);
-       x1[2] = x;     y1[2] = y+h;
+       
+       x1[0] = x + d;   y1[0] = y + d;
+       x1[1] = x + d;   y1[1] = (y + h - d);
+       x1[2] = x;     y1[2] = y + h;
        x1[3] = x;     y1[3] = y;
        fillPolygon(x1, y1, 4, LColor::left);
 
-       x1[0] = (x+w-d); y1[0] = y+d;
-       x1[1] = (x+w-d); y1[1] = (y+h-d);
-       x1[2] = x+w; y1[2] = (y+h-d);
-       x1[3] = x+w; y1[3] = y;
+       x1[0] = (x + w - d); y1[0] = y + d;
+       x1[1] = (x + w - d); y1[1] = (y + h - d);
+       x1[2] = x + w; y1[2] = (y + h - d);
+       x1[3] = x + w; y1[3] = y;
        fillPolygon(x1, y1, 4, LColor::right);
 
        return *this;
Index: PainterBase.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/PainterBase.h,v
retrieving revision 1.17
diff -u -p -r1.17 PainterBase.h
--- PainterBase.h       27 Feb 2002 09:59:49 -0000      1.17
+++ PainterBase.h       13 Mar 2002 12:23:00 -0000
@@ -36,13 +36,6 @@ namespace grfx {
  
  */
 class PainterBase {
-protected:
-        ///
-       static int dummy1;
-       ///
-       static int dummy2;
-       ///
-       static int dummy3;
 public:
        ///
        enum line_width {
@@ -51,7 +44,7 @@ public:
                ///
                line_thick
        };
-
+       
        ///
        enum line_style {
                ///
@@ -61,13 +54,13 @@ public:
                ///
                line_onoffdash
        };
-
+       
        ///
        explicit PainterBase(WorkArea & wa) : owner(wa) {}
        
        ///
        virtual ~PainterBase() {}
-
+       
        /* Screen geometry */
        ///
        int paperMargin() const;
@@ -82,7 +75,7 @@ public:
                LColor::color = LColor::foreground,
                enum line_style = line_solid,
                enum line_width = line_thin) = 0;
-
+       
        /** Draw the lines between the lines in xp and yp.
            xp and yp are arrays of points, and np is the
            number of them. */
@@ -91,13 +84,13 @@ public:
                LColor::color = LColor::foreground,
                enum line_style = line_solid,
                enum line_width = line_thin) = 0;
-
+       
        /// Here xp and yp are arrays of points
        virtual PainterBase & fillPolygon(
                int const * xp, int const * yp,
                int np,
                LColor::color = LColor::foreground) = 0;
-
+       
        /// Draw lines from x1,y1 to x2,y2. They are arrays
         virtual PainterBase & segments(
                int const * x1, int const * y1, 
@@ -117,7 +110,7 @@ public:
        virtual PainterBase & circle(
                int x, int y, unsigned int d,
                LColor::color = LColor::foreground);
-
+       
        /// Draw an ellipse
        virtual PainterBase & ellipse(
                int x, int y,
@@ -143,7 +136,7 @@ public:
        
        /// A filled rectangle with the shape of a 3D button
        virtual PainterBase & button(int x, int y, int w, int h);
-
+       
        /// 
         virtual PainterBase & buttonFrame(int x, int y, int w, int h);
        
@@ -155,22 +148,22 @@ public:
        /// Draw a string at position x, y (y is the baseline)
        virtual PainterBase & text(int x, int y,
                                   string const & str, LyXFont const & f) = 0;
-
+       
        /** Draw a string at position x, y (y is the baseline)
            This is just for fast drawing */
        virtual PainterBase & text(int x, int y, char const * str, size_t l,
-                      LyXFont const & f) = 0;
-
+                                  LyXFont const & f) = 0;
+       
        /// Draw a char at position x, y (y is the baseline)
        virtual PainterBase & text(int x, int y, char c, LyXFont const & f)=0;
-
+       
        /** Draws a string and encloses it inside a rectangle. */
        PainterBase & rectText(int x, int baseline, 
                               string const & string, 
                               LyXFont const & font,
                               LColor::color back,
                               LColor::color frame);
-
+       
        /** Draw a string and encloses it inside a button frame. */
        PainterBase & buttonText(int x, int baseline, string const & s,
                                 LyXFont const & font);
Index: Painter.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/Painter.C,v
retrieving revision 1.32
diff -u -p -r1.32 Painter.C
--- Painter.C   27 Feb 2002 09:59:48 -0000      1.32
+++ Painter.C   13 Mar 2002 12:23:00 -0000
@@ -34,9 +34,11 @@
 
 #include <cmath>
 
+
 using std::endl;
 using std::max;
 
+
 Painter::Painter(WorkArea & wa)
        : PainterBase(wa)
 {
@@ -55,9 +57,9 @@ PainterBase & Painter::point(int x, int 
 
 
 PainterBase & Painter::line(int x1, int y1, int x2, int y2,
-                       LColor::color col,
-                       enum line_style ls,
-                       enum line_width lw)
+                           LColor::color col,
+                           enum line_style ls,
+                           enum line_width lw)
 {
        XDrawLine(display, owner.getPixmap(), 
                  lyxColorHandler->getGCLinepars(ls, lw, col),
@@ -72,16 +74,16 @@ PainterBase & Painter::lines(int const *
                             enum line_width lw)
 {
        boost::scoped_array<XPoint> points(new XPoint[np]);
-
+       
        for (int i = 0; i < np; ++i) {
                points[i].x = xp[i];
                points[i].y = yp[i];
        }
-
+       
         XDrawLines(display, owner.getPixmap(),
                   lyxColorHandler->getGCLinepars(ls, lw, col), 
                   points.get(), np, CoordModeOrigin);
-
+       
        return *this;
 }      
 
@@ -99,7 +101,7 @@ PainterBase & Painter::rectangle(int x, 
 
 
 PainterBase & Painter::fillRectangle(int x, int y, int w, int h,
-                                LColor::color col)
+                                    LColor::color col)
 {
        XFillRectangle(display, owner.getPixmap(),
                       lyxColorHandler->getGCForeground(col), x, y, w, h);
@@ -108,26 +110,26 @@ PainterBase & Painter::fillRectangle(int
 
 
 PainterBase & Painter::fillPolygon(int const * xp, int const * yp, int np,
-                              LColor::color col)
+                                  LColor::color col)
 {
        boost::scoped_array<XPoint> points(new XPoint[np]);
-
+       
        for (int i = 0; i < np; ++i) {
                points[i].x = xp[i];
                points[i].y = yp[i];
        }
-
+       
        XFillPolygon(display, owner.getPixmap(),
                     lyxColorHandler->getGCForeground(col), points.get(), np, 
                     Nonconvex, CoordModeOrigin);
-
+       
        return *this;
 }      
 
 
 PainterBase & Painter::arc(int x, int y,
-                 unsigned int w, unsigned int h,
-                 int a1, int a2, LColor::color col)
+                          unsigned int w, unsigned int h,
+                          int a1, int a2, LColor::color col)
 {
         XDrawArc(display, owner.getPixmap(),
                 lyxColorHandler->getGCForeground(col),
@@ -138,12 +140,12 @@ PainterBase & Painter::arc(int x, int y,
 
 /// Draw lines from x1,y1 to x2,y2. They are arrays
 PainterBase & Painter::segments(int const * x1, int const * y1, 
-                           int const * x2, int const * y2, int ns,
-                           LColor::color col,
-                           enum line_style ls, enum line_width lw)
+                               int const * x2, int const * y2, int ns,
+                               LColor::color col,
+                               enum line_style ls, enum line_width lw)
 {
        boost::scoped_array<XSegment> s(new XSegment[ns]);
-
+       
        for (int i = 0; i < ns; ++i) {
                s[i].x1 = x1[i];
                s[i].y1 = y1[i];
@@ -153,7 +155,7 @@ PainterBase & Painter::segments(int cons
        XDrawSegments(display, owner.getPixmap(),
                      lyxColorHandler->getGCLinepars(ls, lw, col),
                      s.get(), ns);
-
+       
        return *this;
 }
 
@@ -172,7 +174,7 @@ PainterBase & Painter::pixmap(int x, int
 
 
 PainterBase & Painter::image(int x, int y, int w, int h,
-                           grfx::GImage const & image)
+                            grfx::GImage const & image)
 {
        return pixmap(x, y, w, h, image.getPixmap());
 }
@@ -192,7 +194,7 @@ PainterBase & Painter::text(int x, int y
 
 
 PainterBase & Painter::text(int x, int y, char const * s, size_t ls,
-                       LyXFont const & f)
+                           LyXFont const & f)
 {
        if (lyxrc.font_norm_type == LyXRC::ISO_10646_1) {
                boost::scoped_array<XChar2b> xs(new XChar2b[ls]);
@@ -213,7 +215,7 @@ PainterBase & Painter::text(int x, int y
                text(x , y, xs.get(), ls, font);
                return *this;
        }
-
+       
        GC gc = lyxColorHandler->getGCForeground(f.realColor());
        if (f.realShape() != LyXFont::SMALLCAPS_SHAPE) {
                lyxfont::XSetFont(display, gc, f);
@@ -237,7 +239,7 @@ PainterBase & Painter::text(int x, int y
                        }
                }
        }
-
+       
        if (f.underbar() == LyXFont::ON) {
                underline(f, x, y, lyxfont::width(s, ls, f));
        }
@@ -247,7 +249,7 @@ PainterBase & Painter::text(int x, int y
 
 
 PainterBase & Painter::text(int x, int y, XChar2b const * s, int ls,
-                       LyXFont const & f)
+                           LyXFont const & f)
 {
        GC gc = lyxColorHandler->getGCForeground(f.realColor());
        if (f.realShape() != LyXFont::SMALLCAPS_SHAPE) {
Index: Painter.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/Painter.h,v
retrieving revision 1.21
diff -u -p -r1.21 Painter.h
--- Painter.h   27 Feb 2002 09:59:48 -0000      1.21
+++ Painter.h   13 Mar 2002 12:23:00 -0000
@@ -26,7 +26,6 @@ class LyXFont;
 class WorkArea;
 
 /** An inplementation for the X Window System. Xlib.
-    
     Classes similar to this one can be made for gtk+, Qt, etc.
 */
 class Painter : public PainterBase {
@@ -79,9 +78,6 @@ public:
        PainterBase & image(int x, int y, int w, int h,
                            grfx::GImage const & image);
        
-       /// For the figinset
-       PainterBase & pixmap(int x, int y, int w, int h, Pixmap bitmap);
-       
        /// Draw a string at position x, y (y is the baseline)
        PainterBase & text(int x, int y,
                           string const & str, LyXFont const & f);
@@ -93,11 +89,14 @@ public:
        
        /// Draw a char at position x, y (y is the baseline)
        PainterBase & text(int x, int y, char c, LyXFont const & f);
-
+       
        /// Draw a wide string at position x, y
        PainterBase & text(int x, int y, XChar2b const * str, int l,
-                  LyXFont const & f);  
+                          LyXFont const & f);  
 private:
+       /// For the figinset
+       PainterBase & pixmap(int x, int y, int w, int h, Pixmap bitmap);
+       
        /// Check the font, and if set, draw an underline
        void underline(LyXFont const & f, int x, int y, int width);
        

-- 
        Lgb

Reply via email to