]> git.lyx.org Git - lyx.git/blob - src/mathed/MathMacroArgument.h
Coding style
[lyx.git] / src / mathed / MathMacroArgument.h
1 // -*- C++ -*-
2 /**
3  * \file MathMacroArgument.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 MATHMACROARGUMENT_H
14 #define MATHMACROARGUMENT_H
15
16 #include "InsetMath.h"
17
18 #include "support/docstring.h"
19
20
21 namespace lyx {
22
23
24 /// A macro argument.
25 class MathMacroArgument : public InsetMath {
26 public:
27         ///
28         explicit MathMacroArgument(int number);
29         ///
30         void metrics(MetricsInfo & mi, Dimension & dim) const;
31         ///
32         void draw(PainterInfo &, int x, int y) const;
33         ///
34         int number() const { return number_; }
35         ///
36         void setNumber(int n);
37         ///
38         InsetCode lyxCode() const { return MATHMACROARG_CODE; }
39
40         ///
41         void normalize(NormalStream &) const;
42         ///
43         void write(WriteStream & os) const;
44
45 private:
46         Inset * clone() const;
47         /// A number between 1 and 9
48         int number_;
49         ///
50         docstring str_;
51 };
52
53
54 } // namespace lyx
55
56 #endif