GtkTreeView {RGtk2}R Documentation

GtkTreeView

Description

A widget for displaying both trees and lists

Methods and Functions

gtkTreeViewNew(show = TRUE)
gtkTreeViewGetLevelIndentation(object)
gtkTreeViewGetShowExpanders(object)
gtkTreeViewSetLevelIndentation(object, indentation)
gtkTreeViewSetShowExpanders(object, enabled)
gtkTreeViewNewWithModel(model = NULL, show = TRUE)
gtkTreeViewGetModel(object)
gtkTreeViewSetModel(object, model = NULL)
gtkTreeViewGetSelection(object)
gtkTreeViewGetHadjustment(object)
gtkTreeViewSetHadjustment(object, adjustment)
gtkTreeViewGetVadjustment(object)
gtkTreeViewSetVadjustment(object, adjustment)
gtkTreeViewGetHeadersVisible(object)
gtkTreeViewSetHeadersVisible(object, headers.visible)
gtkTreeViewColumnsAutosize(object)
gtkTreeViewGetHeadersClickable(object)
gtkTreeViewSetHeadersClickable(object, active)
gtkTreeViewSetRulesHint(object, setting)
gtkTreeViewGetRulesHint(object)
gtkTreeViewAppendColumn(object, column)
gtkTreeViewRemoveColumn(object, column)
gtkTreeViewInsertColumn(object, column, position)
gtkTreeViewInsertColumnWithAttributes(object, position, title, cell, ...)
gtkTreeViewInsertColumnWithDataFunc(object, position, title, cell, func, data = NULL)
gtkTreeViewGetColumn(object, n)
gtkTreeViewGetColumns(object)
gtkTreeViewMoveColumnAfter(object, column, base.column = NULL)
gtkTreeViewSetExpanderColumn(object, column)
gtkTreeViewGetExpanderColumn(object)
gtkTreeViewSetColumnDragFunction(object, func, user.data = NULL)
gtkTreeViewScrollToPoint(object, tree.x, tree.y)
gtkTreeViewScrollToCell(object, path, column = NULL, use.align = FALSE, row.align = 0, col.align = 0)
gtkTreeViewSetCursor(object, path, focus.column = NULL, start.editing = FALSE)
gtkTreeViewSetCursorOnCell(object, path, focus.column = NULL, focus.cell = NULL, start.editing = FALSE)
gtkTreeViewGetCursor(object)
gtkTreeViewRowActivated(object, path, column)
gtkTreeViewExpandAll(object)
gtkTreeViewCollapseAll(object)
gtkTreeViewExpandToPath(object, path)
gtkTreeViewExpandRow(object, path, open.all)
gtkTreeViewCollapseRow(object, path)
gtkTreeViewMapExpandedRows(object, func, data = NULL)
gtkTreeViewRowExpanded(object, path)
gtkTreeViewSetReorderable(object, reorderable)
gtkTreeViewGetReorderable(object)
gtkTreeViewGetPathAtPos(object, x, y)
gtkTreeViewGetCellArea(object, path, column)
gtkTreeViewGetBackgroundArea(object, path, column)
gtkTreeViewGetVisibleRect(object)
gtkTreeViewGetVisibleRange(object)
gtkTreeViewGetBinWindow(object)
gtkTreeViewWidgetToTreeCoords(object, wx, wy)
gtkTreeViewTreeToWidgetCoords(object, tx, ty)
gtkTreeViewConvertBinWindowToTreeCoords(object, bx, by)
gtkTreeViewConvertBinWindowToWidgetCoords(object, bx, by)
gtkTreeViewConvertTreeToBinWindowCoords(object, tx, ty)
gtkTreeViewConvertTreeToWidgetCoords(object, tx, ty)
gtkTreeViewConvertWidgetToBinWindowCoords(object, wx, wy)
gtkTreeViewConvertWidgetToTreeCoords(object, wx, wy)
gtkTreeViewEnableModelDragDest(object, targets, actions)
gtkTreeViewEnableModelDragSource(object, start.button.mask, targets, actions)
gtkTreeViewUnsetRowsDragSource(object)
gtkTreeViewUnsetRowsDragDest(object)
gtkTreeViewSetDragDestRow(object, path, pos)
gtkTreeViewGetDragDestRow(object, path)
gtkTreeViewGetDestRowAtPos(object, drag.x, drag.y)
gtkTreeViewCreateRowDragIcon(object, path)
gtkTreeViewSetEnableSearch(object, enable.search)
gtkTreeViewGetEnableSearch(object)
gtkTreeViewGetSearchColumn(object)
gtkTreeViewSetSearchColumn(object, column)
gtkTreeViewGetSearchEqualFunc(object)
gtkTreeViewSetSearchEqualFunc(object, search.equal.func, search.user.data = NULL)
gtkTreeViewGetSearchEntry(object)
gtkTreeViewSetSearchEntry(object, entry = NULL)
gtkTreeViewGetSearchPositionFunc(object)
gtkTreeViewSetSearchPositionFunc(object, func, data)
gtkTreeViewGetFixedHeightMode(object)
gtkTreeViewSetFixedHeightMode(object, enable)
gtkTreeViewGetHoverSelection(object)
gtkTreeViewSetHoverSelection(object, hover)
gtkTreeViewGetHoverExpand(object)
gtkTreeViewSetHoverExpand(object, expand)
gtkTreeViewSetDestroyCountFunc(object, func, data = NULL)
gtkTreeViewGetRowSeparatorFunc(object)
gtkTreeViewSetRowSeparatorFunc(object, func, data = NULL)
gtkTreeViewGetRubberBanding(object)
gtkTreeViewSetRubberBanding(object, enable)
gtkTreeViewIsRubberBandingActive(object)
gtkTreeViewGetEnableTreeLines(object)
gtkTreeViewSetEnableTreeLines(object, enabled)
gtkTreeViewGetGridLines(object)
gtkTreeViewSetGridLines(object, grid.lines)
gtkTreeViewSetTooltipRow(object, tooltip, path)
gtkTreeViewSetTooltipCell(object, tooltip, path, column, cell)
gtkTreeViewGetTooltipContext(object, x, y, keyboard.tip)
gtkTreeViewGetTooltipColumn(object)
gtkTreeViewSetTooltipColumn(object, column)
gtkTreeView(model = NULL, show = TRUE)

Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkTreeView

