Compilation Units
Tagged Types
procedure Destroy (Data : in out User_Data_Type)
type Gtk_Tree_Model_Filter_Visible_Func is access function
(Model : Gtk.Tree_Model.Gtk_Tree_Model;
Iter : Gtk.Tree_Model.Gtk_Tree_Iter;
Data : User_Data_Type) return Boolean;
A function which decides whether the row indicated by Iter is visible.
the child model of the GtkTreeModelFilter
a GtkTreeIter pointing to the row in Model whose visibility is determined
user data given to Gtk.Tree_Model_Filter.Set_Visible_Func
Whether the row indicated by Iter is visible.
procedure Set_Visible_Func
(Self : not null access Gtk.Tree_Model_Filter.Gtk_Tree_Model_Filter_Record'Class;
Func : Gtk_Tree_Model_Filter_Visible_Func;
Data : User_Data_Type)
Sets the visible function used when filtering the Filter to be Func. The function should return True if the given row should be visible and False otherwise. If the condition calculated by the function changes over time (e.g. because it depends on some global parameters), you must call Gtk.Tree_Model_Filter.Refilter to keep the visibility information of the model up-to-date. Note that Func is called whenever a row is inserted, when it may still be empty. The visible function should therefore take special care of empty rows, like in the example below.
*iter, gpointer data) { // Visible if row is non-empty and first
column is "HI" char *str; gboolean visible = FALSE;
gtk_tree_model_get (model, iter, 0, &str, -1); if (str && strcmp
(str, "HI") == 0) visible = TRUE; g_free (str);
return visible; } ```
Note that Gtk.Tree_Model_Filter.Set_Visible_Func or
Gtk.Tree_Model_Filter.Set_Visible_Column can only be called once for
a given filter model.
Deprecated since 4.10, 1
A GtkTreeModelFilterVisibleFunc, the visible function
User data to pass to the visible function
type User_Data_Type (<>) is private;