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 CommandInset : public InsetMathNest {
28 explicit CommandInset(Buffer * buf, docstring const & name,
29 bool needs_math_mode = true);
31 void metrics(MetricsInfo & mi, Dimension & dim) const;
33 void draw(PainterInfo & pi, int x, int y) const;
35 Inset * editXY(Cursor &, int, int);
37 void write(WriteStream & os) const;
39 // void infoize(odocstream & os) const;
41 virtual docstring const screenLabel() const;
43 docstring const & commandname() const { return name_; }
45 bool isActive() const { return false; }
48 virtual Inset * clone() const;
53 bool needs_math_mode_;
55 mutable bool set_label_;
57 mutable RenderButton button_;