PHP-GTK
Wednesday, August 27, 2014 
download | documentation | applications | faq | changelog | resources 


search for in the  


previousGtkTreeStore::set_column_types
GtkTreeView Constructornext

Last updated: Sun, 12 May 2013
view this page in English

GtkTreeView

A widget for displaying both trees and lists.

Object Hierarchy

Direct Subclasses

Description

A GtkTreeView can display both list and tree structures. To display a list, pass a GtkListStore object to the constructor or set_model() . For a tree, use a GtkTreeStore object. Basically any object of a class that implements the GtkTreeModel interface is suitable.

After creating the view and setting the model, you need to create some GtkTreeViewColumns and add them to the view with append_column() . The column widgets themselves need some GtkCellRenderers that actually draw and display the data of the model.

To obtain the selected rows of the view, get the view's GtkTreeSelection object that manages the selection by using get_selection() . If you want to track if it changes, connect its "changed" signal.

Constructors

-- Create a new tree view.

Methods

append_column()
  Appends a column to the view.
collapse_all()
  Collapses all nodes.
collapse_row()
  Collapses a given row.
columns_autosize()
  Resizes all columns to their optimal width.
create_row_drag_icon()
  Creates a GdkPixmap representation of the row
expand_all()
  Recursively expands all nodes in the tree view.
expand_row()
  Opens the row so its children are visible.
expand_to_path()
  Expands the row to a path.
get_background_area()
 
get_bin_window()
  Returns the window that the view renders to.
get_cell_area()
 
get_column()
  Gets the GtkTreeViewColumn at the given position
get_columns()
 
get_cursor()
  Returns the current path and focus column.
get_enable_search()
  Whether or not the tree allows interactive searching.
get_expander_column()
  Returns the column that is the current expander column.
get_fixed_height_mode()
  Whether fixed height mode is turned on or not.
get_hadjustment()
  Gets the GtkAdjustment for the horizontal aspect.
get_headers_visible()
  If the headers on the view are visible.
get_hover_expand()
  Whether hover expansion mode is turned on.
get_hover_selection()
  Whether hover selection mode is turned on.
get_model()
  Returns the model used.
get_path_at_pos()
  Returns the tree path at a pixel position.
get_reorderable()
  Whether the user can reorder rows via drag-and-drop.
get_rules_hint()
  Returns the rules_hint setting.
get_search_column()
  Returns the column id used for searches.
get_selection()
  Returns the selection object associated with the view.
get_vadjustment()
 
get_visible_rect()
 
insert_column()
 
insert_column_with_data_func()
  Inserts a column at the given position with a data function assigned.
move_column_after()
 
remove_column()
 
row_activated()
 
row_expanded()
 
scroll_to_cell()
 
scroll_to_point()
 
set_column_drag_function()
 
set_cursor()
 
set_cursor_on_cell()
 
set_drag_dest_row()
 
set_enable_search()
  Sets whether or not interactive search is enabled for the view.
set_expander_column()
 
set_fixed_height_mode()
 
set_hadjustment()
  Sets the GtkAdjustment for the current horizontal aspect.
set_headers_clickable()
 
set_headers_visible()
 
set_hover_expand()
 
set_hover_selection()
 
set_model()
  Sets the model for the view.
set_reorderable()
  Allow/disallow reordering of model rows.
set_row_separator_func()
 
set_rules_hint()
 
set_search_column()
  Sets the column of the interactive search.
set_search_equal_func()
 
set_vadjustment()
  Sets the GtkAdjustment for the current vertical aspect.
tree_to_widget_coords()
 
unset_rows_drag_dest()
 
unset_rows_drag_source()
 
widget_to_tree_coords()
 
enable_model_drag_dest()
 
enable_model_drag_source()
 
get_dest_row_at_pos()
 
get_drag_dest_row()
 
get_enable_tree_lines()
 
get_grid_lines()
 
get_headers_clickable()
 
get_rubber_banding()
 
get_search_entry()
 
get_visible_range()
 
set_enable_tree_lines()
 
set_grid_lines()
 
set_rubber_banding()
 
set_search_entry()
 

Signals

"columns-changed"
 
"cursor-changed"
 
"expand-collapse-cursor-row"
 
"move-cursor"
 
"row-activated"
  Signal emmitted when a row in a GtkTreeView is double-clicked.
"row-collapsed"
 
"row-expanded"
 
"select-all"
 
"select-cursor-parent"
 
"select-cursor-row"
 
"set-scroll-adjustments"
 
"start-interactive-search"
 
"test-collapse-row"
 
"test-expand-row"
 
"toggle-cursor-row"
 
"unselect-all"
 


User Contributed Notes
gtk.gtktreeview.php
add a note about notes
There are no user contributed notes for this page.


previousGtkTreeStore::set_column_types
GtkTreeView Constructornext

Last updated: Sun, 12 May 2013
view this page in English


credits 

PHP  Copyright © 2001-2014 The PHP Group
 All rights reserved.
Last updated: Sun May 12 20:51:01 2013 CEST