mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:47:44 +00:00
WindowServer+LibGUI: Add data_type and data fields to drag operations
These fields are intended to carry the real meat of a drag operation, and the "text" is just for what we show on screen (alongside the cursor during the actual drag.) The data field is just a String for now, but in the future we should make it something more flexible.
This commit is contained in:
parent
af7cb7ce1b
commit
cfcb38dff1
13 changed files with 50 additions and 15 deletions
|
@ -19,6 +19,11 @@ public:
|
|||
|
||||
void set_text(const String& text) { m_text = text; }
|
||||
void set_bitmap(const GraphicsBitmap* bitmap) { m_bitmap = bitmap; }
|
||||
void set_data(const String& data_type, const String& data)
|
||||
{
|
||||
m_data_type = data_type;
|
||||
m_data = data;
|
||||
}
|
||||
|
||||
Outcome exec();
|
||||
Outcome outcome() const { return m_outcome; }
|
||||
|
@ -35,5 +40,7 @@ private:
|
|||
OwnPtr<CEventLoop> m_event_loop;
|
||||
Outcome m_outcome { Outcome::None };
|
||||
String m_text;
|
||||
String m_data_type;
|
||||
String m_data;
|
||||
RefPtr<GraphicsBitmap> m_bitmap;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue