Compilation Units
Tagged Types
procedure Bind_Model
(Self : not null access Gtk.List_Box.Gtk_List_Box_Record'Class;
Model : Glib.List_Model.Glist_Model;
Create_Widget_Func : Gtk_List_Box_Create_Widget_Func;
User_Data : User_Data_Type)
Binds Model to Box. If Box was already bound to a model, that previous binding is destroyed. The contents of Box are cleared and then filled with widgets that represent items from Model. Box is updated whenever Model changes. If Model is null, Box is left empty. It is undefined to add or remove widgets directly (for example, with [methodGtk.ListBox.insert]) while Box is bound to a model. Note that using a model is incompatible with the filtering and sorting functionality in GtkListBox. When using a model, filtering and sorting should be implemented by the model.
the GListModel to be bound to Box
a function that creates widgets for items or null in case you also passed null as Model
user data passed to Create_Widget_Func
procedure Destroy (Data : in out User_Data_Type)
type Gtk_List_Box_Create_Widget_Func is access function
(Item : System.Address;
User_Data : User_Data_Type) return Gtk.Widget.Gtk_Widget;
Called for list boxes that are bound to a GListModel with Gtk.List_Box.Bind_Model for each item that gets added to the model. If the widget returned is not a Gtk.List_Box_Row.Gtk_List_Box_Row widget, then the widget will be inserted as the child of an intermediate Gtk.List_Box_Row.Gtk_List_Box_Row.
the item from the model for which to create a widget for
user data
a GtkWidget that represents Item. Has transfer-ownership='full'.
type User_Data_Type (<>) is private;