]> git.lyx.org Git - lyx.git/blobdiff - src/PainterBase.h
I reactivate the code to resize the InsetText on a resize event of the main
[lyx.git] / src / PainterBase.h
index 237f7f13d1a9847e1c58877c0f1e851154fbd4ab..303bb157fb18e98c7dd2bcc312e8921b7513169f 100644 (file)
@@ -20,7 +20,9 @@
 
 class WorkArea;
 class LyXFont;
-class LyXImage;
+namespace grfx {
+       class GImage;
+}
 
 /** A painter class to encapsulate all graphics parameters and operations
    
@@ -147,8 +149,8 @@ public:
        
        
        // For the figure inset
-       virtual PainterBase & image(int x, int y, int w, int h, LyXImage const * image) = 0;
-
+       virtual PainterBase & image(int x, int y, int w, int h,
+                                   grfx::GImage const & image) = 0;
        
        /// Draw a string at position x, y (y is the baseline)
        virtual PainterBase & text(int x, int y,
@@ -162,43 +164,16 @@ 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;
 
-#if 0
-       /** Draws a string and encloses it inside a rectangle. Returns
-           the size of the rectangle. If draw is false, we only calculate
-           the size. */
-       virtual PainterBase & rectText(int x, int baseline, 
-                          string const & string, 
-                          LyXFont const & font,
-                          LColor::color back,
-                          LColor::color frame, bool draw = true,
-                          int & width = PainterBase::dummy1,
-                          int & ascent = PainterBase::dummy2, 
-                          int & descent = PainterBase::dummy3);
-
-       /** Draw a string and encloses it inside a button frame. Returns
-           the size of the frame. If draw is false, we only calculate
-           the size. */
-       virtual PainterBase & buttonText(int x, int baseline, string const & s,
-                            LyXFont const & font, bool draw = true,
-                            int & width = PainterBase::dummy1,
-                            int & ascent = PainterBase::dummy2, 
-                            int & descent = PainterBase::dummy3);
-#else
-       /** Draws a string and encloses it inside a rectangle. Returns
-           the size of the rectangle. If draw is false, we only calculate
-           the size. */
+       /** Draws a string and encloses it inside a rectangle. */
        PainterBase & rectText(int x, int baseline, 
-                          string const & string, 
-                          LyXFont const & font,
-                          LColor::color back,
+                              string const & string, 
+                              LyXFont const & font,
+                              LColor::color back,
                               LColor::color frame);
 
-       /** Draw a string and encloses it inside a button frame. Returns
-           the size of the frame. If draw is false, we only calculate
-           the size. */
+       /** Draw a string and encloses it inside a button frame. */
        PainterBase & buttonText(int x, int baseline, string const & s,
                                 LyXFont const & font);
-#endif
 protected:
        ///
        WorkArea & owner;