procedure Destroy (Data : in out User_Data_Type)
type Gtk_List_Box_Update_Header_Func is access procedure
(Row : not null access Gtk.List_Box_Row.Gtk_List_Box_Row_Record'Class;
Before : access Gtk.List_Box_Row.Gtk_List_Box_Row_Record'Class;
User_Data : User_Data_Type);
Whenever Row changes or which row is before Row changes this is called, which lets you update the header on Row. You may remove or set a new one via gtk_list_box_row_set_header or just change the state of the current header widget. Since: gtk+ 3.10
the row to update
the row before Row, or null if it is first
user data
procedure Set_Header_Func
(Self : not null access Gtk.List_Box.Gtk_List_Box_Record'Class;
Update_Header : Gtk_List_Box_Update_Header_Func;
User_Data : User_Data_Type)
By setting a header function on the Box one can dynamically add headers in front of rows, depending on the contents of the row and its position in the list. For instance, one could use it to add headers in front of the first item of a new kind, in a list sorted by the kind. The Update_Header can look at the current header widget using Gtk.List_Box_Row.Get_Header and either update the state of the widget as needed, or set a new one using Gtk.List_Box_Row.Set_Header. If no header is needed, set the header to null. Note that you may get many calls Update_Header to this for a particular row when e.g. changing things that don't affect the header. In this case it is important for performance to not blindly replace an existing header with an identical one. The Update_Header function will be called for each row after the call, and it will continue to be called each time a row changes (via Gtk.List_Box_Row.Changed) and when the row before changes (either by Gtk.List_Box_Row.Changed on the previous row, or when the previous row becomes a different row). It is also called for all rows when Gtk.List_Box.Invalidate_Headers is called. Since: gtk+ 3.10
callback that lets you add row headers
user data passed to Update_Header
type User_Data_Type (<>) is private;