]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetfloat.h
fix #832
[lyx.git] / src / insets / insetfloat.h
index 39d60657694c256dab360d4688a7f290a1b9a617..568dfa12895c8a07fcbf457dd26e24ed934a994b 100644 (file)
  * Full author contact details are available in file CREDITS
  */
 
-#ifndef InsetFloat_H
-#define InsetFloat_H
-
+#ifndef INSETFLOAT_H
+#define INSETFLOAT_H
 
 #include "insetcollapsable.h"
 #include "toc.h"
 
-#include <boost/signals/signal0.hpp>
-
-class Painter;
 
 struct InsetFloatParams {
        ///
-       InsetFloatParams() : placement("htbp"), wide(false) {}
+       InsetFloatParams() : wide(false) {}
+       ///
+       void write(std::ostream & os) const;
+       ///
+       void read(LyXLex & lex);
        ///
        string type;
        ///
@@ -45,6 +45,8 @@ public:
        ///
        ~InsetFloat();
        ///
+       virtual dispatch_result localDispatch(FuncRequest const & cmd); 
+       ///
        void write(Buffer const * buf, std::ostream & os) const;
        ///
        void read(Buffer const * buf, LyXLex & lex);
@@ -67,31 +69,42 @@ public:
            insets that may contain several paragraphs */
        bool noFontChange() const { return true; }
        ///
-       string const & type() const;
+       void wide(bool w, BufferParams const &);
        ///
-       void placement(string const & p);
+       void addToToc(toc::TocList &, Buffer const *) const;
        ///
-       string const & placement() const;
+       bool  showInsetDialog(BufferView *) const;
        ///
-       void wide(bool w, BufferParams const &);
+       InsetFloatParams const & params() const { return params_; }
+       
+private:
        ///
-       bool wide() const;
+       InsetFloatParams params_;
+};
+
+
+#include "mailinset.h"
+
+
+class InsetFloatMailer : public MailInset {
+public:
        ///
-       void addToToc(toc::TocList &, Buffer const *) const;
+       InsetFloatMailer(InsetFloat & inset);
        ///
-       bool  showInsetDialog(BufferView *) const;
+       virtual InsetBase & inset() const { return inset_; }
        ///
-       boost::signal0<void> hideDialog;
+       virtual string const & name() const { return name_; }
        ///
-       InsetFloatParams const & params() const { return params_; }
+       virtual string const inset2string() const;
        ///
-       void writeParams(std::ostream & os) const;
+       static void string2params(string const &, InsetFloatParams &);
        ///
-       void readParams(Buffer const * buf, LyXLex & lex);
-       
+       static string const params2string(InsetFloatParams const &);
 private:
        ///
-       InsetFloatParams params_;
+       static string const name_;
+       ///
+       InsetFloat & inset_;
 };
 
 #endif