From b68dc582b8c6dd32ef9f0a4ec91573bd5cc0296a Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 22 Dec 2000 06:51:21 +0000 Subject: [PATCH] More cleanup. Removed all wxPyDefaultXXX since they aren't needed any more. Regenerated wxGTK code from this morning's changes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/contrib/glcanvas/gtk/glcanvas.cpp | 18 +- wxPython/contrib/ogl/ogl.cpp | 10 +- wxPython/contrib/ogl/oglbasic.cpp | 10 +- wxPython/contrib/ogl/oglcanvas.cpp | 10 +- wxPython/contrib/ogl/oglhelpers.h | 4 +- wxPython/contrib/ogl/oglshapes.cpp | 10 +- wxPython/contrib/ogl/oglshapes2.cpp | 10 +- wxPython/contrib/stc/stc_.cpp | 10 +- wxPython/src/_extras.py | 12 +- wxPython/src/cmndlgs.i | 10 +- wxPython/src/controls.i | 124 +++++++------- wxPython/src/controls2.i | 21 +-- wxPython/src/frames.i | 8 +- wxPython/src/gdi.i | 5 + wxPython/src/gtk/calendar.cpp | 2 +- wxPython/src/gtk/cmndlgs.cpp | 10 +- wxPython/src/gtk/controls.cpp | 110 ++++++------- wxPython/src/gtk/controls2.cpp | 14 +- wxPython/src/gtk/frames.cpp | 8 +- wxPython/src/gtk/gdi.cpp | 2 + wxPython/src/gtk/grid.cpp | 182 ++++++++++----------- wxPython/src/gtk/html.cpp | 20 +-- wxPython/src/gtk/htmlhelp.cpp | 4 +- wxPython/src/gtk/mdi.cpp | 8 +- wxPython/src/gtk/misc.cpp | 2 + wxPython/src/gtk/misc2.cpp | 138 +++++++++++++++- wxPython/src/gtk/misc2.py | 16 ++ wxPython/src/gtk/printfw.cpp | 4 +- wxPython/src/gtk/stattool.cpp | 14 +- wxPython/src/gtk/utils.cpp | 4 +- wxPython/src/gtk/windows.cpp | 18 +- wxPython/src/gtk/windows2.cpp | 8 +- wxPython/src/gtk/windows3.cpp | 8 +- wxPython/src/gtk/wx.cpp | 91 +++++++---- wxPython/src/gtk/wx.py | 16 +- wxPython/src/helpers.cpp | 9 - wxPython/src/helpers.h | 6 +- wxPython/src/mdi.i | 8 +- wxPython/src/misc.i | 4 + wxPython/src/misc2.i | 6 +- wxPython/src/printfw.i | 4 +- wxPython/src/stattool.i | 21 ++- wxPython/src/windows.i | 21 ++- wxPython/src/windows2.i | 12 +- wxPython/src/windows3.i | 8 +- wxPython/src/wx.i | 4 +- 46 files changed, 591 insertions(+), 453 deletions(-) diff --git a/wxPython/contrib/glcanvas/gtk/glcanvas.cpp b/wxPython/contrib/glcanvas/gtk/glcanvas.cpp index b36f41995d..bc2d6e549a 100644 --- a/wxPython/contrib/glcanvas/gtk/glcanvas.cpp +++ b/wxPython/contrib/glcanvas/gtk/glcanvas.cpp @@ -55,7 +55,7 @@ extern PyObject *SWIG_newvarlink(void); #define SWIG_name "glcanvasc" -#include "helpers.h" +#include "export.h" #include static PyObject* l_output_helper(PyObject* target, PyObject* o) { @@ -105,12 +105,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } static char* wxStringErrorMsg = "string type is required for parameter"; - -#if defined(__WXMSW__) - static wxString wxPyEmptyStr(""); - static wxPoint wxPyDefaultPosition(-1, -1); - static wxSize wxPyDefaultSize(-1, -1); -#endif #ifdef __cplusplus extern "C" { #endif @@ -467,8 +461,8 @@ static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject * wxGLCanvas * _result; wxWindow * _arg0; wxWindowID _arg1 = (wxWindowID ) -1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) 0; char * _arg5 = (char *) "GLCanvas"; int * _arg6 = (int *) NULL; @@ -983,7 +977,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxBusyInfo","_class_wxBusyInfo",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, - { "_wxJoystick","_class_wxJoystick",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, @@ -1164,7 +1157,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGauge","_class_wxGauge",0}, { "_class_wxCheckListBox","_wxCheckListBox",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxJoystick","_wxJoystick",0}, { "_class_wxCommandEvent","_wxCommandEvent",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, @@ -1228,8 +1220,8 @@ SWIGEXPORT(void) initglcanvasc() { d = PyModule_GetDict(m); - wxClassInfo::CleanUpClasses(); - wxClassInfo::InitializeClasses(); +// wxClassInfo::CleanUpClasses(); +// wxClassInfo::InitializeClasses(); { int i; diff --git a/wxPython/contrib/ogl/ogl.cpp b/wxPython/contrib/ogl/ogl.cpp index 70f8829ada..03398c7d16 100644 --- a/wxPython/contrib/ogl/ogl.cpp +++ b/wxPython/contrib/ogl/ogl.cpp @@ -349,7 +349,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxRealPoint","_wxRealPoint",0}, { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, { "_wxPNMHandler","_class_wxPNMHandler",0}, - { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, { "_wxLogGui","_class_wxLogGui",0}, { "_class_wxPyShapeEvtHandler","_wxPyShapeEvtHandler",0}, @@ -361,6 +360,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPySizer","_wxPySizer",0}, { "_class_wxPyCompositeShape","_wxPyCompositeShape",0}, { "_wxPyPolygonShape","_class_wxPyPolygonShape",0}, + { "_class_wxPostScriptDC","_wxPostScriptDC",0}, { "_wxPanel","_class_wxPanel",0}, { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, { "_wxCheckBox","_class_wxCheckBox",0}, @@ -426,7 +426,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxZipFSHandler","_wxZipFSHandler",0}, { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, - { "_wxTaskBarIcon","_class_wxTaskBarIcon",0}, { "_wxPrintDialog","_class_wxPrintDialog",0}, { "_wxPyControlPoint","_class_wxPyControlPoint",0}, { "_wxWindowDC","_class_wxWindowDC",0}, @@ -518,7 +517,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxTextCtrl","_wxTextCtrl",0}, { "_class_wxListItemAttr","_wxListItemAttr",0}, { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, - { "_wxMetaFileDC","_class_wxMetaFileDC",0}, { "_class_wxTextDataObject","_wxTextDataObject",0}, { "_wxMenu","_class_wxMenu",0}, { "_class_wxMoveEvent","_wxMoveEvent",0}, @@ -554,7 +552,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxBusyInfo","_class_wxBusyInfo",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, - { "_wxJoystick","_class_wxJoystick",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_class_wxPyCircleShape","_wxPyCircleShape",0}, { "_wxClientDC","_class_wxClientDC",0}, @@ -572,7 +569,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_short","_short",0}, { "_wxMemoryDC","_class_wxMemoryDC",0}, { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, - { "_class_wxTaskBarIcon","_wxTaskBarIcon",0}, { "_class_wxPrintDialog","_wxPrintDialog",0}, { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, { "_class_wxPyControlPoint","_wxPyControlPoint",0}, @@ -583,6 +579,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxStatusBar","_class_wxStatusBar",0}, { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_class_wxCursor","_wxCursor",0}, + { "_wxPostScriptDC","_class_wxPostScriptDC",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, { "_class_wxPyProcess","_wxPyProcess",0}, { "_class_wxImageHandler","_wxImageHandler",0}, @@ -591,7 +588,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, - { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_class_wxMenu","_wxMenu",0}, { "_wxControl","_class_wxControl",0}, { "_class_wxListBox","_wxListBox",0}, @@ -679,7 +675,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyApp","_wxPyApp",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, { "_class_wxLogTextCtrl","_wxLogTextCtrl",0}, { "_class_wxLogGui","_wxLogGui",0}, @@ -743,7 +738,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGauge","_class_wxGauge",0}, { "_class_wxCheckListBox","_wxCheckListBox",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxJoystick","_wxJoystick",0}, { "_class_wxCommandEvent","_wxCommandEvent",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, diff --git a/wxPython/contrib/ogl/oglbasic.cpp b/wxPython/contrib/ogl/oglbasic.cpp index e201df629c..502eb64124 100644 --- a/wxPython/contrib/ogl/oglbasic.cpp +++ b/wxPython/contrib/ogl/oglbasic.cpp @@ -8464,7 +8464,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxRealPoint","_wxRealPoint",0}, { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, { "_wxPNMHandler","_class_wxPNMHandler",0}, - { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, { "_wxLogGui","_class_wxLogGui",0}, { "_class_wxPyShapeEvtHandler","_class_wxPyShape",SwigwxPyShapeTowxPyShapeEvtHandler}, @@ -8476,6 +8475,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxStatusBar","_wxStatusBar",0}, { "_class_wxGIFHandler","_wxGIFHandler",0}, { "_class_wxPySizer","_wxPySizer",0}, + { "_class_wxPostScriptDC","_wxPostScriptDC",0}, { "_wxPanel","_class_wxPanel",0}, { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, { "_wxCheckBox","_class_wxCheckBox",0}, @@ -8538,7 +8538,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxZipFSHandler","_wxZipFSHandler",0}, { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, - { "_wxTaskBarIcon","_class_wxTaskBarIcon",0}, { "_wxPrintDialog","_class_wxPrintDialog",0}, { "_wxWindowDC","_class_wxWindowDC",0}, { "_wxTimerEvent","_class_wxTimerEvent",0}, @@ -8623,7 +8622,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxTextCtrl","_wxTextCtrl",0}, { "_class_wxListItemAttr","_wxListItemAttr",0}, { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, - { "_wxMetaFileDC","_class_wxMetaFileDC",0}, { "_class_wxTextDataObject","_wxTextDataObject",0}, { "_wxMenu","_class_wxMenu",0}, { "_class_wxMoveEvent","_wxMoveEvent",0}, @@ -8658,7 +8656,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxBusyInfo","_class_wxBusyInfo",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, - { "_wxJoystick","_class_wxJoystick",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, @@ -8674,7 +8671,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_short","_short",0}, { "_wxMemoryDC","_class_wxMemoryDC",0}, { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, - { "_class_wxTaskBarIcon","_wxTaskBarIcon",0}, { "_class_wxPrintDialog","_wxPrintDialog",0}, { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, { "_wxPaintDC","_class_wxPaintDC",0}, @@ -8684,6 +8680,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxStatusBar","_class_wxStatusBar",0}, { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_class_wxCursor","_wxCursor",0}, + { "_wxPostScriptDC","_class_wxPostScriptDC",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, { "_class_wxPyProcess","_wxPyProcess",0}, { "_class_wxImageHandler","_wxImageHandler",0}, @@ -8692,7 +8689,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, - { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_class_wxMenu","_wxMenu",0}, { "_wxControl","_class_wxControl",0}, { "_class_wxListBox","_wxListBox",0}, @@ -8778,7 +8774,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyApp","_wxPyApp",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, { "_class_wxLogTextCtrl","_wxLogTextCtrl",0}, { "_class_wxLogGui","_wxLogGui",0}, @@ -8839,7 +8834,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGauge","_class_wxGauge",0}, { "_class_wxCheckListBox","_wxCheckListBox",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxJoystick","_wxJoystick",0}, { "_class_wxCommandEvent","_wxCommandEvent",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, diff --git a/wxPython/contrib/ogl/oglcanvas.cpp b/wxPython/contrib/ogl/oglcanvas.cpp index 1d655bced8..6c53cdc3b8 100644 --- a/wxPython/contrib/ogl/oglcanvas.cpp +++ b/wxPython/contrib/ogl/oglcanvas.cpp @@ -2105,7 +2105,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxRealPoint","_wxRealPoint",0}, { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, { "_wxPNMHandler","_class_wxPNMHandler",0}, - { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, { "_wxLogGui","_class_wxLogGui",0}, { "_class_wxPyShapeEvtHandler","_wxPyShapeEvtHandler",0}, @@ -2115,6 +2114,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxStatusBar","_wxStatusBar",0}, { "_class_wxGIFHandler","_wxGIFHandler",0}, { "_class_wxPySizer","_wxPySizer",0}, + { "_class_wxPostScriptDC","_wxPostScriptDC",0}, { "_wxPanel","_class_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxPanel}, { "_wxPanel","_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxPanel}, { "_wxPanel","_class_wxPanel",0}, @@ -2180,7 +2180,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxZipFSHandler","_wxZipFSHandler",0}, { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, - { "_wxTaskBarIcon","_class_wxTaskBarIcon",0}, { "_wxPrintDialog","_class_wxPrintDialog",0}, { "_wxWindowDC","_class_wxWindowDC",0}, { "_wxTimerEvent","_class_wxTimerEvent",0}, @@ -2268,7 +2267,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxTextCtrl","_wxTextCtrl",0}, { "_class_wxListItemAttr","_wxListItemAttr",0}, { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, - { "_wxMetaFileDC","_class_wxMetaFileDC",0}, { "_class_wxTextDataObject","_wxTextDataObject",0}, { "_wxMenu","_class_wxMenu",0}, { "_class_wxMoveEvent","_wxMoveEvent",0}, @@ -2305,7 +2303,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxBusyInfo","_class_wxBusyInfo",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, - { "_wxJoystick","_class_wxJoystick",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, @@ -2321,7 +2318,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_short","_short",0}, { "_wxMemoryDC","_class_wxMemoryDC",0}, { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, - { "_class_wxTaskBarIcon","_wxTaskBarIcon",0}, { "_class_wxPrintDialog","_wxPrintDialog",0}, { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, { "_wxPaintDC","_class_wxPaintDC",0}, @@ -2331,6 +2327,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxStatusBar","_class_wxStatusBar",0}, { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_class_wxCursor","_wxCursor",0}, + { "_wxPostScriptDC","_class_wxPostScriptDC",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, { "_class_wxPyProcess","_wxPyProcess",0}, { "_class_wxImageHandler","_wxImageHandler",0}, @@ -2341,7 +2338,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, - { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_class_wxMenu","_wxMenu",0}, { "_wxControl","_class_wxControl",0}, { "_class_wxListBox","_wxListBox",0}, @@ -2427,7 +2423,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyApp","_wxPyApp",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, { "_class_wxLogTextCtrl","_wxLogTextCtrl",0}, { "_class_wxLogGui","_wxLogGui",0}, @@ -2489,7 +2484,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGauge","_class_wxGauge",0}, { "_class_wxCheckListBox","_wxCheckListBox",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxJoystick","_wxJoystick",0}, { "_class_wxCommandEvent","_wxCommandEvent",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, diff --git a/wxPython/contrib/ogl/oglhelpers.h b/wxPython/contrib/ogl/oglhelpers.h index a24ce863b3..19404c2826 100644 --- a/wxPython/contrib/ogl/oglhelpers.h +++ b/wxPython/contrib/ogl/oglhelpers.h @@ -110,8 +110,8 @@ wxList* wxPy_wxRealPoint_ListHelper(PyObject* pyList); class wxPyShapeCanvas : public wxShapeCanvas { public: wxPyShapeCanvas(wxWindow* parent = NULL, wxWindowID id = -1, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxBORDER) : wxShapeCanvas(parent, id, pos, size, style) {} diff --git a/wxPython/contrib/ogl/oglshapes.cpp b/wxPython/contrib/ogl/oglshapes.cpp index 2916429c24..3fa3b83486 100644 --- a/wxPython/contrib/ogl/oglshapes.cpp +++ b/wxPython/contrib/ogl/oglshapes.cpp @@ -12661,7 +12661,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxRealPoint","_wxRealPoint",0}, { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, { "_wxPNMHandler","_class_wxPNMHandler",0}, - { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, { "_wxLogGui","_class_wxLogGui",0}, { "_class_wxPyShapeEvtHandler","_class_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyShapeEvtHandler}, @@ -12688,6 +12687,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyCompositeShape","_class_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyCompositeShape}, { "_class_wxPyCompositeShape","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyCompositeShape}, { "_class_wxPyCompositeShape","_wxPyCompositeShape",0}, + { "_class_wxPostScriptDC","_wxPostScriptDC",0}, { "_wxPanel","_class_wxPanel",0}, { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, { "_wxCheckBox","_class_wxCheckBox",0}, @@ -12752,7 +12752,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxZipFSHandler","_wxZipFSHandler",0}, { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, - { "_wxTaskBarIcon","_class_wxTaskBarIcon",0}, { "_wxPrintDialog","_class_wxPrintDialog",0}, { "_wxPyControlPoint","_class_wxPyControlPoint",0}, { "_wxWindowDC","_class_wxWindowDC",0}, @@ -12840,7 +12839,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxTextCtrl","_wxTextCtrl",0}, { "_class_wxListItemAttr","_wxListItemAttr",0}, { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, - { "_wxMetaFileDC","_class_wxMetaFileDC",0}, { "_class_wxTextDataObject","_wxTextDataObject",0}, { "_wxMenu","_class_wxMenu",0}, { "_class_wxMoveEvent","_wxMoveEvent",0}, @@ -12875,7 +12873,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxBusyInfo","_class_wxBusyInfo",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, - { "_wxJoystick","_class_wxJoystick",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, @@ -12892,7 +12889,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_short","_short",0}, { "_wxMemoryDC","_class_wxMemoryDC",0}, { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, - { "_class_wxTaskBarIcon","_wxTaskBarIcon",0}, { "_class_wxPrintDialog","_wxPrintDialog",0}, { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, { "_class_wxPyControlPoint","_wxPyControlPoint",0}, @@ -12903,6 +12899,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxStatusBar","_class_wxStatusBar",0}, { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_class_wxCursor","_wxCursor",0}, + { "_wxPostScriptDC","_class_wxPostScriptDC",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, { "_class_wxPyProcess","_wxPyProcess",0}, { "_class_wxImageHandler","_wxImageHandler",0}, @@ -12925,7 +12922,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, - { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_class_wxMenu","_wxMenu",0}, { "_wxControl","_class_wxControl",0}, { "_class_wxListBox","_wxListBox",0}, @@ -13012,7 +13008,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyApp","_wxPyApp",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, { "_class_wxLogTextCtrl","_wxLogTextCtrl",0}, { "_class_wxLogGui","_wxLogGui",0}, @@ -13088,7 +13083,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGauge","_class_wxGauge",0}, { "_class_wxCheckListBox","_wxCheckListBox",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxJoystick","_wxJoystick",0}, { "_class_wxCommandEvent","_wxCommandEvent",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, diff --git a/wxPython/contrib/ogl/oglshapes2.cpp b/wxPython/contrib/ogl/oglshapes2.cpp index 474d070107..28905f8456 100644 --- a/wxPython/contrib/ogl/oglshapes2.cpp +++ b/wxPython/contrib/ogl/oglshapes2.cpp @@ -8002,7 +8002,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxRealPoint","_wxRealPoint",0}, { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, { "_wxPNMHandler","_class_wxPNMHandler",0}, - { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, { "_wxLogGui","_class_wxLogGui",0}, { "_class_wxPyShapeEvtHandler","_class_wxPyTextShape",SwigwxPyTextShapeTowxPyShapeEvtHandler}, @@ -8024,6 +8023,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPySizer","_wxPySizer",0}, { "_class_wxPyCompositeShape","_wxPyCompositeShape",0}, { "_wxPyPolygonShape","_class_wxPyPolygonShape",0}, + { "_class_wxPostScriptDC","_wxPostScriptDC",0}, { "_wxPanel","_class_wxPanel",0}, { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, { "_wxCheckBox","_class_wxCheckBox",0}, @@ -8088,7 +8088,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxZipFSHandler","_wxZipFSHandler",0}, { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, - { "_wxTaskBarIcon","_class_wxTaskBarIcon",0}, { "_wxPrintDialog","_class_wxPrintDialog",0}, { "_wxPyControlPoint","_class_wxPyControlPoint",0}, { "_wxWindowDC","_class_wxWindowDC",0}, @@ -8179,7 +8178,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxTextCtrl","_wxTextCtrl",0}, { "_class_wxListItemAttr","_wxListItemAttr",0}, { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, - { "_wxMetaFileDC","_class_wxMetaFileDC",0}, { "_class_wxTextDataObject","_wxTextDataObject",0}, { "_wxMenu","_class_wxMenu",0}, { "_class_wxMoveEvent","_wxMoveEvent",0}, @@ -8215,7 +8213,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxBusyInfo","_class_wxBusyInfo",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, - { "_wxJoystick","_class_wxJoystick",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_class_wxPyCircleShape","_wxPyCircleShape",0}, { "_wxClientDC","_class_wxClientDC",0}, @@ -8233,7 +8230,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_short","_short",0}, { "_wxMemoryDC","_class_wxMemoryDC",0}, { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, - { "_class_wxTaskBarIcon","_wxTaskBarIcon",0}, { "_class_wxPrintDialog","_wxPrintDialog",0}, { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, { "_class_wxPyControlPoint","_wxPyControlPoint",0}, @@ -8244,6 +8240,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxStatusBar","_class_wxStatusBar",0}, { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_class_wxCursor","_wxCursor",0}, + { "_wxPostScriptDC","_class_wxPostScriptDC",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, { "_class_wxPyProcess","_wxPyProcess",0}, { "_class_wxImageHandler","_wxImageHandler",0}, @@ -8262,7 +8259,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, - { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_class_wxMenu","_wxMenu",0}, { "_wxControl","_class_wxControl",0}, { "_class_wxListBox","_wxListBox",0}, @@ -8350,7 +8346,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyApp","_wxPyApp",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, { "_class_wxLogTextCtrl","_wxLogTextCtrl",0}, { "_class_wxLogGui","_wxLogGui",0}, @@ -8423,7 +8418,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGauge","_class_wxGauge",0}, { "_class_wxCheckListBox","_wxCheckListBox",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxJoystick","_wxJoystick",0}, { "_class_wxCommandEvent","_wxCommandEvent",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, diff --git a/wxPython/contrib/stc/stc_.cpp b/wxPython/contrib/stc/stc_.cpp index f31e053805..ff3ab6b5d2 100644 --- a/wxPython/contrib/stc/stc_.cpp +++ b/wxPython/contrib/stc/stc_.cpp @@ -8626,7 +8626,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxRealPoint","_wxRealPoint",0}, { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, { "_wxPNMHandler","_class_wxPNMHandler",0}, - { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, { "_wxLogGui","_class_wxLogGui",0}, { "_class_wxMenuItem","_wxMenuItem",0}, @@ -8635,6 +8634,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxStatusBar","_wxStatusBar",0}, { "_class_wxGIFHandler","_wxGIFHandler",0}, { "_class_wxPySizer","_wxPySizer",0}, + { "_class_wxPostScriptDC","_wxPostScriptDC",0}, { "_wxPanel","_class_wxPanel",0}, { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, { "_wxCheckBox","_class_wxCheckBox",0}, @@ -8701,7 +8701,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxZipFSHandler","_wxZipFSHandler",0}, { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, - { "_wxTaskBarIcon","_class_wxTaskBarIcon",0}, { "_wxPrintDialog","_class_wxPrintDialog",0}, { "_wxWindowDC","_class_wxWindowDC",0}, { "_wxTimerEvent","_class_wxTimerEvent",0}, @@ -8785,7 +8784,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxTextCtrl","_wxTextCtrl",0}, { "_class_wxListItemAttr","_wxListItemAttr",0}, { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, - { "_wxMetaFileDC","_class_wxMetaFileDC",0}, { "_class_wxTextDataObject","_wxTextDataObject",0}, { "_wxMenu","_class_wxMenu",0}, { "_class_wxMoveEvent","_wxMoveEvent",0}, @@ -8823,7 +8821,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxBusyInfo","_class_wxBusyInfo",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, - { "_wxJoystick","_class_wxJoystick",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, @@ -8839,7 +8836,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_short","_short",0}, { "_wxMemoryDC","_class_wxMemoryDC",0}, { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, - { "_class_wxTaskBarIcon","_wxTaskBarIcon",0}, { "_class_wxPrintDialog","_wxPrintDialog",0}, { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, { "_wxPaintDC","_class_wxPaintDC",0}, @@ -8849,6 +8845,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxStatusBar","_class_wxStatusBar",0}, { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_class_wxCursor","_wxCursor",0}, + { "_wxPostScriptDC","_class_wxPostScriptDC",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, { "_class_wxPyProcess","_wxPyProcess",0}, { "_class_wxImageHandler","_wxImageHandler",0}, @@ -8856,7 +8853,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, - { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_class_wxMenu","_wxMenu",0}, { "_wxControl","_class_wxStyledTextCtrl",SwigwxStyledTextCtrlTowxControl}, { "_wxControl","_wxStyledTextCtrl",SwigwxStyledTextCtrlTowxControl}, @@ -8944,7 +8940,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyApp","_wxPyApp",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, { "_class_wxLogTextCtrl","_wxLogTextCtrl",0}, { "_class_wxLogGui","_wxLogGui",0}, @@ -9007,7 +9002,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGauge","_class_wxGauge",0}, { "_class_wxCheckListBox","_wxCheckListBox",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxJoystick","_wxJoystick",0}, { "_class_wxCommandEvent","_class_wxStyledTextEvent",SwigwxStyledTextEventTowxCommandEvent}, { "_class_wxCommandEvent","_wxStyledTextEvent",SwigwxStyledTextEventTowxCommandEvent}, { "_class_wxCommandEvent","_wxCommandEvent",0}, diff --git a/wxPython/src/_extras.py b/wxPython/src/_extras.py index 79bcb57446..08a0090f25 100644 --- a/wxPython/src/_extras.py +++ b/wxPython/src/_extras.py @@ -725,15 +725,15 @@ NULL = _NullObj() wxColor = wxColour wxNamedColor = wxNamedColour -wxPyDefaultPosition.Set(-1,-1) -wxPyDefaultSize.Set(-1,-1) - # aliases so that C++ documentation applies: -wxDefaultPosition = wxPyDefaultPosition -wxDefaultSize = wxPyDefaultSize +#wxDefaultPosition = wxPyDefaultPosition +#wxDefaultSize = wxPyDefaultSize + # backwards compatibility -wxNoRefBitmap = wxBitmap +wxNoRefBitmap = wxBitmap +wxPyDefaultPosition = wxDefaultPosition +wxPyDefaultSize = wxDefaultSize #---------------------------------------------------------------------- # This helper function will take a wxPython object and convert it to diff --git a/wxPython/src/cmndlgs.i b/wxPython/src/cmndlgs.i index 088e509085..558576d46d 100644 --- a/wxPython/src/cmndlgs.i +++ b/wxPython/src/cmndlgs.i @@ -69,7 +69,7 @@ public: char* message = "Choose a directory", char* defaultPath = "", long style = 0, - const wxPoint& pos = wxPyDefaultPosition); + const wxPoint& pos = wxDefaultPosition); %pragma(python) addtomethod = "__init__:#wx._StdDialogCallbacks(self)" @@ -91,7 +91,7 @@ public: char* defaultFile = "", char* wildcard = "*.*", long style = 0, - const wxPoint& pos = wxPyDefaultPosition); + const wxPoint& pos = wxDefaultPosition); %pragma(python) addtomethod = "__init__:#wx._StdDialogCallbacks(self)" @@ -156,7 +156,7 @@ public: int LCOUNT, wxString* choices, //char** clientData = NULL, long style = wxOK | wxCANCEL | wxCENTRE, - wxPoint* pos = &wxPyDefaultPosition) { + wxPoint* pos = &wxDefaultPosition) { return new wxSingleChoiceDialog(parent, *message, *caption, LCOUNT, choices, NULL, style, *pos); } @@ -180,7 +180,7 @@ public: char* caption = "Input Text", char* defaultValue = "", long style = wxOK | wxCANCEL | wxCENTRE, - const wxPoint& pos = wxPyDefaultPosition); + const wxPoint& pos = wxDefaultPosition); %pragma(python) addtomethod = "__init__:#wx._StdDialogCallbacks(self)" @@ -231,7 +231,7 @@ public: char* message, char* caption = "Message box", long style = wxOK | wxCANCEL | wxCENTRE, - const wxPoint& pos = wxPyDefaultPosition); + const wxPoint& pos = wxDefaultPosition); %pragma(python) addtomethod = "__init__:#wx._StdDialogCallbacks(self)" diff --git a/wxPython/src/controls.i b/wxPython/src/controls.i index 951d344358..2e8f3e4f1f 100644 --- a/wxPython/src/controls.i +++ b/wxPython/src/controls.i @@ -49,10 +49,6 @@ //---------------------------------------------------------------------- -%{ -wxValidator wxPyDefaultValidator; // Non-const default because of SWIG -%} - %readonly wxValidator wxDefaultValidator; %readwrite @@ -63,10 +59,10 @@ class wxControl : public wxWindow { public: wxControl(wxWindow *parent, wxWindowID id, - const wxPoint& pos=wxPyDefaultPosition, - const wxSize& size=wxPyDefaultSize, + const wxPoint& pos=wxDefaultPosition, + const wxSize& size=wxDefaultSize, long style=0, - const wxValidator& validator=wxPyDefaultValidator, + const wxValidator& validator=wxDefaultValidator, const char* name="control"); %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" @@ -82,10 +78,10 @@ public: class wxButton : public wxControl { public: wxButton(wxWindow* parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxPyDefaultValidator, + const wxValidator& validator = wxDefaultValidator, char* name = "button"); %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" @@ -107,10 +103,10 @@ public: class wxBitmapButton : public wxButton { public: wxBitmapButton(wxWindow* parent, wxWindowID id, const wxBitmap& bitmap, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW, - const wxValidator& validator = wxPyDefaultValidator, + const wxValidator& validator = wxDefaultValidator, char* name = "button"); %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" @@ -134,9 +130,9 @@ public: // class wxToggleButton : public wxControl { // public: // wxToggleButton(wxWindow *parent, wxWindowID id, const wxString& label, -// const wxPoint& pos = wxPyDefaultPosition, -// const wxSize& size = wxPyDefaultSize, long style = 0, -// const wxValidator& validator = wxPyDefaultValidator, +// const wxPoint& pos = wxDefaultPosition, +// const wxSize& size = wxDefaultSize, long style = 0, +// const wxValidator& validator = wxDefaultValidator, // const char* name = "toggle"); // void SetValue(bool value); // bool GetValue() const ; @@ -146,9 +142,9 @@ public: // class wxBitmapToggleButton : public wxToggleButton { // public: // wxBitmapToggleButton(wxWindow *parent, wxWindowID id, const wxBitmap *label, -// const wxPoint& pos = wxPyDefaultPosition, -// const wxSize& size = wxPyDefaultSize, long style = 0, -// const wxValidator& validator = wxPyDefaultValidator, +// const wxPoint& pos = wxDefaultPosition, +// const wxSize& size = wxDefaultSize, long style = 0, +// const wxValidator& validator = wxDefaultValidator, // const char *name = "toggle"); // void SetLabel(const wxBitmap& bitmap); // }; @@ -159,10 +155,10 @@ public: class wxCheckBox : public wxControl { public: wxCheckBox(wxWindow* parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& val = wxPyDefaultValidator, + const wxValidator& val = wxDefaultValidator, char* name = "checkBox"); %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" @@ -176,11 +172,11 @@ public: class wxChoice : public wxControl { public: wxChoice(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, int LCOUNT=0, wxString* choices=NULL, long style = 0, - const wxValidator& validator = wxPyDefaultValidator, + const wxValidator& validator = wxDefaultValidator, char* name = "choice"); %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" @@ -203,11 +199,11 @@ public: class wxComboBox : public wxChoice { public: wxComboBox(wxWindow* parent, wxWindowID id, char* value = "", - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, int LCOUNT=0, wxString* choices=NULL, long style = 0, - const wxValidator& validator = wxPyDefaultValidator, + const wxValidator& validator = wxDefaultValidator, char* name = "comboBox"); %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" @@ -244,10 +240,10 @@ public: class wxGauge : public wxControl { public: wxGauge(wxWindow* parent, wxWindowID id, int range, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxGA_HORIZONTAL, - const wxValidator& validator = wxPyDefaultValidator, + const wxValidator& validator = wxDefaultValidator, char* name = "gauge"); %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" @@ -267,8 +263,8 @@ public: class wxStaticBox : public wxControl { public: wxStaticBox(wxWindow* parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, char* name = "staticBox"); }; @@ -280,8 +276,8 @@ public: class wxStaticLine : public wxControl { public: wxStaticLine( wxWindow *parent, wxWindowID id, - const wxPoint &pos = wxPyDefaultPosition, - const wxSize &size = wxPyDefaultSize, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, long style = wxLI_HORIZONTAL, const char* name = "staticLine" ); }; @@ -292,8 +288,8 @@ public: class wxStaticText : public wxControl { public: wxStaticText(wxWindow* parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, char* name = "staticText"); @@ -308,11 +304,11 @@ public: class wxListBox : public wxControl { public: wxListBox(wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, int LCOUNT, wxString* choices = NULL, long style = 0, - const wxValidator& validator = wxPyDefaultValidator, + const wxValidator& validator = wxDefaultValidator, char* name = "listBox"); %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" @@ -360,12 +356,12 @@ public: class wxCheckListBox : public wxListBox { public: wxCheckListBox(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, int LCOUNT = 0, wxString* choices = NULL, long style = 0, - const wxValidator& validator = wxPyDefaultValidator, + const wxValidator& validator = wxDefaultValidator, char* name = "listBox"); %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" @@ -382,10 +378,10 @@ public: class wxTextCtrl : public wxControl { public: wxTextCtrl(wxWindow* parent, wxWindowID id, char* value = "", - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxPyDefaultValidator, + const wxValidator& validator = wxDefaultValidator, char* name = "text"); %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" @@ -439,10 +435,10 @@ public: class wxScrollBar : public wxControl { public: wxScrollBar(wxWindow* parent, wxWindowID id = -1, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxSB_HORIZONTAL, - const wxValidator& validator = wxPyDefaultValidator, + const wxValidator& validator = wxDefaultValidator, char* name = "scrollBar"); %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" @@ -463,8 +459,8 @@ public: class wxSpinButton : public wxControl { public: wxSpinButton(wxWindow* parent, wxWindowID id = -1, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxSP_HORIZONTAL, char* name = "spinButton"); @@ -481,8 +477,8 @@ class wxStaticBitmap : public wxControl { public: wxStaticBitmap(wxWindow* parent, wxWindowID id, const wxBitmap& bitmap, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, char* name = "staticBitmap"); @@ -499,12 +495,12 @@ class wxRadioBox : public wxControl { public: wxRadioBox(wxWindow* parent, wxWindowID id, const wxString& label, - const wxPoint& point = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& point = wxDefaultPosition, + const wxSize& size = wxDefaultSize, int LCOUNT = 0, wxString* choices = NULL, int majorDimension = 0, long style = wxRA_HORIZONTAL, - const wxValidator& validator = wxPyDefaultValidator, + const wxValidator& validator = wxDefaultValidator, char* name = "radioBox"); %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" @@ -534,10 +530,10 @@ class wxRadioButton : public wxControl { public: wxRadioButton(wxWindow* parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxPyDefaultValidator, + const wxValidator& validator = wxDefaultValidator, char* name = "radioButton"); %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" @@ -552,10 +548,10 @@ class wxSlider : public wxControl { public: wxSlider(wxWindow* parent, wxWindowID id, int value, int minValue, int maxValue, - const wxPoint& point = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& point = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxSL_HORIZONTAL, - const wxValidator& validator = wxPyDefaultValidator, + const wxValidator& validator = wxDefaultValidator, char* name = "slider"); %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" @@ -589,8 +585,8 @@ public: wxSpinCtrl(wxWindow *parent, wxWindowID id = -1, const char* value = "", - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxSP_ARROW_KEYS, int min = 0, int max = 100, int initial = 0, const char* name = "wxSpinCtrl"); diff --git a/wxPython/src/controls2.i b/wxPython/src/controls2.i index 945533fe2d..5acae12601 100644 --- a/wxPython/src/controls2.i +++ b/wxPython/src/controls2.i @@ -38,11 +38,6 @@ //---------------------------------------------------------------------- -%{ -extern wxValidator wxPyDefaultValidator; -%} - -//---------------------------------------------------------------------- enum { wxLIST_MASK_TEXT, @@ -214,10 +209,10 @@ public: class wxListCtrl : public wxControl { public: wxListCtrl(wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxLC_ICON, - const wxValidator& validator = wxPyDefaultValidator, + const wxValidator& validator = wxDefaultValidator, char* name = "listCtrl"); %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" @@ -486,10 +481,10 @@ public: %name(wxTreeCtrl)class wxPyTreeCtrl : public wxControl { public: wxPyTreeCtrl(wxWindow *parent, wxWindowID id = -1, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT, - const wxValidator& validator = wxPyDefaultValidator, + const wxValidator& validator = wxDefaultValidator, char* name = "wxTreeCtrl"); void _setSelf(PyObject* self, PyObject* _class); @@ -714,8 +709,8 @@ public: class wxTabCtrl : public wxControl { public: wxTabCtrl(wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, char* name = "tabCtrl"); diff --git a/wxPython/src/frames.i b/wxPython/src/frames.i index cf4ee91b1b..62e49013c8 100644 --- a/wxPython/src/frames.i +++ b/wxPython/src/frames.i @@ -47,8 +47,8 @@ enum { class wxFrame : public wxWindow { public: wxFrame(wxWindow* parent, const wxWindowID id, const wxString& title, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, char* name = "frame"); @@ -95,8 +95,8 @@ public: class wxMiniFrame : public wxFrame { public: wxMiniFrame(wxWindow* parent, const wxWindowID id, const wxString& title, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, char* name = "frame"); diff --git a/wxPython/src/gdi.i b/wxPython/src/gdi.i index 63e628e81e..8d6dbfe7a5 100644 --- a/wxPython/src/gdi.i +++ b/wxPython/src/gdi.i @@ -31,6 +31,11 @@ %import _defs.i %import misc.i + +%{ + static wxString wxPyEmptyStr(""); +%} + //--------------------------------------------------------------------------- // class wxGDIImage { diff --git a/wxPython/src/gtk/calendar.cpp b/wxPython/src/gtk/calendar.cpp index dd882676af..59b0ccd8d8 100644 --- a/wxPython/src/gtk/calendar.cpp +++ b/wxPython/src/gtk/calendar.cpp @@ -55,7 +55,7 @@ extern PyObject *SWIG_newvarlink(void); #define SWIG_name "calendarc" -#include "helpers.h" +#include "export.h" #include static PyObject* l_output_helper(PyObject* target, PyObject* o) { diff --git a/wxPython/src/gtk/cmndlgs.cpp b/wxPython/src/gtk/cmndlgs.cpp index 0ebd9465e7..82103c7d83 100644 --- a/wxPython/src/gtk/cmndlgs.cpp +++ b/wxPython/src/gtk/cmndlgs.cpp @@ -531,7 +531,7 @@ static PyObject *_wrap_new_wxDirDialog(PyObject *self, PyObject *args, PyObject char * _arg1 = (char *) "Choose a directory"; char * _arg2 = (char *) ""; long _arg3 = (long ) 0; - wxPoint * _arg4 = (wxPoint *) &wxPyDefaultPosition; + wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; PyObject * _argo0 = 0; wxPoint temp; PyObject * _obj4 = 0; @@ -831,7 +831,7 @@ static PyObject *_wrap_new_wxFileDialog(PyObject *self, PyObject *args, PyObject char * _arg3 = (char *) ""; char * _arg4 = (char *) "*.*"; long _arg5 = (long ) 0; - wxPoint * _arg6 = (wxPoint *) &wxPyDefaultPosition; + wxPoint * _arg6 = (wxPoint *) &wxDefaultPosition; PyObject * _argo0 = 0; wxPoint temp; PyObject * _obj6 = 0; @@ -1545,7 +1545,7 @@ static PyObject *_wrap_new_wxSingleChoiceDialog(PyObject *self, PyObject *args, int _arg3; wxString * _arg4; long _arg5 = (long ) wxOK|wxCANCEL|wxCENTRE; - wxPoint * _arg6 = (wxPoint *) &wxPyDefaultPosition; + wxPoint * _arg6 = (wxPoint *) &wxDefaultPosition; PyObject * _argo0 = 0; PyObject * _obj1 = 0; PyObject * _obj2 = 0; @@ -1803,7 +1803,7 @@ static PyObject *_wrap_new_wxTextEntryDialog(PyObject *self, PyObject *args, PyO char * _arg2 = (char *) "Input Text"; char * _arg3 = (char *) ""; long _arg4 = (long ) wxOK|wxCANCEL|wxCENTRE; - wxPoint * _arg5 = (wxPoint *) &wxPyDefaultPosition; + wxPoint * _arg5 = (wxPoint *) &wxDefaultPosition; PyObject * _argo0 = 0; wxPoint temp; PyObject * _obj5 = 0; @@ -2580,7 +2580,7 @@ static PyObject *_wrap_new_wxMessageDialog(PyObject *self, PyObject *args, PyObj char * _arg1; char * _arg2 = (char *) "Message box"; long _arg3 = (long ) wxOK|wxCANCEL|wxCENTRE; - wxPoint * _arg4 = (wxPoint *) &wxPyDefaultPosition; + wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; PyObject * _argo0 = 0; wxPoint temp; PyObject * _obj4 = 0; diff --git a/wxPython/src/gtk/controls.cpp b/wxPython/src/gtk/controls.cpp index af1424f8aa..1a3449fb10 100644 --- a/wxPython/src/gtk/controls.cpp +++ b/wxPython/src/gtk/controls.cpp @@ -122,8 +122,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { static char* wxStringErrorMsg = "string type is required for parameter"; -wxValidator wxPyDefaultValidator; // Non-const default because of SWIG - wxSize wxButton_GetDefaultSize() { return wxButton::GetDefaultSize(); } @@ -186,10 +184,10 @@ static PyObject *_wrap_new_wxControl(PyObject *self, PyObject *args, PyObject *k wxControl * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) 0; - wxValidator * _arg5 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg5 = (wxValidator *) &wxDefaultValidator; char * _arg6 = (char *) "control"; PyObject * _argo0 = 0; wxPoint temp; @@ -394,10 +392,10 @@ static PyObject *_wrap_new_wxButton(PyObject *self, PyObject *args, PyObject *kw wxWindow * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) 0; - wxValidator * _arg6 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator; char * _arg7 = (char *) "button"; PyObject * _argo0 = 0; PyObject * _obj2 = 0; @@ -611,10 +609,10 @@ static PyObject *_wrap_new_wxBitmapButton(PyObject *self, PyObject *args, PyObje wxWindow * _arg0; wxWindowID _arg1; wxBitmap * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxBU_AUTODRAW; - wxValidator * _arg6 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator; char * _arg7 = (char *) "button"; PyObject * _argo0 = 0; PyObject * _argo2 = 0; @@ -1075,10 +1073,10 @@ static PyObject *_wrap_new_wxCheckBox(PyObject *self, PyObject *args, PyObject * wxWindow * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) 0; - wxValidator * _arg6 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator; char * _arg7 = (char *) "checkBox"; PyObject * _argo0 = 0; PyObject * _obj2 = 0; @@ -1243,12 +1241,12 @@ static PyObject *_wrap_new_wxChoice(PyObject *self, PyObject *args, PyObject *kw wxChoice * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; int _arg4 = (int ) 0; wxString * _arg5 = (wxString *) NULL; long _arg6 = (long ) 0; - wxValidator * _arg7 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg7 = (wxValidator *) &wxDefaultValidator; char * _arg8 = (char *) "choice"; PyObject * _argo0 = 0; wxPoint temp; @@ -1743,12 +1741,12 @@ static PyObject *_wrap_new_wxComboBox(PyObject *self, PyObject *args, PyObject * wxWindow * _arg0; wxWindowID _arg1; char * _arg2 = (char *) ""; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; int _arg5 = (int ) 0; wxString * _arg6 = (wxString *) NULL; long _arg7 = (long ) 0; - wxValidator * _arg8 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg8 = (wxValidator *) &wxDefaultValidator; char * _arg9 = (char *) "comboBox"; PyObject * _argo0 = 0; wxPoint temp; @@ -2541,10 +2539,10 @@ static PyObject *_wrap_new_wxGauge(PyObject *self, PyObject *args, PyObject *kwa wxWindow * _arg0; wxWindowID _arg1; int _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxGA_HORIZONTAL; - wxValidator * _arg6 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator; char * _arg7 = (char *) "gauge"; PyObject * _argo0 = 0; wxPoint temp; @@ -2850,8 +2848,8 @@ static PyObject *_wrap_new_wxStaticBox(PyObject *self, PyObject *args, PyObject wxWindow * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) 0; char * _arg6 = (char *) "staticBox"; PyObject * _argo0 = 0; @@ -2952,8 +2950,8 @@ static PyObject *_wrap_new_wxStaticLine(PyObject *self, PyObject *args, PyObject wxStaticLine * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxLI_HORIZONTAL; char * _arg5 = (char *) "staticLine"; PyObject * _argo0 = 0; @@ -3032,8 +3030,8 @@ static PyObject *_wrap_new_wxStaticText(PyObject *self, PyObject *args, PyObject wxWindow * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) 0; char * _arg6 = (char *) "staticText"; PyObject * _argo0 = 0; @@ -3217,12 +3215,12 @@ static PyObject *_wrap_new_wxListBox(PyObject *self, PyObject *args, PyObject *k wxListBox * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; int _arg4; wxString * _arg5 = (wxString *) NULL; long _arg6 = (long ) 0; - wxValidator * _arg7 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg7 = (wxValidator *) &wxDefaultValidator; char * _arg8 = (char *) "listBox"; PyObject * _argo0 = 0; wxPoint temp; @@ -4015,12 +4013,12 @@ static PyObject *_wrap_new_wxCheckListBox(PyObject *self, PyObject *args, PyObje wxCheckListBox * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; int _arg4 = (int ) 0; wxString * _arg5 = (wxString *) NULL; long _arg6 = (long ) 0; - wxValidator * _arg7 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg7 = (wxValidator *) &wxDefaultValidator; char * _arg8 = (char *) "listBox"; PyObject * _argo0 = 0; wxPoint temp; @@ -4257,10 +4255,10 @@ static PyObject *_wrap_new_wxTextCtrl(PyObject *self, PyObject *args, PyObject * wxWindow * _arg0; wxWindowID _arg1; char * _arg2 = (char *) ""; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) 0; - wxValidator * _arg6 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator; char * _arg7 = (char *) "text"; PyObject * _argo0 = 0; wxPoint temp; @@ -5553,10 +5551,10 @@ static PyObject *_wrap_new_wxScrollBar(PyObject *self, PyObject *args, PyObject wxScrollBar * _result; wxWindow * _arg0; wxWindowID _arg1 = (wxWindowID ) -1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxSB_HORIZONTAL; - wxValidator * _arg5 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg5 = (wxValidator *) &wxDefaultValidator; char * _arg6 = (char *) "scrollBar"; PyObject * _argo0 = 0; wxPoint temp; @@ -5811,8 +5809,8 @@ static PyObject *_wrap_new_wxSpinButton(PyObject *self, PyObject *args, PyObject wxSpinButton * _result; wxWindow * _arg0; wxWindowID _arg1 = (wxWindowID ) -1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxSP_HORIZONTAL; char * _arg5 = (char *) "spinButton"; PyObject * _argo0 = 0; @@ -6029,8 +6027,8 @@ static PyObject *_wrap_new_wxStaticBitmap(PyObject *self, PyObject *args, PyObje wxWindow * _arg0; wxWindowID _arg1; wxBitmap * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) 0; char * _arg6 = (char *) "staticBitmap"; PyObject * _argo0 = 0; @@ -6224,13 +6222,13 @@ static PyObject *_wrap_new_wxRadioBox(PyObject *self, PyObject *args, PyObject * wxWindow * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; int _arg5 = (int ) 0; wxString * _arg6 = (wxString *) NULL; int _arg7 = (int ) 0; long _arg8 = (long ) wxRA_HORIZONTAL; - wxValidator * _arg9 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg9 = (wxValidator *) &wxDefaultValidator; char * _arg10 = (char *) "radioBox"; PyObject * _argo0 = 0; PyObject * _obj2 = 0; @@ -6814,10 +6812,10 @@ static PyObject *_wrap_new_wxRadioButton(PyObject *self, PyObject *args, PyObjec wxWindow * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) 0; - wxValidator * _arg6 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator; char * _arg7 = (char *) "radioButton"; PyObject * _argo0 = 0; PyObject * _obj2 = 0; @@ -6985,10 +6983,10 @@ static PyObject *_wrap_new_wxSlider(PyObject *self, PyObject *args, PyObject *kw int _arg2; int _arg3; int _arg4; - wxPoint * _arg5 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg6 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg5 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg6 = (wxSize *) &wxDefaultSize; long _arg7 = (long ) wxSL_HORIZONTAL; - wxValidator * _arg8 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg8 = (wxValidator *) &wxDefaultValidator; char * _arg9 = (char *) "slider"; PyObject * _argo0 = 0; wxPoint temp; @@ -7606,8 +7604,8 @@ static PyObject *_wrap_new_wxSpinCtrl(PyObject *self, PyObject *args, PyObject * wxWindow * _arg0; wxWindowID _arg1 = (wxWindowID ) -1; char * _arg2 = (char *) ""; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxSP_ARROW_KEYS; int _arg6 = (int ) 0; int _arg7 = (int ) 100; diff --git a/wxPython/src/gtk/controls2.cpp b/wxPython/src/gtk/controls2.cpp index 2069a0ffdf..d5ef3c330c 100644 --- a/wxPython/src/gtk/controls2.cpp +++ b/wxPython/src/gtk/controls2.cpp @@ -110,8 +110,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { static char* wxStringErrorMsg = "string type is required for parameter"; -extern wxValidator wxPyDefaultValidator; - int wxCALLBACK wxPyListCtrl_SortItems(long item1, long item2, long funcPtr) { int retval = 0; PyObject* func = (PyObject*)funcPtr; @@ -2846,10 +2844,10 @@ static PyObject *_wrap_new_wxListCtrl(PyObject *self, PyObject *args, PyObject * wxListCtrl * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxLC_ICON; - wxValidator * _arg5 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg5 = (wxValidator *) &wxDefaultValidator; char * _arg6 = (char *) "listCtrl"; PyObject * _argo0 = 0; wxPoint temp; @@ -5041,10 +5039,10 @@ static PyObject *_wrap_new_wxTreeCtrl(PyObject *self, PyObject *args, PyObject * wxPyTreeCtrl * _result; wxWindow * _arg0; wxWindowID _arg1 = (wxWindowID ) -1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxTR_HAS_BUTTONS|wxTR_LINES_AT_ROOT; - wxValidator * _arg5 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg5 = (wxValidator *) &wxDefaultValidator; char * _arg6 = (char *) "wxTreeCtrl"; PyObject * _argo0 = 0; wxPoint temp; diff --git a/wxPython/src/gtk/frames.cpp b/wxPython/src/gtk/frames.cpp index 61a61af914..f77acb66b0 100644 --- a/wxPython/src/gtk/frames.cpp +++ b/wxPython/src/gtk/frames.cpp @@ -131,8 +131,8 @@ static PyObject *_wrap_new_wxFrame(PyObject *self, PyObject *args, PyObject *kwa wxWindow * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxDEFAULT_FRAME_STYLE; char * _arg6 = (char *) "frame"; PyObject * _argo0 = 0; @@ -1093,8 +1093,8 @@ static PyObject *_wrap_new_wxMiniFrame(PyObject *self, PyObject *args, PyObject wxWindow * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxDEFAULT_FRAME_STYLE; char * _arg6 = (char *) "frame"; PyObject * _argo0 = 0; diff --git a/wxPython/src/gtk/gdi.cpp b/wxPython/src/gtk/gdi.cpp index d3a05f8053..d5215f9bb9 100644 --- a/wxPython/src/gtk/gdi.cpp +++ b/wxPython/src/gtk/gdi.cpp @@ -109,6 +109,8 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } static char* wxStringErrorMsg = "string type is required for parameter"; + + static wxString wxPyEmptyStr(""); // Alternate 'constructor' wxBitmap* wxEmptyBitmap(int width, int height, int depth=-1) { return new wxBitmap(width, height, depth); diff --git a/wxPython/src/gtk/grid.cpp b/wxPython/src/gtk/grid.cpp index 47e84237f5..b41792681f 100644 --- a/wxPython/src/gtk/grid.cpp +++ b/wxPython/src/gtk/grid.cpp @@ -55,7 +55,7 @@ extern PyObject *SWIG_newvarlink(void); #define SWIG_name "gridc" -#include "helpers.h" +#include "export.h" #include static PyObject* l_output_helper(PyObject* target, PyObject* o) { @@ -110,10 +110,10 @@ static char* wxStringErrorMsg = "string type is required for parameter"; wxGridCellAttr* CBNAME(int a, int b) { \ wxGridCellAttr* rval = NULL; \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) { \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ PyObject* ro; \ wxGridCellAttr* ptr; \ - ro = m_myInst.callCallbackObj(Py_BuildValue("(ii)", a, b)); \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)", a, b)); \ if (ro) { \ if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxGridCellAttr_p")) \ rval = ptr; \ @@ -134,9 +134,9 @@ static char* wxStringErrorMsg = "string type is required for parameter"; #define PYCALLBACK__GCAINTINT(PCLASS, CBNAME) \ void CBNAME(wxGridCellAttr *attr, int a, int b) { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) { \ - PyObject* obj = wxPyConstructObject((void*)attr, "wxGridCellAttr");\ - m_myInst.callCallback(Py_BuildValue("(Oii)", obj, a, b)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* obj = wxPyConstructObject((void*)attr, "wxGridCellAttr", 0);\ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oii)", obj, a, b)); \ Py_DECREF(obj); \ } \ else \ @@ -152,9 +152,9 @@ static char* wxStringErrorMsg = "string type is required for parameter"; #define PYCALLBACK__GCAINT(PCLASS, CBNAME) \ void CBNAME(wxGridCellAttr *attr, int val) { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) { \ - PyObject* obj = wxPyConstructObject((void*)attr, "wxGridCellAttr");\ - m_myInst.callCallback(Py_BuildValue("(Oi)", obj, val)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* obj = wxPyConstructObject((void*)attr, "wxGridCellAttr", 0);\ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oi)", obj, val)); \ Py_DECREF(obj); \ } \ else \ @@ -171,8 +171,8 @@ static char* wxStringErrorMsg = "string type is required for parameter"; int CBNAME() { \ bool doSave = wxPyRestoreThread(); \ int rval = 0; \ - if (m_myInst.findCallback(#CBNAME)) \ - rval = m_myInst.callCallback(Py_BuildValue("()")); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("()")); \ wxPySaveThread(doSave); \ return rval; \ } @@ -183,8 +183,8 @@ static char* wxStringErrorMsg = "string type is required for parameter"; bool CBNAME(int a, int b) { \ bool doSave = wxPyRestoreThread(); \ bool rval = 0; \ - if (m_myInst.findCallback(#CBNAME)) \ - rval = m_myInst.callCallback(Py_BuildValue("(ii)",a,b)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)",a,b)); \ wxPySaveThread(doSave); \ return rval; \ } @@ -195,9 +195,9 @@ static char* wxStringErrorMsg = "string type is required for parameter"; wxString CBNAME(int a, int b) { \ bool doSave = wxPyRestoreThread(); \ wxString rval; \ - if (m_myInst.findCallback(#CBNAME)) { \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ PyObject* ro; \ - ro = m_myInst.callCallbackObj(Py_BuildValue("(ii)",a,b)); \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",a,b)); \ if (ro) { \ PyObject* str = PyObject_Str(ro); \ rval = PyString_AsString(str); \ @@ -213,8 +213,8 @@ static char* wxStringErrorMsg = "string type is required for parameter"; #define PYCALLBACK__INTINTSTRING_pure(CBNAME) \ void CBNAME(int a, int b, const wxString& c) { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback(Py_BuildValue("(iis)",a,b,c.c_str())); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iis)",a,b,c.c_str())); \ wxPySaveThread(doSave); \ } @@ -223,9 +223,9 @@ static char* wxStringErrorMsg = "string type is required for parameter"; wxString CBNAME(int a, int b) { \ bool doSave = wxPyRestoreThread(); \ wxString rval; \ - if (m_myInst.findCallback(#CBNAME)) { \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ PyObject* ro; \ - ro = m_myInst.callCallbackObj(Py_BuildValue("(ii)",a,b)); \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",a,b)); \ if (ro) { \ PyObject* str = PyObject_Str(ro); \ rval = PyString_AsString(str); \ @@ -246,8 +246,8 @@ static char* wxStringErrorMsg = "string type is required for parameter"; bool CBNAME(int a, int b, const wxString& c) { \ bool rval; \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - rval = m_myInst.callCallback(Py_BuildValue("(iis)", a,b,c.c_str())); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iis)", a,b,c.c_str())); \ else \ rval = PCLASS::CBNAME(a,b,c); \ wxPySaveThread(doSave); \ @@ -264,8 +264,8 @@ static char* wxStringErrorMsg = "string type is required for parameter"; long CBNAME(int a, int b) { \ long rval; \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - rval = m_myInst.callCallback(Py_BuildValue("(ii)", a,b)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \ else \ rval = PCLASS::CBNAME(a,b); \ wxPySaveThread(doSave); \ @@ -281,8 +281,8 @@ static char* wxStringErrorMsg = "string type is required for parameter"; bool CBNAME(int a, int b) { \ bool rval; \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - rval = m_myInst.callCallback(Py_BuildValue("(ii)", a,b)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \ else \ rval = PCLASS::CBNAME(a,b); \ wxPySaveThread(doSave); \ @@ -298,9 +298,9 @@ static char* wxStringErrorMsg = "string type is required for parameter"; double CBNAME(int a, int b) { \ bool doSave = wxPyRestoreThread(); \ double rval; \ - if (m_myInst.findCallback(#CBNAME)) { \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ PyObject* ro; \ - ro = m_myInst.callCallbackObj(Py_BuildValue("(ii)",a,b)); \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",a,b)); \ if (ro) { \ PyObject* str = PyObject_Str(ro); \ rval = PyFloat_AsDouble(str); \ @@ -320,8 +320,8 @@ static char* wxStringErrorMsg = "string type is required for parameter"; #define PYCALLBACK__(PCLASS, CBNAME) \ void CBNAME() { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback(Py_BuildValue("()")); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("()")); \ else \ PCLASS::CBNAME(); \ wxPySaveThread(doSave); \ @@ -337,8 +337,8 @@ static char* wxStringErrorMsg = "string type is required for parameter"; bool CBNAME(size_t a, size_t b) { \ bool rval; \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - rval = m_myInst.callCallback(Py_BuildValue("(ii)", a,b)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \ else \ rval = PCLASS::CBNAME(a,b); \ wxPySaveThread(doSave); \ @@ -354,8 +354,8 @@ static char* wxStringErrorMsg = "string type is required for parameter"; bool CBNAME(size_t a) { \ bool rval; \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - rval = m_myInst.callCallback(Py_BuildValue("(i)", a)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(i)", a)); \ else \ rval = PCLASS::CBNAME(a); \ wxPySaveThread(doSave); \ @@ -371,9 +371,9 @@ static char* wxStringErrorMsg = "string type is required for parameter"; wxString CBNAME(int a) { \ bool doSave = wxPyRestoreThread(); \ wxString rval; \ - if (m_myInst.findCallback(#CBNAME)) { \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ PyObject* ro; \ - ro = m_myInst.callCallbackObj(Py_BuildValue("(i)",a)); \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(i)",a)); \ if (ro) { \ PyObject* str = PyObject_Str(ro); \ rval = PyString_AsString(str); \ @@ -393,8 +393,8 @@ static char* wxStringErrorMsg = "string type is required for parameter"; #define PYCALLBACK__INTSTRING(PCLASS, CBNAME) \ void CBNAME(int a, const wxString& c) { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback(Py_BuildValue("(is)", a,c.c_str())); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(is)", a,c.c_str())); \ else \ PCLASS::CBNAME(a,c); \ wxPySaveThread(doSave); \ @@ -410,8 +410,8 @@ static char* wxStringErrorMsg = "string type is required for parameter"; bool CBNAME() { \ bool rval; \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - rval = m_myInst.callCallback(Py_BuildValue("()")); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("()")); \ else \ rval = PCLASS::CBNAME(); \ wxPySaveThread(doSave); \ @@ -426,8 +426,8 @@ static char* wxStringErrorMsg = "string type is required for parameter"; #define PYCALLBACK__SIZETINT(PCLASS, CBNAME) \ void CBNAME(size_t a, int b) { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback(Py_BuildValue("(ii)", a,b)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \ else \ PCLASS::CBNAME(a,b); \ wxPySaveThread(doSave); \ @@ -442,8 +442,8 @@ static char* wxStringErrorMsg = "string type is required for parameter"; #define PYCALLBACK__INTINTLONG(PCLASS, CBNAME) \ void CBNAME(int a, int b, long c) { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback(Py_BuildValue("(iii)", a,b,c)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iii)", a,b,c)); \ else \ PCLASS::CBNAME(a,b,c); \ wxPySaveThread(doSave); \ @@ -458,8 +458,8 @@ static char* wxStringErrorMsg = "string type is required for parameter"; #define PYCALLBACK__INTINTDOUBLE(PCLASS, CBNAME) \ void CBNAME(int a, int b, double c) { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback(Py_BuildValue("(iif)", a,b,c)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iif)", a,b,c)); \ else \ PCLASS::CBNAME(a,b,c); \ wxPySaveThread(doSave); \ @@ -473,8 +473,8 @@ static char* wxStringErrorMsg = "string type is required for parameter"; #define PYCALLBACK__INTINTBOOL(PCLASS, CBNAME) \ void CBNAME(int a, int b, bool c) { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback(Py_BuildValue("(iii)", a,b,c)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iii)", a,b,c)); \ else \ PCLASS::CBNAME(a,b,c); \ wxPySaveThread(doSave); \ @@ -497,13 +497,13 @@ public: wxDC& dc, const wxRect& rect, int row, int col, bool isSelected) { bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("Draw")) { - m_myInst.callCallback( + if (wxPyCBH_findCallback(m_myInst, "Draw")) { + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOOOiii)", - wxPyConstructObject((void*)&grid, "wxGrid"), - wxPyConstructObject((void*)&attr, "wxGridCellAttr"), - wxPyConstructObject((void*)&dc, "wxDC"), - wxPyConstructObject((void*)&rect, "wxRect"), + wxPyConstructObject((void*)&grid, "wxGrid", 0), + wxPyConstructObject((void*)&attr, "wxGridCellAttr", 0), + wxPyConstructObject((void*)&dc, "wxDC", 0), + wxPyConstructObject((void*)&rect, "wxRect", 0), row, col, isSelected)); } wxPySaveThread(doSave); @@ -513,14 +513,14 @@ public: int row, int col) { wxSize rval; bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("GetBestSize")) { + if (wxPyCBH_findCallback(m_myInst, "GetBestSize")) { PyObject* ro; wxSize* ptr; - ro = m_myInst.callCallbackObj( + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(OOOii)", - wxPyConstructObject((void*)&grid, "wxGrid"), - wxPyConstructObject((void*)&attr, "wxGridCellAttr"), - wxPyConstructObject((void*)&dc, "wxDC"), + wxPyConstructObject((void*)&grid, "wxGrid", 0), + wxPyConstructObject((void*)&attr, "wxGridCellAttr", 0), + wxPyConstructObject((void*)&dc, "wxDC", 0), row, col)); if (ro) { if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxSize_p")) @@ -536,10 +536,10 @@ public: wxGridCellRenderer *Clone() const { wxGridCellRenderer* rval = NULL; bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("Clone")) { + if (wxPyCBH_findCallback(m_myInst, "Clone")) { PyObject* ro; wxGridCellRenderer* ptr; - ro = m_myInst.callCallbackObj(Py_BuildValue("()")); + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("()")); if (ro) { if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxGridCellRenderer_p")) rval = ptr; @@ -565,12 +565,12 @@ public: void Create(wxWindow* parent, wxWindowID id, wxEvtHandler* evtHandler) { bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("Create")) { - m_myInst.callCallback( + if (wxPyCBH_findCallback(m_myInst, "Create")) { + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OiO)", - wxPyConstructObject((void*)parent, "wxWindow"), + wxPyConstructObject((void*)parent, "wxWindow", 0), id, - wxPyConstructObject((void*)evtHandler, "wxEvtHandler"))); + wxPyConstructObject((void*)evtHandler, "wxEvtHandler", 0))); } wxPySaveThread(doSave); } @@ -578,10 +578,10 @@ public: void BeginEdit(int row, int col, wxGrid* grid) { bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("BeginEdit")) { - m_myInst.callCallback( + if (wxPyCBH_findCallback(m_myInst, "BeginEdit")) { + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)", row, col, - wxPyConstructObject((void*)grid, "wxGrid"))); + wxPyConstructObject((void*)grid, "wxGrid", 0))); } wxPySaveThread(doSave); } @@ -590,10 +590,10 @@ public: bool EndEdit(int row, int col, wxGrid* grid) { bool rv = FALSE; bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("EndEdit")) { - rv = m_myInst.callCallback( + if (wxPyCBH_findCallback(m_myInst, "EndEdit")) { + rv = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)", row, col, - wxPyConstructObject((void*)grid, "wxGrid"))); + wxPyConstructObject((void*)grid, "wxGrid", 0))); } wxPySaveThread(doSave); return rv; @@ -603,10 +603,10 @@ public: wxGridCellEditor*Clone() const { wxGridCellEditor* rval = NULL; bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("Clone")) { + if (wxPyCBH_findCallback(m_myInst, "Clone")) { PyObject* ro; wxGridCellEditor* ptr; - ro = m_myInst.callCallbackObj(Py_BuildValue("()")); + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("()")); if (ro) { if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxGridCellEditor_p")) rval = ptr; @@ -620,10 +620,10 @@ public: void Show(bool show, wxGridCellAttr *attr) { bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("Show")) - m_myInst.callCallback( + if (wxPyCBH_findCallback(m_myInst, "Show")) + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iO)", show, - wxPyConstructObject((void*)attr, "wxGridCellAttr"))); + wxPyConstructObject((void*)attr, "wxGridCellAttr", 0))); else wxGridCellEditor::Show(show, attr); wxPySaveThread(doSave); @@ -635,11 +635,11 @@ public: void PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr) { bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("PaintBackground")) - m_myInst.callCallback( + if (wxPyCBH_findCallback(m_myInst, "PaintBackground")) + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OO)", - wxPyConstructObject((void*)&rectCell, "wxRect"), - wxPyConstructObject((void*)attr, "wxGridCellAttr"))); + wxPyConstructObject((void*)&rectCell, "wxRect", 0), + wxPyConstructObject((void*)attr, "wxGridCellAttr", 0))); else wxGridCellEditor::PaintBackground(rectCell, attr); wxPySaveThread(doSave); @@ -717,9 +717,9 @@ public: wxString GetValue(int row, int col) { bool doSave = wxPyRestoreThread(); wxString rval; - if (m_myInst.findCallback("GetValue")) { + if (wxPyCBH_findCallback(m_myInst, "GetValue")) { PyObject* ro; - ro = m_myInst.callCallbackObj(Py_BuildValue("(ii)",row,col)); + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",row,col)); if (ro) { PyObject* str = PyObject_Str(ro); rval = PyString_AsString(str); @@ -733,8 +733,8 @@ public: void SetValue(int row, int col, const wxString& val) { bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("SetValue")) - m_myInst.callCallback(Py_BuildValue("(iis)",row,col,val.c_str())); + if (wxPyCBH_findCallback(m_myInst, "SetValue")) + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iis)",row,col,val.c_str())); wxPySaveThread(doSave); } @@ -744,10 +744,10 @@ public: long GetValueAsLong( int row, int col ) { long rval = 0; bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("GetValue")) { + if (wxPyCBH_findCallback(m_myInst, "GetValue")) { PyObject* ro; PyObject* num; - ro = m_myInst.callCallbackObj(Py_BuildValue("(ii)", row, col)); + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)", row, col)); if (ro && PyNumber_Check(ro)) { num = PyNumber_Int(ro); if (num) { @@ -764,10 +764,10 @@ public: double GetValueAsDouble( int row, int col ) { double rval = 0.0; bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("GetValue")) { + if (wxPyCBH_findCallback(m_myInst, "GetValue")) { PyObject* ro; PyObject* num; - ro = m_myInst.callCallbackObj(Py_BuildValue("(ii)", row, col)); + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)", row, col)); if (ro && PyNumber_Check(ro)) { num = PyNumber_Float(ro); if (num) { @@ -787,16 +787,16 @@ public: void SetValueAsLong( int row, int col, long value ) { bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("SetValue")) { - m_myInst.callCallback(Py_BuildValue("(iii)", row, col, value)); + if (wxPyCBH_findCallback(m_myInst, "SetValue")) { + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iii)", row, col, value)); } wxPySaveThread(doSave); } void SetValueAsDouble( int row, int col, double value ) { bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("SetValue")) { - m_myInst.callCallback(Py_BuildValue("(iid)", row, col, value)); + if (wxPyCBH_findCallback(m_myInst, "SetValue")) { + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iid)", row, col, value)); } wxPySaveThread(doSave); } diff --git a/wxPython/src/gtk/html.cpp b/wxPython/src/gtk/html.cpp index a746375489..f478f56ab5 100644 --- a/wxPython/src/gtk/html.cpp +++ b/wxPython/src/gtk/html.cpp @@ -55,7 +55,7 @@ extern PyObject *SWIG_newvarlink(void); #define SWIG_name "htmlc" -#include "helpers.h" +#include "export.h" #include #include #include @@ -113,12 +113,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { static char* wxStringErrorMsg = "string type is required for parameter"; -// #ifdef __WXMSW__ -// wxString wxPyEmptyStr(""); -// wxPoint wxPyDefaultPosition(wxDefaultPosition); -// wxSize wxPyDefaultSize(wxDefaultSize); -// #endif - class wxPyHtmlTagHandler : public wxHtmlTagHandler { public: wxPyHtmlTagHandler() : wxHtmlTagHandler() {}; @@ -228,9 +222,9 @@ IMP_PYCALLBACK__STRING(wxPyHtmlWindow, wxHtmlWindow, OnSetTitle); void wxPyHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) { bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("OnLinkClicked")) { - PyObject* obj = wxPyConstructObject((void*)&link, "wxHtmlLinkInfo"); - m_myInst.callCallback(Py_BuildValue("(O)", obj)); + if (wxPyCBH_findCallback(m_myInst, "OnLinkClicked")) { + PyObject* obj = wxPyConstructObject((void*)&link, "wxHtmlLinkInfo", 0); + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", obj)); Py_DECREF(obj); } else @@ -3954,8 +3948,8 @@ static PyObject *_wrap_new_wxHtmlWindow(PyObject *self, PyObject *args, PyObject wxPyHtmlWindow * _result; wxWindow * _arg0; int _arg1 = (int ) -1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; int _arg4 = (int ) wxHW_SCROLLBAR_AUTO; char * _arg5 = (char *) "htmlWindow"; PyObject * _argo0 = 0; @@ -6274,7 +6268,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxBusyInfo","_class_wxBusyInfo",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, - { "_wxJoystick","_class_wxJoystick",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, @@ -6469,7 +6462,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxHtmlParser","_wxHtmlWinParser",SwigwxHtmlWinParserTowxHtmlParser}, { "_wxHtmlParser","_class_wxHtmlParser",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxJoystick","_wxJoystick",0}, { "_class_wxCommandEvent","_wxCommandEvent",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, diff --git a/wxPython/src/gtk/htmlhelp.cpp b/wxPython/src/gtk/htmlhelp.cpp index 6d6ae75275..5ab999ee57 100644 --- a/wxPython/src/gtk/htmlhelp.cpp +++ b/wxPython/src/gtk/htmlhelp.cpp @@ -55,7 +55,7 @@ extern PyObject *SWIG_newvarlink(void); #define SWIG_name "htmlhelpc" -#include "helpers.h" +#include "export.h" #include #include #include @@ -3186,7 +3186,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxBusyInfo","_class_wxBusyInfo",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, - { "_wxJoystick","_class_wxJoystick",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, @@ -3379,7 +3378,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxCheckListBox","_wxCheckListBox",0}, { "_wxHtmlParser","_class_wxHtmlParser",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxJoystick","_wxJoystick",0}, { "_class_wxCommandEvent","_wxCommandEvent",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, diff --git a/wxPython/src/gtk/mdi.cpp b/wxPython/src/gtk/mdi.cpp index 49cccfbf48..72fddf40da 100644 --- a/wxPython/src/gtk/mdi.cpp +++ b/wxPython/src/gtk/mdi.cpp @@ -138,8 +138,8 @@ static PyObject *_wrap_new_wxMDIParentFrame(PyObject *self, PyObject *args, PyOb wxWindow * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxDEFAULT_FRAME_STYLE|wxVSCROLL|wxHSCROLL; char * _arg6 = (char *) "frame"; PyObject * _argo0 = 0; @@ -478,8 +478,8 @@ static PyObject *_wrap_new_wxMDIChildFrame(PyObject *self, PyObject *args, PyObj wxMDIParentFrame * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxDEFAULT_FRAME_STYLE; char * _arg6 = (char *) "frame"; PyObject * _argo0 = 0; diff --git a/wxPython/src/gtk/misc.cpp b/wxPython/src/gtk/misc.cpp index 279891d6b8..01471bafb1 100644 --- a/wxPython/src/gtk/misc.cpp +++ b/wxPython/src/gtk/misc.cpp @@ -108,6 +108,8 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { static char* wxStringErrorMsg = "string type is required for parameter"; + static wxString wxPyEmptyStr(""); + PyObject* wxIntersectRect(wxRect* r1, wxRect* r2) { wxRegion reg1(*r1); wxRegion reg2(*r2); diff --git a/wxPython/src/gtk/misc2.cpp b/wxPython/src/gtk/misc2.cpp index 84a193563f..cc1e4cba55 100644 --- a/wxPython/src/gtk/misc2.cpp +++ b/wxPython/src/gtk/misc2.cpp @@ -112,6 +112,8 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { static char* wxStringErrorMsg = "string type is required for parameter"; + static wxString wxPyEmptyStr(""); + wxColour wxSystemSettings_GetSystemColour(int index) { return wxSystemSettings::GetSystemColour(index); @@ -656,7 +658,7 @@ static PyObject *_wrap_wxGetNumberFromUser(PyObject *self, PyObject *args, PyObj long _arg4 = (long ) 0; long _arg5 = (long ) 100; wxWindow * _arg6 = (wxWindow *) NULL; - wxPoint * _arg7 = (wxPoint *) &wxPyDefaultPosition; + wxPoint * _arg7 = (wxPoint *) &wxDefaultPosition; PyObject * _obj0 = 0; PyObject * _obj1 = 0; PyObject * _obj2 = 0; @@ -790,6 +792,135 @@ static PyObject *_wrap_wxDisplayDepth(PyObject *self, PyObject *args, PyObject * return _resultobj; } +static PyObject *_wrap_wxGetDisplayDepth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetDisplayDepth",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGetDisplayDepth(); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxDisplaySize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int * _arg0; + int temp; + int * _arg1; + int temp0; + char *_kwnames[] = { NULL }; + + self = self; +{ + _arg0 = &temp; +} +{ + _arg1 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxDisplaySize",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDisplaySize(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg0)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; +} + +static PyObject *_wrap_wxGetDisplaySize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSize * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetDisplaySize",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxSize (wxGetDisplaySize()); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxDisplaySizeMM(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int * _arg0; + int temp; + int * _arg1; + int temp0; + char *_kwnames[] = { NULL }; + + self = self; +{ + _arg0 = &temp; +} +{ + _arg1 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxDisplaySizeMM",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDisplaySizeMM(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg0)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; +} + +static PyObject *_wrap_wxGetDisplaySizeMM(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSize * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetDisplaySizeMM",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxSize (wxGetDisplaySizeMM()); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + static PyObject *_wrap_wxSetCursor(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxCursor * _arg0; @@ -5231,6 +5362,11 @@ static PyMethodDef misc2cMethods[] = { { "wxFindWindowByName", (PyCFunction) _wrap_wxFindWindowByName, METH_VARARGS | METH_KEYWORDS }, { "wxFindWindowByLabel", (PyCFunction) _wrap_wxFindWindowByLabel, METH_VARARGS | METH_KEYWORDS }, { "wxSetCursor", (PyCFunction) _wrap_wxSetCursor, METH_VARARGS | METH_KEYWORDS }, + { "wxGetDisplaySizeMM", (PyCFunction) _wrap_wxGetDisplaySizeMM, METH_VARARGS | METH_KEYWORDS }, + { "wxDisplaySizeMM", (PyCFunction) _wrap_wxDisplaySizeMM, METH_VARARGS | METH_KEYWORDS }, + { "wxGetDisplaySize", (PyCFunction) _wrap_wxGetDisplaySize, METH_VARARGS | METH_KEYWORDS }, + { "wxDisplaySize", (PyCFunction) _wrap_wxDisplaySize, METH_VARARGS | METH_KEYWORDS }, + { "wxGetDisplayDepth", (PyCFunction) _wrap_wxGetDisplayDepth, METH_VARARGS | METH_KEYWORDS }, { "wxDisplayDepth", (PyCFunction) _wrap_wxDisplayDepth, METH_VARARGS | METH_KEYWORDS }, { "wxColourDisplay", (PyCFunction) _wrap_wxColourDisplay, METH_VARARGS | METH_KEYWORDS }, { "wxGetNumberFromUser", (PyCFunction) _wrap_wxGetNumberFromUser, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/misc2.py b/wxPython/src/gtk/misc2.py index ab39918201..9c69cbc476 100644 --- a/wxPython/src/gtk/misc2.py +++ b/wxPython/src/gtk/misc2.py @@ -491,6 +491,22 @@ wxColourDisplay = misc2c.wxColourDisplay wxDisplayDepth = misc2c.wxDisplayDepth +wxGetDisplayDepth = misc2c.wxGetDisplayDepth + +wxDisplaySize = misc2c.wxDisplaySize + +def wxGetDisplaySize(*_args, **_kwargs): + val = apply(misc2c.wxGetDisplaySize,_args,_kwargs) + if val: val = wxSizePtr(val); val.thisown = 1 + return val + +wxDisplaySizeMM = misc2c.wxDisplaySizeMM + +def wxGetDisplaySizeMM(*_args, **_kwargs): + val = apply(misc2c.wxGetDisplaySizeMM,_args,_kwargs) + if val: val = wxSizePtr(val); val.thisown = 1 + return val + wxSetCursor = misc2c.wxSetCursor def wxFindWindowByLabel(*_args, **_kwargs): diff --git a/wxPython/src/gtk/printfw.cpp b/wxPython/src/gtk/printfw.cpp index aec22f4fe0..fd71130d8d 100644 --- a/wxPython/src/gtk/printfw.cpp +++ b/wxPython/src/gtk/printfw.cpp @@ -4123,8 +4123,8 @@ static PyObject *_wrap_new_wxPreviewFrame(PyObject *self, PyObject *args, PyObje wxPrintPreview * _arg0; wxFrame * _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxDEFAULT_FRAME_STYLE; char * _arg6 = (char *) "frame"; PyObject * _argo0 = 0; diff --git a/wxPython/src/gtk/stattool.cpp b/wxPython/src/gtk/stattool.cpp index e5d2a1f9f7..1fb13e4e48 100644 --- a/wxPython/src/gtk/stattool.cpp +++ b/wxPython/src/gtk/stattool.cpp @@ -106,6 +106,8 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } static char* wxStringErrorMsg = "string type is required for parameter"; + + static wxString wxPyEmptyStr(""); #ifdef __cplusplus extern "C" { #endif @@ -131,8 +133,8 @@ static PyObject *_wrap_new_wxStatusBar(PyObject *self, PyObject *args, PyObject wxStatusBar * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxST_SIZEGRIP; char * _arg5 = (char *) "statusBar"; PyObject * _argo0 = 0; @@ -2961,8 +2963,8 @@ static PyObject *_wrap_new_wxToolBar(PyObject *self, PyObject *args, PyObject *k wxToolBar * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxNO_BORDER|wxTB_HORIZONTAL; char * _arg5 = (char *) wxToolBarNameStr; PyObject * _argo0 = 0; @@ -3084,8 +3086,8 @@ static PyObject *_wrap_new_wxToolBarSimple(PyObject *self, PyObject *args, PyObj wxToolBarSimple * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxNO_BORDER|wxTB_HORIZONTAL; char * _arg5 = (char *) wxToolBarNameStr; PyObject * _argo0 = 0; diff --git a/wxPython/src/gtk/utils.cpp b/wxPython/src/gtk/utils.cpp index 892b62cd0f..ba7f121884 100644 --- a/wxPython/src/gtk/utils.cpp +++ b/wxPython/src/gtk/utils.cpp @@ -55,7 +55,7 @@ extern PyObject *SWIG_newvarlink(void); #define SWIG_name "utilsc" -#include "helpers.h" +#include "export.h" #include #include #include @@ -108,6 +108,8 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { static char* wxStringErrorMsg = "string type is required for parameter"; + static wxString wxPyEmptyStr(""); + static PyObject* __EnumerationHelper(bool flag, wxString& str, long index) { PyObject* ret = PyTuple_New(3); if (ret) { diff --git a/wxPython/src/gtk/windows.cpp b/wxPython/src/gtk/windows.cpp index c148aefc3d..7db9efeec9 100644 --- a/wxPython/src/gtk/windows.cpp +++ b/wxPython/src/gtk/windows.cpp @@ -106,6 +106,8 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { static char* wxStringErrorMsg = "string type is required for parameter"; + static wxString wxPyEmptyStr(""); + bool wxValidator_IsSilent() { return wxValidator::IsSilent(); } @@ -916,8 +918,8 @@ static PyObject *_wrap_new_wxWindow(PyObject *self, PyObject *args, PyObject *kw wxWindow * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) 0; char * _arg5 = (char *) "panel"; PyObject * _argo0 = 0; @@ -5120,8 +5122,8 @@ static PyObject *_wrap_new_wxPanel(PyObject *self, PyObject *args, PyObject *kwa wxPanel * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxTAB_TRAVERSAL; char * _arg5 = (char *) "panel"; PyObject * _argo0 = 0; @@ -5297,8 +5299,8 @@ static PyObject *_wrap_new_wxDialog(PyObject *self, PyObject *args, PyObject *kw wxWindow * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxDEFAULT_DIALOG_STYLE; char * _arg6 = (char *) "dialogBox"; PyObject * _argo0 = 0; @@ -5764,8 +5766,8 @@ static PyObject *_wrap_new_wxScrolledWindow(PyObject *self, PyObject *args, PyOb wxScrolledWindow * _result; wxWindow * _arg0; wxWindowID _arg1 = (wxWindowID ) -1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxHSCROLL|wxVSCROLL; char * _arg5 = (char *) "scrolledWindow"; PyObject * _argo0 = 0; diff --git a/wxPython/src/gtk/windows2.cpp b/wxPython/src/gtk/windows2.cpp index a46a12c26c..6dca759e5e 100644 --- a/wxPython/src/gtk/windows2.cpp +++ b/wxPython/src/gtk/windows2.cpp @@ -279,8 +279,8 @@ static PyObject *_wrap_new_wxNotebook(PyObject *self, PyObject *args, PyObject * wxNotebook * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) 0; char * _arg5 = (char *) "notebook"; PyObject * _argo0 = 0; @@ -1205,8 +1205,8 @@ static PyObject *_wrap_new_wxSplitterWindow(PyObject *self, PyObject *args, PyOb wxSplitterWindow * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxSP_3D|wxCLIP_CHILDREN; char * _arg5 = (char *) "splitterWindow"; PyObject * _argo0 = 0; diff --git a/wxPython/src/gtk/windows3.cpp b/wxPython/src/gtk/windows3.cpp index 2a7cc85877..8abbf324a4 100644 --- a/wxPython/src/gtk/windows3.cpp +++ b/wxPython/src/gtk/windows3.cpp @@ -321,8 +321,8 @@ static PyObject *_wrap_new_wxSashWindow(PyObject *self, PyObject *args, PyObject wxSashWindow * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxCLIP_CHILDREN|(wxSW_3D); char * _arg5 = (char *) "sashWindow"; PyObject * _argo0 = 0; @@ -1295,8 +1295,8 @@ static PyObject *_wrap_new_wxSashLayoutWindow(PyObject *self, PyObject *args, Py wxSashLayoutWindow * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxCLIP_CHILDREN|(wxSW_3D); char * _arg5 = (char *) "layoutWindow"; PyObject * _argo0 = 0; diff --git a/wxPython/src/gtk/wx.cpp b/wxPython/src/gtk/wx.cpp index 393f3579fc..0dbef41a62 100644 --- a/wxPython/src/gtk/wx.cpp +++ b/wxPython/src/gtk/wx.cpp @@ -623,6 +623,8 @@ PyObject *ptrfree(PyObject *_PTRVALUE) { __wxCleanup(); } + + extern "C" SWIGEXPORT(void) initwindowsc(); extern "C" SWIGEXPORT(void) initwindows2c(); extern "C" SWIGEXPORT(void) initeventsc(); @@ -640,17 +642,49 @@ extern "C" SWIGEXPORT(void) initimagec(); extern "C" SWIGEXPORT(void) initprintfwc(); extern "C" SWIGEXPORT(void) initsizersc(); extern "C" SWIGEXPORT(void) initclip_dndc(); -extern "C" SWIGEXPORT(void) initgridc(); -extern "C" SWIGEXPORT(void) initutilsc(); -extern "C" SWIGEXPORT(void) inithtmlc(); -extern "C" SWIGEXPORT(void) inithtmlhelpc(); -extern "C" SWIGEXPORT(void) initcalendarc(); extern "C" SWIGEXPORT(void) initstreamsc(); extern "C" SWIGEXPORT(void) initfilesysc(); -extern "C" SWIGEXPORT(void) initglcanvasc(); -extern "C" SWIGEXPORT(void) initoglc(); -extern "C" SWIGEXPORT(void) initstc_c(); + + +// Export a C API in a struct. Other modules will be able to load this from +// the wxc module and will then have safe access to these functions, even if +// in another shared library. +static wxPyCoreAPI API = { + SWIG_MakePtr, + SWIG_GetPtr, + SWIG_GetPtrObj, + SWIG_RegisterMapping, + SWIG_addvarlink, + SWIG_newvarlink, + + wxPySaveThread, + wxPyRestoreThread, + wxPyConstructObject, + wxPy_ConvertList, + + byte_LIST_helper, + int_LIST_helper, + long_LIST_helper, + string_LIST_helper, + wxPoint_LIST_helper, + wxBitmap_LIST_helper, + wxString_LIST_helper, + wxAcceleratorEntry_LIST_helper, + + wxSize_helper, + wxPoint_helper, + wxRealPoint_helper, + wxRect_helper, + wxColour_helper, + + wxPyCBH_setSelf, + wxPyCBH_findCallback, + wxPyCBH_callCallback, + wxPyCBH_callCallbackObj, + wxPyCBH_delete, +}; + #ifdef __cplusplus extern "C" { #endif @@ -831,48 +865,48 @@ static PyObject *_wrap_ptrmap(PyObject *self, PyObject *args, PyObject *kwargs) return _resultobj; } -static int _wrap_wxPyDefaultPosition_set(PyObject *val) { +static int _wrap_wxDefaultPosition_set(PyObject *val) { wxPoint * temp; if (val) { if (val == Py_None) { temp = NULL; } else if (SWIG_GetPtrObj(val,(void **) &temp,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in value of wxPyDefaultPosition. Expected _wxPoint_p."); + PyErr_SetString(PyExc_TypeError,"Type error in value of wxDefaultPosition. Expected _wxPoint_p."); return 1; } } - wxPyDefaultPosition = *temp; + wxDefaultPosition = *temp; return 0; } -static PyObject *_wrap_wxPyDefaultPosition_get() { +static PyObject *_wrap_wxDefaultPosition_get() { PyObject * pyobj; char ptemp[128]; - SWIG_MakePtr(ptemp,(char *) &wxPyDefaultPosition,"_wxPoint_p"); + SWIG_MakePtr(ptemp,(char *) &wxDefaultPosition,"_wxPoint_p"); pyobj = PyString_FromString(ptemp); return pyobj; } -static int _wrap_wxPyDefaultSize_set(PyObject *val) { +static int _wrap_wxDefaultSize_set(PyObject *val) { wxSize * temp; if (val) { if (val == Py_None) { temp = NULL; } else if (SWIG_GetPtrObj(val,(void **) &temp,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in value of wxPyDefaultSize. Expected _wxSize_p."); + PyErr_SetString(PyExc_TypeError,"Type error in value of wxDefaultSize. Expected _wxSize_p."); return 1; } } - wxPyDefaultSize = *temp; + wxDefaultSize = *temp; return 0; } -static PyObject *_wrap_wxPyDefaultSize_get() { +static PyObject *_wrap_wxDefaultSize_get() { PyObject * pyobj; char ptemp[128]; - SWIG_MakePtr(ptemp,(char *) &wxPyDefaultSize,"_wxSize_p"); + SWIG_MakePtr(ptemp,(char *) &wxDefaultSize,"_wxSize_p"); pyobj = PyString_FromString(ptemp); return pyobj; } @@ -1997,7 +2031,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxBusyInfo","_class_wxBusyInfo",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, - { "_wxJoystick","_class_wxJoystick",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, @@ -2174,7 +2207,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGauge","_class_wxGauge",0}, { "_class_wxCheckListBox","_wxCheckListBox",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxJoystick","_wxJoystick",0}, { "_class_wxCommandEvent","_wxCommandEvent",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, @@ -2915,8 +2947,14 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxEVT_END_PROCESS", PyInt_FromLong((long) wxEVT_END_PROCESS)); PyDict_SetItemString(d,"__version__", PyString_FromString("0.0.0")); 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); + SWIG_addvarlink(SWIG_globals,"wxDefaultPosition",_wrap_wxDefaultPosition_get, _wrap_wxDefaultPosition_set); + SWIG_addvarlink(SWIG_globals,"wxDefaultSize",_wrap_wxDefaultSize_get, _wrap_wxDefaultSize_set); + + // Make our API structure a CObject so other modules can import it + // from this module. + PyObject* v = PyCObject_FromVoidPtr(&API, NULL); + PyDict_SetItemString(d,"wxPyCoreAPI", v); + Py_XDECREF(v); __wxPreStart(); // initialize the GUI toolkit, if needed. @@ -2945,15 +2983,6 @@ SWIGEXPORT(void) initwxc() { initstreamsc(); initfilesysc(); - initgridc(); - initutilsc(); - inithtmlc(); - inithtmlhelpc(); - initcalendarc(); - - initglcanvasc(); - initoglc(); - initstc_c(); { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/wxPython/src/gtk/wx.py b/wxPython/src/gtk/wx.py index 8870c05092..abfdcf2279 100644 --- a/wxPython/src/gtk/wx.py +++ b/wxPython/src/gtk/wx.py @@ -839,8 +839,8 @@ wxEVT_TIMER = wxc.wxEVT_TIMER wxEVT_END_PROCESS = wxc.wxEVT_END_PROCESS __version__ = wxc.__version__ cvar = wxc.cvar -wxPyDefaultPosition = wxPointPtr(wxc.cvar.wxPyDefaultPosition) -wxPyDefaultSize = wxSizePtr(wxc.cvar.wxPyDefaultSize) +wxDefaultPosition = wxPointPtr(wxc.cvar.wxDefaultPosition) +wxDefaultSize = wxSizePtr(wxc.cvar.wxDefaultSize) #-------------- USER INCLUDE ----------------------- @@ -1572,15 +1572,15 @@ NULL = _NullObj() wxColor = wxColour wxNamedColor = wxNamedColour -wxPyDefaultPosition.Set(-1,-1) -wxPyDefaultSize.Set(-1,-1) - # aliases so that C++ documentation applies: -wxDefaultPosition = wxPyDefaultPosition -wxDefaultSize = wxPyDefaultSize +#wxDefaultPosition = wxPyDefaultPosition +#wxDefaultSize = wxPyDefaultSize + # backwards compatibility -wxNoRefBitmap = wxBitmap +wxNoRefBitmap = wxBitmap +wxPyDefaultPosition = wxDefaultPosition +wxPyDefaultSize = wxDefaultSize #---------------------------------------------------------------------- # This helper function will take a wxPython object and convert it to diff --git a/wxPython/src/helpers.cpp b/wxPython/src/helpers.cpp index 33838befc9..1859090e5f 100644 --- a/wxPython/src/helpers.cpp +++ b/wxPython/src/helpers.cpp @@ -38,15 +38,6 @@ #endif -//--------------------------------------------------------------------------- - -//wxHashTable* wxPyWindows = NULL; - - -wxPoint wxPyDefaultPosition; //wxDefaultPosition); -wxSize wxPyDefaultSize; //wxDefaultSize); -wxString wxPyEmptyStr(""); - #ifdef __WXMSW__ // If building for win32... diff --git a/wxPython/src/helpers.h b/wxPython/src/helpers.h index b542b5f2b4..681bdc6bcb 100644 --- a/wxPython/src/helpers.h +++ b/wxPython/src/helpers.h @@ -140,9 +140,9 @@ extern "C" char *SWIG_GetPtrObj(PyObject *obj, void **ptr, char *type); // Non-const versions to keep SWIG happy. -extern wxPoint wxPyDefaultPosition; -extern wxSize wxPyDefaultSize; -extern wxString wxPyEmptyStr; +// extern wxPoint wxPyDefaultPosition; +// extern wxSize wxPyDefaultSize; +// extern wxString wxPyEmptyStr; //---------------------------------------------------------------------- diff --git a/wxPython/src/mdi.i b/wxPython/src/mdi.i index 7d68b700d0..7a69321a9d 100644 --- a/wxPython/src/mdi.i +++ b/wxPython/src/mdi.i @@ -37,8 +37,8 @@ public: wxMDIParentFrame(wxWindow *parent, const wxWindowID id, const wxString& title, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, const char* name = "frame"); @@ -71,8 +71,8 @@ public: wxMDIChildFrame(wxMDIParentFrame* parent, const wxWindowID id, const wxString& title, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const char* name = "frame"); diff --git a/wxPython/src/misc.i b/wxPython/src/misc.i index fd0aada052..70e22c48ac 100644 --- a/wxPython/src/misc.i +++ b/wxPython/src/misc.i @@ -28,6 +28,10 @@ %import _defs.i +%{ + static wxString wxPyEmptyStr(""); +%} + //--------------------------------------------------------------------------- diff --git a/wxPython/src/misc2.i b/wxPython/src/misc2.i index 68ed499ae7..e594ee49c6 100644 --- a/wxPython/src/misc2.i +++ b/wxPython/src/misc2.i @@ -38,6 +38,10 @@ %import events.i %import streams.i +%{ + static wxString wxPyEmptyStr(""); +%} + //--------------------------------------------------------------------------- // Dialog Functions @@ -93,7 +97,7 @@ long wxGetNumberFromUser(const wxString& message, long value, long min = 0, long max = 100, wxWindow *parent = NULL, - const wxPoint& pos = wxPyDefaultPosition); + const wxPoint& pos = wxDefaultPosition); //--------------------------------------------------------------------------- // GDI Functions diff --git a/wxPython/src/printfw.i b/wxPython/src/printfw.i index d849726c21..77403a96b7 100644 --- a/wxPython/src/printfw.i +++ b/wxPython/src/printfw.i @@ -334,8 +334,8 @@ public: class wxPreviewFrame : public wxFrame { public: wxPreviewFrame(wxPrintPreview* preview, wxFrame* parent, const wxString& title, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, char* name = "frame"); diff --git a/wxPython/src/stattool.i b/wxPython/src/stattool.i index 5d26a3d19e..f2e16f4f69 100644 --- a/wxPython/src/stattool.i +++ b/wxPython/src/stattool.i @@ -32,13 +32,18 @@ %pragma(python) code = "import wx" + +%{ + static wxString wxPyEmptyStr(""); +%} + //--------------------------------------------------------------------------- class wxStatusBar : public wxWindow { public: wxStatusBar(wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxST_SIZEGRIP, char* name = "statusBar"); @@ -273,8 +278,8 @@ class wxToolBar : public wxToolBarBase { public: wxToolBar(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxNO_BORDER | wxTB_HORIZONTAL, const char* name = wxToolBarNameStr); @@ -290,8 +295,8 @@ class wxToolBarSimple : public wxToolBarBase { public: wxToolBarSimple(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxNO_BORDER | wxTB_HORIZONTAL, const char* name = wxToolBarNameStr); @@ -342,8 +347,8 @@ public: class wxToolBar : public wxControl { public: wxToolBar(wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxTB_HORIZONTAL | wxNO_BORDER, char* name = "toolBar"); diff --git a/wxPython/src/windows.i b/wxPython/src/windows.i index 40a07a1517..1b2abd0737 100644 --- a/wxPython/src/windows.i +++ b/wxPython/src/windows.i @@ -31,6 +31,11 @@ %pragma(python) code = "import wx" + +%{ + static wxString wxPyEmptyStr(""); +%} + //--------------------------------------------------------------------------- class wxEvtHandler { @@ -197,8 +202,8 @@ class wxWindow : public wxEvtHandler { public: wxWindow(wxWindow* parent, const wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, char* name = "panel"); @@ -486,8 +491,8 @@ class wxPanel : public wxWindow { public: wxPanel(wxWindow* parent, const wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const char* name = "panel"); @@ -514,8 +519,8 @@ public: wxDialog(wxWindow* parent, const wxWindowID id, const wxString& title, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const char* name = "dialogBox"); @@ -542,8 +547,8 @@ class wxScrolledWindow : public wxPanel { public: wxScrolledWindow(wxWindow* parent, const wxWindowID id = -1, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxHSCROLL | wxVSCROLL, char* name = "scrolledWindow"); diff --git a/wxPython/src/windows2.i b/wxPython/src/windows2.i index 6428bb1666..b5c4d0ebd9 100644 --- a/wxPython/src/windows2.i +++ b/wxPython/src/windows2.i @@ -75,8 +75,8 @@ public: class wxGrid : public wxPanel { public: wxGrid(wxWindow* parent, wxWindowID id, - const wxPoint& pos=wxPyDefaultPosition, - const wxSize& size=wxPyDefaultSize, + const wxPoint& pos=wxDefaultPosition, + const wxSize& size=wxDefaultSize, long style=0, char* name="grid"); @@ -256,8 +256,8 @@ class wxNotebook : public wxControl { public: wxNotebook(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, char* name = "notebook"); @@ -330,8 +330,8 @@ public: class wxSplitterWindow : public wxWindow { public: wxSplitterWindow(wxWindow* parent, wxWindowID id, - const wxPoint& point = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& point = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style=wxSP_3D|wxCLIP_CHILDREN, char* name = "splitterWindow"); diff --git a/wxPython/src/windows3.i b/wxPython/src/windows3.i index c51028773b..32d115e9ce 100644 --- a/wxPython/src/windows3.i +++ b/wxPython/src/windows3.i @@ -71,8 +71,8 @@ public: class wxSashWindow: public wxWindow { public: wxSashWindow(wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxCLIP_CHILDREN | wxSW_3D, const char* name = "sashWindow"); @@ -150,8 +150,8 @@ public: class wxSashLayoutWindow: public wxSashWindow { public: wxSashLayoutWindow(wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxCLIP_CHILDREN | wxSW_3D, const char* name = "layoutWindow"); diff --git a/wxPython/src/wx.i b/wxPython/src/wx.i index a9078d9b44..8aa1b43abf 100644 --- a/wxPython/src/wx.i +++ b/wxPython/src/wx.i @@ -54,8 +54,8 @@ #define __version__ "0.0.0" // The real value is now in setup.py... -wxPoint wxPyDefaultPosition; -wxSize wxPyDefaultSize; +wxPoint wxDefaultPosition; +wxSize wxDefaultSize; //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- -- 2.45.2