]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathCommand.h
Rename insets/insetxxx to insets/InsetXxx, part 1
[lyx.git] / src / mathed / InsetMathCommand.h
1 // -*- C++ -*-
2 /**
3  * \file InsetMathCommand.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 "InsetMathNest.h"
17
18 #include "insets/RenderButton.h"
19
20
21 namespace lyx {
22
23
24 /// Inset for things like \name[options]{contents}
25 class CommandInset : public InsetMathNest {
26 public:
27         ///
28         explicit CommandInset(docstring const & name);
29         ///
30         bool metrics(MetricsInfo & mi, Dimension & dim) const;
31         ///
32         void draw(PainterInfo & pi, int x, int y) const;
33         ///
34         InsetBase * editXY(LCursor &, int, int);
35         ///
36         void write(WriteStream & os) const;
37         //
38         // void infoize(odocstream & os) const;
39         ///
40         virtual docstring const screenLabel() const;
41         ///
42         docstring const & commandname() const { return name_; }
43 private:
44         virtual std::auto_ptr<InsetBase> doClone() const;
45
46         ///
47         docstring name_;
48         ///
49         mutable bool set_label_;
50         ///
51         mutable RenderButton button_;
52 };
53
54
55 } // namespace lyx
56
57 #endif