Emits signals to manage listitems.
Signals are emitted for every listitem in the same order:
[signalGtk.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.
[signalGtk.SignalListItemFactory::bind] is emitted to bind the item
passed via [propertyGtk.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.
[signalGtk.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.
[signalGtk.SignalListItemFactory::bind] and
[signalGtk.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 one.
[signalGtk.SignalListItemFactory::teardown] is emitted to allow undoing
the effects of [signalGtk.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 [methodGobject.Object.freeze_notify] for details.
For tracking changes in other properties in the listitem, the ::notify signal is recommended. The signal can be connected in the [signalGtk.SignalListItemFactory::setup] signal and removed again during [signalGtk.SignalListItemFactory::teardown].
<group>Trees and Lists</group> <gtkada_demo>create_column_view.adb</gtkada_demo>
type Cb_GObject_Gtk_List_Item_Void is not null access procedure
(Self : access Glib.Object.GObject_Record'Class;
Object : not null access Gtk.List_Item.Gtk_List_Item_Record'Class);
type Cb_Gtk_Signal_List_Item_Factory_Gtk_List_Item_Void is not null access procedure
(Self : access Gtk_Signal_List_Item_Factory_Record'Class;
Object : not null access Gtk.List_Item.Gtk_List_Item_Record'Class);
function Get_Type return Glib.GType
procedure Gtk_New (Self : out Gtk_Signal_List_Item_Factory)
Creates a new GtkSignalListItemFactory. You need to connect signal handlers before you use it. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
type Gtk_Signal_List_Item_Factory is access all Gtk_Signal_List_Item_Factory_Record'Class;
function Gtk_Signal_List_Item_Factory_New return Gtk_Signal_List_Item_Factory
Creates a new GtkSignalListItemFactory. You need to connect signal handlers before you use it.
type Gtk_Signal_List_Item_Factory_Record is new Gtk_List_Item_Factory_Record with null record;
procedure Initialize
(Self : not null access Gtk_Signal_List_Item_Factory_Record'Class)
Creates a new GtkSignalListItemFactory. You need to connect signal handlers before you use it. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
procedure On_Bind
(Self : not null access Gtk_Signal_List_Item_Factory_Record;
Call : Cb_GObject_Gtk_List_Item_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
Emitted when an object has been bound to an item.
The handler for this signal must set to populate the listitem with widgets.
After this signal was emitted, the object might be shown in a [classGtk.ListView] or other widget.
The [signalGtk.SignalListItemFactory::unbind] signal is the opposite of this signal and can be used to undo everything done in this signal.
procedure On_Bind
(Self : not null access Gtk_Signal_List_Item_Factory_Record;
Call : Cb_Gtk_Signal_List_Item_Factory_Gtk_List_Item_Void;
After : Boolean := False)
Emitted when an object has been bound to an item.
The handler for this signal must set to populate the listitem with widgets.
After this signal was emitted, the object might be shown in a [classGtk.ListView] or other widget.
The [signalGtk.SignalListItemFactory::unbind] signal is the opposite of this signal and can be used to undo everything done in this signal.
procedure On_Setup
(Self : not null access Gtk_Signal_List_Item_Factory_Record;
Call : Cb_GObject_Gtk_List_Item_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
Emitted when a newly created listitem needs to be prepared for use.
It is the first signal emitted for every listitem.
The handler for this signal must call [methodGtk.ListItem.set_child] to populate the listitem with widgets.
The [signalGtk.SignalListItemFactory::teardown] signal is the opposite of this signal and can be used to undo everything done in this signal.
procedure On_Setup
(Self : not null access Gtk_Signal_List_Item_Factory_Record;
Call : Cb_Gtk_Signal_List_Item_Factory_Gtk_List_Item_Void;
After : Boolean := False)
Emitted when a newly created listitem needs to be prepared for use.
It is the first signal emitted for every listitem.
The handler for this signal must call [methodGtk.ListItem.set_child] to populate the listitem with widgets.
The [signalGtk.SignalListItemFactory::teardown] signal is the opposite of this signal and can be used to undo everything done in this signal.
procedure On_Teardown
(Self : not null access Gtk_Signal_List_Item_Factory_Record;
Call : Cb_GObject_Gtk_List_Item_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
Emitted when an object is about to be destroyed.
It is the last signal ever emitted for this Object.
This signal is the opposite of the [signalGtk.SignalListItemFactory::setup] signal and should be used to undo everything done in that signal.
procedure On_Teardown
(Self : not null access Gtk_Signal_List_Item_Factory_Record;
Call : Cb_Gtk_Signal_List_Item_Factory_Gtk_List_Item_Void;
After : Boolean := False)
Emitted when an object is about to be destroyed.
It is the last signal ever emitted for this Object.
This signal is the opposite of the [signalGtk.SignalListItemFactory::setup] signal and should be used to undo everything done in that signal.
procedure On_Unbind
(Self : not null access Gtk_Signal_List_Item_Factory_Record;
Call : Cb_GObject_Gtk_List_Item_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
Emitted when an object has been unbound from its item.
This happens for example when a listitem was removed from use in a list widget and its [propertyGtk.ListItem:item] is about to be unset.
This signal is the opposite of the [signalGtk.SignalListItemFactory::bind] signal and should be used to undo everything done in that signal.
procedure On_Unbind
(Self : not null access Gtk_Signal_List_Item_Factory_Record;
Call : Cb_Gtk_Signal_List_Item_Factory_Gtk_List_Item_Void;
After : Boolean := False)
Emitted when an object has been unbound from its item.
This happens for example when a listitem was removed from use in a list widget and its [propertyGtk.ListItem:item] is about to be unset.
This signal is the opposite of the [signalGtk.SignalListItemFactory::bind] signal and should be used to undo everything done in that signal.
Signal_Bind : constant Glib.Signal_Name := "bind";
Emitted when an object has been bound to an item.
The handler for this signal must set to populate the listitem with widgets.
After this signal was emitted, the object might be shown in a [classGtk.ListView] or other widget.
The [signalGtk.SignalListItemFactory::unbind] signal is the opposite of this signal and can be used to undo everything done in this signal.
Signal_Setup : constant Glib.Signal_Name := "setup";
Emitted when a newly created listitem needs to be prepared for use.
It is the first signal emitted for every listitem.
The handler for this signal must call [methodGtk.ListItem.set_child] to populate the listitem with widgets.
The [signalGtk.SignalListItemFactory::teardown] signal is the opposite of this signal and can be used to undo everything done in this signal.
Signal_Teardown : constant Glib.Signal_Name := "teardown";
Emitted when an object is about to be destroyed.
It is the last signal ever emitted for this Object.
This signal is the opposite of the [signalGtk.SignalListItemFactory::setup] signal and should be used to undo everything done in that signal.
Signal_Unbind : constant Glib.Signal_Name := "unbind";
Emitted when an object has been unbound from its item.
This happens for example when a listitem was removed from use in a list widget and its [propertyGtk.ListItem:item] is about to be unset.
This signal is the opposite of the [signalGtk.SignalListItemFactory::bind] signal and should be used to undo everything done in that signal.