A bit more re-organization.
[lyx.git] / src / mathed / CommandInset.h
blob770ecb388d78d6e98808d5a2446157599376a6f8
1 // -*- C++ -*-
2 /**
3 * \file CommandInset.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author André Pönitz
9 * Full author contact details are available in file CREDITS.
13 #ifndef COMMAND_INSET_H
14 #define COMMAND_INSET_H
16 #include "InsetMathNest.h"
18 #include "insets/RenderButton.h"
21 namespace lyx {
24 /// Inset for things like \name[options]{contents}
25 class CommandInset : public InsetMathNest {
26 public:
27 ///
28 explicit CommandInset(Buffer * buf, docstring const & name,
29 bool needs_math_mode = true);
30 ///
31 void metrics(MetricsInfo & mi, Dimension & dim) const;
32 ///
33 void draw(PainterInfo & pi, int x, int y) const;
34 ///
35 Inset * editXY(Cursor &, int, int);
36 ///
37 void write(WriteStream & os) const;
39 // void infoize(odocstream & os) const;
40 ///
41 virtual docstring const screenLabel() const;
42 ///
43 docstring const & commandname() const { return name_; }
44 ///
45 bool isActive() const { return false; }
47 private:
48 virtual Inset * clone() const;
50 ///
51 docstring name_;
52 ///
53 bool needs_math_mode_;
54 ///
55 mutable bool set_label_;
56 ///
57 mutable RenderButton button_;
61 } // namespace lyx
63 #endif