]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetwrap.h
* src/LyXAction.C: mark goto-clear-bookmark as working without buffer
[lyx.git] / src / insets / insetwrap.h
index 2350b9b5d78da2ff203bdbeee25c6fbc3d936d28..bcf337d7a086d63f509008af942768785f6ee056 100644 (file)
@@ -9,16 +9,19 @@
  * Full author contact details are available in file CREDITS.
  */
 
-#ifndef InsetWrap_H
-#define InsetWrap_H
-
+#ifndef INSETWRAP_H
+#define INSETWRAP_H
 
 #include "insetcollapsable.h"
-#include "toc.h"
 #include "lyxlength.h"
+#include "mailinset.h"
+
+
+namespace lyx {
 
 
-struct InsetWrapParams {
+class InsetWrapParams {
+public:
        ///
        void write(std::ostream &) const;
        ///
@@ -42,44 +45,42 @@ public:
        ///
        ~InsetWrap();
        ///
-       virtual dispatch_result localDispatch(FuncRequest const & cmd);
-       ///
        void write(Buffer const & buf, std::ostream & os) const;
        ///
        void read(Buffer const & buf, LyXLex & lex);
        ///
        void validate(LaTeXFeatures & features) const;
        ///
-       virtual std::auto_ptr<InsetBase> clone() const;
+       InsetBase::Code lyxCode() const { return InsetBase::WRAP_CODE; }
        ///
-       InsetOld::Code lyxCode() const { return InsetOld::WRAP_CODE; }
+       int latex(Buffer const &, odocstream &,
+                 OutputParams const &) const;
        ///
-       int latex(Buffer const &, std::ostream &,
-                 LatexRunParams const &) const;
+       int docbook(Buffer const &, odocstream &,
+                   OutputParams const &) const;
        ///
-       int docbook(Buffer const &, std::ostream &, bool mixcont) const;
+       virtual docstring const editMessage() const;
        ///
-       std::string const editMessage() const;
+       bool insetAllowed(InsetBase::Code) const;
        ///
-       bool insetAllowed(InsetOld::Code) const;
+       void addToToc(TocList &, Buffer const &) const;
        ///
-       void addToToc(lyx::toc::TocList &, Buffer const &) const;
+       bool showInsetDialog(BufferView *) const;
        ///
-       bool  showInsetDialog(BufferView *) const;
+       InsetWrapParams const & params() const { return params_; }
        ///
-       int latexTextWidth(BufferView *) const;
+       bool getStatus(LCursor &, FuncRequest const &, FuncStatus &) const;
+protected:
        ///
-       InsetWrapParams const & params() const { return params_; }
+       virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
 private:
+       virtual std::auto_ptr<InsetBase> doClone() const;
+
        ///
        InsetWrapParams params_;
 };
 
 
-
-#include "mailinset.h"
-
-
 class InsetWrapMailer : public MailInset {
 public:
        ///
@@ -101,4 +102,7 @@ private:
        InsetWrap & inset_;
 };
 
+
+} // namespace lyx
+
 #endif