]> git.lyx.org Git - lyx.git/blob - src/mathed/math_macrotemplate.h
macro handling cleanup
[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 //class MathMacroTemplate : public MathInset, boost::noncopyable
18
19 class MathMacroTemplate : public MathNestInset {
20 public:
21         ///
22         MathMacroTemplate();
23         ///
24         MathMacroTemplate(string const & name, int nargs,
25                 MathArray const & = MathArray(), MathArray const & = MathArray());
26         ///
27         explicit MathMacroTemplate(std::istream & is);
28         ///
29         MathInset * clone() const;
30         ///
31         void write(WriteStream & os) const;
32         /// Number of arguments
33         int numargs() const;
34         ///
35         void numargs(int);
36         ///
37         string const & name() const;
38         ///
39         void draw(MathPainterInfo &, int x, int y) const;
40         ///
41         void metrics(MathMetricsInfo & st) const;
42         /// identifies macro templates
43         MathMacroTemplate * asMacroTemplate() { return this; }
44 private:
45         ///
46         int numargs_;
47         ///
48         string name_;
49 };
50
51 #endif