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/render_button.h"
21 /// Inset for things like \name[options]{contents}
22 class CommandInset : public InsetMathNest {
25 explicit CommandInset(std::string const & name);
27 void metrics(MetricsInfo & mi, Dimension & dim) const;
29 void draw(PainterInfo & pi, int x, int y) const;
31 InsetBase * editXY(LCursor &, int, int);
33 void write(WriteStream & os) const;
35 // void infoize(std::ostream & os) const;
37 virtual std::string const screenLabel() const;
38 /// generate something that will be understood by the Dialogs.
39 std::string const createDialogStr(std::string const & name) const;
41 std::string const & commandname() const { return name_; }
43 virtual std::auto_ptr<InsetBase> doClone() const;
48 mutable bool set_label_;
50 mutable RenderButton button_;