mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-25 14:04:25 +00:00
4a53fa6e01
* Layout.h: - name_, obsoleted_by_, depends_on_ are now docstrings. All other changes results from the above string -> docstring changes. In particular, we now try to translate the layout names only if possible (i.e. if they are ASCII only). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19042 a592a061-630c-0410-9148-cb99ea01b6c8
63 lines
1.4 KiB
C++
63 lines
1.4 KiB
C++
// -*- C++ -*-
|
|
/**
|
|
* \file InsetEnvironment.h
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author André Pönitz
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
#ifndef INSETENVIRONMENT_H
|
|
#define INSETENVIRONMENT_H
|
|
|
|
#include "InsetText.h"
|
|
#include "lyxlayout_ptr_fwd.h"
|
|
|
|
|
|
namespace lyx {
|
|
|
|
class InsetEnvironment : public InsetText {
|
|
public:
|
|
///
|
|
InsetEnvironment(BufferParams const &, docstring const & name);
|
|
///
|
|
docstring name() const { return name_; }
|
|
///
|
|
void write(Buffer const & buf, std::ostream & os) const;
|
|
///
|
|
void read(Buffer const & buf, Lexer & lex);
|
|
///
|
|
Inset::Code lyxCode() const { return Inset::ENVIRONMENT_CODE; }
|
|
///
|
|
int latex(Buffer const &, odocstream &,
|
|
OutputParams const &) const;
|
|
///
|
|
int plaintext(Buffer const &, odocstream &,
|
|
OutputParams const &) const;
|
|
///
|
|
virtual docstring const editMessage() const;
|
|
///
|
|
Inset::EDITABLE editable() const { return HIGHLY_EDITABLE; }
|
|
///
|
|
Layout_ptr const & layout() const;
|
|
/** 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; }
|
|
protected:
|
|
InsetEnvironment(InsetEnvironment const &);
|
|
private:
|
|
virtual std::auto_ptr<Inset> doClone() const;
|
|
/// the layout
|
|
Layout_ptr layout_;
|
|
///
|
|
docstring name_;
|
|
};
|
|
|
|
|
|
} // namespace lyx
|
|
|
|
#endif
|