]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathBox.h
nullptr
[lyx.git] / src / mathed / InsetMathBox.h
index 7138f25dce0c4b247df6290471e230df6ed7ca7c..898376583648135bb344f9f03d74b9b8464482a8 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.
  */
@@ -14,8 +14,6 @@
 
 #include "InsetMathNest.h"
 
-#include <string>
-
 
 namespace lyx {
 
@@ -23,24 +21,30 @@ namespace lyx {
 class InsetMathBox : public InsetMathNest {
 public:
        ///
-       explicit InsetMathBox(docstring const & name);
+       explicit InsetMathBox(Buffer * buf, docstring const & name);
+       ///
+       mode_type currentMode() const override { return TEXT_MODE; }
+       ///
+       void metrics(MetricsInfo & mi, Dimension & dim) const override;
+       ///
+       void draw(PainterInfo & pi, int x, int y) const override;
        ///
-       mode_type currentMode() const { return TEXT_MODE; }
+       void write(TeXMathStream & os) const override;
        ///
-       void metrics(MetricsInfo & mi, Dimension & dim) const;
+       void normalize(NormalStream & ns) const override;
        ///
-       void draw(PainterInfo & pi, int x, int y) const;
+       void mathmlize(MathMLStream & ms) const override;
        ///
-       void write(WriteStream & os) const;
+       void htmlize(HtmlStream & ms) const override;
        ///
-       void normalize(NormalStream & ns) const;
+       void infoize(odocstream & os) const override;
        ///
-       void infoize(odocstream & os) const;
+       void validate(LaTeXFeatures & features) const override;
        ///
-       void validate(LaTeXFeatures & features) const;
+       InsetCode lyxCode() const override { return MATH_BOX_CODE; }
 
 private:
-       Inset * clone() const { return new InsetMathBox(*this); }
+       Inset * clone() const override { return new InsetMathBox(*this); }
        ///
        docstring name_;
 };
@@ -50,22 +54,30 @@ private:
 class InsetMathFBox : public InsetMathNest {
 public:
        ///
-       InsetMathFBox();
+       explicit InsetMathFBox(Buffer * buf);
        ///
-       mode_type currentMode() const { return TEXT_MODE; }
+       mode_type currentMode() const override { return TEXT_MODE; }
        ///
-       void metrics(MetricsInfo & mi, Dimension & dim) const;
+       marker_type marker(BufferView const *) const override { return marker_type::NO_MARKER; }
        ///
-       void draw(PainterInfo & pi, int x, int y) const;
+       void metrics(MetricsInfo & mi, Dimension & dim) const override;
        ///
-       void write(WriteStream & os) const;
+       void draw(PainterInfo & pi, int x, int y) const override;
+       ///
+       void write(TeXMathStream & os) const override;
        /// write normalized content
-       void normalize(NormalStream & ns) const;
+       void normalize(NormalStream & ns) const override;
+       ///
+       void mathmlize(MathMLStream & ms) const override;
+       ///
+       void htmlize(HtmlStream & ms) const override;
        ///
-       void infoize(odocstream & os) const;
+       void infoize(odocstream & os) const override;
+       ///
+       void validate(LaTeXFeatures & features) const override;
 private:
        ///
-       Inset * clone() const { return new InsetMathFBox(*this); }
+       Inset * clone() const override { return new InsetMathFBox(*this); }
 };
 
 
@@ -73,21 +85,27 @@ private:
 class InsetMathMakebox : public InsetMathNest {
 public:
        ///
-       InsetMathMakebox(bool framebox);
+       InsetMathMakebox(Buffer * buf, bool framebox);
        ///
-       void metrics(MetricsInfo & mi, Dimension & dim) const;
+       void metrics(MetricsInfo & mi, Dimension & dim) const override;
        ///
-       void draw(PainterInfo & pi, int x, int y) const;
+       void draw(PainterInfo & pi, int x, int y) const override;
        ///
-       void write(WriteStream & os) const;
+       void write(TeXMathStream & os) const override;
        /// write normalized content
-       void normalize(NormalStream & ns) const;
+       void normalize(NormalStream & ns) const override;
+       ///
+       void mathmlize(MathMLStream & ms) const override;
+       ///
+       void htmlize(HtmlStream & ms) const override;
+       ///
+       mode_type currentMode() const override { return TEXT_MODE; }
        ///
-       mode_type currentMode() const { return TEXT_MODE; }
+       void infoize(odocstream & os) const override;
        ///
-       void infoize(odocstream & os) const;
+       void validate(LaTeXFeatures & features) const override;
 private:
-       Inset * clone() const { return new InsetMathMakebox(*this); }
+       Inset * clone() const override { return new InsetMathMakebox(*this); }
        ///
        bool framebox_;
 };
@@ -98,21 +116,27 @@ private:
 class InsetMathBoxed : public InsetMathNest {
 public:
        ///
-       InsetMathBoxed();
+       explicit InsetMathBoxed(Buffer * buf);
+       ///
+       marker_type marker(BufferView const *) const override { return marker_type::NO_MARKER; }
+       ///
+       void validate(LaTeXFeatures & features) const override;
+       ///
+       void metrics(MetricsInfo & mi, Dimension & dim) const override;
        ///
-       void validate(LaTeXFeatures & features) const;
+       void draw(PainterInfo & pi, int x, int y) const override;
        ///
-       void metrics(MetricsInfo & mi, Dimension & dim) const;
+       void write(TeXMathStream & os) const override;
        ///
-       void draw(PainterInfo & pi, int x, int y) const;
+       void mathmlize(MathMLStream & ms) const override;
        ///
-       void write(WriteStream & os) const;
+       void htmlize(HtmlStream & ms) 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;
 private:
-       Inset * clone() const { return new InsetMathBoxed(*this); }
+       Inset * clone() const override { return new InsetMathBoxed(*this); }
 };