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
|
|
|
|
|
*
|
|
|
|
|
* Full author contact details are available in file CREDITS
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef INSETENVIRONMENT_H
|
|
|
|
|
#define INSETENVIRONMENT_H
|
|
|
|
|
|
2003-04-25 15:28:41 +00:00
|
|
|
|
#include "insettext.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);
|
|
|
|
|
///
|
|
|
|
|
InsetEnvironment(InsetEnvironment const &, bool same_id = false);
|
|
|
|
|
///
|
|
|
|
|
void write(Buffer const * buf, std::ostream & os) const;
|
|
|
|
|
///
|
|
|
|
|
void read(Buffer const * buf, LyXLex & lex);
|
|
|
|
|
///
|
|
|
|
|
Inset * clone(Buffer const &, bool same_id = false) const;
|
|
|
|
|
///
|
|
|
|
|
Inset::Code lyxCode() const { return Inset::ENVIRONMENT_CODE; }
|
|
|
|
|
///
|
|
|
|
|
int latex(Buffer const *, std::ostream &, bool fragile, bool fp) const;
|
|
|
|
|
///
|
|
|
|
|
string const editMessage() const;
|
|
|
|
|
///
|
2003-04-25 15:28:41 +00:00
|
|
|
|
Inset::EDITABLE editable() const { return HIGHLY_EDITABLE; }
|
|
|
|
|
///
|
|
|
|
|
bool isTextInset() const { return true; }
|
|
|
|
|
///
|
2003-03-13 10:06:11 +00:00
|
|
|
|
bool needFullRow() const { return true; }
|
|
|
|
|
/** 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:
|
|
|
|
|
/// LaTeX footer
|
|
|
|
|
string header_;
|
|
|
|
|
/// LaTeX footer
|
|
|
|
|
string footer_;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|