]> git.saurik.com Git - wxWidgets.git/commitdiff
reSWIGged
authorRobin Dunn <robin@alldunn.com>
Fri, 23 Jul 2004 23:25:02 +0000 (23:25 +0000)
committerRobin Dunn <robin@alldunn.com>
Fri, 23 Jul 2004 23:25:02 +0000 (23:25 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28445 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/src/gtk/_controls.py
wxPython/src/gtk/_controls_wrap.cpp
wxPython/src/mac/_controls.py
wxPython/src/mac/_controls_wrap.cpp
wxPython/src/msw/_controls.py
wxPython/src/msw/_controls_wrap.cpp

index a4cbe122003f29eb3e5a3e0fe50852dbb4711f18..b45c3f363092c4c4b85304fdca455f28469bca71 100644 (file)
@@ -1757,11 +1757,22 @@ class TextCtrl(_core.Control):
         """
         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
+        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.
         """
         return _controls_.TextCtrl_HitTest(*args, **kwargs)
 
+    def HitTestPos(*args, **kwargs):
+        """
+        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. 
+        """
+        return _controls_.TextCtrl_HitTestPos(*args, **kwargs)
+
     def Copy(*args, **kwargs):
         """Copy(self)"""
         return _controls_.TextCtrl_Copy(*args, **kwargs)
index f0b833d1b2af604de68dd7a50e88c426bf0b90f1..347e6db411499a1a253a66682c3885d60c2d63bd 100644 (file)
@@ -9289,6 +9289,46 @@ static PyObject *_wrap_TextCtrl_HitTest(PyObject *self, PyObject *args, PyObject
 }
 
 
+static PyObject *_wrap_TextCtrl_HitTestPos(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject *resultobj;
+    wxTextCtrl *arg1 = (wxTextCtrl *) 0 ;
+    wxPoint *arg2 = 0 ;
+    long *arg3 = (long *) 0 ;
+    int result;
+    wxPoint temp2 ;
+    long temp3 ;
+    PyObject * obj0 = 0 ;
+    PyObject * obj1 = 0 ;
+    char *kwnames[] = {
+        (char *) "self",(char *) "pt", NULL 
+    };
+    
+    arg3 = &temp3;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TextCtrl_HitTestPos",kwnames,&obj0,&obj1)) goto fail;
+    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxTextCtrl,
+    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
+    {
+        arg2 = &temp2;
+        if ( ! wxPoint_helper(obj1, &arg2)) SWIG_fail;
+    }
+    {
+        PyThreadState* __tstate = wxPyBeginAllowThreads();
+        result = (int)((wxTextCtrl const *)arg1)->HitTest((wxPoint const &)*arg2,arg3);
+        
+        wxPyEndAllowThreads(__tstate);
+        if (PyErr_Occurred()) SWIG_fail;
+    }
+    resultobj = SWIG_FromInt((int)result);
+    {
+        PyObject *o = PyInt_FromLong((long) (*arg3));
+        resultobj = t_output_helper(resultobj,o);
+    }
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
 static PyObject *_wrap_TextCtrl_Copy(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxTextCtrl *arg1 = (wxTextCtrl *) 0 ;
@@ -31383,6 +31423,7 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"TextCtrl_PositionToXY", (PyCFunction) _wrap_TextCtrl_PositionToXY, METH_VARARGS | METH_KEYWORDS },
         { (char *)"TextCtrl_ShowPosition", (PyCFunction) _wrap_TextCtrl_ShowPosition, METH_VARARGS | METH_KEYWORDS },
         { (char *)"TextCtrl_HitTest", (PyCFunction) _wrap_TextCtrl_HitTest, METH_VARARGS | METH_KEYWORDS },
+        { (char *)"TextCtrl_HitTestPos", (PyCFunction) _wrap_TextCtrl_HitTestPos, METH_VARARGS | METH_KEYWORDS },
         { (char *)"TextCtrl_Copy", (PyCFunction) _wrap_TextCtrl_Copy, METH_VARARGS | METH_KEYWORDS },
         { (char *)"TextCtrl_Cut", (PyCFunction) _wrap_TextCtrl_Cut, METH_VARARGS | METH_KEYWORDS },
         { (char *)"TextCtrl_Paste", (PyCFunction) _wrap_TextCtrl_Paste, METH_VARARGS | METH_KEYWORDS },
index 1f087881b582fd1784966c86132342d851001a1c..063ba32b2bfee85f56711ca406198888bdc1c300 100644 (file)
@@ -1753,11 +1753,22 @@ class TextCtrl(_core.Control):
         """
         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
+        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.
         """
         return _controls_.TextCtrl_HitTest(*args, **kwargs)
 
+    def HitTestPos(*args, **kwargs):
+        """
+        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. 
+        """
+        return _controls_.TextCtrl_HitTestPos(*args, **kwargs)
+
     def Copy(*args, **kwargs):
         """Copy(self)"""
         return _controls_.TextCtrl_Copy(*args, **kwargs)
index cbc3a993690d533a1eae674f2ec206794c912833..8fa809f1bfdcf1e7de727088f97f9396944275b5 100644 (file)
@@ -9260,6 +9260,46 @@ static PyObject *_wrap_TextCtrl_HitTest(PyObject *self, PyObject *args, PyObject
 }
 
 
+static PyObject *_wrap_TextCtrl_HitTestPos(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject *resultobj;
+    wxTextCtrl *arg1 = (wxTextCtrl *) 0 ;
+    wxPoint *arg2 = 0 ;
+    long *arg3 = (long *) 0 ;
+    int result;
+    wxPoint temp2 ;
+    long temp3 ;
+    PyObject * obj0 = 0 ;
+    PyObject * obj1 = 0 ;
+    char *kwnames[] = {
+        (char *) "self",(char *) "pt", NULL 
+    };
+    
+    arg3 = &temp3;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TextCtrl_HitTestPos",kwnames,&obj0,&obj1)) goto fail;
+    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxTextCtrl,
+    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
+    {
+        arg2 = &temp2;
+        if ( ! wxPoint_helper(obj1, &arg2)) SWIG_fail;
+    }
+    {
+        PyThreadState* __tstate = wxPyBeginAllowThreads();
+        result = (int)((wxTextCtrl const *)arg1)->HitTest((wxPoint const &)*arg2,arg3);
+        
+        wxPyEndAllowThreads(__tstate);
+        if (PyErr_Occurred()) SWIG_fail;
+    }
+    resultobj = SWIG_FromInt((int)result);
+    {
+        PyObject *o = PyInt_FromLong((long) (*arg3));
+        resultobj = t_output_helper(resultobj,o);
+    }
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
 static PyObject *_wrap_TextCtrl_Copy(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxTextCtrl *arg1 = (wxTextCtrl *) 0 ;
@@ -31353,6 +31393,7 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"TextCtrl_PositionToXY", (PyCFunction) _wrap_TextCtrl_PositionToXY, METH_VARARGS | METH_KEYWORDS },
         { (char *)"TextCtrl_ShowPosition", (PyCFunction) _wrap_TextCtrl_ShowPosition, METH_VARARGS | METH_KEYWORDS },
         { (char *)"TextCtrl_HitTest", (PyCFunction) _wrap_TextCtrl_HitTest, METH_VARARGS | METH_KEYWORDS },
+        { (char *)"TextCtrl_HitTestPos", (PyCFunction) _wrap_TextCtrl_HitTestPos, METH_VARARGS | METH_KEYWORDS },
         { (char *)"TextCtrl_Copy", (PyCFunction) _wrap_TextCtrl_Copy, METH_VARARGS | METH_KEYWORDS },
         { (char *)"TextCtrl_Cut", (PyCFunction) _wrap_TextCtrl_Cut, METH_VARARGS | METH_KEYWORDS },
         { (char *)"TextCtrl_Paste", (PyCFunction) _wrap_TextCtrl_Paste, METH_VARARGS | METH_KEYWORDS },
index d5f6445ff6eaea29d4ca376de1d500ff7a4b721e..24a8e95fa04b4f46a518fafba1f8b5ce04a64093 100644 (file)
@@ -1757,11 +1757,22 @@ class TextCtrl(_core.Control):
         """
         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
+        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.
         """
         return _controls_.TextCtrl_HitTest(*args, **kwargs)
 
+    def HitTestPos(*args, **kwargs):
+        """
+        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. 
+        """
+        return _controls_.TextCtrl_HitTestPos(*args, **kwargs)
+
     def Copy(*args, **kwargs):
         """Copy(self)"""
         return _controls_.TextCtrl_Copy(*args, **kwargs)
index e7d08d7df506fe7cface86dafd0750d25f9399ec..fcc20c173c298d680da1ae3093626dcdb852deb3 100644 (file)
@@ -9286,6 +9286,46 @@ static PyObject *_wrap_TextCtrl_HitTest(PyObject *self, PyObject *args, PyObject
 }
 
 
+static PyObject *_wrap_TextCtrl_HitTestPos(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject *resultobj;
+    wxTextCtrl *arg1 = (wxTextCtrl *) 0 ;
+    wxPoint *arg2 = 0 ;
+    long *arg3 = (long *) 0 ;
+    int result;
+    wxPoint temp2 ;
+    long temp3 ;
+    PyObject * obj0 = 0 ;
+    PyObject * obj1 = 0 ;
+    char *kwnames[] = {
+        (char *) "self",(char *) "pt", NULL 
+    };
+    
+    arg3 = &temp3;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TextCtrl_HitTestPos",kwnames,&obj0,&obj1)) goto fail;
+    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxTextCtrl,
+    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
+    {
+        arg2 = &temp2;
+        if ( ! wxPoint_helper(obj1, &arg2)) SWIG_fail;
+    }
+    {
+        PyThreadState* __tstate = wxPyBeginAllowThreads();
+        result = (int)((wxTextCtrl const *)arg1)->HitTest((wxPoint const &)*arg2,arg3);
+        
+        wxPyEndAllowThreads(__tstate);
+        if (PyErr_Occurred()) SWIG_fail;
+    }
+    resultobj = SWIG_FromInt((int)result);
+    {
+        PyObject *o = PyInt_FromLong((long) (*arg3));
+        resultobj = t_output_helper(resultobj,o);
+    }
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
 static PyObject *_wrap_TextCtrl_Copy(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxTextCtrl *arg1 = (wxTextCtrl *) 0 ;
@@ -31659,6 +31699,7 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"TextCtrl_PositionToXY", (PyCFunction) _wrap_TextCtrl_PositionToXY, METH_VARARGS | METH_KEYWORDS },
         { (char *)"TextCtrl_ShowPosition", (PyCFunction) _wrap_TextCtrl_ShowPosition, METH_VARARGS | METH_KEYWORDS },
         { (char *)"TextCtrl_HitTest", (PyCFunction) _wrap_TextCtrl_HitTest, METH_VARARGS | METH_KEYWORDS },
+        { (char *)"TextCtrl_HitTestPos", (PyCFunction) _wrap_TextCtrl_HitTestPos, METH_VARARGS | METH_KEYWORDS },
         { (char *)"TextCtrl_Copy", (PyCFunction) _wrap_TextCtrl_Copy, METH_VARARGS | METH_KEYWORDS },
         { (char *)"TextCtrl_Cut", (PyCFunction) _wrap_TextCtrl_Cut, METH_VARARGS | METH_KEYWORDS },
         { (char *)"TextCtrl_Paste", (PyCFunction) _wrap_TextCtrl_Paste, METH_VARARGS | METH_KEYWORDS },