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"
18 class InsetEnvironment : public InsetText {
21 InsetEnvironment(BufferParams const &, string const & name);
23 InsetEnvironment(InsetEnvironment const &, bool same_id = false);
25 void write(Buffer const * buf, std::ostream & os) const;
27 void read(Buffer const * buf, LyXLex & lex);
29 Inset * clone(Buffer const &, bool same_id = false) const;
31 Inset::Code lyxCode() const { return Inset::ENVIRONMENT_CODE; }
33 int latex(Buffer const *, std::ostream &, bool fragile, bool fp) const;
35 string const editMessage() const;
37 Inset::EDITABLE editable() const { return HIGHLY_EDITABLE; }
39 bool isTextInset() const { return true; }
41 LyXLayout_ptr const & layout() const;
43 bool needFullRow() const { return true; }
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_;