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/renderers.h"
20 /// Inset for things like \name[options]{contents}
21 class CommandInset : public MathNestInset {
24 explicit CommandInset(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 dispatch_result dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos);
38 virtual string const screenLabel() const;
39 /// generate something that will be understood by the Dialogs.
40 string const createDialogStr(string const & name) const;
42 string const & commandname() const { return name_; }
46 mutable bool set_label_;
47 mutable ButtonRenderer button_;