=head1 NAME

Gtk2::TreeView

=head1 HIERARCHY

  Glib::Object
  +----Glib::Object::_Unregistered::GInitiallyUnowned
       +----Gtk2::Object
            +----Gtk2::Widget
                 +----Gtk2::Container
                      +----Gtk2::TreeView

=head1 INTERFACES

  Glib::Object::_Unregistered::AtkImplementorIface


=head1 METHODS

=head2 widget = Gtk2::TreeView-E<gt>B<new> ($model=undef)

=over

=over

=item * $model (Gtk2::TreeModel) 

=back

=back

=head2 widget = Gtk2::TreeView-E<gt>B<new_with_model> ($model)

=over

=over

=item * $model (Gtk2::TreeModel) 

=back

=back

=head2 integer = $tree_view-E<gt>B<append_column> ($column)

=over

=over

=item * $column (Gtk2::TreeViewColumn) 

=back

=back

=head2 rectangle = $tree_view-E<gt>B<get_background_area> ($path, $column)

=over

=over

=item * $path (Gtk2::TreePath or undef) 

=item * $column (Gtk2::TreeViewColumn or undef) 

=back

=back

=head2 window = $tree_view-E<gt>B<get_bin_window> 

=over

=back

=head2 rectangle = $tree_view-E<gt>B<get_cell_area> ($path, $column)

=over

=over

=item * $path (Gtk2::TreePath or undef) 

=item * $column (Gtk2::TreeViewColumn or undef) 

=back

=back

=head2 $tree_view-E<gt>B<collapse_all> 

=over

=back

=head2 boolean = $tree_view-E<gt>B<collapse_row> ($path)

=over

=over

=item * $path (Gtk2::TreePath) 

=back

=back

=head2 $tree_view-E<gt>B<set_column_drag_function> ($func, $data=undef)

=over

=over

=item * $func (scalar) 

=item * $data (scalar) 

=back

=back

=head2 treeviewcolumn = $tree_view-E<gt>B<get_column> ($n)

=over

=over

=item * $n (integer) 

=back

=back

=head2 $tree_view-E<gt>B<columns_autosize> 

=over

=back

=head2 list = $tree_view-E<gt>B<get_columns> 

=over

Retuns an array of columns.

=back

=head2 pixmap = $tree_view-E<gt>B<create_row_drag_icon> ($path)

=over

=over

=item * $path (Gtk2::TreePath) 

=back

=back

=head2 (path, focus_column) = $tree_view->B<get_cursor>

=over

Returns the Gtk2::TreePath and Gtk2::TreeViewColumn of the cell with the
keyboard focus cursor.  Either may be undef.

=back

=head2 $tree_view-E<gt>B<set_cursor_on_cell> ($path, $focus_column, $focus_cell, $start_editing)

=over

=over

=item * $path (Gtk2::TreePath) 

=item * $focus_column (Gtk2::TreeViewColumn or undef) 

=item * $focus_cell (Gtk2::CellRenderer or undef) 

=item * $start_editing (boolean) 

=back

=back

=head2 $tree_view-E<gt>B<set_cursor> ($path, $focus_column=undef, $start_editing=FALSE)

=over

=over

=item * $path (Gtk2::TreePath) 

=item * $focus_column (Gtk2::TreeViewColumn or undef) 

=item * $start_editing (boolean) 

=back

=back

=head2 (path, dropposition) = $tree_view->B<get_dest_row_at_pos> ($drag_x, $drag_y)

=over

=over

=item * $drag_x (integer) 

=item * $drag_y (integer) 

=back



=back

=head2 (path, dropposition) = $tree_view->B<get_drag_dest_row>

=over



=back

=head2 $tree_view-E<gt>B<set_drag_dest_row> ($path, $pos)

=over

=over

=item * $path (Gtk2::TreePath or undef) 

=item * $pos (Gtk2::TreeViewDropPosition) 

=back

=back

=head2 $tree_view-E<gt>B<enable_model_drag_dest> ($actions, ...)

=over

=over

=item * $actions (Gtk2::Gdk::DragAction) 

=item * ... (list) of Gtk2::TargetEntry's

=back



=back

=head2 $tree_view-E<gt>B<enable_model_drag_source> ($start_button_mask, $actions, ...)

=over

=over

=item * $start_button_mask (Gtk2::Gdk::ModifierType) 

=item * $actions (Gtk2::Gdk::DragAction) 

=item * ... (list) of Gtk2::TargetEntry's

=back



=back

=head2 boolean = $tree_view-E<gt>B<get_enable_search> 

=over

=back

=head2 $tree_view-E<gt>B<set_enable_search> ($enable_search)

=over

=over

=item * $enable_search (boolean) 

=back

=back

=head2 $tree_view-E<gt>B<expand_all> 

