Description
The
Gtk_Tree_Selection object is a helper object to manage the selection
for a Gtk_Tree_View widget. The
Gtk_Tree_Selection object is automatically
created when a new Gtk_Tree_View widget is created, and cannot exist
independentally of this widget. The primary reason the
Gtk_Tree_Selection
objects exists is for cleanliness of code and API. That is, there is no
conceptual reason all these functions could not be methods on the
Gtk_Tree_View widget instead of separate function.
The Gtk_Tree_Selection object is gotten from a Gtk_Tree_View by calling
Gtk.Tree_View.Get_Selection. It can be manipulated to check the selection
status of the tree, as well as select and deselect individual rows.
Selection is done completely view side. As a result, multiple views of the
same model can have completely different selections. Additionally, you
cannot change the selection of a row on the model that is not currently
displayed by the view without expanding its parents first.
One of the important things to remember when monitoring the selection of a
view is that the "changed" signal is mostly a hint. That is, it may only
emit one signal when a range of rows is selected. Additionally, it may on
occasion emit a "changed" signal when nothing has happened (mostly as a
result of programmers calling select_row on an already selected row).
Types
-
type Data_Type is private;
-
type Data_Type_Access is access all Data_Type;
-
-
type Gtk_Tree_Selection is access all Gtk_Tree_Selection_Record'Class;
-
Subprograms
-
-
procedure Set_Mode
(Selection : access Gtk_Tree_Selection_Record'Class;
The_Type : Gtk_Selection_Mode);
function Get_Mode
(Selection : access Gtk_Tree_Selection_Record'Class)
return Gtk_Selection_Mode;
-
function Get_Tree_View
(Selection :
access Gtk_Tree_Selection_Record'Class)
return Gtk.Widget.Gtk_Widget;
-
function Count_Selected_Rows
(Selection : access Gtk_Tree_Selection_Record) return Gint;
-
-
procedure Get_Selected_Rows
(Selection :
access Gtk_Tree_Selection_Record;
Model :
out Gtk.Tree_Model.Gtk_Tree_Model;
Path_List :
out Gtk.Tree_Model.Gtk_Tree_Path_List.Glist);
-
procedure Selected_Foreach
(Selection : access Gtk_Tree_Selection_Record'Class;
Func : Foreach_Func;
Data : Data_Type_Access);
-
-
-
-
-
procedure Select_All (Selection : access Gtk_Tree_Selection_Record'Class);
procedure Unselect_All (Selection : access Gtk_Tree_Selection_Record'Class);
-