wxPython 2.1b1:

Added the missing wxWindow.GetUpdateRegion() method.

	Made a new change in SWIG (update your patches everybody) that
	provides a fix for global shadow objects that get an exception in
	their __del__ when their extension module has already been deleted.
	It was only a 1 line change in .../SWIG/Modules/pycpp.cxx at about
	line 496 if you want to do it by hand.

	It is now possible to run through MainLoop more than once in any one
	process.  The cleanup that used to happen as MainLoop completed (and
	prevented it from running again) has been delayed until the wxc module
	is being unloaded by Python.

	wxWindow.PopupMenu() now takes a wxPoint instead of  x,y.  Added
	wxWindow.PopupMenuXY to be consistent with some other methods.

	Added wxGrid.SetEditInPlace and wxGrid.GetEditInPlace.

	You can now provide your own app.MainLoop method.  See
	wxPython/demo/demoMainLoop.py for an example and some explaination.

	Got the in-place-edit for the wxTreeCtrl fixed and added some demo
	code to show how to use it.

	Put the wxIcon constructor back in for GTK as it now has one that
	matches MSW's.

	Added wxGrid.GetCells

	Added wxSystemSettings static methods as functions with names like
	wxSystemSettings_GetSystemColour.

	Removed wxPyMenu since using menu callbacks have been depreciated in
	wxWindows.  Use wxMenu and events instead.

	Added alternate wxBitmap constructor (for MSW only) as
	      wxBitmapFromData(data, type, width, height, depth = 1)

	Added a helper function named wxPyTypeCast that can convert shadow
	objects of one type into shadow objects of another type.  (Like doing
	a down-cast.)  See the implementation in wx.py for some docs.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3223 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
1999-07-31 07:56:15 +00:00
parent f91cd38969
commit 8bf5d46efb
123 changed files with 12610 additions and 1642 deletions

View File

@@ -2516,7 +2516,6 @@ SWIGEXPORT(void,initcmndlgsc)() {
SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0);
SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0);
SWIG_RegisterMapping("_wxMask","_class_wxMask",0);
SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0);
SWIG_RegisterMapping("_class_wxColourData","_wxColourData",0);
SWIG_RegisterMapping("_wxPen","_class_wxPen",0);
SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0);
@@ -2743,7 +2742,6 @@ SWIGEXPORT(void,initcmndlgsc)() {
SWIG_RegisterMapping("_wxDialog","_class_wxColourDialog",SwigwxColourDialogTowxDialog);
SWIG_RegisterMapping("_wxDialog","_wxColourDialog",SwigwxColourDialogTowxDialog);
SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0);
SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0);
SWIG_RegisterMapping("_class_wxPen","_wxPen",0);
SWIG_RegisterMapping("_class_wxFileDialog","_wxFileDialog",0);
SWIG_RegisterMapping("_short","_WXTYPE",0);

View File

@@ -19,7 +19,7 @@ class wxColourDataPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
def __del__(self, cmndlgsc=cmndlgsc):
if self.thisown == 1 :
cmndlgsc.delete_wxColourData(self.this)
def GetChooseFull(self):
@@ -243,7 +243,7 @@ class wxFontDataPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
def __del__(self, cmndlgsc=cmndlgsc):
if self.thisown == 1 :
cmndlgsc.delete_wxFontData(self.this)
def EnableEffects(self,arg0):

View File

@@ -57,6 +57,7 @@ extern PyObject *SWIG_newvarlink(void);
#include <wx/slider.h>
#include <wx/spinbutt.h>
#include <wx/dynarray.h>
#include <wx/statline.h>
#ifdef __WXMSW__
#if wxUSE_OWNER_DRAWN
@@ -66,7 +67,6 @@ extern PyObject *SWIG_newvarlink(void);
#ifdef __WXGTK__
#include <wx/checklst.h>
#include <wx/statline.h>
#endif
@@ -147,39 +147,6 @@ static void *SwigwxControlTowxEvtHandler(void *ptr) {
return (void *) dest;
}
#define wxControl_Command(_swigobj,_swigarg0) (_swigobj->Command(_swigarg0))
static PyObject *_wrap_wxControl_Command(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxControl * _arg0;
wxCommandEvent * _arg1;
char * _argc0 = 0;
char * _argc1 = 0;
self = self;
if(!PyArg_ParseTuple(args,"ss:wxControl_Command",&_argc0,&_argc1))
return NULL;
if (_argc0) {
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxControl_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxControl_Command. Expected _wxControl_p.");
return NULL;
}
}
if (_argc1) {
if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxCommandEvent_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxControl_Command. Expected _wxCommandEvent_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxControl_Command(_arg0,*_arg1);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxControl_GetLabel(_swigobj) (_swigobj->GetLabel())
static PyObject *_wrap_wxControl_GetLabel(PyObject *self, PyObject *args) {
PyObject * _resultobj;
@@ -4994,6 +4961,39 @@ static PyObject *_wrap_wxStaticBitmap_SetBitmap(PyObject *self, PyObject *args)
return _resultobj;
}
#define wxStaticBitmap_SetIcon(_swigobj,_swigarg0) (_swigobj->SetIcon(_swigarg0))
static PyObject *_wrap_wxStaticBitmap_SetIcon(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxStaticBitmap * _arg0;
wxIcon * _arg1;
char * _argc0 = 0;
char * _argc1 = 0;
self = self;
if(!PyArg_ParseTuple(args,"ss:wxStaticBitmap_SetIcon",&_argc0,&_argc1))
return NULL;
if (_argc0) {
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxStaticBitmap_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStaticBitmap_SetIcon. Expected _wxStaticBitmap_p.");
return NULL;
}
}
if (_argc1) {
if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxIcon_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxStaticBitmap_SetIcon. Expected _wxIcon_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxStaticBitmap_SetIcon(_arg0,*_arg1);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
static void *SwigwxRadioBoxTowxControl(void *ptr) {
wxRadioBox *src;
wxControl *dest;
@@ -6253,6 +6253,7 @@ static PyMethodDef controlscMethods[] = {
{ "wxRadioBox_EnableItem", _wrap_wxRadioBox_EnableItem, 1 },
{ "wxRadioBox_Enable", _wrap_wxRadioBox_Enable, 1 },
{ "new_wxRadioBox", _wrap_new_wxRadioBox, 1 },
{ "wxStaticBitmap_SetIcon", _wrap_wxStaticBitmap_SetIcon, 1 },
{ "wxStaticBitmap_SetBitmap", _wrap_wxStaticBitmap_SetBitmap, 1 },
{ "wxStaticBitmap_GetBitmap", _wrap_wxStaticBitmap_GetBitmap, 1 },
{ "new_wxStaticBitmap", _wrap_new_wxStaticBitmap, 1 },
@@ -6388,7 +6389,6 @@ static PyMethodDef controlscMethods[] = {
{ "new_wxButton", _wrap_new_wxButton, 1 },
{ "wxControl_SetLabel", _wrap_wxControl_SetLabel, 1 },
{ "wxControl_GetLabel", _wrap_wxControl_GetLabel, 1 },
{ "wxControl_Command", _wrap_wxControl_Command, 1 },
{ NULL, NULL }
};
static PyObject *SWIG_globals;
@@ -6462,7 +6462,6 @@ SWIGEXPORT(void,initcontrolsc)() {
SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0);
SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0);
SWIG_RegisterMapping("_wxMask","_class_wxMask",0);
SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0);
SWIG_RegisterMapping("_wxPen","_class_wxPen",0);
SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0);
SWIG_RegisterMapping("_byte","_unsigned_char",0);
@@ -6680,7 +6679,6 @@ SWIGEXPORT(void,initcontrolsc)() {
SWIG_RegisterMapping("_unsigned_int","_int",0);
SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0);
SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0);
SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0);
SWIG_RegisterMapping("_class_wxPen","_wxPen",0);
SWIG_RegisterMapping("_short","_WXTYPE",0);
SWIG_RegisterMapping("_short","_unsigned_short",0);

View File