=over

=back

=head2 boolean = $tree_view-E<gt>B<expand_row> ($path, $open_all)

=over

=over

=item * $path (Gtk2::TreePath) 

=item * $open_all (boolean) 

=back

=back

=head2 $tree_view-E<gt>B<expand_to_path> ($path)

=over

=over

=item * $path (Gtk2::TreePath) 

=back

=back

=head2 treeviewcolumn or undef = $tree_view-E<gt>B<get_expander_column> 

=over

=back

=head2 $tree_view-E<gt>B<set_expander_column> ($column)

=over

=over

=item * $column (Gtk2::TreeViewColumn or undef) 

=back

=back

=head2 boolean = $treeview-E<gt>B<get_fixed_height_mode> 

=over

=back

=head2 $treeview-E<gt>B<set_fixed_height_mode> ($enable)

=over

=over

=item * $enable (boolean) 

=back

=back

=head2 adjustment or undef = $tree_view-E<gt>B<get_hadjustment> 

=over

=back

=head2 $tree_view-E<gt>B<set_hadjustment> ($adjustment)

=over

=over

=item * $adjustment (Gtk2::Adjustment or undef) 

=back

=back

=head2 $tree_view-E<gt>B<set_headers_clickable> ($setting)

=over

=over

=item * $setting (boolean) 

=back

=back

=head2 boolean = $tree_view-E<gt>B<get_headers_visible> 

=over

=back

=head2 $tree_view-E<gt>B<set_headers_visible> ($headers_visible)

=over

=over

=item * $headers_visible (boolean) 

=back

=back

=head2 boolean = $treeview-E<gt>B<get_hover_expand> 

=over

=back

=head2 $treeview-E<gt>B<set_hover_expand> ($expand)

=over

=over

=item * $expand (boolean) 

=back

=back

=head2 boolean = $treeview-E<gt>B<get_hover_selection> 

=over

=back

=head2 $treeview-E<gt>B<set_hover_selection> ($hover)

=over

=over

=item * $hover (boolean) 

=back

=back

=head2 integer = $tree_view-E<gt>B<insert_column> ($column, $position)

=over

=over

=item * $column (Gtk2::TreeViewColumn) 

=item * $position (integer) 

=back

=back

=head2 $tree_view->B<insert_column_with_attributes> ($position, $title, $cellrenderer, $attr1, $col1, $attr2, $col2, ...)

=over

=over

=item * $position (integer) 

=item * $title (string) 

=item * $cell (Gtk2::CellRenderer) 

=item * ... (list) 

=back



=back

=head2 integer = $tree_view-E<gt>B<insert_column_with_data_func> ($position, $title, $cell, $func, $data=undef)

=over

=over

=item * $position (integer) 

=item * $title (string) 

=item * $cell (Gtk2::CellRenderer) 

=item * $func (subroutine) 

=item * $data (scalar) 

=back


Insert a column that calls I<$func> every time it needs to fetch the data for
a cell.  I<$func> will get a cell renderer, the tree model, and the iter of
the row in question, and should set the proper value into the cell renderer.


=back

=head2 $tree_view-E<gt>B<map_expanded_rows> ($func, $data=undef)

=over

=over

=item * $func (scalar) 

=item * $data (scalar) 

=back

=back

=head2 treemodel or undef = $tree_view-E<gt>B<get_model> 

=over

=back

=head2 $tree_view-E<gt>B<set_model> ($model)

=over

=over

=item * $model (Gtk2::TreeModel or undef) 

=back

=back

=head2 $tree_view-E<gt>B<move_column_after> ($column, $base_column)

=over

=over

=item * $column (Gtk2::TreeViewColumn) 

=item * $base_column (Gtk2::TreeViewColumn or undef) 

=back

=back

=head2 path = $tree_view->B<get_path_at_pos> ($x, $y)

=head2 (path, column, cell_x, cell_y) = $tree_view->B<get_path_at_pos> ($x, $y)

=over

=over

=item * $x (integer) 

=item * $y (integer) 

=back


Finds the path at the point (I<$x>, I<$y>), relative to widget
coordinates. That is, I<$x> and I<$y> are relative to an event's
coordinates. I<$x> and I<$y> must come from an event on the I<$tree_view> only
where C<$event-E<gt>window == $tree_view-E<gt>get_bin_window>. It is primarily
for things like popup menus.  In scalar context, returns the Gtk2::TreePath, in
array context, adds the Gtk2::TreeViewColumn, and I<$x> and I<$y> translated to
be relative to the cell.  This function is only meaningful if I<$tree_view> is
realized.


=back

=head2 integer = $tree_view-E<gt>B<remove_column> ($column)

=over

=over

=item * $column (Gtk2::TreeViewColumn) 

=back

=back

