previous up next     contents index
Next: wxMediaEdit::FindPositionInLine Up: wxMediaEdit: wxMediaBuffer Previous: wxMediaEdit::FindLine

wxMediaEdit::FindPosition

  long FindPosition (float x, float y, Bool *ateol = NULL, Bool *onit = NULL, float *edgeclose = NULL)

Given a graphical location in the buffer, returns the item buffer position at that location. See End of Line Ambiguity (section gif) for a discussion of the ateol parameter. If onit is non-NULL, it will be set to TRUE if the line actually touches this position, or FALSE otherwise.

If edgeclose is non-NULL, it will be filled in with a value indicating how close the point is to the vertical edges of the item when the point falls on the item. If the point is closest to the left edge of the item, the value will be negative; otherwise, the value will be positive. In either case, then absolute value of the returned result is the distance from the point to the edge of the item. The values 100 and -100 indicate infinity.

Only valid when the buffer is viewed.



PLT