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