]> git.saurik.com Git - wxWidgets.git/commitdiff
More fixes and updates
authorRobin Dunn <robin@alldunn.com>
Mon, 3 Dec 2001 20:58:19 +0000 (20:58 +0000)
committerRobin Dunn <robin@alldunn.com>
Mon, 3 Dec 2001 20:58:19 +0000 (20:58 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/demo/SplitTree.py
wxPython/src/controls2.i
wxPython/src/gtk/controls2.cpp
wxPython/src/gtk/controls2.py
wxPython/src/gtk/wx.cpp
wxPython/src/gtk/wx.py
wxPython/src/windows.i

index 5de68027e432f2386f7abfc8abaa882587b9e06d..c70802e8bb7e29c9fc5c06dc7b066449198db85b 100644 (file)
@@ -31,7 +31,7 @@ class TestTree(wxRemotelyScrolledTreeCtrl):
     def OnPaint(self, evt):
         dc = wxPaintDC(self)
 
-        self.base_OnPaint(evt)
+        wxTreeCtrl.OnPaint(self, evt)
 
         # Reset the device origin since it may have been set
         dc.SetDeviceOrigin(0, 0)
index 12990e015cd4dfd32562575634d5185cf1b5ee86..a4ff7294a993be8ace2e72f9c1a78b526a5af899 100644 (file)
@@ -1234,6 +1234,7 @@ public:
 
 #ifdef __WXMSW__
     void SetItemDropHighlight(const wxTreeItemId& item, int highlight = TRUE);
+#endif
 
     //bool GetBoundingRect(const wxTreeItemId& item, wxRect& rect, int textOnly = FALSE)
     %addmethods {
@@ -1252,7 +1253,7 @@ public:
             }
         }
     }
-#endif
+
 
 %pragma(python) addtoclass = "
     # Redefine some methods that SWIG gets a bit confused on...
@@ -1272,6 +1273,9 @@ public:
         val1.thisown = 1
         return (val1,val2)
 "
+
+    // This seems pretty bogus, but is currently needed for SplitTree
+    void OnPaint(wxPaintEvent& event);
 };
 
 
index 62535e36fa5ae2112a34e631dc3e2c92168f6844..ee9b7c89b637c7ff19f91d93e560b35a0a68a08f 100644 (file)
@@ -9259,7 +9259,99 @@ static PyObject *_wrap_wxTreeCtrl_SetItemFont(PyObject *self, PyObject *args, Py
     return _resultobj;
 }
 
