Dock.connectAdoptWidget

Connect to AdoptWidget signal.

Signal is emitted when a widget is requesting to be added via a drag-n-drop event.

This is generally propagated via #PanelFrame::adopt-widget to the dock so that applications do not need to attach signal handlers to every #PanelFrame.

class Dock
ulong
connectAdoptWidget
(
T
)
(,
Flag!"After" after = No.After
)
if (
isCallable!T &&
is(ReturnType!T == bool)
&&
(
Parameters!T.length < 1 ||
(
ParameterStorageClassTuple!T[0] == ParameterStorageClass.none &&
is(Parameters!T[0] : panel.widget.Widget)
)
)
&&
(
Parameters!T.length < 2 ||
(
ParameterStorageClassTuple!T[1] == ParameterStorageClass.none &&
is(Parameters!T[1] : panel.dock.Dock)
)
)
&&
Parameters!T.length < 3
)

Parameters

callback T

signal callback delegate or function to connect

bool callback(panel.widget.Widget widget, panel.dock.Dock dock)

widget a #PanelWidget (optional)

dock the instance the signal is connected to (optional)

Returns GDK_EVENT_STOP to prevent dropping, otherwise GDK_EVENT_PROPAGATE to allow adopting the widget.

after Flag!"After"

Yes.After to execute callback after default handler, No.After to execute before (default)

Return Value

Type: ulong

Signal ID