Interfaces

GtkTreeView implements GtkBuildable and AtkImplementorIface.

Detailed Description

Widget that displays any object that implements the GtkTreeModel interface.

Please refer to the tree widget conceptual overview for an overview of all the objects and data types related to the tree widget and how they work together.

Several different coordinate systems are exposed in the GtkTreeView API. These are:

Several functions are available for converting between the different coordinate systems. The most common translations are between widget and bin window coordinates and between bin window and tree coordinates. For the former you can use gtkTreeViewConvertWidgetToBinWindowCoords (and vice versa), for the latter gtkTreeViewConvertBinWindowToTreeCoords (and vice versa).

GtkTreeView as GtkBuildable

The GtkTreeView implementation of the GtkBuildable interface accepts GtkTreeViewColumn objects as <child> elements in UI definitions.

A UI definition fragment with GtkTreeView

<object class="GtkTreeView">
  <property name="model">liststore1</property>
  <child>
    <object class="GtkTreeViewColumn">
      <property name="title">Test</property>
      <child>
        <object class="GtkCellRendererText"/>
        <attributes>"
          <attribute name="text">1</attribute>
        </attributes>
      </child>
    </object>
  </child>
</object>

Structures

GtkTreeView
undocumented

Convenient Construction

gtkTreeView is the result of collapsing the constructors of GtkTreeView (gtkTreeViewNew, gtkTreeViewNewWithModel) and accepts a subset of its arguments matching the required arguments of one of its delegate constructors.

Enums and Flags

GtkTreeViewDropPosition
An enum for determining where a dropped row goes.

before
dropped row is inserted before
after
dropped row is inserted after
into-or-before
dropped row becomes a child or is inserted before
into-or-after
dropped row becomes a child or is inserted after

GtkTreeViewGridLines
undocumented

none
undocumented
horizontal
undocumented
vertical
undocumented
both
undocumented

User Functions

GtkTreeViewColumnDropFunc(tree.view, column, prev.column, next.column, data)
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.

tree.view
[GtkTreeView] A GtkTreeView
column
[GtkTreeViewColumn] The GtkTreeViewColumn being dragged
prev.column
[GtkTreeViewColumn] A GtkTreeViewColumn on one side of column
next.column
[GtkTreeViewColumn] A GtkTreeViewColumn on the other side of column
data
[R object] user data

Returns: [logical] TRUE, if column can be dropped in this spot

GtkTreeViewMappingFunc(tree.view, path, user.data)
Function used for gtkTreeViewMapExpandedRows.

tree.view
[GtkTreeView] A GtkTreeView
path
[GtkTreePath] The path that's expanded
user.data
[R object] user data

GtkTreeViewSearchEqualFunc(model, column, key, iter, search.data)
A function used for checking whether a row in model matches a search key string entered by the user. Note the return value is reversed from what you would normally expect, though it has some similarity to strcmp() returning 0 for equal strings.

model
[GtkTreeModel] the GtkTreeModel being searched
column
[integer] the search column set by gtkTreeViewSetSearchColumn
key
[character] the key string to compare with
iter
[GtkTreeIter] a GtkTreeIter pointing the row of model that should be compared with key.
search.data
[R object] user data from gtkTreeViewSetSearchEqualFunc

