Gtk.Tree_Selection.Set_Select_Function_User_Data

Entities

Generic formal parameters

Access Types

Subprograms

Description

Destroy

procedure Destroy (Data : in out User_Data_Type)
Parameters
Data

Gtk_Tree_Selection_Func

type Gtk_Tree_Selection_Func is access function
  (Selection               : not null access Gtk.Tree_Selection.Gtk_Tree_Selection_Record'Class;
   Model                   : Gtk.Tree_Model.Gtk_Tree_Model;
   Path                    : Gtk.Tree_Model.Gtk_Tree_Path;
   Path_Currently_Selected : Boolean;
   Data                    : User_Data_Type) return Boolean;

A function used by Gtk.Tree_Selection.Set_Select_Function to filter whether or not a row may be selected. It is called whenever a row's state might change. A return value of True indicates to Selection that it is okay to change the selection.

Parameters
Selection

A Gtk.Tree_Selection.Gtk_Tree_Selection

Model

A Gtk.Tree_Model.Gtk_Tree_Model being viewed

Path

The Gtk.Tree_Model.Gtk_Tree_Path of the row in question

Path_Currently_Selected

True, if the path is currently selected

Data

user data

Return Value

True, if the selection state of the row can be toggled

Set_Select_Function

procedure Set_Select_Function
   (Selection : not null access Gtk.Tree_Selection.Gtk_Tree_Selection_Record'Class;
    Func      : Gtk_Tree_Selection_Func;
    Data      : User_Data_Type)

Sets the selection function. If set, this function is called before any node is selected or unselected, giving some control over which nodes are selected. The select function should return True if the state of the node may be toggled, and False if the state of the node should be left unchanged.

Parameters
Selection
Func

The selection function. May be null

Data

The selection function's data. May be null

User_Data_Type

type User_Data_Type (<>) is private;