]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathColor.h
* ca/Intro.lyx from Daniel
[lyx.git] / src / mathed / InsetMathColor.h
index 08495b364d76a83b1683c8f5ffcfd8de54b51cf5..c09e14a117e5b02af1886123ced194694d1d5126 100644 (file)
@@ -26,33 +26,37 @@ public:
        /// Create a color inset from LaTeX color name
        InsetMathColor(Buffer * buf, bool oldstyle, docstring const & color);
        ///
-       void metrics(MetricsInfo & mi, Dimension & dim) const;
+       void metrics(MetricsInfo & mi, Dimension & dim) const override;
        /// we write extra braces in any case...
        /// FIXME Why? Are they necessary if oldstyle_ == false?
-       bool extraBraces() const { return true; }
+       bool extraBraces() const override { return true; }
        ///
-       void draw(PainterInfo & pi, int x, int y) const;
+       void draw(PainterInfo & pi, int x, int y) const override;
        /// we need package color
-       void validate(LaTeXFeatures & features) const;
+       void validate(LaTeXFeatures & features) const override;
+       /// we inherit the mode
+       mode_type currentMode() const override { return current_mode_; }
        ///
-       void write(WriteStream & os) const;
+       void write(TeXMathStream & os) const override;
        /// FIXME XHTML For now, we do nothing with color.
-       void mathmlize(MathStream &) const {}
+       void mathmlize(MathMLStream &) const override {}
        /// FIXME XHTML For now, we do nothing with color.
-       void htmlize(HtmlStream &) const {}
+       void htmlize(HtmlStream &) const override {}
        ///
        /// write normalized content
-       void normalize(NormalStream & ns) const;
+       void normalize(NormalStream & ns) const override;
        ///
-       void infoize(odocstream & os) const;
+       void infoize(odocstream & os) const override;
        ///
-       InsetCode lyxCode() const { return MATH_COLOR_CODE; }
+       InsetCode lyxCode() const override { return MATH_COLOR_CODE; }
 private:
-       virtual Inset * clone() const;
+       Inset * clone() const override;
        ///
        bool oldstyle_;
        /// Our color. Only valid LaTeX colors are allowed.
        docstring color_;
+       /// the inherited mode
+       mutable mode_type current_mode_;
 };