]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_spaceinset.h
Make Helge happy: no more crash on arrow up/down in math macro
[lyx.git] / src / mathed / math_spaceinset.h
index 10c72e3ff1681c72ee3d0506b90a8666b354605f..c6fad086d4a618d470f974d2fdf4da04a795f30a 100644 (file)
@@ -1,13 +1,19 @@
 // -*- C++ -*-
+/**
+ * \file math_spaceinset.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author André Pönitz
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
 #ifndef MATH_SPACEINSET_H
 #define MATH_SPACEINSET_H
 
 #include "math_inset.h"
-#include "math_defs.h"
 
-#ifdef __GNUG__
-#pragma interface
-#endif
 
 /// Smart spaces
 class MathSpaceInset : public MathInset {
@@ -15,20 +21,38 @@ public:
        ///
        explicit MathSpaceInset(int sp);
        ///
-       MathInset * clone() const;
+       explicit MathSpaceInset(std::string const & name);
        ///
-       void draw(Painter &, int, int);
+       MathSpaceInset const * asSpaceInset() const { return this; }
        ///
-       void write(std::ostream &, bool fragile) const;
+       MathSpaceInset * asSpaceInset() { return this; }
        ///
-       void writeNormal(std::ostream &) const;
+       void incSpace();
        ///
-       void metrics(MathStyles st);
+       int ascent() const;
        ///
-       bool isSpaceInset() const { return true; }
+       int descent() const;
        ///
-       void incSpace();
+       int width() const;
+       ///
+       void metrics(MetricsInfo & mi, Dimension & dim) const;
+       ///
+       void draw(PainterInfo & pi, int x, int y) const;
+
+       ///
+       void normalize(NormalStream &) const;
+       ///
+       void validate(LaTeXFeatures & features) const;
+       ///
+       void maple(MapleStream &) const;
+       ///
+       void mathematica(MathematicaStream &) const;
+       ///
+       void octave(OctaveStream &) const;
+       ///
+       void write(WriteStream & os) const;
 private:
+       virtual std::auto_ptr<InsetBase> doClone() const;
        ///
        int space_;
 };