2003-03-13 10:06:11 +00:00
|
|
|
|
// -*- C++ -*-
|
|
|
|
|
/**
|
|
|
|
|
* \file insetenv.h
|
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
|
*
|
|
|
|
|
* \author Andr<EFBFBD> P<EFBFBD>nitz
|
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
|
* Full author contact details are available in file CREDITS.
|
2003-03-13 10:06:11 +00:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef INSETENVIRONMENT_H
|
|
|
|
|
#define INSETENVIRONMENT_H
|
|
|
|
|
|
2003-04-25 15:28:41 +00:00
|
|
|
|
#include "insettext.h"
|
2003-05-19 07:12:09 +00:00
|
|
|
|
#include "lyxlayout_ptr_fwd.h"
|
2003-03-13 10:06:11 +00:00
|
|
|
|
|
2003-04-25 15:28:41 +00:00
|
|
|
|
class InsetEnvironment : public InsetText {
|
2003-03-13 10:06:11 +00:00
|
|
|
|
public:
|
|
|
|
|
///
|
|
|
|
|
InsetEnvironment(BufferParams const &, string const & name);
|
|
|
|
|
///
|
2003-05-26 09:13:55 +00:00
|
|
|
|
InsetEnvironment(InsetEnvironment const &);
|
|
|
|
|
///
|
2003-08-28 07:41:31 +00:00
|
|
|
|
void write(Buffer const & buf, std::ostream & os) const;
|
2003-03-13 10:06:11 +00:00
|
|
|
|
///
|
2003-08-28 07:41:31 +00:00
|
|
|
|
void read(Buffer const & buf, LyXLex & lex);
|
2003-03-13 10:06:11 +00:00
|
|
|
|
///
|
2003-07-25 17:11:25 +00:00
|
|
|
|
virtual std::auto_ptr<InsetBase> clone() const;
|
2003-05-26 09:13:55 +00:00
|
|
|
|
///
|
2003-07-25 21:20:24 +00:00
|
|
|
|
InsetOld::Code lyxCode() const { return InsetOld::ENVIRONMENT_CODE; }
|
2003-03-13 10:06:11 +00:00
|
|
|
|
///
|
2003-08-28 07:41:31 +00:00
|
|
|
|
int latex(Buffer const &, std::ostream &,
|
2003-05-23 08:59:47 +00:00
|
|
|
|
LatexRunParams const &) const;
|
2003-03-13 10:06:11 +00:00
|
|
|
|
///
|
|
|
|
|
string const editMessage() const;
|
|
|
|
|
///
|
2003-07-25 21:20:24 +00:00
|
|
|
|
InsetOld::EDITABLE editable() const { return HIGHLY_EDITABLE; }
|
2003-04-25 15:28:41 +00:00
|
|
|
|
///
|
|
|
|
|
bool isTextInset() const { return true; }
|
|
|
|
|
///
|
2003-05-19 07:12:09 +00:00
|
|
|
|
LyXLayout_ptr const & layout() const;
|
2003-03-13 10:06:11 +00:00
|
|
|
|
/** returns true if, when outputing LaTeX, font changes should
|
|
|
|
|
be closed before generating this inset. This is needed for
|
|
|
|
|
insets that may contain several paragraphs */
|
|
|
|
|
bool noFontChange() const { return true; }
|
|
|
|
|
|
|
|
|
|
private:
|
2003-05-19 07:12:09 +00:00
|
|
|
|
/// the layout
|
|
|
|
|
LyXLayout_ptr layout_;
|
2003-03-13 10:06:11 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|