4 * Purpose: Declaration of macro class for mathed
5 * Author: Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
6 * Created: November 1996
7 * Description: WYSIWYG math macros
11 * Copyright: 1996, 1997 Alejandro Aguilar Sierra
13 * Version: 0.2, Math & Lyx project.
15 * This code is under the GNU General Public Licence version 2 or later.
27 #include "math_inset.h"
28 #include "math_macroarg.h"
30 class MathMacroTemplate;
33 /** This class contains the data for a macro
34 \author Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
35 \version November 1996
37 class MathMacro : public MathInset {
39 /// A macro can be built from an existing template
40 explicit MathMacro(MathMacroTemplate const &);
42 void draw(Painter &, int, int);
44 void Metrics(MathStyles st);
46 MathInset * clone() const;
48 void Write(std::ostream &, bool fragile) const;
50 void WriteNormal(std::ostream &) const;
52 void dump(std::ostream & os) const;
55 bool idxUp(int &, int &) const;
57 bool idxDown(int &, int &) const;
59 bool idxLeft(int &, int &) const;
61 bool idxRight(int &, int &) const;
65 MathMacroTemplate const * const tmplate_;
71 inline std::ostream & operator<<(std::ostream & os, MathMacro const & m)