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_nestinset.h"
17 #include "support/std_string.h"
22 //class MathMacroTemplate : public MathInset, boost::noncopyable
24 /// This class contains the macro definition.
25 class MathMacroTemplate : public MathNestInset {
30 MathMacroTemplate(string const & name, int nargs, string const & type,
31 MathArray const & = MathArray(), MathArray const & = MathArray());
33 explicit MathMacroTemplate(std::istream & is);
35 virtual std::auto_ptr<InsetBase> clone() const;
37 void write(WriteStream & os) const;
38 /// Number of arguments
45 void draw(PainterInfo &, int x, int y) const;
47 void metrics(MetricsInfo & mi, Dimension & dim) const;
48 /// identifies macro templates
49 MathMacroTemplate * asMacroTemplate() { return this; }
50 /// identifies macro templates
51 MathMacroTemplate const * asMacroTemplate() const { return this; }
57 /// newcommand or renewcommand or def