mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-09-23 06:33:59 +08:00
SWIGged updates for wxMSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19804 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -19,6 +19,8 @@
|
||||
/* Implementation : PYTHON */
|
||||
|
||||
#define SWIGPYTHON
|
||||
#include "Python.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
/* Definitions for Windows/Unix exporting */
|
||||
@@ -36,12 +38,9 @@
|
||||
# define SWIGEXPORT(a) a
|
||||
#endif
|
||||
|
||||
#include "Python.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void SWIG_MakePtr(char *, void *, char *);
|
||||
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
|
||||
extern char *SWIG_GetPtr(char *, void **, char *);
|
||||
@@ -130,8 +129,7 @@ static PyObject *_wrap_new_wxCalendarDateAttr(PyObject *self, PyObject *args, Py
|
||||
return NULL;
|
||||
}
|
||||
if (_argo3) {
|
||||
if (_argo3 == Py_None) { _arg3 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxFont_p")) {
|
||||
if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxFont_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxCalendarDateAttr. Expected _wxFont_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -316,8 +314,7 @@ static PyObject *_wrap_wxCalendarDateAttr_SetFont(PyObject *self, PyObject *args
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxCalendarDateAttr_SetFont. Expected _wxFont_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -897,8 +894,7 @@ static PyObject *_wrap_new_wxCalendarCtrl(PyObject *self, PyObject *args, PyObje
|
||||
}
|
||||
}
|
||||
if (_argo2) {
|
||||
if (_argo2 == Py_None) { _arg2 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxDateTime_p")) {
|
||||
if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxDateTime_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxCalendarCtrl. Expected _wxDateTime_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -1007,8 +1003,7 @@ static PyObject *_wrap_wxCalendarCtrl_Create(PyObject *self, PyObject *args, PyO
|
||||
}
|
||||
}
|
||||
if (_argo3) {
|
||||
if (_argo3 == Py_None) { _arg3 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxDateTime_p")) {
|
||||
if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxDateTime_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxCalendarCtrl_Create. Expected _wxDateTime_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -1065,8 +1060,7 @@ static PyObject *_wrap_wxCalendarCtrl_SetDate(PyObject *self, PyObject *args, Py
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxCalendarCtrl_SetDate. Expected _wxDateTime_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -1139,8 +1133,7 @@ static PyObject *_wrap_wxCalendarCtrl_SetLowerDateLimit(PyObject *self, PyObject
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxCalendarCtrl_SetLowerDateLimit. Expected _wxDateTime_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -1212,8 +1205,7 @@ static PyObject *_wrap_wxCalendarCtrl_SetUpperDateLimit(PyObject *self, PyObject
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxCalendarCtrl_SetUpperDateLimit. Expected _wxDateTime_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -1287,15 +1279,13 @@ static PyObject *_wrap_wxCalendarCtrl_SetDateRange(PyObject *self, PyObject *arg
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxCalendarCtrl_SetDateRange. Expected _wxDateTime_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo2) {
|
||||
if (_argo2 == Py_None) { _arg2 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxDateTime_p")) {
|
||||
if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxDateTime_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxCalendarCtrl_SetDateRange. Expected _wxDateTime_p.");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -282,3 +282,4 @@ wxEVT_CALENDAR_WEEKDAY_CLICKED = calendarc.wxEVT_CALENDAR_WEEKDAY_CLICKED
|
||||
# Stuff these names into the wx namespace so wxPyConstructObject can find them
|
||||
|
||||
wx.wxCalendarEventPtr = wxCalendarEventPtr
|
||||
wx.wxCalendarCtrlPtr = wxCalendarCtrlPtr
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
/* Implementation : PYTHON */
|
||||
|
||||
#define SWIGPYTHON
|
||||
#include "Python.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
/* Definitions for Windows/Unix exporting */
|
||||
@@ -36,12 +38,9 @@
|
||||
# define SWIGEXPORT(a) a
|
||||
#endif
|
||||
|
||||
#include "Python.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void SWIG_MakePtr(char *, void *, char *);
|
||||
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
|
||||
extern char *SWIG_GetPtr(char *, void **, char *);
|
||||
@@ -191,7 +190,7 @@ wxBitmap wxPyBitmapDataObject::GetBitmap() {
|
||||
void wxPyBitmapDataObject::SetBitmap(const wxBitmap& bitmap) {
|
||||
wxPyBeginBlockThreads();
|
||||
if (m_myInst.findCallback("SetBitmap")) {
|
||||
PyObject* bo = wxPyConstructObject((void*)&bitmap, "wxBitmap");
|
||||
PyObject* bo = wxPyConstructObject((void*)&bitmap, wxT("wxBitmap"));
|
||||
m_myInst.callCallback(Py_BuildValue("(O)", bo));
|
||||
Py_DECREF(bo);
|
||||
}
|
||||
@@ -206,15 +205,17 @@ void wxPyBitmapDataObject::SetBitmap(const wxBitmap& bitmap) {
|
||||
class wxPyDropSource : public wxDropSource {
|
||||
public:
|
||||
#ifdef __WXMSW__
|
||||
wxPyDropSource(wxWindow *win = NULL,
|
||||
const wxCursor &cursorCopy = wxNullCursor,
|
||||
const wxCursor &cursorMove = wxNullCursor,
|
||||
const wxCursor &cursorStop = wxNullCursor)
|
||||
: wxDropSource(win, cursorCopy, cursorMove, cursorStop) {}
|
||||
wxPyDropSource(wxWindow *win = NULL,
|
||||
const wxCursor © = wxNullCursor,
|
||||
const wxCursor &move = wxNullCursor,
|
||||
const wxCursor &none = wxNullCursor)
|
||||
: wxDropSource(win, copy, move, none) {}
|
||||
#else
|
||||
wxPyDropSource(wxWindow *win = NULL,
|
||||
const wxIcon &go = wxNullIcon)
|
||||
: wxDropSource(win, go) {}
|
||||
const wxIcon& copy = wxNullIcon,
|
||||
const wxIcon& move = wxNullIcon,
|
||||
const wxIcon& none = wxNullIcon)
|
||||
: wxDropSource(win, copy, move, none) {}
|
||||
#endif
|
||||
~wxPyDropSource() { }
|
||||
|
||||
@@ -537,7 +538,7 @@ static PyObject *_wrap_wxDataFormat_GetId(PyObject *self, PyObject *args, PyObje
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -713,43 +714,6 @@ static PyObject *_wrap_wxDataObject_GetAllFormats(PyObject *self, PyObject *args
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxDataObject_GetDataSize(_swigobj,_swigarg0) (_swigobj->GetDataSize(_swigarg0))
|
||||
static PyObject *_wrap_wxDataObject_GetDataSize(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
size_t _result;
|
||||
wxDataObject * _arg0;
|
||||
wxDataFormat * _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
char *_kwnames[] = { "self","format", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDataObject_GetDataSize",_kwnames,&_argo0,&_argo1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDataObject_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDataObject_GetDataSize. Expected _wxDataObject_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDataObject_GetDataSize. Expected _wxDataFormat_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (size_t )wxDataObject_GetDataSize(_arg0,*_arg1);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxDataObject_GetDataHere(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetDataHere(_swigarg0,_swigarg1))
|
||||
static PyObject *_wrap_wxDataObject_GetDataHere(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
@@ -773,8 +737,7 @@ static PyObject *_wrap_wxDataObject_GetDataHere(PyObject *self, PyObject *args,
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDataObject_GetDataHere. Expected _wxDataFormat_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -796,6 +759,42 @@ static PyObject *_wrap_wxDataObject_GetDataHere(PyObject *self, PyObject *args,
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxDataObject_GetDataSize(_swigobj,_swigarg0) (_swigobj->GetDataSize(_swigarg0))
|
||||
static PyObject *_wrap_wxDataObject_GetDataSize(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
size_t _result;
|
||||
wxDataObject * _arg0;
|
||||
wxDataFormat * _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
char *_kwnames[] = { "self","format", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDataObject_GetDataSize",_kwnames,&_argo0,&_argo1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDataObject_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDataObject_GetDataSize. Expected _wxDataObject_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDataObject_GetDataSize. Expected _wxDataFormat_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (size_t )wxDataObject_GetDataSize(_arg0,*_arg1);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxDataObject_SetData(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetData(_swigarg0,_swigarg1,_swigarg2))
|
||||
static PyObject *_wrap_wxDataObject_SetData(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
@@ -820,8 +819,7 @@ static PyObject *_wrap_wxDataObject_SetData(PyObject *self, PyObject *args, PyOb
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDataObject_SetData. Expected _wxDataFormat_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -864,8 +862,7 @@ static PyObject *_wrap_wxDataObject_IsSupportedFormat(PyObject *self, PyObject *
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDataObject_IsSupportedFormat. Expected _wxDataFormat_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -901,8 +898,7 @@ static PyObject *_wrap_new_wxDataObjectSimple(PyObject *self, PyObject *args, Py
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxDataObjectSimple",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDataFormat_p")) {
|
||||
if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDataFormat_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxDataObjectSimple. Expected _wxDataFormat_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -979,8 +975,7 @@ static PyObject *_wrap_wxDataObjectSimple_SetFormat(PyObject *self, PyObject *ar
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDataObjectSimple_SetFormat. Expected _wxDataFormat_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -1025,8 +1020,7 @@ static PyObject *_wrap_new_wxPyDataObjectSimple(PyObject *self, PyObject *args,
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxPyDataObjectSimple",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDataFormat_p")) {
|
||||
if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDataFormat_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxPyDataObjectSimple. Expected _wxDataFormat_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -1265,7 +1259,7 @@ static PyObject *_wrap_wxTextDataObject_GetText(PyObject *self, PyObject *args,
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -1444,8 +1438,7 @@ static PyObject *_wrap_new_wxBitmapDataObject(PyObject *self, PyObject *args, Py
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxBitmapDataObject",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) {
|
||||
if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxBitmapDataObject. Expected _wxBitmap_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -1516,8 +1509,7 @@ static PyObject *_wrap_wxBitmapDataObject_SetBitmap(PyObject *self, PyObject *ar
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBitmapDataObject_SetBitmap. Expected _wxBitmap_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -1570,8 +1562,7 @@ static PyObject *_wrap_new_wxPyBitmapDataObject(PyObject *self, PyObject *args,
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxPyBitmapDataObject",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) {
|
||||
if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxPyBitmapDataObject. Expected _wxBitmap_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -1773,8 +1764,7 @@ static PyObject *_wrap_new_wxCustomDataObject(PyObject *self, PyObject *args, Py
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxCustomDataObject",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDataFormat_p")) {
|
||||
if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDataFormat_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxCustomDataObject. Expected _wxDataFormat_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -1998,7 +1988,7 @@ static PyObject *_wrap_wxURLDataObject_GetURL(PyObject *self, PyObject *args, Py
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -2110,8 +2100,7 @@ static PyObject *_wrap_wxMetafileDataObject_SetMetafile(PyObject *self, PyObject
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxMetafile_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxMetafile_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMetafileDataObject_SetMetafile. Expected _wxMetafile_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -2370,8 +2359,7 @@ static PyObject *_wrap_wxClipboard_IsSupported(PyObject *self, PyObject *args, P
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxClipboard_IsSupported. Expected _wxDataFormat_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -2407,8 +2395,7 @@ static PyObject *_wrap_wxClipboard_GetData(PyObject *self, PyObject *args, PyObj
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataObject_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataObject_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxClipboard_GetData. Expected _wxDataObject_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -2520,7 +2507,7 @@ static PyObject *_wrap_new_wxDropSource(PyObject *self, PyObject *args, PyObject
|
||||
PyObject * _argo1 = 0;
|
||||
PyObject * _argo2 = 0;
|
||||
PyObject * _argo3 = 0;
|
||||
char *_kwnames[] = { "win","cursorCopy","cursorMove","cursorStop", NULL };
|
||||
char *_kwnames[] = { "win","copy","move","none", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
@@ -2534,22 +2521,19 @@ static PyObject *_wrap_new_wxDropSource(PyObject *self, PyObject *args, PyObject
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxDropSource. Expected _wxCursor_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo2) {
|
||||
if (_argo2 == Py_None) { _arg2 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxCursor_p")) {
|
||||
if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxCursor_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxDropSource. Expected _wxCursor_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo3) {
|
||||
if (_argo3 == Py_None) { _arg3 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxCursor_p")) {
|
||||
if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxCursor_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxDropSource. Expected _wxCursor_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -2657,8 +2641,7 @@ static PyObject *_wrap_wxDropSource_SetData(PyObject *self, PyObject *args, PyOb
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataObject_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataObject_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDropSource_SetData. Expected _wxDataObject_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -2730,8 +2713,7 @@ static PyObject *_wrap_wxDropSource_SetCursor(PyObject *self, PyObject *args, Py
|
||||
}
|
||||
}
|
||||
if (_argo2) {
|
||||
if (_argo2 == Py_None) { _arg2 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxCursor_p")) {
|
||||
if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxCursor_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxDropSource_SetCursor. Expected _wxCursor_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -3674,8 +3656,8 @@ static PyMethodDef clip_dndcMethods[] = {
|
||||
{ "new_wxDataObjectSimple", (PyCFunction) _wrap_new_wxDataObjectSimple, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxDataObject_IsSupportedFormat", (PyCFunction) _wrap_wxDataObject_IsSupportedFormat, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxDataObject_SetData", (PyCFunction) _wrap_wxDataObject_SetData, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxDataObject_GetDataHere", (PyCFunction) _wrap_wxDataObject_GetDataHere, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxDataObject_GetDataSize", (PyCFunction) _wrap_wxDataObject_GetDataSize, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxDataObject_GetDataHere", (PyCFunction) _wrap_wxDataObject_GetDataHere, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxDataObject_GetAllFormats", (PyCFunction) _wrap_wxDataObject_GetAllFormats, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxDataObject_GetFormatCount", (PyCFunction) _wrap_wxDataObject_GetFormatCount, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxDataObject_GetPreferredFormat", (PyCFunction) _wrap_wxDataObject_GetPreferredFormat, METH_VARARGS | METH_KEYWORDS },
|
||||
|
||||
@@ -11,9 +11,12 @@ class wxDataFormatPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,clip_dndc=clip_dndc):
|
||||
if self.thisown == 1 :
|
||||
clip_dndc.delete_wxDataFormat(self)
|
||||
def __del__(self, delfunc=clip_dndc.delete_wxDataFormat):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def SetType(self, *_args, **_kwargs):
|
||||
val = apply(clip_dndc.wxDataFormat_SetType,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -43,9 +46,12 @@ class wxDataObjectPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,clip_dndc=clip_dndc):
|
||||
if self.thisown == 1 :
|
||||
clip_dndc.delete_wxDataObject(self)
|
||||
def __del__(self, delfunc=clip_dndc.delete_wxDataObject):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def GetPreferredFormat(self, *_args, **_kwargs):
|
||||
val = apply(clip_dndc.wxDataObject_GetPreferredFormat,(self,) + _args, _kwargs)
|
||||
if val: val = wxDataFormatPtr(val) ; val.thisown = 1
|
||||
@@ -56,12 +62,12 @@ class wxDataObjectPtr :
|
||||
def GetAllFormats(self, *_args, **_kwargs):
|
||||
val = apply(clip_dndc.wxDataObject_GetAllFormats,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetDataSize(self, *_args, **_kwargs):
|
||||
val = apply(clip_dndc.wxDataObject_GetDataSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetDataHere(self, *_args, **_kwargs):
|
||||
val = apply(clip_dndc.wxDataObject_GetDataHere,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetDataSize(self, *_args, **_kwargs):
|
||||
val = apply(clip_dndc.wxDataObject_GetDataSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetData(self, *_args, **_kwargs):
|
||||
val = apply(clip_dndc.wxDataObject_SetData,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -353,9 +359,12 @@ class wxDropSourcePtr :
|
||||
def _setCallbackInfo(self, *_args, **_kwargs):
|
||||
val = apply(clip_dndc.wxDropSource__setCallbackInfo,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __del__(self,clip_dndc=clip_dndc):
|
||||
if self.thisown == 1 :
|
||||
clip_dndc.delete_wxDropSource(self)
|
||||
def __del__(self, delfunc=clip_dndc.delete_wxDropSource):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def SetData(self, *_args, **_kwargs):
|
||||
val = apply(clip_dndc.wxDropSource_SetData,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -403,9 +412,12 @@ class wxPyDropTargetPtr(wxDropTargetPtr):
|
||||
def _setCallbackInfo(self, *_args, **_kwargs):
|
||||
val = apply(clip_dndc.wxPyDropTarget__setCallbackInfo,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __del__(self,clip_dndc=clip_dndc):
|
||||
if self.thisown == 1 :
|
||||
clip_dndc.delete_wxPyDropTarget(self)
|
||||
def __del__(self, delfunc=clip_dndc.delete_wxPyDropTarget):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def GetDataObject(self, *_args, **_kwargs):
|
||||
val = apply(clip_dndc.wxPyDropTarget_GetDataObject,(self,) + _args, _kwargs)
|
||||
if val: val = wxDataObjectPtr(val)
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
/* Implementation : PYTHON */
|
||||
|
||||
#define SWIGPYTHON
|
||||
#include "Python.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
/* Definitions for Windows/Unix exporting */
|
||||
@@ -36,12 +38,9 @@
|
||||
# define SWIGEXPORT(a) a
|
||||
#endif
|
||||
|
||||
#include "Python.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void SWIG_MakePtr(char *, void *, char *);
|
||||
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
|
||||
extern char *SWIG_GetPtr(char *, void **, char *);
|
||||
@@ -658,7 +657,7 @@ static PyObject *_wrap_wxDirDialog_GetPath(PyObject *self, PyObject *args, PyObj
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -695,7 +694,7 @@ static PyObject *_wrap_wxDirDialog_GetMessage(PyObject *self, PyObject *args, Py
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -999,7 +998,7 @@ static PyObject *_wrap_wxFileDialog_GetDirectory(PyObject *self, PyObject *args,
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -1036,7 +1035,7 @@ static PyObject *_wrap_wxFileDialog_GetFilename(PyObject *self, PyObject *args,
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -1101,7 +1100,7 @@ static PyObject *_wrap_wxFileDialog_GetMessage(PyObject *self, PyObject *args, P
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -1138,7 +1137,7 @@ static PyObject *_wrap_wxFileDialog_GetPath(PyObject *self, PyObject *args, PyOb
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -1203,7 +1202,7 @@ static PyObject *_wrap_wxFileDialog_GetWildcard(PyObject *self, PyObject *args,
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -1958,7 +1957,7 @@ static PyObject *_wrap_wxSingleChoiceDialog_GetStringSelection(PyObject *self, P
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -2172,7 +2171,7 @@ static PyObject *_wrap_wxTextEntryDialog_GetValue(PyObject *self, PyObject *args
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -2568,8 +2567,7 @@ static PyObject *_wrap_wxFontData_SetChosenFont(PyObject *self, PyObject *args,
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFontData_SetChosenFont. Expected _wxFont_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -2641,8 +2639,7 @@ static PyObject *_wrap_wxFontData_SetInitialFont(PyObject *self, PyObject *args,
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFontData_SetInitialFont. Expected _wxFont_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -2781,8 +2778,7 @@ static PyObject *_wrap_new_wxFontDialog(PyObject *self, PyObject *args, PyObject
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFontData_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFontData_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxFontDialog. Expected _wxFontData_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -3277,7 +3273,7 @@ static PyObject *_wrap_wxFindDialogEvent_GetFindString(PyObject *self, PyObject
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -3315,7 +3311,7 @@ static PyObject *_wrap_wxFindDialogEvent_GetReplaceString(PyObject *self, PyObje
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -3555,7 +3551,7 @@ static PyObject *_wrap_wxFindReplaceData_GetFindString(PyObject *self, PyObject
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -3590,7 +3586,7 @@ static PyObject *_wrap_wxFindReplaceData_GetReplaceString(PyObject *self, PyObje
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
|
||||
@@ -41,9 +41,12 @@ class wxColourDataPtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,cmndlgsc=cmndlgsc):
|
||||
if self.thisown == 1 :
|
||||
cmndlgsc.delete_wxColourData(self)
|
||||
def __del__(self, delfunc=cmndlgsc.delete_wxColourData):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def GetChooseFull(self, *_args, **_kwargs):
|
||||
val = apply(cmndlgsc.wxColourData_GetChooseFull,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -271,9 +274,12 @@ class wxFontDataPtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,cmndlgsc=cmndlgsc):
|
||||
if self.thisown == 1 :
|
||||
cmndlgsc.delete_wxFontData(self)
|
||||
def __del__(self, delfunc=cmndlgsc.delete_wxFontData):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def EnableEffects(self, *_args, **_kwargs):
|
||||
val = apply(cmndlgsc.wxFontData_EnableEffects,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -427,9 +433,12 @@ class wxFindReplaceDataPtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,cmndlgsc=cmndlgsc):
|
||||
if self.thisown == 1 :
|
||||
cmndlgsc.delete_wxFindReplaceData(self)
|
||||
def __del__(self, delfunc=cmndlgsc.delete_wxFindReplaceData):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def GetFindString(self, *_args, **_kwargs):
|
||||
val = apply(cmndlgsc.wxFindReplaceData_GetFindString,(self,) + _args, _kwargs)
|
||||
return val
|
||||
|
||||
+133
-115
File diff suppressed because it is too large
Load Diff
@@ -206,6 +206,9 @@ class wxCheckBoxPtr(wxControlPtr):
|
||||
def GetValue(self, *_args, **_kwargs):
|
||||
val = apply(controlsc.wxCheckBox_GetValue,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def IsChecked(self, *_args, **_kwargs):
|
||||
val = apply(controlsc.wxCheckBox_IsChecked,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetValue(self, *_args, **_kwargs):
|
||||
val = apply(controlsc.wxCheckBox_SetValue,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -569,9 +572,12 @@ class wxTextAttrPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,controlsc=controlsc):
|
||||
if self.thisown == 1 :
|
||||
controlsc.delete_wxTextAttr(self)
|
||||
def __del__(self, delfunc=controlsc.delete_wxTextAttr):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def SetTextColour(self, *_args, **_kwargs):
|
||||
val = apply(controlsc.wxTextAttr_SetTextColour,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -930,6 +936,9 @@ class wxRadioBoxPtr(wxControlPtr):
|
||||
def GetRowCount(self, *_args, **_kwargs):
|
||||
val = apply(controlsc.wxRadioBox_GetRowCount,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetNextItem(self, *_args, **_kwargs):
|
||||
val = apply(controlsc.wxRadioBox_GetNextItem,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetSelection(self, *_args, **_kwargs):
|
||||
val = apply(controlsc.wxRadioBox_GetSelection,(self,) + _args, _kwargs)
|
||||
return val
|
||||
|
||||
+241
-190
File diff suppressed because it is too large
Load Diff
@@ -186,9 +186,12 @@ class wxListItemPtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,controls2c=controls2c):
|
||||
if self.thisown == 1 :
|
||||
controls2c.delete_wxListItem(self)
|
||||
def __del__(self, delfunc=controls2c.delete_wxListItem):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def Clear(self, *_args, **_kwargs):
|
||||
val = apply(controls2c.wxListItem_Clear,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -670,6 +673,14 @@ class wxListCtrlPtr(wxControlPtr):
|
||||
'''get the currently focused item or -1 if none'''
|
||||
return self.GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_FOCUSED)
|
||||
|
||||
def GetFirstSelected(self, *args):
|
||||
'''return first selected item, or -1 when none'''
|
||||
return self.GetNextSelected(-1)
|
||||
|
||||
def GetNextSelected(self, item):
|
||||
'''return subsequent selected items, or -1 when no more'''
|
||||
return self.GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED)
|
||||
|
||||
def IsSelected(self, idx):
|
||||
'''return TRUE if the item is selected'''
|
||||
return self.GetItemState(idx, wxLIST_STATE_SELECTED) != 0
|
||||
@@ -687,10 +698,14 @@ class wxListCtrlPtr(wxControlPtr):
|
||||
'''Append an item to the list control. The entry parameter should be a
|
||||
sequence with an item for each column'''
|
||||
if len(entry):
|
||||
if wx.wxUSE_UNICODE:
|
||||
cvtfunc = unicode
|
||||
else:
|
||||
cvtfunc = str
|
||||
pos = self.GetItemCount()
|
||||
self.InsertStringItem(pos, str(entry[0]))
|
||||
self.InsertStringItem(pos, cvtfunc(entry[0]))
|
||||
for i in range(1, len(entry)):
|
||||
self.SetStringItem(pos, i, str(entry[i]))
|
||||
self.SetStringItem(pos, i, cvtfunc(entry[i]))
|
||||
return pos
|
||||
|
||||
class wxListCtrl(wxListCtrlPtr):
|
||||
@@ -805,9 +820,12 @@ class wxTreeItemIdPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,controls2c=controls2c):
|
||||
if self.thisown == 1 :
|
||||
controls2c.delete_wxTreeItemId(self)
|
||||
def __del__(self, delfunc=controls2c.delete_wxTreeItemId):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def IsOk(self, *_args, **_kwargs):
|
||||
val = apply(controls2c.wxTreeItemId_IsOk,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -971,6 +989,18 @@ class wxTreeCtrlPtr(wxControlPtr):
|
||||
def SetPyData(self, *_args, **_kwargs):
|
||||
val = apply(controls2c.wxTreeCtrl_SetPyData,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetItemTextColour(self, *_args, **_kwargs):
|
||||
val = apply(controls2c.wxTreeCtrl_GetItemTextColour,(self,) + _args, _kwargs)
|
||||
if val: val = wxColourPtr(val) ; val.thisown = 1
|
||||
return val
|
||||
def GetItemBackgroundColour(self, *_args, **_kwargs):
|
||||
val = apply(controls2c.wxTreeCtrl_GetItemBackgroundColour,(self,) + _args, _kwargs)
|
||||
if val: val = wxColourPtr(val) ; val.thisown = 1
|
||||
return val
|
||||
def GetItemFont(self, *_args, **_kwargs):
|
||||
val = apply(controls2c.wxTreeCtrl_GetItemFont,(self,) + _args, _kwargs)
|
||||
if val: val = wxFontPtr(val) ; val.thisown = 1
|
||||
return val
|
||||
def IsVisible(self, *_args, **_kwargs):
|
||||
val = apply(controls2c.wxTreeCtrl_IsVisible,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -1087,12 +1117,12 @@ class wxTreeCtrlPtr(wxControlPtr):
|
||||
def ScrollTo(self, *_args, **_kwargs):
|
||||
val = apply(controls2c.wxTreeCtrl_ScrollTo,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def EditLabel(self, *_args, **_kwargs):
|
||||
val = apply(controls2c.wxTreeCtrl_EditLabel,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetEditControl(self, *_args, **_kwargs):
|
||||
val = apply(controls2c.wxTreeCtrl_GetEditControl,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def EditLabel(self, *_args, **_kwargs):
|
||||
val = apply(controls2c.wxTreeCtrl_EditLabel,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def EndEditLabel(self, *_args, **_kwargs):
|
||||
val = apply(controls2c.wxTreeCtrl_EndEditLabel,(self,) + _args, _kwargs)
|
||||
return val
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
/* Implementation : PYTHON */
|
||||
|
||||
#define SWIGPYTHON
|
||||
#include "Python.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
/* Definitions for Windows/Unix exporting */
|
||||
@@ -36,12 +38,9 @@
|
||||
# define SWIGEXPORT(a) a
|
||||
#endif
|
||||
|
||||
#include "Python.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void SWIG_MakePtr(char *, void *, char *);
|
||||
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
|
||||
extern char *SWIG_GetPtr(char *, void **, char *);
|
||||
@@ -955,7 +954,7 @@ static PyObject *_wrap_wxCommandEvent_GetString(PyObject *self, PyObject *args,
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -2277,8 +2276,7 @@ static PyObject *_wrap_wxMouseEvent_GetLogicalPosition(PyObject *self, PyObject
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMouseEvent_GetLogicalPosition. Expected _wxDC_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -3332,8 +3330,7 @@ static PyObject *_wrap_wxSetCursorEvent_SetCursor(PyObject *self, PyObject *args
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSetCursorEvent_SetCursor. Expected _wxCursor_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -3568,34 +3565,6 @@ static PyObject *_wrap_wxKeyEvent_ShiftDown(PyObject *self, PyObject *args, PyOb
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxKeyEvent_KeyCode(_swigobj) (_swigobj->KeyCode())
|
||||
static PyObject *_wrap_wxKeyEvent_KeyCode(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
long _result;
|
||||
wxKeyEvent * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_KeyCode",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_KeyCode. Expected _wxKeyEvent_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (long )wxKeyEvent_KeyCode(_arg0);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("l",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxKeyEvent_GetKeyCode(_swigobj) (_swigobj->GetKeyCode())
|
||||
static PyObject *_wrap_wxKeyEvent_GetKeyCode(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
@@ -6015,7 +5984,7 @@ static PyObject * wxDropFilesEvent_GetFiles(wxDropFilesEvent *self) {
|
||||
|
||||
for (int i=0; i<count; i++) {
|
||||
#if wxUSE_UNICODE
|
||||
PyList_SetItem(list, i, PyUnicode_FromUnicode(files[i], files[i].Len()));
|
||||
PyList_SetItem(list, i, PyUnicode_FromWideChar(files[i], files[i].Len()));
|
||||
#else
|
||||
PyList_SetItem(list, i, PyString_FromString((const char*)files[i]));
|
||||
#endif
|
||||
@@ -6277,7 +6246,7 @@ static PyObject *_wrap_wxUpdateUIEvent_GetText(PyObject *self, PyObject *args, P
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -7322,8 +7291,7 @@ static PyObject *_wrap_new_wxTextUrlEvent(PyObject *self, PyObject *args, PyObje
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"iOll:new_wxTextUrlEvent",_kwnames,&_arg0,&_argo1,&_arg2,&_arg3))
|
||||
return NULL;
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxMouseEvent_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxMouseEvent_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxTextUrlEvent. Expected _wxMouseEvent_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -7828,7 +7796,6 @@ static PyMethodDef eventscMethods[] = {
|
||||
{ "wxKeyEvent_GetRawKeyCode", (PyCFunction) _wrap_wxKeyEvent_GetRawKeyCode, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxKeyEvent_HasModifiers", (PyCFunction) _wrap_wxKeyEvent_HasModifiers, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxKeyEvent_GetKeyCode", (PyCFunction) _wrap_wxKeyEvent_GetKeyCode, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxKeyEvent_KeyCode", (PyCFunction) _wrap_wxKeyEvent_KeyCode, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxKeyEvent_ShiftDown", (PyCFunction) _wrap_wxKeyEvent_ShiftDown, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxKeyEvent_AltDown", (PyCFunction) _wrap_wxKeyEvent_AltDown, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxKeyEvent_MetaDown", (PyCFunction) _wrap_wxKeyEvent_MetaDown, METH_VARARGS | METH_KEYWORDS },
|
||||
|
||||
+19
-12
@@ -10,9 +10,12 @@ class wxEventPtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,eventsc=eventsc):
|
||||
if self.thisown == 1 :
|
||||
eventsc.delete_wxEvent(self)
|
||||
def __del__(self, delfunc=eventsc.delete_wxEvent):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def GetEventObject(self, *_args, **_kwargs):
|
||||
val = apply(eventsc.wxEvent_GetEventObject,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -452,9 +455,6 @@ class wxKeyEventPtr(wxEventPtr):
|
||||
def ShiftDown(self, *_args, **_kwargs):
|
||||
val = apply(eventsc.wxKeyEvent_ShiftDown,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def KeyCode(self, *_args, **_kwargs):
|
||||
val = apply(eventsc.wxKeyEvent_KeyCode,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetKeyCode(self, *_args, **_kwargs):
|
||||
val = apply(eventsc.wxKeyEvent_GetKeyCode,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -536,6 +536,7 @@ class wxKeyEventPtr(wxEventPtr):
|
||||
raise AttributeError,name
|
||||
def __repr__(self):
|
||||
return "<C wxKeyEvent instance at %s>" % (self.this,)
|
||||
KeyCode = GetKeyCode
|
||||
class wxKeyEvent(wxKeyEventPtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = apply(eventsc.new_wxKeyEvent,_args,_kwargs)
|
||||
@@ -1095,9 +1096,12 @@ class wxPyEventPtr(wxEventPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,eventsc=eventsc):
|
||||
if self.thisown == 1 :
|
||||
eventsc.delete_wxPyEvent(self)
|
||||
def __del__(self, delfunc=eventsc.delete_wxPyEvent):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def SetSelf(self, *_args, **_kwargs):
|
||||
val = apply(eventsc.wxPyEvent_SetSelf,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -1119,9 +1123,12 @@ class wxPyCommandEventPtr(wxCommandEventPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,eventsc=eventsc):
|
||||
if self.thisown == 1 :
|
||||
eventsc.delete_wxPyCommandEvent(self)
|
||||
def __del__(self, delfunc=eventsc.delete_wxPyCommandEvent):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def SetSelf(self, *_args, **_kwargs):
|
||||
val = apply(eventsc.wxPyCommandEvent_SetSelf,(self,) + _args, _kwargs)
|
||||
return val
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
/* Implementation : PYTHON */
|
||||
|
||||
#define SWIGPYTHON
|
||||
#include "Python.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
/* Definitions for Windows/Unix exporting */
|
||||
@@ -36,12 +38,9 @@
|
||||
# define SWIGEXPORT(a) a
|
||||
#endif
|
||||
|
||||
#include "Python.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void SWIG_MakePtr(char *, void *, char *);
|
||||
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
|
||||
extern char *SWIG_GetPtr(char *, void **, char *);
|
||||
@@ -170,8 +169,7 @@ static PyObject *_wrap___wxMemoryFSHandler_AddFile_wxImage(PyObject *self, PyObj
|
||||
return NULL;
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxImage_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxImage_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of __wxMemoryFSHandler_AddFile_wxImage. Expected _wxImage_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -209,8 +207,7 @@ static PyObject *_wrap___wxMemoryFSHandler_AddFile_wxBitmap(PyObject *self, PyOb
|
||||
return NULL;
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of __wxMemoryFSHandler_AddFile_wxBitmap. Expected _wxBitmap_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -391,7 +388,7 @@ static PyObject *_wrap_wxFSFile_GetStream(PyObject *self, PyObject *args, PyObje
|
||||
if (_result) {
|
||||
_ptr = new wxPyInputStream(_result);
|
||||
}
|
||||
_resultobj = wxPyConstructObject(_ptr, "wxInputStream", TRUE);
|
||||
_resultobj = wxPyConstructObject(_ptr, wxT("wxInputStream"), TRUE);
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
@@ -423,7 +420,7 @@ static PyObject *_wrap_wxFSFile_GetMimeType(PyObject *self, PyObject *args, PyOb
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -458,7 +455,7 @@ static PyObject *_wrap_wxFSFile_GetLocation(PyObject *self, PyObject *args, PyOb
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -493,7 +490,7 @@ static PyObject *_wrap_wxFSFile_GetAnchor(PyObject *self, PyObject *args, PyObje
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -681,8 +678,7 @@ static PyObject *_wrap_wxFileSystemHandler_OpenFile(PyObject *self, PyObject *ar
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFileSystemHandler_OpenFile. Expected _wxFileSystem_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -740,7 +736,7 @@ static PyObject *_wrap_wxFileSystemHandler_FindFirst(PyObject *self, PyObject *a
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -781,7 +777,7 @@ static PyObject *_wrap_wxFileSystemHandler_FindNext(PyObject *self, PyObject *ar
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -825,7 +821,7 @@ static PyObject *_wrap_wxFileSystemHandler_GetProtocol(PyObject *self, PyObject
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -873,7 +869,7 @@ static PyObject *_wrap_wxFileSystemHandler_GetLeftLocation(PyObject *self, PyObj
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -921,7 +917,7 @@ static PyObject *_wrap_wxFileSystemHandler_GetAnchor(PyObject *self, PyObject *a
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -969,7 +965,7 @@ static PyObject *_wrap_wxFileSystemHandler_GetRightLocation(PyObject *self, PyOb
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -1017,7 +1013,7 @@ static PyObject *_wrap_wxFileSystemHandler_GetMimeTypeFromExt(PyObject *self, Py
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -1134,7 +1130,7 @@ static PyObject *_wrap_wxFileSystem_GetPath(PyObject *self, PyObject *args, PyOb
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -1218,7 +1214,7 @@ static PyObject *_wrap_wxFileSystem_FindFirst(PyObject *self, PyObject *args, Py
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -1259,7 +1255,7 @@ static PyObject *_wrap_wxFileSystem_FindNext(PyObject *self, PyObject *args, PyO
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -1419,8 +1415,7 @@ static PyObject *_wrap_wxInternetFSHandler_OpenFile(PyObject *self, PyObject *ar
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxInternetFSHandler_OpenFile. Expected _wxFileSystem_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -1548,8 +1543,7 @@ static PyObject *_wrap_wxZipFSHandler_OpenFile(PyObject *self, PyObject *args, P
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxZipFSHandler_OpenFile. Expected _wxFileSystem_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -1607,7 +1601,7 @@ static PyObject *_wrap_wxZipFSHandler_FindFirst(PyObject *self, PyObject *args,
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -1648,7 +1642,7 @@ static PyObject *_wrap_wxZipFSHandler_FindNext(PyObject *self, PyObject *args, P
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -1792,8 +1786,7 @@ static PyObject *_wrap_wxMemoryFSHandler_OpenFile(PyObject *self, PyObject *args
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMemoryFSHandler_OpenFile. Expected _wxFileSystem_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -1851,7 +1844,7 @@ static PyObject *_wrap_wxMemoryFSHandler_FindFirst(PyObject *self, PyObject *arg
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -1892,7 +1885,7 @@ static PyObject *_wrap_wxMemoryFSHandler_FindNext(PyObject *self, PyObject *args
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
|
||||
@@ -13,13 +13,12 @@ from fonts import *
|
||||
|
||||
from streams import *
|
||||
import wx
|
||||
import string
|
||||
|
||||
import types
|
||||
def wxMemoryFSHandler_AddFile(filename, a, b=''):
|
||||
if isinstance(a, wxImage):
|
||||
if wx.wxPy_isinstance(a, (wxImage, wxImagePtr)):
|
||||
__wxMemoryFSHandler_AddFile_wxImage(filename, a, b)
|
||||
elif isinstance(a, wxBitmap):
|
||||
elif wx.wxPy_isinstance(a, (wxBitmap, wxBitmapPtr)):
|
||||
__wxMemoryFSHandler_AddFile_wxBitmap(filename, a, b)
|
||||
elif type(a) == types.StringType:
|
||||
#__wxMemoryFSHandler_AddFile_wxString(filename, a)
|
||||
|
||||
+273
-104
File diff suppressed because it is too large
Load Diff
+57
-17
@@ -80,9 +80,12 @@ class wxFontMapperPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,fontsc=fontsc):
|
||||
if self.thisown == 1 :
|
||||
fontsc.delete_wxFontMapper(self)
|
||||
def __del__(self, delfunc=fontsc.delete_wxFontMapper):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def GetAltForEncoding(self, *_args, **_kwargs):
|
||||
val = apply(fontsc.wxFontMapper_GetAltForEncoding,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -118,9 +121,16 @@ class wxFontPtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,fontsc=fontsc):
|
||||
if self.thisown == 1 :
|
||||
fontsc.delete_wxFont(self)
|
||||
def wxFontFromNativeInfoString(self, *_args, **_kwargs):
|
||||
val = apply(fontsc.wxFont_wxFontFromNativeInfoString,(self,) + _args, _kwargs)
|
||||
if val: val = wxFontPtr(val) ; val.thisown = 1
|
||||
return val
|
||||
def __del__(self, delfunc=fontsc.delete_wxFont):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def Ok(self, *_args, **_kwargs):
|
||||
val = apply(fontsc.wxFont_Ok,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -194,6 +204,12 @@ class wxFontPtr(wxObjectPtr):
|
||||
def GetWeightString(self, *_args, **_kwargs):
|
||||
val = apply(fontsc.wxFont_GetWeightString,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetNoAntiAliasing(self, *_args, **_kwargs):
|
||||
val = apply(fontsc.wxFont_SetNoAntiAliasing,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetNoAntiAliasing(self, *_args, **_kwargs):
|
||||
val = apply(fontsc.wxFont_GetNoAntiAliasing,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxFont instance at %s>" % (self.this,)
|
||||
class wxFont(wxFontPtr):
|
||||
@@ -239,9 +255,12 @@ class wxFontEnumeratorPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,fontsc=fontsc):
|
||||
if self.thisown == 1 :
|
||||
fontsc.delete_wxFontEnumerator(self)
|
||||
def __del__(self, delfunc=fontsc.delete_wxFontEnumerator):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def _setCallbackInfo(self, *_args, **_kwargs):
|
||||
val = apply(fontsc.wxFontEnumerator__setCallbackInfo,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -304,12 +323,18 @@ class wxLocalePtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def Init(self, *_args, **_kwargs):
|
||||
val = apply(fontsc.wxLocale_Init,(self,) + _args, _kwargs)
|
||||
def __del__(self, delfunc=fontsc.delete_wxLocale):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def Init1(self, *_args, **_kwargs):
|
||||
val = apply(fontsc.wxLocale_Init1,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Init2(self, *_args, **_kwargs):
|
||||
val = apply(fontsc.wxLocale_Init2,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __del__(self,fontsc=fontsc):
|
||||
if self.thisown == 1 :
|
||||
fontsc.delete_wxLocale(self)
|
||||
def IsOk(self, *_args, **_kwargs):
|
||||
val = apply(fontsc.wxLocale_IsOk,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -339,6 +364,14 @@ class wxLocalePtr :
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxLocale instance at %s>" % (self.this,)
|
||||
|
||||
def Init(self, *_args, **_kwargs):
|
||||
if type(_args[0]) in [type(''), type(u'')]:
|
||||
val = apply(self.Init1, _args, _kwargs)
|
||||
else:
|
||||
val = apply(self.Init2, _args, _kwargs)
|
||||
return val
|
||||
|
||||
class wxLocale(wxLocalePtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = apply(fontsc.new_wxLocale,_args,_kwargs)
|
||||
@@ -351,9 +384,12 @@ class wxEncodingConverterPtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,fontsc=fontsc):
|
||||
if self.thisown == 1 :
|
||||
fontsc.delete_wxEncodingConverter(self)
|
||||
def __del__(self, delfunc=fontsc.delete_wxEncodingConverter):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def Init(self, *_args, **_kwargs):
|
||||
val = apply(fontsc.wxEncodingConverter_Init,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -483,6 +519,10 @@ wxFONTENCODING_CP1257 = fontsc.wxFONTENCODING_CP1257
|
||||
wxFONTENCODING_CP12_MAX = fontsc.wxFONTENCODING_CP12_MAX
|
||||
wxFONTENCODING_UTF7 = fontsc.wxFONTENCODING_UTF7
|
||||
wxFONTENCODING_UTF8 = fontsc.wxFONTENCODING_UTF8
|
||||
wxFONTENCODING_GB2312 = fontsc.wxFONTENCODING_GB2312
|
||||
wxFONTENCODING_BIG5 = fontsc.wxFONTENCODING_BIG5
|
||||
wxFONTENCODING_SHIFT_JIS = fontsc.wxFONTENCODING_SHIFT_JIS
|
||||
wxFONTENCODING_EUC_JP = fontsc.wxFONTENCODING_EUC_JP
|
||||
wxFONTENCODING_UNICODE = fontsc.wxFONTENCODING_UNICODE
|
||||
wxFONTENCODING_MAX = fontsc.wxFONTENCODING_MAX
|
||||
wxLANGUAGE_DEFAULT = fontsc.wxLANGUAGE_DEFAULT
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
/* Implementation : PYTHON */
|
||||
|
||||
#define SWIGPYTHON
|
||||
#include "Python.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
/* Definitions for Windows/Unix exporting */
|
||||
@@ -36,12 +38,9 @@
|
||||
# define SWIGEXPORT(a) a
|
||||
#endif
|
||||
|
||||
#include "Python.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void SWIG_MakePtr(char *, void *, char *);
|
||||
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
|
||||
extern char *SWIG_GetPtr(char *, void **, char *);
|
||||
@@ -498,8 +497,7 @@ static PyObject *_wrap_wxTopLevelWindow_SetIcon(PyObject *self, PyObject *args,
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxIcon_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxIcon_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTopLevelWindow_SetIcon. Expected _wxIcon_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -535,8 +533,7 @@ static PyObject *_wrap_wxTopLevelWindow_SetIcons(PyObject *self, PyObject *args,
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxIconBundle_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxIconBundle_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTopLevelWindow_SetIcons. Expected _wxIconBundle_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -677,7 +674,7 @@ static PyObject *_wrap_wxTopLevelWindow_GetTitle(PyObject *self, PyObject *args,
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -999,35 +996,6 @@ static PyObject *_wrap_wxFrame_GetMenuBar(PyObject *self, PyObject *args, PyObje
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxFrame_Command(_swigobj,_swigarg0) (_swigobj->Command(_swigarg0))
|
||||
static PyObject *_wrap_wxFrame_Command(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
bool _result;
|
||||
wxFrame * _arg0;
|
||||
int _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self","id", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFrame_Command",_kwnames,&_argo0,&_arg1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_Command. Expected _wxFrame_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (bool )wxFrame_Command(_arg0,_arg1);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxFrame_ProcessCommand(_swigobj,_swigarg0) (_swigobj->ProcessCommand(_swigarg0))
|
||||
static PyObject *_wrap_wxFrame_ProcessCommand(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
@@ -2314,8 +2282,7 @@ static PyObject *_wrap_new_wxSplashScreenWindow(PyObject *self, PyObject *args,
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOl:new_wxSplashScreenWindow",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) {
|
||||
if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxSplashScreenWindow. Expected _wxBitmap_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -2375,8 +2342,7 @@ static PyObject *_wrap_wxSplashScreenWindow_SetBitmap(PyObject *self, PyObject *
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSplashScreenWindow_SetBitmap. Expected _wxBitmap_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -2493,8 +2459,7 @@ static PyObject *_wrap_new_wxSplashScreen(PyObject *self, PyObject *args, PyObje
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OliOi|OOl:new_wxSplashScreen",_kwnames,&_argo0,&_arg1,&_arg2,&_argo3,&_arg4,&_obj5,&_obj6,&_arg7))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) {
|
||||
if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxSplashScreen. Expected _wxBitmap_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -2663,7 +2628,6 @@ static PyMethodDef framescMethods[] = {
|
||||
{ "wxFrame_GetStatusBar", (PyCFunction) _wrap_wxFrame_GetStatusBar, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxFrame_CreateStatusBar", (PyCFunction) _wrap_wxFrame_CreateStatusBar, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxFrame_ProcessCommand", (PyCFunction) _wrap_wxFrame_ProcessCommand, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxFrame_Command", (PyCFunction) _wrap_wxFrame_Command, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxFrame_GetMenuBar", (PyCFunction) _wrap_wxFrame_GetMenuBar, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxFrame_SetMenuBar", (PyCFunction) _wrap_wxFrame_SetMenuBar, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxFrame_GetClientAreaOrigin", (PyCFunction) _wrap_wxFrame_GetClientAreaOrigin, METH_VARARGS | METH_KEYWORDS },
|
||||
|
||||
@@ -95,9 +95,6 @@ class wxFramePtr(wxTopLevelWindowPtr):
|
||||
def GetMenuBar(self, *_args, **_kwargs):
|
||||
val = apply(framesc.wxFrame_GetMenuBar,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Command(self, *_args, **_kwargs):
|
||||
val = apply(framesc.wxFrame_Command,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def ProcessCommand(self, *_args, **_kwargs):
|
||||
val = apply(framesc.wxFrame_ProcessCommand,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -145,6 +142,7 @@ class wxFramePtr(wxTopLevelWindowPtr):
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxFrame instance at %s>" % (self.this,)
|
||||
Command = ProcessCommand
|
||||
class wxFrame(wxFramePtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = apply(framesc.new_wxFrame,_args,_kwargs)
|
||||
|
||||
+683
-470
File diff suppressed because it is too large
Load Diff
+207
-64
@@ -4,13 +4,17 @@ import gdic
|
||||
from misc import *
|
||||
|
||||
from fonts import *
|
||||
import wx
|
||||
class wxGDIObjectPtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,gdic=gdic):
|
||||
if self.thisown == 1 :
|
||||
gdic.delete_wxGDIObject(self)
|
||||
def __del__(self, delfunc=gdic.delete_wxGDIObject):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def GetVisible(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxGDIObject_GetVisible,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -34,9 +38,12 @@ class wxBitmapPtr(wxGDIObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,gdic=gdic):
|
||||
if self.thisown == 1 :
|
||||
gdic.delete_wxBitmap(self)
|
||||
def __del__(self, delfunc=gdic.delete_wxBitmap):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def GetPalette(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxBitmap_GetPalette,(self,) + _args, _kwargs)
|
||||
if val: val = wxPalettePtr(val)
|
||||
@@ -106,13 +113,10 @@ class wxBitmapPtr(wxGDIObjectPtr):
|
||||
def __repr__(self):
|
||||
return "<C wxBitmap instance at %s>" % (self.this,)
|
||||
|
||||
def __del__(self,gdic=gdic):
|
||||
try:
|
||||
if self.thisown == 1 :
|
||||
gdic.delete_wxBitmap(self)
|
||||
except:
|
||||
pass
|
||||
|
||||
def SetMaskColour(self, colour):
|
||||
mask = wxMaskColour(self, colour)
|
||||
self.SetMask(mask)
|
||||
|
||||
class wxBitmap(wxBitmapPtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = apply(gdic.new_wxBitmap,_args,_kwargs)
|
||||
@@ -142,9 +146,12 @@ class wxIconPtr(wxGDIObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,gdic=gdic):
|
||||
if self.thisown == 1 :
|
||||
gdic.delete_wxIcon(self)
|
||||
def __del__(self, delfunc=gdic.delete_wxIcon):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def LoadFile(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxIcon_LoadFile,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -183,14 +190,6 @@ class wxIconPtr(wxGDIObjectPtr):
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxIcon instance at %s>" % (self.this,)
|
||||
|
||||
def __del__(self,gdic=gdic):
|
||||
try:
|
||||
if self.thisown == 1 :
|
||||
gdic.delete_wxIcon(self)
|
||||
except:
|
||||
pass
|
||||
|
||||
class wxIcon(wxIconPtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = apply(gdic.new_wxIcon,_args,_kwargs)
|
||||
@@ -203,9 +202,12 @@ class wxIconBundlePtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,gdic=gdic):
|
||||
if self.thisown == 1 :
|
||||
gdic.delete_wxIconBundle(self)
|
||||
def __del__(self, delfunc=gdic.delete_wxIconBundle):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def AddIcon(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxIconBundle_AddIcon,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -240,9 +242,12 @@ class wxCursorPtr(wxGDIObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,gdic=gdic):
|
||||
if self.thisown == 1 :
|
||||
gdic.delete_wxCursor(self)
|
||||
def __del__(self, delfunc=gdic.delete_wxCursor):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def GetHandle(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxCursor_GetHandle,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -287,9 +292,12 @@ class wxColourPtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,gdic=gdic):
|
||||
if self.thisown == 1 :
|
||||
gdic.delete_wxColour(self)
|
||||
def __del__(self, delfunc=gdic.delete_wxColour):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def Red(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxColour_Red,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -308,11 +316,22 @@ class wxColourPtr(wxObjectPtr):
|
||||
def Get(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxColour_Get,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __eq__(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxColour___eq__,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __ne__(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxColour___ne__,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxColour instance at %s>" % (self.this,)
|
||||
asTuple = Get
|
||||
def __str__(self): return str(self.asTuple())
|
||||
def __repr__(self): return str(self.asTuple())
|
||||
def __str__(self): return str(self.asTuple())
|
||||
def __repr__(self): return 'wxColour:' + str(self.asTuple())
|
||||
def __nonzero__(self): return self.Ok()
|
||||
def __getinitargs__(self): return ()
|
||||
def __getstate__(self): return self.asTuple()
|
||||
def __setstate__(self, state): self.Set(*state)
|
||||
|
||||
class wxColour(wxColourPtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = apply(gdic.new_wxColour,_args,_kwargs)
|
||||
@@ -348,9 +367,12 @@ class wxPenPtr(wxGDIObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,gdic=gdic):
|
||||
if self.thisown == 1 :
|
||||
gdic.delete_wxPen(self)
|
||||
def __del__(self, delfunc=gdic.delete_wxPen):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def GetCap(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxPen_GetCap,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -412,9 +434,12 @@ class wxPyPenPtr(wxPenPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,gdic=gdic):
|
||||
if self.thisown == 1 :
|
||||
gdic.delete_wxPyPen(self)
|
||||
def __del__(self, delfunc=gdic.delete_wxPyPen):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def SetDashes(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxPyPen_SetDashes,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -458,9 +483,12 @@ class wxBrushPtr(wxGDIObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,gdic=gdic):
|
||||
if self.thisown == 1 :
|
||||
gdic.delete_wxBrush(self)
|
||||
def __del__(self, delfunc=gdic.delete_wxBrush):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def GetColour(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxBrush_GetColour,(self,) + _args, _kwargs)
|
||||
if val: val = wxColourPtr(val) ; val.thisown = 1
|
||||
@@ -524,9 +552,12 @@ class wxDCPtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,gdic=gdic):
|
||||
if self.thisown == 1 :
|
||||
gdic.delete_wxDC(self)
|
||||
def __del__(self, delfunc=gdic.delete_wxDC):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def BeginDrawing(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxDC_BeginDrawing,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -680,6 +711,9 @@ class wxDCPtr(wxObjectPtr):
|
||||
def GetFullTextExtent(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxDC_GetFullTextExtent,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetMultiLineTextExtent(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxDC_GetMultiLineTextExtent,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetTextForeground(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxDC_GetTextForeground,(self,) + _args, _kwargs)
|
||||
if val: val = wxColourPtr(val) ; val.thisown = 1
|
||||
@@ -817,6 +851,18 @@ class wxDCPtr(wxObjectPtr):
|
||||
def _DrawLineList(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxDC__DrawLineList,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def _DrawRectangleList(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxDC__DrawRectangleList,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def _DrawEllipseList(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxDC__DrawEllipseList,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def _DrawPolygonList(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxDC__DrawPolygonList,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def _DrawTextList(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxDC__DrawTextList,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxDC instance at %s>" % (self.this,)
|
||||
|
||||
@@ -827,7 +873,8 @@ class wxDCPtr(wxObjectPtr):
|
||||
pens = [pens]
|
||||
elif len(pens) != len(points):
|
||||
raise ValueError('points and pens must have same length')
|
||||
return self._DrawPointList(points, pens)
|
||||
return self._DrawPointList(points, pens, [])
|
||||
|
||||
|
||||
def DrawLineList(self, lines, pens=None):
|
||||
if pens is None:
|
||||
@@ -836,7 +883,83 @@ class wxDCPtr(wxObjectPtr):
|
||||
pens = [pens]
|
||||
elif len(pens) != len(lines):
|
||||
raise ValueError('lines and pens must have same length')
|
||||
return self._DrawLineList(lines, pens)
|
||||
return self._DrawLineList(lines, pens, [])
|
||||
|
||||
|
||||
def DrawRectangleList(self, rectangles, pens=None, brushes=None):
|
||||
if pens is None:
|
||||
pens = []
|
||||
elif isinstance(pens, wxPenPtr):
|
||||
pens = [pens]
|
||||
elif len(pens) != len(rectangles):
|
||||
raise ValueError('rectangles and pens must have same length')
|
||||
if brushes is None:
|
||||
brushes = []
|
||||
elif isinstance(brushes, wxBrushPtr):
|
||||
brushes = [brushes]
|
||||
elif len(brushes) != len(rectangles):
|
||||
raise ValueError('rectangles and brushes must have same length')
|
||||
return self._DrawRectangleList(rectangles, pens, brushes)
|
||||
|
||||
|
||||
def DrawEllipseList(self, ellipses, pens=None, brushes=None):
|
||||
if pens is None:
|
||||
pens = []
|
||||
elif isinstance(pens, wxPenPtr):
|
||||
pens = [pens]
|
||||
elif len(pens) != len(ellipses):
|
||||
raise ValueError('ellipses and pens must have same length')
|
||||
if brushes is None:
|
||||
brushes = []
|
||||
elif isinstance(brushes, wxBrushPtr):
|
||||
brushes = [brushes]
|
||||
elif len(brushes) != len(ellipses):
|
||||
raise ValueError('ellipses and brushes must have same length')
|
||||
return self._DrawEllipseList(ellipses, pens, brushes)
|
||||
|
||||
|
||||
def DrawPolygonList(self, polygons, pens=None, brushes=None):
|
||||
## Note: This does not currently support fill style or offset
|
||||
## you can always use the non-List version if need be.
|
||||
## I really would like to support fill-style, however,
|
||||
## but wxODDEVEN_RULE does not appear to be defined at the Python level
|
||||
## [It's in wx.py... --Robin]
|
||||
if pens is None:
|
||||
pens = []
|
||||
elif isinstance(pens, wxPenPtr):
|
||||
pens = [pens]
|
||||
elif len(pens) != len(polygons):
|
||||
raise ValueError('polygons and pens must have same length')
|
||||
if brushes is None:
|
||||
brushes = []
|
||||
elif isinstance(brushes, wxBrushPtr):
|
||||
brushes = [brushes]
|
||||
elif len(brushes) != len(polygons):
|
||||
raise ValueError('polygons and brushes must have same length')
|
||||
return self._DrawPolygonList(polygons, pens, brushes)
|
||||
|
||||
|
||||
def DrawTextList(self, textList, coords, foregrounds = None, backgrounds = None, fonts = None):
|
||||
## NOTE: this does not currently support changing the font
|
||||
## Make sure you set Background mode to wxSolid (DC.SetBackgroundMode)
|
||||
## If you want backgounds to do anything.
|
||||
if type(textList) == type(''):
|
||||
textList = [textList]
|
||||
elif len(textList) != len(coords):
|
||||
raise ValueError('textlist and coords must have same length')
|
||||
if foregrounds is None:
|
||||
foregrounds = []
|
||||
elif isinstance(foregrounds, wxColourPtr):
|
||||
foregrounds = [foregrounds]
|
||||
elif len(foregrounds) != len(coords):
|
||||
raise ValueError('foregrounds and coords must have same length')
|
||||
if backgrounds is None:
|
||||
backgrounds = []
|
||||
elif isinstance(backgrounds, wxColourPtr):
|
||||
backgrounds = [backgrounds]
|
||||
elif len(backgrounds) != len(coords):
|
||||
raise ValueError('backgrounds and coords must have same length')
|
||||
return self._DrawTextList(textList, coords, foregrounds, backgrounds)
|
||||
|
||||
class wxDC(wxDCPtr):
|
||||
def __init__(self,this):
|
||||
@@ -969,9 +1092,12 @@ class wxMetaFilePtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,gdic=gdic):
|
||||
if self.thisown == 1 :
|
||||
gdic.delete_wxMetaFile(self)
|
||||
def __del__(self, delfunc=gdic.delete_wxMetaFile):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def Ok(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxMetaFile_Ok,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -1023,9 +1149,12 @@ class wxPalettePtr(wxGDIObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,gdic=gdic):
|
||||
if self.thisown == 1 :
|
||||
gdic.delete_wxPalette(self)
|
||||
def __del__(self, delfunc=gdic.delete_wxPalette):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def GetPixel(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxPalette_GetPixel,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -1049,9 +1178,12 @@ class wxImageListPtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,gdic=gdic):
|
||||
if self.thisown == 1 :
|
||||
gdic.delete_wxImageList(self)
|
||||
def __del__(self, delfunc=gdic.delete_wxImageList):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def Add(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxImageList_Add,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -1093,9 +1225,12 @@ class wxRegionPtr(wxGDIObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,gdic=gdic):
|
||||
if self.thisown == 1 :
|
||||
gdic.delete_wxRegion(self)
|
||||
def __del__(self, delfunc=gdic.delete_wxRegion):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def Clear(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxRegion_Clear,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -1176,9 +1311,12 @@ class wxRegionIteratorPtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,gdic=gdic):
|
||||
if self.thisown == 1 :
|
||||
gdic.delete_wxRegionIterator(self)
|
||||
def __del__(self, delfunc=gdic.delete_wxRegionIterator):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def GetX(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxRegionIterator_GetX,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -1269,6 +1407,11 @@ def wxStockCursor(*_args, **_kwargs):
|
||||
if val: val = wxCursorPtr(val); val.thisown = 1
|
||||
return val
|
||||
|
||||
def wxCursorFromImage(*_args, **_kwargs):
|
||||
val = apply(gdic.wxCursorFromImage,_args,_kwargs)
|
||||
if val: val = wxCursorPtr(val); val.thisown = 1
|
||||
return val
|
||||
|
||||
def wxNamedColour(*_args, **_kwargs):
|
||||
val = apply(gdic.wxNamedColour,_args,_kwargs)
|
||||
if val: val = wxColourPtr(val); val.thisown = 1
|
||||
|
||||
+591
-65
File diff suppressed because it is too large
Load Diff
@@ -255,6 +255,12 @@ class wxGridCellEditorPtr :
|
||||
def SetControl(self, *_args, **_kwargs):
|
||||
val = apply(gridc.wxGridCellEditor_SetControl,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetCellAttr(self, *_args, **_kwargs):
|
||||
val = apply(gridc.wxGridCellEditor_GetCellAttr,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetCellAttr(self, *_args, **_kwargs):
|
||||
val = apply(gridc.wxGridCellEditor_SetCellAttr,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetParameters(self, *_args, **_kwargs):
|
||||
val = apply(gridc.wxGridCellEditor_SetParameters,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -303,6 +309,9 @@ class wxGridCellEditorPtr :
|
||||
def Destroy(self, *_args, **_kwargs):
|
||||
val = apply(gridc.wxGridCellEditor_Destroy,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetValue(self, *_args, **_kwargs):
|
||||
val = apply(gridc.wxGridCellEditor_GetValue,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxGridCellEditor instance at %s>" % (self.this,)
|
||||
class wxGridCellEditor(wxGridCellEditorPtr):
|
||||
@@ -346,6 +355,9 @@ class wxPyGridCellEditorPtr(wxGridCellEditorPtr):
|
||||
def base_SetParameters(self, *_args, **_kwargs):
|
||||
val = apply(gridc.wxPyGridCellEditor_base_SetParameters,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_GetValue(self, *_args, **_kwargs):
|
||||
val = apply(gridc.wxPyGridCellEditor_base_GetValue,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxPyGridCellEditor instance at %s>" % (self.this,)
|
||||
class wxPyGridCellEditor(wxPyGridCellEditorPtr):
|
||||
@@ -865,9 +877,12 @@ class wxGridTableMessagePtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,gridc=gridc):
|
||||
if self.thisown == 1 :
|
||||
gridc.delete_wxGridTableMessage(self)
|
||||
def __del__(self, delfunc=gridc.delete_wxGridTableMessage):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def SetTableObject(self, *_args, **_kwargs):
|
||||
val = apply(gridc.wxGridTableMessage_SetTableObject,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -906,9 +921,12 @@ class wxGridCellCoordsPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,gridc=gridc):
|
||||
if self.thisown == 1 :
|
||||
gridc.delete_wxGridCellCoords(self)
|
||||
def __del__(self, delfunc=gridc.delete_wxGridCellCoords):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def GetRow(self, *_args, **_kwargs):
|
||||
val = apply(gridc.wxGridCellCoords_GetRow,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -932,8 +950,16 @@ class wxGridCellCoordsPtr :
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxGridCellCoords instance at %s>" % (self.this,)
|
||||
def __str__(self): return str(self.asTuple())
|
||||
def __repr__(self): return str(self.asTuple())
|
||||
|
||||
def __str__(self): return str(self.asTuple())
|
||||
def __repr__(self): return 'wxGridCellCoords'+str(self.asTuple())
|
||||
def __len__(self): return len(self.asTuple())
|
||||
def __getitem__(self, index): return self.asTuple()[index]
|
||||
def __setitem__(self, index, val):
|
||||
if index == 0: self.SetRow(val)
|
||||
elif index == 1: self.SetCol(val)
|
||||
else: raise IndexError
|
||||
|
||||
class wxGridCellCoords(wxGridCellCoordsPtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = apply(gridc.new_wxGridCellCoords,_args,_kwargs)
|
||||
@@ -1146,6 +1172,9 @@ class wxGridPtr(wxScrolledWindowPtr):
|
||||
def GetColLabelAlignment(self, *_args, **_kwargs):
|
||||
val = apply(gridc.wxGrid_GetColLabelAlignment,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetColLabelTextOrientation(self, *_args, **_kwargs):
|
||||
val = apply(gridc.wxGrid_GetColLabelTextOrientation,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetRowLabelValue(self, *_args, **_kwargs):
|
||||
val = apply(gridc.wxGrid_GetRowLabelValue,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -1187,6 +1216,9 @@ class wxGridPtr(wxScrolledWindowPtr):
|
||||
def SetColLabelAlignment(self, *_args, **_kwargs):
|
||||
val = apply(gridc.wxGrid_SetColLabelAlignment,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetColLabelTextOrientation(self, *_args, **_kwargs):
|
||||
val = apply(gridc.wxGrid_SetColLabelTextOrientation,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetRowLabelValue(self, *_args, **_kwargs):
|
||||
val = apply(gridc.wxGrid_SetRowLabelValue,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -1337,6 +1369,12 @@ class wxGridPtr(wxScrolledWindowPtr):
|
||||
def AutoSize(self, *_args, **_kwargs):
|
||||
val = apply(gridc.wxGrid_AutoSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def AutoSizeRowLabelSize(self, *_args, **_kwargs):
|
||||
val = apply(gridc.wxGrid_AutoSizeRowLabelSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def AutoSizeColLabelSize(self, *_args, **_kwargs):
|
||||
val = apply(gridc.wxGrid_AutoSizeColLabelSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetColMinimalWidth(self, *_args, **_kwargs):
|
||||
val = apply(gridc.wxGrid_SetColMinimalWidth,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -1433,6 +1471,30 @@ class wxGridPtr(wxScrolledWindowPtr):
|
||||
def IsInSelection(self, *_args, **_kwargs):
|
||||
val = apply(gridc.wxGrid_IsInSelection,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetSelectedCells(self, *_args, **_kwargs):
|
||||
val = apply(gridc.wxGrid_GetSelectedCells,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetSelectionBlockTopLeft(self, *_args, **_kwargs):
|
||||
val = apply(gridc.wxGrid_GetSelectionBlockTopLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetSelectionBlockBottomRight(self, *_args, **_kwargs):
|
||||
val = apply(gridc.wxGrid_GetSelectionBlockBottomRight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetSelectedRows(self, *_args, **_kwargs):
|
||||
val = apply(gridc.wxGrid_GetSelectedRows,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetSelectedCols(self, *_args, **_kwargs):
|
||||
val = apply(gridc.wxGrid_GetSelectedCols,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def DeselectRow(self, *_args, **_kwargs):
|
||||
val = apply(gridc.wxGrid_DeselectRow,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def DeselectCol(self, *_args, **_kwargs):
|
||||
val = apply(gridc.wxGrid_DeselectCol,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def DeselectCell(self, *_args, **_kwargs):
|
||||
val = apply(gridc.wxGrid_DeselectCell,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def BlockToDeviceRect(self, *_args, **_kwargs):
|
||||
val = apply(gridc.wxGrid_BlockToDeviceRect,(self,) + _args, _kwargs)
|
||||
if val: val = wxRectPtr(val) ; val.thisown = 1
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
/* Implementation : PYTHON */
|
||||
|
||||
#define SWIGPYTHON
|
||||
#include "Python.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
/* Definitions for Windows/Unix exporting */
|
||||
@@ -36,12 +38,9 @@
|
||||
# define SWIGEXPORT(a) a
|
||||
#endif
|
||||
|
||||
#include "Python.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void SWIG_MakePtr(char *, void *, char *);
|
||||
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
|
||||
extern char *SWIG_GetPtr(char *, void **, char *);
|
||||
@@ -247,7 +246,7 @@ static PyObject *_wrap_wxHelpEvent_GetLink(PyObject *self, PyObject *args, PyObj
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -321,7 +320,7 @@ static PyObject *_wrap_wxHelpEvent_GetTarget(PyObject *self, PyObject *args, PyO
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -704,7 +703,7 @@ static PyObject *_wrap_wxHelpProvider_GetHelp(PyObject *self, PyObject *args, Py
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
|
||||
@@ -65,9 +65,12 @@ class wxContextHelpPtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,helpc=helpc):
|
||||
if self.thisown == 1 :
|
||||
helpc.delete_wxContextHelp(self)
|
||||
def __del__(self, delfunc=helpc.delete_wxContextHelp):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def BeginContextHelp(self, *_args, **_kwargs):
|
||||
val = apply(helpc.wxContextHelp_BeginContextHelp,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -171,3 +174,4 @@ wxEVT_DETAILED_HELP = helpc.wxEVT_DETAILED_HELP
|
||||
# Stuff these names into the wx namespace so wxPyConstructObject can find them
|
||||
import wx
|
||||
wx.wxHelpEventPtr = wxHelpEventPtr
|
||||
wx.wxContextHelpButtonPtr = wxContextHelpButtonPtr
|
||||
|
||||
+233
-68
File diff suppressed because it is too large
Load Diff
@@ -135,6 +135,9 @@ class wxHtmlParserPtr(wxObjectPtr):
|
||||
def DoParsing(self, *_args, **_kwargs):
|
||||
val = apply(htmlc.wxHtmlParser_DoParsing,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def StopParsing(self, *_args, **_kwargs):
|
||||
val = apply(htmlc.wxHtmlParser_StopParsing,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def AddTagHandler(self, *_args, **_kwargs):
|
||||
val = apply(htmlc.wxHtmlParser_AddTagHandler,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -450,6 +453,10 @@ class wxHtmlContainerCellPtr(wxHtmlCellPtr):
|
||||
def SetBackgroundColour(self, *_args, **_kwargs):
|
||||
val = apply(htmlc.wxHtmlContainerCell_SetBackgroundColour,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetBackgroundColour(self, *_args, **_kwargs):
|
||||
val = apply(htmlc.wxHtmlContainerCell_GetBackgroundColour,(self,) + _args, _kwargs)
|
||||
if val: val = wxColourPtr(val) ; val.thisown = 1
|
||||
return val
|
||||
def SetBorder(self, *_args, **_kwargs):
|
||||
val = apply(htmlc.wxHtmlContainerCell_SetBorder,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -509,6 +516,24 @@ class wxHtmlWidgetCell(wxHtmlWidgetCellPtr):
|
||||
|
||||
|
||||
|
||||
class wxHtmlFilterPtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def _setCallbackInfo(self, *_args, **_kwargs):
|
||||
val = apply(htmlc.wxHtmlFilter__setCallbackInfo,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxHtmlFilter instance at %s>" % (self.this,)
|
||||
class wxHtmlFilter(wxHtmlFilterPtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = apply(htmlc.new_wxHtmlFilter,_args,_kwargs)
|
||||
self.thisown = 1
|
||||
self._setCallbackInfo(self, wxHtmlFilter)
|
||||
|
||||
|
||||
|
||||
|
||||
class wxHtmlWindowPtr(wxScrolledWindowPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
@@ -624,9 +649,12 @@ class wxHtmlDCRendererPtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,htmlc=htmlc):
|
||||
if self.thisown == 1 :
|
||||
htmlc.delete_wxHtmlDCRenderer(self)
|
||||
def __del__(self, delfunc=htmlc.delete_wxHtmlDCRenderer):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def SetDC(self, *_args, **_kwargs):
|
||||
val = apply(htmlc.wxHtmlDCRenderer_SetDC,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -685,9 +713,12 @@ class wxHtmlEasyPrintingPtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,htmlc=htmlc):
|
||||
if self.thisown == 1 :
|
||||
htmlc.delete_wxHtmlEasyPrinting(self)
|
||||
def __del__(self, delfunc=htmlc.delete_wxHtmlEasyPrinting):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def PreviewFile(self, *_args, **_kwargs):
|
||||
val = apply(htmlc.wxHtmlEasyPrinting_PreviewFile,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -789,4 +820,5 @@ wx.wxHtmlContainerCellPtr = wxHtmlContainerCellPtr
|
||||
wx.wxHtmlWidgetCellPtr = wxHtmlWidgetCellPtr
|
||||
wx.wxHtmlWindowPtr = wxHtmlWindowPtr
|
||||
wx.wxHtmlLinkInfoPtr = wxHtmlLinkInfoPtr
|
||||
wx.wxHtmlFilterPtr = wxHtmlFilterPtr
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
/* Implementation : PYTHON */
|
||||
|
||||
#define SWIGPYTHON
|
||||
#include "Python.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
/* Definitions for Windows/Unix exporting */
|
||||
@@ -36,12 +38,9 @@
|
||||
# define SWIGEXPORT(a) a
|
||||
#endif
|
||||
|
||||
#include "Python.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void SWIG_MakePtr(char *, void *, char *);
|
||||
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
|
||||
extern char *SWIG_GetPtr(char *, void **, char *);
|
||||
@@ -191,7 +190,7 @@ static PyObject *_wrap_wxHtmlBookRecord_GetBookFile(PyObject *self, PyObject *ar
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -228,7 +227,7 @@ static PyObject *_wrap_wxHtmlBookRecord_GetTitle(PyObject *self, PyObject *args,
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -265,7 +264,7 @@ static PyObject *_wrap_wxHtmlBookRecord_GetStart(PyObject *self, PyObject *args,
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -302,7 +301,7 @@ static PyObject *_wrap_wxHtmlBookRecord_GetBasePath(PyObject *self, PyObject *ar
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -549,7 +548,7 @@ static PyObject *_wrap_wxHtmlBookRecord_GetFullPath(PyObject *self, PyObject *ar
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -646,7 +645,7 @@ static PyObject *_wrap_wxHtmlContentsItem_GetName(PyObject *self, PyObject *args
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -683,7 +682,7 @@ static PyObject *_wrap_wxHtmlContentsItem_GetPage(PyObject *self, PyObject *args
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -868,7 +867,7 @@ static PyObject *_wrap_wxHtmlSearchStatus_GetName(PyObject *self, PyObject *args
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -1076,7 +1075,7 @@ static PyObject *_wrap_wxHtmlHelpData_FindPageByName(PyObject *self, PyObject *a
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -1118,7 +1117,7 @@ static PyObject *_wrap_wxHtmlHelpData_FindPageById(PyObject *self, PyObject *arg
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
|
||||
@@ -154,9 +154,12 @@ class wxHtmlHelpDataPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,htmlhelpc=htmlhelpc):
|
||||
if self.thisown == 1 :
|
||||
htmlhelpc.delete_wxHtmlHelpData(self)
|
||||
def __del__(self, delfunc=htmlhelpc.delete_wxHtmlHelpData):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def SetTempDir(self, *_args, **_kwargs):
|
||||
val = apply(htmlhelpc.wxHtmlHelpData_SetTempDir,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -246,9 +249,12 @@ class wxHtmlHelpControllerPtr(wxEvtHandlerPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,htmlhelpc=htmlhelpc):
|
||||
if self.thisown == 1 :
|
||||
htmlhelpc.delete_wxHtmlHelpController(self)
|
||||
def __del__(self, delfunc=htmlhelpc.delete_wxHtmlHelpController):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def SetTitleFormat(self, *_args, **_kwargs):
|
||||
val = apply(htmlhelpc.wxHtmlHelpController_SetTitleFormat,(self,) + _args, _kwargs)
|
||||
return val
|
||||
|
||||
+57
-15
@@ -19,6 +19,8 @@
|
||||
/* Implementation : PYTHON */
|
||||
|
||||
#define SWIGPYTHON
|
||||
#include "Python.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
/* Definitions for Windows/Unix exporting */
|
||||
@@ -36,12 +38,9 @@
|
||||
# define SWIGEXPORT(a) a
|
||||
#endif
|
||||
|
||||
#include "Python.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void SWIG_MakePtr(char *, void *, char *);
|
||||
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
|
||||
extern char *SWIG_GetPtr(char *, void **, char *);
|
||||
@@ -226,8 +225,7 @@ static PyObject *_wrap_wxImageFromBitmap(PyObject *self, PyObject *args, PyObjec
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImageFromBitmap",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) {
|
||||
if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImageFromBitmap. Expected _wxBitmap_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -436,8 +434,7 @@ static PyObject *_wrap_wxBitmapFromImage(PyObject *self, PyObject *args, PyObjec
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxBitmapFromImage",_kwnames,&_argo0,&_arg1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
|
||||
if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmapFromImage. Expected _wxImage_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -492,7 +489,7 @@ static PyObject *_wrap_wxImageHandler_GetName(PyObject *self, PyObject *args, Py
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -529,7 +526,7 @@ static PyObject *_wrap_wxImageHandler_GetExtension(PyObject *self, PyObject *arg
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -594,7 +591,7 @@ static PyObject *_wrap_wxImageHandler_GetMimeType(PyObject *self, PyObject *args
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -1669,8 +1666,7 @@ static PyObject *_wrap_wxImage_SetMaskFromImage(PyObject *self, PyObject *args,
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxImage_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxImage_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxImage_SetMaskFromImage. Expected _wxImage_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -2251,8 +2247,7 @@ static PyObject *_wrap_wxImage_Paste(PyObject *self, PyObject *args, PyObject *k
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxImage_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxImage_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxImage_Paste. Expected _wxImage_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -2336,6 +2331,52 @@ static PyObject *_wrap_wxImage_GetData(PyObject *self, PyObject *args, PyObject
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static void wxImage_SetDataBuffer(wxImage *self,PyObject * data) {
|
||||
unsigned char* buffer;
|
||||
int size;
|
||||
|
||||
if (!PyArg_Parse(data, "w#", &buffer, &size))
|
||||
return;
|
||||
|
||||
if (size != self->GetWidth() * self->GetHeight() * 3) {
|
||||
PyErr_SetString(PyExc_TypeError, "Incorrect buffer size");
|
||||
return;
|
||||
}
|
||||
|
||||
self->SetData(buffer);
|
||||
}
|
||||
static PyObject *_wrap_wxImage_SetDataBuffer(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxImage * _arg0;
|
||||
PyObject * _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
char *_kwnames[] = { "self","data", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxImage_SetDataBuffer",_kwnames,&_argo0,&_obj1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_SetDataBuffer. Expected _wxImage_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
_arg1 = _obj1;
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
wxImage_SetDataBuffer(_arg0,_arg1);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static void wxImage_SetData(wxImage *self,PyObject * data) {
|
||||
unsigned char* dataPtr;
|
||||
|
||||
@@ -2863,7 +2904,7 @@ static PyObject *_wrap_wxImage_GetOption(PyObject *self, PyObject *args, PyObjec
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -3162,6 +3203,7 @@ static PyMethodDef imagecMethods[] = {
|
||||
{ "wxImage_GetMaskRed", (PyCFunction) _wrap_wxImage_GetMaskRed, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxImage_SetMaskColour", (PyCFunction) _wrap_wxImage_SetMaskColour, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxImage_SetData", (PyCFunction) _wrap_wxImage_SetData, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxImage_SetDataBuffer", (PyCFunction) _wrap_wxImage_SetDataBuffer, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxImage_GetData", (PyCFunction) _wrap_wxImage_GetData, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxImage_GetDataBuffer", (PyCFunction) _wrap_wxImage_GetDataBuffer, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxImage_Paste", (PyCFunction) _wrap_wxImage_Paste, METH_VARARGS | METH_KEYWORDS },
|
||||
|
||||
@@ -192,9 +192,12 @@ class wxImagePtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,imagec=imagec):
|
||||
if self.thisown == 1 :
|
||||
imagec.delete_wxImage(self)
|
||||
def __del__(self, delfunc=imagec.delete_wxImage):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def Create(self, *_args, **_kwargs):
|
||||
val = apply(imagec.wxImage_Create,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -271,6 +274,9 @@ class wxImagePtr(wxObjectPtr):
|
||||
def GetData(self, *_args, **_kwargs):
|
||||
val = apply(imagec.wxImage_GetData,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetDataBuffer(self, *_args, **_kwargs):
|
||||
val = apply(imagec.wxImage_SetDataBuffer,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetData(self, *_args, **_kwargs):
|
||||
val = apply(imagec.wxImage_SetData,(self,) + _args, _kwargs)
|
||||
return val
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
/* Implementation : PYTHON */
|
||||
|
||||
#define SWIGPYTHON
|
||||
#include "Python.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
/* Definitions for Windows/Unix exporting */
|
||||
@@ -36,12 +38,9 @@
|
||||
# define SWIGEXPORT(a) a
|
||||
#endif
|
||||
|
||||
#include "Python.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void SWIG_MakePtr(char *, void *, char *);
|
||||
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
|
||||
extern char *SWIG_GetPtr(char *, void **, char *);
|
||||
|
||||
+1387
-208
File diff suppressed because it is too large
Load Diff
+231
-39
@@ -23,9 +23,12 @@ class wxSizePtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,miscc=miscc):
|
||||
if self.thisown == 1 :
|
||||
miscc.delete_wxSize(self)
|
||||
def __del__(self, delfunc=miscc.delete_wxSize):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def Set(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxSize_Set,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -50,8 +53,11 @@ class wxSizePtr :
|
||||
def asTuple(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxSize_asTuple,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __cmp__(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxSize___cmp__,(self,) + _args, _kwargs)
|
||||
def __eq__(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxSize___eq__,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __ne__(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxSize___ne__,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __setattr__(self,name,value):
|
||||
if name == "x" :
|
||||
@@ -81,13 +87,17 @@ class wxSizePtr :
|
||||
return "<C wxSize instance at %s>" % (self.this,)
|
||||
|
||||
def __str__(self): return str(self.asTuple())
|
||||
def __repr__(self): return str(self.asTuple())
|
||||
def __repr__(self): return 'wxSize'+str(self.asTuple())
|
||||
def __len__(self): return len(self.asTuple())
|
||||
def __getitem__(self, index): return self.asTuple()[index]
|
||||
def __setitem__(self, index, val):
|
||||
if index == 0: self.width = val
|
||||
elif index == 1: self.height = val
|
||||
else: raise IndexError
|
||||
def __nonzero__(self): return self.asTuple() != (0,0)
|
||||
def __getinitargs__(self): return ()
|
||||
def __getstate__(self): return self.asTuple()
|
||||
def __setstate__(self, state): self.Set(*state)
|
||||
|
||||
class wxSize(wxSizePtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
@@ -101,9 +111,12 @@ class wxRealPointPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,miscc=miscc):
|
||||
if self.thisown == 1 :
|
||||
miscc.delete_wxRealPoint(self)
|
||||
def __del__(self, delfunc=miscc.delete_wxRealPoint):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def Set(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxRealPoint_Set,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -118,8 +131,11 @@ class wxRealPointPtr :
|
||||
val = apply(miscc.wxRealPoint___sub__,(self,) + _args, _kwargs)
|
||||
if val: val = wxRealPointPtr(val) ; val.thisown = 1
|
||||
return val
|
||||
def __cmp__(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxRealPoint___cmp__,(self,) + _args, _kwargs)
|
||||
def __eq__(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxRealPoint___eq__,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __ne__(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxRealPoint___ne__,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __setattr__(self,name,value):
|
||||
if name == "x" :
|
||||
@@ -139,13 +155,17 @@ class wxRealPointPtr :
|
||||
return "<C wxRealPoint instance at %s>" % (self.this,)
|
||||
|
||||
def __str__(self): return str(self.asTuple())
|
||||
def __repr__(self): return str(self.asTuple())
|
||||
def __repr__(self): return 'wxRealPoint'+str(self.asTuple())
|
||||
def __len__(self): return len(self.asTuple())
|
||||
def __getitem__(self, index): return self.asTuple()[index]
|
||||
def __setitem__(self, index, val):
|
||||
if index == 0: self.width = val
|
||||
elif index == 1: self.height = val
|
||||
else: raise IndexError
|
||||
def __nonzero__(self): return self.asTuple() != (0.0, 0.0)
|
||||
def __getinitargs__(self): return ()
|
||||
def __getstate__(self): return self.asTuple()
|
||||
def __setstate__(self, state): self.Set(*state)
|
||||
|
||||
class wxRealPoint(wxRealPointPtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
@@ -159,9 +179,12 @@ class wxPointPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,miscc=miscc):
|
||||
if self.thisown == 1 :
|
||||
miscc.delete_wxPoint(self)
|
||||
def __del__(self, delfunc=miscc.delete_wxPoint):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def Set(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxPoint_Set,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -176,8 +199,11 @@ class wxPointPtr :
|
||||
val = apply(miscc.wxPoint___sub__,(self,) + _args, _kwargs)
|
||||
if val: val = wxPointPtr(val) ; val.thisown = 1
|
||||
return val
|
||||
def __cmp__(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxPoint___cmp__,(self,) + _args, _kwargs)
|
||||
def __eq__(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxPoint___eq__,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __ne__(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxPoint___ne__,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __setattr__(self,name,value):
|
||||
if name == "x" :
|
||||
@@ -197,13 +223,17 @@ class wxPointPtr :
|
||||
return "<C wxPoint instance at %s>" % (self.this,)
|
||||
|
||||
def __str__(self): return str(self.asTuple())
|
||||
def __repr__(self): return str(self.asTuple())
|
||||
def __repr__(self): return 'wxPoint'+str(self.asTuple())
|
||||
def __len__(self): return len(self.asTuple())
|
||||
def __getitem__(self, index): return self.asTuple()[index]
|
||||
def __setitem__(self, index, val):
|
||||
if index == 0: self.x = val
|
||||
elif index == 1: self.y = val
|
||||
else: raise IndexError
|
||||
def __nonzero__(self): return self.asTuple() != (0,0)
|
||||
def __getinitargs__(self): return ()
|
||||
def __getstate__(self): return self.asTuple()
|
||||
def __setstate__(self, state): self.Set(*state)
|
||||
|
||||
class wxPoint(wxPointPtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
@@ -217,9 +247,12 @@ class wxRectPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,miscc=miscc):
|
||||
if self.thisown == 1 :
|
||||
miscc.delete_wxRect(self)
|
||||
def __del__(self, delfunc=miscc.delete_wxRect):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def GetX(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxRect_GetX,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -282,12 +315,30 @@ class wxRectPtr :
|
||||
def SetBottom(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxRect_SetBottom,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Deflate(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxRect_Deflate,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Inflate(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxRect_Inflate,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def InsideXY(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxRect_InsideXY,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Inside(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxRect_Inside,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Intersects(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxRect_Intersects,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def OffsetXY(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxRect_OffsetXY,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Offset(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxRect_Offset,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Set(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxRect_Set,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def asTuple(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxRect_asTuple,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -295,8 +346,11 @@ class wxRectPtr :
|
||||
val = apply(miscc.wxRect___add__,(self,) + _args, _kwargs)
|
||||
if val: val = wxRectPtr(val) ; val.thisown = 1
|
||||
return val
|
||||
def __cmp__(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxRect___cmp__,(self,) + _args, _kwargs)
|
||||
def __eq__(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxRect___eq__,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __ne__(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxRect___ne__,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __setattr__(self,name,value):
|
||||
if name == "x" :
|
||||
@@ -326,7 +380,7 @@ class wxRectPtr :
|
||||
return "<C wxRect instance at %s>" % (self.this,)
|
||||
|
||||
def __str__(self): return str(self.asTuple())
|
||||
def __repr__(self): return str(self.asTuple())
|
||||
def __repr__(self): return 'wxRect'+str(self.asTuple())
|
||||
def __len__(self): return len(self.asTuple())
|
||||
def __getitem__(self, index): return self.asTuple()[index]
|
||||
def __setitem__(self, index, val):
|
||||
@@ -335,6 +389,10 @@ class wxRectPtr :
|
||||
elif index == 2: self.width = val
|
||||
elif index == 3: self.height = val
|
||||
else: raise IndexError
|
||||
def __nonzero__(self): return self.asTuple() != (0,0,0,0)
|
||||
def __getinitargs__(self): return ()
|
||||
def __getstate__(self): return self.asTuple()
|
||||
def __setstate__(self, state): self.Set(*state)
|
||||
|
||||
# override the __getattr__ made by SWIG
|
||||
def __getattr__(self, name):
|
||||
@@ -381,6 +439,137 @@ class wxRect(wxRectPtr):
|
||||
|
||||
|
||||
|
||||
class wxPoint2DDoublePtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def GetFloor(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxPoint2DDouble_GetFloor,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetRounded(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxPoint2DDouble_GetRounded,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetVectorLength(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxPoint2DDouble_GetVectorLength,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetVectorAngle(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxPoint2DDouble_GetVectorAngle,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetVectorLength(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxPoint2DDouble_SetVectorLength,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetVectorAngle(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxPoint2DDouble_SetVectorAngle,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetDistance(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxPoint2DDouble_GetDistance,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetDistanceSquare(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxPoint2DDouble_GetDistanceSquare,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetDotProduct(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxPoint2DDouble_GetDotProduct,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetCrossProduct(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxPoint2DDouble_GetCrossProduct,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Set(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxPoint2DDouble_Set,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __neg__(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxPoint2DDouble___neg__,(self,) + _args, _kwargs)
|
||||
if val: val = wxPoint2DDoublePtr(val) ; val.thisown = 1
|
||||
return val
|
||||
def __iadd__(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxPoint2DDouble___iadd__,(self,) + _args, _kwargs)
|
||||
if val: val = wxPoint2DDoublePtr(val)
|
||||
return val
|
||||
def __isub__(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxPoint2DDouble___isub__,(self,) + _args, _kwargs)
|
||||
if val: val = wxPoint2DDoublePtr(val)
|
||||
return val
|
||||
def __imul__(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxPoint2DDouble___imul__,(self,) + _args, _kwargs)
|
||||
if val: val = wxPoint2DDoublePtr(val)
|
||||
return val
|
||||
def __idiv__(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxPoint2DDouble___idiv__,(self,) + _args, _kwargs)
|
||||
if val: val = wxPoint2DDoublePtr(val)
|
||||
return val
|
||||
def __eq__(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxPoint2DDouble___eq__,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __ne__(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxPoint2DDouble___ne__,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def asTuple(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxPoint2DDouble_asTuple,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __setattr__(self,name,value):
|
||||
if name == "m_x" :
|
||||
miscc.wxPoint2DDouble_m_x_set(self,value)
|
||||
return
|
||||
if name == "m_y" :
|
||||
miscc.wxPoint2DDouble_m_y_set(self,value)
|
||||
return
|
||||
if name == "x" :
|
||||
miscc.wxPoint2DDouble_x_set(self,value)
|
||||
return
|
||||
if name == "y" :
|
||||
miscc.wxPoint2DDouble_y_set(self,value)
|
||||
return
|
||||
self.__dict__[name] = value
|
||||
def __getattr__(self,name):
|
||||
if name == "m_x" :
|
||||
return miscc.wxPoint2DDouble_m_x_get(self)
|
||||
if name == "m_y" :
|
||||
return miscc.wxPoint2DDouble_m_y_get(self)
|
||||
if name == "x" :
|
||||
return miscc.wxPoint2DDouble_x_get(self)
|
||||
if name == "y" :
|
||||
return miscc.wxPoint2DDouble_y_get(self)
|
||||
raise AttributeError,name
|
||||
def __repr__(self):
|
||||
return "<C wxPoint2DDouble instance at %s>" % (self.this,)
|
||||
|
||||
def SetPolarCoordinates(self, angle, length):
|
||||
self.SetVectorLength(length)
|
||||
self.SetVectorAngle(angle)
|
||||
def Normalize(self):
|
||||
self.SetVectorLength(1.0)
|
||||
|
||||
|
||||
def __str__(self): return str(self.asTuple())
|
||||
def __repr__(self): return 'wxPoint2DDouble'+str(self.asTuple())
|
||||
def __len__(self): return len(self.asTuple())
|
||||
def __getitem__(self, index): return self.asTuple()[index]
|
||||
def __setitem__(self, index, val):
|
||||
if index == 0: self.m_x = val
|
||||
elif index == 1: self.m_yt = val
|
||||
else: raise IndexError
|
||||
def __nonzero__(self): return self.asTuple() != (0.0, 0.0)
|
||||
def __getinitargs__(self): return ()
|
||||
def __getstate__(self): return self.asTuple()
|
||||
def __setstate__(self, state): self.Set(*state)
|
||||
|
||||
class wxPoint2DDouble(wxPoint2DDoublePtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = apply(miscc.new_wxPoint2DDouble,_args,_kwargs)
|
||||
self.thisown = 1
|
||||
|
||||
|
||||
|
||||
def wxPoint2DDoubleCopy(*_args,**_kwargs):
|
||||
val = wxPoint2DDoublePtr(apply(miscc.new_wxPoint2DDoubleCopy,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
return val
|
||||
|
||||
def wxPoint2DDoubleFromPoint(*_args,**_kwargs):
|
||||
val = wxPoint2DDoublePtr(apply(miscc.new_wxPoint2DDoubleFromPoint,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
return val
|
||||
|
||||
|
||||
class wxIndividualLayoutConstraintPtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
@@ -486,9 +675,12 @@ class wxAcceleratorEntryPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,miscc=miscc):
|
||||
if self.thisown == 1 :
|
||||
miscc.delete_wxAcceleratorEntry(self)
|
||||
def __del__(self, delfunc=miscc.delete_wxAcceleratorEntry):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def Set(self, *_args, **_kwargs):
|
||||
val = apply(miscc.wxAcceleratorEntry_Set,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -515,9 +707,12 @@ class wxAcceleratorTablePtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,miscc=miscc):
|
||||
if self.thisown == 1 :
|
||||
miscc.delete_wxAcceleratorTable(self)
|
||||
def __del__(self, delfunc=miscc.delete_wxAcceleratorTable):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def __repr__(self):
|
||||
return "<C wxAcceleratorTable instance at %s>" % (self.this,)
|
||||
class wxAcceleratorTable(wxAcceleratorTablePtr):
|
||||
@@ -532,9 +727,12 @@ class wxBusyInfoPtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,miscc=miscc):
|
||||
if self.thisown == 1 :
|
||||
miscc.delete_wxBusyInfo(self)
|
||||
def __del__(self, delfunc=miscc.delete_wxBusyInfo):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def __repr__(self):
|
||||
return "<C wxBusyInfo instance at %s>" % (self.this,)
|
||||
class wxBusyInfo(wxBusyInfoPtr):
|
||||
@@ -555,10 +753,6 @@ wxNewId = miscc.wxNewId
|
||||
|
||||
wxRegisterId = miscc.wxRegisterId
|
||||
|
||||
NewId = miscc.NewId
|
||||
|
||||
RegisterId = miscc.RegisterId
|
||||
|
||||
wxGetCurrentId = miscc.wxGetCurrentId
|
||||
|
||||
wxBell = miscc.wxBell
|
||||
@@ -595,8 +789,6 @@ wxYieldIfNeeded = miscc.wxYieldIfNeeded
|
||||
|
||||
wxEnableTopLevelWindows = miscc.wxEnableTopLevelWindows
|
||||
|
||||
wxGetResource = miscc.wxGetResource
|
||||
|
||||
wxStripMenuCodes = miscc.wxStripMenuCodes
|
||||
|
||||
wxGetEmailAddress = miscc.wxGetEmailAddress
|
||||
|
||||
+183
-322
File diff suppressed because it is too large
Load Diff
+99
-75
@@ -98,9 +98,12 @@ class wxCaretPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,misc2c=misc2c):
|
||||
if self.thisown == 1 :
|
||||
misc2c.delete_wxCaret(self)
|
||||
def __del__(self, delfunc=misc2c.delete_wxCaret):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def IsOk(self, *_args, **_kwargs):
|
||||
val = apply(misc2c.wxCaret_IsOk,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -156,9 +159,12 @@ class wxBusyCursorPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,misc2c=misc2c):
|
||||
if self.thisown == 1 :
|
||||
misc2c.delete_wxBusyCursor(self)
|
||||
def __del__(self, delfunc=misc2c.delete_wxBusyCursor):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def __repr__(self):
|
||||
return "<C wxBusyCursor instance at %s>" % (self.this,)
|
||||
class wxBusyCursor(wxBusyCursorPtr):
|
||||
@@ -173,9 +179,12 @@ class wxWindowDisablerPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,misc2c=misc2c):
|
||||
if self.thisown == 1 :
|
||||
misc2c.delete_wxWindowDisabler(self)
|
||||
def __del__(self, delfunc=misc2c.delete_wxWindowDisabler):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def __repr__(self):
|
||||
return "<C wxWindowDisabler instance at %s>" % (self.this,)
|
||||
class wxWindowDisabler(wxWindowDisablerPtr):
|
||||
@@ -190,9 +199,12 @@ class wxMutexGuiLockerPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,misc2c=misc2c):
|
||||
if self.thisown == 1 :
|
||||
misc2c.delete_wxMutexGuiLocker(self)
|
||||
def __del__(self, delfunc=misc2c.delete_wxMutexGuiLocker):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def __repr__(self):
|
||||
return "<C wxMutexGuiLocker instance at %s>" % (self.this,)
|
||||
class wxMutexGuiLocker(wxMutexGuiLockerPtr):
|
||||
@@ -207,9 +219,12 @@ class wxTipProviderPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,misc2c=misc2c):
|
||||
if self.thisown == 1 :
|
||||
misc2c.delete_wxTipProvider(self)
|
||||
def __del__(self, delfunc=misc2c.delete_wxTipProvider):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def GetTip(self, *_args, **_kwargs):
|
||||
val = apply(misc2c.wxTipProvider_GetTip,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -250,17 +265,20 @@ class wxDragImagePtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,misc2c=misc2c):
|
||||
if self.thisown == 1 :
|
||||
misc2c.delete_wxDragImage(self)
|
||||
def __del__(self, delfunc=misc2c.delete_wxDragImage):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def SetBackingBitmap(self, *_args, **_kwargs):
|
||||
val = apply(misc2c.wxDragImage_SetBackingBitmap,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def BeginDrag(self, *_args, **_kwargs):
|
||||
val = apply(misc2c.wxDragImage_BeginDrag,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def BeginDrag2(self, *_args, **_kwargs):
|
||||
val = apply(misc2c.wxDragImage_BeginDrag2,(self,) + _args, _kwargs)
|
||||
def BeginDragBounded(self, *_args, **_kwargs):
|
||||
val = apply(misc2c.wxDragImage_BeginDragBounded,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def EndDrag(self, *_args, **_kwargs):
|
||||
val = apply(misc2c.wxDragImage_EndDrag,(self,) + _args, _kwargs)
|
||||
@@ -283,6 +301,7 @@ class wxDragImagePtr(wxObjectPtr):
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxDragImage instance at %s>" % (self.this,)
|
||||
BeginDrag2 = BeginDragBounded
|
||||
class wxDragImage(wxDragImagePtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = apply(misc2c.new_wxDragImage,_args,_kwargs)
|
||||
@@ -315,9 +334,12 @@ class wxPyTimerPtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,misc2c=misc2c):
|
||||
if self.thisown == 1 :
|
||||
misc2c.delete_wxPyTimer(self)
|
||||
def __del__(self, delfunc=misc2c.delete_wxPyTimer):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def GetInterval(self, *_args, **_kwargs):
|
||||
val = apply(misc2c.wxPyTimer_GetInterval,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -350,9 +372,12 @@ class wxStopWatchPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,misc2c=misc2c):
|
||||
if self.thisown == 1 :
|
||||
misc2c.delete_wxStopWatch(self)
|
||||
def __del__(self, delfunc=misc2c.delete_wxStopWatch):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def Start(self, *_args, **_kwargs):
|
||||
val = apply(misc2c.wxStopWatch_Start,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -504,9 +529,12 @@ class wxLogNullPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,misc2c=misc2c):
|
||||
if self.thisown == 1 :
|
||||
misc2c.delete_wxLogNull(self)
|
||||
def __del__(self, delfunc=misc2c.delete_wxLogNull):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def __repr__(self):
|
||||
return "<C wxLogNull instance at %s>" % (self.this,)
|
||||
class wxLogNull(wxLogNullPtr):
|
||||
@@ -631,9 +659,12 @@ class wxJoystickPtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,misc2c=misc2c):
|
||||
if self.thisown == 1 :
|
||||
misc2c.delete_wxJoystick(self)
|
||||
def __del__(self, delfunc=misc2c.delete_wxJoystick):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def GetPosition(self, *_args, **_kwargs):
|
||||
val = apply(misc2c.wxJoystick_GetPosition,(self,) + _args, _kwargs)
|
||||
if val: val = wxPointPtr(val) ; val.thisown = 1
|
||||
@@ -775,9 +806,12 @@ class wxWavePtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,misc2c=misc2c):
|
||||
if self.thisown == 1 :
|
||||
misc2c.delete_wxWave(self)
|
||||
def __del__(self, delfunc=misc2c.delete_wxWave):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def IsOk(self, *_args, **_kwargs):
|
||||
val = apply(misc2c.wxWave_IsOk,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -895,9 +929,12 @@ class wxFileTypePtr :
|
||||
def Unassociate(self, *_args, **_kwargs):
|
||||
val = apply(misc2c.wxFileType_Unassociate,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __del__(self,misc2c=misc2c):
|
||||
if self.thisown == 1 :
|
||||
misc2c.delete_wxFileType(self)
|
||||
def __del__(self, delfunc=misc2c.delete_wxFileType):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def __repr__(self):
|
||||
return "<C wxFileType instance at %s>" % (self.this,)
|
||||
class wxFileType(wxFileTypePtr):
|
||||
@@ -945,9 +982,12 @@ class wxMimeTypesManagerPtr :
|
||||
def Unassociate(self, *_args, **_kwargs):
|
||||
val = apply(misc2c.wxMimeTypesManager_Unassociate,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __del__(self,misc2c=misc2c):
|
||||
if self.thisown == 1 :
|
||||
misc2c.delete_wxMimeTypesManager(self)
|
||||
def __del__(self, delfunc=misc2c.delete_wxMimeTypesManager):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def __repr__(self):
|
||||
return "<C wxMimeTypesManager instance at %s>" % (self.this,)
|
||||
class wxMimeTypesManager(wxMimeTypesManagerPtr):
|
||||
@@ -980,9 +1020,12 @@ class wxFileHistoryPtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,misc2c=misc2c):
|
||||
if self.thisown == 1 :
|
||||
misc2c.delete_wxFileHistory(self)
|
||||
def __del__(self, delfunc=misc2c.delete_wxFileHistory):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def AddFileToHistory(self, *_args, **_kwargs):
|
||||
val = apply(misc2c.wxFileHistory_AddFileToHistory,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -1091,9 +1134,12 @@ class wxSingleInstanceCheckerPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,misc2c=misc2c):
|
||||
if self.thisown == 1 :
|
||||
misc2c.delete_wxSingleInstanceChecker(self)
|
||||
def __del__(self, delfunc=misc2c.delete_wxSingleInstanceChecker):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def Create(self, *_args, **_kwargs):
|
||||
val = apply(misc2c.wxSingleInstanceChecker_Create,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -1190,32 +1236,6 @@ def wxGetTopLevelParent(*_args, **_kwargs):
|
||||
val = apply(misc2c.wxGetTopLevelParent,_args,_kwargs)
|
||||
return val
|
||||
|
||||
wxResourceAddIdentifier = misc2c.wxResourceAddIdentifier
|
||||
|
||||
wxResourceClear = misc2c.wxResourceClear
|
||||
|
||||
def wxResourceCreateBitmap(*_args, **_kwargs):
|
||||
val = apply(misc2c.wxResourceCreateBitmap,_args,_kwargs)
|
||||
if val: val = wxBitmapPtr(val); val.thisown = 1
|
||||
return val
|
||||
|
||||
def wxResourceCreateIcon(*_args, **_kwargs):
|
||||
val = apply(misc2c.wxResourceCreateIcon,_args,_kwargs)
|
||||
if val: val = wxIconPtr(val); val.thisown = 1
|
||||
return val
|
||||
|
||||
def wxResourceCreateMenuBar(*_args, **_kwargs):
|
||||
val = apply(misc2c.wxResourceCreateMenuBar,_args,_kwargs)
|
||||
return val
|
||||
|
||||
wxResourceGetIdentifier = misc2c.wxResourceGetIdentifier
|
||||
|
||||
wxResourceParseData = misc2c.wxResourceParseData
|
||||
|
||||
wxResourceParseFile = misc2c.wxResourceParseFile
|
||||
|
||||
wxResourceParseString = misc2c.wxResourceParseString
|
||||
|
||||
wxCaret_GetBlinkTime = misc2c.wxCaret_GetBlinkTime
|
||||
|
||||
wxCaret_SetBlinkTime = misc2c.wxCaret_SetBlinkTime
|
||||
@@ -1255,6 +1275,8 @@ wxLogMessage = misc2c.wxLogMessage
|
||||
|
||||
wxLogInfo = misc2c.wxLogInfo
|
||||
|
||||
wxLogDebug = misc2c.wxLogDebug
|
||||
|
||||
wxLogVerbose = misc2c.wxLogVerbose
|
||||
|
||||
wxLogStatus = misc2c.wxLogStatus
|
||||
@@ -1344,6 +1366,10 @@ wxLog_GetTraceMask = misc2c.wxLog_GetTraceMask
|
||||
|
||||
wxLog_IsAllowedTraceMask = misc2c.wxLog_IsAllowedTraceMask
|
||||
|
||||
wxLog_SetLogLevel = misc2c.wxLog_SetLogLevel
|
||||
|
||||
wxLog_GetLogLevel = misc2c.wxLog_GetLogLevel
|
||||
|
||||
wxProcess_Kill = misc2c.wxProcess_Kill
|
||||
|
||||
wxProcess_Exists = misc2c.wxProcess_Exists
|
||||
@@ -1373,8 +1399,6 @@ def wxArtProvider_GetIcon(*_args, **_kwargs):
|
||||
if val: val = wxIconPtr(val); val.thisown = 1
|
||||
return val
|
||||
|
||||
wxArtProvider_CleanUpProviders = misc2c.wxArtProvider_CleanUpProviders
|
||||
|
||||
|
||||
|
||||
#-------------- VARIABLE WRAPPERS ------------------
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
/* Implementation : PYTHON */
|
||||
|
||||
#define SWIGPYTHON
|
||||
#include "Python.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
/* Definitions for Windows/Unix exporting */
|
||||
@@ -36,12 +38,9 @@
|
||||
# define SWIGEXPORT(a) a
|
||||
#endif
|
||||
|
||||
#include "Python.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void SWIG_MakePtr(char *, void *, char *);
|
||||
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
|
||||
extern char *SWIG_GetPtr(char *, void **, char *);
|
||||
@@ -356,7 +355,7 @@ static PyObject *_wrap_wxPrintData_GetPrinterName(PyObject *self, PyObject *args
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -821,7 +820,7 @@ static PyObject *_wrap_wxPrintData_GetPrinterCommand(PyObject *self, PyObject *a
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -856,7 +855,7 @@ static PyObject *_wrap_wxPrintData_GetPrinterOptions(PyObject *self, PyObject *a
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -891,7 +890,7 @@ static PyObject *_wrap_wxPrintData_GetPreviewCommand(PyObject *self, PyObject *a
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -926,7 +925,7 @@ static PyObject *_wrap_wxPrintData_GetFilename(PyObject *self, PyObject *args, P
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -961,7 +960,7 @@ static PyObject *_wrap_wxPrintData_GetFontMetricPath(PyObject *self, PyObject *a
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -1548,8 +1547,7 @@ static PyObject *_wrap_new_wxPrinterDC(PyObject *self, PyObject *args, PyObject
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxPrinterDC",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPrintData_p")) {
|
||||
if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPrintData_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxPrinterDC. Expected _wxPrintData_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -1662,8 +1660,7 @@ static PyObject *_wrap_new_wxPostScriptDC(PyObject *self, PyObject *args, PyObje
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxPostScriptDC",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPrintData_p")) {
|
||||
if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPrintData_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxPostScriptDC. Expected _wxPrintData_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -1740,8 +1737,7 @@ static PyObject *_wrap_wxPostScriptDC_SetPrintData(PyObject *self, PyObject *arg
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPrintData_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPrintData_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPostScriptDC_SetPrintData. Expected _wxPrintData_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -2741,8 +2737,7 @@ static PyObject *_wrap_wxPageSetupDialogData_SetPrintData(PyObject *self, PyObje
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPrintData_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPrintData_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPageSetupDialogData_SetPrintData. Expected _wxPrintData_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -3548,8 +3543,7 @@ static PyObject *_wrap_wxPrintDialogData_SetPrintData(PyObject *self, PyObject *
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPrintData_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPrintData_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPrintDialogData_SetPrintData. Expected _wxPrintData_p.");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+24
-12
@@ -25,9 +25,12 @@ class wxPrintDataPtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,printfwc=printfwc):
|
||||
if self.thisown == 1 :
|
||||
printfwc.delete_wxPrintData(self)
|
||||
def __del__(self, delfunc=printfwc.delete_wxPrintData):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def GetNoCopies(self, *_args, **_kwargs):
|
||||
val = apply(printfwc.wxPrintData_GetNoCopies,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -206,9 +209,12 @@ class wxPageSetupDialogDataPtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,printfwc=printfwc):
|
||||
if self.thisown == 1 :
|
||||
printfwc.delete_wxPageSetupDialogData(self)
|
||||
def __del__(self, delfunc=printfwc.delete_wxPageSetupDialogData):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def EnableHelp(self, *_args, **_kwargs):
|
||||
val = apply(printfwc.wxPageSetupDialogData_EnableHelp,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -338,9 +344,12 @@ class wxPrintDialogDataPtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,printfwc=printfwc):
|
||||
if self.thisown == 1 :
|
||||
printfwc.delete_wxPrintDialogData(self)
|
||||
def __del__(self, delfunc=printfwc.delete_wxPrintDialogData):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def EnableHelp(self, *_args, **_kwargs):
|
||||
val = apply(printfwc.wxPrintDialogData_EnableHelp,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -510,9 +519,12 @@ class wxPrinterPtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,printfwc=printfwc):
|
||||
if self.thisown == 1 :
|
||||
printfwc.delete_wxPrinter(self)
|
||||
def __del__(self, delfunc=printfwc.delete_wxPrinter):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def CreateAbortWindow(self, *_args, **_kwargs):
|
||||
val = apply(printfwc.wxPrinter_CreateAbortWindow,(self,) + _args, _kwargs)
|
||||
return val
|
||||
|
||||
+1246
-304
File diff suppressed because it is too large
Load Diff
+188
-40
@@ -15,7 +15,6 @@ from controls import *
|
||||
|
||||
from events import *
|
||||
import wx
|
||||
import string
|
||||
class wxSizerItemPtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
@@ -23,9 +22,8 @@ class wxSizerItemPtr(wxObjectPtr):
|
||||
def DeleteWindows(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_DeleteWindows,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetPosition(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_GetPosition,(self,) + _args, _kwargs)
|
||||
if val: val = wxPointPtr(val) ; val.thisown = 1
|
||||
def DetachSizer(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_DetachSizer,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetSize(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_GetSize,(self,) + _args, _kwargs)
|
||||
@@ -38,6 +36,13 @@ class wxSizerItemPtr(wxObjectPtr):
|
||||
def SetDimension(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_SetDimension,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetMinSize(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_GetMinSize,(self,) + _args, _kwargs)
|
||||
if val: val = wxSizePtr(val) ; val.thisown = 1
|
||||
return val
|
||||
def SetInitSize(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_SetInitSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetRatioWH(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_SetRatioWH,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -59,6 +64,24 @@ class wxSizerItemPtr(wxObjectPtr):
|
||||
def IsSpacer(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_IsSpacer,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetProportion(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_SetProportion,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetProportion(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_GetProportion,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetFlag(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_SetFlag,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetFlag(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_GetFlag,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetBorder(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_SetBorder,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetBorder(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_GetBorder,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetWindow(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_GetWindow,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -71,32 +94,30 @@ class wxSizerItemPtr(wxObjectPtr):
|
||||
def SetSizer(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_SetSizer,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetOption(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_GetOption,(self,) + _args, _kwargs)
|
||||
def GetSpacer(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_GetSpacer,(self,) + _args, _kwargs)
|
||||
if val: val = wxSizePtr(val)
|
||||
return val
|
||||
def GetFlag(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_GetFlag,(self,) + _args, _kwargs)
|
||||
def SetSpacer(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_SetSpacer,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetBorder(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_GetBorder,(self,) + _args, _kwargs)
|
||||
def Show(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_Show,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetInitSize(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_SetInitSize,(self,) + _args, _kwargs)
|
||||
def IsShown(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_IsShown,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetOption(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_SetOption,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetFlag(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_SetFlag,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetBorder(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_SetBorder,(self,) + _args, _kwargs)
|
||||
def GetPosition(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_GetPosition,(self,) + _args, _kwargs)
|
||||
if val: val = wxPointPtr(val) ; val.thisown = 1
|
||||
return val
|
||||
def GetUserData(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_GetUserData,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxSizerItem instance at %s>" % (self.this,)
|
||||
SetOption = SetProportion
|
||||
GetOption = GetProportion
|
||||
class wxSizerItem(wxSizerItemPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
@@ -150,8 +171,20 @@ class wxSizerPtr(wxObjectPtr):
|
||||
def RemovePos(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_RemovePos,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetDimension(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_SetDimension,(self,) + _args, _kwargs)
|
||||
def DetachWindow(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_DetachWindow,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def DetachSizer(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_DetachSizer,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def DetachPos(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_DetachPos,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Clear(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_Clear,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def DeleteWindows(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_DeleteWindows,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetMinSize(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_SetMinSize,(self,) + _args, _kwargs)
|
||||
@@ -165,6 +198,15 @@ class wxSizerPtr(wxObjectPtr):
|
||||
def SetItemMinSizePos(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_SetItemMinSizePos,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetItemMinSizeWindowWH(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_SetItemMinSizeWindowWH,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetItemMinSizeSizerWH(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_SetItemMinSizeSizerWH,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetItemMinSizePosWH(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_SetItemMinSizePosWH,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetSize(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_GetSize,(self,) + _args, _kwargs)
|
||||
if val: val = wxSizePtr(val) ; val.thisown = 1
|
||||
@@ -193,49 +235,94 @@ class wxSizerPtr(wxObjectPtr):
|
||||
def SetVirtualSizeHints(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_SetVirtualSizeHints,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Clear(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_Clear,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def DeleteWindows(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_DeleteWindows,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetChildren(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_GetChildren,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetDimension(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_SetDimension,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def ShowWindow(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_ShowWindow,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def ShowSizer(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_ShowSizer,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def ShowPos(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_ShowPos,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def HideWindow(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_HideWindow,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def HideSizer(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_HideSizer,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def HidePos(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_HidePos,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def IsShownWindow(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_IsShownWindow,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def IsShownSizer(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_IsShownSizer,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def IsShownPos(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_IsShownPos,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def ShowItems(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_ShowItems,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxSizer instance at %s>" % (self.this,)
|
||||
|
||||
def Add(self, *args, **kw):
|
||||
if type(args[0]) == type(1):
|
||||
apply(self.AddSpacer, args, kw)
|
||||
elif string.find(args[0].this, 'Sizer') != -1:
|
||||
elif isinstance(args[0], wxSizerPtr):
|
||||
apply(self.AddSizer, args, kw)
|
||||
else:
|
||||
elif isinstance(args[0], wxWindowPtr):
|
||||
apply(self.AddWindow, args, kw)
|
||||
else:
|
||||
raise TypeError, 'Expected int, wxSizer or wxWindow parameter'
|
||||
|
||||
def Insert(self, *args, **kw):
|
||||
if type(args[1]) == type(1):
|
||||
apply(self.InsertSpacer, args, kw)
|
||||
elif string.find(args[1].this, 'Sizer') != -1:
|
||||
elif isinstance(args[1], wxSizerPtr):
|
||||
apply(self.InsertSizer, args, kw)
|
||||
else:
|
||||
elif isinstance(args[1], wxWindowPtr):
|
||||
apply(self.InsertWindow, args, kw)
|
||||
else:
|
||||
raise TypeError, 'Expected int, wxSizer or wxWindow parameter'
|
||||
|
||||
def Prepend(self, *args, **kw):
|
||||
if type(args[0]) == type(1):
|
||||
apply(self.PrependSpacer, args, kw)
|
||||
elif string.find(args[0].this, 'Sizer') != -1:
|
||||
elif isinstance(args[0], wxSizerPtr):
|
||||
apply(self.PrependSizer, args, kw)
|
||||
else:
|
||||
elif isinstance(args[0], wxWindowPtr):
|
||||
apply(self.PrependWindow, args, kw)
|
||||
else:
|
||||
raise TypeError, 'Expected int, wxSizer or wxWindow parameter'
|
||||
|
||||
def Remove(self, *args, **kw):
|
||||
if type(args[0]) == type(1):
|
||||
apply(self.RemovePos, args, kw)
|
||||
elif string.find(args[0].this, 'Sizer') != -1:
|
||||
apply(self.RemoveSizer, args, kw)
|
||||
return apply(self.RemovePos, args, kw)
|
||||
elif isinstance(args[0], wxSizerPtr):
|
||||
return apply(self.RemoveSizer, args, kw)
|
||||
elif isinstance(args[0], wxWindowPtr):
|
||||
return apply(self.RemoveWindow, args, kw)
|
||||
else:
|
||||
apply(self.RemoveWindow, args, kw)
|
||||
raise TypeError, 'Expected int, wxSizer or wxWindow parameter'
|
||||
|
||||
def Detach(self, *args, **kw):
|
||||
if type(args[0]) == type(1):
|
||||
return apply(self.DetachPos, args, kw)
|
||||
elif isinstance(args[0], wxSizerPtr):
|
||||
return apply(self.DetachSizer, args, kw)
|
||||
elif isinstance(args[0], wxWindowPtr):
|
||||
return apply(self.DetachWindow, args, kw)
|
||||
else:
|
||||
raise TypeError, 'Expected int, wxSizer or wxWindow parameter'
|
||||
|
||||
def AddMany(self, widgets):
|
||||
for childinfo in widgets:
|
||||
@@ -247,10 +334,22 @@ class wxSizerPtr(wxObjectPtr):
|
||||
def SetItemMinSize(self, *args):
|
||||
if type(args[0]) == type(1):
|
||||
apply(self.SetItemMinSizePos, args)
|
||||
elif string.find(args[0].this, 'Sizer') != -1:
|
||||
elif isinstance(args[0], wxSizerPtr):
|
||||
apply(self.SetItemMinSizeSizer, args)
|
||||
else:
|
||||
elif isinstance(args[0], wxWindowPtr):
|
||||
apply(self.SetItemMinSizeWindow, args)
|
||||
else:
|
||||
raise TypeError, 'Expected int, wxSizer or wxWindow parameter'
|
||||
|
||||
def SetItemMinSizeWH(self, *args):
|
||||
if type(args[0]) == type(1):
|
||||
apply(self.SetItemMinSizePosWH, args)
|
||||
elif isinstance(args[0], wxSizerPtr):
|
||||
apply(self.SetItemMinSizeSizerWH, args)
|
||||
elif isinstance(args[0], wxWindowPtr):
|
||||
apply(self.SetItemMinSizeWindowWH, args)
|
||||
else:
|
||||
raise TypeError, 'Expected int, wxSizer or wxWindow parameter'
|
||||
|
||||
|
||||
def GetSizeTuple(self):
|
||||
@@ -260,6 +359,37 @@ class wxSizerPtr(wxObjectPtr):
|
||||
def GetMinSizeTuple(self):
|
||||
return self.GetMinSize().asTuple()
|
||||
|
||||
|
||||
def Show(self, *args):
|
||||
if type(args[0]) == type(1):
|
||||
apply(self.ShowPos, args)
|
||||
elif isinstance(args[0], wxSizerPtr):
|
||||
apply(self.ShowSizer, args)
|
||||
elif isinstance(args[0], wxWindowPtr):
|
||||
apply(self.ShowWindow, args)
|
||||
else:
|
||||
raise TypeError, 'Expected int, wxSizer or wxWindow parameter'
|
||||
|
||||
def Hide(self, *args):
|
||||
if type(args[0]) == type(1):
|
||||
apply(self.HidePos, args)
|
||||
elif isinstance(args[0], wxSizerPtr):
|
||||
apply(self.HideSizer, args)
|
||||
elif isinstance(args[0], wxWindowPtr):
|
||||
apply(self.HideWindow, args)
|
||||
else:
|
||||
raise TypeError, 'Expected int, wxSizer or wxWindow parameter'
|
||||
|
||||
def IsShown(self, *args):
|
||||
if type(args[0]) == type(1):
|
||||
return apply(self.IsShownPos, args)
|
||||
elif isinstance(args[0], wxSizerPtr):
|
||||
return apply(self.IsShownSizer, args)
|
||||
elif isinstance(args[0], wxWindowPtr):
|
||||
return apply(self.IsShownWindow, args)
|
||||
else:
|
||||
raise TypeError, 'Expected int, wxSizer or wxWindow parameter'
|
||||
|
||||
class wxSizer(wxSizerPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
@@ -293,6 +423,9 @@ class wxBoxSizerPtr(wxSizerPtr):
|
||||
def GetOrientation(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxBoxSizer_GetOrientation,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetOrientation(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxBoxSizer_SetOrientation,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def RecalcSizes(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxBoxSizer_RecalcSizes,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -430,6 +563,18 @@ class wxFlexGridSizerPtr(wxGridSizerPtr):
|
||||
def RemoveGrowableCol(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxFlexGridSizer_RemoveGrowableCol,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetFlexibleDirection(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxFlexGridSizer_SetFlexibleDirection,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetFlexibleDirection(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxFlexGridSizer_GetFlexibleDirection,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetNonFlexibleGrowMode(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxFlexGridSizer_SetNonFlexibleGrowMode,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetNonFlexibleGrowMode(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxFlexGridSizer_GetNonFlexibleGrowMode,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxFlexGridSizer instance at %s>" % (self.this,)
|
||||
class wxFlexGridSizer(wxFlexGridSizerPtr):
|
||||
@@ -449,3 +594,6 @@ class wxFlexGridSizer(wxFlexGridSizerPtr):
|
||||
|
||||
#-------------- VARIABLE WRAPPERS ------------------
|
||||
|
||||
wxFLEX_GROWMODE_NONE = sizersc.wxFLEX_GROWMODE_NONE
|
||||
wxFLEX_GROWMODE_SPECIFIED = sizersc.wxFLEX_GROWMODE_SPECIFIED
|
||||
wxFLEX_GROWMODE_ALL = sizersc.wxFLEX_GROWMODE_ALL
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
/* Implementation : PYTHON */
|
||||
|
||||
#define SWIGPYTHON
|
||||
#include "Python.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
/* Definitions for Windows/Unix exporting */
|
||||
@@ -36,12 +38,9 @@
|
||||
# define SWIGEXPORT(a) a
|
||||
#endif
|
||||
|
||||
#include "Python.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void SWIG_MakePtr(char *, void *, char *);
|
||||
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
|
||||
extern char *SWIG_GetPtr(char *, void **, char *);
|
||||
@@ -338,7 +337,7 @@ static PyObject *_wrap_wxStatusBar_GetStatusText(PyObject *self, PyObject *args,
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -1093,7 +1092,7 @@ static PyObject *_wrap_wxToolBarToolBase_GetLabel(PyObject *self, PyObject *args
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -1130,7 +1129,7 @@ static PyObject *_wrap_wxToolBarToolBase_GetShortHelp(PyObject *self, PyObject *
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -1167,7 +1166,7 @@ static PyObject *_wrap_wxToolBarToolBase_GetLongHelp(PyObject *self, PyObject *a
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -1366,8 +1365,7 @@ static PyObject *_wrap_wxToolBarToolBase_SetNormalBitmap(PyObject *self, PyObjec
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxToolBarToolBase_SetNormalBitmap. Expected _wxBitmap_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -1403,8 +1401,7 @@ static PyObject *_wrap_wxToolBarToolBase_SetDisabledBitmap(PyObject *self, PyObj
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxToolBarToolBase_SetDisabledBitmap. Expected _wxBitmap_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -1674,15 +1671,13 @@ static PyObject *_wrap_wxToolBarBase_DoAddTool(PyObject *self, PyObject *args, P
|
||||
return NULL;
|
||||
}
|
||||
if (_argo3) {
|
||||
if (_argo3 == Py_None) { _arg3 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxBitmap_p")) {
|
||||
if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxBitmap_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxToolBarBase_DoAddTool. Expected _wxBitmap_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo4) {
|
||||
if (_argo4 == Py_None) { _arg4 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxBitmap_p")) {
|
||||
if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxBitmap_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxToolBarBase_DoAddTool. Expected _wxBitmap_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -1725,14 +1720,14 @@ static PyObject *_wrap_wxToolBarBase_DoAddTool(PyObject *self, PyObject *args, P
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static wxToolBarToolBase * wxToolBarBase_InsertTool(wxToolBarBase *self,size_t pos,int id,const wxString & label,const wxBitmap & bitmap,const wxBitmap & bmpDisabled,wxItemKind kind,const wxString & shortHelp,const wxString & longHelp,PyObject * clientData) {
|
||||
static wxToolBarToolBase * wxToolBarBase_DoInsertTool(wxToolBarBase *self,size_t pos,int id,const wxString & label,const wxBitmap & bitmap,const wxBitmap & bmpDisabled,wxItemKind kind,const wxString & shortHelp,const wxString & longHelp,PyObject * clientData) {
|
||||
wxPyUserData* udata = NULL;
|
||||
if (clientData && clientData != Py_None)
|
||||
udata = new wxPyUserData(clientData);
|
||||
return self->InsertTool(pos, id, label, bitmap, bmpDisabled, kind,
|
||||
shortHelp, longHelp, udata);
|
||||
}
|
||||
static PyObject *_wrap_wxToolBarBase_InsertTool(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
static PyObject *_wrap_wxToolBarBase_DoInsertTool(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxToolBarToolBase * _result;
|
||||
wxToolBarBase * _arg0;
|
||||
@@ -1755,12 +1750,12 @@ static PyObject *_wrap_wxToolBarBase_InsertTool(PyObject *self, PyObject *args,
|
||||
char *_kwnames[] = { "self","pos","id","label","bitmap","bmpDisabled","kind","shortHelp","longHelp","clientData", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiOO|OiOOO:wxToolBarBase_InsertTool",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3,&_argo4,&_argo5,&_arg6,&_obj7,&_obj8,&_obj9))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiOO|OiOOO:wxToolBarBase_DoInsertTool",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3,&_argo4,&_argo5,&_arg6,&_obj7,&_obj8,&_obj9))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolBarBase_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBarBase_InsertTool. Expected _wxToolBarBase_p.");
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBarBase_DoInsertTool. Expected _wxToolBarBase_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@@ -1770,16 +1765,14 @@ static PyObject *_wrap_wxToolBarBase_InsertTool(PyObject *self, PyObject *args,
|
||||
return NULL;
|
||||
}
|
||||
if (_argo4) {
|
||||
if (_argo4 == Py_None) { _arg4 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxBitmap_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxToolBarBase_InsertTool. Expected _wxBitmap_p.");
|
||||
if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxBitmap_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxToolBarBase_DoInsertTool. Expected _wxBitmap_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo5) {
|
||||
if (_argo5 == Py_None) { _arg5 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo5,(void **) &_arg5,"_wxBitmap_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 6 of wxToolBarBase_InsertTool. Expected _wxBitmap_p.");
|
||||
if (SWIG_GetPtrObj(_argo5,(void **) &_arg5,"_wxBitmap_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 6 of wxToolBarBase_DoInsertTool. Expected _wxBitmap_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@@ -1801,7 +1794,7 @@ static PyObject *_wrap_wxToolBarBase_InsertTool(PyObject *self, PyObject *args,
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (wxToolBarToolBase *)wxToolBarBase_InsertTool(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,*_arg8,_arg9);
|
||||
_result = (wxToolBarToolBase *)wxToolBarBase_DoInsertTool(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,*_arg8,_arg9);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
@@ -2422,7 +2415,7 @@ static PyObject *_wrap_wxToolBarBase_GetToolShortHelp(PyObject *self, PyObject *
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -2500,7 +2493,7 @@ static PyObject *_wrap_wxToolBarBase_GetToolLongHelp(PyObject *self, PyObject *a
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -3531,7 +3524,7 @@ static PyMethodDef stattoolcMethods[] = {
|
||||
{ "wxToolBarBase_FindControl", (PyCFunction) _wrap_wxToolBarBase_FindControl, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxToolBarBase_InsertControl", (PyCFunction) _wrap_wxToolBarBase_InsertControl, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxToolBarBase_AddControl", (PyCFunction) _wrap_wxToolBarBase_AddControl, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxToolBarBase_InsertTool", (PyCFunction) _wrap_wxToolBarBase_InsertTool, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxToolBarBase_DoInsertTool", (PyCFunction) _wrap_wxToolBarBase_DoInsertTool, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxToolBarBase_DoAddTool", (PyCFunction) _wrap_wxToolBarBase_DoAddTool, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxToolBarToolBase_SetClientData", (PyCFunction) _wrap_wxToolBarToolBase_SetClientData, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxToolBarToolBase_GetClientData", (PyCFunction) _wrap_wxToolBarToolBase_GetClientData, METH_VARARGS | METH_KEYWORDS },
|
||||
|
||||
@@ -193,8 +193,8 @@ class wxToolBarBasePtr(wxControlPtr):
|
||||
def DoAddTool(self, *_args, **_kwargs):
|
||||
val = apply(stattoolc.wxToolBarBase_DoAddTool,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def InsertTool(self, *_args, **_kwargs):
|
||||
val = apply(stattoolc.wxToolBarBase_InsertTool,(self,) + _args, _kwargs)
|
||||
def DoInsertTool(self, *_args, **_kwargs):
|
||||
val = apply(stattoolc.wxToolBarBase_DoInsertTool,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def AddControl(self, *_args, **_kwargs):
|
||||
val = apply(stattoolc.wxToolBarBase_AddControl,(self,) + _args, _kwargs)
|
||||
@@ -370,7 +370,7 @@ class wxToolBarBasePtr(wxControlPtr):
|
||||
# 2.3.3. They are renamed to have 'Label' in the name so as to be
|
||||
# able to keep backwards compatibility with using the above
|
||||
# methods. Eventually these should migrate to be the methods used
|
||||
# primarily and loose the 'Label' in the name...
|
||||
# primarily and lose the 'Label' in the name...
|
||||
|
||||
def AddLabelTool(self, id, label, bitmap,
|
||||
bmpDisabled = wxNullBitmap,
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
/* Implementation : PYTHON */
|
||||
|
||||
#define SWIGPYTHON
|
||||
#include "Python.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
/* Definitions for Windows/Unix exporting */
|
||||
@@ -36,12 +38,9 @@
|
||||
# define SWIGEXPORT(a) a
|
||||
#endif
|
||||
|
||||
#include "Python.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void SWIG_MakePtr(char *, void *, char *);
|
||||
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
|
||||
extern char *SWIG_GetPtr(char *, void **, char *);
|
||||
@@ -362,6 +361,233 @@ static PyObject *_wrap_wxInputStream_tell(PyObject *self, PyObject *args, PyObje
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxInputStream_Peek(_swigobj) (_swigobj->Peek())
|
||||
static PyObject *_wrap_wxInputStream_Peek(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
char _result;
|
||||
wxPyInputStream * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_Peek",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_Peek. Expected _wxPyInputStream_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (char )wxInputStream_Peek(_arg0);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("c",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxInputStream_GetC(_swigobj) (_swigobj->GetC())
|
||||
static PyObject *_wrap_wxInputStream_GetC(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
char _result;
|
||||
wxPyInputStream * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_GetC",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_GetC. Expected _wxPyInputStream_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (char )wxInputStream_GetC(_arg0);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("c",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxInputStream_LastRead(_swigobj) (_swigobj->LastRead())
|
||||
static PyObject *_wrap_wxInputStream_LastRead(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
size_t _result;
|
||||
wxPyInputStream * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_LastRead",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_LastRead. Expected _wxPyInputStream_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (size_t )wxInputStream_LastRead(_arg0);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxInputStream_CanRead(_swigobj) (_swigobj->CanRead())
|
||||
static PyObject *_wrap_wxInputStream_CanRead(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
bool _result;
|
||||
wxPyInputStream * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_CanRead",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_CanRead. Expected _wxPyInputStream_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (bool )wxInputStream_CanRead(_arg0);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxInputStream_Eof(_swigobj) (_swigobj->Eof())
|
||||
static PyObject *_wrap_wxInputStream_Eof(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
bool _result;
|
||||
wxPyInputStream * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_Eof",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_Eof. Expected _wxPyInputStream_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (bool )wxInputStream_Eof(_arg0);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxInputStream_Ungetch(_swigobj,_swigarg0) (_swigobj->Ungetch(_swigarg0))
|
||||
static PyObject *_wrap_wxInputStream_Ungetch(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
bool _result;
|
||||
wxPyInputStream * _arg0;
|
||||
char _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self","c", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oc:wxInputStream_Ungetch",_kwnames,&_argo0,&_arg1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_Ungetch. Expected _wxPyInputStream_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (bool )wxInputStream_Ungetch(_arg0,_arg1);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxInputStream_SeekI(_swigobj,_swigarg0,_swigarg1) (_swigobj->SeekI(_swigarg0,_swigarg1))
|
||||
static PyObject *_wrap_wxInputStream_SeekI(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
long _result;
|
||||
wxPyInputStream * _arg0;
|
||||
long _arg1;
|
||||
wxSeekMode _arg2 = (wxSeekMode ) (wxFromStart);
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self","pos","mode", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol|i:wxInputStream_SeekI",_kwnames,&_argo0,&_arg1,&_arg2))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_SeekI. Expected _wxPyInputStream_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (long )wxInputStream_SeekI(_arg0,_arg1,_arg2);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("l",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxInputStream_TellI(_swigobj) (_swigobj->TellI())
|
||||
static PyObject *_wrap_wxInputStream_TellI(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
long _result;
|
||||
wxPyInputStream * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_TellI",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_TellI. Expected _wxPyInputStream_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (long )wxInputStream_TellI(_arg0);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("l",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static void wxOutputStream_write(wxOutputStream *self,PyObject * obj) {
|
||||
// We use only strings for the streams, not unicode
|
||||
PyObject* str = PyObject_Str(obj);
|
||||
@@ -407,6 +633,14 @@ static PyObject *_wrap_wxOutputStream_write(PyObject *self, PyObject *args, PyOb
|
||||
|
||||
static PyMethodDef streamscMethods[] = {
|
||||
{ "wxOutputStream_write", (PyCFunction) _wrap_wxOutputStream_write, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxInputStream_TellI", (PyCFunction) _wrap_wxInputStream_TellI, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxInputStream_SeekI", (PyCFunction) _wrap_wxInputStream_SeekI, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxInputStream_Ungetch", (PyCFunction) _wrap_wxInputStream_Ungetch, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxInputStream_Eof", (PyCFunction) _wrap_wxInputStream_Eof, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxInputStream_CanRead", (PyCFunction) _wrap_wxInputStream_CanRead, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxInputStream_LastRead", (PyCFunction) _wrap_wxInputStream_LastRead, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxInputStream_GetC", (PyCFunction) _wrap_wxInputStream_GetC, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxInputStream_Peek", (PyCFunction) _wrap_wxInputStream_Peek, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxInputStream_tell", (PyCFunction) _wrap_wxInputStream_tell, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxInputStream_seek", (PyCFunction) _wrap_wxInputStream_seek, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxInputStream_readlines", (PyCFunction) _wrap_wxInputStream_readlines, METH_VARARGS | METH_KEYWORDS },
|
||||
@@ -528,6 +762,9 @@ SWIGEXPORT(void) initstreamsc() {
|
||||
SWIG_globals = SWIG_newvarlink();
|
||||
m = Py_InitModule("streamsc", streamscMethods);
|
||||
d = PyModule_GetDict(m);
|
||||
PyDict_SetItemString(d,"wxFromStart", PyInt_FromLong((long) wxFromStart));
|
||||
PyDict_SetItemString(d,"wxFromCurrent", PyInt_FromLong((long) wxFromCurrent));
|
||||
PyDict_SetItemString(d,"wxFromEnd", PyInt_FromLong((long) wxFromEnd));
|
||||
|
||||
wxPyPtrTypeMap_Add("wxInputStream", "wxPyInputStream");
|
||||
{
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# This file was created automatically by SWIG.
|
||||
import streamsc
|
||||
import wx
|
||||
import string
|
||||
class wxInputStreamPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
@@ -30,6 +29,30 @@ class wxInputStreamPtr :
|
||||
def tell(self, *_args, **_kwargs):
|
||||
val = apply(streamsc.wxInputStream_tell,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Peek(self, *_args, **_kwargs):
|
||||
val = apply(streamsc.wxInputStream_Peek,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetC(self, *_args, **_kwargs):
|
||||
val = apply(streamsc.wxInputStream_GetC,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def LastRead(self, *_args, **_kwargs):
|
||||
val = apply(streamsc.wxInputStream_LastRead,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def CanRead(self, *_args, **_kwargs):
|
||||
val = apply(streamsc.wxInputStream_CanRead,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Eof(self, *_args, **_kwargs):
|
||||
val = apply(streamsc.wxInputStream_Eof,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Ungetch(self, *_args, **_kwargs):
|
||||
val = apply(streamsc.wxInputStream_Ungetch,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SeekI(self, *_args, **_kwargs):
|
||||
val = apply(streamsc.wxInputStream_SeekI,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def TellI(self, *_args, **_kwargs):
|
||||
val = apply(streamsc.wxInputStream_TellI,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxInputStream instance at %s>" % (self.this,)
|
||||
class wxInputStream(wxInputStreamPtr):
|
||||
@@ -64,3 +87,6 @@ class wxOutputStream(wxOutputStreamPtr):
|
||||
|
||||
#-------------- VARIABLE WRAPPERS ------------------
|
||||
|
||||
wxFromStart = streamsc.wxFromStart
|
||||
wxFromCurrent = streamsc.wxFromCurrent
|
||||
wxFromEnd = streamsc.wxFromEnd
|
||||
|
||||
+90
-99
File diff suppressed because it is too large
Load Diff
+47
-24
@@ -1,6 +1,6 @@
|
||||
# This file was created automatically by SWIG.
|
||||
import utilsc
|
||||
import string
|
||||
import wx
|
||||
class wxConfigBasePtr :
|
||||
Type_Unknown = utilsc.wxConfigBase_Type_Unknown
|
||||
Type_String = utilsc.wxConfigBase_Type_String
|
||||
@@ -10,9 +10,12 @@ class wxConfigBasePtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,utilsc=utilsc):
|
||||
if self.thisown == 1 :
|
||||
utilsc.delete_wxConfigBase(self)
|
||||
def __del__(self, delfunc=utilsc.delete_wxConfigBase):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def DeleteAll(self, *_args, **_kwargs):
|
||||
val = apply(utilsc.wxConfigBase_DeleteAll,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -137,9 +140,12 @@ class wxConfigPtr(wxConfigBasePtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,utilsc=utilsc):
|
||||
if self.thisown == 1 :
|
||||
utilsc.delete_wxConfig(self)
|
||||
def __del__(self, delfunc=utilsc.delete_wxConfig):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def __repr__(self):
|
||||
return "<C wxConfig instance at %s>" % (self.this,)
|
||||
class wxConfig(wxConfigPtr):
|
||||
@@ -154,9 +160,12 @@ class wxFileConfigPtr(wxConfigBasePtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,utilsc=utilsc):
|
||||
if self.thisown == 1 :
|
||||
utilsc.delete_wxFileConfig(self)
|
||||
def __del__(self, delfunc=utilsc.delete_wxFileConfig):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def __repr__(self):
|
||||
return "<C wxFileConfig instance at %s>" % (self.this,)
|
||||
class wxFileConfig(wxFileConfigPtr):
|
||||
@@ -262,9 +271,12 @@ class wxDateTimePtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,utilsc=utilsc):
|
||||
if self.thisown == 1 :
|
||||
utilsc.delete_wxDateTime(self)
|
||||
def __del__(self, delfunc=utilsc.delete_wxDateTime):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def SetToCurrent(self, *_args, **_kwargs):
|
||||
val = apply(utilsc.wxDateTime_SetToCurrent,(self,) + _args, _kwargs)
|
||||
if val: val = wxDateTimePtr(val)
|
||||
@@ -551,17 +563,17 @@ class wxDateTimePtr :
|
||||
return "<C wxDateTime instance at %s>" % (self.this,)
|
||||
|
||||
def __add__(self, other):
|
||||
if string.find(other.this, 'wxTimeSpan') != -1:
|
||||
if isinstance(other, wxTimeSpanPtr):
|
||||
return self.__add__TS(other)
|
||||
if string.find(other.this, 'wxDateSpan') != -1:
|
||||
if isinstance(other, wxDateSpanPtr):
|
||||
return self.__add__DS(other)
|
||||
raise TypeError, 'Invalid r.h.s. type for __add__'
|
||||
def __sub__(self, other):
|
||||
if string.find(other.this, 'wxDateTime') != -1:
|
||||
if isinstance(other, wxDateTimePtr):
|
||||
return self.__sub__DT(other)
|
||||
if string.find(other.this, 'wxTimeSpan') != -1:
|
||||
if isinstance(other, wxTimeSpanPtr):
|
||||
return self.__sub__TS(other)
|
||||
if string.find(other.this, 'wxDateSpan') != -1:
|
||||
if isinstance(other, wxDateSpanPtr):
|
||||
return self.__sub__DS(other)
|
||||
raise TypeError, 'Invalid r.h.s. type for __sub__'
|
||||
|
||||
@@ -603,9 +615,12 @@ class wxTimeSpanPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,utilsc=utilsc):
|
||||
if self.thisown == 1 :
|
||||
utilsc.delete_wxTimeSpan(self)
|
||||
def __del__(self, delfunc=utilsc.delete_wxTimeSpan):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def Add(self, *_args, **_kwargs):
|
||||
val = apply(utilsc.wxTimeSpan_Add,(self,) + _args, _kwargs)
|
||||
if val: val = wxTimeSpanPtr(val)
|
||||
@@ -702,9 +717,12 @@ class wxDateSpanPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,utilsc=utilsc):
|
||||
if self.thisown == 1 :
|
||||
utilsc.delete_wxDateSpan(self)
|
||||
def __del__(self, delfunc=utilsc.delete_wxDateSpan):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def SetYears(self, *_args, **_kwargs):
|
||||
val = apply(utilsc.wxDateSpan_SetYears,(self,) + _args, _kwargs)
|
||||
if val: val = wxDateSpanPtr(val)
|
||||
@@ -854,6 +872,11 @@ def wxDateTime_Now(*_args, **_kwargs):
|
||||
if val: val = wxDateTimePtr(val); val.thisown = 1
|
||||
return val
|
||||
|
||||
def wxDateTime_UNow(*_args, **_kwargs):
|
||||
val = apply(utilsc.wxDateTime_UNow,_args,_kwargs)
|
||||
if val: val = wxDateTimePtr(val); val.thisown = 1
|
||||
return val
|
||||
|
||||
def wxDateTime_Today(*_args, **_kwargs):
|
||||
val = apply(utilsc.wxDateTime_Today,_args,_kwargs)
|
||||
if val: val = wxDateTimePtr(val); val.thisown = 1
|
||||
|
||||
+178
-99
File diff suppressed because it is too large
Load Diff
@@ -165,6 +165,9 @@ class wxWindowPtr(wxEvtHandlerPtr):
|
||||
def Enable(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxWindow_Enable,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Disable(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxWindow_Disable,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def FindWindowById(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxWindow_FindWindowById,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -174,6 +177,9 @@ class wxWindowPtr(wxEvtHandlerPtr):
|
||||
def Fit(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxWindow_Fit,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def FitInside(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxWindow_FitInside,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetBackgroundColour(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxWindow_GetBackgroundColour,(self,) + _args, _kwargs)
|
||||
if val: val = wxColourPtr(val) ; val.thisown = 1
|
||||
@@ -326,9 +332,6 @@ class wxWindowPtr(wxEvtHandlerPtr):
|
||||
def Layout(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxWindow_Layout,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def LoadFromResource(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxWindow_LoadFromResource,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Lower(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxWindow_Lower,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -457,6 +460,10 @@ class wxWindowPtr(wxEvtHandlerPtr):
|
||||
def GetVirtualSizeTuple(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxWindow_GetVirtualSizeTuple,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetBestVirtualSize(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxWindow_GetBestVirtualSize,(self,) + _args, _kwargs)
|
||||
if val: val = wxSizePtr(val) ; val.thisown = 1
|
||||
return val
|
||||
def SetClientSizeWH(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxWindow_SetClientSizeWH,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -564,6 +571,10 @@ class wxWindowPtr(wxEvtHandlerPtr):
|
||||
val = apply(windowsc.wxWindow_GetMaxSize,(self,) + _args, _kwargs)
|
||||
if val: val = wxSizePtr(val) ; val.thisown = 1
|
||||
return val
|
||||
def GetAdjustedBestSize(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxWindow_GetAdjustedBestSize,(self,) + _args, _kwargs)
|
||||
if val: val = wxSizePtr(val) ; val.thisown = 1
|
||||
return val
|
||||
def SetCaret(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxWindow_SetCaret,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -983,6 +994,9 @@ class wxMenuBarPtr(wxWindowPtr):
|
||||
def EnableTop(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxMenuBar_EnableTop,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def IsEnabledTop(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxMenuBar_IsEnabledTop,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetLabelTop(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxMenuBar_SetLabelTop,(self,) + _args, _kwargs)
|
||||
return val
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
/* Implementation : PYTHON */
|
||||
|
||||
#define SWIGPYTHON
|
||||
#include "Python.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
/* Definitions for Windows/Unix exporting */
|
||||
@@ -36,12 +38,9 @@
|
||||
# define SWIGEXPORT(a) a
|
||||
#endif
|
||||
|
||||
#include "Python.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void SWIG_MakePtr(char *, void *, char *);
|
||||
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
|
||||
extern char *SWIG_GetPtr(char *, void **, char *);
|
||||
@@ -346,7 +345,7 @@ static PyObject *_wrap_new_wxNotebookEvent(PyObject *self, PyObject *args, PyObj
|
||||
int _arg1 = (int ) 0;
|
||||
int _arg2 = (int ) -1;
|
||||
int _arg3 = (int ) -1;
|
||||
char *_kwnames[] = { "commandType","id","nSel","nOldSel", NULL };
|
||||
char *_kwnames[] = { "commandType","id","sel","oldSel", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
@@ -711,7 +710,7 @@ static PyObject *_wrap_wxNotebook_SetSelection(PyObject *self, PyObject *args, P
|
||||
wxNotebook * _arg0;
|
||||
int _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self","nPage", NULL };
|
||||
char *_kwnames[] = { "self","page", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebook_SetSelection",_kwnames,&_argo0,&_arg1))
|
||||
@@ -740,7 +739,7 @@ static PyObject *_wrap_wxNotebook_AdvanceSelection(PyObject *self, PyObject *arg
|
||||
bool _arg1 = (bool ) TRUE;
|
||||
PyObject * _argo0 = 0;
|
||||
int tempbool1 = (int) TRUE;
|
||||
char *_kwnames[] = { "self","bForward", NULL };
|
||||
char *_kwnames[] = { "self","forward", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxNotebook_AdvanceSelection",_kwnames,&_argo0,&tempbool1))
|
||||
@@ -801,7 +800,7 @@ static PyObject *_wrap_wxNotebook_SetPageText(PyObject *self, PyObject *args, Py
|
||||
wxString * _arg2;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _obj2 = 0;
|
||||
char *_kwnames[] = { "self","nPage","strText", NULL };
|
||||
char *_kwnames[] = { "self","page","text", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxNotebook_SetPageText",_kwnames,&_argo0,&_arg1,&_obj2))
|
||||
@@ -839,7 +838,7 @@ static PyObject *_wrap_wxNotebook_GetPageText(PyObject *self, PyObject *args, Py
|
||||
wxNotebook * _arg0;
|
||||
int _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self","nPage", NULL };
|
||||
char *_kwnames[] = { "self","page", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebook_GetPageText",_kwnames,&_argo0,&_arg1))
|
||||
@@ -859,7 +858,7 @@ static PyObject *_wrap_wxNotebook_GetPageText(PyObject *self, PyObject *args, Py
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
@@ -979,7 +978,7 @@ static PyObject *_wrap_wxNotebook_GetPageImage(PyObject *self, PyObject *args, P
|
||||
wxNotebook * _arg0;
|
||||
int _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self","nPage", NULL };
|
||||
char *_kwnames[] = { "self","page", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebook_GetPageImage",_kwnames,&_argo0,&_arg1))
|
||||
@@ -1009,7 +1008,7 @@ static PyObject *_wrap_wxNotebook_SetPageImage(PyObject *self, PyObject *args, P
|
||||
int _arg1;
|
||||
int _arg2;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self","nPage","nImage", NULL };
|
||||
char *_kwnames[] = { "self","page","image", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxNotebook_SetPageImage",_kwnames,&_argo0,&_arg1,&_arg2))
|
||||
@@ -1138,7 +1137,7 @@ static PyObject *_wrap_wxNotebook_DeletePage(PyObject *self, PyObject *args, PyO
|
||||
wxNotebook * _arg0;
|
||||
int _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self","nPage", NULL };
|
||||
char *_kwnames[] = { "self","page", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebook_DeletePage",_kwnames,&_argo0,&_arg1))
|
||||
@@ -1167,7 +1166,7 @@ static PyObject *_wrap_wxNotebook_RemovePage(PyObject *self, PyObject *args, PyO
|
||||
wxNotebook * _arg0;
|
||||
int _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self","nPage", NULL };
|
||||
char *_kwnames[] = { "self","page", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebook_RemovePage",_kwnames,&_argo0,&_arg1))
|
||||
@@ -1229,7 +1228,7 @@ static PyObject *_wrap_wxNotebook_AddPage(PyObject *self, PyObject *args, PyObje
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
PyObject * _obj2 = 0;
|
||||
char *_kwnames[] = { "self","pPage","strText","bSelect","imageId", NULL };
|
||||
char *_kwnames[] = { "self","page","text","select","imageId", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|ii:wxNotebook_AddPage",_kwnames,&_argo0,&_argo1,&_obj2,&_arg3,&_arg4))
|
||||
@@ -1281,7 +1280,7 @@ static PyObject *_wrap_wxNotebook_InsertPage(PyObject *self, PyObject *args, PyO
|
||||
PyObject * _argo2 = 0;
|
||||
PyObject * _obj3 = 0;
|
||||
int tempbool4 = (int) FALSE;
|
||||
char *_kwnames[] = { "self","nPage","pPage","strText","bSelect","imageId", NULL };
|
||||
char *_kwnames[] = { "self","page","page","text","select","imageId", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiOO|ii:wxNotebook_InsertPage",_kwnames,&_argo0,&_arg1,&_argo2,&_obj3,&tempbool4,&_arg5))
|
||||
@@ -1327,7 +1326,7 @@ static PyObject *_wrap_wxNotebook_GetPage(PyObject *self, PyObject *args, PyObje
|
||||
wxNotebook * _arg0;
|
||||
int _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self","nPage", NULL };
|
||||
char *_kwnames[] = { "self","page", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebook_GetPage",_kwnames,&_argo0,&_arg1))
|
||||
@@ -2541,8 +2540,7 @@ static PyObject *_wrap_wxTaskBarIcon_SetIcon(PyObject *self, PyObject *args, PyO
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxIcon_p")) {
|
||||
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxIcon_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTaskBarIcon_SetIcon. Expected _wxIcon_p.");
|
||||
return NULL;
|
||||
}
|
||||
@@ -3494,8 +3492,7 @@ static PyObject *_wrap_new_wxPyControl(PyObject *self, PyObject *args, PyObject
|
||||
return NULL;
|
||||
}
|
||||
if (_argo5) {
|
||||
if (_argo5 == Py_None) { _arg5 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo5,(void **) &_arg5,"_wxValidator_p")) {
|
||||
if (SWIG_GetPtrObj(_argo5,(void **) &_arg5,"_wxValidator_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 6 of new_wxPyControl. Expected _wxValidator_p.");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -249,9 +249,12 @@ class wxTaskBarIconPtr(wxEvtHandlerPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,windows2c=windows2c):
|
||||
if self.thisown == 1 :
|
||||
windows2c.delete_wxTaskBarIcon(self)
|
||||
def __del__(self, delfunc=windows2c.delete_wxTaskBarIcon):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def SetIcon(self, *_args, **_kwargs):
|
||||
val = apply(windows2c.wxTaskBarIcon_SetIcon,(self,) + _args, _kwargs)
|
||||
return val
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
/* Implementation : PYTHON */
|
||||
|
||||
#define SWIGPYTHON
|
||||
#include "Python.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
/* Definitions for Windows/Unix exporting */
|
||||
@@ -36,12 +38,9 @@
|
||||
# define SWIGEXPORT(a) a
|
||||
#endif
|
||||
|
||||
#include "Python.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void SWIG_MakePtr(char *, void *, char *);
|
||||
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
|
||||
extern char *SWIG_GetPtr(char *, void **, char *);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user