]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/Painter.C
enable Font cache only for MacOSX and inline width() for other platform.
[lyx.git] / src / frontends / Painter.C
index 9a1eab791214ebc18602cf56a66ccf2372f6c18b..757d85188620169e1672a0dd8bd5b3b36be5bd43 100644 (file)
 
 #include "Painter.h"
 #include "font_metrics.h"
-#include "WorkArea.h"
 
 #include "LColor.h"
 #include "lyxfont.h"
 
+using lyx::docstring;
+
 using std::max;
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 void Painter::button(int x, int y, int w, int h)
 {
@@ -47,7 +50,7 @@ void Painter::buttonFrame(int x, int y, int w, int h)
 
 
 void Painter::rectText(int x, int y,
-       string const & str,
+       docstring const & str,
        LyXFont const & font,
        LColor_color back,
        LColor_color frame)
@@ -69,7 +72,7 @@ void Painter::rectText(int x, int y,
 }
 
 
-void Painter::buttonText(int x, int y, string const & str, LyXFont const & font)
+void Painter::buttonText(int x, int y, docstring const & str, LyXFont const & font)
 {
        int width;
        int ascent;
@@ -92,3 +95,6 @@ void Painter::underline(LyXFont const & f, int x, int y, int width)
        else
                fillRectangle(x, y + below, width, below + height, f.color());
 }
+
+} // namespace frontend
+} // namespace lyx