2 #ifndef MATHMACROTEMPLATE
3 #define MATHMACROTEMPLATE
7 #include <boost/utility.hpp>
9 #include "math_parinset.h"
10 #include "math_macroarg.h"
18 /** This class contains the macro definition
19 \author Alejandro Aguilar Sierra
21 class MathMacroTemplate : public MathParInset, public noncopyable {
23 /// A template constructor needs all the data
25 MathMacroTemplate(string const &, int na);
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;
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);
50 /// Are we in edit mode or not?
53 MathedTextCodes tcode_;
55 std::vector<MathMacroArgument> args_;