=head2 boolean = $tree_view-E<gt>B<get_reorderable> 

=over

=back

=head2 $tree_view-E<gt>B<set_reorderable> ($reorderable)

=over

=over

=item * $reorderable (boolean) 

=back

=back

=head2 $tree_view-E<gt>B<row_activated> ($path, $column)

=over

=over

=item * $path (Gtk2::TreePath) 

=item * $column (Gtk2::TreeViewColumn) 

=back

=back

=head2 boolean = $tree_view-E<gt>B<row_expanded> ($path)

=over

=over

=item * $path (Gtk2::TreePath) 

=back

=back

=head2 $tree_view-E<gt>B<set_row_separator_func> ($func, $data=undef)

=over

=over

=item * $func (scalar) 

=item * $data (scalar) 

=back

=back

=head2 boolean = $tree_view-E<gt>B<get_rules_hint> 

=over

=back

=head2 $tree_view-E<gt>B<set_rules_hint> ($setting)

=over

=over

=item * $setting (boolean) 

=back

=back

=head2 $tree_view-E<gt>B<scroll_to_cell> ($path, $column=undef, $use_align=FALSE, $row_align=0.0, $col_align=0.0)

=over

=over

=item * $path (Gtk2::TreePath or undef) 

=item * $column (Gtk2::TreeViewColumn or undef) 

=item * $use_align (boolean) 

=item * $row_align (double) 

=item * $col_align (double) 

=back

=back

=head2 $tree_view-E<gt>B<scroll_to_point> ($tree_x, $tree_y)

=over

=over

=item * $tree_x (scalar) 

=item * $tree_y (scalar) 

=back

=back

=head2 integer = $tree_view-E<gt>B<get_search_column> 

=over

=back

=head2 $tree_view-E<gt>B<set_search_column> ($column)

=over

=over

=item * $column (integer) 

=back

=back

=head2 $tree_view-E<gt>B<set_search_equal_func> ($func, $data=undef)

=over

=over

=item * $func (subroutine) 

=item * $data (scalar) 

=back



=back

=head2 treeselection = $tree_view-E<gt>B<get_selection> 

=over

=back

=head2 (wx, wy) = $tree_view-E<gt>B<tree_to_widget_coords> ($tx, $ty)

=over

=over

=item * $tx (integer) 

=item * $ty (integer) 

=back

=back

=head2 $tree_view-E<gt>B<unset_rows_drag_dest> 

=over

=back

=head2 $tree_view-E<gt>B<unset_rows_drag_source> 

=over

=back

=head2 adjustment or undef = $tree_view-E<gt>B<get_vadjustment> 

=over

=back

=head2 $tree_view-E<gt>B<set_vadjustment> ($adjustment)

=over

=over

=item * $adjustment (Gtk2::Adjustment or undef) 

=back

=back

=head2 list = $tree_view-E<gt>B<get_visible_range> 

=over

=back

=head2 rectangle = $tree_view-E<gt>B<get_visible_rect> 

=over

=back

=head2 (tx, ty) = $tree_view-E<gt>B<widget_to_tree_coords> ($wx, $wy)

=over

=over

=item * $wx (integer) 

=item * $wy (integer) 

=back

=back


=head1 PROPERTIES

=over

=item 'enable-search' (boolean : readable / writable / private)

View allows user to search through columns interactively

=item 'expander-column' (Gtk2::TreeViewColumn : readable / writable / private)

Set the column for the expander column

=item 'fixed-height-mode' (boolean : readable / writable / private)

Speeds up GtkTreeView by assuming that all rows have the same height

=item 'hadjustment' (Gtk2::Adjustment : readable / writable / private)

Horizontal Adjustment for the widget

=item 'headers-clickable' (boolean : readable / writable / private)

Column headers respond to click events

=item 'headers-visible' (boolean : readable / writable / private)

Show the column header buttons

=item 'hover-expand' (boolean : readable / writable / private)

Whether rows should be expanded/collapsed when the pointer moves over them

=item 'hover-selection' (boolean : readable / writable / private)

Whether the selection should follow the pointer

=item 'model' (Gtk2::TreeModel : readable / writable / private)

The model for the tree view

=item 'reorderable' (boolean : readable / writable / private)

View is reorderable

=item 'rules-hint' (boolean : readable / writable / private)

Set a hint to the theme engine to draw rows in alternating colors

=item 'search-column' (integer : readable / writable / private)

Model column to search through when searching through code

=item 'vadjustment' (Gtk2::Adjustment : readable / writable / private)

Vertical Adjustment for the widget

=back


=head1 SIGNALS

=over

=item B<set-scroll-adjustments> (Gtk2::TreeView, Gtk2::Adjustment, Gtk2::Adjustment)

=item B<row-activated> (Gtk2::TreeView, Gtk2::TreePath, Gtk2::TreeViewColumn)

