]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetenv.h
* src/LyXAction.C: mark goto-clear-bookmark as working without buffer
[lyx.git] / src / insets / insetenv.h
index 2f67c2f0a76cd49fc9d4636925f20c9c1b12701b..0925a20ad39a05d4dc42f4d146fbb15211fe2c4c 100644 (file)
@@ -6,48 +6,50 @@
  *
  * \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
 #define 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 &, bool same_id = false);
-       ///
-       void write(Buffer const * buf, std::ostream & os) const;
+       InsetEnvironment(BufferParams const &, std::string const & name);
        ///
-       void read(Buffer const * buf, LyXLex & lex);
+       void write(Buffer const & buf, std::ostream & os) const;
        ///
-       Inset * clone(Buffer const &, bool same_id = false) const;
+       void read(Buffer const & buf, LyXLex & lex);
        ///
-       Inset::Code lyxCode() const { return Inset::ENVIRONMENT_CODE; }
+       InsetBase::Code lyxCode() const { return InsetBase::ENVIRONMENT_CODE; }
        ///
-       int latex(Buffer const *, std::ostream &, bool fragile, bool fp) const;
+       int latex(Buffer const &, odocstream &,
+                 OutputParams const &) const;
        ///
-       string const editMessage() const;
+       virtual docstring const editMessage() const;
        ///
-       Inset::EDITABLE editable() const { return HIGHLY_EDITABLE; }
+       InsetBase::EDITABLE editable() const { return HIGHLY_EDITABLE; }
        ///
-       bool isTextInset() const { return true; }
-       ///
-       bool needFullRow() const { return true; }
+       LyXLayout_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 */
+           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:
-       /// LaTeX footer
-       string header_;
-       /// LaTeX footer
-       string footer_;
+       virtual std::auto_ptr<InsetBase> doClone() const;
+       /// the layout
+       LyXLayout_ptr layout_;
 };
 
+
+} // namespace lyx
+
 #endif