]> git.lyx.org Git - lyx.git/blob - src/mathed/math_macroarg.h
float2string #4 (Spacing)
[lyx.git] / src / mathed / math_macroarg.h
1 // -*- C++ -*-
2 /**
3  * \file math_macroarg.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 "math_diminset.h"
17
18
19 /// A macro argument.
20 class MathMacroArgument : public MathDimInset {
21 public:
22         ///
23         explicit MathMacroArgument(std::size_t);
24         ///
25         void metrics(MetricsInfo & mi, Dimension & dim) const;
26         ///
27         void draw(PainterInfo &, int x, int y) const;
28         ///
29         std::size_t number() const { return number_; }
30         ///
31         InsetBase::Code lyxCode() const { return MATHMACROARG_CODE; }
32
33         ///
34         void normalize(NormalStream &) const;
35         ///
36         void write(WriteStream & os) const;
37
38 private:
39         virtual std::auto_ptr<InsetBase> doClone() const;
40         /// A number between 1 and 9
41         std::size_t number_;
42         ///
43         char str_[3];
44 };
45
46 #endif