]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_numberinset.h
Fix to bug 2362: Deleting superscript also deletes subscript.
[lyx.git] / src / mathed / math_numberinset.h
index 5f6d54a699e7ee784f8568bb380631577e87dc6b..c936b8d034470317feb64e575a24442f7a4869ed 100644 (file)
@@ -1,29 +1,33 @@
 // -*- C++ -*-
+/**
+ * \file math_numberinset.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_NUMBERINSET_H
 #define MATH_NUMBERINSET_H
 
-#include "math_diminset.h"
+#include "math_inset.h"
 
 
 /** Some inset that "is" a number
- *  maily for math-extern
- *  \author André Pönitz
- *
- * Full author contact details are available in file CREDITS
+ *  mainly for math-extern
  */
-
-class MathNumberInset : public MathDimInset {
+class MathNumberInset : public MathInset {
 public:
        ///
-       explicit MathNumberInset(string const & s);
-       ///
-       MathInset * clone() const;
+       explicit MathNumberInset(std::string const & s);
        ///
-       void metrics(MetricsInfo & st) const;
+       void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
        void draw(PainterInfo &, int x, int y) const;
        ///
-       string str() const { return str_; }
+       std::string str() const { return str_; }
        ///
        MathNumberInset * asNumberInset() { return this; }
 
@@ -39,7 +43,8 @@ public:
        void write(WriteStream & os) const;
 
 private:
+       virtual std::auto_ptr<InsetBase> doClone() const;
        /// the number as string
-       string str_;
+       std::string str_;
 };
 #endif