pangoGlyphStringXToIndex {RGtk2}R Documentation

pangoGlyphStringXToIndex

Description

Convert from x offset to character position. Character positions are computed by dividing up each cluster into equal portions. In scripts where positioning within a cluster is not allowed (such as Thai), the returned value may not be a valid cursor position; the caller must combine the result with the logical attributes for the text to compute the valid cursor position.

Usage

pangoGlyphStringXToIndex(object, text, analysis, x.pos)

Arguments

object

the glyphs returned from pangoShape

text

the text for the run

analysis

the analysis information return from pangoItemize

x.pos

the x offset (in Pango units)

Value

A list containing the following elements:

index

location to store calculated byte index within text

trailing

location to store a boolean indicating whether the user clicked on the leading or trailing edge of the character.

Author(s)

Derived by RGtkGen from GTK+ documentation


[Package RGtk2 version 2.20.21 Index]