4 * \file command_inset.h
6 * This file is part of LyX, the document processor.
7 * Licence details can be found in the file COPYING.
11 * Full author contact details are available in file CREDITS.
15 #ifndef COMMAND_INSET_H
16 #define COMMAND_INSET_H
18 #include "math_nestinset.h"
19 #include "insets/renderers.h"
22 /// Inset for things like \name[options]{contents}
23 class CommandInset : public MathNestInset {
26 explicit CommandInset(string const & name);
28 virtual std::auto_ptr<InsetBase> clone() const;
30 void metrics(MetricsInfo & mi, Dimension & dim) const;
32 void draw(PainterInfo & pi, int x, int y) const;
34 void write(WriteStream & os) const;
36 // void infoize(std::ostream & os) const;
38 dispatch_result dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos);
40 virtual string const screenLabel() const;
41 /// generate something that will be understood by the Dialogs.
42 string const createDialogStr(string const & name) const;
44 string const & commandname() const { return name_; }
48 mutable bool set_label_;
49 mutable ButtonRenderer button_;