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(docstring const & name);
30 bool metrics(MetricsInfo & mi, Dimension & dim) const;
32 void draw(PainterInfo & pi, int x, int y) const;
34 Inset * editXY(Cursor &, int, int);
36 void write(WriteStream & os) const;
38 // void infoize(odocstream & os) const;
40 virtual docstring const screenLabel() const;
42 docstring const & commandname() const { return name_; }
44 bool isActive() const { return false; }
47 virtual std::auto_ptr<Inset> doClone() const;
52 mutable bool set_label_;
54 mutable RenderButton button_;