]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_macro.h
further code uglification to make Jean-Marc's compiler happy
[lyx.git] / src / mathed / math_macro.h
index 24775e01632f7ae033bc508f9b8d616dc048dcc8..ed8067bde531c8f3c76905e04cd71a29f1024fcb 100644 (file)
@@ -24,7 +24,7 @@
 #include <vector>
 #include <iosfwd>
 
-#include "math_inset.h"
+#include "math_nestinset.h"
 #include "math_macroarg.h"
 
 class MathMacroTemplate;
@@ -34,47 +34,50 @@ class MathMacroTemplate;
     \author Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
     \version November 1996
  */
-class MathMacro : public MathInset {
+class MathMacro : public MathNestInset {
 public:
        /// A macro can be built from an existing template
        explicit MathMacro(MathMacroTemplate const &);
        ///
        MathMacro(MathMacro const &);
        ///
-       void draw(Painter &, int, int);
+       void draw(Painter &, int x, int y) const;
        ///
-       void Metrics(MathStyles st, int asc = 0, int des = 0);
+       void metrics(MathStyles st) const;
        ///
        MathInset * clone() const;
        ///
-       void Write(std::ostream &, bool fragile) const;
+       void write(std::ostream &, bool fragile) const;
        ///
-       void WriteNormal(std::ostream &) const;
+       void writeNormal(std::ostream &) const;
        ///
-       void dump(std::ostream & os) const;
+       void dump() const;
 
        ///
-       bool idxUp(int &, int &) const;
+       bool idxUp(unsigned int &, unsigned int &) const;
        ///
-       bool idxDown(int &, int &) const;
+       bool idxDown(unsigned int &, unsigned int &) const;
        ///
-       bool idxLeft(int &, int &) const;
+       bool idxLeft(unsigned int &, unsigned int &) const;
        ///
-       bool idxRight(int &, int &) const;
+       bool idxRight(unsigned int &, unsigned int &) const;
 
-private:
        ///
-       MathMacroTemplate const * const tmplate_;
+       void validate(LaTeXFeatures &) const;
        ///
-       MathXArray expanded_;
+       bool isMacro() const { return true; }
+
+private:
        ///
        void operator=(MathMacro const &);
+       ///
+       char const * name() const;
+
+       ///
+       MathMacroTemplate const * const tmplate_;
+       ///
+       mutable MathXArray expanded_;
 };
 
 
-inline std::ostream & operator<<(std::ostream & os, MathMacro const & m)
-{
-       m.dump(os);
-       return os;
-}
 #endif