TextView.connectPopulatePopup

Connect to PopulatePopup signal.

The ::populate-popup signal gets emitted before showing the context menu of the text view.

If you need to add items to the context menu, connect to this signal and append your items to the popup, which will be a #GtkMenu in this case.

If #GtkTextView:populate-all is true, this signal will also be emitted to populate touch popups. In this case, popup will be a different container, e.g. a #GtkToolbar.

The signal handler should not make assumptions about the type of widget, but check whether popup is a #GtkMenu or #GtkToolbar or another kind of container.

class TextView
gulong
connectPopulatePopup
(
T
)
(,
Flag!"After" after = No.After
)
if (
isCallable!T &&
is(ReturnType!T == void)
&&
(
Parameters!T.length < 1 ||
(
ParameterStorageClassTuple!T[0] == ParameterStorageClass.none &&
is(Parameters!T[0] : gtk.widget.Widget)
)
)
&&
(
Parameters!T.length < 2 ||
(
ParameterStorageClassTuple!T[1] == ParameterStorageClass.none &&
is(Parameters!T[1] : gtk.text_view.TextView)
)
)
&&
Parameters!T.length < 3
)

Parameters

callback T

signal callback delegate or function to connect

void callback(gtk.widget.Widget popup, gtk.text_view.TextView textView)

popup the container that is being populated (optional)

textView the instance the signal is connected to (optional)

after Flag!"After"

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

Return Value

Type: gulong

Signal ID