Returns: [logical] FALSE if the row matches, TRUE otherwise.

GtkTreeViewSearchPositionFunc(tree.view, search.dialog, user.data)
undocumented

tree.view
[GtkTreeView]
search.dialog
[GtkWidget]
user.data
[R object]

GtkTreeDestroyCountFunc(tree.view, path, children, user.data)
undocumented

tree.view
[GtkTreeView]
path
[GtkTreePath]
children
[integer]
user.data
[R object]

GtkTreeViewRowSeparatorFunc(model, iter, data)
Function type for determining whether the row pointed to by iter should be rendered as a separator. A common way to implement this is to have a boolean column in the model, whose values the GtkTreeViewRowSeparatorFunc returns.

model
[GtkTreeModel] the GtkTreeModel
iter
[GtkTreeIter] a GtkTreeIter pointing at a row in model
data
[R object] user data

Returns: [logical] TRUE if the row is a separator

Signals

The (tree.view, user.data)
The number of columns of the treeview has changed.

tree.view
[GtkTreeView] the object on which the signal is emitted
user.data
[R object] user data set when the signal handler was connected.

The (tree.view, user.data)
The position of the cursor (focused cell) has changed.

tree.view
[GtkTreeView] the object on which the signal is emitted
user.data
[R object] user data set when the signal handler was connected.

The (tree.view, arg1, arg2, arg3, user.data)
undocumented

tree.view
[GtkTreeView] the object which received the signal.
arg1
[logical]
arg2
[logical]
arg3
[logical]
user.data
[R object] user data set when the signal handler was connected.

The (tree.view, arg1, arg2, user.data)
undocumented

tree.view
[GtkTreeView] the object which received the signal.
arg1
[GtkMovementStep]
arg2
[integer]
user.data
[R object] user data set when the signal handler was connected.

The (tree.view, path, column, user.data)
The "row-activated" signal is emitted when the method gtkTreeViewRowActivated is called or the user double clicks a treeview row. It is also emitted when a non-editable row is selected and one of the keys: Space, Shift+Space, Return or Enter is pressed.

For selection handling refer to the tree widget conceptual overview as well as GtkTreeSelection.

tree.view
[GtkTreeView] the object on which the signal is emitted
path
[GtkTreePath] the GtkTreePath for the activated row
column
[GtkTreeViewColumn] the GtkTreeViewColumn in which the activation occurred
user.data
[R object] user data set when the signal handler was connected.

The (tree.view, iter, path, user.data)
The given row has been collapsed (child nodes are hidden).

tree.view
[GtkTreeView] the object on which the signal is emitted
iter
[GtkTreeIter] the tree iter of the collapsed row
path
[GtkTreePath] a tree path that points to the row
user.data
[R object] user data set when the signal handler was connected.

The (tree.view, iter, path, user.data)
The given row has been expanded (child nodes are shown).

tree.view
[GtkTreeView] the object on which the signal is emitted
iter
[GtkTreeIter] the tree iter of the expanded row
path
[GtkTreePath] a tree path that points to the row
user.data
[R object] user data set when the signal handler was connected.

The (tree.view, user.data)
undocumented

tree.view
[GtkTreeView] the object which received the signal.
user.data
[R object] user data set when the signal handler was connected.

The (tree.view, user.data)
undocumented

tree.view
[GtkTreeView] the object which received the signal.
user.data
[R object] user data set when the signal handler was connected.

The (tree.view, arg1, user.data)
undocumented

tree.view
[GtkTreeView] the object which received the signal.
arg1
[logical]
user.data
[R object] user data set when the signal handler was connected.

The (tree.view, arg1, arg2, user.data)
undocumented

tree.view
[GtkTreeView] the object which received the signal.
arg1
[GtkAdjustment]
arg2
[GtkAdjustment]
user.data
[R object] user data set when the signal handler was connected.

The (tree.view, user.data)
undocumented

tree.view
[GtkTreeView] the object which received the signal.
user.data
[R object] user data set when the signal handler was connected.

The (tree.view, iter, path, user.data)
The given row is about to be collapsed (hide its children nodes). Use this signal if you need to control the collapsibility of individual rows.

tree.view
[GtkTreeView] the object on which the signal is emitted
iter
[GtkTreeIter] the tree iter of the row to collapse
path
[GtkTreePath] a tree path that points to the row
user.data
[R object] user data set when the signal handler was connected.

Returns: [logical] FALSE to allow collapsing, TRUE to reject

The (tree.view, iter, path, user.data)
The given row is about to be expanded (show its children nodes). Use this signal if you need to control the expandability of individual rows.

tree.view
[GtkTreeView] the object on which the signal is emitted
iter
[GtkTreeIter] the tree iter of the row to expand
path
[GtkTreePath] a tree path that points to the row
user.data
[R object] user data set when the signal handler was connected.

