]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathColor.h
Set correctly the spacing between atoms in MathData
[lyx.git] / src / mathed / InsetMathColor.h
index 1c15c8e07d265c05601f35872347b10f23d9728b..829c4654f4b1db755395cebe7d47561a68cc5bfd 100644 (file)
@@ -4,7 +4,7 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author André Pönitz
+ * \author André Pönitz
  *
  * Full author contact details are available in file CREDITS.
  */
@@ -12,8 +12,6 @@
 #ifndef MATH_COLORINSET_H
 #define MATH_COLORINSET_H
 
-#include "Color.h"
-
 #include "InsetMathNest.h"
 
 
@@ -24,12 +22,11 @@ namespace lyx {
 class InsetMathColor : public InsetMathNest {
 public:
        /// Create a color inset from LyX color number
-       explicit InsetMathColor(bool oldstyle,
-               Color_color const & color = Color::none);
+       InsetMathColor(Buffer * buf, bool oldstyle, ColorCode color = Color_none);
        /// Create a color inset from LaTeX color name
-       explicit InsetMathColor(bool oldstyle, docstring const & color);
+       InsetMathColor(Buffer * buf, bool oldstyle, docstring const & color);
        ///
-       bool metrics(MetricsInfo & mi, Dimension & dim) const;
+       void metrics(MetricsInfo & mi, Dimension & dim) const;
        /// we write extra braces in any case...
        /// FIXME Why? Are they necessary if oldstyle_ == false?
        bool extraBraces() const { return true; }
@@ -39,12 +36,19 @@ public:
        void validate(LaTeXFeatures & features) const;
        ///
        void write(WriteStream & os) const;
+       /// FIXME XHTML For now, we do nothing with color.
+       void mathmlize(MathStream &) const {}
+       /// FIXME XHTML For now, we do nothing with color.
+       void htmlize(HtmlStream &) const {}
+       ///
        /// write normalized content
        void normalize(NormalStream & ns) const;
        ///
        void infoize(odocstream & os) const;
+       ///
+       InsetCode lyxCode() const { return MATH_COLOR_CODE; }
 private:
-       virtual std::auto_ptr<InsetBase> doClone() const;
+       virtual Inset * clone() const;
        /// width of '[' in current font
        mutable int w_;
        ///