mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +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:
committed by
Andreas Kling
parent
c930e02624
commit
6d1e47e7dd
@@ -31,8 +31,10 @@
|
||||
#include <AK/HashTable.h>
|
||||
#include <AK/RefCounted.h>
|
||||
#include <AK/String.h>
|
||||
#include <LibCore/MimeData.h>
|
||||
#include <LibGUI/ModelIndex.h>
|
||||
#include <LibGUI/ModelRole.h>
|
||||
#include <LibGUI/ModelSelection.h>
|
||||
#include <LibGUI/Variant.h>
|
||||
#include <LibGfx/Forward.h>
|
||||
#include <LibGfx/TextAlignment.h>
|
||||
@@ -93,6 +95,7 @@ public:
|
||||
}
|
||||
|
||||
virtual StringView drag_data_type() const { return {}; }
|
||||
virtual RefPtr<Core::MimeData> mime_data(const ModelSelection&) const;
|
||||
|
||||
void register_view(Badge<AbstractView>, AbstractView&);
|
||||
void unregister_view(Badge<AbstractView>, AbstractView&);
|
||||
|
||||
Reference in New Issue
Block a user