3 * \file math_macrotemplate.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Alejandro Aguilar Sierra
10 * Full author contact details are available in file CREDITS.
13 #ifndef MATH_MACROTEMPLATE_H
14 #define MATH_MACROTEMPLATE_H
16 #include "math_data.h"
17 #include "math_nestinset.h"
18 #include "support/std_string.h"
23 //class MathMacroTemplate : public MathInset, boost::noncopyable
25 /// This class contains the macro definition.
26 class MathMacroTemplate : public MathNestInset {
31 MathMacroTemplate(string const & name, int nargs, string const & type,
32 MathArray const & = MathArray(), MathArray const & = MathArray());
34 explicit MathMacroTemplate(std::istream & is);
36 virtual std::auto_ptr<InsetBase> clone() const;
38 void write(WriteStream & os) const;
39 /// Number of arguments
46 void draw(PainterInfo &, int x, int y) const;
48 void metrics(MetricsInfo & mi, Dimension & dim) const;
49 /// identifies macro templates
50 MathMacroTemplate * asMacroTemplate() { return this; }
51 /// identifies macro templates
52 MathMacroTemplate const * asMacroTemplate() const { return this; }
58 /// newcommand or renewcommand or def