]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetwrap.h
Rename LatexRunParams::fragile as moving_arg.
[lyx.git] / src / insets / insetwrap.h
index 189928aefb665d998c1efd256b398b0c6ed97ef4..a6c029190ff4fb0191067629323a8fc3b7ddd790 100644 (file)
 #ifndef InsetWrap_H
 #define InsetWrap_H
 
-#ifdef __GNUG__
-#pragma interface
-#endif
 
 #include "insetcollapsable.h"
 #include "toc.h"
 #include "lyxlength.h"
 
-#include <boost/signals/signal0.hpp>
 
-class Painter;
+struct InsetWrapParams {
+       ///
+       void write(std::ostream &) const;
+       ///
+       void read(LyXLex &);
+    
+       ///
+       string type;
+       ///
+       string placement;
+       ///
+       LyXLength width;
+};
 
-/** The wrap inset
 
-*/
+/** The wrap inset
+ */
 class InsetWrap : public InsetCollapsable {
 public:
        ///
@@ -35,6 +43,8 @@ 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);
@@ -45,7 +55,8 @@ public:
        ///
        Inset::Code lyxCode() const { return Inset::WRAP_CODE; }
        ///
-       int latex(Buffer const *, std::ostream &, bool fragile, bool fp) const;
+       int latex(Buffer const *, std::ostream &,
+                 LatexRunParams const &) const;
        ///
        int docbook(Buffer const *, std::ostream &, bool mixcont) const;
        ///
@@ -55,30 +66,42 @@ public:
        ///
        int getMaxWidth(BufferView *, UpdatableInset const *) const;
        ///
-       string const & type() const;
+       void addToToc(toc::TocList &, Buffer const *) const;
        ///
-       LyXLength const & pageWidth() const;
-        ///
-        void pageWidth(LyXLength const &);
+       bool  showInsetDialog(BufferView *) const;
        ///
-       void placement(string const & p);
+       int latexTextWidth(BufferView *) const;
        ///
-       string const & placement() const;
+       InsetWrapParams const & params() const { return params_; }
+private:
        ///
-       void addToToc(toc::TocList &, Buffer const *) const;
+       InsetWrapParams params_;
+};
+
+
+
+#include "mailinset.h"
+
+
+class InsetWrapMailer : public MailInset {
+public:
        ///
-       bool  showInsetDialog(BufferView *) const;
+       InsetWrapMailer(InsetWrap & inset);
        ///
-       boost::signal0<void> hideDialog;
+       virtual InsetBase & inset() const { return inset_; }
        ///
-       int latexTextWidth(BufferView *) const;
-private:
+       virtual string const & name() const { return name_; }
        ///
-       string Type_;
+       virtual string const inset2string() const;
+       ///
+       static void string2params(string const &, InsetWrapParams &);
+       ///
+       static string const params2string(InsetWrapParams const &);
+private:
        ///
-       string Placement_;
+       static string const name_;
        ///
-       LyXLength width_;
+       InsetWrap & inset_;
 };
 
 #endif