X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathColor.h;h=829c4654f4b1db755395cebe7d47561a68cc5bfd;hb=4c093a50c2aaebad1459991b90b625a8c00a69e8;hp=06ae60023d577f0b124259bd7c52c7b727d37d6b;hpb=e89625ef28143545a511cdabc67dee8b7be1b216;p=lyx.git diff --git a/src/mathed/InsetMathColor.h b/src/mathed/InsetMathColor.h index 06ae60023d..829c4654f4 100644 --- a/src/mathed/InsetMathColor.h +++ b/src/mathed/InsetMathColor.h @@ -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,19 +12,19 @@ #ifndef MATH_COLORINSET_H #define MATH_COLORINSET_H -#include "LColor.h" - #include "InsetMathNest.h" + +namespace lyx { + /// Change colours. class InsetMathColor : public InsetMathNest { public: /// Create a color inset from LyX color number - explicit InsetMathColor(bool oldstyle, - LColor_color const & color = LColor::none); + InsetMathColor(Buffer * buf, bool oldstyle, ColorCode color = Color_none); /// Create a color inset from LaTeX color name - explicit InsetMathColor(bool oldstyle, std::string const & color); + InsetMathColor(Buffer * buf, bool oldstyle, docstring const & color); /// void metrics(MetricsInfo & mi, Dimension & dim) const; /// we write extra braces in any case... @@ -36,18 +36,28 @@ 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(std::ostream & os) const; + void infoize(odocstream & os) const; + /// + InsetCode lyxCode() const { return MATH_COLOR_CODE; } private: - virtual std::auto_ptr doClone() const; + virtual Inset * clone() const; /// width of '[' in current font mutable int w_; /// bool oldstyle_; /// Our color. Only valid LaTeX colors are allowed. - std::string color_; + docstring color_; }; + +} // namespace lyx + #endif