bool ConsumeLayout (int xp, int yp)
{
int trailing;
bool isInside = layoutWrapper.Layout.XyToIndex (xp, yp, out index, out trailing);
if (isInside) {
int lineNr;
int xp1, xp2;
layoutWrapper.Layout.IndexToLineX (index, false, out lineNr, out xp1);
layoutWrapper.Layout.IndexToLineX (index + 1, false, out lineNr, out xp2);
index = TranslateIndexToUTF8 (layoutWrapper.Layout.Text, index);
if (snapCharacters && !IsNearX1 (xp, xp1, xp2))
index++;
return true;
}
index = line.Length;
return false;
}