3 * \file InsetMathSpace.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
12 #ifndef MATH_SPACEINSET_H
13 #define MATH_SPACEINSET_H
15 #include "InsetMath.h"
17 #include "support/Length.h"
22 struct InsetSpaceParams;
25 class InsetMathSpace : public InsetMath {
28 explicit InsetMathSpace();
30 explicit InsetMathSpace(std::string const & name, std::string const & length);
32 explicit InsetMathSpace(Length const & length, bool const prot = false);
34 InsetMathSpace const * asSpaceInset() const override { return this; }
36 InsetMathSpace * asSpaceInset() override { return this; }
40 void metrics(MetricsInfo & mi, Dimension & dim) const override;
42 void draw(PainterInfo & pi, int x, int y) const override;
45 void normalize(NormalStream &) const override;
47 void validate(LaTeXFeatures & features) const override;
49 void maple(MapleStream &) const override;
51 void mathematica(MathematicaStream &) const override;
53 void octave(OctaveStream &) const override;
55 void mathmlize(MathMLStream & ms) const override;
57 void htmlize(HtmlStream & ms) const override;
59 void write(TeXMathStream & os) const override;
60 /// generate something that will be understood by the Dialogs.
61 InsetSpaceParams params() const;
63 bool hasSettings() const override { return true; }
65 bool clickable(BufferView const &, int, int) const override { return true; }
67 std::string contextMenuName() const override;
69 bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override;
71 InsetCode lyxCode() const override { return MATH_SPACE_CODE; }
75 void doDispatch(Cursor & cur, FuncRequest & cmd) override;
77 Inset * clone() const override;
79 bool isNegative() const;
82 /// amount of space for \\hspace