]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathCommand.h
Cleanup headers
[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 InsetMathCommand : public InsetMathNest {
26 public:
27         ///
28         explicit InsetMathCommand(Buffer * buf, docstring const & name,
29                 bool needs_math_mode = true);
30         ///
31         marker_type marker(BufferView const *) const override { return marker_type::NO_MARKER; }
32         ///
33         void metrics(MetricsInfo & mi, Dimension & dim) const override;
34         ///
35         void draw(PainterInfo & pi, int x, int y) const override;
36         ///
37         Inset * editXY(Cursor &, int, int) override;
38         ///
39         void write(WriteStream & os) const override;
40         //
41         // void infoize(odocstream & os) const;
42         ///
43         virtual docstring const screenLabel() const;
44         ///
45         docstring const & commandname() const { return name_; }
46         ///
47         bool isActive() const override { return false; }
48
49 private:
50         Inset * clone() const override;
51
52         ///
53         docstring name_;
54         ///
55         bool needs_math_mode_;
56         ///
57         mutable bool set_label_;
58         ///
59         mutable RenderButton button_;
60 };
61
62
63 } // namespace lyx
64
65 #endif