]> git.lyx.org Git - lyx.git/blob - src/insets/insetenv.h
* src/LyXAction.C: mark goto-clear-bookmark as working without buffer
[lyx.git] / src / insets / insetenv.h
1 // -*- C++ -*-
2 /**
3  * \file insetenv.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         void write(Buffer const & buf, std::ostream & os) const;
27         ///
28         void read(Buffer const & buf, LyXLex & lex);
29         ///
30         InsetBase::Code lyxCode() const { return InsetBase::ENVIRONMENT_CODE; }
31         ///
32         int latex(Buffer const &, odocstream &,
33                   OutputParams const &) const;
34         ///
35         virtual docstring const editMessage() const;
36         ///
37         InsetBase::EDITABLE editable() const { return HIGHLY_EDITABLE; }
38         ///
39         LyXLayout_ptr const & layout() const;
40         /** returns true if, when outputing LaTeX, font changes should
41             be closed before generating this inset. This is needed for
42             insets that may contain several paragraphs */
43         bool noFontChange() const { return true; }
44 protected:
45         InsetEnvironment(InsetEnvironment const &);
46 private:
47         virtual std::auto_ptr<InsetBase> doClone() const;
48         /// the layout
49         LyXLayout_ptr layout_;
50 };
51
52
53 } // namespace lyx
54
55 #endif