Package: gtk

Function gtk:text-compute-cursor-extents

Lambda List

gtk:text-compute-cursor-extents (entry position strong weak)

Arguments

entry -- a gtk:text widget
position -- an integer with the character position
strong -- a graphene:rect-t instance to store the strong cursor position, the argument can be nil
weak -- a graphene:rect-t instance to store the weak cursor position, the argument can be nil

Details

Determine the positions of the strong and weak cursors if the insertion point in the layout is at position. 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 are inserted. The weak cursor location is the location where characters of the directionality opposite to the base direction are inserted. The rectangle positions are in widget coordinates.

Since 4.4

Examples

Use the graphene:with-rect or graphene:with-rects macro to create the rectangles passed to the function.
(graphene:with-rects (strong weak)
  (gtk:text-compute-cursor-extents text pos strong weak)
  ... )    
 

See also

2024-5-17