Returns: [logical] FALSE to allow expansion, TRUE to reject

The (tree.view, user.data)
undocumented

tree.view
[GtkTreeView] the object which received the signal.
user.data
[R object] user data set when the signal handler was connected.

The (tree.view, user.data)
undocumented

tree.view
[GtkTreeView] the object which received the signal.
user.data
[R object] user data set when the signal handler was connected.

Properties

enable-grid-lines [GtkTreeViewGridLines : Read / Write]

Whether grid lines should be drawn in the tree view. Default value: GTK_TREE_VIEW_GRID_LINES_NONE

enable-search [logical : Read / Write]

View allows user to search through columns interactively. Default value: TRUE

enable-tree-lines [logical : Read / Write]

Whether tree lines should be drawn in the tree view. Default value: FALSE

expander-column [GtkTreeViewColumn : Read / Write]

Set the column for the expander column.

fixed-height-mode [logical : Read / Write]

Setting the ::fixed-height-mode property to TRUE speeds up GtkTreeView by assuming that all rows have the same height. Only enable this option if all rows are the same height. Please see gtkTreeViewSetFixedHeightMode for more information on this option.

Default value: FALSE Since 2.4

hadjustment [GtkAdjustment : Read / Write]

Horizontal Adjustment for the widget.

headers-clickable [logical : Read / Write]

Column headers respond to click events. Default value: FALSE

headers-visible [logical : Read / Write]

Show the column header buttons. Default value: TRUE

hover-expand [logical : Read / Write]

Enables of disables the hover expansion mode of tree.view. Hover expansion makes rows expand or collaps if the pointer moves over them.

This mode is primarily indended for treeviews in popups, e.g. in GtkComboBox or GtkEntryCompletion.

Default value: FALSE Since 2.6

hover-selection [logical : Read / Write]

Enables of disables the hover selection mode of tree.view. Hover selection makes the selected row follow the pointer. Currently, this works only for the selection modes GTK_SELECTION_SINGLE and GTK_SELECTION_BROWSE.

This mode is primarily indended for treeviews in popups, e.g. in GtkComboBox or GtkEntryCompletion.

Default value: FALSE Since 2.6

level-indentation [integer : Read / Write]

Extra indentation for each level.

Allowed values: >= 0 Default value: 0 Since 2.12

model [GtkTreeModel : Read / Write]

The model for the tree view.

reorderable [logical : Read / Write]

View is reorderable. Default value: FALSE

rubber-banding [logical : Read / Write]

Whether to enable selection of multiple items by dragging the mouse pointer. Default value: FALSE

rules-hint [logical : Read / Write]

Set a hint to the theme engine to draw rows in alternating colors. Default value: FALSE

search-column [integer : Read / Write]

Model column to search through when searching through code. Allowed values: >= -1 Default value: -1

show-expanders [logical : Read / Write]

TRUE if the view has expanders.

Default value: TRUE Since 2.12

tooltip-column [integer : Read / Write]

The column in the model containing the tooltip texts for the rows. Allowed values: >= -1 Default value: -1

vadjustment [GtkAdjustment : Read / Write]

Vertical Adjustment for the widget.

Style Properties

allow-rules [logical : Read]

Allow drawing of alternating color rows. Default value: TRUE

even-row-color [GdkColor : Read]

Color to use for even rows.

expander-size [integer : Read]

Size of the expander arrow. Allowed values: >= 0 Default value: 12

grid-line-pattern [character : Read]

Dash pattern used to draw the tree view grid lines. Default value: "\001\001"

grid-line-width [integer : Read]

Width, in pixels, of the tree view grid lines. Allowed values: >= 0 Default value: 1

horizontal-separator [integer : Read]

Horizontal space between cells. Must be an even number. Allowed values: >= 0 Default value: 2

indent-expanders [logical : Read]

Make the expanders indented. Default value: TRUE

odd-row-color [GdkColor : Read]

Color to use for odd rows.

row-ending-details [logical : Read]

Enable extended row background theming. Default value: FALSE

tree-line-pattern [character : Read]

Dash pattern used to draw the tree view lines. Default value: "\001\001"

tree-line-width [integer : Read]

Width, in pixels, of the tree view lines. Allowed values: >= 0 Default value: 1

vertical-separator [integer : Read]

Vertical space between cells. Must be an even number. Allowed values: >= 0 Default value: 2

Author(s)

Derived by RGtkGen from GTK+ documentation

References

http://developer.gnome.org/doc/API/2.0/gtk/GtkTreeView.html

See Also

GtkTreeViewColumn GtkTreeSelection GtkTreeSortable GtkTreeModelSort GtkListStore GtkTreeStore GtkCellRenderer GtkCellEditable GtkCellRendererPixbuf GtkCellRendererText GtkCellRendererToggle


[Package RGtk2 version 2.12.5-3 Index]