X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/015256c09134e69bf2054d64ec91fc180b243970..fef4c27a1c5467c2ad291d2cff14eabd9c5b1d3b:/wxPython/src/_textctrl.i diff --git a/wxPython/src/_textctrl.i b/wxPython/src/_textctrl.i index a12f5b6c6e..76f2995baf 100644 --- a/wxPython/src/_textctrl.i +++ b/wxPython/src/_textctrl.i @@ -99,6 +99,12 @@ enum wxTextCtrlHitTestResult wxTE_HT_BEYOND // after [the end of line] }; + +enum { + wxOutOfRangeTextCoord, + wxInvalidTextCoord +}; + //--------------------------------------------------------------------------- // wxTextAttr: a structure containing the visual attributes of a text @@ -165,6 +171,7 @@ class wxTextCtrl : public wxControl public: %pythonAppend wxTextCtrl "self._setOORInfo(self)" %pythonAppend wxTextCtrl() "" + %typemap(out) wxTextCtrl*; // turn off this typemap wxTextCtrl(wxWindow* parent, wxWindowID id=-1, const wxString& value = wxPyEmptyString, @@ -173,7 +180,10 @@ public: long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxPyTextCtrlNameStr); - %name(PreTextCtrl)wxTextCtrl(); + %RenameCtor(PreTextCtrl, wxTextCtrl()); + + // Turn it back on again + %typemap(out) wxTextCtrl* { $result = wxPyMake_wxObject($1, $owner); } bool Create(wxWindow* parent, wxWindowID id=-1, const wxString& value = wxPyEmptyString, @@ -257,11 +267,22 @@ public: DocDeclAStr( virtual wxTextCtrlHitTestResult, HitTest(const wxPoint& pt, long* OUTPUT, long* OUTPUT) const, - "HitTest(Point pt) -> (result, row, col)", - "Find the character at position given in pixels. NB: pt is in device -coords but is not adjusted for the client area origin nor scrolling", ""); + "HitTest(Point pt) -> (result, col, row)", + "Find the row, col coresponding to the character at the point given in +pixels. NB: pt is in device coords but is not adjusted for the client +area origin nor scrolling.", ""); + + DocDeclAStrName( + virtual wxTextCtrlHitTestResult , HitTest(const wxPoint& pt, long *OUTPUT) const, + "HitTestPos(Point pt) -> (result, position)", + "Find the character position in the text coresponding to the point +given in pixels. NB: pt is in device coords but is not adjusted for +the client area origin nor scrolling. ", "", + HitTestPos); + + // Clipboard operations virtual void Copy(); virtual void Cut(); @@ -290,7 +311,7 @@ coords but is not adjusted for the client area origin nor scrolling", ""); #ifdef __WXMSW__ // Caret handling (Windows only) - bool ShowNativeCaret(bool show = True); + bool ShowNativeCaret(bool show = true); bool HideNativeCaret(); #endif