SWIGged updates for wxMSW

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@18741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-01-15 01:53:18 +00:00
parent a895d61d5c
commit 86d56a0fc3
8 changed files with 51 additions and 21 deletions

View File

@@ -2199,6 +2199,34 @@ static PyObject *_wrap_wxCheckBox_GetValue(PyObject *self, PyObject *args, PyObj
return _resultobj;
}
#define wxCheckBox_IsChecked(_swigobj) (_swigobj->IsChecked())
static PyObject *_wrap_wxCheckBox_IsChecked(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxCheckBox * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCheckBox_IsChecked",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCheckBox_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCheckBox_IsChecked. Expected _wxCheckBox_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (bool )wxCheckBox_IsChecked(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxCheckBox_SetValue(_swigobj,_swigarg0) (_swigobj->SetValue(_swigarg0))
static PyObject *_wrap_wxCheckBox_SetValue(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@@ -11695,6 +11723,7 @@ static PyMethodDef controlscMethods[] = {
{ "new_wxPreChoice", (PyCFunction) _wrap_new_wxPreChoice, METH_VARARGS | METH_KEYWORDS },
{ "new_wxChoice", (PyCFunction) _wrap_new_wxChoice, METH_VARARGS | METH_KEYWORDS },
{ "wxCheckBox_SetValue", (PyCFunction) _wrap_wxCheckBox_SetValue, METH_VARARGS | METH_KEYWORDS },
{ "wxCheckBox_IsChecked", (PyCFunction) _wrap_wxCheckBox_IsChecked, METH_VARARGS | METH_KEYWORDS },
{ "wxCheckBox_GetValue", (PyCFunction) _wrap_wxCheckBox_GetValue, METH_VARARGS | METH_KEYWORDS },
{ "wxCheckBox_Create", (PyCFunction) _wrap_wxCheckBox_Create, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPreCheckBox", (PyCFunction) _wrap_new_wxPreCheckBox, METH_VARARGS | METH_KEYWORDS },

View File

@@ -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

View File

@@ -13,7 +13,6 @@ from fonts import *
from streams import *
import wx
import string
import types
def wxMemoryFSHandler_AddFile(filename, a, b=''):

View File

@@ -12675,8 +12675,7 @@ static PyObject *_wrap_wxGrid_GetSelectedRows(PyObject *self, PyObject *args, Py
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
const wxArrayInt & _result_ref = wxGrid_GetSelectedRows(_arg0);
_result = (wxArrayInt *) &_result_ref;
_result = new wxArrayInt (wxGrid_GetSelectedRows(_arg0));
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
@@ -12688,6 +12687,7 @@ static PyObject *_wrap_wxGrid_GetSelectedRows(PyObject *self, PyObject *args, Py
PyList_Append(_resultobj, val);
Py_DECREF(val);
}
delete _result;
}
return _resultobj;
}
@@ -12712,8 +12712,7 @@ static PyObject *_wrap_wxGrid_GetSelectedCols(PyObject *self, PyObject *args, Py
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
const wxArrayInt & _result_ref = wxGrid_GetSelectedCols(_arg0);
_result = (wxArrayInt *) &_result_ref;
_result = new wxArrayInt (wxGrid_GetSelectedCols(_arg0));
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
@@ -12725,6 +12724,7 @@ static PyObject *_wrap_wxGrid_GetSelectedCols(PyObject *self, PyObject *args, Py
PyList_Append(_resultobj, val);
Py_DECREF(val);
}
delete _result;
}
return _resultobj;
}

View File

@@ -15,7 +15,6 @@ from controls import *
from events import *
import wx
import string
class wxSizerItemPtr(wxObjectPtr):
def __init__(self,this):
self.this = this
@@ -235,7 +234,7 @@ class wxSizerPtr(wxObjectPtr):
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:
apply(self.AddWindow, args, kw)
@@ -243,7 +242,7 @@ class wxSizerPtr(wxObjectPtr):
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[0], wxSizerPtr):
apply(self.InsertSizer, args, kw)
else:
apply(self.InsertWindow, args, kw)
@@ -251,7 +250,7 @@ class wxSizerPtr(wxObjectPtr):
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:
apply(self.PrependWindow, args, kw)
@@ -259,7 +258,7 @@ class wxSizerPtr(wxObjectPtr):
def Remove(self, *args, **kw):
if type(args[0]) == type(1):
return apply(self.RemovePos, args, kw)
elif string.find(args[0].this, 'Sizer') != -1:
elif isinstance(args[0], wxSizerPtr):
return apply(self.RemoveSizer, args, kw)
else:
return apply(self.RemoveWindow, args, kw)
@@ -274,7 +273,7 @@ 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:
apply(self.SetItemMinSizeWindow, args)
@@ -289,19 +288,19 @@ class wxSizerPtr(wxObjectPtr):
def Show(self, *args):
if string.find(args[0].this, 'Sizer') != -1:
if isinstance(args[0], wxSizerPtr):
apply(self.ShowSizer, args)
else:
apply(self.ShowWindow, args)
def Hide(self, *args):
if string.find(args[0].this, 'Sizer') != -1:
if isinstance(args[0], wxSizerPtr):
apply(self.HideSizer, args)
else:
apply(self.HideWindow, args)
def IsShown(self, *args):
if string.find(args[0].this, 'Sizer') != -1:
if isinstance(args[0], wxSizerPtr):
return apply(self.IsShownSizer, args)
else:
return apply(self.IsShownWindow, args)

View File

@@ -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

View File

@@ -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
@@ -551,17 +551,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 isinstnace(other, wxDateSpanPtr):
return self.__sub__DS(other)
raise TypeError, 'Invalid r.h.s. type for __sub__'

View File

@@ -1549,6 +1549,7 @@ wxSystemSettings_GetSystemMetric = wxSystemSettings_GetMetric
wxGauge95 = wxGauge
wxGauge95Ptr = wxGaugePtr
wxPyAssertionError = wxc.wxPyAssertionError