]> git.lyx.org Git - lyx.git/blob - src/mathed/math_macrotemplate.h
introduce namespace lyx::support
[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
9 class MathMacro;
10
11 /** This class contains the macro definition
12  *  \author Alejandro Aguilar Sierra
13  *
14  * Full author contact details are available in file CREDITS
15  */
16 //class MathMacroTemplate : public MathInset, boost::noncopyable
17
18 class MathMacroTemplate : public MathNestInset {
19 public:
20         ///
21         MathMacroTemplate();
22         ///
23         MathMacroTemplate(string const & name, int nargs,
24                 MathArray const & = MathArray(), MathArray const & = MathArray());
25         ///
26         explicit MathMacroTemplate(std::istream & is);
27         ///
28         InsetBase * clone() const;
29         ///
30         void write(WriteStream & os) const;
31         /// Number of arguments
32         int numargs() const;
33         ///
34         void numargs(int);
35         ///
36         string name() const;
37         ///
38         void draw(PainterInfo &, int x, int y) const;
39         ///
40         void metrics(MetricsInfo & mi, Dimension & dim) const;
41         /// identifies macro templates
42         MathMacroTemplate * asMacroTemplate() { return this; }
43         /// identifies macro templates
44         MathMacroTemplate const * asMacroTemplate() const { return this; }
45 private:
46         ///
47         int numargs_;
48         ///
49         string name_;
50 };
51
52 #endif