converted some args to return values

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6763 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2000-03-16 17:37:32 +00:00
parent 0d910be798
commit 4e0dcbb14a
3 changed files with 67 additions and 69 deletions

View File

@ -1,5 +1,5 @@
/*
* FILE : oglcanvas.cpp
* FILE : ./oglcanvas.cpp
*
* This file was automatically generated by :
* Simplified Wrapper and Interface Generator (SWIG)
@ -1098,14 +1098,20 @@ static PyObject *_wrap_wxDiagram_Snap(PyObject *self, PyObject *args, PyObject *
PyObject * _resultobj;
wxDiagram * _arg0;
double * _arg1;
double temp;
double * _arg2;
double temp0;
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
PyObject * _argo2 = 0;
char *_kwnames[] = { "self","x","y", NULL };
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxDiagram_Snap",_kwnames,&_argo0,&_argo1,&_argo2))
{
_arg1 = &temp;
}
{
_arg2 = &temp0;
}
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDiagram_Snap",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@ -1114,20 +1120,6 @@ static PyObject *_wrap_wxDiagram_Snap(PyObject *self, PyObject *args, PyObject *
return NULL;
}
}
if (_argo1) {
if (_argo1 == Py_None) { _arg1 = NULL; }
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_double_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDiagram_Snap. Expected _double_p.");
return NULL;
}
}
if (_argo2) {
if (_argo2 == Py_None) { _arg2 = NULL; }
else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_double_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxDiagram_Snap. Expected _double_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxDiagram_Snap(_arg0,_arg1,_arg2);
@ -1135,6 +1127,16 @@ static PyObject *_wrap_wxDiagram_Snap(PyObject *self, PyObject *args, PyObject *
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
{
PyObject *o;
o = PyFloat_FromDouble((double) (*_arg1));
_resultobj = t_output_helper(_resultobj, o);
}
{
PyObject *o;
o = PyFloat_FromDouble((double) (*_arg2));
_resultobj = t_output_helper(_resultobj, o);
}
return _resultobj;
}
@ -1309,17 +1311,20 @@ static PyObject *_wrap_wxPyShapeCanvas_FindShape(PyObject *self, PyObject *args,
double _arg1;
double _arg2;
int * _arg3;
int temp;
wxClassInfo * _arg4 = (wxClassInfo *) NULL;
wxPyShape * _arg5 = (wxPyShape *) NULL;
PyObject * _argo0 = 0;
PyObject * _argo3 = 0;
PyObject * _argo4 = 0;
PyObject * _argo5 = 0;
char *_kwnames[] = { "self","x1","y","attachment","info","notImage", NULL };
char *_kwnames[] = { "self","x1","y","info","notImage", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OddO|OO:wxPyShapeCanvas_FindShape",_kwnames,&_argo0,&_arg1,&_arg2,&_argo3,&_argo4,&_argo5))
{
_arg3 = &temp;
}
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Odd|OO:wxPyShapeCanvas_FindShape",_kwnames,&_argo0,&_arg1,&_arg2,&_argo4,&_argo5))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@ -1328,13 +1333,6 @@ static PyObject *_wrap_wxPyShapeCanvas_FindShape(PyObject *self, PyObject *args,
return NULL;
}
}
if (_argo3) {
if (_argo3 == Py_None) { _arg3 = NULL; }
else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_int_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxPyShapeCanvas_FindShape. Expected _int_p.");
return NULL;
}
}
if (_argo4) {
if (_argo4 == Py_None) { _arg4 = NULL; }
else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxClassInfo_p")) {
@ -1361,6 +1359,11 @@ static PyObject *_wrap_wxPyShapeCanvas_FindShape(PyObject *self, PyObject *args,
Py_INCREF(Py_None);
_resultobj = Py_None;
}
{
PyObject *o;
o = PyInt_FromLong((long) (*_arg3));
_resultobj = t_output_helper(_resultobj, o);
}
return _resultobj;
}
@ -1372,14 +1375,17 @@ static PyObject *_wrap_wxPyShapeCanvas_FindFirstSensitiveShape(PyObject *self, P
double _arg1;
double _arg2;
int * _arg3;
int temp;
int _arg4;
PyObject * _argo0 = 0;
PyObject * _argo3 = 0;
char *_kwnames[] = { "self","x1","y","attachment","op", NULL };
char *_kwnames[] = { "self","x1","y","op", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OddOi:wxPyShapeCanvas_FindFirstSensitiveShape",_kwnames,&_argo0,&_arg1,&_arg2,&_argo3,&_arg4))
{
_arg3 = &temp;
}
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oddi:wxPyShapeCanvas_FindFirstSensitiveShape",_kwnames,&_argo0,&_arg1,&_arg2,&_arg4))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@ -1388,13 +1394,6 @@ static PyObject *_wrap_wxPyShapeCanvas_FindFirstSensitiveShape(PyObject *self, P
return NULL;
}
}
if (_argo3) {
if (_argo3 == Py_None) { _arg3 = NULL; }
else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_int_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxPyShapeCanvas_FindFirstSensitiveShape. Expected _int_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxPyShape *)wxPyShapeCanvas_FindFirstSensitiveShape(_arg0,_arg1,_arg2,_arg3,_arg4);
@ -1407,6 +1406,11 @@ static PyObject *_wrap_wxPyShapeCanvas_FindFirstSensitiveShape(PyObject *self, P
Py_INCREF(Py_None);
_resultobj = Py_None;
}
{
PyObject *o;
o = PyInt_FromLong((long) (*_arg3));
_resultobj = t_output_helper(_resultobj, o);
}
return _resultobj;
}
@ -1866,14 +1870,20 @@ static PyObject *_wrap_wxPyShapeCanvas_Snap(PyObject *self, PyObject *args, PyOb
PyObject * _resultobj;
wxPyShapeCanvas * _arg0;
double * _arg1;
double temp;
double * _arg2;
double temp0;
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
PyObject * _argo2 = 0;
char *_kwnames[] = { "self","x","y", NULL };
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyShapeCanvas_Snap",_kwnames,&_argo0,&_argo1,&_argo2))
{
_arg1 = &temp;
}
{
_arg2 = &temp0;
}
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyShapeCanvas_Snap",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@ -1882,20 +1892,6 @@ static PyObject *_wrap_wxPyShapeCanvas_Snap(PyObject *self, PyObject *args, PyOb
return NULL;
}
}
if (_argo1) {
if (_argo1 == Py_None) { _arg1 = NULL; }
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_double_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShapeCanvas_Snap. Expected _double_p.");
return NULL;
}
}
if (_argo2) {
if (_argo2 == Py_None) { _arg2 = NULL; }
else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_double_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxPyShapeCanvas_Snap. Expected _double_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxPyShapeCanvas_Snap(_arg0,_arg1,_arg2);
@ -1903,6 +1899,16 @@ static PyObject *_wrap_wxPyShapeCanvas_Snap(PyObject *self, PyObject *args, PyOb
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
{
PyObject *o;
o = PyFloat_FromDouble((double) (*_arg1));
_resultobj = t_output_helper(_resultobj, o);
}
{
PyObject *o;
o = PyFloat_FromDouble((double) (*_arg2));
_resultobj = t_output_helper(_resultobj, o);
}
return _resultobj;
}
@ -2007,7 +2013,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxTreeCtrl","_wxTreeCtrl",0},
{ "_wxMask","_class_wxMask",0},
{ "_wxToolTip","_class_wxToolTip",0},
{ "_wxGrid","_class_wxGrid",0},
{ "_wxPNGHandler","_class_wxPNGHandler",0},
{ "_class_wxColourData","_wxColourData",0},
{ "_class_wxPageSetupDialogData","_wxPageSetupDialogData",0},
@ -2078,7 +2083,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxTextDataObject","_class_wxTextDataObject",0},
{ "_class_wxKeyEvent","_wxKeyEvent",0},
{ "_class_wxToolTip","_wxToolTip",0},
{ "_class_wxGrid","_wxGrid",0},
{ "_class_wxPNGHandler","_wxPNGHandler",0},
{ "_wxColour","_class_wxColour",0},
{ "_class_wxDialog","_wxDialog",0},
@ -2111,7 +2115,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxEvent","_wxEvent",0},
{ "_wxCheckListBox","_class_wxCheckListBox",0},
{ "_wxSplitterEvent","_class_wxSplitterEvent",0},
{ "_wxGridEvent","_class_wxGridEvent",0},
{ "_wxRect","_class_wxRect",0},
{ "_wxCommandEvent","_class_wxCommandEvent",0},
{ "_wxPyShapeCanvas","_class_wxPyShapeCanvas",0},
@ -2238,7 +2241,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxPoint","_wxPoint",0},
{ "_wxRealPoint","_class_wxRealPoint",0},
{ "_class_wxRadioBox","_wxRadioBox",0},
{ "_wxGridCell","_class_wxGridCell",0},
{ "_class_wxBoxSizer","_wxBoxSizer",0},
{ "_signed_short","_WXTYPE",0},
{ "_signed_short","_short",0},
@ -2375,13 +2377,11 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxGauge","_class_wxGauge",0},
{ "_class_wxCheckListBox","_wxCheckListBox",0},
{ "_class_wxBusyInfo","_wxBusyInfo",0},
{ "_class_wxGridEvent","_wxGridEvent",0},
{ "_class_wxCommandEvent","_wxCommandEvent",0},
{ "_class_wxClientDC","_wxClientDC",0},
{ "_class_wxSizeEvent","_wxSizeEvent",0},
{ "_class_wxListCtrl","_wxListCtrl",0},
{ "_wxCustomDataObject","_class_wxCustomDataObject",0},
{ "_class_wxGridCell","_wxGridCell",0},
{ "_class_wxSize","_wxSize",0},
{ "_class_wxBitmap","_wxBitmap",0},
{ "_class_wxMemoryDC","_wxMemoryDC",0},

View File

@ -91,7 +91,7 @@ public:
void SetQuickEditMode(bool mode);
void SetSnapToGrid(bool snap);
void ShowAll(bool show);
void Snap(double *x, double *y);
void Snap(double *OUTPUT, double *OUTPUT);
};
@ -125,10 +125,10 @@ public:
void AddShape(wxPyShape *shape, wxPyShape *addAfter = NULL);
// **** Need a typemap for wxClassInfo, or implement wxObject, etc.....
wxPyShape* FindShape(double x1, double y, int *attachment,
wxPyShape* FindShape(double x1, double y, int *OUTPUT,
wxClassInfo *info = NULL, wxPyShape* notImage = NULL);
wxPyShape * FindFirstSensitiveShape(double x1, double y, int *attachment, int op);
wxPyShape * FindFirstSensitiveShape(double x1, double y, int *OUTPUT, int op);
wxDiagram* GetDiagram();
bool GetQuickEditMode();
@ -147,7 +147,7 @@ public:
void Redraw(wxDC& dc);
void RemoveShape(wxPyShape *shape);
void SetDiagram(wxDiagram *diagram);
void Snap(double *x, double *y);
void Snap(double *OUTPUT, double *OUTPUT);
};

View File

@ -153,11 +153,9 @@ class wxPyShapeCanvasPtr(wxScrolledWindowPtr):
return val
def FindShape(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxPyShapeCanvas_FindShape,(self,) + _args, _kwargs)
if val: val = wxPyShapePtr(val)
return val
def FindFirstSensitiveShape(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxPyShapeCanvas_FindFirstSensitiveShape,(self,) + _args, _kwargs)
if val: val = wxPyShapePtr(val)
return val
def GetDiagram(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxPyShapeCanvas_GetDiagram,(self,) + _args, _kwargs)