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 void write(Buffer const & buf, std::ostream & os) const;
26 void read(Buffer const & buf, LyXLex & lex);
28 InsetBase::Code lyxCode() const { return InsetBase::ENVIRONMENT_CODE; }
30 int latex(Buffer const &, std::ostream &,
31 OutputParams const &) const;
33 virtual lyx::docstring const editMessage() const;
35 InsetBase::EDITABLE editable() const { return HIGHLY_EDITABLE; }
37 LyXLayout_ptr const & layout() const;
38 /** returns true if, when outputing LaTeX, font changes should
39 be closed before generating this inset. This is needed for
40 insets that may contain several paragraphs */
41 bool noFontChange() const { return true; }
43 InsetEnvironment(InsetEnvironment const &);
45 virtual std::auto_ptr<InsetBase> doClone() const;
47 LyXLayout_ptr layout_;