]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wx/textctrl.h
Resolve ambiguity between GetClientXXX() methods in wxOSX wxComboBox.
[wxWidgets.git] / interface / wx / textctrl.h
index 746954eca850c8f9740e5a050d445e1a80227d99..6dfd9143208c18c20686c838fcb0a1467cd662e0 100644 (file)
@@ -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.