mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:28:12 +00:00
LibGUI+WindowServer: Make DragOperation hold a MimeData instance
...instead of maybe bitmap + a single mime type and its corresponding data. This allows drag&drop operations to hold multiple different kinds of data, and the views/applications to choose between those. For instance, Spreadsheet can keep the structure of the dragged cells, and still provide text-only data to be passed to different unrelated editors.
This commit is contained in:
parent
c930e02624
commit
6d1e47e7dd
15 changed files with 98 additions and 59 deletions
|
@ -55,8 +55,14 @@ public:
|
|||
Vector<URL> urls() const;
|
||||
void set_urls(const Vector<URL>&);
|
||||
|
||||
const HashMap<String, ByteBuffer>& all_data() const { return m_data; }
|
||||
|
||||
private:
|
||||
MimeData() { }
|
||||
explicit MimeData(const HashMap<String, ByteBuffer>& data)
|
||||
: m_data(data)
|
||||
{
|
||||
}
|
||||
|
||||
HashMap<String, ByteBuffer> m_data;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue