Gtk.Tree_View.Insert_Column_With_Data_Func_User_Data

Entities

Generic formal parameters

Access Types

Subprograms

Description

Destroy

procedure Destroy (Data : in out User_Data_Type)
Parameters
Data

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 equivalent. This is set by calling gtk_tree_view_column_set_cell_data_func

Parameters
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

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  : Glib.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 Glib.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.

Parameters
Tree_View
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

Return Value

number of columns in the tree view post-insert

User_Data_Type

type User_Data_Type (<>) is private;