]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/Painter.h
Expand module names instead of buttons in settings
[lyx.git] / src / frontends / Painter.h
index 6bc46ec241b2caf6f632fdd3e83cc72cb0098334..7267839621b73f3f904f5c017a77a236eb430cb5 100644 (file)
@@ -13,8 +13,6 @@
 #ifndef PAINTER_H
 #define PAINTER_H
 
-#include "Color.h"
-
 #include "support/strfwd.h"
 
 namespace lyx {
@@ -55,11 +53,8 @@ namespace frontend {
 class Painter {
 public:
        Painter() : drawing_enabled_(true) {}
-       /// possible line widths
-       enum line_width {
-               line_thin, //< thin line
-               line_thick //< thick line
-       };
+
+       static const float thin_line;
 
        /// possible line styles
        enum line_style {
@@ -79,7 +74,7 @@ public:
 
        /// draw a line from point to point
        virtual void line(int x1, int y1, int x2, int y2, Color,
-               line_style = line_solid, line_width = line_thin) = 0;
+               line_style = line_solid, float line_width = thin_line) = 0;
 
        /**
         * lines -  draw a set of lines
@@ -88,11 +83,11 @@ public:
         * @param np size of the points array
         */
        virtual void lines(int const * xp, int const * yp, int np, Color,
-               line_style = line_solid, line_width = line_thin) = 0;
+               line_style = line_solid, float line_width = thin_line) = 0;
 
        /// draw a rectangle
        virtual void rectangle(int x, int y, int w, int h, Color,
-               line_style = line_solid, line_width = line_thin) = 0;
+               line_style = line_solid, float line_width = thin_line) = 0;
 
        /// draw a filled rectangle
        virtual void fillRectangle(int x, int y, int w, int h, Color) = 0;
@@ -129,6 +124,9 @@ public:
        */
        virtual int text(int x, int y, char_type c, FontInfo const & f) = 0;
 
+       /// draw the underbar, strikeout, uuline and uwave font attributes
+       virtual void textDecoration(FontInfo const & f, int x, int y, int width) = 0;
+
        /**
         * Draw a string and enclose it inside a rectangle. If
         * back color is specified, the background is cleared with
@@ -151,7 +149,8 @@ public:
                Color const & max) = 0;
        /// leave monochrome painting mode
        virtual void leaveMonochromeMode() = 0;
-
+       /// draws a wavy line that can be used for underlining.
+       virtual void wavyHorizontalLine(int x, int y, int width, ColorCode col) = 0;
 private:
        ///
        bool drawing_enabled_;