gtk.signal_list_item_factory

Module for [SignalListItemFactory] class

Types 3

[gtk.signal_list_item_factory.SignalListItemFactory] is a [gtk.list_item_factory.ListItemFactory] that emits signals to manage listitems.

Signals are emitted for every listitem in the same order:

  1. [gtk.signal_list_item_factory.SignalListItemFactory.setup] is emitted to set up permanent

things on the listitem. This usually means constructing the widgets used in the row and adding them to the listitem.

  1. [gtk.signal_list_item_factory.SignalListItemFactory.bind] is emitted to bind the item passed

via [gtk.list_item.ListItem.item] to the widgets that have been created in step 1 or to add item-specific widgets. Signals are connected to listen to changes - both to changes in the item to update the widgets or to changes in the widgets to update the item. After this signal has been called, the listitem may be shown in a list widget.

  1. [gtk.signal_list_item_factory.SignalListItemFactory.unbind] is emitted to undo everything

done in step 2. Usually this means disconnecting signal handlers. Once this signal has been called, the listitem will no longer be used in a list widget.

  1. [gtk.signal_list_item_factory.SignalListItemFactory.bind] and

[gtk.signal_list_item_factory.SignalListItemFactory.unbind] may be emitted multiple times again to bind the listitem for use with new items. By reusing listitems, potentially costly setup can be avoided. However, it means code needs to make sure to properly clean up the listitem in step 3 so that no information from the previous use leaks into the next use.

  1. [gtk.signal_list_item_factory.SignalListItemFactory.teardown] is emitted to allow undoing

the effects of [gtk.signal_list_item_factory.SignalListItemFactory.setup]. After this signal was emitted on a listitem, the listitem will be destroyed and not be used again.

Note that during the signal emissions, changing properties on the listitems passed will not trigger notify signals as the listitem's notifications are frozen. See [gobject.object.ObjectWrap.freezeNotify] for details.

For tracking changes in other properties in the listitem, the ::notify signal is recommended. The signal can be connected in the [gtk.signal_list_item_factory.SignalListItemFactory.setup] signal and removed again during [gtk.signal_list_item_factory.SignalListItemFactory.teardown].

Methods
GType _gType() @property
SignalListItemFactory self()Returns `this`, for use in `with` statements.
SignalListItemFactoryGidBuilder builder()Get builder for [gtk.signallistitem_factory.SignalListItemFactory] Returns: New builder object
gulong connectBind(T)(T callback, 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] : gobject.object.ObjectWrap))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gtk.signal_list_item_factory.SignalListItemFactory))) && Parameters!T.length < 3)Connect to `Bind` signal.
gulong connectSetup(T)(T callback, 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] : gobject.object.ObjectWrap))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gtk.signal_list_item_factory.SignalListItemFactory))) && Parameters!T.length < 3)Connect to `Setup` signal.
gulong connectTeardown(T)(T callback, 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] : gobject.object.ObjectWrap))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gtk.signal_list_item_factory.SignalListItemFactory))) && Parameters!T.length < 3)Connect to `Teardown` signal.
gulong connectUnbind(T)(T callback, 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] : gobject.object.ObjectWrap))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gtk.signal_list_item_factory.SignalListItemFactory))) && Parameters!T.length < 3)Connect to `Unbind` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new [gtk.signallistitem_factory.SignalListItemFactory].

Fluent builder for [gtk.signal_list_item_factory.SignalListItemFactory]