]> git.lyx.org Git - lyx.git/blob - src/mathed/MathMacroArgument.h
bee2ccc7c8c7c440ab9233dbe4ad0bd1abb93f24
[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
19 namespace lyx {
20
21
22 /// A macro argument.
23 class MathMacroArgument : public InsetMath {
24 public:
25         ///
26         explicit MathMacroArgument(std::size_t);
27         ///
28         bool metrics(MetricsInfo & mi, Dimension & dim) const;
29         ///
30         void draw(PainterInfo &, int x, int y) const;
31         ///
32         std::size_t number() const { return number_; }
33         ///
34         Inset::Code lyxCode() const { return MATHMACROARG_CODE; }
35
36         ///
37         void normalize(NormalStream &) const;
38         ///
39         void write(WriteStream & os) const;
40
41 private:
42         virtual std::auto_ptr<Inset> doClone() const;
43         /// A number between 1 and 9
44         std::size_t number_;
45         ///
46         docstring str_;
47 };
48
49
50 } // namespace lyx
51
52 #endif