get_layout_offsets


Description:

public void get_layout_offsets (out int x, out int y)

Obtains the coordinates where the label will draw the Layout representing the text in the label; useful to convert mouse events into coordinates inside the Layout, e.

g. to take some action if some part of the label is clicked. Of course you will need to create a EventBox to receive the events, and pack the label inside it, since labels are windowless (they return false from get_has_window). Remember when using the Layout functions you need to convert to and from pixels using PANGO_PIXELS or SCALE.

Parameters:

this

a Label

x

location to store X offset of layout, or null

y

location to store Y offset of layout, or null