]> git.lyx.org Git - lyx.git/blob - src/insets/InsetEnvironment.h
Remove TextClassPtr without losing the type safety it provided.
[lyx.git] / src / insets / InsetEnvironment.h
1 // -*- C++ -*-
2 /**
3  * \file InsetEnvironment.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 #ifndef INSETENVIRONMENT_H
13 #define INSETENVIRONMENT_H
14
15 #include "InsetText.h"
16 #include "LayoutPtr.h"
17
18
19 namespace lyx {
20
21 class InsetEnvironment : public InsetText {
22 public:
23         ///
24         InsetEnvironment(BufferParams const &, docstring const & name);
25         ///
26         docstring name() const { return name_; }
27         ///
28         void write(std::ostream & os) const;
29         ///
30         void read(Lexer & lex);
31         ///
32         InsetCode lyxCode() const { return ENVIRONMENT_CODE; }
33         ///
34         int latex(odocstream &, OutputParams const &) const;
35         ///
36         int plaintext(odocstream &, OutputParams const &) const;
37         ///
38         docstring editMessage() const;
39         ///
40         Inset::EDITABLE editable() const { return HIGHLY_EDITABLE; }
41         ///
42         LayoutPtr const & layout() const;
43         /** returns true if, when outputing LaTeX, font changes should
44             be closed before generating this inset. This is needed for
45             insets that may contain several paragraphs */
46         bool noFontChange() const { return true; }
47 protected:
48         InsetEnvironment(InsetEnvironment const &);
49 private:
50         ///
51         Inset * clone() const;
52         /// the layout
53         LayoutPtr layout_;
54         ///
55         docstring name_;
56 };
57
58
59 } // namespace lyx
60
61 #endif