More fixes and updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -31,7 +31,7 @@ class TestTree(wxRemotelyScrolledTreeCtrl):
|
|||||||
def OnPaint(self, evt):
|
def OnPaint(self, evt):
|
||||||
dc = wxPaintDC(self)
|
dc = wxPaintDC(self)
|
||||||
|
|
||||||
self.base_OnPaint(evt)
|
wxTreeCtrl.OnPaint(self, evt)
|
||||||
|
|
||||||
# Reset the device origin since it may have been set
|
# Reset the device origin since it may have been set
|
||||||
dc.SetDeviceOrigin(0, 0)
|
dc.SetDeviceOrigin(0, 0)
|
||||||
|
@@ -1234,6 +1234,7 @@ public:
|
|||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
void SetItemDropHighlight(const wxTreeItemId& item, int highlight = TRUE);
|
void SetItemDropHighlight(const wxTreeItemId& item, int highlight = TRUE);
|
||||||
|
#endif
|
||||||
|
|
||||||
//bool GetBoundingRect(const wxTreeItemId& item, wxRect& rect, int textOnly = FALSE)
|
//bool GetBoundingRect(const wxTreeItemId& item, wxRect& rect, int textOnly = FALSE)
|
||||||
%addmethods {
|
%addmethods {
|
||||||
@@ -1252,7 +1253,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
%pragma(python) addtoclass = "
|
%pragma(python) addtoclass = "
|
||||||
# Redefine some methods that SWIG gets a bit confused on...
|
# Redefine some methods that SWIG gets a bit confused on...
|
||||||
@@ -1272,6 +1273,9 @@ public:
|
|||||||
val1.thisown = 1
|
val1.thisown = 1
|
||||||
return (val1,val2)
|
return (val1,val2)
|
||||||
"
|
"
|
||||||
|
|
||||||
|
// This seems pretty bogus, but is currently needed for SplitTree
|
||||||
|
void OnPaint(wxPaintEvent& event);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -9259,7 +9259,99 @@ static PyObject *_wrap_wxTreeCtrl_SetItemFont(PyObject *self, PyObject *args, Py
|
|||||||
return _resultobj;
|
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[] = {
|
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_SetItemFont", (PyCFunction) _wrap_wxTreeCtrl_SetItemFont, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxTreeCtrl_SetItemBackgroundColour", (PyCFunction) _wrap_wxTreeCtrl_SetItemBackgroundColour, METH_VARARGS | METH_KEYWORDS },
|
{ "wxTreeCtrl_SetItemBackgroundColour", (PyCFunction) _wrap_wxTreeCtrl_SetItemBackgroundColour, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxTreeCtrl_SetItemTextColour", (PyCFunction) _wrap_wxTreeCtrl_SetItemTextColour, METH_VARARGS | METH_KEYWORDS },
|
{ "wxTreeCtrl_SetItemTextColour", (PyCFunction) _wrap_wxTreeCtrl_SetItemTextColour, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
@@ -771,6 +771,7 @@ class wxTreeItemIdPtr :
|
|||||||
return val
|
return val
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "<C wxTreeItemId instance at %s>" % (self.this,)
|
return "<C wxTreeItemId instance at %s>" % (self.this,)
|
||||||
|
Ok = IsOk
|
||||||
class wxTreeItemId(wxTreeItemIdPtr):
|
class wxTreeItemId(wxTreeItemIdPtr):
|
||||||
def __init__(self,*_args,**_kwargs):
|
def __init__(self,*_args,**_kwargs):
|
||||||
self.this = apply(controls2c.new_wxTreeItemId,_args,_kwargs)
|
self.this = apply(controls2c.new_wxTreeItemId,_args,_kwargs)
|
||||||
@@ -1061,6 +1062,12 @@ class wxTreeCtrlPtr(wxControlPtr):
|
|||||||
def SetItemFont(self, *_args, **_kwargs):
|
def SetItemFont(self, *_args, **_kwargs):
|
||||||
val = apply(controls2c.wxTreeCtrl_SetItemFont,(self,) + _args, _kwargs)
|
val = apply(controls2c.wxTreeCtrl_SetItemFont,(self,) + _args, _kwargs)
|
||||||
return val
|
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):
|
def __repr__(self):
|
||||||
return "<C wxTreeCtrl instance at %s>" % (self.this,)
|
return "<C wxTreeCtrl instance at %s>" % (self.this,)
|
||||||
|
|
||||||
|
@@ -2118,6 +2118,7 @@ SWIGEXPORT(void) initwxc() {
|
|||||||
PyDict_SetItemString(d,"wxJOY_BUTTON_ANY", PyInt_FromLong((long) wxJOY_BUTTON_ANY));
|
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_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_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_TEXT", PyInt_FromLong((long) wxMM_TEXT));
|
||||||
PyDict_SetItemString(d,"wxMM_LOMETRIC", PyInt_FromLong((long) wxMM_LOMETRIC));
|
PyDict_SetItemString(d,"wxMM_LOMETRIC", PyInt_FromLong((long) wxMM_LOMETRIC));
|
||||||
PyDict_SetItemString(d,"wxMM_HIMETRIC", PyInt_FromLong((long) wxMM_HIMETRIC));
|
PyDict_SetItemString(d,"wxMM_HIMETRIC", PyInt_FromLong((long) wxMM_HIMETRIC));
|
||||||
|
@@ -434,6 +434,7 @@ wxJOY_BUTTON4 = wxc.wxJOY_BUTTON4
|
|||||||
wxJOY_BUTTON_ANY = wxc.wxJOY_BUTTON_ANY
|
wxJOY_BUTTON_ANY = wxc.wxJOY_BUTTON_ANY
|
||||||
wxWS_EX_VALIDATE_RECURSIVELY = wxc.wxWS_EX_VALIDATE_RECURSIVELY
|
wxWS_EX_VALIDATE_RECURSIVELY = wxc.wxWS_EX_VALIDATE_RECURSIVELY
|
||||||
wxWS_EX_BLOCK_EVENTS = wxc.wxWS_EX_BLOCK_EVENTS
|
wxWS_EX_BLOCK_EVENTS = wxc.wxWS_EX_BLOCK_EVENTS
|
||||||
|
wxWS_EX_TRANSIENT = wxc.wxWS_EX_TRANSIENT
|
||||||
wxMM_TEXT = wxc.wxMM_TEXT
|
wxMM_TEXT = wxc.wxMM_TEXT
|
||||||
wxMM_LOMETRIC = wxc.wxMM_LOMETRIC
|
wxMM_LOMETRIC = wxc.wxMM_LOMETRIC
|
||||||
wxMM_HIMETRIC = wxc.wxMM_HIMETRIC
|
wxMM_HIMETRIC = wxc.wxMM_HIMETRIC
|
||||||
|
@@ -401,8 +401,10 @@ public:
|
|||||||
void SetAcceleratorTable(const wxAcceleratorTable& accel);
|
void SetAcceleratorTable(const wxAcceleratorTable& accel);
|
||||||
wxAcceleratorTable *GetAcceleratorTable();
|
wxAcceleratorTable *GetAcceleratorTable();
|
||||||
|
|
||||||
|
#ifdef __WXMSW__
|
||||||
%name(base_OnPaint)void OnPaint(wxPaintEvent& event);
|
// This seems pretty bogus, but is currently needed for SplitTree
|
||||||
|
void OnPaint(wxPaintEvent& event);
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user