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