]> git.lyx.org Git - lyx.git/blob - src/mathed/math_macrotemplate.h
Running Angus' rmcopyright.sh and hand-correcting a few cases.
[lyx.git] / src / mathed / math_macrotemplate.h
1 // -*- C++ -*-
2 #ifndef MATH_MACROTEMPLATE_H
3 #define MATH_MACROTEMPLATE_H
4
5 #include "math_nestinset.h"
6 #include "LString.h"
7
8 #ifdef __GNUG__
9 #pragma interface
10 #endif
11
12 class MathMacro;
13
14 /** This class contains the macro definition
15  *  \author Alejandro Aguilar Sierra
16  *
17  * Full author contact details are available in file CREDITS
18  */
19 //class MathMacroTemplate : public MathInset, boost::noncopyable
20
21 class MathMacroTemplate : public MathNestInset {
22 public:
23         ///
24         MathMacroTemplate();
25         ///
26         MathMacroTemplate(string const & name, int nargs,
27                 MathArray const & = MathArray(), MathArray const & = MathArray());
28         ///
29         explicit MathMacroTemplate(std::istream & is);
30         ///
31         MathInset * clone() const;
32         ///
33         void write(WriteStream & os) const;
34         /// Number of arguments
35         int numargs() const;
36         ///
37         void numargs(int);
38         ///
39         string name() const;
40         ///
41         void draw(MathPainterInfo &, int x, int y) const;
42         ///
43         void metrics(MathMetricsInfo & st) const;
44         /// identifies macro templates
45         MathMacroTemplate * asMacroTemplate() { return this; }
46         /// identifies macro templates
47         MathMacroTemplate const * asMacroTemplate() const { return this; }
48 private:
49         ///
50         int numargs_;
51         ///
52         string name_;
53 };
54
55 #endif