summaryrefslogtreecommitdiff
path: root/scene/gui/control.h
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2023-01-14 03:37:19 +0100
committerkobewi <kobewi4e@gmail.com>2023-01-14 15:16:51 +0100
commit59ea36b87cb84ce40ebf702e65f0493dd1c40141 (patch)
tree40d0e845a87ccf5aa013e75c437912d55a1d1f77 /scene/gui/control.h
parenta51ca2beafc5d74d3e62cb56fbba76ceb39160a3 (diff)
Remove set_drag_forwarding_compat()
Diffstat (limited to 'scene/gui/control.h')
-rw-r--r--scene/gui/control.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/scene/gui/control.h b/scene/gui/control.h
index 22a37dd89e..aaab9f530c 100644
--- a/scene/gui/control.h
+++ b/scene/gui/control.h
@@ -503,7 +503,6 @@ public:
// Drag and drop handling.
virtual void set_drag_forwarding(const Callable &p_drag, const Callable &p_can_drop, const Callable &p_drop);
- virtual void set_drag_forwarding_compat(Object *p_base);
virtual Variant get_drag_data(const Point2 &p_point);
virtual bool can_drop_data(const Point2 &p_point, const Variant &p_data) const;
virtual void drop_data(const Point2 &p_point, const Variant &p_data);
@@ -634,4 +633,10 @@ VARIANT_ENUM_CAST(Control::LayoutMode);
VARIANT_ENUM_CAST(Control::LayoutDirection);
VARIANT_ENUM_CAST(Control::TextDirection);
+// G = get_drag_data_fw, C = can_drop_data_fw, D = drop_data_fw, U = underscore
+#define SET_DRAG_FORWARDING_CD(from, to) from->set_drag_forwarding(Callable(), callable_mp(this, &to::can_drop_data_fw).bind(from), callable_mp(this, &to::drop_data_fw).bind(from));
+#define SET_DRAG_FORWARDING_CDU(from, to) from->set_drag_forwarding(Callable(), callable_mp(this, &to::_can_drop_data_fw).bind(from), callable_mp(this, &to::_drop_data_fw).bind(from));
+#define SET_DRAG_FORWARDING_GCD(from, to) from->set_drag_forwarding(callable_mp(this, &to::get_drag_data_fw).bind(from), callable_mp(this, &to::can_drop_data_fw).bind(from), callable_mp(this, &to::drop_data_fw).bind(from));
+#define SET_DRAG_FORWARDING_GCDU(from, to) from->set_drag_forwarding(callable_mp(this, &to::_get_drag_data_fw).bind(from), callable_mp(this, &to::_can_drop_data_fw).bind(from), callable_mp(this, &to::_drop_data_fw).bind(from));
+
#endif // CONTROL_H