]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetwrap.h
The markDirty() and fitCursor() changes
[lyx.git] / src / insets / insetwrap.h
index 4ddc3e8b41001fdc51bd3ff2ef4c8534410588f7..2090d350f942260a35bbea911e04decdd1a38a64 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:
        ///
@@ -34,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);
@@ -57,25 +68,49 @@ public:
        string const & type() const;
        ///
        LyXLength const & pageWidth() const;
-        ///
-        void pageWidth(LyXLength const &);
+       ///
+       void pageWidth(LyXLength const &);
        ///
        void placement(string const & p);
        ///
        string const & placement() const;
        ///
-       bool  showInsetDialog(BufferView *) const;
+       void addToToc(toc::TocList &, Buffer const *) const;
        ///
-       boost::signal0<void> hideDialog;
+       bool  showInsetDialog(BufferView *) const;
        ///
        int latexTextWidth(BufferView *) const;
+       ///
+       InsetWrapParams const & params() const { return params_; }
 private:
        ///
-       string Type_;
+       InsetWrapParams params_;
+};
+
+
+
+#include "mailinset.h"
+
+
+class InsetWrapMailer : public MailInset {
+public:
+       ///
+       InsetWrapMailer(InsetWrap & inset);
+       ///
+       virtual InsetBase & inset() const { return inset_; }
+       ///
+       virtual string const & name() const { return name_; }
+       ///
+       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