@@ -13,9 +13,6 @@ class wxControlPtr(wxWindowPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Command(self,arg0):
val = controlsc.wxControl_Command(self.this,arg0.this)
return val
def GetLabel(self):
val = controlsc.wxControl_GetLabel(self.this)
return val
@@ -685,6 +682,9 @@ class wxStaticBitmapPtr(wxControlPtr):
def SetBitmap(self,arg0):
val = controlsc.wxStaticBitmap_SetBitmap(self.this,arg0.this)
return val
def SetIcon(self,arg0):
val = controlsc.wxStaticBitmap_SetIcon(self.this,arg0.this)
return val
def __repr__(self):
return "<C wxStaticBitmap instance>"
class wxStaticBitmap(wxStaticBitmapPtr):

View File

@@ -1349,6 +1349,32 @@ static PyObject *_wrap_wxListCtrl_ClearAll(PyObject *self, PyObject *args) {
return _resultobj;
}
#define wxListCtrl_EditLabel(_swigobj,_swigarg0) (_swigobj->EditLabel(_swigarg0))
static PyObject *_wrap_wxListCtrl_EditLabel(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxListCtrl * _arg0;
long _arg1;
char * _argc0 = 0;
self = self;
if(!PyArg_ParseTuple(args,"sl:wxListCtrl_EditLabel",&_argc0,&_arg1))
return NULL;
if (_argc0) {
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_EditLabel. Expected _wxListCtrl_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxListCtrl_EditLabel(_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxListCtrl_EnsureVisible(_swigobj,_swigarg0) (_swigobj->EnsureVisible(_swigarg0))
static PyObject *_wrap_wxListCtrl_EnsureVisible(PyObject *self, PyObject *args) {
PyObject * _resultobj;
@@ -2814,6 +2840,14 @@ static PyObject *_wrap_wxTreeItemData_SetId(PyObject *self, PyObject *args) {
return _resultobj;
}
static void *SwigwxTreeEventTowxNotifyEvent(void *ptr) {
wxTreeEvent *src;
wxNotifyEvent *dest;
src = (wxTreeEvent *) ptr;
dest = (wxNotifyEvent *) src;
return (void *) dest;
}
static void *SwigwxTreeEventTowxCommandEvent(void *ptr) {
wxTreeEvent *src;
wxCommandEvent *dest;
@@ -2936,28 +2970,31 @@ static PyObject *_wrap_wxTreeEvent_GetCode(PyObject *self, PyObject *args) {
return _resultobj;
}
#define wxTreeEvent_Veto(_swigobj) (_swigobj->Veto())
static PyObject *_wrap_wxTreeEvent_Veto(PyObject *self, PyObject *args) {
#define wxTreeEvent_GetLabel(_swigobj) (_swigobj->GetLabel())
static PyObject *_wrap_wxTreeEvent_GetLabel(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxString * _result;
wxTreeEvent * _arg0;
char * _argc0 = 0;
self = self;
if(!PyArg_ParseTuple(args,"s:wxTreeEvent_Veto",&_argc0))
if(!PyArg_ParseTuple(args,"s:wxTreeEvent_GetLabel",&_argc0))
return NULL;
if (_argc0) {
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeEvent_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_Veto. Expected _wxTreeEvent_p.");
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_GetLabel. Expected _wxTreeEvent_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxTreeEvent_Veto(_arg0);
const wxString & _result_ref = wxTreeEvent_GetLabel(_arg0);
_result = (wxString *) &_result_ref;
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
}{
_resultobj = PyString_FromString(WXSTRINGCAST (*_result));
}
return _resultobj;
}
@@ -4659,6 +4696,31 @@ static PyObject *_wrap_wxTreeCtrl_Unselect(PyObject *self, PyObject *args) {
return _resultobj;
}
#define wxTreeCtrl_UnselectAll(_swigobj) (_swigobj->UnselectAll())
static PyObject *_wrap_wxTreeCtrl_UnselectAll(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxTreeCtrl * _arg0;
char * _argc0 = 0;
self = self;
if(!PyArg_ParseTuple(args,"s:wxTreeCtrl_UnselectAll",&_argc0))
return NULL;
if (_argc0) {
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_UnselectAll. Expected _wxTreeCtrl_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxTreeCtrl_UnselectAll(_arg0);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxTreeCtrl_SelectItem(_swigobj,_swigarg0) (_swigobj->SelectItem(_swigarg0))
static PyObject *_wrap_wxTreeCtrl_SelectItem(PyObject *self, PyObject *args) {
PyObject * _resultobj;
@@ -4761,12 +4823,10 @@ static PyObject *_wrap_wxTreeCtrl_ScrollTo(PyObject *self, PyObject *args) {
#define wxTreeCtrl_EditLabel(_swigobj,_swigarg0) (_swigobj->EditLabel(_swigarg0))
static PyObject *_wrap_wxTreeCtrl_EditLabel(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxTextCtrl * _result;
wxTreeCtrl * _arg0;
wxTreeItemId * _arg1;
char * _argc0 = 0;
char * _argc1 = 0;
char _ptemp[128];
self = self;
if(!PyArg_ParseTuple(args,"ss:wxTreeCtrl_EditLabel",&_argc0,&_argc1))
@@ -4785,70 +4845,7 @@ static PyObject *_wrap_wxTreeCtrl_EditLabel(PyObject *self, PyObject *args) {
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxTextCtrl *)wxTreeCtrl_EditLabel(_arg0,*_arg1);
wxPy_END_ALLOW_THREADS;
} SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p");
_resultobj = Py_BuildValue("s",_ptemp);
return _resultobj;
}
#define wxTreeCtrl_GetEditControl(_swigobj) (_swigobj->GetEditControl())
static PyObject *_wrap_wxTreeCtrl_GetEditControl(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxTextCtrl * _result;
wxTreeCtrl * _arg0;
char * _argc0 = 0;
char _ptemp[128];
self = self;
if(!PyArg_ParseTuple(args,"s:wxTreeCtrl_GetEditControl",&_argc0))
return NULL;
if (_argc0) {
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetEditControl. Expected _wxTreeCtrl_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxTextCtrl *)wxTreeCtrl_GetEditControl(_arg0);
wxPy_END_ALLOW_THREADS;
} SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p");
_resultobj = Py_BuildValue("s",_ptemp);
return _resultobj;
}
#define wxTreeCtrl_EndEditLabel(_swigobj,_swigarg0,_swigarg1) (_swigobj->EndEditLabel(_swigarg0,_swigarg1))
static PyObject *_wrap_wxTreeCtrl_EndEditLabel(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxTreeCtrl * _arg0;
wxTreeItemId * _arg1;
bool _arg2 = (0);
char * _argc0 = 0;
char * _argc1 = 0;
int tempbool2;
self = self;
if(!PyArg_ParseTuple(args,"ss|i:wxTreeCtrl_EndEditLabel",&_argc0,&_argc1,&tempbool2))
return NULL;
if (_argc0) {
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_EndEditLabel. Expected _wxTreeCtrl_p.");
return NULL;
}
}
if (_argc1) {
if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxTreeItemId_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_EndEditLabel. Expected _wxTreeItemId_p.");
return NULL;
}
}
_arg2 = (bool ) tempbool2;
{
wxPy_BEGIN_ALLOW_THREADS;
wxTreeCtrl_EndEditLabel(_arg0,*_arg1,_arg2);
wxTreeCtrl_EditLabel(_arg0,*_arg1);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
@@ -4964,12 +4961,11 @@ static PyMethodDef controls2cMethods[] = {
{ "wxTreeCtrl_HitTest", _wrap_wxTreeCtrl_HitTest, 1 },
{ "wxTreeCtrl_IsBold", _wrap_wxTreeCtrl_IsBold, 1 },
{ "wxTreeCtrl_SetItemBold", _wrap_wxTreeCtrl_SetItemBold, 1 },
{ "wxTreeCtrl_EndEditLabel", _wrap_wxTreeCtrl_EndEditLabel, 1 },
{ "wxTreeCtrl_GetEditControl", _wrap_wxTreeCtrl_GetEditControl, 1 },
{ "wxTreeCtrl_EditLabel", _wrap_wxTreeCtrl_EditLabel, 1 },
{ "wxTreeCtrl_ScrollTo", _wrap_wxTreeCtrl_ScrollTo, 1 },
{ "wxTreeCtrl_EnsureVisible", _wrap_wxTreeCtrl_EnsureVisible, 1 },
{ "wxTreeCtrl_SelectItem", _wrap_wxTreeCtrl_SelectItem, 1 },
{ "wxTreeCtrl_UnselectAll", _wrap_wxTreeCtrl_UnselectAll, 1 },
{ "wxTreeCtrl_Unselect", _wrap_wxTreeCtrl_Unselect, 1 },
{ "wxTreeCtrl_Toggle", _wrap_wxTreeCtrl_Toggle, 1 },
{ "wxTreeCtrl_CollapseAndReset", _wrap_wxTreeCtrl_CollapseAndReset, 1 },
@@ -5016,7 +5012,7 @@ static PyMethodDef controls2cMethods[] = {
{ "wxTreeCtrl_GetIndent", _wrap_wxTreeCtrl_GetIndent, 1 },
{ "wxTreeCtrl_GetCount", _wrap_wxTreeCtrl_GetCount, 1 },
{ "new_wxTreeCtrl", _wrap_new_wxTreeCtrl, 1 },
{ "wxTreeEvent_Veto", _wrap_wxTreeEvent_Veto, 1 },
{ "wxTreeEvent_GetLabel", _wrap_wxTreeEvent_GetLabel, 1 },
{ "wxTreeEvent_GetCode", _wrap_wxTreeEvent_GetCode, 1 },
{ "wxTreeEvent_GetPoint", _wrap_wxTreeEvent_GetPoint, 1 },
{ "wxTreeEvent_GetOldItem", _wrap_wxTreeEvent_GetOldItem, 1 },
@@ -5069,6 +5065,7 @@ static PyMethodDef controls2cMethods[] = {
{ "wxListCtrl_FindItemData", _wrap_wxListCtrl_FindItemData, 1 },
{ "wxListCtrl_FindItem", _wrap_wxListCtrl_FindItem, 1 },
{ "wxListCtrl_EnsureVisible", _wrap_wxListCtrl_EnsureVisible, 1 },
{ "wxListCtrl_EditLabel", _wrap_wxListCtrl_EditLabel, 1 },
{ "wxListCtrl_ClearAll", _wrap_wxListCtrl_ClearAll, 1 },
{ "wxListCtrl_DeleteAllColumns", _wrap_wxListCtrl_DeleteAllColumns, 1 },
{ "wxListCtrl_DeleteColumn", _wrap_wxListCtrl_DeleteColumn, 1 },
@@ -5197,10 +5194,11 @@ SWIGEXPORT(void,initcontrols2c)() {
SWIG_RegisterMapping("_wxPaintEvent","_class_wxPaintEvent",0);
SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0);
SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0);
SWIG_RegisterMapping("_wxNotifyEvent","_class_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent);
SWIG_RegisterMapping("_wxNotifyEvent","_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent);
SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0);
SWIG_RegisterMapping("_class_wxTreeCtrl","_wxTreeCtrl",0);
SWIG_RegisterMapping("_wxMask","_class_wxMask",0);
SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0);
SWIG_RegisterMapping("_wxPen","_class_wxPen",0);
SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0);
SWIG_RegisterMapping("_byte","_unsigned_char",0);
@@ -5269,6 +5267,8 @@ SWIGEXPORT(void,initcontrols2c)() {
SWIG_RegisterMapping("_wxScrollBar","_class_wxScrollBar",0);
SWIG_RegisterMapping("_wxSpinButton","_class_wxSpinButton",0);
SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0);
SWIG_RegisterMapping("_class_wxNotifyEvent","_class_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent);
SWIG_RegisterMapping("_class_wxNotifyEvent","_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent);
SWIG_RegisterMapping("_class_wxNotifyEvent","_wxNotifyEvent",0);
SWIG_RegisterMapping("_class_wxPyEvent","_wxPyEvent",0);
SWIG_RegisterMapping("_class_wxIconizeEvent","_wxIconizeEvent",0);
@@ -5357,7 +5357,6 @@ SWIGEXPORT(void,initcontrols2c)() {
SWIG_RegisterMapping("_unsigned_int","_int",0);
SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0);
SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0);
SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0);
SWIG_RegisterMapping("_class_wxListItem","_wxListItem",0);
SWIG_RegisterMapping("_class_wxPen","_wxPen",0);
SWIG_RegisterMapping("_short","_WXTYPE",0);

View File

@@ -15,7 +15,7 @@ class wxListItemPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
def __del__(self, controls2c=controls2c):
if self.thisown == 1 :
controls2c.delete_wxListItem(self.this)
def __setattr__(self,name,value):
@@ -156,6 +156,9 @@ class wxListCtrlPtr(wxControlPtr):
def ClearAll(self):
val = controls2c.wxListCtrl_ClearAll(self.this)
return val
def EditLabel(self,arg0):
val = controls2c.wxListCtrl_EditLabel(self.this,arg0)
return val
def EnsureVisible(self,arg0):
val = controls2c.wxListCtrl_EnsureVisible(self.this,arg0)
return val
@@ -304,7 +307,7 @@ class wxTreeItemIdPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
def __del__(self, controls2c=controls2c):
if self.thisown == 1 :
controls2c.delete_wxTreeItemId(self.this)
def IsOk(self):
@@ -347,7 +350,7 @@ class wxTreeItemData(wxTreeItemDataPtr):
class wxTreeEventPtr(wxCommandEventPtr):
class wxTreeEventPtr(wxNotifyEventPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
@@ -369,8 +372,8 @@ class wxTreeEventPtr(wxCommandEventPtr):
def GetCode(self):
val = controls2c.wxTreeEvent_GetCode(self.this)
return val
def Veto(self):
val = controls2c.wxTreeEvent_Veto(self.this)
def GetLabel(self):
val = controls2c.wxTreeEvent_GetLabel(self.this)
return val
def __repr__(self):
return "<C wxTreeEvent instance>"
@@ -563,6 +566,9 @@ class wxTreeCtrlPtr(wxControlPtr):
def Unselect(self):
val = controls2c.wxTreeCtrl_Unselect(self.this)
return val
def UnselectAll(self):
val = controls2c.wxTreeCtrl_UnselectAll(self.this)
return val
def SelectItem(self,arg0):
val = controls2c.wxTreeCtrl_SelectItem(self.this,arg0.this)
return val
@@ -574,14 +580,6 @@ class wxTreeCtrlPtr(wxControlPtr):
return val
def EditLabel(self,arg0):
val = controls2c.wxTreeCtrl_EditLabel(self.this,arg0.this)
val = wxTextCtrlPtr(val)
return val
def GetEditControl(self):
val = controls2c.wxTreeCtrl_GetEditControl(self.this)
val = wxTextCtrlPtr(val)
return val
def EndEditLabel(self,arg0,*args):
val = apply(controls2c.wxTreeCtrl_EndEditLabel,(self.this,arg0.this,)+args)
return val
def SetItemBold(self,arg0,*args):
val = apply(controls2c.wxTreeCtrl_SetItemBold,(self.this,arg0.this,)+args)

View File

@@ -609,7 +609,7 @@ class wxPyEventPtr(wxCommandEventPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
def __del__(self, eventsc=eventsc):
if self.thisown == 1 :
eventsc.delete_wxPyEvent(self.this)
def SetUserData(self,arg0):

View File

@@ -900,7 +900,6 @@ SWIGEXPORT(void,initframesc)() {
SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0);
SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0);
SWIG_RegisterMapping("_wxMask","_class_wxMask",0);
SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0);
SWIG_RegisterMapping("_wxPen","_class_wxPen",0);
SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0);
SWIG_RegisterMapping("_byte","_unsigned_char",0);
@@ -1047,7 +1046,6 @@ SWIGEXPORT(void,initframesc)() {
SWIG_RegisterMapping("_unsigned_int","_int",0);
SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0);
SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0);
SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0);
SWIG_RegisterMapping("_class_wxPen","_wxPen",0);
SWIG_RegisterMapping("_short","_WXTYPE",0);
SWIG_RegisterMapping("_short","_unsigned_short",0);

View File

@@ -132,6 +132,13 @@ static char* wxStringErrorMsg = "string type is required for parameter";
return new wxBitmap(name, flags);
}
#ifdef __WXMSW__
wxBitmap* wxBitmapFromData(char* data, long type,
int width, int height, int depth = 1) {
return new wxBitmap((void*)data, type, width, height, depth);
}
#endif
wxMask* wxMaskColour(const wxBitmap& bitmap, const wxColour& colour) {
return new wxMask(bitmap, colour);
}
@@ -1443,6 +1450,41 @@ static void *SwigwxIconTowxBitmap(void *ptr) {
return (void *) dest;
}
#define new_wxIcon(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxIcon(_swigarg0,_swigarg1,_swigarg2,_swigarg3))
static PyObject *_wrap_new_wxIcon(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxIcon * _result;
wxString * _arg0;
long _arg1;
int _arg2 = -1;
int _arg3 = -1;
PyObject * _obj0 = 0;
char _ptemp[128];
self = self;
if(!PyArg_ParseTuple(args,"Ol|ii:new_wxIcon",&_obj0,&_arg1,&_arg2,&_arg3))
return NULL;
{
if (!PyString_Check(_obj0)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
_arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0));
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxIcon *)new_wxIcon(*_arg0,_arg1,_arg2,_arg3);
wxPy_END_ALLOW_THREADS;
} SWIG_MakePtr(_ptemp, (char *) _result,"_wxIcon_p");
_resultobj = Py_BuildValue("s",_ptemp);
{
if (_obj0)
delete _arg0;
}
return _resultobj;
}
#define delete_wxIcon(_swigobj) (delete _swigobj)
static PyObject *_wrap_delete_wxIcon(PyObject *self, PyObject *args) {
PyObject * _resultobj;
@@ -5012,8 +5054,10 @@ static PyObject *_wrap_wxDC_StartPage(PyObject *self, PyObject *args) {
static void wxDC_DrawBitmap(wxDC *self,wxBitmap & bitmap,long x,long y,bool swapPalette) {
wxMemoryDC* memDC = new wxMemoryDC;
memDC->SelectObject(bitmap);
#ifdef __WXMSW__
if (swapPalette)
self->SetPalette(*bitmap.GetPalette());
#endif
self->Blit(x, y, bitmap.GetWidth(), bitmap.GetHeight(), memDC,
0, 0, self->GetLogicalFunction());
memDC->SelectObject(wxNullBitmap);
@@ -5959,6 +6003,7 @@ static PyMethodDef gdicMethods[] = {
{ "wxIcon_GetHeight", _wrap_wxIcon_GetHeight, 1 },
{ "wxIcon_GetDepth", _wrap_wxIcon_GetDepth, 1 },
{ "delete_wxIcon", _wrap_delete_wxIcon, 1 },
{ "new_wxIcon", _wrap_new_wxIcon, 1 },
{ "delete_wxMask", _wrap_delete_wxMask, 1 },
{ "new_wxMask", _wrap_new_wxMask, 1 },
{ "wxBitmap_SetWidth", _wrap_wxBitmap_SetWidth, 1 },

View File

@@ -6,7 +6,7 @@ class wxBitmapPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
def __del__(self, gdic=gdic):
if self.thisown == 1 :
gdic.delete_wxBitmap(self.this)
def GetDepth(self):
@@ -65,7 +65,7 @@ class wxMaskPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
def __del__(self, gdic=gdic):
if self.thisown == 1 :
gdic.delete_wxMask(self.this)
def __repr__(self):
@@ -82,7 +82,7 @@ class wxIconPtr(wxBitmapPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
def __del__(self, gdic=gdic):
if self.thisown == 1 :
gdic.delete_wxIcon(self.this)
def GetDepth(self):
@@ -112,8 +112,9 @@ class wxIconPtr(wxBitmapPtr):
def __repr__(self):
return "<C wxIcon instance>"
class wxIcon(wxIconPtr):
def __init__(self,this):
self.this = this
def __init__(self,arg0,arg1,*args) :
self.this = apply(gdic.new_wxIcon,(arg0,arg1,)+args)
self.thisown = 1
@@ -122,7 +123,7 @@ class wxCursorPtr(wxBitmapPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
def __del__(self, gdic=gdic):
if self.thisown == 1 :
gdic.delete_wxCursor(self.this)
def Ok(self):
@@ -191,7 +192,7 @@ class wxColourPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
def __del__(self, gdic=gdic):
if self.thisown == 1 :
gdic.delete_wxColour(self.this)
def Red(self):
@@ -311,7 +312,7 @@ class wxDCPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
def __del__(self, gdic=gdic):
if self.thisown == 1 :
gdic.delete_wxDC(self.this)
def BeginDrawing(self):
@@ -664,7 +665,7 @@ class wxPalettePtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
def __del__(self, gdic=gdic):
if self.thisown == 1 :
gdic.delete_wxPalette(self.this)
def GetPixel(self,arg0,arg1,arg2):
@@ -690,7 +691,7 @@ class wxImageListPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
def __del__(self, gdic=gdic):
if self.thisown == 1 :
gdic.delete_wxImageList(self.this)
def Add(self,arg0):

View File

@@ -9014,6 +9014,7 @@ SWIGEXPORT(void,initglcanvasc)() {
SWIG_RegisterMapping("_wxPrintQuality","_EBool",0);
SWIG_RegisterMapping("_wxPrintQuality","_size_t",0);
SWIG_RegisterMapping("_wxFontData","_class_wxFontData",0);
SWIG_RegisterMapping("___wxPyCleanup","_class___wxPyCleanup",0);
SWIG_RegisterMapping("_class_wxRegionIterator","_wxRegionIterator",0);
SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0);
SWIG_RegisterMapping("_class_wxPyTreeItemData","_wxPyTreeItemData",0);
@@ -9043,7 +9044,6 @@ SWIGEXPORT(void,initglcanvasc)() {
SWIG_RegisterMapping("_wxToolTip","_class_wxToolTip",0);
SWIG_RegisterMapping("_wxGrid","_class_wxGrid",0);
SWIG_RegisterMapping("_wxPNGHandler","_class_wxPNGHandler",0);
SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0);
SWIG_RegisterMapping("_class_wxColourData","_wxColourData",0);
SWIG_RegisterMapping("_class_wxPageSetupDialogData","_wxPageSetupDialogData",0);
SWIG_RegisterMapping("_wxPrinter","_class_wxPrinter",0);
@@ -9170,6 +9170,7 @@ SWIGEXPORT(void,initglcanvasc)() {
SWIG_RegisterMapping("_class_wxButton","_wxButton",0);
SWIG_RegisterMapping("_wxRadioBox","_class_wxRadioBox",0);
SWIG_RegisterMapping("_class_wxFontData","_wxFontData",0);
SWIG_RegisterMapping("_class___wxPyCleanup","___wxPyCleanup",0);
SWIG_RegisterMapping("_GLclampf","_float",0);
SWIG_RegisterMapping("_GLclampf","_GLfloat",0);
SWIG_RegisterMapping("_wxBitmap","_class_wxBitmap",0);
@@ -9332,7 +9333,6 @@ SWIGEXPORT(void,initglcanvasc)() {
SWIG_RegisterMapping("_unsigned_int","_int",0);
SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0);
SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0);
SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0);
SWIG_RegisterMapping("_class_wxListItem","_wxListItem",0);
SWIG_RegisterMapping("_GLdouble","_GLclampd",0);
SWIG_RegisterMapping("_GLdouble","_double",0);

View File

@@ -35,7 +35,7 @@ class wxGLContextPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
def __del__(self, glcanvasc=glcanvasc):
if self.thisown == 1 :
glcanvasc.delete_wxGLContext(self.this)
def SetCurrent(self):

View File

@@ -815,6 +815,33 @@ static PyObject *_wrap_wxImage_Scale(PyObject *self, PyObject *args) {
return _resultobj;
}
#define wxImage_Rescale(_swigobj,_swigarg0,_swigarg1) (_swigobj->Rescale(_swigarg0,_swigarg1))
static PyObject *_wrap_wxImage_Rescale(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxImage * _arg0;
int _arg1;
int _arg2;
char * _argc0 = 0;
self = self;
if(!PyArg_ParseTuple(args,"sii:wxImage_Rescale",&_argc0,&_arg1,&_arg2))
return NULL;
if (_argc0) {
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxImage_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_Rescale. Expected _wxImage_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxImage_Rescale(_arg0,_arg1,_arg2);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxImage_SetRGB(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->SetRGB(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4))
static PyObject *_wrap_wxImage_SetRGB(PyObject *self, PyObject *args) {
PyObject * _resultobj;
@@ -1417,6 +1444,7 @@ static PyMethodDef imagecMethods[] = {
{ "wxImage_GetGreen", _wrap_wxImage_GetGreen, 1 },
{ "wxImage_GetRed", _wrap_wxImage_GetRed, 1 },
{ "wxImage_SetRGB", _wrap_wxImage_SetRGB, 1 },
{ "wxImage_Rescale", _wrap_wxImage_Rescale, 1 },
{ "wxImage_Scale", _wrap_wxImage_Scale, 1 },
{ "wxImage_Destroy", _wrap_wxImage_Destroy, 1 },
{ "wxImage_Create", _wrap_wxImage_Create, 1 },

View File

@@ -102,7 +102,7 @@ class wxImagePtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
def __del__(self, imagec=imagec):
if self.thisown == 1 :
imagec.delete_wxImage(self.this)
def ConvertToBitmap(self):
@@ -121,6 +121,9 @@ class wxImagePtr :
val = wxImagePtr(val)
val.thisown = 1
return val
def Rescale(self,arg0,arg1):
val = imagec.wxImage_Rescale(self.this,arg0,arg1)
return val
def SetRGB(self,arg0,arg1,arg2,arg3,arg4):
val = imagec.wxImage_SetRGB(self.this,arg0,arg1,arg2,arg3,arg4)
return val

View File

@@ -664,7 +664,6 @@ SWIGEXPORT(void,initmdic)() {
SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0);
SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0);
SWIG_RegisterMapping("_wxMask","_class_wxMask",0);
SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0);
SWIG_RegisterMapping("_wxPen","_class_wxPen",0);
SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0);
SWIG_RegisterMapping("_byte","_unsigned_char",0);
@@ -817,7 +816,6 @@ SWIGEXPORT(void,initmdic)() {
SWIG_RegisterMapping("_unsigned_int","_int",0);
SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0);
SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0);
SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0);
SWIG_RegisterMapping("_class_wxPen","_wxPen",0);
SWIG_RegisterMapping("_short","_WXTYPE",0);
SWIG_RegisterMapping("_short","_unsigned_short",0);

View File

@@ -122,6 +122,19 @@ static char* wxStringErrorMsg = "string type is required for parameter";
wxGetResource(section, entry, &retval, file);
return retval;
}
wxColour wxSystemSettings_GetSystemColour(int index) {
return wxSystemSettings::GetSystemColour(index);
}
wxFont wxSystemSettings_GetSystemFont(int index) {
return wxSystemSettings::GetSystemFont(index);
}
int wxSystemSettings_GetSystemMetric(int index) {
return wxSystemSettings::GetSystemMetric(index);
}
static PyObject *_wrap_wxFileSelector(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxString * _result;
@@ -449,6 +462,80 @@ static PyObject *_wrap_wxMessageBox(PyObject *self, PyObject *args) {
return _resultobj;
}
static PyObject *_wrap_wxGetNumberFromUser(PyObject *self, PyObject *args) {
PyObject * _resultobj;
long _result;
wxString * _arg0;
wxString * _arg1;
wxString * _arg2;
long _arg3;
long _arg4 = 0;
long _arg5 = 100;
wxWindow * _arg6 = NULL;
wxPoint * _arg7 = &wxPyDefaultPosition;
PyObject * _obj0 = 0;
PyObject * _obj1 = 0;
PyObject * _obj2 = 0;
char * _argc6 = 0;
char * _argc7 = 0;
self = self;
if(!PyArg_ParseTuple(args,"OOOl|llss:wxGetNumberFromUser",&_obj0,&_obj1,&_obj2,&_arg3,&_arg4,&_arg5,&_argc6,&_argc7))
return NULL;
{
if (!PyString_Check(_obj0)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
_arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0));
}
{
if (!PyString_Check(_obj1)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
_arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
}
{
if (!PyString_Check(_obj2)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
_arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2));
}
if (_argc6) {
if (SWIG_GetPtr(_argc6,(void **) &_arg6,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxGetNumberFromUser. Expected _wxWindow_p.");
return NULL;
}
}
if (_argc7) {
if (SWIG_GetPtr(_argc7,(void **) &_arg7,"_wxPoint_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of wxGetNumberFromUser. Expected _wxPoint_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (long )wxGetNumberFromUser(*_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5,_arg6,*_arg7);
wxPy_END_ALLOW_THREADS;
} _resultobj = Py_BuildValue("l",_result);
{
if (_obj0)
delete _arg0;
}
{
if (_obj1)
delete _arg1;
}
{
if (_obj2)
delete _arg2;
}
return _resultobj;
}
static PyObject *_wrap_wxColourDisplay(PyObject *self, PyObject *args) {
PyObject * _resultobj;
bool _result;
@@ -1038,6 +1125,61 @@ static PyObject *_wrap_wxResourceParseString(PyObject *self, PyObject *args) {
return _resultobj;
}
static PyObject *_wrap_wxSystemSettings_GetSystemColour(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxColour * _result;
int _arg0;
char _ptemp[128];
self = self;
if(!PyArg_ParseTuple(args,"i:wxSystemSettings_GetSystemColour",&_arg0))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = new wxColour (wxSystemSettings_GetSystemColour(_arg0));
wxPy_END_ALLOW_THREADS;
} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p");
_resultobj = Py_BuildValue("s",_ptemp);
return _resultobj;
}
static PyObject *_wrap_wxSystemSettings_GetSystemFont(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxFont * _result;
int _arg0;
char _ptemp[128];
self = self;
if(!PyArg_ParseTuple(args,"i:wxSystemSettings_GetSystemFont",&_arg0))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = new wxFont (wxSystemSettings_GetSystemFont(_arg0));
wxPy_END_ALLOW_THREADS;
} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p");
_resultobj = Py_BuildValue("s",_ptemp);
return _resultobj;
}
static PyObject *_wrap_wxSystemSettings_GetSystemMetric(PyObject *self, PyObject *args) {
PyObject * _resultobj;
int _result;
int _arg0;
self = self;
if(!PyArg_ParseTuple(args,"i:wxSystemSettings_GetSystemMetric",&_arg0))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (int )wxSystemSettings_GetSystemMetric(_arg0);
wxPy_END_ALLOW_THREADS;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxSize_x_set(_swigobj,_swigval) (_swigobj->x = _swigval,_swigval)
static PyObject *_wrap_wxSize_x_set(PyObject *self, PyObject *args) {
PyObject * _resultobj;
@@ -3982,6 +4124,9 @@ static PyMethodDef misccMethods[] = {
{ "wxSize_y_set", _wrap_wxSize_y_set, 1 },
{ "wxSize_x_get", _wrap_wxSize_x_get, 1 },
{ "wxSize_x_set", _wrap_wxSize_x_set, 1 },
{ "wxSystemSettings_GetSystemMetric", _wrap_wxSystemSettings_GetSystemMetric, 1 },
{ "wxSystemSettings_GetSystemFont", _wrap_wxSystemSettings_GetSystemFont, 1 },
{ "wxSystemSettings_GetSystemColour", _wrap_wxSystemSettings_GetSystemColour, 1 },
{ "wxResourceParseString", _wrap_wxResourceParseString, 1 },
{ "wxResourceParseFile", _wrap_wxResourceParseFile, 1 },
{ "wxResourceParseData", _wrap_wxResourceParseData, 1 },
@@ -4011,6 +4156,7 @@ static PyMethodDef misccMethods[] = {
{ "wxSetCursor", _wrap_wxSetCursor, 1 },
{ "wxDisplayDepth", _wrap_wxDisplayDepth, 1 },
{ "wxColourDisplay", _wrap_wxColourDisplay, 1 },
{ "wxGetNumberFromUser", _wrap_wxGetNumberFromUser, 1 },
{ "wxMessageBox", _wrap_wxMessageBox, 1 },
{ "wxGetSingleChoiceIndex", _wrap_wxGetSingleChoiceIndex, 1 },
{ "wxGetSingleChoice", _wrap_wxGetSingleChoice, 1 },
@@ -4049,6 +4195,92 @@ SWIGEXPORT(void,initmiscc)() {
PyDict_SetItemString(d,"wxOutRegion", PyInt_FromLong((long) wxOutRegion));
PyDict_SetItemString(d,"wxPartRegion", PyInt_FromLong((long) wxPartRegion));
PyDict_SetItemString(d,"wxInRegion", PyInt_FromLong((long) wxInRegion));
PyDict_SetItemString(d,"wxSYS_WHITE_BRUSH", PyInt_FromLong((long) wxSYS_WHITE_BRUSH));
PyDict_SetItemString(d,"wxSYS_LTGRAY_BRUSH", PyInt_FromLong((long) wxSYS_LTGRAY_BRUSH));
PyDict_SetItemString(d,"wxSYS_GRAY_BRUSH", PyInt_FromLong((long) wxSYS_GRAY_BRUSH));
PyDict_SetItemString(d,"wxSYS_DKGRAY_BRUSH", PyInt_FromLong((long) wxSYS_DKGRAY_BRUSH));
PyDict_SetItemString(d,"wxSYS_BLACK_BRUSH", PyInt_FromLong((long) wxSYS_BLACK_BRUSH));
PyDict_SetItemString(d,"wxSYS_NULL_BRUSH", PyInt_FromLong((long) wxSYS_NULL_BRUSH));
PyDict_SetItemString(d,"wxSYS_HOLLOW_BRUSH", PyInt_FromLong((long) wxSYS_HOLLOW_BRUSH));
PyDict_SetItemString(d,"wxSYS_WHITE_PEN", PyInt_FromLong((long) wxSYS_WHITE_PEN));
PyDict_SetItemString(d,"wxSYS_BLACK_PEN", PyInt_FromLong((long) wxSYS_BLACK_PEN));
PyDict_SetItemString(d,"wxSYS_NULL_PEN", PyInt_FromLong((long) wxSYS_NULL_PEN));
PyDict_SetItemString(d,"wxSYS_OEM_FIXED_FONT", PyInt_FromLong((long) wxSYS_OEM_FIXED_FONT));
PyDict_SetItemString(d,"wxSYS_ANSI_FIXED_FONT", PyInt_FromLong((long) wxSYS_ANSI_FIXED_FONT));
PyDict_SetItemString(d,"wxSYS_ANSI_VAR_FONT", PyInt_FromLong((long) wxSYS_ANSI_VAR_FONT));
PyDict_SetItemString(d,"wxSYS_SYSTEM_FONT", PyInt_FromLong((long) wxSYS_SYSTEM_FONT));
PyDict_SetItemString(d,"wxSYS_DEVICE_DEFAULT_FONT", PyInt_FromLong((long) wxSYS_DEVICE_DEFAULT_FONT));
PyDict_SetItemString(d,"wxSYS_DEFAULT_PALETTE", PyInt_FromLong((long) wxSYS_DEFAULT_PALETTE));
PyDict_SetItemString(d,"wxSYS_SYSTEM_FIXED_FONT", PyInt_FromLong((long) wxSYS_SYSTEM_FIXED_FONT));
PyDict_SetItemString(d,"wxSYS_DEFAULT_GUI_FONT", PyInt_FromLong((long) wxSYS_DEFAULT_GUI_FONT));
PyDict_SetItemString(d,"wxSYS_COLOUR_SCROLLBAR", PyInt_FromLong((long) wxSYS_COLOUR_SCROLLBAR));
PyDict_SetItemString(d,"wxSYS_COLOUR_BACKGROUND", PyInt_FromLong((long) wxSYS_COLOUR_BACKGROUND));
PyDict_SetItemString(d,"wxSYS_COLOUR_ACTIVECAPTION", PyInt_FromLong((long) wxSYS_COLOUR_ACTIVECAPTION));
PyDict_SetItemString(d,"wxSYS_COLOUR_INACTIVECAPTION", PyInt_FromLong((long) wxSYS_COLOUR_INACTIVECAPTION));
PyDict_SetItemString(d,"wxSYS_COLOUR_MENU", PyInt_FromLong((long) wxSYS_COLOUR_MENU));
PyDict_SetItemString(d,"wxSYS_COLOUR_WINDOW", PyInt_FromLong((long) wxSYS_COLOUR_WINDOW));
PyDict_SetItemString(d,"wxSYS_COLOUR_WINDOWFRAME", PyInt_FromLong((long) wxSYS_COLOUR_WINDOWFRAME));
PyDict_SetItemString(d,"wxSYS_COLOUR_MENUTEXT", PyInt_FromLong((long) wxSYS_COLOUR_MENUTEXT));
PyDict_SetItemString(d,"wxSYS_COLOUR_WINDOWTEXT", PyInt_FromLong((long) wxSYS_COLOUR_WINDOWTEXT));
PyDict_SetItemString(d,"wxSYS_COLOUR_CAPTIONTEXT", PyInt_FromLong((long) wxSYS_COLOUR_CAPTIONTEXT));
PyDict_SetItemString(d,"wxSYS_COLOUR_ACTIVEBORDER", PyInt_FromLong((long) wxSYS_COLOUR_ACTIVEBORDER));
PyDict_SetItemString(d,"wxSYS_COLOUR_INACTIVEBORDER", PyInt_FromLong((long) wxSYS_COLOUR_INACTIVEBORDER));
PyDict_SetItemString(d,"wxSYS_COLOUR_APPWORKSPACE", PyInt_FromLong((long) wxSYS_COLOUR_APPWORKSPACE));
PyDict_SetItemString(d,"wxSYS_COLOUR_HIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_HIGHLIGHT));
PyDict_SetItemString(d,"wxSYS_COLOUR_HIGHLIGHTTEXT", PyInt_FromLong((long) wxSYS_COLOUR_HIGHLIGHTTEXT));
PyDict_SetItemString(d,"wxSYS_COLOUR_BTNFACE", PyInt_FromLong((long) wxSYS_COLOUR_BTNFACE));
PyDict_SetItemString(d,"wxSYS_COLOUR_BTNSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_BTNSHADOW));
PyDict_SetItemString(d,"wxSYS_COLOUR_GRAYTEXT", PyInt_FromLong((long) wxSYS_COLOUR_GRAYTEXT));
PyDict_SetItemString(d,"wxSYS_COLOUR_BTNTEXT", PyInt_FromLong((long) wxSYS_COLOUR_BTNTEXT));
PyDict_SetItemString(d,"wxSYS_COLOUR_INACTIVECAPTIONTEXT", PyInt_FromLong((long) wxSYS_COLOUR_INACTIVECAPTIONTEXT));
PyDict_SetItemString(d,"wxSYS_COLOUR_BTNHIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_BTNHIGHLIGHT));
PyDict_SetItemString(d,"wxSYS_COLOUR_3DDKSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_3DDKSHADOW));
PyDict_SetItemString(d,"wxSYS_COLOUR_3DLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DLIGHT));
PyDict_SetItemString(d,"wxSYS_COLOUR_INFOTEXT", PyInt_FromLong((long) wxSYS_COLOUR_INFOTEXT));
PyDict_SetItemString(d,"wxSYS_COLOUR_INFOBK", PyInt_FromLong((long) wxSYS_COLOUR_INFOBK));
PyDict_SetItemString(d,"wxSYS_COLOUR_DESKTOP", PyInt_FromLong((long) wxSYS_COLOUR_DESKTOP));
PyDict_SetItemString(d,"wxSYS_COLOUR_3DFACE", PyInt_FromLong((long) wxSYS_COLOUR_3DFACE));
PyDict_SetItemString(d,"wxSYS_COLOUR_3DSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_3DSHADOW));
PyDict_SetItemString(d,"wxSYS_COLOUR_3DHIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DHIGHLIGHT));
PyDict_SetItemString(d,"wxSYS_COLOUR_3DHILIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DHILIGHT));
PyDict_SetItemString(d,"wxSYS_COLOUR_BTNHILIGHT", PyInt_FromLong((long) wxSYS_COLOUR_BTNHILIGHT));
PyDict_SetItemString(d,"wxSYS_MOUSE_BUTTONS", PyInt_FromLong((long) wxSYS_MOUSE_BUTTONS));
PyDict_SetItemString(d,"wxSYS_BORDER_X", PyInt_FromLong((long) wxSYS_BORDER_X));
PyDict_SetItemString(d,"wxSYS_BORDER_Y", PyInt_FromLong((long) wxSYS_BORDER_Y));
PyDict_SetItemString(d,"wxSYS_CURSOR_X", PyInt_FromLong((long) wxSYS_CURSOR_X));
PyDict_SetItemString(d,"wxSYS_CURSOR_Y", PyInt_FromLong((long) wxSYS_CURSOR_Y));
PyDict_SetItemString(d,"wxSYS_DCLICK_X", PyInt_FromLong((long) wxSYS_DCLICK_X));
PyDict_SetItemString(d,"wxSYS_DCLICK_Y", PyInt_FromLong((long) wxSYS_DCLICK_Y));
PyDict_SetItemString(d,"wxSYS_DRAG_X", PyInt_FromLong((long) wxSYS_DRAG_X));
PyDict_SetItemString(d,"wxSYS_DRAG_Y", PyInt_FromLong((long) wxSYS_DRAG_Y));
PyDict_SetItemString(d,"wxSYS_EDGE_X", PyInt_FromLong((long) wxSYS_EDGE_X));
PyDict_SetItemString(d,"wxSYS_EDGE_Y", PyInt_FromLong((long) wxSYS_EDGE_Y));
PyDict_SetItemString(d,"wxSYS_HSCROLL_ARROW_X", PyInt_FromLong((long) wxSYS_HSCROLL_ARROW_X));
PyDict_SetItemString(d,"wxSYS_HSCROLL_ARROW_Y", PyInt_FromLong((long) wxSYS_HSCROLL_ARROW_Y));
PyDict_SetItemString(d,"wxSYS_HTHUMB_X", PyInt_FromLong((long) wxSYS_HTHUMB_X));
PyDict_SetItemString(d,"wxSYS_ICON_X", PyInt_FromLong((long) wxSYS_ICON_X));
PyDict_SetItemString(d,"wxSYS_ICON_Y", PyInt_FromLong((long) wxSYS_ICON_Y));
PyDict_SetItemString(d,"wxSYS_ICONSPACING_X", PyInt_FromLong((long) wxSYS_ICONSPACING_X));
PyDict_SetItemString(d,"wxSYS_ICONSPACING_Y", PyInt_FromLong((long) wxSYS_ICONSPACING_Y));
PyDict_SetItemString(d,"wxSYS_WINDOWMIN_X", PyInt_FromLong((long) wxSYS_WINDOWMIN_X));
PyDict_SetItemString(d,"wxSYS_WINDOWMIN_Y", PyInt_FromLong((long) wxSYS_WINDOWMIN_Y));
PyDict_SetItemString(d,"wxSYS_SCREEN_X", PyInt_FromLong((long) wxSYS_SCREEN_X));
PyDict_SetItemString(d,"wxSYS_SCREEN_Y", PyInt_FromLong((long) wxSYS_SCREEN_Y));
PyDict_SetItemString(d,"wxSYS_FRAMESIZE_X", PyInt_FromLong((long) wxSYS_FRAMESIZE_X));
PyDict_SetItemString(d,"wxSYS_FRAMESIZE_Y", PyInt_FromLong((long) wxSYS_FRAMESIZE_Y));
PyDict_SetItemString(d,"wxSYS_SMALLICON_X", PyInt_FromLong((long) wxSYS_SMALLICON_X));
PyDict_SetItemString(d,"wxSYS_SMALLICON_Y", PyInt_FromLong((long) wxSYS_SMALLICON_Y));
PyDict_SetItemString(d,"wxSYS_HSCROLL_Y", PyInt_FromLong((long) wxSYS_HSCROLL_Y));
PyDict_SetItemString(d,"wxSYS_VSCROLL_X", PyInt_FromLong((long) wxSYS_VSCROLL_X));
PyDict_SetItemString(d,"wxSYS_VSCROLL_ARROW_X", PyInt_FromLong((long) wxSYS_VSCROLL_ARROW_X));
PyDict_SetItemString(d,"wxSYS_VSCROLL_ARROW_Y", PyInt_FromLong((long) wxSYS_VSCROLL_ARROW_Y));
PyDict_SetItemString(d,"wxSYS_VTHUMB_Y", PyInt_FromLong((long) wxSYS_VTHUMB_Y));
PyDict_SetItemString(d,"wxSYS_CAPTION_Y", PyInt_FromLong((long) wxSYS_CAPTION_Y));
PyDict_SetItemString(d,"wxSYS_MENU_Y", PyInt_FromLong((long) wxSYS_MENU_Y));
PyDict_SetItemString(d,"wxSYS_NETWORK_PRESENT", PyInt_FromLong((long) wxSYS_NETWORK_PRESENT));
PyDict_SetItemString(d,"wxSYS_PENWINDOWS_PRESENT", PyInt_FromLong((long) wxSYS_PENWINDOWS_PRESENT));
PyDict_SetItemString(d,"wxSYS_SHOW_SOUNDS", PyInt_FromLong((long) wxSYS_SHOW_SOUNDS));
PyDict_SetItemString(d,"wxSYS_SWAP_BUTTONS", PyInt_FromLong((long) wxSYS_SWAP_BUTTONS));
/*
* These are the pointer type-equivalency mappings.
* (Used by the SWIG pointer type-checker).

View File

@@ -4,7 +4,7 @@ class wxSizePtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
def __del__(self, miscc=miscc):
if self.thisown == 1 :
miscc.delete_wxSize(self.this)
def Set(self,arg0,arg1):
@@ -71,7 +71,7 @@ class wxRealPointPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
def __del__(self, miscc=miscc):
if self.thisown == 1 :
miscc.delete_wxRealPoint(self.this)
def __setattr__(self,name,value):
@@ -102,7 +102,7 @@ class wxPointPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
def __del__(self, miscc=miscc):
if self.thisown == 1 :
miscc.delete_wxPoint(self.this)
def Set(self,arg0,arg1):
@@ -141,7 +141,7 @@ class wxRectPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
def __del__(self, miscc=miscc):
if self.thisown == 1 :
miscc.delete_wxRect(self.this)
def GetX(self):
@@ -233,7 +233,7 @@ class wxPyTimerPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
def __del__(self, miscc=miscc):
if self.thisown == 1 :
miscc.delete_wxPyTimer(self.this)
def Interval(self):
@@ -360,7 +360,7 @@ class wxRegionPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
def __del__(self, miscc=miscc):
if self.thisown == 1 :
miscc.delete_wxRegion(self.this)
def Clear(self):
@@ -406,7 +406,7 @@ class wxRegionIteratorPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
def __del__(self, miscc=miscc):
if self.thisown == 1 :
miscc.delete_wxRegionIterator(self.this)
def GetX(self):
@@ -535,6 +535,16 @@ def wxMessageBox(arg0,*args):
val = apply(miscc.wxMessageBox,(arg0,)+args)
return val
def wxGetNumberFromUser(arg0,arg1,arg2,arg3,*args):
argl = map(None,args)
try: argl[2] = argl[2].this
except: pass
try: argl[3] = argl[3].this
except: pass
args = tuple(argl)
val = apply(miscc.wxGetNumberFromUser,(arg0,arg1,arg2,arg3,)+args)
return val
wxColourDisplay = miscc.wxColourDisplay
wxDisplayDepth = miscc.wxDisplayDepth
@@ -612,6 +622,20 @@ wxResourceParseFile = miscc.wxResourceParseFile
wxResourceParseString = miscc.wxResourceParseString
def wxSystemSettings_GetSystemColour(arg0):
val = miscc.wxSystemSettings_GetSystemColour(arg0)
val = wxColourPtr(val)
val.thisown = 1
return val
def wxSystemSettings_GetSystemFont(arg0):
val = miscc.wxSystemSettings_GetSystemFont(arg0)
val = wxFontPtr(val)
val.thisown = 1
return val
wxSystemSettings_GetSystemMetric = miscc.wxSystemSettings_GetSystemMetric
#-------------- VARIABLE WRAPPERS ------------------
@@ -638,3 +662,89 @@ wxAbsolute = miscc.wxAbsolute
wxOutRegion = miscc.wxOutRegion
wxPartRegion = miscc.wxPartRegion
wxInRegion = miscc.wxInRegion
wxSYS_WHITE_BRUSH = miscc.wxSYS_WHITE_BRUSH
wxSYS_LTGRAY_BRUSH = miscc.wxSYS_LTGRAY_BRUSH
wxSYS_GRAY_BRUSH = miscc.wxSYS_GRAY_BRUSH
wxSYS_DKGRAY_BRUSH = miscc.wxSYS_DKGRAY_BRUSH
wxSYS_BLACK_BRUSH = miscc.wxSYS_BLACK_BRUSH
wxSYS_NULL_BRUSH = miscc.wxSYS_NULL_BRUSH
wxSYS_HOLLOW_BRUSH = miscc.wxSYS_HOLLOW_BRUSH
wxSYS_WHITE_PEN = miscc.wxSYS_WHITE_PEN
wxSYS_BLACK_PEN = miscc.wxSYS_BLACK_PEN
wxSYS_NULL_PEN = miscc.wxSYS_NULL_PEN
wxSYS_OEM_FIXED_FONT = miscc.wxSYS_OEM_FIXED_FONT
wxSYS_ANSI_FIXED_FONT = miscc.wxSYS_ANSI_FIXED_FONT
wxSYS_ANSI_VAR_FONT = miscc.wxSYS_ANSI_VAR_FONT
wxSYS_SYSTEM_FONT = miscc.wxSYS_SYSTEM_FONT
wxSYS_DEVICE_DEFAULT_FONT = miscc.wxSYS_DEVICE_DEFAULT_FONT
wxSYS_DEFAULT_PALETTE = miscc.wxSYS_DEFAULT_PALETTE
wxSYS_SYSTEM_FIXED_FONT = miscc.wxSYS_SYSTEM_FIXED_FONT
wxSYS_DEFAULT_GUI_FONT = miscc.wxSYS_DEFAULT_GUI_FONT
wxSYS_COLOUR_SCROLLBAR = miscc.wxSYS_COLOUR_SCROLLBAR
wxSYS_COLOUR_BACKGROUND = miscc.wxSYS_COLOUR_BACKGROUND
wxSYS_COLOUR_ACTIVECAPTION = miscc.wxSYS_COLOUR_ACTIVECAPTION
wxSYS_COLOUR_INACTIVECAPTION = miscc.wxSYS_COLOUR_INACTIVECAPTION
wxSYS_COLOUR_MENU = miscc.wxSYS_COLOUR_MENU
wxSYS_COLOUR_WINDOW = miscc.wxSYS_COLOUR_WINDOW
wxSYS_COLOUR_WINDOWFRAME = miscc.wxSYS_COLOUR_WINDOWFRAME
wxSYS_COLOUR_MENUTEXT = miscc.wxSYS_COLOUR_MENUTEXT
wxSYS_COLOUR_WINDOWTEXT = miscc.wxSYS_COLOUR_WINDOWTEXT
wxSYS_COLOUR_CAPTIONTEXT = miscc.wxSYS_COLOUR_CAPTIONTEXT
wxSYS_COLOUR_ACTIVEBORDER = miscc.wxSYS_COLOUR_ACTIVEBORDER
wxSYS_COLOUR_INACTIVEBORDER = miscc.wxSYS_COLOUR_INACTIVEBORDER
wxSYS_COLOUR_APPWORKSPACE = miscc.wxSYS_COLOUR_APPWORKSPACE
wxSYS_COLOUR_HIGHLIGHT = miscc.wxSYS_COLOUR_HIGHLIGHT
wxSYS_COLOUR_HIGHLIGHTTEXT = miscc.wxSYS_COLOUR_HIGHLIGHTTEXT
wxSYS_COLOUR_BTNFACE = miscc.wxSYS_COLOUR_BTNFACE
wxSYS_COLOUR_BTNSHADOW = miscc.wxSYS_COLOUR_BTNSHADOW
wxSYS_COLOUR_GRAYTEXT = miscc.wxSYS_COLOUR_GRAYTEXT
wxSYS_COLOUR_BTNTEXT = miscc.wxSYS_COLOUR_BTNTEXT
wxSYS_COLOUR_INACTIVECAPTIONTEXT = miscc.wxSYS_COLOUR_INACTIVECAPTIONTEXT
wxSYS_COLOUR_BTNHIGHLIGHT = miscc.wxSYS_COLOUR_BTNHIGHLIGHT
wxSYS_COLOUR_3DDKSHADOW = miscc.wxSYS_COLOUR_3DDKSHADOW
wxSYS_COLOUR_3DLIGHT = miscc.wxSYS_COLOUR_3DLIGHT
wxSYS_COLOUR_INFOTEXT = miscc.wxSYS_COLOUR_INFOTEXT
wxSYS_COLOUR_INFOBK = miscc.wxSYS_COLOUR_INFOBK
wxSYS_COLOUR_DESKTOP = miscc.wxSYS_COLOUR_DESKTOP
wxSYS_COLOUR_3DFACE = miscc.wxSYS_COLOUR_3DFACE
wxSYS_COLOUR_3DSHADOW = miscc.wxSYS_COLOUR_3DSHADOW
wxSYS_COLOUR_3DHIGHLIGHT = miscc.wxSYS_COLOUR_3DHIGHLIGHT
wxSYS_COLOUR_3DHILIGHT = miscc.wxSYS_COLOUR_3DHILIGHT
wxSYS_COLOUR_BTNHILIGHT = miscc.wxSYS_COLOUR_BTNHILIGHT
wxSYS_MOUSE_BUTTONS = miscc.wxSYS_MOUSE_BUTTONS
wxSYS_BORDER_X = miscc.wxSYS_BORDER_X
wxSYS_BORDER_Y = miscc.wxSYS_BORDER_Y
wxSYS_CURSOR_X = miscc.wxSYS_CURSOR_X
wxSYS_CURSOR_Y = miscc.wxSYS_CURSOR_Y
wxSYS_DCLICK_X = miscc.wxSYS_DCLICK_X
wxSYS_DCLICK_Y = miscc.wxSYS_DCLICK_Y
wxSYS_DRAG_X = miscc.wxSYS_DRAG_X
wxSYS_DRAG_Y = miscc.wxSYS_DRAG_Y
wxSYS_EDGE_X = miscc.wxSYS_EDGE_X
wxSYS_EDGE_Y = miscc.wxSYS_EDGE_Y
wxSYS_HSCROLL_ARROW_X = miscc.wxSYS_HSCROLL_ARROW_X
wxSYS_HSCROLL_ARROW_Y = miscc.wxSYS_HSCROLL_ARROW_Y
wxSYS_HTHUMB_X = miscc.wxSYS_HTHUMB_X
wxSYS_ICON_X = miscc.wxSYS_ICON_X
wxSYS_ICON_Y = miscc.wxSYS_ICON_Y
wxSYS_ICONSPACING_X = miscc.wxSYS_ICONSPACING_X
wxSYS_ICONSPACING_Y = miscc.wxSYS_ICONSPACING_Y
wxSYS_WINDOWMIN_X = miscc.wxSYS_WINDOWMIN_X
wxSYS_WINDOWMIN_Y = miscc.wxSYS_WINDOWMIN_Y
wxSYS_SCREEN_X = miscc.wxSYS_SCREEN_X
wxSYS_SCREEN_Y = miscc.wxSYS_SCREEN_Y
wxSYS_FRAMESIZE_X = miscc.wxSYS_FRAMESIZE_X
wxSYS_FRAMESIZE_Y = miscc.wxSYS_FRAMESIZE_Y
wxSYS_SMALLICON_X = miscc.wxSYS_SMALLICON_X
wxSYS_SMALLICON_Y = miscc.wxSYS_SMALLICON_Y
wxSYS_HSCROLL_Y = miscc.wxSYS_HSCROLL_Y
wxSYS_VSCROLL_X = miscc.wxSYS_VSCROLL_X
wxSYS_VSCROLL_ARROW_X = miscc.wxSYS_VSCROLL_ARROW_X
wxSYS_VSCROLL_ARROW_Y = miscc.wxSYS_VSCROLL_ARROW_Y
wxSYS_VTHUMB_Y = miscc.wxSYS_VTHUMB_Y
wxSYS_CAPTION_Y = miscc.wxSYS_CAPTION_Y
wxSYS_MENU_Y = miscc.wxSYS_MENU_Y
wxSYS_NETWORK_PRESENT = miscc.wxSYS_NETWORK_PRESENT
wxSYS_PENWINDOWS_PRESENT = miscc.wxSYS_PENWINDOWS_PRESENT
wxSYS_SHOW_SOUNDS = miscc.wxSYS_SHOW_SOUNDS
wxSYS_SWAP_BUTTONS = miscc.wxSYS_SWAP_BUTTONS

View File

@@ -405,7 +405,6 @@ SWIGEXPORT(void,initmisc2c)() {
SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0);
SWIG_RegisterMapping("_wxMask","_class_wxMask",0);
SWIG_RegisterMapping("_wxToolTip","_class_wxToolTip",0);
SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0);
SWIG_RegisterMapping("_wxPen","_class_wxPen",0);
SWIG_RegisterMapping("_byte","_unsigned_char",0);
SWIG_RegisterMapping("_long","_wxDash",0);
@@ -488,7 +487,6 @@ SWIGEXPORT(void,initmisc2c)() {
SWIG_RegisterMapping("_unsigned_int","_int",0);
SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0);
SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0);
SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0);
SWIG_RegisterMapping("_class_wxPen","_wxPen",0);
SWIG_RegisterMapping("_short","_WXTYPE",0);
SWIG_RegisterMapping("_short","_unsigned_short",0);

View File

@@ -4007,7 +4007,6 @@ SWIGEXPORT(void,initprintfwc)() {
SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0);
SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0);
SWIG_RegisterMapping("_wxMask","_class_wxMask",0);
SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0);
SWIG_RegisterMapping("_class_wxColourData","_wxColourData",0);
SWIG_RegisterMapping("_class_wxPageSetupDialogData","_wxPageSetupDialogData",0);
SWIG_RegisterMapping("_wxPrinter","_class_wxPrinter",0);
@@ -4197,7 +4196,6 @@ SWIGEXPORT(void,initprintfwc)() {
SWIG_RegisterMapping("_wxDialog","_class_wxPageSetupDialog",SwigwxPageSetupDialogTowxDialog);
SWIG_RegisterMapping("_wxDialog","_wxPageSetupDialog",SwigwxPageSetupDialogTowxDialog);
SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0);
SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0);
SWIG_RegisterMapping("_class_wxPen","_wxPen",0);
SWIG_RegisterMapping("_class_wxFileDialog","_wxFileDialog",0);
SWIG_RegisterMapping("_short","_WXTYPE",0);

View File

@@ -21,7 +21,7 @@ class wxPrintDataPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
def __del__(self, printfwc=printfwc):
if self.thisown == 1 :
printfwc.delete_wxPrintData(self.this)
def GetNoCopies(self):
@@ -93,7 +93,7 @@ class wxPageSetupDialogDataPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
def __del__(self, printfwc=printfwc):
if self.thisown == 1 :
printfwc.delete_wxPageSetupDialogData(self.this)
def EnableHelp(self,arg0):
@@ -232,7 +232,7 @@ class wxPrintDialogDataPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
def __del__(self, printfwc=printfwc):
if self.thisown == 1 :
printfwc.delete_wxPrintDialogData(self.this)
def EnableHelp(self,arg0):
@@ -409,7 +409,7 @@ class wxPrinterPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
def __del__(self, printfwc=printfwc):
if self.thisown == 1 :
printfwc.delete_wxPrinter(self.this)
def CreateAbortWindow(self,arg0,arg1):

View File

@@ -1947,7 +1947,6 @@ SWIGEXPORT(void,initstattoolc)() {
SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0);
SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0);
SWIG_RegisterMapping("_wxMask","_class_wxMask",0);
SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0);
SWIG_RegisterMapping("_wxPen","_class_wxPen",0);
SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0);
SWIG_RegisterMapping("_byte","_unsigned_char",0);
@@ -2095,7 +2094,6 @@ SWIGEXPORT(void,initstattoolc)() {
SWIG_RegisterMapping("_unsigned_int","_int",0);
SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0);
SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0);
SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0);
SWIG_RegisterMapping("_class_wxPen","_wxPen",0);
SWIG_RegisterMapping("_short","_WXTYPE",0);
SWIG_RegisterMapping("_short","_unsigned_short",0);

View File

@@ -65,7 +65,7 @@ class wxToolBarToolPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
def __del__(self, stattoolc=stattoolc):
if self.thisown == 1 :
stattoolc.delete_wxToolBarTool(self.this)
def __setattr__(self,name,value):

View File

@@ -4,7 +4,7 @@ class wxConfigPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
def __del__(self, utilsc=utilsc):
if self.thisown == 1 :
utilsc.delete_wxConfig(self.this)
def DontCreateOnDemand(self):

View File

@@ -270,7 +270,7 @@ static PyObject *_wrap_wxWindow_CaptureMouse(PyObject *self, PyObject *args) {
static PyObject *_wrap_wxWindow_Center(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxWindow * _arg0;
int _arg1 = (wxHORIZONTAL);
int _arg1 = (wxBOTH);
char * _argc0 = 0;
self = self;
@@ -296,7 +296,7 @@ static PyObject *_wrap_wxWindow_Center(PyObject *self, PyObject *args) {
static PyObject *_wrap_wxWindow_Centre(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxWindow * _arg0;
int _arg1 = (wxHORIZONTAL);
int _arg1 = (wxBOTH);
char * _argc0 = 0;
self = self;
@@ -322,7 +322,7 @@ static PyObject *_wrap_wxWindow_Centre(PyObject *self, PyObject *args) {
static PyObject *_wrap_wxWindow_CentreOnParent(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxWindow * _arg0;
int _arg1 = (wxHORIZONTAL);
int _arg1 = (wxBOTH);
char * _argc0 = 0;
self = self;
@@ -348,7 +348,7 @@ static PyObject *_wrap_wxWindow_CentreOnParent(PyObject *self, PyObject *args) {
static PyObject *_wrap_wxWindow_CenterOnParent(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxWindow * _arg0;
int _arg1 = (wxHORIZONTAL);
int _arg1 = (wxBOTH);
char * _argc0 = 0;
self = self;
@@ -1482,6 +1482,33 @@ static PyObject *_wrap_wxWindow_GetTitle(PyObject *self, PyObject *args) {
return _resultobj;
}
#define wxWindow_GetUpdateRegion(_swigobj) (_swigobj->GetUpdateRegion())
static PyObject *_wrap_wxWindow_GetUpdateRegion(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxRegion * _result;
wxWindow * _arg0;
char * _argc0 = 0;
char _ptemp[128];
self = self;
if(!PyArg_ParseTuple(args,"s:wxWindow_GetUpdateRegion",&_argc0))
return NULL;
if (_argc0) {
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetUpdateRegion. Expected _wxWindow_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = new wxRegion (wxWindow_GetUpdateRegion(_arg0));
wxPy_END_ALLOW_THREADS;
} SWIG_MakePtr(_ptemp, (void *) _result,"_wxRegion_p");
_resultobj = Py_BuildValue("s",_ptemp);
return _resultobj;
}
#define wxWindow_GetWindowStyleFlag(_swigobj) (_swigobj->GetWindowStyleFlag())
static PyObject *_wrap_wxWindow_GetWindowStyleFlag(PyObject *self, PyObject *args) {
PyObject * _resultobj;
@@ -1849,8 +1876,8 @@ static PyObject *_wrap_wxWindow_Move(PyObject *self, PyObject *args) {
return _resultobj;
}
#define wxWindow_PopupMenu(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->PopupMenu(_swigarg0,_swigarg1,_swigarg2))
static PyObject *_wrap_wxWindow_PopupMenu(PyObject *self, PyObject *args) {
#define wxWindow_PopupMenuXY(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->PopupMenu(_swigarg0,_swigarg1,_swigarg2))
static PyObject *_wrap_wxWindow_PopupMenuXY(PyObject *self, PyObject *args) {
PyObject * _resultobj;
bool _result;
wxWindow * _arg0;
@@ -1861,7 +1888,42 @@ static PyObject *_wrap_wxWindow_PopupMenu(PyObject *self, PyObject *args) {
char * _argc1 = 0;
self = self;
if(!PyArg_ParseTuple(args,"ssii:wxWindow_PopupMenu",&_argc0,&_argc1,&_arg2,&_arg3))
if(!PyArg_ParseTuple(args,"ssii:wxWindow_PopupMenuXY",&_argc0,&_argc1,&_arg2,&_arg3))
return NULL;
if (_argc0) {
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_PopupMenuXY. Expected _wxWindow_p.");
return NULL;
}
}
if (_argc1) {
if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxMenu_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_PopupMenuXY. Expected _wxMenu_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxWindow_PopupMenuXY(_arg0,_arg1,_arg2,_arg3);
wxPy_END_ALLOW_THREADS;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxWindow_PopupMenu(_swigobj,_swigarg0,_swigarg1) (_swigobj->PopupMenu(_swigarg0,_swigarg1))
static PyObject *_wrap_wxWindow_PopupMenu(PyObject *self, PyObject *args) {
PyObject * _resultobj;
bool _result;
wxWindow * _arg0;
wxMenu * _arg1;
wxPoint * _arg2;
char * _argc0 = 0;
char * _argc1 = 0;
char * _argc2 = 0;
self = self;
if(!PyArg_ParseTuple(args,"sss:wxWindow_PopupMenu",&_argc0,&_argc1,&_argc2))
return NULL;
if (_argc0) {
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) {
@@ -1875,9 +1937,15 @@ static PyObject *_wrap_wxWindow_PopupMenu(PyObject *self, PyObject *args) {
return NULL;
}
}
if (_argc2) {
if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxPoint_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxWindow_PopupMenu. Expected _wxPoint_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxWindow_PopupMenu(_arg0,_arg1,_arg2,_arg3);
_result = (bool )wxWindow_PopupMenu(_arg0,_arg1,*_arg2);
wxPy_END_ALLOW_THREADS;
} _resultobj = Py_BuildValue("i",_result);
@@ -4016,16 +4084,17 @@ static void *SwigwxMenuTowxEvtHandler(void *ptr) {
return (void *) dest;
}
#define new_wxMenu(_swigarg0) (new wxMenu(_swigarg0))
#define new_wxMenu(_swigarg0,_swigarg1) (new wxMenu(_swigarg0,_swigarg1))
static PyObject *_wrap_new_wxMenu(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxMenu * _result;
wxString * _arg0 = &wxPyEmptyStr;
long _arg1 = 0;
PyObject * _obj0 = 0;
char _ptemp[128];
self = self;
if(!PyArg_ParseTuple(args,"|O:new_wxMenu",&_obj0))
if(!PyArg_ParseTuple(args,"|Ol:new_wxMenu",&_obj0,&_arg1))
return NULL;
if (_obj0)
{
@@ -4037,7 +4106,7 @@ static PyObject *_wrap_new_wxMenu(PyObject *self, PyObject *args) {
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxMenu *)new_wxMenu(*_arg0);
_result = (wxMenu *)new_wxMenu(*_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
} SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenu_p");
@@ -4598,79 +4667,32 @@ static PyObject *_wrap_wxMenu_SetLabel(PyObject *self, PyObject *args) {
return _resultobj;
}
static void *SwigwxPyMenuTowxMenu(void *ptr) {
wxPyMenu *src;
wxMenu *dest;
src = (wxPyMenu *) ptr;
dest = (wxMenu *) src;
return (void *) dest;
}
static void *SwigwxPyMenuTowxEvtHandler(void *ptr) {
wxPyMenu *src;
wxEvtHandler *dest;
src = (wxPyMenu *) ptr;
dest = (wxEvtHandler *) src;
return (void *) dest;
}
#define new_wxPyMenu(_swigarg0,_swigarg1) (new wxPyMenu(_swigarg0,_swigarg1))
static PyObject *_wrap_new_wxPyMenu(PyObject *self, PyObject *args) {
#define wxMenu_UpdateUI(_swigobj,_swigarg0) (_swigobj->UpdateUI(_swigarg0))
static PyObject *_wrap_wxMenu_UpdateUI(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxPyMenu * _result;
wxString * _arg0 = &wxPyEmptyStr;
PyObject * _arg1 = NULL;
PyObject * _obj0 = 0;
PyObject * _obj1 = 0;
char _ptemp[128];
self = self;
if(!PyArg_ParseTuple(args,"|OO:new_wxPyMenu",&_obj0,&_obj1))
return NULL;
if (_obj0)
{
if (!PyString_Check(_obj0)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
_arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0));
}
if (_obj1)
{
_arg1 = _obj1;
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxPyMenu *)new_wxPyMenu(*_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
} SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyMenu_p");
_resultobj = Py_BuildValue("s",_ptemp);
{
if (_obj0)
delete _arg0;
}
return _resultobj;
}
#define delete_wxPyMenu(_swigobj) (delete _swigobj)
static PyObject *_wrap_delete_wxPyMenu(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxPyMenu * _arg0;
wxMenu * _arg0;
wxEvtHandler * _arg1 = NULL;
char * _argc0 = 0;
char * _argc1 = 0;
self = self;
if(!PyArg_ParseTuple(args,"s:delete_wxPyMenu",&_argc0))
if(!PyArg_ParseTuple(args,"s|s:wxMenu_UpdateUI",&_argc0,&_argc1))
return NULL;
if (_argc0) {
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyMenu_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxPyMenu. Expected _wxPyMenu_p.");
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_UpdateUI. Expected _wxMenu_p.");
return NULL;
}
}
if (_argc1) {
if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxEvtHandler_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMenu_UpdateUI. Expected _wxEvtHandler_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
delete_wxPyMenu(_arg0);
wxMenu_UpdateUI(_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
@@ -5380,8 +5402,7 @@ static PyMethodDef windowscMethods[] = {
{ "wxMenuBar_Check", _wrap_wxMenuBar_Check, 1 },
{ "wxMenuBar_Append", _wrap_wxMenuBar_Append, 1 },
{ "new_wxMenuBar", _wrap_new_wxMenuBar, 1 },
{ "delete_wxPyMenu", _wrap_delete_wxPyMenu, 1 },
{ "new_wxPyMenu", _wrap_new_wxPyMenu, 1 },
{ "wxMenu_UpdateUI", _wrap_wxMenu_UpdateUI, 1 },
{ "wxMenu_SetLabel", _wrap_wxMenu_SetLabel, 1 },
{ "wxMenu_IsEnabled", _wrap_wxMenu_IsEnabled, 1 },
{ "wxMenu_IsChecked", _wrap_wxMenu_IsChecked, 1 },
@@ -5466,6 +5487,7 @@ static PyMethodDef windowscMethods[] = {
{ "wxWindow_Refresh", _wrap_wxWindow_Refresh, 1 },
{ "wxWindow_Raise", _wrap_wxWindow_Raise, 1 },
{ "wxWindow_PopupMenu", _wrap_wxWindow_PopupMenu, 1 },
{ "wxWindow_PopupMenuXY", _wrap_wxWindow_PopupMenuXY, 1 },
{ "wxWindow_Move", _wrap_wxWindow_Move, 1 },
{ "wxWindow_MoveXY", _wrap_wxWindow_MoveXY, 1 },
{ "wxWindow_MakeModal", _wrap_wxWindow_MakeModal, 1 },
@@ -5479,6 +5501,7 @@ static PyMethodDef windowscMethods[] = {
{ "wxWindow_InitDialog", _wrap_wxWindow_InitDialog, 1 },
{ "wxWindow_Hide", _wrap_wxWindow_Hide, 1 },
{ "wxWindow_GetWindowStyleFlag", _wrap_wxWindow_GetWindowStyleFlag, 1 },
{ "wxWindow_GetUpdateRegion", _wrap_wxWindow_GetUpdateRegion, 1 },
{ "wxWindow_GetTitle", _wrap_wxWindow_GetTitle, 1 },
{ "wxWindow_GetFullTextExtent", _wrap_wxWindow_GetFullTextExtent, 1 },
{ "wxWindow_GetTextExtent", _wrap_wxWindow_GetTextExtent, 1 },
@@ -5549,8 +5572,6 @@ SWIGEXPORT(void,initwindowsc)() {
SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0);
SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxMenuBar",SwigwxMenuBarTowxEvtHandler);
SWIG_RegisterMapping("_class_wxEvtHandler","_wxMenuBar",SwigwxMenuBarTowxEvtHandler);
SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxPyMenu",SwigwxPyMenuTowxEvtHandler);
SWIG_RegisterMapping("_class_wxEvtHandler","_wxPyMenu",SwigwxPyMenuTowxEvtHandler);
SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxMenu",SwigwxMenuTowxEvtHandler);
SWIG_RegisterMapping("_class_wxEvtHandler","_wxMenu",SwigwxMenuTowxEvtHandler);
SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxScrolledWindow",SwigwxScrolledWindowTowxEvtHandler);
@@ -5565,7 +5586,6 @@ SWIGEXPORT(void,initwindowsc)() {
SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0);
SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0);
SWIG_RegisterMapping("_wxMask","_class_wxMask",0);
SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0);
SWIG_RegisterMapping("_wxPen","_class_wxPen",0);
SWIG_RegisterMapping("_byte","_unsigned_char",0);
SWIG_RegisterMapping("_long","_wxDash",0);
@@ -5624,8 +5644,6 @@ SWIGEXPORT(void,initwindowsc)() {
SWIG_RegisterMapping("_signed_int","_wxWindowID",0);
SWIG_RegisterMapping("_signed_int","_int",0);
SWIG_RegisterMapping("_wxLayoutConstraints","_class_wxLayoutConstraints",0);
SWIG_RegisterMapping("_wxMenu","_class_wxPyMenu",SwigwxPyMenuTowxMenu);
SWIG_RegisterMapping("_wxMenu","_wxPyMenu",SwigwxPyMenuTowxMenu);
SWIG_RegisterMapping("_wxMenu","_class_wxMenu",0);
SWIG_RegisterMapping("_wxScreenDC","_class_wxScreenDC",0);
SWIG_RegisterMapping("_WXTYPE","_short",0);
@@ -5655,8 +5673,6 @@ SWIGEXPORT(void,initwindowsc)() {
SWIG_RegisterMapping("_wxPostScriptDC","_class_wxPostScriptDC",0);
SWIG_RegisterMapping("_wxScrolledWindow","_class_wxScrolledWindow",0);
SWIG_RegisterMapping("_unsigned_char","_byte",0);
SWIG_RegisterMapping("_class_wxMenu","_class_wxPyMenu",SwigwxPyMenuTowxMenu);
SWIG_RegisterMapping("_class_wxMenu","_wxPyMenu",SwigwxPyMenuTowxMenu);
SWIG_RegisterMapping("_class_wxMenu","_wxMenu",0);
SWIG_RegisterMapping("_unsigned_int","_wxPrintQuality",0);
SWIG_RegisterMapping("_unsigned_int","_size_t",0);
@@ -5665,7 +5681,6 @@ SWIGEXPORT(void,initwindowsc)() {
SWIG_RegisterMapping("_unsigned_int","_int",0);
SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0);
SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0);
SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0);
SWIG_RegisterMapping("_class_wxPen","_wxPen",0);
SWIG_RegisterMapping("_short","_WXTYPE",0);
SWIG_RegisterMapping("_short","_unsigned_short",0);
@@ -5701,8 +5716,6 @@ SWIGEXPORT(void,initwindowsc)() {
SWIG_RegisterMapping("_wxMenuBar","_class_wxMenuBar",0);
SWIG_RegisterMapping("_wxEvtHandler","_class_wxMenuBar",SwigwxMenuBarTowxEvtHandler);
SWIG_RegisterMapping("_wxEvtHandler","_wxMenuBar",SwigwxMenuBarTowxEvtHandler);
SWIG_RegisterMapping("_wxEvtHandler","_class_wxPyMenu",SwigwxPyMenuTowxEvtHandler);
SWIG_RegisterMapping("_wxEvtHandler","_wxPyMenu",SwigwxPyMenuTowxEvtHandler);
SWIG_RegisterMapping("_wxEvtHandler","_class_wxMenu",SwigwxMenuTowxEvtHandler);
SWIG_RegisterMapping("_wxEvtHandler","_wxMenu",SwigwxMenuTowxEvtHandler);
SWIG_RegisterMapping("_wxEvtHandler","_class_wxScrolledWindow",SwigwxScrolledWindowTowxEvtHandler);

View File

@@ -182,6 +182,11 @@ class wxWindowPtr(wxEvtHandlerPtr):
def GetTitle(self):
val = windowsc.wxWindow_GetTitle(self.this)
return val
def GetUpdateRegion(self):
val = windowsc.wxWindow_GetUpdateRegion(self.this)
val = wxRegionPtr(val)
val.thisown = 1
return val
def GetWindowStyleFlag(self):
val = windowsc.wxWindow_GetWindowStyleFlag(self.this)
return val
@@ -221,8 +226,11 @@ class wxWindowPtr(wxEvtHandlerPtr):
def Move(self,arg0):
val = windowsc.wxWindow_Move(self.this,arg0.this)
return val
def PopupMenu(self,arg0,arg1,arg2):
val = windowsc.wxWindow_PopupMenu(self.this,arg0.this,arg1,arg2)
def PopupMenuXY(self,arg0,arg1,arg2):
val = windowsc.wxWindow_PopupMenuXY(self.this,arg0.this,arg1,arg2)
return val
def PopupMenu(self,arg0,arg1):
val = windowsc.wxWindow_PopupMenu(self.this,arg0.this,arg1.this)
return val
def Raise(self):
val = windowsc.wxWindow_Raise(self.this)
@@ -578,6 +586,13 @@ class wxMenuPtr(wxEvtHandlerPtr):
def SetLabel(self,arg0,arg1):
val = windowsc.wxMenu_SetLabel(self.this,arg0,arg1)
return val
def UpdateUI(self,*args):
argl = map(None,args)
try: argl[0] = argl[0].this
except: pass
args = tuple(argl)
val = apply(windowsc.wxMenu_UpdateUI,(self.this,)+args)
return val
def __repr__(self):
return "<C wxMenu instance>"
class wxMenu(wxMenuPtr):
@@ -588,23 +603,6 @@ class wxMenu(wxMenuPtr):
class wxPyMenuPtr(wxMenuPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
if self.thisown == 1 :
windowsc.delete_wxPyMenu(self.this)
def __repr__(self):
return "<C wxPyMenu instance>"
class wxPyMenu(wxPyMenuPtr):
def __init__(self,*args) :
self.this = apply(windowsc.new_wxPyMenu,()+args)
self.thisown = 1
class wxMenuBarPtr(wxEvtHandlerPtr):
def __init__(self,this):
self.this = this

View File

@@ -1083,6 +1083,58 @@ static PyObject *_wrap_wxGrid_GetDefCellBackgroundColour(PyObject *self, PyObjec
return _resultobj;
}
static PyObject * wxGrid_GetCells(wxGrid *self) {
int row, col;
PyObject* rows = PyList_New(0);
for (row=0; row < self->GetRows(); row++) {
PyObject* rowList = PyList_New(0);
for (col=0; col < self->GetCols(); col++) {
wxGridCell* cell = self->GetCell(row, col);
#ifdef WXP_WITH_THREAD
PyEval_RestoreThread(wxPyEventThreadState);
wxPyInEvent = true;
#endif
PyObject* pyCell = wxPyConstructObject(cell, "wxGridCell");
#ifdef WXP_WITH_THREAD
PyEval_SaveThread();
wxPyInEvent = false;
#endif
if (PyList_Append(rowList, pyCell) == -1)
return NULL;
}
if (PyList_Append(rows, rowList) == -1)
return NULL;
}
return rows;
}
static PyObject *_wrap_wxGrid_GetCells(PyObject *self, PyObject *args) {
PyObject * _resultobj;
PyObject * _result;
wxGrid * _arg0;
char * _argc0 = 0;
self = self;
if(!PyArg_ParseTuple(args,"s:wxGrid_GetCells",&_argc0))
return NULL;
if (_argc0) {
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCells. Expected _wxGrid_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (PyObject *)wxGrid_GetCells(_arg0);
wxPy_END_ALLOW_THREADS;
}{
_resultobj = _result;
}
return _resultobj;
}
#define wxGrid_GetCellTextColour(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCellTextColour(_swigarg0,_swigarg1))
static PyObject *_wrap_wxGrid_GetCellTextColour(PyObject *self, PyObject *args) {
PyObject * _resultobj;
@@ -2476,6 +2528,57 @@ static PyObject *_wrap_wxGrid_UpdateDimensions(PyObject *self, PyObject *args) {
return _resultobj;
}
#define wxGrid_GetEditInPlace(_swigobj) (_swigobj->GetEditInPlace())
static PyObject *_wrap_wxGrid_GetEditInPlace(PyObject *self, PyObject *args) {
PyObject * _resultobj;
bool _result;
wxGrid * _arg0;
char * _argc0 = 0;
self = self;
if(!PyArg_ParseTuple(args,"s:wxGrid_GetEditInPlace",&_argc0))
return NULL;
if (_argc0) {
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetEditInPlace. Expected _wxGrid_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxGrid_GetEditInPlace(_arg0);
wxPy_END_ALLOW_THREADS;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxGrid_SetEditInPlace(_swigobj,_swigarg0) (_swigobj->SetEditInPlace(_swigarg0))
static PyObject *_wrap_wxGrid_SetEditInPlace(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxGrid * _arg0;
int _arg1 = (1);
char * _argc0 = 0;
self = self;
if(!PyArg_ParseTuple(args,"s|i:wxGrid_SetEditInPlace",&_argc0,&_arg1))
return NULL;
if (_argc0) {
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetEditInPlace. Expected _wxGrid_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxGrid_SetEditInPlace(_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
static void *SwigwxGridEventTowxEvent(void *ptr) {
wxGridEvent *src;
wxEvent *dest;
@@ -4296,6 +4399,8 @@ static PyMethodDef windows2cMethods[] = {
{ "wxGridEvent_m_col_set", _wrap_wxGridEvent_m_col_set, 1 },
{ "wxGridEvent_m_row_get", _wrap_wxGridEvent_m_row_get, 1 },
{ "wxGridEvent_m_row_set", _wrap_wxGridEvent_m_row_set, 1 },
{ "wxGrid_SetEditInPlace", _wrap_wxGrid_SetEditInPlace, 1 },
{ "wxGrid_GetEditInPlace", _wrap_wxGrid_GetEditInPlace, 1 },
{ "wxGrid_UpdateDimensions", _wrap_wxGrid_UpdateDimensions, 1 },
{ "wxGrid_SetRowHeight", _wrap_wxGrid_SetRowHeight, 1 },
{ "wxGrid_SetLabelValue", _wrap_wxGrid_SetLabelValue, 1 },
@@ -4344,6 +4449,7 @@ static PyMethodDef windows2cMethods[] = {
{ "wxGrid_GetCellTextFont", _wrap_wxGrid_GetCellTextFont, 1 },
{ "wxGrid_GetDefCellTextColour", _wrap_wxGrid_GetDefCellTextColour, 1 },
{ "wxGrid_GetCellTextColour", _wrap_wxGrid_GetCellTextColour, 1 },
{ "wxGrid_GetCells", _wrap_wxGrid_GetCells, 1 },
{ "wxGrid_GetDefCellBackgroundColour", _wrap_wxGrid_GetDefCellBackgroundColour, 1 },
{ "wxGrid_GetCellBackgroundColour", _wrap_wxGrid_GetCellBackgroundColour, 1 },
{ "wxGrid_GetDefCellAlignment", _wrap_wxGrid_GetDefCellAlignment, 1 },
@@ -4438,7 +4544,6 @@ SWIGEXPORT(void,initwindows2c)() {
SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0);
SWIG_RegisterMapping("_wxMask","_class_wxMask",0);
SWIG_RegisterMapping("_wxGrid","_class_wxGrid",0);
SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0);
SWIG_RegisterMapping("_wxPen","_class_wxPen",0);
SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0);
SWIG_RegisterMapping("_byte","_unsigned_char",0);
@@ -4607,7 +4712,6 @@ SWIGEXPORT(void,initwindows2c)() {
SWIG_RegisterMapping("_unsigned_int","_int",0);
SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0);
SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0);
SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0);
SWIG_RegisterMapping("_class_wxPen","_wxPen",0);
SWIG_RegisterMapping("_short","_WXTYPE",0);
SWIG_RegisterMapping("_short","_unsigned_short",0);

View File

@@ -15,7 +15,7 @@ class wxGridCellPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
def __del__(self, windows2c=windows2c):
if self.thisown == 1 :
windows2c.delete_wxGridCell(self.this)
def GetTextValue(self):
@@ -127,6 +127,9 @@ class wxGridPtr(wxPanelPtr):
val = windows2c.wxGrid_GetDefCellBackgroundColour(self.this)
val = wxColourPtr(val)
return val
def GetCells(self):
val = windows2c.wxGrid_GetCells(self.this)
return val
def GetCellTextColour(self,arg0,arg1):
val = windows2c.wxGrid_GetCellTextColour(self.this,arg0,arg1)
val = wxColourPtr(val)
@@ -283,6 +286,12 @@ class wxGridPtr(wxPanelPtr):
def UpdateDimensions(self):
val = windows2c.wxGrid_UpdateDimensions(self.this)
return val
def GetEditInPlace(self):
val = windows2c.wxGrid_GetEditInPlace(self.this)
return val
def SetEditInPlace(self,*args):
val = apply(windows2c.wxGrid_SetEditInPlace,(self.this,)+args)
return val
def __repr__(self):
return "<C wxGrid instance>"
class wxGrid(wxGridPtr):

View File

@@ -1675,7 +1675,6 @@ SWIGEXPORT(void,initwindows3c)() {
SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0);
SWIG_RegisterMapping("_wxMask","_class_wxMask",0);
SWIG_RegisterMapping("_wxGrid","_class_wxGrid",0);
SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0);
SWIG_RegisterMapping("_wxPen","_class_wxPen",0);
SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0);
SWIG_RegisterMapping("_byte","_unsigned_char",0);
@@ -1855,7 +1854,6 @@ SWIGEXPORT(void,initwindows3c)() {
SWIG_RegisterMapping("_unsigned_int","_int",0);
SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0);
SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0);
SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0);
SWIG_RegisterMapping("_class_wxPen","_wxPen",0);
SWIG_RegisterMapping("_wxQueryLayoutInfoEvent","_class_wxQueryLayoutInfoEvent",0);
SWIG_RegisterMapping("_short","_WXTYPE",0);

View File

@@ -238,7 +238,7 @@ class wxLayoutAlgorithmPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
def __del__(self, windows3c=windows3c):
if self.thisown == 1 :
windows3c.delete_wxLayoutAlgorithm(self.this)
def LayoutMDIFrame(self,arg0,*args):

View File

@@ -33,8 +33,50 @@
* and things like that.
*
* $Log$
* Revision 1.14 1999/06/28 04:08:58 RD
* Final tweaks for 2.1b1
* Revision 1.15 1999/07/31 07:55:17 RD
* wxPython 2.1b1:
*
* Added the missing wxWindow.GetUpdateRegion() method.
*
* Made a new change in SWIG (update your patches everybody) that
* provides a fix for global shadow objects that get an exception in
* their __del__ when their extension module has already been deleted.
* It was only a 1 line change in .../SWIG/Modules/pycpp.cxx at about
* line 496 if you want to do it by hand.
*
* It is now possible to run through MainLoop more than once in any one
* process. The cleanup that used to happen as MainLoop completed (and
* prevented it from running again) has been delayed until the wxc module
* is being unloaded by Python.
*
* wxWindow.PopupMenu() now takes a wxPoint instead of x,y. Added
* wxWindow.PopupMenuXY to be consistent with some other methods.
*
* Added wxGrid.SetEditInPlace and wxGrid.GetEditInPlace.
*
* You can now provide your own app.MainLoop method. See
* wxPython/demo/demoMainLoop.py for an example and some explaination.
*
* Got the in-place-edit for the wxTreeCtrl fixed and added some demo
* code to show how to use it.
*
* Put the wxIcon constructor back in for GTK as it now has one that
* matches MSW's.
*
* Added wxGrid.GetCells
*
* Added wxSystemSettings static methods as functions with names like
* wxSystemSettings_GetSystemColour.
*
* Removed wxPyMenu since using menu callbacks have been depreciated in
* wxWindows. Use wxMenu and events instead.
*
* Added alternate wxBitmap constructor (for MSW only) as
* wxBitmapFromData(data, type, width, height, depth = 1)
*
* Added a helper function named wxPyTypeCast that can convert shadow
* objects of one type into shadow objects of another type. (Like doing
* a down-cast.) See the implementation in wx.py for some docs.
*
************************************************************************/
@@ -618,6 +660,522 @@ extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source);
static char* wxStringErrorMsg = "string type is required for parameter";
#include <ctype.h>
/*------------------------------------------------------------------
ptrcast(value,type)
Constructs a new pointer value. Value may either be a string
or an integer. Type is a string corresponding to either the
C datatype or mangled datatype.
ptrcast(0,"Vector *")
or
ptrcast(0,"Vector_p")
------------------------------------------------------------------ */
static PyObject *ptrcast(PyObject *_PTRVALUE, char *type) {
char *r,*s;
void *ptr;
PyObject *obj;
char *typestr,*c;
/* Produce a "mangled" version of the type string. */
typestr = (char *) malloc(strlen(type)+2);
/* Go through and munge the typestring */
r = typestr;
*(r++) = '_';
c = type;
while (*c) {
if (!isspace(*c)) {
if ((*c == '*') || (*c == '&')) {
*(r++) = 'p';
}
else *(r++) = *c;
} else {
*(r++) = '_';
}
c++;
}
*(r++) = 0;
/* Check to see what kind of object _PTRVALUE is */
if (PyInt_Check(_PTRVALUE)) {
ptr = (void *) PyInt_AsLong(_PTRVALUE);
/* Received a numerical value. Make a pointer out of it */
r = (char *) malloc(strlen(typestr)+22);
if (ptr) {
SWIG_MakePtr(r, ptr, typestr);
} else {
sprintf(r,"_0%s",typestr);
}
obj = PyString_FromString(r);
free(r);
} else if (PyString_Check(_PTRVALUE)) {
/* Have a real pointer value now. Try to strip out the pointer
value */
s = PyString_AsString(_PTRVALUE);
r = (char *) malloc(strlen(type)+22);
/* Now extract the pointer value */
if (!SWIG_GetPtr(s,&ptr,0)) {
if (ptr) {
SWIG_MakePtr(r,ptr,typestr);
} else {
sprintf(r,"_0%s",typestr);
}
obj = PyString_FromString(r);
} else {
obj = NULL;
}
free(r);
} else {
obj = NULL;
}
free(typestr);
if (!obj)
PyErr_SetString(PyExc_TypeError,"Type error in ptrcast. Argument is not a valid pointer value.");
return obj;
}
/*------------------------------------------------------------------
ptrvalue(ptr,type = 0)
Attempts to dereference a pointer value. If type is given, it
will try to use that type. Otherwise, this function will attempt
to "guess" the proper datatype by checking against all of the
builtin C datatypes.
------------------------------------------------------------------ */
static PyObject *ptrvalue(PyObject *_PTRVALUE, int index, char *type) {
void *ptr;
char *s;
PyObject *obj;
if (!PyString_Check(_PTRVALUE)) {
PyErr_SetString(PyExc_TypeError,"Type error in ptrvalue. Argument is not a valid pointer value.");
return NULL;
}
s = PyString_AsString(_PTRVALUE);
if (SWIG_GetPtr(s,&ptr,0)) {
PyErr_SetString(PyExc_TypeError,"Type error in ptrvalue. Argument is not a valid pointer value.");
return NULL;
}
/* If no datatype was passed, try a few common datatypes first */
if (!type) {
/* No datatype was passed. Type to figure out if it's a common one */
if (!SWIG_GetPtr(s,&ptr,"_int_p")) {
type = "int";
} else if (!SWIG_GetPtr(s,&ptr,"_double_p")) {
type = "double";
} else if (!SWIG_GetPtr(s,&ptr,"_short_p")) {
type = "short";
} else if (!SWIG_GetPtr(s,&ptr,"_long_p")) {
type = "long";
} else if (!SWIG_GetPtr(s,&ptr,"_float_p")) {
type = "float";
} else if (!SWIG_GetPtr(s,&ptr,"_char_p")) {
type = "char";
} else if (!SWIG_GetPtr(s,&ptr,"_char_pp")) {
type = "char *";
} else {
type = "unknown";
}
}
if (!ptr) {
PyErr_SetString(PyExc_TypeError,"Unable to dereference NULL pointer.");
return NULL;
}
/* Now we have a datatype. Try to figure out what to do about it */
if (strcmp(type,"int") == 0) {
obj = PyInt_FromLong((long) *(((int *) ptr) + index));
} else if (strcmp(type,"double") == 0) {
obj = PyFloat_FromDouble((double) *(((double *) ptr)+index));
} else if (strcmp(type,"short") == 0) {
obj = PyInt_FromLong((long) *(((short *) ptr)+index));
} else if (strcmp(type,"long") == 0) {
obj = PyInt_FromLong((long) *(((long *) ptr)+index));
} else if (strcmp(type,"float") == 0) {
obj = PyFloat_FromDouble((double) *(((float *) ptr)+index));
} else if (strcmp(type,"char") == 0) {
obj = PyString_FromString(((char *) ptr)+index);
} else if (strcmp(type,"char *") == 0) {
char *c = *(((char **) ptr)+index);
if (c) obj = PyString_FromString(c);
else obj = PyString_FromString("NULL");
} else {
PyErr_SetString(PyExc_TypeError,"Unable to dereference unsupported datatype.");
return NULL;
}
return obj;
}
/*------------------------------------------------------------------
ptrcreate(type,value = 0,numelements = 1)
Attempts to create a new object of given type. Type must be
a basic C datatype. Will not create complex objects.
------------------------------------------------------------------ */
static PyObject *ptrcreate(char *type, PyObject *_PYVALUE, int numelements) {
void *ptr;
PyObject *obj;
int sz;
char *cast;
char temp[40];
/* Check the type string against a variety of possibilities */
if (strcmp(type,"int") == 0) {
sz = sizeof(int)*numelements;
cast = "_int_p";
} else if (strcmp(type,"short") == 0) {
sz = sizeof(short)*numelements;
cast = "_short_p";
} else if (strcmp(type,"long") == 0) {
sz = sizeof(long)*numelements;
cast = "_long_p";
} else if (strcmp(type,"double") == 0) {
sz = sizeof(double)*numelements;
cast = "_double_p";
} else if (strcmp(type,"float") == 0) {
sz = sizeof(float)*numelements;
cast = "_float_p";
} else if (strcmp(type,"char") == 0) {
sz = sizeof(char)*numelements;
cast = "_char_p";
} else if (strcmp(type,"char *") == 0) {
sz = sizeof(char *)*(numelements+1);
cast = "_char_pp";
} else {
PyErr_SetString(PyExc_TypeError,"Unable to create unknown datatype.");
return NULL;
}
/* Create the new object */
ptr = (void *) malloc(sz);
if (!ptr) {
PyErr_SetString(PyExc_MemoryError,"Out of memory in swig_create.");
return NULL;
}
/* Now try to set its default value */
if (_PYVALUE) {
if (strcmp(type,"int") == 0) {
int *ip,i,ivalue;
ivalue = (int) PyInt_AsLong(_PYVALUE);
ip = (int *) ptr;
for (i = 0; i < numelements; i++)
ip[i] = ivalue;
} else if (strcmp(type,"short") == 0) {
short *ip,ivalue;
int i;
ivalue = (short) PyInt_AsLong(_PYVALUE);
ip = (short *) ptr;
for (i = 0; i < numelements; i++)
ip[i] = ivalue;
} else if (strcmp(type,"long") == 0) {
long *ip,ivalue;
int i;
ivalue = (long) PyInt_AsLong(_PYVALUE);
ip = (long *) ptr;
for (i = 0; i < numelements; i++)
ip[i] = ivalue;
} else if (strcmp(type,"double") == 0) {
double *ip,ivalue;
int i;
ivalue = (double) PyFloat_AsDouble(_PYVALUE);
ip = (double *) ptr;
for (i = 0; i < numelements; i++)
ip[i] = ivalue;
} else if (strcmp(type,"float") == 0) {
float *ip,ivalue;
int i;
ivalue = (float) PyFloat_AsDouble(_PYVALUE);
ip = (float *) ptr;
for (i = 0; i < numelements; i++)
ip[i] = ivalue;
} else if (strcmp(type,"char") == 0) {
char *ip,*ivalue;
ivalue = (char *) PyString_AsString(_PYVALUE);
ip = (char *) ptr;
strncpy(ip,ivalue,numelements-1);
} else if (strcmp(type,"char *") == 0) {
char **ip, *ivalue;
int i;
ivalue = (char *) PyString_AsString(_PYVALUE);
ip = (char **) ptr;
for (i = 0; i < numelements; i++) {
if (ivalue) {
ip[i] = (char *) malloc(strlen(ivalue)+1);
strcpy(ip[i],ivalue);
} else {
ip[i] = 0;
}
}
ip[numelements] = 0;
}
}
/* Create the pointer value */
SWIG_MakePtr(temp,ptr,cast);
obj = PyString_FromString(temp);
return obj;
}
/*------------------------------------------------------------------
ptrset(ptr,value,index = 0,type = 0)
Attempts to set the value of a pointer variable. If type is
given, we will use that type. Otherwise, we'll guess the datatype.
------------------------------------------------------------------ */
static PyObject *ptrset(PyObject *_PTRVALUE, PyObject *_PYVALUE, int index, char *type) {
void *ptr;
char *s;
PyObject *obj;
if (!PyString_Check(_PTRVALUE)) {
PyErr_SetString(PyExc_TypeError,"Type error in ptrset. Argument is not a valid pointer value.");
return NULL;
}
s = PyString_AsString(_PTRVALUE);
if (SWIG_GetPtr(s,&ptr,0)) {
PyErr_SetString(PyExc_TypeError,"Type error in ptrset. Argument is not a valid pointer value.");
return NULL;
}
/* If no datatype was passed, try a few common datatypes first */
if (!type) {
/* No datatype was passed. Type to figure out if it's a common one */
if (!SWIG_GetPtr(s,&ptr,"_int_p")) {
type = "int";
} else if (!SWIG_GetPtr(s,&ptr,"_double_p")) {
type = "double";
} else if (!SWIG_GetPtr(s,&ptr,"_short_p")) {
type = "short";
} else if (!SWIG_GetPtr(s,&ptr,"_long_p")) {
type = "long";
} else if (!SWIG_GetPtr(s,&ptr,"_float_p")) {
type = "float";
} else if (!SWIG_GetPtr(s,&ptr,"_char_p")) {
type = "char";
} else if (!SWIG_GetPtr(s,&ptr,"_char_pp")) {
type = "char *";
} else {
type = "unknown";
}
}
if (!ptr) {
PyErr_SetString(PyExc_TypeError,"Unable to set NULL pointer.");
return NULL;
}
/* Now we have a datatype. Try to figure out what to do about it */
if (strcmp(type,"int") == 0) {
*(((int *) ptr)+index) = (int) PyInt_AsLong(_PYVALUE);
} else if (strcmp(type,"double") == 0) {
*(((double *) ptr)+index) = (double) PyFloat_AsDouble(_PYVALUE);
} else if (strcmp(type,"short") == 0) {
*(((short *) ptr)+index) = (short) PyInt_AsLong(_PYVALUE);
} else if (strcmp(type,"long") == 0) {
*(((long *) ptr)+index) = (long) PyInt_AsLong(_PYVALUE);
} else if (strcmp(type,"float") == 0) {
*(((float *) ptr)+index) = (float) PyFloat_AsDouble(_PYVALUE);
} else if (strcmp(type,"char") == 0) {
char *c = PyString_AsString(_PYVALUE);
strcpy(((char *) ptr)+index, c);
} else if (strcmp(type,"char *") == 0) {
char *c = PyString_AsString(_PYVALUE);
char **ca = (char **) ptr;
if (ca[index]) free(ca[index]);
if (strcmp(c,"NULL") == 0) {
ca[index] = 0;
} else {
ca[index] = (char *) malloc(strlen(c)+1);
strcpy(ca[index],c);
}
} else {
PyErr_SetString(PyExc_TypeError,"Unable to set unsupported datatype.");
return NULL;
}
Py_INCREF(Py_None);
return Py_None;
}
/*------------------------------------------------------------------
ptradd(ptr,offset)
Adds a value to an existing pointer value. Will do a type-dependent
add for basic datatypes. For other datatypes, will do a byte-add.
------------------------------------------------------------------ */
static PyObject *ptradd(PyObject *_PTRVALUE, int offset) {
char *r,*s;
void *ptr,*junk;
PyObject *obj;
char *type;
/* Check to see what kind of object _PTRVALUE is */
if (PyString_Check(_PTRVALUE)) {
/* Have a potential pointer value now. Try to strip out the value */
s = PyString_AsString(_PTRVALUE);
/* Try to handle a few common datatypes first */
if (!SWIG_GetPtr(s,&ptr,"_int_p")) {
ptr = (void *) (((int *) ptr) + offset);
} else if (!SWIG_GetPtr(s,&ptr,"_double_p")) {
ptr = (void *) (((double *) ptr) + offset);
} else if (!SWIG_GetPtr(s,&ptr,"_short_p")) {
ptr = (void *) (((short *) ptr) + offset);
} else if (!SWIG_GetPtr(s,&ptr,"_long_p")) {
ptr = (void *) (((long *) ptr) + offset);
} else if (!SWIG_GetPtr(s,&ptr,"_float_p")) {
ptr = (void *) (((float *) ptr) + offset);
} else if (!SWIG_GetPtr(s,&ptr,"_char_p")) {
ptr = (void *) (((char *) ptr) + offset);
} else if (!SWIG_GetPtr(s,&ptr,0)) {
ptr = (void *) (((char *) ptr) + offset);
} else {
PyErr_SetString(PyExc_TypeError,"Type error in ptradd. Argument is not a valid pointer value.");
return NULL;
}
type = SWIG_GetPtr(s,&junk,"INVALID POINTER");
r = (char *) malloc(strlen(type)+20);
if (ptr) {
SWIG_MakePtr(r,ptr,type);
} else {
sprintf(r,"_0%s",type);
}
obj = PyString_FromString(r);
free(r);
}
return obj;
}
/*------------------------------------------------------------------
ptrmap(type1,type2)
Allows a mapping between type1 and type2. (Like a typedef)
------------------------------------------------------------------ */
static void ptrmap(char *type1, char *type2) {
char *typestr1,*typestr2,*c,*r;
/* Produce a "mangled" version of the type string. */
typestr1 = (char *) malloc(strlen(type1)+2);
/* Go through and munge the typestring */
r = typestr1;
*(r++) = '_';
c = type1;
while (*c) {
if (!isspace(*c)) {
if ((*c == '*') || (*c == '&')) {
*(r++) = 'p';
}
else *(r++) = *c;
} else {
*(r++) = '_';
}
c++;
}
*(r++) = 0;
typestr2 = (char *) malloc(strlen(type2)+2);
/* Go through and munge the typestring */
r = typestr2;
*(r++) = '_';
c = type2;
while (*c) {
if (!isspace(*c)) {
if ((*c == '*') || (*c == '&')) {
*(r++) = 'p';
}
else *(r++) = *c;
} else {
*(r++) = '_';
}
c++;
}
*(r++) = 0;
SWIG_RegisterMapping(typestr1,typestr2,0);
SWIG_RegisterMapping(typestr2,typestr1,0);
}
/*------------------------------------------------------------------
ptrfree(ptr)
Destroys a pointer value
------------------------------------------------------------------ */
PyObject *ptrfree(PyObject *_PTRVALUE) {
void *ptr, *junk;
char *s;
if (!PyString_Check(_PTRVALUE)) {
PyErr_SetString(PyExc_TypeError,"Type error in ptrfree. Argument is not a valid pointer value.");
return NULL;
}
s = PyString_AsString(_PTRVALUE);
if (SWIG_GetPtr(s,&ptr,0)) {
PyErr_SetString(PyExc_TypeError,"Type error in ptrfree. Argument is not a valid pointer value.");
return NULL;
}
/* Check to see if this pointer is a char ** */
if (!SWIG_GetPtr(s,&junk,"_char_pp")) {
char **c = (char **) ptr;
if (c) {
int i = 0;
while (c[i]) {
free(c[i]);
i++;
}
}
}
if (ptr)
free((char *) ptr);
Py_INCREF(Py_None);
return Py_None;
}
class __wxPyCleanup {
public:
__wxPyCleanup() { }
~__wxPyCleanup() { wxApp::CleanUp(); }
};
extern "C" SWIGEXPORT(void,initwindowsc)();
extern "C" SWIGEXPORT(void,initwindows2c)();
extern "C" SWIGEXPORT(void,initeventsc)();
@@ -635,8 +1193,179 @@ extern "C" SWIGEXPORT(void,initimagec)();
extern "C" SWIGEXPORT(void,initprintfwc)();
#ifndef SEPARATE
extern "C" SWIGEXPORT(void,initutilsc)();
//extern "C" SWIGEXPORT(void,initoglc)();
extern "C" SWIGEXPORT(void,initglcanvasc)();
#endif
static PyObject *_wrap_ptrcast(PyObject *self, PyObject *args) {
PyObject * _resultobj;
PyObject * _result;
PyObject * _arg0;
char * _arg1;
PyObject * _obj0 = 0;
self = self;
if(!PyArg_ParseTuple(args,"Os:ptrcast",&_obj0,&_arg1))
return NULL;
{
_arg0 = _obj0;
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (PyObject *)ptrcast(_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
}{
_resultobj = _result;
}
return _resultobj;
}
static PyObject *_wrap_ptrvalue(PyObject *self, PyObject *args) {
PyObject * _resultobj;
PyObject * _result;
PyObject * _arg0;
int _arg1 = 0;
char * _arg2 = 0;
PyObject * _obj0 = 0;
self = self;
if(!PyArg_ParseTuple(args,"O|is:ptrvalue",&_obj0,&_arg1,&_arg2))
return NULL;
{
_arg0 = _obj0;
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (PyObject *)ptrvalue(_arg0,_arg1,_arg2);
wxPy_END_ALLOW_THREADS;
}{
_resultobj = _result;
}
return _resultobj;
}
static PyObject *_wrap_ptrset(PyObject *self, PyObject *args) {
PyObject * _resultobj;
PyObject * _result;
PyObject * _arg0;
PyObject * _arg1;
int _arg2 = 0;
char * _arg3 = 0;
PyObject * _obj0 = 0;
PyObject * _obj1 = 0;
self = self;
if(!PyArg_ParseTuple(args,"OO|is:ptrset",&_obj0,&_obj1,&_arg2,&_arg3))
return NULL;
{
_arg0 = _obj0;
}
{
_arg1 = _obj1;
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (PyObject *)ptrset(_arg0,_arg1,_arg2,_arg3);
wxPy_END_ALLOW_THREADS;
}{
_resultobj = _result;
}
return _resultobj;
}
static PyObject *_wrap_ptrcreate(PyObject *self, PyObject *args) {
PyObject * _resultobj;
PyObject * _result;
char * _arg0;
PyObject * _arg1 = 0;
int _arg2 = 1;
PyObject * _obj1 = 0;
self = self;
if(!PyArg_ParseTuple(args,"s|Oi:ptrcreate",&_arg0,&_obj1,&_arg2))
return NULL;
if (_obj1)
{
_arg1 = _obj1;
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (PyObject *)ptrcreate(_arg0,_arg1,_arg2);
wxPy_END_ALLOW_THREADS;
}{
_resultobj = _result;
}
return _resultobj;
}
static PyObject *_wrap_ptrfree(PyObject *self, PyObject *args) {
PyObject * _resultobj;
PyObject * _result;
PyObject * _arg0;
PyObject * _obj0 = 0;
self = self;
if(!PyArg_ParseTuple(args,"O:ptrfree",&_obj0))
return NULL;
{
_arg0 = _obj0;
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (PyObject *)ptrfree(_arg0);
wxPy_END_ALLOW_THREADS;
}{
_resultobj = _result;
}
return _resultobj;
}
static PyObject *_wrap_ptradd(PyObject *self, PyObject *args) {
PyObject * _resultobj;
PyObject * _result;
PyObject * _arg0;
int _arg1;
PyObject * _obj0 = 0;
self = self;
if(!PyArg_ParseTuple(args,"Oi:ptradd",&_obj0,&_arg1))
return NULL;
{
_arg0 = _obj0;
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (PyObject *)ptradd(_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
}{
_resultobj = _result;
}
return _resultobj;
}
static PyObject *_wrap_ptrmap(PyObject *self, PyObject *args) {
PyObject * _resultobj;
char * _arg0;
char * _arg1;
self = self;
if(!PyArg_ParseTuple(args,"ss:ptrmap",&_arg0,&_arg1))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
ptrmap(_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
static int _wrap_wxPyDefaultPosition_set(PyObject *val) {
char * tval;
wxPoint * temp;
@@ -724,6 +1453,31 @@ static PyObject *_wrap_new_wxPyApp(PyObject *self, PyObject *args) {
return _resultobj;
}
#define delete_wxPyApp(_swigobj) (delete _swigobj)
static PyObject *_wrap_delete_wxPyApp(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxPyApp * _arg0;
char * _argc0 = 0;
self = self;
if(!PyArg_ParseTuple(args,"s:delete_wxPyApp",&_argc0))
return NULL;
if (_argc0) {
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxPyApp. Expected _wxPyApp_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
delete_wxPyApp(_arg0);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxPyApp_GetAppName(_swigobj) (_swigobj->GetAppName())
static PyObject *_wrap_wxPyApp_GetAppName(PyObject *self, PyObject *args) {
PyObject * _resultobj;
@@ -1016,6 +1770,31 @@ static PyObject *_wrap_wxPyApp_Pending(PyObject *self, PyObject *args) {
return _resultobj;
}
#define wxPyApp_ProcessIdle(_swigobj) (_swigobj->ProcessIdle())
static PyObject *_wrap_wxPyApp_ProcessIdle(PyObject *self, PyObject *args) {
PyObject * _resultobj;
bool _result;
wxPyApp * _arg0;
char * _argc0 = 0;
self = self;
if(!PyArg_ParseTuple(args,"s:wxPyApp_ProcessIdle",&_argc0))
return NULL;
if (_argc0) {
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_ProcessIdle. Expected _wxPyApp_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxPyApp_ProcessIdle(_arg0);
wxPy_END_ALLOW_THREADS;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxPyApp_SetAppName(_swigobj,_swigarg0) (_swigobj->SetAppName(_swigarg0))
static PyObject *_wrap_wxPyApp_SetAppName(PyObject *self, PyObject *args) {
PyObject * _resultobj;
@@ -1217,24 +1996,43 @@ static PyObject *_wrap_wxPyApp_SetVendorName(PyObject *self, PyObject *args) {
return _resultobj;
}
#define wxPyApp_AfterMainLoop(_swigobj) (_swigobj->AfterMainLoop())
static PyObject *_wrap_wxPyApp_AfterMainLoop(PyObject *self, PyObject *args) {
#define new___wxPyCleanup() (new __wxPyCleanup())
static PyObject *_wrap_new___wxPyCleanup(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxPyApp * _arg0;
__wxPyCleanup * _result;
char _ptemp[128];
self = self;
if(!PyArg_ParseTuple(args,":new___wxPyCleanup"))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (__wxPyCleanup *)new___wxPyCleanup();
wxPy_END_ALLOW_THREADS;
} SWIG_MakePtr(_ptemp, (char *) _result,"___wxPyCleanup_p");
_resultobj = Py_BuildValue("s",_ptemp);
return _resultobj;
}
#define delete___wxPyCleanup(_swigobj) (delete _swigobj)
static PyObject *_wrap_delete___wxPyCleanup(PyObject *self, PyObject *args) {
PyObject * _resultobj;
__wxPyCleanup * _arg0;
char * _argc0 = 0;
self = self;
if(!PyArg_ParseTuple(args,"s:wxPyApp_AfterMainLoop",&_argc0))
if(!PyArg_ParseTuple(args,"s:delete___wxPyCleanup",&_argc0))
return NULL;
if (_argc0) {
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_AfterMainLoop. Expected _wxPyApp_p.");
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"___wxPyCleanup_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete___wxPyCleanup. Expected ___wxPyCleanup_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxPyApp_AfterMainLoop(_arg0);
delete___wxPyCleanup(_arg0);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
@@ -1243,13 +2041,15 @@ static PyObject *_wrap_wxPyApp_AfterMainLoop(PyObject *self, PyObject *args) {
}
static PyMethodDef wxcMethods[] = {
{ "wxPyApp_AfterMainLoop", _wrap_wxPyApp_AfterMainLoop, 1 },
{ "delete___wxPyCleanup", _wrap_delete___wxPyCleanup, 1 },
{ "new___wxPyCleanup", _wrap_new___wxPyCleanup, 1 },
{ "wxPyApp_SetVendorName", _wrap_wxPyApp_SetVendorName, 1 },
{ "wxPyApp_SetTopWindow", _wrap_wxPyApp_SetTopWindow, 1 },
{ "wxPyApp_SetPrintMode", _wrap_wxPyApp_SetPrintMode, 1 },
{ "wxPyApp_SetExitOnFrameDelete", _wrap_wxPyApp_SetExitOnFrameDelete, 1 },
{ "wxPyApp_SetClassName", _wrap_wxPyApp_SetClassName, 1 },
{ "wxPyApp_SetAppName", _wrap_wxPyApp_SetAppName, 1 },
{ "wxPyApp_ProcessIdle", _wrap_wxPyApp_ProcessIdle, 1 },
{ "wxPyApp_Pending", _wrap_wxPyApp_Pending, 1 },
{ "wxPyApp_MainLoop", _wrap_wxPyApp_MainLoop, 1 },
{ "wxPyApp_Initialized", _wrap_wxPyApp_Initialized, 1 },
@@ -1261,9 +2061,17 @@ static PyMethodDef wxcMethods[] = {
{ "wxPyApp_GetExitOnFrameDelete", _wrap_wxPyApp_GetExitOnFrameDelete, 1 },
{ "wxPyApp_GetClassName", _wrap_wxPyApp_GetClassName, 1 },
{ "wxPyApp_GetAppName", _wrap_wxPyApp_GetAppName, 1 },
{ "delete_wxPyApp", _wrap_delete_wxPyApp, 1 },
{ "new_wxPyApp", _wrap_new_wxPyApp, 1 },
{ "_wxSetDictionary", __wxSetDictionary, 1 },
{ "_wxStart", __wxStart, 1 },
{ "ptrmap", _wrap_ptrmap, 1 },
{ "ptradd", _wrap_ptradd, 1 },
{ "ptrfree", _wrap_ptrfree, 1 },
{ "ptrcreate", _wrap_ptrcreate, 1 },
{ "ptrset", _wrap_ptrset, 1 },
{ "ptrvalue", _wrap_ptrvalue, 1 },
{ "ptrcast", _wrap_ptrcast, 1 },
{ NULL, NULL }
};
static PyObject *SWIG_globals;
@@ -1341,6 +2149,7 @@ SWIGEXPORT(void,initwxc)() {
PyDict_SetItemString(d,"wxTE_PROCESS_ENTER", PyInt_FromLong((long) wxTE_PROCESS_ENTER));
PyDict_SetItemString(d,"wxTE_PASSWORD", PyInt_FromLong((long) wxTE_PASSWORD));
PyDict_SetItemString(d,"wxTE_READONLY", PyInt_FromLong((long) wxTE_READONLY));
PyDict_SetItemString(d,"wxTE_RICH", PyInt_FromLong((long) wxTE_RICH));
PyDict_SetItemString(d,"wxTE_MULTILINE", PyInt_FromLong((long) wxTE_MULTILINE));
PyDict_SetItemString(d,"wxCB_SIMPLE", PyInt_FromLong((long) wxCB_SIMPLE));
PyDict_SetItemString(d,"wxCB_DROPDOWN", PyInt_FromLong((long) wxCB_DROPDOWN));
@@ -1373,6 +2182,8 @@ SWIGEXPORT(void,initwxc)() {
PyDict_SetItemString(d,"wxTR_HAS_BUTTONS", PyInt_FromLong((long) wxTR_HAS_BUTTONS));
PyDict_SetItemString(d,"wxTR_EDIT_LABELS", PyInt_FromLong((long) wxTR_EDIT_LABELS));
PyDict_SetItemString(d,"wxTR_LINES_AT_ROOT", PyInt_FromLong((long) wxTR_LINES_AT_ROOT));
PyDict_SetItemString(d,"wxTR_MULTIPLE", PyInt_FromLong((long) wxTR_MULTIPLE));
PyDict_SetItemString(d,"wxTR_HAS_VARIABLE_ROW_HEIGHT", PyInt_FromLong((long) wxTR_HAS_VARIABLE_ROW_HEIGHT));
PyDict_SetItemString(d,"wxLC_ICON", PyInt_FromLong((long) wxLC_ICON));
PyDict_SetItemString(d,"wxLC_SMALL_ICON", PyInt_FromLong((long) wxLC_SMALL_ICON));
PyDict_SetItemString(d,"wxLC_LIST", PyInt_FromLong((long) wxLC_LIST));
@@ -1501,6 +2312,8 @@ SWIGEXPORT(void,initwxc)() {
PyDict_SetItemString(d,"wxPD_ESTIMATED_TIME", PyInt_FromLong((long) wxPD_ESTIMATED_TIME));
PyDict_SetItemString(d,"wxPD_REMAINING_TIME", PyInt_FromLong((long) wxPD_REMAINING_TIME));
PyDict_SetItemString(d,"wxNO_DEFAULT", PyInt_FromLong((long) wxNO_DEFAULT));
PyDict_SetItemString(d,"wxMENU_TEAROFF", PyInt_FromLong((long) wxMENU_TEAROFF));
PyDict_SetItemString(d,"wxNO_FULL_REPAINT_ON_RESIZE", PyInt_FromLong((long) wxNO_FULL_REPAINT_ON_RESIZE));
PyDict_SetItemString(d,"wxDEFAULT", PyInt_FromLong((long) wxDEFAULT));
PyDict_SetItemString(d,"wxDECORATIVE", PyInt_FromLong((long) wxDECORATIVE));
PyDict_SetItemString(d,"wxROMAN", PyInt_FromLong((long) wxROMAN));
@@ -1776,6 +2589,9 @@ SWIGEXPORT(void,initwxc)() {
PyDict_SetItemString(d,"wxEVT_NC_MIDDLE_DCLICK", PyInt_FromLong((long) wxEVT_NC_MIDDLE_DCLICK));
PyDict_SetItemString(d,"wxEVT_NC_RIGHT_DCLICK", PyInt_FromLong((long) wxEVT_NC_RIGHT_DCLICK));
PyDict_SetItemString(d,"wxEVT_CHAR", PyInt_FromLong((long) wxEVT_CHAR));
PyDict_SetItemString(d,"wxEVT_KEY_DOWN", PyInt_FromLong((long) wxEVT_KEY_DOWN));
PyDict_SetItemString(d,"wxEVT_KEY_UP", PyInt_FromLong((long) wxEVT_KEY_UP));
PyDict_SetItemString(d,"wxEVT_CHAR_HOOK", PyInt_FromLong((long) wxEVT_CHAR_HOOK));
PyDict_SetItemString(d,"wxEVT_SCROLL_TOP", PyInt_FromLong((long) wxEVT_SCROLL_TOP));
PyDict_SetItemString(d,"wxEVT_SCROLL_BOTTOM", PyInt_FromLong((long) wxEVT_SCROLL_BOTTOM));
PyDict_SetItemString(d,"wxEVT_SCROLL_LINEUP", PyInt_FromLong((long) wxEVT_SCROLL_LINEUP));
@@ -1797,8 +2613,6 @@ SWIGEXPORT(void,initwxc)() {
PyDict_SetItemString(d,"wxEVT_QUERY_END_SESSION", PyInt_FromLong((long) wxEVT_QUERY_END_SESSION));
PyDict_SetItemString(d,"wxEVT_ACTIVATE_APP", PyInt_FromLong((long) wxEVT_ACTIVATE_APP));
PyDict_SetItemString(d,"wxEVT_POWER", PyInt_FromLong((long) wxEVT_POWER));
PyDict_SetItemString(d,"wxEVT_CHAR_HOOK", PyInt_FromLong((long) wxEVT_CHAR_HOOK));
PyDict_SetItemString(d,"wxEVT_KEY_UP", PyInt_FromLong((long) wxEVT_KEY_UP));
PyDict_SetItemString(d,"wxEVT_ACTIVATE", PyInt_FromLong((long) wxEVT_ACTIVATE));
PyDict_SetItemString(d,"wxEVT_CREATE", PyInt_FromLong((long) wxEVT_CREATE));
PyDict_SetItemString(d,"wxEVT_DESTROY", PyInt_FromLong((long) wxEVT_DESTROY));
@@ -1873,7 +2687,7 @@ SWIGEXPORT(void,initwxc)() {
PyDict_SetItemString(d,"wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED", PyInt_FromLong((long) wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED));
PyDict_SetItemString(d,"wxEVT_COMMAND_SPLITTER_UNSPLIT", PyInt_FromLong((long) wxEVT_COMMAND_SPLITTER_UNSPLIT));
PyDict_SetItemString(d,"wxEVT_COMMAND_SPLITTER_DOUBLECLICKED", PyInt_FromLong((long) wxEVT_COMMAND_SPLITTER_DOUBLECLICKED));
PyDict_SetItemString(d,"__version__", PyString_FromString("2.1b1"));
PyDict_SetItemString(d,"__version__", PyString_FromString("2.1b2"));
PyDict_SetItemString(d,"cvar", SWIG_globals);
SWIG_addvarlink(SWIG_globals,"wxPyDefaultPosition",_wrap_wxPyDefaultPosition_get, _wrap_wxPyDefaultPosition_set);
SWIG_addvarlink(SWIG_globals,"wxPyDefaultSize",_wrap_wxPyDefaultSize_get, _wrap_wxPyDefaultSize_set);
@@ -1881,7 +2695,6 @@ SWIGEXPORT(void,initwxc)() {
__wxPreStart(); // initialize the GUI toolkit, if needed.
// wxPyWindows = new wxHashTable(wxKEY_INTEGER, 100);
// Since these modules are all linked together, initialize them now
// because python won't be able to find their shared library files,
@@ -1903,6 +2716,7 @@ SWIGEXPORT(void,initwxc)() {
initprintfwc();
#ifndef SEPARATE
initutilsc();
// initoglc();
#ifdef WITH_GLCANVAS
initglcanvasc();
#endif
@@ -1927,6 +2741,7 @@ SWIGEXPORT(void,initwxc)() {
SWIG_RegisterMapping("_wxPrintQuality","_EBool",0);
SWIG_RegisterMapping("_wxPrintQuality","_size_t",0);
SWIG_RegisterMapping("_wxFontData","_class_wxFontData",0);
SWIG_RegisterMapping("___wxPyCleanup","_class___wxPyCleanup",0);
SWIG_RegisterMapping("_class_wxRegionIterator","_wxRegionIterator",0);
SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0);
SWIG_RegisterMapping("_class_wxPyTreeItemData","_wxPyTreeItemData",0);
@@ -1944,7 +2759,6 @@ SWIGEXPORT(void,initwxc)() {
SWIG_RegisterMapping("_wxToolTip","_class_wxToolTip",0);
SWIG_RegisterMapping("_wxGrid","_class_wxGrid",0);
SWIG_RegisterMapping("_wxPNGHandler","_class_wxPNGHandler",0);
SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0);
SWIG_RegisterMapping("_class_wxColourData","_wxColourData",0);
SWIG_RegisterMapping("_class_wxPageSetupDialogData","_wxPageSetupDialogData",0);
SWIG_RegisterMapping("_wxPrinter","_class_wxPrinter",0);
@@ -2030,6 +2844,7 @@ SWIGEXPORT(void,initwxc)() {
SWIG_RegisterMapping("_class_wxButton","_wxButton",0);
SWIG_RegisterMapping("_wxRadioBox","_class_wxRadioBox",0);
SWIG_RegisterMapping("_class_wxFontData","_wxFontData",0);
SWIG_RegisterMapping("_class___wxPyCleanup","___wxPyCleanup",0);
SWIG_RegisterMapping("_wxBitmap","_class_wxBitmap",0);
SWIG_RegisterMapping("_wxPrintDialog","_class_wxPrintDialog",0);
SWIG_RegisterMapping("_wxPyTimer","_class_wxPyTimer",0);
@@ -2145,7 +2960,6 @@ SWIGEXPORT(void,initwxc)() {
SWIG_RegisterMapping("_unsigned_int","_int",0);
SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0);
SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0);
SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0);
SWIG_RegisterMapping("_class_wxListItem","_wxListItem",0);
SWIG_RegisterMapping("_class_wxPen","_wxPen",0);
SWIG_RegisterMapping("_class_wxFileDialog","_wxFileDialog",0);

View File

@@ -34,6 +34,9 @@ class wxPyAppPtr(wxEvtHandlerPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self, wxc=wxc):
if self.thisown == 1 :
wxc.delete_wxPyApp(self.this)
def GetAppName(self):
val = wxc.wxPyApp_GetAppName(self.this)
return val
@@ -68,6 +71,9 @@ class wxPyAppPtr(wxEvtHandlerPtr):
def Pending(self):
val = wxc.wxPyApp_Pending(self.this)
return val
def ProcessIdle(self):
val = wxc.wxPyApp_ProcessIdle(self.this)
return val
def SetAppName(self,arg0):
val = wxc.wxPyApp_SetAppName(self.this,arg0)
return val
@@ -86,9 +92,6 @@ class wxPyAppPtr(wxEvtHandlerPtr):
def SetVendorName(self,arg0):
val = wxc.wxPyApp_SetVendorName(self.this,arg0)
return val
def AfterMainLoop(self):
val = wxc.wxPyApp_AfterMainLoop(self.this)
return val
def __repr__(self):
return "<C wxPyApp instance>"
class wxPyApp(wxPyAppPtr):
@@ -99,10 +102,41 @@ class wxPyApp(wxPyAppPtr):
class __wxPyCleanupPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self, wxc=wxc):
if self.thisown == 1 :
wxc.delete___wxPyCleanup(self.this)
def __repr__(self):
return "<C __wxPyCleanup instance>"
class __wxPyCleanup(__wxPyCleanupPtr):
def __init__(self) :
self.this = wxc.new___wxPyCleanup()
self.thisown = 1
#-------------- FUNCTION WRAPPERS ------------------
ptrcast = wxc.ptrcast
ptrvalue = wxc.ptrvalue
ptrset = wxc.ptrset
ptrcreate = wxc.ptrcreate
ptrfree = wxc.ptrfree
ptradd = wxc.ptradd
ptrmap = wxc.ptrmap
_wxStart = wxc._wxStart
_wxSetDictionary = wxc._wxSetDictionary
@@ -177,6 +211,7 @@ wxPASSWORD = wxc.wxPASSWORD
wxTE_PROCESS_ENTER = wxc.wxTE_PROCESS_ENTER
wxTE_PASSWORD = wxc.wxTE_PASSWORD
wxTE_READONLY = wxc.wxTE_READONLY
wxTE_RICH = wxc.wxTE_RICH
wxTE_MULTILINE = wxc.wxTE_MULTILINE
wxCB_SIMPLE = wxc.wxCB_SIMPLE
wxCB_DROPDOWN = wxc.wxCB_DROPDOWN
@@ -209,6 +244,8 @@ wxBU_NOAUTODRAW = wxc.wxBU_NOAUTODRAW
wxTR_HAS_BUTTONS = wxc.wxTR_HAS_BUTTONS
wxTR_EDIT_LABELS = wxc.wxTR_EDIT_LABELS
wxTR_LINES_AT_ROOT = wxc.wxTR_LINES_AT_ROOT
wxTR_MULTIPLE = wxc.wxTR_MULTIPLE
wxTR_HAS_VARIABLE_ROW_HEIGHT = wxc.wxTR_HAS_VARIABLE_ROW_HEIGHT
wxLC_ICON = wxc.wxLC_ICON
wxLC_SMALL_ICON = wxc.wxLC_SMALL_ICON
wxLC_LIST = wxc.wxLC_LIST
@@ -337,6 +374,8 @@ wxPD_ELAPSED_TIME = wxc.wxPD_ELAPSED_TIME
wxPD_ESTIMATED_TIME = wxc.wxPD_ESTIMATED_TIME
wxPD_REMAINING_TIME = wxc.wxPD_REMAINING_TIME
wxNO_DEFAULT = wxc.wxNO_DEFAULT
wxMENU_TEAROFF = wxc.wxMENU_TEAROFF
wxNO_FULL_REPAINT_ON_RESIZE = wxc.wxNO_FULL_REPAINT_ON_RESIZE
wxDEFAULT = wxc.wxDEFAULT
wxDECORATIVE = wxc.wxDECORATIVE
wxROMAN = wxc.wxROMAN
@@ -612,6 +651,9 @@ wxEVT_NC_LEFT_DCLICK = wxc.wxEVT_NC_LEFT_DCLICK
wxEVT_NC_MIDDLE_DCLICK = wxc.wxEVT_NC_MIDDLE_DCLICK
wxEVT_NC_RIGHT_DCLICK = wxc.wxEVT_NC_RIGHT_DCLICK
wxEVT_CHAR = wxc.wxEVT_CHAR
wxEVT_KEY_DOWN = wxc.wxEVT_KEY_DOWN
wxEVT_KEY_UP = wxc.wxEVT_KEY_UP
wxEVT_CHAR_HOOK = wxc.wxEVT_CHAR_HOOK
wxEVT_SCROLL_TOP = wxc.wxEVT_SCROLL_TOP
wxEVT_SCROLL_BOTTOM = wxc.wxEVT_SCROLL_BOTTOM
wxEVT_SCROLL_LINEUP = wxc.wxEVT_SCROLL_LINEUP
@@ -633,8 +675,6 @@ wxEVT_END_SESSION = wxc.wxEVT_END_SESSION
wxEVT_QUERY_END_SESSION = wxc.wxEVT_QUERY_END_SESSION
wxEVT_ACTIVATE_APP = wxc.wxEVT_ACTIVATE_APP
wxEVT_POWER = wxc.wxEVT_POWER
wxEVT_CHAR_HOOK = wxc.wxEVT_CHAR_HOOK
wxEVT_KEY_UP = wxc.wxEVT_KEY_UP
wxEVT_ACTIVATE = wxc.wxEVT_ACTIVATE
wxEVT_CREATE = wxc.wxEVT_CREATE
wxEVT_DESTROY = wxc.wxEVT_DESTROY
@@ -814,6 +854,12 @@ def EVT_CHAR(win, func):
def EVT_CHAR_HOOK(win, func):
win.Connect(-1, -1, wxEVT_CHAR_HOOK, func)
def EVT_KEY_DOWN(win, func):
win.Connect(-1, -1, wxEVT_KEY_DOWN, func)
def EVT_KEY_UP(win, func):
win.Connect(-1, -1, wxEVT_KEY_UP, func)
def EVT_MENU_HIGHLIGHT(win, id, func):
win.Connect(id, -1, wxEVT_MENU_HIGHLIGHT, func)
@@ -1305,6 +1351,38 @@ class wxAcceleratorTable(wxAcceleratorTablePtr):
self.this = miscc.new_wxAcceleratorTable(arg0)
self.thisown = 1
#----------------------------------------------------------------------
# This helper function will take a wxPython object and convert it to
# another wxPython object type. This will not be able to create objects
# user that are derived from wxPython classes, only those that are
# actually part of wxPython and directly corespond to C++ objects.
#
# This is useful in situations where some method returns a generic
# type such as wxWindow, but you know that it is actually some
# derived type such as a wxTextCtrl. You can't call wxTextCtrl specific
# methods on a wxWindow object, but you can use this function to
# create a wxTextCtrl object that will pass the same pointer to
# the C++ code. You use it like this:
#
# textCtrl = wxPyTypeCast(window, "wxTextCtrl")
#
#
# WARNING: Using this function to type cast objects into types that
# they are not is not recommended and is likely to cause your
# program to crash... Hard.
#
def wxPyTypeCast(obj, typeStr):
if hasattr(obj, "this"):
newPtr = ptrcast(obj.this, typeStr+"_p")
else:
newPtr = ptrcast(obj, typeStr+"_p")
theClass = globals()[typeStr+"Ptr"]
theObj = theClass(newPtr)
theObj.thisown = obj.thisown
return theObj
#----------------------------------------------------------------------
## class wxPyStdOutWindow:
@@ -1373,3 +1451,10 @@ class wxApp(wxPyApp):
#----------------------------------------------------------------------------
# DO NOT hold any other references to this object. This is how we know when
# to cleanup system resources that wxWin is holding...
__cleanMeUp = __wxPyCleanup()
#----------------------------------------------------------------------------