Gtk.Tree_View.Set_Column_Drag_Function_User_Data

Entities

Generic formal parameters

Access Types

Subprograms

Description

Destroy

procedure Destroy (Data : in out User_Data_Type)
Parameters
Data

Gtk_Tree_View_Column_Drop_Func

type Gtk_Tree_View_Column_Drop_Func is access function
  (Tree_View   : not null access Gtk.Tree_View.Gtk_Tree_View_Record'Class;
   Column      : not null access Gtk.Tree_View_Column.Gtk_Tree_View_Column_Record'Class;
   Prev_Column : not null access Gtk.Tree_View_Column.Gtk_Tree_View_Column_Record'Class;
   Next_Column : not null access Gtk.Tree_View_Column.Gtk_Tree_View_Column_Record'Class;
   Data        : User_Data_Type) return Boolean;

Function type for determining whether Column can be dropped in a particular spot (as determined by Prev_Column and Next_Column). In left to right locales, Prev_Column is on the left of the potential drop spot, and Next_Column is on the right. In right to left mode, this is reversed. This function should return True if the spot is a valid drop spot. Please note that returning True does not actually indicate that the column drop was made, but is meant only to indicate a possible drop spot to the user.

Parameters
Tree_View

A Gtk.Tree_View.Gtk_Tree_View

Column

The Gtk.Tree_View_Column.Gtk_Tree_View_Column being dragged

Prev_Column

A Gtk.Tree_View_Column.Gtk_Tree_View_Column on one side of Column

Next_Column

A Gtk.Tree_View_Column.Gtk_Tree_View_Column on the other side of Column

Data

user data

Return Value

True, if Column can be dropped in this spot

Set_Column_Drag_Function

procedure Set_Column_Drag_Function
   (Tree_View : not null access Gtk.Tree_View.Gtk_Tree_View_Record'Class;
    Func      : Gtk_Tree_View_Column_Drop_Func;
    User_Data : User_Data_Type)

Sets a user function for determining where a column may be dropped when dragged. This function is called on every column pair in turn at the beginning of a column drag to determine where a drop can take place. The arguments passed to Func are: the Tree_View, the Gtk.Tree_View_Column.Gtk_Tree_View_Column being dragged, the two Gtk.Tree_View_Column.Gtk_Tree_View_Column s determining the drop spot, and User_Data. If either of the Gtk.Tree_View_Column.Gtk_Tree_View_Column arguments for the drop spot are null, then they indicate an edge. If Func is set to be null, then Tree_View reverts to the default behavior of allowing all columns to be dropped everywhere.

Parameters
Tree_View
Func

A function to determine which columns are reorderable, or null.

User_Data

User data to be passed to Func, or null

User_Data_Type

type User_Data_Type (<>) is private;