Index

Package: Insert_Column_With_Data_Func_User_Data (generic)

Description

generic
      type User_Data_Type (<>) is private;
      with procedure Destroy (Data : in out User_Data_Type) is null;
   package Insert_Column_With_Data_Func_User_Data is

Types

User_Data_Type

type User_Data_Type (<>) is private;

Gtk_Tree_Cell_Data_Func

type Gtk_Tree_Cell_Data_Func is access procedure
        (Tree_Column : not null access Gtk.Tree_View_Column.Gtk_Tree_View_Column_Record'Class;
         Cell        : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class;
         Tree_Model  : Gtk.Tree_Model.Gtk_Tree_Model;
         Iter        : Gtk.Tree_Model.Gtk_Tree_Iter;
         Data        : User_Data_Type);
A function to set the properties of a cell instead of just using the straight mapping between the cell and the model. This is useful for customizing the cell renderer. For example, a function might get an integer from the Tree_Model, and render it to the "text" attribute of "cell" by converting it to its written equivilent. This is set by calling gtk_tree_view_column_set_cell_data_func "tree_column": A Gtk.Tree_View_Column.Gtk_Tree_View_Column "cell": The Gtk.Cell_Renderer.Gtk_Cell_Renderer that is being rendered by Tree_Column "tree_model": The Gtk.Tree_Model.Gtk_Tree_Model being rendered "iter": A Gtk.Tree_Model.Gtk_Tree_Iter of the current row rendered "data": user data

Subprograms & Entries

Destroy

procedure Destroy 
(Data: in out User_Data_Type) is null;

Insert_Column_With_Data_Func

function Insert_Column_With_Data_Func 
(Tree_View: not null access Gtk.Tree_View.Gtk_Tree_View_Record'Class;
Position: Gint;
Title: UTF8_String;
Cell: not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class;
Func: Gtk_Tree_Cell_Data_Func;
Data: User_Data_Type;
Dnotify: Glib.G_Destroy_Notify_Address) return Gint;
Convenience function that inserts a new column into the Gtk.Tree_View.Gtk_Tree_View with the given cell renderer and a Gtk_Tree_Cell_Data_Func to set cell renderer attributes (normally using data from the model). See also gtk_tree_view_column_set_cell_data_func, gtk_tree_view_column_pack_start. If Tree_View has "fixed_height" mode enabled, then the new column will have its "sizing" property set to be GTK_TREE_VIEW_COLUMN_FIXED. "position": Position to insert, -1 for append "title": column title "cell": cell renderer for column "func": function to set attributes of cell renderer "data": data for Func "dnotify": destroy notifier for Data