]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_macrotemplate.h
fix pullArg when pressing <Delete> at the end of an cell
[lyx.git] / src / mathed / math_macrotemplate.h
index a6a5743632cf2a554360f01e1e8e88e584616765..64283ab14c802e281a3e161d776a58b649a926a5 100644 (file)
@@ -1,10 +1,8 @@
 // -*- C++ -*-
-#ifndef MATHMACROTEMPLATE
-#define MATHMACROTEMPLATE
+#ifndef MATH_MACROTEMPLATE_H
+#define MATH_MACROTEMPLATE_H
 
-#include <set>
-
-#include "math_parinset.h"
+#include "math_inset.h"
 
 #ifdef __GNUG__
 #pragma interface
@@ -15,32 +13,31 @@ class MathMacro;
 /** This class contains the macro definition
     \author Alejandro Aguilar Sierra
  */
-//class MathMacroTemplate : public MathParInset, boost::noncopyable 
+//class MathMacroTemplate : public MathInset, boost::noncopyable 
 
-class MathMacroTemplate : public MathParInset {
+class MathMacroTemplate : public MathInset {
 public:
        ///
        MathMacroTemplate();
        ///
        MathMacroTemplate(string const & name, int nargs);
        ///
-       void WriteDef(std::ostream &, bool fragile) const;
+       MathInset * clone() const;
+       ///
+       void Write(std::ostream &, bool fragile) const;
        /// Number of arguments
-       int nargs() const;
+       int numargs() const;
+       ///
+       void numargs(int);
        ///
        void draw(Painter &, int, int);
        ///
-       void Metrics();
+       void Metrics(MathStyles st, int asc = 0, int des = 0);
 private:
        ///
-       int na_;
-       ///
-       std::set<MathMacro *> users_;
-
+       int numargs_;
        /// unimplemented
        void operator=(MathMacroTemplate const &);
-       /// unimplemented
-       MathMacroTemplate(MathMacroTemplate const &);
 };
 
 #endif