Gtk.TreeView.prototype.get_path_at_pos
function get_path_at_pos(x:Number, y:Number):Boolean { // Gjs wrapper for gtk_tree_view_get_path_at_pos() }
Finds the path at the point (x, y), relative to bin_window coordinates (please see Gtk.TreeView.prototype.get_bin_window). 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 <literal>event->window == gtk_tree_view_get_bin_window (<!-- -->)</literal>. It is primarily for things like popup menus. If path is non-null, then it will be filled with the Gtk.TreePath at that point. This path should be freed with Gtk.TreePath.prototype.free. 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 Gtk.CellRenderer.prototype.render). 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.
For converting widget coordinates (eg. the ones you get from GtkWidget::query-tooltip), please see Gtk.TreeView.prototype.convert_widget_to_bin_window_coords.
- x
The x position to be identified (relative to bin_window).
- y
The y position to be identified (relative to bin_window).
- Returns
true if a row exists at that coordinate.