]> git.lyx.org Git - lyx.git/blob - src/insets/InsetEnvironment.h
Whitespace cleanup
[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 "lyxlayout_ptr_fwd.h"
17
18
19 namespace lyx {
20
21 class InsetEnvironment : public InsetText {
22 public:
23         ///
24         InsetEnvironment(BufferParams const &, std::string const & name);
25         ///
26         docstring name() const { return name_; }
27         ///
28         void write(Buffer const & buf, std::ostream & os) const;
29         ///
30         void read(Buffer const & buf, Lexer & lex);
31         ///
32         Inset::Code lyxCode() const { return Inset::ENVIRONMENT_CODE; }
33         ///
34         int latex(Buffer const &, odocstream &,
35                   OutputParams const &) const;
36         ///
37         int plaintext(Buffer const &, odocstream &,
38                       OutputParams const &) const;
39         ///
40         virtual docstring const editMessage() const;
41         ///
42         Inset::EDITABLE editable() const { return HIGHLY_EDITABLE; }
43         ///
44         Layout_ptr const & layout() const;
45         /** returns true if, when outputing LaTeX, font changes should
46             be closed before generating this inset. This is needed for
47             insets that may contain several paragraphs */
48         bool noFontChange() const { return true; }
49 protected:
50         InsetEnvironment(InsetEnvironment const &);
51 private:
52         virtual std::auto_ptr<Inset> doClone() const;
53         /// the layout
54         Layout_ptr layout_;
55         ///
56         docstring name_;
57 };
58
59
60 } // namespace lyx
61
62 #endif