=head1 NAME

Gtk2::TreeSelection

=head1 HIERARCHY

  Glib::Object
  +----Gtk2::TreeSelection


=head1 METHODS

=head2 integer = $selection-E<gt>B<count_selected_rows> 

=over

=back

=head2 boolean = $selection-E<gt>B<iter_is_selected> ($iter)

=over

=over

=item * $iter (Gtk2::TreeIter) 

=back

=back

=head2 selectionmode = $selection-E<gt>B<get_mode> 

=over

=back

=head2 $selection-E<gt>B<set_mode> ($type)

=over

=over

=item * $type (Gtk2::SelectionMode) 

=back

=back

=head2 boolean = $selection-E<gt>B<path_is_selected> ($path)

=over

=over

=item * $path (Gtk2::TreePath) 

=back

=back

=head2 $selection-E<gt>B<select_all> 

=over

=back

=head2 $selection-E<gt>B<set_select_function> ($func, $data=undef)

=over

=over

=item * $func (scalar) 

=item * $data (scalar) 

=back

=back

=head2 $selection-E<gt>B<select_iter> ($iter)

=over

=over

=item * $iter (Gtk2::TreeIter) 

=back

=back

=head2 $selection-E<gt>B<select_path> ($path)

=over

=over

=item * $path (Gtk2::TreePath) 

=back

=back

=head2 $selection-E<gt>B<select_range> ($start_path, $end_path)

=over

=over

=item * $start_path (Gtk2::TreePath) 

=item * $end_path (Gtk2::TreePath) 

=back

=back

=head2 $selection-E<gt>B<selected_foreach> ($func, $data=undef)

=over

=over

=item * $func (subroutine) 

=item * $data (scalar) 

=back

Call I<$func> on every selected row in I<$selection>'s view.

=back

=head2 iter = $tree_selection->B<get_selected>

=head2 (model, iter) = $tree_selection->B<get_selected>

=over

Since most of the time you are only interested in the iter, C<get_selected>
returns only the iter in scalar context.

=back

=head2 @paths = $selection->B<get_selected_rows>

=over

Returns the Gtk2::TreePath of each selected row, or an empty list if no
rows are selected.  The model is I<not> returned, as documented in the C
API reference.  To get the model, try
C<< $selection->get_tree_view->get_model >>.

=back

=head2 treeview = $selection-E<gt>B<get_tree_view> 

=over

=back

=head2 $selection-E<gt>B<unselect_all> 

=over

=back

=head2 $selection-E<gt>B<unselect_iter> ($iter)

=over

=over

=item * $iter (Gtk2::TreeIter) 

=back

=back

=head2 $selection-E<gt>B<unselect_path> ($path)

=over

=over

=item * $path (Gtk2::TreePath) 

=back

=back

=head2 $selection-E<gt>B<unselect_range> ($start_path, $end_path)

=over

=over

=item * $start_path (Gtk2::TreePath) 

=item * $end_path (Gtk2::TreePath) 

=back

Since: gtk+ 2.2

=back

=head2 scalar = $selection-E<gt>B<get_user_data> 

=over

=back


=head1 SIGNALS

=over

=item B<changed> (Gtk2::TreeSelection)

=back


=head1 ENUMS AND FLAGS

=head2 enum Gtk2::SelectionMode

=over

=item * 'none' / 'GTK_SELECTION_NONE'

=item * 'single' / 'GTK_SELECTION_SINGLE'

=item * 'browse' / 'GTK_SELECTION_BROWSE'

=item * 'multiple' / 'GTK_SELECTION_MULTIPLE'

=item * 'extended' / 'GTK_SELECTION_EXTENDED'

=back



=head1 SEE ALSO

L<Gtk2>, L<Glib::Object>

=head1 COPYRIGHT

Copyright (C) 2003-2007 by the gtk2-perl team.

This software is licensed under the LGPL.  See L<Gtk2> for a full notice.


=cut

