2003-03-13 10:06:11 +00:00
|
|
|
|
// -*- C++ -*-
|
|
|
|
|
/**
|
2007-04-28 20:44:46 +00:00
|
|
|
|
* \file InsetEnvironment.h
|
2003-03-13 10:06:11 +00:00
|
|
|
|
* 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
|
|
|
|
|
|
2007-04-25 01:24:38 +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
|
|
|
|
|
2004-02-11 14:45:44 +00:00
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
namespace lyx {
|
|
|
|
|
|
2003-04-25 15:28:41 +00:00
|
|
|
|
class InsetEnvironment : public InsetText {
|
2003-03-13 10:06:11 +00:00
|
|
|
|
public:
|
|
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
|
InsetEnvironment(BufferParams const &, std::string const & name);
|
2003-03-13 10:06:11 +00:00
|
|
|
|
///
|
2007-04-30 14:39:09 +00:00
|
|
|
|
docstring name() const { return name_; }
|
2007-04-29 12:32:14 +00:00
|
|
|
|
///
|
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
|
|
|
|
///
|
2007-04-26 11:30:54 +00:00
|
|
|
|
void read(Buffer const & buf, Lexer & lex);
|
2003-03-13 10:06:11 +00:00
|
|
|
|
///
|
2007-04-29 13:39:47 +00:00
|
|
|
|
Inset::Code lyxCode() const { return Inset::ENVIRONMENT_CODE; }
|
2003-03-13 10:06:11 +00:00
|
|
|
|
///
|
2006-10-21 00:16:43 +00:00
|
|
|
|
int latex(Buffer const &, odocstream &,
|
2007-02-16 10:05:30 +00:00
|
|
|
|
OutputParams const &) const;
|
|
|
|
|
///
|
|
|
|
|
int plaintext(Buffer const &, odocstream &,
|
|
|
|
|
OutputParams const &) const;
|
2003-03-13 10:06:11 +00:00
|
|
|
|
///
|
2006-10-21 00:16:43 +00:00
|
|
|
|
virtual docstring const editMessage() const;
|
2003-03-13 10:06:11 +00:00
|
|
|
|
///
|
2007-04-29 13:39:47 +00:00
|
|
|
|
Inset::EDITABLE editable() const { return HIGHLY_EDITABLE; }
|
2003-04-25 15:28:41 +00:00
|
|
|
|
///
|
2007-04-29 18:58:28 +00:00
|
|
|
|
Layout_ptr const & layout() const;
|
2003-03-13 10:06:11 +00:00
|
|
|
|
/** returns true if, when outputing LaTeX, font changes should
|
2006-04-05 23:56:29 +00:00
|
|
|
|
be closed before generating this inset. This is needed for
|
|
|
|
|
insets that may contain several paragraphs */
|
2003-03-13 10:06:11 +00:00
|
|
|
|
bool noFontChange() const { return true; }
|
2004-11-23 23:04:52 +00:00
|
|
|
|
protected:
|
|
|
|
|
InsetEnvironment(InsetEnvironment const &);
|
2003-03-13 10:06:11 +00:00
|
|
|
|
private:
|
2007-04-29 13:39:47 +00:00
|
|
|
|
virtual std::auto_ptr<Inset> doClone() const;
|
2003-05-19 07:12:09 +00:00
|
|
|
|
/// the layout
|
2007-04-29 18:58:28 +00:00
|
|
|
|
Layout_ptr layout_;
|
2007-04-29 12:32:14 +00:00
|
|
|
|
///
|
|
|
|
|
docstring name_;
|
2003-03-13 10:06:11 +00:00
|
|
|
|
};
|
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
|
|
} // namespace lyx
|
|
|
|
|
|
2003-03-13 10:06:11 +00:00
|
|
|
|
#endif
|