2 #ifndef MATHMACROTEMPLATE
3 #define MATHMACROTEMPLATE
7 #include "math_parinset.h"
8 #include "math_macroarg.h"
12 /** This class contains the macro definition
13 \author Alejandro Aguilar Sierra
15 class MathMacroTemplate : public MathParInset {
17 /// A template constructor needs all the data
19 MathMacroTemplate(string const &, int na = 0, int f = 0);
23 void draw(Painter &, int, int);
27 void WriteDef(std::ostream &, bool fragile);
28 /// useful for special insets
29 void setTCode(MathedTextCodes t);
31 MathedTextCodes getTCode() const;
33 void setArgument(MathedArray *, int i= 0);
34 /// Number of arguments
35 int getNoArgs() const;
37 void GetMacroXY(int, int &, int &) const;
39 MathParInset * getMacroPar(int) const;
41 void SetMacroFocus(int &, int, int);
43 void setEditMode(bool);
45 /// Replace the appropriate arguments with a specific macro's data
46 void update(MathMacro * m = 0);
55 MathedTextCodes tcode_;
57 std::vector<MathMacroArgument> args_;