Package: gtk

Function gtk:text-view-iter-at-position

Lambda List

gtk:text-view-iter-at-position (view x y)

Syntax

(gtk:text-view-iter-at-position view x y) => iter, trailing

Arguments

view -- a gtk:text-view widget
x -- an integer for the x position, in text buffer coordinates
y -- an integer for the y position, in text buffer coordinates
iter -- a gtk:text-iter iterator
trailing -- if non-nil, an integer indicating where in the grapheme the user clicked, it will either be zero, or the number of characters in the grapheme, 0 represents the trailing edge of the grapheme

Details

Retrieves the iterator pointing to the character at text buffer coordinates x and y. Text buffer coordinates are coordinates for the entire text buffer, not just the currently displayed portion. If you have coordinates from an event, you have to convert those to text buffer coordinates with the gtk:text-view-window-to-buffer-coords function.

Note that this is different from the gtk:text-view-iter-at-location function, which returns cursor locations, that is, positions between characters.
 

See also

#2024-07-25