5#ifndef MOLYBDEN_CLIPBOARD_DATA_HPP
6#define MOLYBDEN_CLIPBOARD_DATA_HPP
21 static std::shared_ptr<ClipboardDataType>
create(
22 const std::string& mime_type);
27 static std::shared_ptr<ClipboardDataType>
plainText();
32 static std::shared_ptr<ClipboardDataType>
html();
37 static std::shared_ptr<ClipboardDataType>
rtf();
63 static std::shared_ptr<ClipboardData>
create(
64 std::shared_ptr<ClipboardDataType>
type,
65 const std::string&
data);
74 static std::shared_ptr<ClipboardData>
create(
75 std::shared_ptr<ClipboardDataType>
type,
82 virtual std::shared_ptr<ClipboardDataType>
type()
const = 0;
87 virtual size_t size()
const = 0;
92 virtual const char*
data()
const = 0;
Represents the system clipboard data.
Definition clipboard_data.hpp:55
virtual std::shared_ptr< ClipboardDataType > type() const =0
Returns the type of the clipboard data.
static std::shared_ptr< ClipboardData > create(std::shared_ptr< ClipboardDataType > type, const std::string &data)
Creates a new clipboard data with the given type and data.
virtual const char * data() const =0
Returns the clipboard data.
static std::shared_ptr< ClipboardData > create(std::shared_ptr< ClipboardDataType > type, const char *data, size_t length)
Creates a new clipboard data with the given type and data.
virtual size_t size() const =0
Returns the size of the clipboard data.
Represents the type of a clipboard data.
Definition clipboard_data.hpp:16
static std::shared_ptr< ClipboardDataType > create(const std::string &mime_type)
Creates a new clipboard data type for the given MIME type.
static std::shared_ptr< ClipboardDataType > plainText()
Returns the clipboard data type for plain text.
static std::shared_ptr< ClipboardDataType > rtf()
Returns the clipboard data type for Rich Text Format (RTF).
static std::shared_ptr< ClipboardDataType > html()
Returns the clipboard data type for HTML.
bool operator==(const ClipboardDataType &other) const
Returns true if the given clipboard data type is equal to this one.
virtual std::string mimeType() const =0
Returns the MIME type of the clipboard data.