Extracted from Pike v7.8 release 866 at 2016-11-06.
pike.ida.liu.se
[Top]
GTK2
GTK2.Label

Method GTK2.Label()->get_layout_offsets()


Method get_layout_offsets

mapping get_layout_offsets()

Description

Obtains the coordinates where the label will draw the Pango.Layout representing the text in the label; useful to convert mouse events into coordinates inside the Pango.Layout, e.g. to take some action if some part of the label is clicked. Of course, you will need to create a GTK2.EventBox to receive the events, and pack the label inside it, since labels are a GTK2.NO_WINDOW widget. Remember when using the Pango.Layout functions you need to convert to and from pixels using GTK2.PANGO_SCALE.