Package: gtk

Function gtk:text-view-visible-offset

Lambda List

gtk:text-view-visible-offset (view)

Syntax

(gtk:text-view-visible-offset view) => xoffset, yoffset

Arguments

view -- a gtk:text-view widget
xoffset -- a double float for the x offset
yoffset -- a double float for the y offset

Details

Gets the x, y offset in buffer coordinates of the top-left corner of the the text view contents. This allows for more precise positioning than what is provided by the gtk:text-view-visible-rect function as you can discover what device pixel is being quantized for text positioning.

You might want this when making ulterior widgets align with quantized device pixels of the text view contents such as line numbers.

Since 4.18
 

See also

#2025-10-23