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 //~MathMacroTemplate();
27 void draw(Painter &, int, int);
31 void WriteDef(std::ostream &, bool fragile);
32 /// useful for special insets
33 void setTCode(MathedTextCodes t);
35 MathedTextCodes getTCode() const;
37 void setArgument(MathedArray *, int i= 0);
38 /// Number of arguments
39 int getNoArgs() const;
41 void GetMacroXY(int, int &, int &) const;
43 MathParInset * getMacroPar(int) const;
45 void SetMacroFocus(int &, int, int);
47 void setEditMode(bool);
49 /// Replace the appropriate arguments with a specific macro's data
50 void update(MathMacro * m = 0);
57 MathedTextCodes tcode_;
59 std::vector<MathMacroArgument> args_;
66 short MathMacroTemplate::flags() const {