]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/Clipboard.h
Move the global formats and system_formats variables into the
[lyx.git] / src / frontends / Clipboard.h
index aed3042fa006745d275b2eeb22c1cf1cb75903ab..af617f5aecc4af11ac5889a35a83f6ea7ac947d5 100644 (file)
 
 #include "Cursor.h"
 
-#include "support/FileName.h"
 #include "support/strfwd.h"
 
-using lyx::support::FileName;
-
 namespace lyx {
 namespace frontend {
 
@@ -37,7 +34,18 @@ public:
                PngGraphicsType,
                JpegGraphicsType,
                LinkBackGraphicsType,
-               AnyGraphicsType,
+               EmfGraphicsType,
+               WmfGraphicsType,
+               AnyGraphicsType
+       };
+
+       enum TextType {
+               AnyTextType,
+               LyXOrPlainTextType,
+               PlainTextType,
+               HtmlTextType,
+               LaTeXTextType,
+               LyXTextType,
        };
 
        /**
@@ -49,11 +57,11 @@ public:
         * clipboard.
         */
        virtual std::string const getAsLyX() const = 0;
-       /// Get the contents of the window system clipboard in plain text format.
-       virtual docstring const getAsText() const = 0;
+       /// Get the contents of the window system clipboard in any text format except LyxTextType.
+       virtual docstring const getAsText(TextType type) const = 0;
        /// Get the contents of the window system clipboard as graphics file.
-       virtual FileName getAsGraphics(Cursor const & cur, GraphicsType type) const = 0;
-       
+       virtual support::FileName getAsGraphics(Cursor const & cur, GraphicsType type) const = 0;
+
        /**
         * Fill the system clipboard. The format of \p lyx is as written in
         * .lyx files, the format of \p text is plain text.
@@ -63,10 +71,13 @@ public:
         * This should be called when the user requests to cut or copy to
         * the clipboard.
         */
-       virtual void put(std::string const & lyx, docstring const & text) = 0;
+       virtual void put(std::string const & lyx, docstring const & html, docstring const & text) = 0;
+
+       /// Put a general string on the system clipboard (not LyX text)
+       virtual void put(std::string const & text) const = 0;
 
-       /// Does the clipboard contain LyX contents?
-       virtual bool hasLyXContents() const = 0;
+       /// Does the clipboard contain text contents?
+       virtual bool hasTextContents(TextType type = AnyTextType) const = 0;
        /// Does the clipboard contain graphics contents of a certain type?
        virtual bool hasGraphicsContents(GraphicsType type = AnyGraphicsType) const = 0;
        /// state of clipboard.