3 * \file InsetMathMacroArgument.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Alejandro Aguilar Sierra
10 * Full author contact details are available in file CREDITS.
13 #ifndef MATHMACROARGUMENT_H
14 #define MATHMACROARGUMENT_H
16 #include "InsetMath.h"
18 #include "support/docstring.h"
24 // A # that failed to parse
25 class InsetMathHash : public InsetMath {
27 explicit InsetMathHash(docstring const & str = docstring()) : str_('#' + str) {}
29 void metrics(MetricsInfo & mi, Dimension & dim) const override;
31 void draw(PainterInfo &, int x, int y) const override;
33 void normalize(NormalStream &) const override;
35 void write(TeXMathStream & os) const override;
38 Inset * clone() const override;
47 class InsetMathMacroArgument : public InsetMathHash {
49 /// Assumes 0 < number <= 9
50 explicit InsetMathMacroArgument(int number);
52 int number() const { return number_; }
53 /// Assumes 0 < n <= 9
54 void setNumber(int n);
56 InsetCode lyxCode() const override { return MATH_MACROARG_CODE; }
59 void normalize(NormalStream &) const override;
62 Inset * clone() const override;
63 /// A number between 1 and 9