]> 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 f1df47da597a7ea1fd14c807c7daf300036307c9..c6fad086d4a618d470f974d2fdf4da04a795f30a 100644 (file)
@@ -1,34 +1,58 @@
 // -*- 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 MathedInset {
+class MathSpaceInset : public MathInset {
 public:
        ///
-       MathSpaceInset(int sp, short ot = LM_OT_SPACE, short st = LM_ST_TEXT);
+       explicit MathSpaceInset(int sp);
+       ///
+       explicit MathSpaceInset(std::string const & name);
+       ///
+       MathSpaceInset const * asSpaceInset() const { return this; }
+       ///
+       MathSpaceInset * asSpaceInset() { return this; }
+       ///
+       void incSpace();
        ///
-       MathedInset * Clone();
+       int ascent() const;
+       ///
+       int descent() const;
+       ///
+       int width() const;
+       ///
+       void metrics(MetricsInfo & mi, Dimension & dim) const;
+       ///
+       void draw(PainterInfo & pi, int x, int y) const;
+
        ///
-       void draw(Painter &, int, int);
+       void normalize(NormalStream &) const;
        ///
-       void Write(std::ostream &, bool fragile);
+       void validate(LaTeXFeatures & features) const;
        ///
-       void WriteNormal(std::ostream &);
+       void maple(MapleStream &) const;
        ///
-       void Metrics();
+       void mathematica(MathematicaStream &) const;
        ///
-       void SetSpace(int sp);
+       void octave(OctaveStream &) const;
        ///
-       int GetSpace();
+       void write(WriteStream & os) const;
 private:
+       virtual std::auto_ptr<InsetBase> doClone() const;
        ///
        int space_;
 };