=item boolean = B<test-expand-row> (Gtk2::TreeView, Gtk2::TreeIter, Gtk2::TreePath)

=item boolean = B<test-collapse-row> (Gtk2::TreeView, Gtk2::TreeIter, Gtk2::TreePath)

=item B<row-expanded> (Gtk2::TreeView, Gtk2::TreeIter, Gtk2::TreePath)

=item B<row-collapsed> (Gtk2::TreeView, Gtk2::TreeIter, Gtk2::TreePath)

=item B<columns-changed> (Gtk2::TreeView)

=item B<cursor-changed> (Gtk2::TreeView)

=item boolean = B<move-cursor> (Gtk2::TreeView, Gtk2::MovementStep, integer)

=item boolean = B<select-all> (Gtk2::TreeView)

=item boolean = B<unselect-all> (Gtk2::TreeView)

=item boolean = B<select-cursor-row> (Gtk2::TreeView, boolean)

=item boolean = B<toggle-cursor-row> (Gtk2::TreeView)

=item boolean = B<expand-collapse-cursor-row> (Gtk2::TreeView, boolean, boolean, boolean)

=item boolean = B<select-cursor-parent> (Gtk2::TreeView)

=item boolean = B<start-interactive-search> (Gtk2::TreeView)

=back


=head1 ENUMS AND FLAGS

=head2 flags Gtk2::Gdk::DragAction

=over

=item * 'default' / 'GDK_ACTION_DEFAULT'

=item * 'copy' / 'GDK_ACTION_COPY'

=item * 'move' / 'GDK_ACTION_MOVE'

=item * 'link' / 'GDK_ACTION_LINK'

=item * 'private' / 'GDK_ACTION_PRIVATE'

=item * 'ask' / 'GDK_ACTION_ASK'

=back


=head2 flags Gtk2::Gdk::ModifierType

=over

=item * 'shift-mask' / 'GDK_SHIFT_MASK'

=item * 'lock-mask' / 'GDK_LOCK_MASK'

=item * 'control-mask' / 'GDK_CONTROL_MASK'

=item * 'mod1-mask' / 'GDK_MOD1_MASK'

=item * 'mod2-mask' / 'GDK_MOD2_MASK'

=item * 'mod3-mask' / 'GDK_MOD3_MASK'

=item * 'mod4-mask' / 'GDK_MOD4_MASK'

=item * 'mod5-mask' / 'GDK_MOD5_MASK'

=item * 'button1-mask' / 'GDK_BUTTON1_MASK'

=item * 'button2-mask' / 'GDK_BUTTON2_MASK'

=item * 'button3-mask' / 'GDK_BUTTON3_MASK'

=item * 'button4-mask' / 'GDK_BUTTON4_MASK'

=item * 'button5-mask' / 'GDK_BUTTON5_MASK'

=item * 'release-mask' / 'GDK_RELEASE_MASK'

=item * 'modifier-mask' / 'GDK_MODIFIER_MASK'

=back


=head2 enum Gtk2::MovementStep

=over

=item * 'logical-positions' / 'GTK_MOVEMENT_LOGICAL_POSITIONS'

=item * 'visual-positions' / 'GTK_MOVEMENT_VISUAL_POSITIONS'

=item * 'words' / 'GTK_MOVEMENT_WORDS'

=item * 'display-lines' / 'GTK_MOVEMENT_DISPLAY_LINES'

=item * 'display-line-ends' / 'GTK_MOVEMENT_DISPLAY_LINE_ENDS'

=item * 'paragraphs' / 'GTK_MOVEMENT_PARAGRAPHS'

=item * 'paragraph-ends' / 'GTK_MOVEMENT_PARAGRAPH_ENDS'

=item * 'pages' / 'GTK_MOVEMENT_PAGES'

=item * 'buffer-ends' / 'GTK_MOVEMENT_BUFFER_ENDS'

=item * 'horizontal-pages' / 'GTK_MOVEMENT_HORIZONTAL_PAGES'

=back


=head2 enum Gtk2::TreeViewDropPosition



=over

=item * 'before' / 'GTK_TREE_VIEW_DROP_BEFORE'

=item * 'after' / 'GTK_TREE_VIEW_DROP_AFTER'

=item * 'into-or-before' / 'GTK_TREE_VIEW_DROP_INTO_OR_BEFORE'

=item * 'into-or-after' / 'GTK_TREE_VIEW_DROP_INTO_OR_AFTER'

=back



=head1 SEE ALSO

L<Gtk2>, L<Glib::Object>, L<Glib::Object::_Unregistered::GInitiallyUnowned>, L<Gtk2::Object>, L<Gtk2::Widget>, L<Gtk2::Container>

=head1 COPYRIGHT

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

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


=cut

