]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathCommand.h
Introduce wide streams. This fixes the remaining problems of plain text
[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/render_button.h"
19
20
21 /// Inset for things like \name[options]{contents}
22 class CommandInset : public InsetMathNest {
23 public:
24         ///
25         explicit CommandInset(std::string const & name);
26         ///
27         void metrics(MetricsInfo & mi, Dimension & dim) const;
28         ///
29         void draw(PainterInfo & pi, int x, int y) const;
30         ///
31         InsetBase * editXY(LCursor &, int, int);
32         ///
33         void write(WriteStream & os) const;
34         //
35         // void infoize(std::ostream & os) const;
36         ///
37         virtual lyx::docstring const screenLabel() const;
38         /// generate something that will be understood by the Dialogs.
39         std::string const createDialogStr(std::string const & name) const;
40         ///
41         std::string const & commandname() const { return name_; }
42 private:
43         virtual std::auto_ptr<InsetBase> doClone() const;
44
45         ///
46         std::string name_;
47         ///
48         mutable bool set_label_;
49         ///
50         mutable RenderButton button_;
51 };
52
53 #endif