]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/formulamacro.h
Fix math cursor positioning bug
[lyx.git] / src / mathed / formulamacro.h
index b13d26713e5a0b6958f2f1f7ee5aed2a6d0642ce..f55fdbffba71250194a14f4c8aba25846801d409 100644 (file)
 #ifndef INSET_FORMULA_MACRO_H
 #define INSET_FORMULA_MACRO_H
 
-#include "formulabase.h"
-
+#include "math_nestinset.h"
 
 class MathMacroTemplate;
+class LyXLex;
+
 
 // An InsetFormulaMacro only knows its name and asks the global
 // MathMacroTable if it needs to know more.
 
 /// Main LyX Inset for defining math macros
-class InsetFormulaMacro : public InsetFormulaBase {
+class InsetFormulaMacro : public MathNestInset {
 public:
        ///
        InsetFormulaMacro();
        /// construct a macro hull from its name and the number of arguments
-       explicit InsetFormulaMacro(std::string const & name, int nargs, std::string const & t);
+       InsetFormulaMacro(std::string const & name, int nargs, std::string const & t);
        /// constructs a mocro from its LaTeX definition
        explicit InsetFormulaMacro(std::string const & s);
        ///
@@ -53,18 +54,22 @@ public:
                    OutputParams const &) const;
 
        ///
-       virtual std::auto_ptr<InsetBase> clone() const;
+       std::auto_ptr<InsetBase> clone() const;
        ///
-       InsetOld::Code lyxCode() const;
+       InsetBase::Code lyxCode() const { return MATHMACRO_CODE; }
        ///
-       MathAtom const & par() const;
+       std::string const & getInsetName() const { return name_; }
        ///
-       MathAtom & par();
+       EDITABLE editable() const { return HIGHLY_EDITABLE; }
 private:
+       ///
+       MathAtom & tmpl() const;
        ///
        void read(std::istream & is);
        /// prefix in inset
        std::string prefix() const;
+       ///
+       std::string name_;
 };
 
 #endif