*
* \author André Pönitz
*
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
*/
#ifndef INSETENVIRONMENT_H
#include "insettext.h"
#include "lyxlayout_ptr_fwd.h"
+
+namespace lyx {
+
class InsetEnvironment : public InsetText {
public:
///
- InsetEnvironment(BufferParams const &, string const & name);
- ///
- InsetEnvironment(InsetEnvironment const &);
- ///
- void write(Buffer const * buf, std::ostream & os) const;
- ///
- void read(Buffer const * buf, LyXLex & lex);
+ InsetEnvironment(BufferParams const &, std::string const & name);
///
- Inset * clone(Buffer const &) const;
+ void write(Buffer const & buf, std::ostream & os) const;
///
- Inset::Code lyxCode() const { return Inset::ENVIRONMENT_CODE; }
+ void read(Buffer const & buf, LyXLex & lex);
///
- int latex(Buffer const *, std::ostream &,
- LatexRunParams const &) const;
+ InsetBase::Code lyxCode() const { return InsetBase::ENVIRONMENT_CODE; }
///
- string const editMessage() const;
+ int latex(Buffer const &, odocstream &,
+ OutputParams const &) const;
///
- Inset::EDITABLE editable() const { return HIGHLY_EDITABLE; }
+ virtual docstring const editMessage() const;
///
- bool isTextInset() const { return true; }
+ InsetBase::EDITABLE editable() const { return HIGHLY_EDITABLE; }
///
LyXLayout_ptr const & layout() const;
- ///
- 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 */
+ be closed before generating this inset. This is needed for
+ insets that may contain several paragraphs */
bool noFontChange() const { return true; }
-
+protected:
+ InsetEnvironment(InsetEnvironment const &);
private:
+ virtual std::auto_ptr<InsetBase> doClone() const;
/// the layout
LyXLayout_ptr layout_;
};
+
+} // namespace lyx
+
#endif