pangoLayoutLineXToIndex        package:RGtk2        R Documentation

_p_a_n_g_o_L_a_y_o_u_t_L_i_n_e_X_T_o_I_n_d_e_x

_D_e_s_c_r_i_p_t_i_o_n:

     Converts from x offset to the byte index of the corresponding
     character within the text of the layout. If 'x.pos' is outside the
     line, 'index.' and 'trailing' will point to the very first or very
     last position in the line. This determination is based on the
     resolved direction of the paragraph; for example, if the resolved
     direction is right-to-left, then an X position to the right of the
     line (after it) results in 0 being stored in 'index.' and
     'trailing'. An X position to the left of the line results in
     'index.' pointing to the (logical) last grapheme in the line and
     'trailing' being set to the number of characters in that grapheme.
     The reverse is true for a left-to-right line.

_U_s_a_g_e:

     pangoLayoutLineXToIndex(object, x.pos)

_A_r_g_u_m_e_n_t_s:

'object': ['PangoLayoutLine']       a 'PangoLayoutLine'

 'x.pos': [integer]      the X offset (in 'integer') from the left edge
          of the line.

_V_a_l_u_e:

     A list containing the following elements: 

  retval: [logical]  'FALSE' if 'x.pos' was outside the line, 'TRUE' if
          inside

 'index': [integer]     location to store calculated byte index for the
          grapheme in which the user clicked.

'trailing': [integer]   location to store a integer indicating where in
          the grapheme the user clicked. It will either be zero, or the
          number of characters in the grapheme. 0 represents the
          trailing edge of the grapheme.

_A_u_t_h_o_r(_s):

     Derived by RGtkGen from GTK+ documentation

