]> git.lyx.org Git - lyx.git/blob - src/mathed/command_inset.h
The std::string mammoth path.
[lyx.git] / src / mathed / command_inset.h
1 // -*- C++ -*-
2 /**
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.
6  *
7  * \author André Pönitz
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12
13 #ifndef COMMAND_INSET_H
14 #define COMMAND_INSET_H
15
16 #include "math_nestinset.h"
17 #include "insets/renderers.h"
18
19
20 /// Inset for things like \name[options]{contents}
21 class CommandInset : public MathNestInset {
22 public:
23         ///
24         explicit CommandInset(std::string const & name);
25         ///
26         virtual std::auto_ptr<InsetBase> clone() const;
27         ///
28         void metrics(MetricsInfo & mi, Dimension & dim) const;
29         ///
30         void draw(PainterInfo & pi, int x, int y) const;
31         ///
32         void write(WriteStream & os) const;
33         //
34         // void infoize(std::ostream & os) const;
35         ///
36         dispatch_result dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos);
37         ///
38         virtual std::string const screenLabel() const;
39         /// generate something that will be understood by the Dialogs.
40         std::string const createDialogStr(std::string const & name) const;
41
42         std::string const & commandname() const { return name_; }
43
44 private:
45         std::string name_;
46         mutable bool set_label_;
47         mutable ButtonRenderer button_;
48 };
49
50 #endif