3 * \file command_inset.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 "math_nestinset.h"
17 #include "insets/render_button.h"
20 /// Inset for things like \name[options]{contents}
21 class CommandInset : public MathNestInset {
24 explicit CommandInset(std::string const & name);
26 virtual std::auto_ptr<InsetBase> clone() const;
28 void metrics(MetricsInfo & mi, Dimension & dim) const;
30 void draw(PainterInfo & pi, int x, int y) const;
32 void write(WriteStream & os) const;
34 // void infoize(std::ostream & os) const;
36 virtual std::string const screenLabel() const;
37 /// generate something that will be understood by the Dialogs.
38 std::string const createDialogStr(std::string const & name) const;
40 std::string const & commandname() const { return name_; }
45 priv_dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos);
48 mutable bool set_label_;
49 mutable RenderButton button_;