]> git.lyx.org Git - lyx.git/blob - src/insets/insetenv.h
Enable the external inset to handle unknown templates gracefully.
[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 class InsetEnvironment : public InsetText {
19 public:
20         ///
21         InsetEnvironment(BufferParams const &, string const & name);
22         ///
23         InsetEnvironment(InsetEnvironment const &);
24         ///
25         void write(Buffer const * buf, std::ostream & os) const;
26         ///
27         void read(Buffer const * buf, LyXLex & lex);
28         ///
29         Inset * clone() const;
30         ///
31         Inset::Code lyxCode() const { return Inset::ENVIRONMENT_CODE; }
32         ///
33         int latex(Buffer const *, std::ostream &,
34                   LatexRunParams const &) const;
35         ///
36         string const editMessage() const;
37         ///
38         Inset::EDITABLE editable() const { return HIGHLY_EDITABLE; }
39         ///
40         bool isTextInset() const { return true; }
41         ///
42         LyXLayout_ptr const & layout() const;
43         ///
44         bool needFullRow() const { return true; }
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
50 private:
51         /// the layout
52         LyXLayout_ptr layout_;
53 };
54
55 #endif