]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_macro.h
fix typo that put too many include paths for most people
[lyx.git] / src / mathed / math_macro.h
index d54f064acb54fdaa59bdfd8ebe7fccb7ad4c1a96..ee8059c03dc7d6409ec93883d656b4de651e309c 100644 (file)
@@ -1,8 +1,8 @@
 // -*- C++ -*-
 /*
  *  File:        math_macro.h
- *  Purpose:     Declaration of macro class for mathed 
- *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx> 
+ *  Purpose:     Declaration of macro class for mathed
+ *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
  *  Created:     November 1996
  *  Description: WYSIWYG math macros
  *
@@ -26,6 +26,7 @@
 
 #include "math_nestinset.h"
 #include "math_macroarg.h"
+#include "LString.h"
 
 class MathMacroTemplate;
 
@@ -37,50 +38,64 @@ class MathMacroTemplate;
 class MathMacro : public MathNestInset {
 public:
        /// A macro can be built from an existing template
-       explicit MathMacro(MathMacroTemplate const &);
+       explicit MathMacro(string const &);
        ///
        MathMacro(MathMacro const &);
        ///
        void draw(Painter &, int x, int y) const;
        ///
-       void metrics(MathStyles st) const;
+       void metrics(MathMetricsInfo const & st) const;
        ///
        MathInset * clone() const;
        ///
-       void write(std::ostream &, bool fragile) const;
+       void dump() const;
+
        ///
-       void writeNormal(std::ostream &) const;
+       bool idxUpDown(idx_type &, bool up) const;
        ///
-       void dump(std::ostream & os) const;
-
+       bool idxLeft(idx_type &, pos_type &) const;
        ///
-       bool idxUp(int &, int &) const;
+       bool idxRight(idx_type &, pos_type &) const;
+
        ///
-       bool idxDown(int &, int &) const;
+       void validate(LaTeXFeatures &) const;
        ///
-       bool idxLeft(int &, int &) const;
+       bool isMacro() const { return true; }
        ///
-       bool idxRight(int &, int &) const;
+       bool match(MathInset *) const { return false; }
 
        ///
-       void validate(LaTeXFeatures &) const;
+       void normalize(NormalStream &) const;
+       ///
+       void maplize(MapleStream &) const;
+       ///
+       void mathmlize(MathMLStream &) const;
+       ///
+       void octavize(OctaveStream &) const;
+       ///
+       void write(WriteStream & os) const;
 
 private:
        ///
        void operator=(MathMacro const &);
        ///
-       string const & name() const;
+       char const * name() const;
+       ///
+       bool defining() const;
+       ///
+       void updateExpansion() const;
+       ///
+       void expand() const;
 
        ///
-       MathMacroTemplate const * const tmplate_;
+       MathAtom & tmplate_;
        ///
        mutable MathXArray expanded_;
+       ///
+       mutable MathMetricsInfo mi_;
+       ///
+       mutable LyXFont font_;
 };
 
 
-inline std::ostream & operator<<(std::ostream & os, MathMacro const & m)
-{
-       m.dump(os);
-       return os;
-}
 #endif