]> git.lyx.org Git - lyx.git/blobdiff - src/MetricsInfo.h
* gcc does not like missing characters in keywords
[lyx.git] / src / MetricsInfo.h
index fc62d226da0e4a0b9fa38d2e0b42b6439bfcaf8c..5bb93b6e8c4fdc156e668c56c8d9d17bb7ad55d3 100644 (file)
 #ifndef METRICSINFO_H
 #define METRICSINFO_H
 
-#include "Font.h"
-#include "support/docstring.h"
+#include "ColorCode.h"
+#include "FontInfo.h"
+
+#include "support/strfwd.h"
+#include "support/types.h"
+
 #include <string>
 
 class BufferView;
@@ -44,12 +48,12 @@ public:
        ///
        MetricsBase();
        ///
-       MetricsBase(BufferView * bv, Font const & font, int textwidth);
+       MetricsBase(BufferView * bv, FontInfo const & font, int textwidth);
 
        /// the current view
        BufferView * bv;
        /// current font
-       Font font;
+       FontInfo font;
        /// current math style (display/text/script/..)
        Styles style;
        /// name of current font - mathed specific
@@ -68,7 +72,7 @@ public:
        ///
        MetricsInfo();
        ///
-       MetricsInfo(BufferView * bv, Font const & font, int textwidth);
+       MetricsInfo(BufferView * bv, FontInfo const & font, int textwidth);
 
        ///
        MetricsBase base;
@@ -98,6 +102,8 @@ public:
        bool erased_;
        ///
        bool full_repaint;
+       ///
+       ColorCode background_color;
 };
 
 class TextMetricsInfo {};
@@ -149,10 +155,10 @@ protected:
 
 
 // temporarily change some aspect of a font
-class FontChanger : public Changer<Font> {
+class FontChanger : public Changer<FontInfo> {
 public:
        ///
-       FontChanger(Font & orig, docstring const & font);
+       FontChanger(FontInfo & orig, docstring const & font);
        FontChanger(MetricsBase & mb, char const * const font);
        ///
        ~FontChanger();
@@ -206,10 +212,10 @@ public:
 
 
 // temporarily change the shape of a font
-class ShapeChanger : public Changer<Font, Font::FONT_SHAPE> {
+class ShapeChanger : public Changer<FontInfo, FontShape> {
 public:
        ///
-       ShapeChanger(Font & font, Font::FONT_SHAPE shape);
+       ShapeChanger(FontInfo & font, FontShape shape);
        ///
        ~ShapeChanger();
 };
@@ -227,10 +233,10 @@ public:
 
 
 // temporarily change the used color
-class ColorChanger : public Changer<Font, std::string> {
+class ColorChanger : public Changer<FontInfo, std::string> {
 public:
        ///
-       ColorChanger(Font & font, std::string const & color);
+       ColorChanger(FontInfo & font, std::string const & color);
        ///
        ~ColorChanger();
 };