3 * \file InsetMathCommand.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.
13 #ifndef COMMAND_INSET_H
14 #define COMMAND_INSET_H
16 #include "InsetMathNest.h"
18 #include "insets/RenderButton.h"
24 /// Inset for things like \name[options]{contents}
25 class InsetMathCommand : public InsetMathNest {
28 explicit InsetMathCommand(Buffer * buf, docstring const & name,
29 bool needs_math_mode = true);
31 marker_type marker(BufferView const *) const override { return marker_type::NO_MARKER; }
33 void metrics(MetricsInfo & mi, Dimension & dim) const override;
35 void draw(PainterInfo & pi, int x, int y) const override;
37 Inset * editXY(Cursor &, int, int) override;
39 void write(TeXMathStream & os) const override;
41 // void infoize(odocstream & os) const;
43 virtual docstring const screenLabel() const;
45 docstring const & commandname() const { return name_; }
47 bool isActive() const override { return false; }
50 Inset * clone() const override;
55 bool needs_math_mode_;
57 mutable bool set_label_;
59 mutable RenderButton button_;