X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/621d922ffd5b3294ac8dbe6cbd27f56ed7916217..c29c95fe24973b94fd724db767193171ca7c513d:/interface/wx/textctrl.h diff --git a/interface/wx/textctrl.h b/interface/wx/textctrl.h index de93cdb340..6dfd914320 100644 --- a/interface/wx/textctrl.h +++ b/interface/wx/textctrl.h @@ -796,7 +796,7 @@ public: void SetTabs(const wxArrayInt& tabs); /** - Sets the text foreground colout. + Sets the text foreground colour. */ void SetTextColour(const wxColour& colText); @@ -1348,6 +1348,28 @@ public: */ virtual bool PositionToXY(long pos, long* x, long* y) const; + /** + Converts given text position to client coordinates in pixels. + + This function allows to find where is the character at the given + position displayed in the text control. + + @onlyfor{wxmsw,wxgtk}. Additionally, wxGTK only implements this method + for multiline controls and ::wxDefaultPosition is always returned for + the single line ones. + + @param pos + Text position in 0 to GetLastPosition() range (inclusive). + @return + On success returns a wxPoint which contains client coordinates for + the given position in pixels, otherwise returns ::wxDefaultPosition. + + @since 2.9.3 + + @see XYToPosition(), PositionToXY() + */ + wxPoint PositionToCoords(long pos) const; + /** Saves the contents of the control in a text file.