]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_macrotable.h
Fix math cursor positioning bug
[lyx.git] / src / mathed / math_macrotable.h
index 1dfac3d71751536f88e27a275dfe57e9fd62e7d1..4deb1cfde193d0d48cde40648d339865a61fe1ba 100644 (file)
@@ -18,6 +18,7 @@
 
 class MathArray;
 
+
 ///
 class MacroData {
 public:
@@ -32,11 +33,11 @@ public:
        ///
        int numargs() const { return numargs_; }
        /// replace #1,#2,... by given MathAtom 0,1,..
-       void expand(MathArray const & from, MathArray & to) const;
+       void expand(std::vector<MathArray> const & from, MathArray & to) const;
 
 private:
        ///
-       std::string def_;       
+       std::string def_;
        ///
        int numargs_;
        ///
@@ -48,7 +49,8 @@ private:
 // either because they implement a feature of standard LaTeX or some
 // hack to display certain contents nicely.
 
-class MacroTable {
+class MacroTable : public std::map<std::string, MacroData>
+{
 public:
        /// Parse full "\def..." or "\newcommand..." or ...
        void insert(std::string const & definition);
@@ -63,13 +65,8 @@ public:
 
        /// the global list
        static MacroTable & globalMacros();
-
-private:
-       ///
-       typedef std::map<std::string, MacroData> table_type;
-
-       ///
-       table_type macros_;
+       /// the local list hack
+       //static MacroTable & localMacros();
 };
 
 #endif