Learn R Programming

RGtk2 (version 2.20.31)

gtkTreeViewGetPathAtPos: gtkTreeViewGetPathAtPos

Description

Finds the path at the point (x, y), relative to bin_window coordinates (please see gtkTreeViewGetBinWindow). That is, x and y are relative to an events coordinates. x and y must come from an event on the tree.view only where event->window == gtk_tree_view_get_bin_window ( ). It is primarily for things like popup menus. If path is non-NULL, then it will be filled with the GtkTreePath at that point. If column is non-NULL, then it will be filled with the column at that point. cell.x and cell.y return the coordinates relative to the cell background (i.e. the background.area passed to gtkCellRendererRender). This function is only meaningful if tree.view is realized. Therefore this function will always return FALSE if tree.view is not realized or does not have a model.

Usage

gtkTreeViewGetPathAtPos(object, x, y)

Arguments

object
x
The x position to be identified (relative to bin_window).
y
The y position to be identified (relative to bin_window).

Value

A list containing the following elements:
retval
[logical] TRUE if a row exists at that coordinate.
path
A pointer to a GtkTreePath pointer to be filled in, or NULL. [ out ][ allow-none ]
column
A pointer to a GtkTreeViewColumn pointer to be filled in, or NULL. [ out ][ allow-none ]
cell.x
A pointer where the X coordinate relative to the cell can be placed, or NULL. [ out ][ allow-none ]
cell.y
A pointer where the Y coordinate relative to the cell can be placed, or NULL. [ out ][ allow-none ]

Details

For converting widget coordinates (eg. the ones you get from GtkWidget::query-tooltip), please see gtkTreeViewConvertWidgetToBinWindowCoords.