mirror of
https://github.com/RGBCube/serenity
synced 2025-05-22 10:55:07 +00:00
LibGUI: Let GModel specify the drag data type
GModel subclasses can now override drag_data_type() to specify which type GAbstractView should set for drag data. The default implementation returns a null string, which disables dragging from this widget.
This commit is contained in:
parent
d3ce7ae0e3
commit
dec95cb8b3
5 changed files with 14 additions and 2 deletions
|
@ -94,6 +94,8 @@ public:
|
|||
virtual GSortOrder sort_order() const { return GSortOrder::None; }
|
||||
virtual void set_key_column_and_sort_order(int, GSortOrder) {}
|
||||
|
||||
virtual StringView drag_data_type() const { return {}; }
|
||||
|
||||
void register_view(Badge<GAbstractView>, GAbstractView&);
|
||||
void unregister_view(Badge<GAbstractView>, GAbstractView&);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue