]> git.lyx.org Git - lyx.git/blob - src/mathed/math_macrotemplate.h
Finish the task of removing all cruft from the header files.
[lyx.git] / src / mathed / math_macrotemplate.h
1 // -*- C++ -*-
2 /**
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.
6  *
7  * \author Alejandro Aguilar Sierra
8  * \author André Pönitz
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef MATH_MACROTEMPLATE_H
14 #define MATH_MACROTEMPLATE_H
15
16 #include "math_data.h"
17 #include "math_nestinset.h"
18 #include "support/std_string.h"
19
20
21 class MathMacro;
22
23 //class MathMacroTemplate : public MathInset, boost::noncopyable
24
25 /// This class contains the macro definition.
26 class MathMacroTemplate : public MathNestInset {
27 public:
28         ///
29         MathMacroTemplate();
30         ///
31         MathMacroTemplate(string const & name, int nargs, string const & type,
32                 MathArray const & = MathArray(), MathArray const & = MathArray());
33         ///
34         explicit MathMacroTemplate(std::istream & is);
35         ///
36         virtual std::auto_ptr<InsetBase> clone() const;
37         ///
38         void write(WriteStream & os) const;
39         /// Number of arguments
40         int numargs() const;
41         ///
42         void numargs(int);
43         ///
44         string name() const;
45         ///
46         void draw(PainterInfo &, int x, int y) const;
47         ///
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; }
53 private:
54         ///
55         int numargs_;
56         ///
57         string name_;
58         /// newcommand or renewcommand or def
59         string type_;
60 };
61
62 #endif