]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetWrap.h
Get rid of Qt resources
[lyx.git] / src / insets / InsetWrap.h
index f56bbf19878cca2879f8b0a7dda5292602be74fc..3bf837876a237e53abe32eeac3061c1dc606bd8b 100644 (file)
@@ -12,9 +12,8 @@
 #ifndef INSETWRAP_H
 #define INSETWRAP_H
 
-#include "InsetCollapsable.h"
+#include "InsetCaptionable.h"
 #include "Length.h"
-#include "MailInset.h"
 
 
 namespace lyx {
@@ -30,86 +29,73 @@ public:
        ///
        std::string type;
        ///
+       int lines;
+       ///
        std::string placement;
        ///
+       Length overhang;
+       ///
        Length width;
 };
 
 
 /** The wrap inset
  */
-class InsetWrap : public InsetCollapsable {
+class InsetWrap : public InsetCaptionable {
 public:
        ///
-       InsetWrap(BufferParams const &, std::string const &);
+       InsetWrap(Buffer *, std::string const &);
        ///
        ~InsetWrap();
        ///
-       void write(Buffer const & buf, std::ostream & os) const;
-       ///
-       void read(Buffer const & buf, Lexer & lex);
-       ///
-       void validate(LaTeXFeatures & features) const;
-       ///
-       Inset::Code lyxCode() const { return Inset::WRAP_CODE; }
-       ///
-       int latex(Buffer const &, odocstream &,
-                 OutputParams const &) const;
+       InsetWrapParams const & params() const { return params_; }
        ///
-       int plaintext(Buffer const &, odocstream &,
-                     OutputParams const &) const;
+       static void string2params(std::string const &, InsetWrapParams &);
        ///
-       int docbook(Buffer const &, odocstream &,
-                   OutputParams const &) const;
+       static std::string params2string(InsetWrapParams const &);
+private:
        ///
-       virtual docstring const editMessage() const;
+       void setCaptionType(std::string const & type);
        ///
-       bool insetAllowed(Inset::Code) const;
+       void write(std::ostream & os) const;
        ///
-       bool showInsetDialog(BufferView *) const;
+       void read(Lexer & lex);
        ///
-       InsetWrapParams const & params() const { return params_; }
+       void validate(LaTeXFeatures & features) const;
        ///
-       bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
-       // Update the counters of this inset and of its contents
-       virtual void updateLabels(Buffer const &, ParIterator const &);
-protected:
+       InsetCode lyxCode() const { return WRAP_CODE; }
        ///
-       virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
+       docstring toolTip(BufferView const & bv, int x, int y) const;
        ///
-       virtual docstring name() const { return name_; }
-private:
-       virtual Inset * clone() const;
-
+       void latex(otexstream &, OutputParams const &) const;
        ///
-       InsetWrapParams params_;
+       int plaintext(odocstringstream & ods, OutputParams const & op,
+                     size_t max_length = INT_MAX) const;
        ///
-       docstring name_;
-};
-
-
-class InsetWrapMailer : public MailInset {
-public:
+       int docbook(odocstream &, OutputParams const &) const;
        ///
-       InsetWrapMailer(InsetWrap & inset);
+       docstring xhtml(XHTMLStream &, OutputParams const &) const;
        ///
-       virtual Inset & inset() const { return inset_; }
+       bool insetAllowed(InsetCode) const;
        ///
-       virtual std::string const & name() const { return name_; }
+       bool showInsetDialog(BufferView *) const;
        ///
-       virtual std::string const inset2string(Buffer const &) const;
+       bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
+       /// Update the label
+       void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false);
        ///
-       static void string2params(std::string const &, InsetWrapParams &);
+       void doDispatch(Cursor & cur, FuncRequest & cmd);
        ///
-       static std::string const params2string(InsetWrapParams const &);
-private:
+       docstring layoutName() const;
        ///
-       static std::string const name_;
+       Inset * clone() const { return new InsetWrap(*this); }
+       /// Is the content of this inset part of the immediate (visible) text sequence?
+       bool isPartOfTextSequence() const { return false; }
+
        ///
-       InsetWrap & inset_;
+       InsetWrapParams params_;
 };
 
-
 } // namespace lyx
 
 #endif