Various tweaks, fixes, and additions

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11203 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2001-07-28 03:29:34 +00:00
parent 3a0958b165
commit 10be44acb0
5 changed files with 126 additions and 31 deletions

View File

@ -467,6 +467,12 @@ class wxListCtrlPtr(wxControlPtr):
return val
def __repr__(self):
return "<C wxListCtrl instance at %s>" % (self.this,)
def GetItem(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetItem,(self,) + _args, _kwargs)
val.thisown = 1
return val
class wxListCtrl(wxListCtrlPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(controls2c.new_wxListCtrl,_args,_kwargs)

View File

@ -741,33 +741,6 @@ static PyObject *_wrap_wxHtmlTag_GetAllParams(PyObject *self, PyObject *args, Py
return _resultobj;
}
#define wxHtmlTag_IsEnding(_swigobj) (_swigobj->IsEnding())
static PyObject *_wrap_wxHtmlTag_IsEnding(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxHtmlTag * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlTag_IsEnding",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlTag_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlTag_IsEnding. Expected _wxHtmlTag_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxHtmlTag_IsEnding(_arg0);
wxPy_END_ALLOW_THREADS;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxHtmlTag_HasEnding(_swigobj) (_swigobj->HasEnding())
static PyObject *_wrap_wxHtmlTag_HasEnding(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@ -6240,7 +6213,6 @@ static PyMethodDef htmlcMethods[] = {
{ "wxHtmlTag_GetEndPos1", (PyCFunction) _wrap_wxHtmlTag_GetEndPos1, METH_VARARGS | METH_KEYWORDS },
{ "wxHtmlTag_GetBeginPos", (PyCFunction) _wrap_wxHtmlTag_GetBeginPos, METH_VARARGS | METH_KEYWORDS },
{ "wxHtmlTag_HasEnding", (PyCFunction) _wrap_wxHtmlTag_HasEnding, METH_VARARGS | METH_KEYWORDS },
{ "wxHtmlTag_IsEnding", (PyCFunction) _wrap_wxHtmlTag_IsEnding, METH_VARARGS | METH_KEYWORDS },
{ "wxHtmlTag_GetAllParams", (PyCFunction) _wrap_wxHtmlTag_GetAllParams, METH_VARARGS | METH_KEYWORDS },
{ "wxHtmlTag_GetParam", (PyCFunction) _wrap_wxHtmlTag_GetParam, METH_VARARGS | METH_KEYWORDS },
{ "wxHtmlTag_HasParam", (PyCFunction) _wrap_wxHtmlTag_HasParam, METH_VARARGS | METH_KEYWORDS },

View File

@ -90,9 +90,6 @@ class wxHtmlTagPtr(wxObjectPtr):
def GetAllParams(self, *_args, **_kwargs):
val = apply(htmlc.wxHtmlTag_GetAllParams,(self,) + _args, _kwargs)
return val
def IsEnding(self, *_args, **_kwargs):
val = apply(htmlc.wxHtmlTag_IsEnding,(self,) + _args, _kwargs)
return val
def HasEnding(self, *_args, **_kwargs):
val = apply(htmlc.wxHtmlTag_HasEnding,(self,) + _args, _kwargs)
return val

View File

@ -5213,6 +5213,62 @@ static PyObject *_wrap_wxWindow_GetCaret(PyObject *self, PyObject *args, PyObjec
return _resultobj;
}
#define wxWindow_Freeze(_swigobj) (_swigobj->Freeze())
static PyObject *_wrap_wxWindow_Freeze(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxWindow * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_Freeze",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Freeze. Expected _wxWindow_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxWindow_Freeze(_arg0);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxWindow_Thaw(_swigobj) (_swigobj->Thaw())
static PyObject *_wrap_wxWindow_Thaw(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxWindow * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_Thaw",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Thaw. Expected _wxWindow_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxWindow_Thaw(_arg0);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
static void *SwigwxPanelTowxWindow(void *ptr) {
wxPanel *src;
wxWindow *dest;
@ -8533,6 +8589,58 @@ static PyObject *_wrap_wxMenuBar_GetLabelTop(PyObject *self, PyObject *args, PyO
return _resultobj;
}
#define wxMenuBar_FindMenu(_swigobj,_swigarg0) (_swigobj->FindMenu(_swigarg0))
static PyObject *_wrap_wxMenuBar_FindMenu(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
int _result;
wxMenuBar * _arg0;
wxString * _arg1;
PyObject * _argo0 = 0;
PyObject * _obj1 = 0;
char *_kwnames[] = { "self","title", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxMenuBar_FindMenu",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMenuBar_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_FindMenu. Expected _wxMenuBar_p.");
return NULL;
}
}
{
#if PYTHON_API_VERSION >= 1009
char* tmpPtr; int tmpSize;
if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
return NULL;
_arg1 = new wxString(tmpPtr, tmpSize);
#else
if (!PyString_Check(_obj1)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
_arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
#endif
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (int )wxMenuBar_FindMenu(_arg0,*_arg1);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
{
if (_obj1)
delete _arg1;
}
return _resultobj;
}
#define wxMenuBar_FindMenuItem(_swigobj,_swigarg0,_swigarg1) (_swigobj->FindMenuItem(_swigarg0,_swigarg1))
static PyObject *_wrap_wxMenuBar_FindMenuItem(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@ -9803,6 +9911,7 @@ static PyMethodDef windowscMethods[] = {
{ "wxMenuBar_Enable", (PyCFunction) _wrap_wxMenuBar_Enable, METH_VARARGS | METH_KEYWORDS },
{ "wxMenuBar_FindItemById", (PyCFunction) _wrap_wxMenuBar_FindItemById, METH_VARARGS | METH_KEYWORDS },
{ "wxMenuBar_FindMenuItem", (PyCFunction) _wrap_wxMenuBar_FindMenuItem, METH_VARARGS | METH_KEYWORDS },
{ "wxMenuBar_FindMenu", (PyCFunction) _wrap_wxMenuBar_FindMenu, METH_VARARGS | METH_KEYWORDS },
{ "wxMenuBar_GetLabelTop", (PyCFunction) _wrap_wxMenuBar_GetLabelTop, METH_VARARGS | METH_KEYWORDS },
{ "wxMenuBar_SetLabelTop", (PyCFunction) _wrap_wxMenuBar_SetLabelTop, METH_VARARGS | METH_KEYWORDS },
{ "wxMenuBar_EnableTop", (PyCFunction) _wrap_wxMenuBar_EnableTop, METH_VARARGS | METH_KEYWORDS },
@ -9888,6 +9997,8 @@ static PyMethodDef windowscMethods[] = {
{ "wxPanel_GetDefaultItem", (PyCFunction) _wrap_wxPanel_GetDefaultItem, METH_VARARGS | METH_KEYWORDS },
{ "wxPanel_InitDialog", (PyCFunction) _wrap_wxPanel_InitDialog, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPanel", (PyCFunction) _wrap_new_wxPanel, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_Thaw", (PyCFunction) _wrap_wxWindow_Thaw, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_Freeze", (PyCFunction) _wrap_wxWindow_Freeze, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_GetCaret", (PyCFunction) _wrap_wxWindow_GetCaret, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_SetCaret", (PyCFunction) _wrap_wxWindow_SetCaret, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_GetBestSize", (PyCFunction) _wrap_wxWindow_GetBestSize, METH_VARARGS | METH_KEYWORDS },

View File

@ -505,6 +505,12 @@ class wxWindowPtr(wxEvtHandlerPtr):
val = apply(windowsc.wxWindow_GetCaret,(self,) + _args, _kwargs)
if val: val = wxCaretPtr(val)
return val
def Freeze(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_Freeze,(self,) + _args, _kwargs)
return val
def Thaw(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_Thaw,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxWindow instance at %s>" % (self.this,)
# replaces broken shadow method
@ -828,6 +834,9 @@ class wxMenuBarPtr(wxWindowPtr):
def GetLabelTop(self, *_args, **_kwargs):
val = apply(windowsc.wxMenuBar_GetLabelTop,(self,) + _args, _kwargs)
return val
def FindMenu(self, *_args, **_kwargs):
val = apply(windowsc.wxMenuBar_FindMenu,(self,) + _args, _kwargs)
return val
def FindMenuItem(self, *_args, **_kwargs):
val = apply(windowsc.wxMenuBar_FindMenuItem,(self,) + _args, _kwargs)
return val