+static PyObject * wxPyTreeCtrl_GetBoundingRect(wxPyTreeCtrl *self,const wxTreeItemId & item,int  textOnly) {
+            wxRect rect;
+            if (self->GetBoundingRect(item, rect, textOnly)) {
+                wxPyTState* state = wxPyBeginBlockThreads();
+                wxRect* r = new wxRect(rect);
+                PyObject* val = wxPyConstructObject((void*)r, "wxRect");
+                wxPyEndBlockThreads(state);
+                return val;
+            }
+            else {
+                Py_INCREF(Py_None);
+                return Py_None;
+            }
+        }
+static PyObject *_wrap_wxTreeCtrl_GetBoundingRect(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject * _resultobj;
+    PyObject * _result;
+    wxPyTreeCtrl * _arg0;
+    wxTreeItemId * _arg1;
+    int  _arg2 = (int ) FALSE;
+    PyObject * _argo0 = 0;
+    PyObject * _argo1 = 0;
+    char *_kwnames[] = { "self","item","textOnly", NULL };
+
+    self = self;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxTreeCtrl_GetBoundingRect",_kwnames,&_argo0,&_argo1,&_arg2)) 
+        return NULL;
+    if (_argo0) {
+        if (_argo0 == Py_None) { _arg0 = NULL; }
+        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetBoundingRect. Expected _wxPyTreeCtrl_p.");
+        return NULL;
+        }
+    }
+    if (_argo1) {
+        if (_argo1 == Py_None) { _arg1 = NULL; }
+        else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_GetBoundingRect. Expected _wxTreeItemId_p.");
+        return NULL;
+        }
+    }
+{
+    wxPy_BEGIN_ALLOW_THREADS;
+        _result = (PyObject *)wxPyTreeCtrl_GetBoundingRect(_arg0,*_arg1,_arg2);
+
+    wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
+}{
+  _resultobj = _result;
+}
+    return _resultobj;
+}
+
+#define wxTreeCtrl_OnPaint(_swigobj,_swigarg0)  (_swigobj->OnPaint(_swigarg0))
+static PyObject *_wrap_wxTreeCtrl_OnPaint(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject * _resultobj;
+    wxPyTreeCtrl * _arg0;
+    wxPaintEvent * _arg1;
+    PyObject * _argo0 = 0;
+    PyObject * _argo1 = 0;
+    char *_kwnames[] = { "self","event", NULL };
+
+    self = self;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTreeCtrl_OnPaint",_kwnames,&_argo0,&_argo1)) 
+        return NULL;
+    if (_argo0) {
+        if (_argo0 == Py_None) { _arg0 = NULL; }
+        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_OnPaint. Expected _wxPyTreeCtrl_p.");
+        return NULL;
+        }
+    }
+    if (_argo1) {
+        if (_argo1 == Py_None) { _arg1 = NULL; }
+        else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPaintEvent_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_OnPaint. Expected _wxPaintEvent_p.");
+        return NULL;
+        }
+    }
+{
+    wxPy_BEGIN_ALLOW_THREADS;
+        wxTreeCtrl_OnPaint(_arg0,*_arg1);
+
+    wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
+}    Py_INCREF(Py_None);
+    _resultobj = Py_None;
+    return _resultobj;
+}
+
 static PyMethodDef controls2cMethods[] = {
+        { "wxTreeCtrl_OnPaint", (PyCFunction) _wrap_wxTreeCtrl_OnPaint, METH_VARARGS | METH_KEYWORDS },
+        { "wxTreeCtrl_GetBoundingRect", (PyCFunction) _wrap_wxTreeCtrl_GetBoundingRect, METH_VARARGS | METH_KEYWORDS },
         { "wxTreeCtrl_SetItemFont", (PyCFunction) _wrap_wxTreeCtrl_SetItemFont, METH_VARARGS | METH_KEYWORDS },
         { "wxTreeCtrl_SetItemBackgroundColour", (PyCFunction) _wrap_wxTreeCtrl_SetItemBackgroundColour, METH_VARARGS | METH_KEYWORDS },
         { "wxTreeCtrl_SetItemTextColour", (PyCFunction) _wrap_wxTreeCtrl_SetItemTextColour, METH_VARARGS | METH_KEYWORDS },
index 37b1a5860dd68050f8a6997936a53ef8527daab7..eb626812d2602b227f8a82efac11f40e9804d198 100644 (file)
@@ -771,6 +771,7 @@ class wxTreeItemIdPtr :
         return val
     def __repr__(self):
         return "<C wxTreeItemId instance at %s>" % (self.this,)
+    Ok = IsOk
 class wxTreeItemId(wxTreeItemIdPtr):
     def __init__(self,*_args,**_kwargs):
         self.this = apply(controls2c.new_wxTreeItemId,_args,_kwargs)
@@ -1061,6 +1062,12 @@ class wxTreeCtrlPtr(wxControlPtr):
     def SetItemFont(self, *_args, **_kwargs):
         val = apply(controls2c.wxTreeCtrl_SetItemFont,(self,) + _args, _kwargs)
         return val
+    def GetBoundingRect(self, *_args, **_kwargs):
+        val = apply(controls2c.wxTreeCtrl_GetBoundingRect,(self,) + _args, _kwargs)
+        return val
+    def OnPaint(self, *_args, **_kwargs):
+        val = apply(controls2c.wxTreeCtrl_OnPaint,(self,) + _args, _kwargs)
+        return val
     def __repr__(self):
         return "<C wxTreeCtrl instance at %s>" % (self.this,)
     
index 17367d190fff6f905bd2273d54af47b8daea1347..30b7b2cd553905b90d9cf916055fa3ca80ff8d6f 100644 (file)
@@ -2118,6 +2118,7 @@ SWIGEXPORT(void) initwxc() {
         PyDict_SetItemString(d,"wxJOY_BUTTON_ANY", PyInt_FromLong((long) wxJOY_BUTTON_ANY));
         PyDict_SetItemString(d,"wxWS_EX_VALIDATE_RECURSIVELY", PyInt_FromLong((long) wxWS_EX_VALIDATE_RECURSIVELY));
         PyDict_SetItemString(d,"wxWS_EX_BLOCK_EVENTS", PyInt_FromLong((long) wxWS_EX_BLOCK_EVENTS));
+        PyDict_SetItemString(d,"wxWS_EX_TRANSIENT", PyInt_FromLong((long) wxWS_EX_TRANSIENT));
         PyDict_SetItemString(d,"wxMM_TEXT", PyInt_FromLong((long) wxMM_TEXT));
         PyDict_SetItemString(d,"wxMM_LOMETRIC", PyInt_FromLong((long) wxMM_LOMETRIC));
         PyDict_SetItemString(d,"wxMM_HIMETRIC", PyInt_FromLong((long) wxMM_HIMETRIC));
index 7a609924301dea957c628d46f0b9894b468255fd..65cb308f90167c0df9659d92f54a92266ec2c007 100644 (file)
@@ -434,6 +434,7 @@ wxJOY_BUTTON4 = wxc.wxJOY_BUTTON4
 wxJOY_BUTTON_ANY = wxc.wxJOY_BUTTON_ANY
 wxWS_EX_VALIDATE_RECURSIVELY = wxc.wxWS_EX_VALIDATE_RECURSIVELY
 wxWS_EX_BLOCK_EVENTS = wxc.wxWS_EX_BLOCK_EVENTS
+wxWS_EX_TRANSIENT = wxc.wxWS_EX_TRANSIENT
 wxMM_TEXT = wxc.wxMM_TEXT
 wxMM_LOMETRIC = wxc.wxMM_LOMETRIC
 wxMM_HIMETRIC = wxc.wxMM_HIMETRIC
index 1aab58d1dae6578c9604388a1ffa2883aefa62c6..f164ac73482345af9f33f4ae4af2f458e67bef4a 100644 (file)
@@ -401,8 +401,10 @@ public:
     void SetAcceleratorTable(const wxAcceleratorTable& accel);
     wxAcceleratorTable *GetAcceleratorTable();
 
-
-    %name(base_OnPaint)void OnPaint(wxPaintEvent& event);
+#ifdef __WXMSW__
+    // This seems pretty bogus, but is currently needed for SplitTree
+    void OnPaint(wxPaintEvent& event);
+#endif
 };