mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-09-20 12:59:31 +08:00
reSWIGged
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27391 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1492,7 +1492,7 @@ class TextAttr(object):
|
||||
return _controls_.TextAttr_SetTabs(*args, **kwargs)
|
||||
|
||||
def SetLeftIndent(*args, **kwargs):
|
||||
"""SetLeftIndent(self, int indent)"""
|
||||
"""SetLeftIndent(self, int indent, int subIndent=0)"""
|
||||
return _controls_.TextAttr_SetLeftIndent(*args, **kwargs)
|
||||
|
||||
def SetRightIndent(*args, **kwargs):
|
||||
@@ -1559,6 +1559,10 @@ class TextAttr(object):
|
||||
"""GetLeftIndent(self) -> long"""
|
||||
return _controls_.TextAttr_GetLeftIndent(*args, **kwargs)
|
||||
|
||||
def GetLeftSubIndent(*args, **kwargs):
|
||||
"""GetLeftSubIndent(self) -> long"""
|
||||
return _controls_.TextAttr_GetLeftSubIndent(*args, **kwargs)
|
||||
|
||||
def GetRightIndent(*args, **kwargs):
|
||||
"""GetRightIndent(self) -> long"""
|
||||
return _controls_.TextAttr_GetRightIndent(*args, **kwargs)
|
||||
|
||||
@@ -895,6 +895,7 @@ PyObject *wxPyTreeCtrl_GetSelections(wxPyTreeCtrl *self){
|
||||
wxTreeItemId *tii = new wxTreeItemId(array.Item(x));
|
||||
PyObject* item = wxPyConstructObject((void*)tii, wxT("wxTreeItemId"), True);
|
||||
PyList_Append(rval, item);
|
||||
Py_DECREF(item);
|
||||
}
|
||||
wxPyEndBlockThreads(blocked);
|
||||
return rval;
|
||||
@@ -7234,20 +7235,26 @@ static PyObject *_wrap_TextAttr_SetLeftIndent(PyObject *self, PyObject *args, Py
|
||||
PyObject *resultobj;
|
||||
wxTextAttr *arg1 = (wxTextAttr *) 0 ;
|
||||
int arg2 ;
|
||||
int arg3 = (int) 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
PyObject * obj2 = 0 ;
|
||||
char *kwnames[] = {
|
||||
(char *) "self",(char *) "indent", NULL
|
||||
(char *) "self",(char *) "indent",(char *) "subIndent", NULL
|
||||
};
|
||||
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TextAttr_SetLeftIndent",kwnames,&obj0,&obj1)) goto fail;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:TextAttr_SetLeftIndent",kwnames,&obj0,&obj1,&obj2)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxTextAttr,
|
||||
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
|
||||
arg2 = (int) SWIG_AsInt(obj1);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
if (obj2) {
|
||||
arg3 = (int) SWIG_AsInt(obj2);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
(arg1)->SetLeftIndent(arg2);
|
||||
(arg1)->SetLeftIndent(arg2,arg3);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
@@ -7724,6 +7731,32 @@ static PyObject *_wrap_TextAttr_GetLeftIndent(PyObject *self, PyObject *args, Py
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_TextAttr_GetLeftSubIndent(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
wxTextAttr *arg1 = (wxTextAttr *) 0 ;
|
||||
long result;
|
||||
PyObject * obj0 = 0 ;
|
||||
char *kwnames[] = {
|
||||
(char *) "self", NULL
|
||||
};
|
||||
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:TextAttr_GetLeftSubIndent",kwnames,&obj0)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxTextAttr,
|
||||
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
result = (long)((wxTextAttr const *)arg1)->GetLeftSubIndent();
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
resultobj = SWIG_FromLong((long)result);
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_TextAttr_GetRightIndent(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
wxTextAttr *arg1 = (wxTextAttr *) 0 ;
|
||||
@@ -31149,6 +31182,7 @@ static PyMethodDef SwigMethods[] = {
|
||||
{ (char *)"TextAttr_GetAlignment", (PyCFunction) _wrap_TextAttr_GetAlignment, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"TextAttr_GetTabs", (PyCFunction) _wrap_TextAttr_GetTabs, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"TextAttr_GetLeftIndent", (PyCFunction) _wrap_TextAttr_GetLeftIndent, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"TextAttr_GetLeftSubIndent", (PyCFunction) _wrap_TextAttr_GetLeftSubIndent, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"TextAttr_GetRightIndent", (PyCFunction) _wrap_TextAttr_GetRightIndent, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"TextAttr_GetFlags", (PyCFunction) _wrap_TextAttr_GetFlags, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"TextAttr_IsDefault", (PyCFunction) _wrap_TextAttr_IsDefault, METH_VARARGS | METH_KEYWORDS },
|
||||
|
||||
@@ -2322,10 +2322,13 @@ def Image_GetImageExtWildcard(*args, **kwargs):
|
||||
"""Image_GetImageExtWildcard() -> String"""
|
||||
return _core_.Image_GetImageExtWildcard(*args, **kwargs)
|
||||
|
||||
def InitAllImageHandlers():
|
||||
"""
|
||||
The former functionality of InitAllImageHanders is now done internal to
|
||||
the _core_ extension module and so this function has become a simple NOP.
|
||||
"""
|
||||
pass
|
||||
|
||||
def InitAllImageHandlers(*args, **kwargs):
|
||||
"""InitAllImageHandlers()"""
|
||||
return _core_.InitAllImageHandlers(*args, **kwargs)
|
||||
IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES
|
||||
IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM
|
||||
BMP_24BPP = _core_.BMP_24BPP
|
||||
@@ -5198,7 +5201,6 @@ class PySimpleApp(wx.App):
|
||||
wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt)
|
||||
|
||||
def OnInit(self):
|
||||
wx.InitAllImageHandlers()
|
||||
return True
|
||||
|
||||
|
||||
|
||||
@@ -11275,27 +11275,6 @@ static PyObject * Image_swigregister(PyObject *self, PyObject *args) {
|
||||
Py_INCREF(obj);
|
||||
return Py_BuildValue((char *)"");
|
||||
}
|
||||
static PyObject *_wrap_InitAllImageHandlers(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
char *kwnames[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":InitAllImageHandlers",kwnames)) goto fail;
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
wxInitAllImageHandlers();
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
Py_INCREF(Py_None); resultobj = Py_None;
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static int _wrap_NullImage_set(PyObject *_val) {
|
||||
PyErr_SetString(PyExc_TypeError,"Variable NullImage is read-only.");
|
||||
return 1;
|
||||
@@ -40459,7 +40438,6 @@ static PyMethodDef SwigMethods[] = {
|
||||
{ (char *)"Image_ConvertToBitmap", (PyCFunction) _wrap_Image_ConvertToBitmap, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"Image_ConvertToMonoBitmap", (PyCFunction) _wrap_Image_ConvertToMonoBitmap, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"Image_swigregister", Image_swigregister, METH_VARARGS },
|
||||
{ (char *)"InitAllImageHandlers", (PyCFunction) _wrap_InitAllImageHandlers, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"new_BMPHandler", (PyCFunction) _wrap_new_BMPHandler, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"BMPHandler_swigregister", BMPHandler_swigregister, METH_VARARGS },
|
||||
{ (char *)"new_ICOHandler", (PyCFunction) _wrap_new_ICOHandler, METH_VARARGS | METH_KEYWORDS },
|
||||
|
||||
@@ -2302,16 +2302,7 @@ def EncodingConverter_CanConvert(*args, **kwargs):
|
||||
return _gdi_.EncodingConverter_CanConvert(*args, **kwargs)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# wxGTK sets the locale when initialized. Doing this at the Python
|
||||
# level should set it up to match what GTK is doing at the C level.
|
||||
if wx.Platform == "__WXGTK__":
|
||||
try:
|
||||
import locale
|
||||
locale.setlocale(locale.LC_ALL, "")
|
||||
except:
|
||||
pass
|
||||
|
||||
# On MSW add the directory where the wxWindows catalogs were installed
|
||||
# On MSW add the directory where the wxWidgets catalogs were installed
|
||||
# to the default catalog path.
|
||||
if wx.Platform == "__WXMSW__":
|
||||
import os
|
||||
|
||||
@@ -535,8 +535,11 @@ PyObject *wxPen_GetDashes(wxPen *self){
|
||||
int count = self->GetDashes(&dashes);
|
||||
bool blocked = wxPyBeginBlockThreads();
|
||||
PyObject* retval = PyList_New(0);
|
||||
for (int x=0; x<count; x++)
|
||||
PyList_Append(retval, PyInt_FromLong(dashes[x]));
|
||||
for (int x=0; x<count; x++) {
|
||||
PyObject* pyint = PyInt_FromLong(dashes[x]);
|
||||
PyList_Append(retval, pyint);
|
||||
Py_DECREF(pyint);
|
||||
}
|
||||
wxPyEndBlockThreads(blocked);
|
||||
return retval;
|
||||
}
|
||||
|
||||
+345
-36
File diff suppressed because it is too large
Load Diff
+197
-75
@@ -1268,6 +1268,85 @@ bool wxDateSpan___ne__(wxDateSpan *self,wxDateSpan const *other){ return other ?
|
||||
|
||||
#include <wx/dataobj.h>
|
||||
|
||||
PyObject *wxDataObject_GetAllFormats(wxDataObject *self,wxDataObject::Direction dir){
|
||||
size_t count = self->GetFormatCount(dir);
|
||||
wxDataFormat* formats = new wxDataFormat[count];
|
||||
self->GetAllFormats(formats, dir);
|
||||
|
||||
bool blocked = wxPyBeginBlockThreads();
|
||||
PyObject* list = PyList_New(count);
|
||||
for (size_t i=0; i<count; i++) {
|
||||
wxDataFormat* format = new wxDataFormat(formats[i]);
|
||||
PyObject* obj = wxPyConstructObject((void*)format, wxT("wxDataFormat"), True);
|
||||
PyList_Append(list, obj);
|
||||
Py_DECREF(obj);
|
||||
}
|
||||
wxPyEndBlockThreads(blocked);
|
||||
delete [] formats;
|
||||
return list;
|
||||
}
|
||||
PyObject *wxDataObject_GetDataHere(wxDataObject *self,wxDataFormat const &format){
|
||||
PyObject* rval = NULL;
|
||||
size_t size = self->GetDataSize(format);
|
||||
bool blocked = wxPyBeginBlockThreads();
|
||||
if (size) {
|
||||
char* buf = new char[size];
|
||||
if (self->GetDataHere(format, buf))
|
||||
rval = PyString_FromStringAndSize(buf, size);
|
||||
delete [] buf;
|
||||
}
|
||||
if (! rval) {
|
||||
rval = Py_None;
|
||||
Py_INCREF(rval);
|
||||
}
|
||||
wxPyEndBlockThreads(blocked);
|
||||
return rval;
|
||||
}
|
||||
bool wxDataObject_SetData(wxDataObject *self,wxDataFormat const &format,PyObject *data){
|
||||
bool rval;
|
||||
bool blocked = wxPyBeginBlockThreads();
|
||||
if (PyString_Check(data)) {
|
||||
rval = self->SetData(format, PyString_Size(data), PyString_AsString(data));
|
||||
}
|
||||
else {
|
||||
// raise a TypeError if not a string
|
||||
PyErr_SetString(PyExc_TypeError, "String expected.");
|
||||
rval = False;
|
||||
}
|
||||
wxPyEndBlockThreads(blocked);
|
||||
return rval;
|
||||
}
|
||||
PyObject *wxDataObjectSimple_GetDataHere(wxDataObjectSimple *self){
|
||||
PyObject* rval = NULL;
|
||||
size_t size = self->GetDataSize();
|
||||
bool blocked = wxPyBeginBlockThreads();
|
||||
if (size) {
|
||||
char* buf = new char[size];
|
||||
if (self->GetDataHere(buf))
|
||||
rval = PyString_FromStringAndSize(buf, size);
|
||||
delete [] buf;
|
||||
}
|
||||
if (! rval) {
|
||||
rval = Py_None;
|
||||
Py_INCREF(rval);
|
||||
}
|
||||
wxPyEndBlockThreads(blocked);
|
||||
return rval;
|
||||
}
|
||||
bool wxDataObjectSimple_SetData(wxDataObjectSimple *self,PyObject *data){
|
||||
bool rval;
|
||||
bool blocked = wxPyBeginBlockThreads();
|
||||
if (PyString_Check(data)) {
|
||||
rval = self->SetData(PyString_Size(data), PyString_AsString(data));
|
||||
}
|
||||
else {
|
||||
// raise a TypeError if not a string
|
||||
PyErr_SetString(PyExc_TypeError, "String expected.");
|
||||
rval = False;
|
||||
}
|
||||
wxPyEndBlockThreads(blocked);
|
||||
return rval;
|
||||
}
|
||||
// Create a new class for wxPython to use
|
||||
class wxPyDataObjectSimple : public wxDataObjectSimple {
|
||||
public:
|
||||
@@ -1362,7 +1441,7 @@ wxBitmap wxPyBitmapDataObject::GetBitmap() const {
|
||||
wxPyEndBlockThreads(blocked);
|
||||
return *rval;
|
||||
}
|
||||
|
||||
|
||||
void wxPyBitmapDataObject::SetBitmap(const wxBitmap& bitmap) {
|
||||
bool blocked = wxPyBeginBlockThreads();
|
||||
if (wxPyCBH_findCallback(m_myInst, "SetBitmap")) {
|
||||
@@ -1373,28 +1452,25 @@ void wxPyBitmapDataObject::SetBitmap(const wxBitmap& bitmap) {
|
||||
wxPyEndBlockThreads(blocked);
|
||||
}
|
||||
|
||||
void wxCustomDataObject_TakeData(wxCustomDataObject *self,PyObject *data){
|
||||
if (PyString_Check(data)) {
|
||||
// for Python we just call SetData here since we always need it to make a copy.
|
||||
self->SetData(PyString_Size(data), PyString_AsString(data));
|
||||
}
|
||||
else {
|
||||
// raise a TypeError if not a string
|
||||
PyErr_SetString(PyExc_TypeError, "String expected.");
|
||||
}
|
||||
}
|
||||
bool wxCustomDataObject_SetData(wxCustomDataObject *self,PyObject *data){
|
||||
bool rval;
|
||||
bool blocked = wxPyBeginBlockThreads();
|
||||
if (PyString_Check(data)) {
|
||||
return self->SetData(PyString_Size(data), PyString_AsString(data));
|
||||
rval = self->SetData(PyString_Size(data), PyString_AsString(data));
|
||||
}
|
||||
else {
|
||||
// raise a TypeError if not a string
|
||||
PyErr_SetString(PyExc_TypeError, "String expected.");
|
||||
return False;
|
||||
rval = False;
|
||||
}
|
||||
wxPyEndBlockThreads(blocked);
|
||||
return rval;
|
||||
}
|
||||
PyObject *wxCustomDataObject_GetData(wxCustomDataObject *self){
|
||||
return PyString_FromStringAndSize((char*)self->GetData(), self->GetSize());
|
||||
PyObject* obj;
|
||||
bool blocked = wxPyBeginBlockThreads();
|
||||
obj = PyString_FromStringAndSize((char*)self->GetData(), self->GetSize());
|
||||
wxPyEndBlockThreads(blocked);
|
||||
}
|
||||
|
||||
#include <wx/metafile.h>
|
||||
@@ -1489,6 +1565,7 @@ PyObject *wxDisplay_GetModes(wxDisplay *self,wxVideoMode const &mode){
|
||||
wxVideoMode* m = new wxVideoMode(arr.Item(i));
|
||||
PyObject* pyObj = wxPyConstructObject(m, wxT("wxVideoMode"), true);
|
||||
PyList_Append(pyList, pyObj);
|
||||
Py_DECREF(pyObj);
|
||||
}
|
||||
wxPyEndBlockThreads(blocked);
|
||||
return pyList;
|
||||
@@ -24371,32 +24448,29 @@ static PyObject *_wrap_DataObject_GetDataSize(PyObject *self, PyObject *args, Py
|
||||
static PyObject *_wrap_DataObject_GetAllFormats(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
wxDataObject *arg1 = (wxDataObject *) 0 ;
|
||||
wxDataFormat *arg2 = (wxDataFormat *) 0 ;
|
||||
int arg3 = (int) wxDataObject::Get ;
|
||||
int arg2 = (int) wxDataObject::Get ;
|
||||
PyObject *result;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
PyObject * obj2 = 0 ;
|
||||
char *kwnames[] = {
|
||||
(char *) "self",(char *) "formats",(char *) "dir", NULL
|
||||
(char *) "self",(char *) "dir", NULL
|
||||
};
|
||||
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:DataObject_GetAllFormats",kwnames,&obj0,&obj1,&obj2)) goto fail;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:DataObject_GetAllFormats",kwnames,&obj0,&obj1)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxDataObject,
|
||||
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
|
||||
if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxDataFormat,
|
||||
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
|
||||
if (obj2) {
|
||||
arg3 = (wxDataObject::Direction) SWIG_AsInt(obj2);
|
||||
if (obj1) {
|
||||
arg2 = (wxDataObject::Direction) SWIG_AsInt(obj1);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
((wxDataObject const *)arg1)->GetAllFormats(arg2,(wxDataObject::Direction )arg3);
|
||||
result = (PyObject *)wxDataObject_GetAllFormats(arg1,(wxDataObject::Direction )arg2);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
Py_INCREF(Py_None); resultobj = Py_None;
|
||||
resultobj = result;
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
@@ -24407,16 +24481,14 @@ static PyObject *_wrap_DataObject_GetDataHere(PyObject *self, PyObject *args, Py
|
||||
PyObject *resultobj;
|
||||
wxDataObject *arg1 = (wxDataObject *) 0 ;
|
||||
wxDataFormat *arg2 = 0 ;
|
||||
void *arg3 = (void *) 0 ;
|
||||
bool result;
|
||||
PyObject *result;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
PyObject * obj2 = 0 ;
|
||||
char *kwnames[] = {
|
||||
(char *) "self",(char *) "format",(char *) "buf", NULL
|
||||
(char *) "self",(char *) "format", NULL
|
||||
};
|
||||
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:DataObject_GetDataHere",kwnames,&obj0,&obj1,&obj2)) goto fail;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:DataObject_GetDataHere",kwnames,&obj0,&obj1)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxDataObject,
|
||||
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
|
||||
if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxDataFormat,
|
||||
@@ -24426,17 +24498,14 @@ static PyObject *_wrap_DataObject_GetDataHere(PyObject *self, PyObject *args, Py
|
||||
PyErr_SetString(PyExc_TypeError,"null reference");
|
||||
SWIG_fail;
|
||||
}
|
||||
if ((SWIG_ConvertPtr(obj2,&arg3,0,SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
result = (bool)((wxDataObject const *)arg1)->GetDataHere((wxDataFormat const &)*arg2,arg3);
|
||||
result = (PyObject *)wxDataObject_GetDataHere(arg1,(wxDataFormat const &)*arg2);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
{
|
||||
resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
|
||||
}
|
||||
resultobj = result;
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
@@ -24447,18 +24516,16 @@ static PyObject *_wrap_DataObject_SetData(PyObject *self, PyObject *args, PyObje
|
||||
PyObject *resultobj;
|
||||
wxDataObject *arg1 = (wxDataObject *) 0 ;
|
||||
wxDataFormat *arg2 = 0 ;
|
||||
size_t arg3 ;
|
||||
void *arg4 = (void *) 0 ;
|
||||
PyObject *arg3 = (PyObject *) 0 ;
|
||||
bool result;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
PyObject * obj2 = 0 ;
|
||||
PyObject * obj3 = 0 ;
|
||||
char *kwnames[] = {
|
||||
(char *) "self",(char *) "format",(char *) "len",(char *) "buf", NULL
|
||||
(char *) "self",(char *) "format",(char *) "data", NULL
|
||||
};
|
||||
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:DataObject_SetData",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:DataObject_SetData",kwnames,&obj0,&obj1,&obj2)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxDataObject,
|
||||
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
|
||||
if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxDataFormat,
|
||||
@@ -24468,12 +24535,10 @@ static PyObject *_wrap_DataObject_SetData(PyObject *self, PyObject *args, PyObje
|
||||
PyErr_SetString(PyExc_TypeError,"null reference");
|
||||
SWIG_fail;
|
||||
}
|
||||
arg3 = (size_t) SWIG_AsUnsignedLong(obj2);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
if ((SWIG_ConvertPtr(obj3,&arg4,0,SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
|
||||
arg3 = obj2;
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
result = (bool)(arg1)->SetData((wxDataFormat const &)*arg2,arg3,(void const *)arg4);
|
||||
result = (bool)wxDataObject_SetData(arg1,(wxDataFormat const &)*arg2,arg3);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
@@ -24591,6 +24656,89 @@ static PyObject *_wrap_DataObjectSimple_SetFormat(PyObject *self, PyObject *args
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_DataObjectSimple_GetDataSize(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
wxDataObjectSimple *arg1 = (wxDataObjectSimple *) 0 ;
|
||||
size_t result;
|
||||
PyObject * obj0 = 0 ;
|
||||
char *kwnames[] = {
|
||||
(char *) "self", NULL
|
||||
};
|
||||
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:DataObjectSimple_GetDataSize",kwnames,&obj0)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxDataObjectSimple,
|
||||
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
result = (size_t)((wxDataObjectSimple const *)arg1)->GetDataSize();
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
resultobj = SWIG_FromUnsignedLong((unsigned long)result);
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_DataObjectSimple_GetDataHere(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
wxDataObjectSimple *arg1 = (wxDataObjectSimple *) 0 ;
|
||||
PyObject *result;
|
||||
PyObject * obj0 = 0 ;
|
||||
char *kwnames[] = {
|
||||
(char *) "self", NULL
|
||||
};
|
||||
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:DataObjectSimple_GetDataHere",kwnames,&obj0)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxDataObjectSimple,
|
||||
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
result = (PyObject *)wxDataObjectSimple_GetDataHere(arg1);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
resultobj = result;
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_DataObjectSimple_SetData(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
wxDataObjectSimple *arg1 = (wxDataObjectSimple *) 0 ;
|
||||
PyObject *arg2 = (PyObject *) 0 ;
|
||||
bool result;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
char *kwnames[] = {
|
||||
(char *) "self",(char *) "data", NULL
|
||||
};
|
||||
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:DataObjectSimple_SetData",kwnames,&obj0,&obj1)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxDataObjectSimple,
|
||||
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
|
||||
arg2 = obj1;
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
result = (bool)wxDataObjectSimple_SetData(arg1,arg2);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
{
|
||||
resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
|
||||
}
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static PyObject * DataObjectSimple_swigregister(PyObject *self, PyObject *args) {
|
||||
PyObject *obj;
|
||||
if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
|
||||
@@ -24696,7 +24844,7 @@ static PyObject *_wrap_DataObjectComposite_Add(PyObject *self, PyObject *args, P
|
||||
PyObject *resultobj;
|
||||
wxDataObjectComposite *arg1 = (wxDataObjectComposite *) 0 ;
|
||||
wxDataObjectSimple *arg2 = (wxDataObjectSimple *) 0 ;
|
||||
int arg3 = (int) False ;
|
||||
bool arg3 = (bool) False ;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
PyObject * obj2 = 0 ;
|
||||
@@ -24710,7 +24858,7 @@ static PyObject *_wrap_DataObjectComposite_Add(PyObject *self, PyObject *args, P
|
||||
if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxDataObjectSimple,
|
||||
SWIG_POINTER_EXCEPTION | SWIG_POINTER_DISOWN)) == -1) SWIG_fail;
|
||||
if (obj2) {
|
||||
arg3 = (int) SWIG_AsInt(obj2);
|
||||
arg3 = (bool) SWIG_AsBool(obj2);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
{
|
||||
@@ -25272,34 +25420,6 @@ static PyObject *_wrap_new_CustomDataObject(PyObject *self, PyObject *args, PyOb
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_CustomDataObject_TakeData(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
wxCustomDataObject *arg1 = (wxCustomDataObject *) 0 ;
|
||||
PyObject *arg2 = (PyObject *) 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
char *kwnames[] = {
|
||||
(char *) "self",(char *) "data", NULL
|
||||
};
|
||||
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:CustomDataObject_TakeData",kwnames,&obj0,&obj1)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxCustomDataObject,
|
||||
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
|
||||
arg2 = obj1;
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
wxCustomDataObject_TakeData(arg1,arg2);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
Py_INCREF(Py_None); resultobj = Py_None;
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_CustomDataObject_SetData(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
wxCustomDataObject *arg1 = (wxCustomDataObject *) 0 ;
|
||||
@@ -28678,6 +28798,9 @@ static PyMethodDef SwigMethods[] = {
|
||||
{ (char *)"new_DataObjectSimple", (PyCFunction) _wrap_new_DataObjectSimple, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"DataObjectSimple_GetFormat", (PyCFunction) _wrap_DataObjectSimple_GetFormat, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"DataObjectSimple_SetFormat", (PyCFunction) _wrap_DataObjectSimple_SetFormat, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"DataObjectSimple_GetDataSize", (PyCFunction) _wrap_DataObjectSimple_GetDataSize, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"DataObjectSimple_GetDataHere", (PyCFunction) _wrap_DataObjectSimple_GetDataHere, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"DataObjectSimple_SetData", (PyCFunction) _wrap_DataObjectSimple_SetData, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"DataObjectSimple_swigregister", DataObjectSimple_swigregister, METH_VARARGS },
|
||||
{ (char *)"new_PyDataObjectSimple", (PyCFunction) _wrap_new_PyDataObjectSimple, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"PyDataObjectSimple__setCallbackInfo", (PyCFunction) _wrap_PyDataObjectSimple__setCallbackInfo, METH_VARARGS | METH_KEYWORDS },
|
||||
@@ -28705,7 +28828,6 @@ static PyMethodDef SwigMethods[] = {
|
||||
{ (char *)"FileDataObject_AddFile", (PyCFunction) _wrap_FileDataObject_AddFile, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"FileDataObject_swigregister", FileDataObject_swigregister, METH_VARARGS },
|
||||
{ (char *)"new_CustomDataObject", (PyCFunction) _wrap_new_CustomDataObject, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"CustomDataObject_TakeData", (PyCFunction) _wrap_CustomDataObject_TakeData, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"CustomDataObject_SetData", (PyCFunction) _wrap_CustomDataObject_SetData, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"CustomDataObject_GetSize", (PyCFunction) _wrap_CustomDataObject_GetSize, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"CustomDataObject_GetData", (PyCFunction) _wrap_CustomDataObject_GetData, METH_VARARGS | METH_KEYWORDS },
|
||||
|
||||
@@ -1227,6 +1227,14 @@ class Grid(_windows.ScrolledWindow):
|
||||
del newobj.thisown
|
||||
self._setOORInfo(self)
|
||||
|
||||
def Create(*args, **kwargs):
|
||||
"""
|
||||
Create(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
|
||||
long style=WANTS_CHARS,
|
||||
String name=PanelNameStr) -> bool
|
||||
"""
|
||||
return _grid.Grid_Create(*args, **kwargs)
|
||||
|
||||
wxGridSelectCells = _grid.Grid_wxGridSelectCells
|
||||
wxGridSelectRows = _grid.Grid_wxGridSelectRows
|
||||
wxGridSelectColumns = _grid.Grid_wxGridSelectColumns
|
||||
@@ -2014,6 +2022,13 @@ class GridPtr(Grid):
|
||||
self.__class__ = Grid
|
||||
_grid.Grid_swigregister(GridPtr)
|
||||
|
||||
def PreGrid(*args, **kwargs):
|
||||
"""PreGrid() -> Grid"""
|
||||
val = _grid.new_PreGrid(*args, **kwargs)
|
||||
val.thisown = 1
|
||||
self._setOORInfo(self)
|
||||
return val
|
||||
|
||||
def Grid_GetClassDefaultAttributes(*args, **kwargs):
|
||||
"""
|
||||
Grid_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
|
||||
|
||||
@@ -8091,6 +8091,111 @@ static PyObject *_wrap_new_Grid(PyObject *self, PyObject *args, PyObject *kwargs
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_new_PreGrid(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
wxGrid *result;
|
||||
char *kwnames[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":new_PreGrid",kwnames)) goto fail;
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
result = (wxGrid *)new wxGrid();
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
{
|
||||
resultobj = wxPyMake_wxObject(result);
|
||||
}
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_Grid_Create(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
wxGrid *arg1 = (wxGrid *) 0 ;
|
||||
wxWindow *arg2 = (wxWindow *) 0 ;
|
||||
int arg3 ;
|
||||
wxPoint const &arg4_defvalue = wxDefaultPosition ;
|
||||
wxPoint *arg4 = (wxPoint *) &arg4_defvalue ;
|
||||
wxSize const &arg5_defvalue = wxDefaultSize ;
|
||||
wxSize *arg5 = (wxSize *) &arg5_defvalue ;
|
||||
long arg6 = (long) wxWANTS_CHARS ;
|
||||
wxString const &arg7_defvalue = wxPyPanelNameStr ;
|
||||
wxString *arg7 = (wxString *) &arg7_defvalue ;
|
||||
bool result;
|
||||
wxPoint temp4 ;
|
||||
wxSize temp5 ;
|
||||
bool temp7 = False ;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
PyObject * obj2 = 0 ;
|
||||
PyObject * obj3 = 0 ;
|
||||
PyObject * obj4 = 0 ;
|
||||
PyObject * obj5 = 0 ;
|
||||
PyObject * obj6 = 0 ;
|
||||
char *kwnames[] = {
|
||||
(char *) "self",(char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL
|
||||
};
|
||||
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:Grid_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxGrid,
|
||||
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
|
||||
if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow,
|
||||
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
|
||||
arg3 = (int) SWIG_AsInt(obj2);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
if (obj3) {
|
||||
{
|
||||
arg4 = &temp4;
|
||||
if ( ! wxPoint_helper(obj3, &arg4)) SWIG_fail;
|
||||
}
|
||||
}
|
||||
if (obj4) {
|
||||
{
|
||||
arg5 = &temp5;
|
||||
if ( ! wxSize_helper(obj4, &arg5)) SWIG_fail;
|
||||
}
|
||||
}
|
||||
if (obj5) {
|
||||
arg6 = (long) SWIG_AsLong(obj5);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
if (obj6) {
|
||||
{
|
||||
arg7 = wxString_in_helper(obj6);
|
||||
if (arg7 == NULL) SWIG_fail;
|
||||
temp7 = True;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
result = (bool)(arg1)->Create(arg2,arg3,(wxPoint const &)*arg4,(wxSize const &)*arg5,arg6,(wxString const &)*arg7);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
{
|
||||
resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
|
||||
}
|
||||
{
|
||||
if (temp7)
|
||||
delete arg7;
|
||||
}
|
||||
return resultobj;
|
||||
fail:
|
||||
{
|
||||
if (temp7)
|
||||
delete arg7;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_Grid_CreateGrid(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
wxGrid *arg1 = (wxGrid *) 0 ;
|
||||
@@ -15700,6 +15805,8 @@ static PyMethodDef SwigMethods[] = {
|
||||
{ (char *)"GridCellCoords_Get", (PyCFunction) _wrap_GridCellCoords_Get, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"GridCellCoords_swigregister", GridCellCoords_swigregister, METH_VARARGS },
|
||||
{ (char *)"new_Grid", (PyCFunction) _wrap_new_Grid, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"new_PreGrid", (PyCFunction) _wrap_new_PreGrid, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"Grid_Create", (PyCFunction) _wrap_Grid_Create, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"Grid_CreateGrid", (PyCFunction) _wrap_Grid_CreateGrid, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"Grid_SetSelectionMode", (PyCFunction) _wrap_Grid_SetSelectionMode, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"Grid_GetSelectionMode", (PyCFunction) _wrap_Grid_GetSelectionMode, METH_VARARGS | METH_KEYWORDS },
|
||||
|
||||
Reference in New Issue
Block a user