]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathMacro.h
last commit was incomplete... not sure how I managed this..
[lyx.git] / src / mathed / MathMacro.h
index 72453cd8eb3bd7c4ae10093ab20e9c6f38125642..c0a9c7d4c0386ed95ddd068d7ce27741a473e4cb 100644 (file)
@@ -14,9 +14,9 @@
 #define MATH_MACRO_H
 
 #include "InsetMathNest.h"
-#include "MathArray.h"
+#include "MathData.h"
 #include "InsetMathNest.h"
-#include "MathMacroTable.h"
+#include "MacroTable.h"
 
 
 namespace lyx {
@@ -37,22 +37,26 @@ public:
        void drawDecoration(PainterInfo & pi, int x, int y) const
        { drawMarkers2(pi, x, y); }
        ///
-       bool metrics(MetricsInfo & mi, Dimension & dim) const;
+       void metrics(MetricsInfo & mi, Dimension & dim) const;
        /// get cursor position
        void cursorPos(BufferView const & bv, CursorSlice const & sl,
                bool boundary, int & x, int & y) const;
        ///
-       InsetBase * editXY(Cursor & cur, int x, int y);
+       Inset * editXY(Cursor & cur, int x, int y);
        /// target pos when we enter the inset from the left by pressing "Right"
        bool idxFirst(Cursor &) const;
        /// target pos when we enter the inset from the right by pressing "Left"
        bool idxLast(Cursor &) const;
        ///
+       bool idxUpDown(Cursor & cur, bool up) const;
+       ///
        virtual bool notifyCursorLeaves(Cursor &);
        ///
        docstring name() const;
        ///
-       void setExpansion(MathArray const & exp, MathArray const & args) const;
+       int kerning() const { return kerning_; }
+       ///
+       void setExpansion(MathData const & exp, MathData const & args) const;
 
        ///
        void validate(LaTeXFeatures &) const;
@@ -69,18 +73,22 @@ public:
        void infoize2(odocstream &) const;
 
 private:
-       virtual std::auto_ptr<InsetBase> doClone() const;
+       virtual Inset * clone() const;
        ///
        void updateExpansion() const;
-       ///
-       void expand() const;
 
        /// name of macro
        docstring name_;
        /// the unexpanded macro defintition
-       mutable MathArray tmpl_;
+       mutable MathData tmpl_;
        /// the macro substituted with our args
-       mutable MathArray expanded_;
+       mutable MathData expanded_;
+       ///
+       mutable MacroData macroBackup_;
+       ///
+       mutable bool editing_;
+       ///
+       mutable int kerning_;
 };