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 MathMacro(MathMacro const &);
44 void draw(Painter &, int, int);
46 void metrics(MathStyles st);
48 MathInset * clone() const;
50 void write(std::ostream &, bool fragile) const;
52 void writeNormal(std::ostream &) const;
54 void dump(std::ostream & os) const;
57 bool idxUp(int &, int &) const;
59 bool idxDown(int &, int &) const;
61 bool idxLeft(int &, int &) const;
63 bool idxRight(int &, int &) const;
66 void validate(LaTeXFeatures &) const;
70 MathMacroTemplate const * const tmplate_;
74 void operator=(MathMacro const &);
78 inline std::ostream & operator<<(std::ostream & os, MathMacro const & m)