X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2FClipboard.h;h=af617f5aecc4af11ac5889a35a83f6ea7ac947d5;hb=50060053e36b3e9dfe03bc33ed3abac1eacc54b0;hp=1e0d48685d738917f9e060076935bc58c4fa1556;hpb=0613a218aad1482ff3003a7cc4755c0b9651f3c2;p=lyx.git diff --git a/src/frontends/Clipboard.h b/src/frontends/Clipboard.h index 1e0d48685d..af617f5aec 100644 --- a/src/frontends/Clipboard.h +++ b/src/frontends/Clipboard.h @@ -16,11 +16,8 @@ #include "Cursor.h" -#include "support/FileName.h" #include "support/strfwd.h" -using lyx::support::FileName; - namespace lyx { namespace frontend { @@ -42,6 +39,15 @@ public: AnyGraphicsType }; + enum TextType { + AnyTextType, + LyXOrPlainTextType, + PlainTextType, + HtmlTextType, + LaTeXTextType, + LyXTextType, + }; + /** * Get the system clipboard contents. The format is as written in * .lyx files (may even be an older version than ours if it comes @@ -51,10 +57,10 @@ 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 @@ -67,10 +73,11 @@ public: */ virtual void put(std::string const & lyx, docstring const & html, docstring const & text) = 0; - /// Does the clipboard contain LyX contents? - virtual bool hasLyXContents() const = 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 text contents? - virtual bool hasTextContents() const = 0; + 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.