Package: gtk

Function gtk-text-view-cursor-locations

Lambda List

gtk-text-view-cursor-locations (view iter)

Arguments

view -- a gtk-text-view widget
iter -- a gtk-text-iter iterator

Return Value

strong -- a gdk-rectangle instance with the strong cursor position
weak -- a gdk-rectangle instance with the weak cursor position

Details

Given an iterator within a text layout, determine the positions of the strong and weak cursors if the insertion point is at that iterator. The position of each cursor is stored as a zero-width rectangle. The strong cursor location is the location where characters of the directionality equal to the base direction of the paragraph are inserted. The weak cursor location is the location where characters of the directionality opposite to the base direction of the paragraph are inserted.

If the iter argument is nil, the actual cursor position is used.

Note that if the iter argument happens to be the actual cursor position, and there is currently an IM preedit sequence being entered, the returned locations will be adjusted to account for the offset of the preedit cursor within the preedit sequence.

The rectangle position is in text buffer coordinates. Use the gtk-text-view-buffer-to-window-coords function to convert these coordinates to coordinates for one of the windows in the text view.
 

See also

2021-10-16