4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
12 #ifndef INSETENVIRONMENT_H
13 #define INSETENVIRONMENT_H
15 #include "insettext.h"
16 #include "lyxlayout_ptr_fwd.h"
19 class InsetEnvironment : public InsetText {
22 InsetEnvironment(BufferParams const &, std::string const & name);
24 InsetEnvironment(InsetEnvironment const &);
26 void write(Buffer const & buf, std::ostream & os) const;
28 void read(Buffer const & buf, LyXLex & lex);
30 virtual std::auto_ptr<InsetBase> clone() const;
32 InsetOld::Code lyxCode() const { return InsetOld::ENVIRONMENT_CODE; }
34 int latex(Buffer const &, std::ostream &,
35 OutputParams const &) const;
37 std::string const editMessage() const;
39 InsetOld::EDITABLE editable() const { return HIGHLY_EDITABLE; }
41 bool isTextInset() const { return true; }
43 LyXLayout_ptr const & layout() const;
44 /** returns true if, when outputing LaTeX, font changes should
45 be closed before generating this inset. This is needed for
46 insets that may contain several paragraphs */
47 bool noFontChange() const { return true; }
51 LyXLayout_ptr layout_;