From 25832b3f2bd566e5b68f066d97e0e79d2bbbd17f Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 22 May 2001 05:59:09 +0000 Subject: [PATCH] changed version number A few final twaeks and fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10264 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/CHANGES.txt | 4 ++ wxPython/README.txt | 2 +- wxPython/b.bat | 26 ++++++++++++ wxPython/demo/ColourDB.py | 2 +- wxPython/demo/wxCheckListBox.py | 20 +++++++++ wxPython/demo/wxJoystick.py | 74 ++++++++++++++++----------------- wxPython/setup.py | 2 +- wxPython/src/__version__.py | 2 +- wxPython/src/_defs.i | 1 + wxPython/src/cmndlgs.i | 4 +- wxPython/src/gdi.i | 8 ++-- wxPython/src/msw/cmndlgs.cpp | 24 +++-------- wxPython/src/msw/cmndlgs.py | 4 +- wxPython/src/msw/gdi.cpp | 48 ++++++--------------- wxPython/src/msw/gdi.py | 8 ++-- wxPython/src/msw/misc.cpp | 19 --------- wxPython/src/msw/misc.py | 2 - wxPython/src/msw/misc2.cpp | 18 ++++++++ wxPython/src/msw/misc2.py | 2 + wxPython/src/msw/windows.cpp | 24 +++-------- wxPython/src/msw/windows.py | 4 +- wxPython/src/windows.i | 4 +- wxPython/src/windows2.i | 12 +++--- 23 files changed, 158 insertions(+), 156 deletions(-) diff --git a/wxPython/CHANGES.txt b/wxPython/CHANGES.txt index 1c9ce2137e..6adf955ac6 100644 --- a/wxPython/CHANGES.txt +++ b/wxPython/CHANGES.txt @@ -118,6 +118,10 @@ from Mike Fletcher. If you have any custom code that can be factored out of existing classes into a mix-in that would be useful to others please send it to me for inclusion in this package. +Added a few little sample applications to help newbies to get started +by having smaller functional apps to play with. They can be found in +wxPython/samples. + diff --git a/wxPython/README.txt b/wxPython/README.txt index e9ec37d0b9..87388be57d 100644 --- a/wxPython/README.txt +++ b/wxPython/README.txt @@ -54,7 +54,7 @@ mail list. You can view the archive or subscribe by going to Or you can send mail directly to the list using this address: - wxpython-users@lists.sourceforge.net + wxpython-users@lists.wxwindows.org Other Info diff --git a/wxPython/b.bat b/wxPython/b.bat index 950b821e26..44a1d67f78 100755 --- a/wxPython/b.bat +++ b/wxPython/b.bat @@ -60,6 +60,32 @@ elseiff "%1" == "h" then shift set CMD=%SETUP% %FLAGS% HYBRID=1 build_ext --inplace %1 %2 %3 %4 %5 %6 %7 %8 %9 +rem "a" --> make all installers +elseiff "%1" == "a" then + shift + set CMD=echo Finished! + call b.bat 15 c + call b.bat 15 f + call b.bat 15 r + call b.bat 15 c + call b.bat 15 h + call b.bat 15 r + + call b.bat 20 c + call b.bat 20 f + call b.bat 20 r + call b.bat 20 c + call b.bat 20 h + call b.bat 20 r + + call b.bat 21 c + call b.bat 21 f + call b.bat 21 r + call b.bat 21 c + call b.bat 21 h + call b.bat 21 r + + rem (no command arg) --> normal build for development else set CMD=%SETUP% %FLAGS% HYBRID=0 build_ext --inplace --debug %1 %2 %3 %4 %5 %6 %7 %8 %9 diff --git a/wxPython/demo/ColourDB.py b/wxPython/demo/ColourDB.py index f23e294fe5..1f0978818d 100644 --- a/wxPython/demo/ColourDB.py +++ b/wxPython/demo/ColourDB.py @@ -78,7 +78,7 @@ class TestWindow(wxScrolledWindow): numColours = len(colours) if rgn: - # determine the subset that have been exposed and needs drawn + # determine the subset that has been exposed and needs drawn rect = rgn.GetBox() pixStart = vs[1]*self.lineHeight + rect.y pixStop = pixStart + rect.height diff --git a/wxPython/demo/wxCheckListBox.py b/wxPython/demo/wxCheckListBox.py index 4727459b0c..39f3d006bd 100644 --- a/wxPython/demo/wxCheckListBox.py +++ b/wxPython/demo/wxCheckListBox.py @@ -21,6 +21,8 @@ class TestPanel(wxPanel): EVT_LISTBOX_DCLICK(self, 60, self.EvtListBoxDClick) lb.SetSelection(0) + EVT_RIGHT_UP(self, self.OnDoPopup) + def EvtListBox(self, event): self.log.WriteText('EvtListBox: %s\n' % event.GetString()) @@ -28,6 +30,24 @@ class TestPanel(wxPanel): def EvtListBoxDClick(self, event): self.log.WriteText('EvtListBoxDClick:\n') + def OnDoPopup(self, evt): + menu = wxMenu() + # Make this first item bold + item = wxMenuItem(menu, 101, "If supported, this is &bold") + df = wxSystemSettings_GetSystemFont(wxSYS_DEFAULT_GUI_FONT) + nf = wxFont(df.GetPointSize(), df.GetFamily(), df.GetStyle(), wxBOLD, + false, df.GetFaceName()) + item.SetFont(nf) + menu.AppendItem(item) + + menu.AppendItem(wxMenuItem(menu, 102, "Normal Item &1")) + menu.AppendItem(wxMenuItem(menu, 103, "Normal Item &2")) + menu.AppendItem(wxMenuItem(menu, 104, "Normal Item &3")) + menu.AppendItem(wxMenuItem(menu, 105, "Normal Item &4")) + + self.PopupMenu(menu, evt.GetPosition()) + menu.Destroy() + evt.Skip() #---------------------------------------------------------------------- diff --git a/wxPython/demo/wxJoystick.py b/wxPython/demo/wxJoystick.py index 7bdf8391fe..2e13d81010 100644 --- a/wxPython/demo/wxJoystick.py +++ b/wxPython/demo/wxJoystick.py @@ -70,116 +70,116 @@ class JoystickTestPanel(wxPanel): # WDR: methods for JoystickTestPanel def GetYPositionCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_Y_Position_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_Y_Position_Ctrl) def GetXPositionCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_X_Position_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_X_Position_Ctrl) def GetVMaxCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_V_Max_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_V_Max_Ctrl) def GetVMinCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_V_Min_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_V_Min_Ctrl) def GetRudderMaxCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_Rudder_Max_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_Rudder_Max_Ctrl) def GetRudderMinCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_Rudder_Min_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_Rudder_Min_Ctrl) def GetMaxAxesCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_Max_Axes_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_Max_Axes_Ctrl) def GetMaxButtonsCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_Max_Buttons_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_Max_Buttons_Ctrl) def GetZMaxCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_Z_Max_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_Z_Max_Ctrl) def GetYMaxCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_Y_Max_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_Y_Max_Ctrl) def GetYMinCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_Y_Min_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_Y_Min_Ctrl) def GetXMinCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_X_Min_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_X_Min_Ctrl) def GetNumSticksCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_Num_Sticks_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_Num_Sticks_Ctrl) def GetHasPovCtsCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_Has_POV_CTS_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_Has_POV_CTS_Ctrl) def GetHasVCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_Has_V_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_Has_V_Ctrl) def GetHasUCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_Has_U_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_Has_U_Ctrl) def GetVPositionCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_V_Position_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_V_Position_Ctrl) def GetUPositionCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_U_Position_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_U_Position_Ctrl) def GetPovPositionCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_POV_Position_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_POV_Position_Ctrl) def GetButtonStateCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_Button_State_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_Button_State_Ctrl) def GetUMaxCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_U_Max_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_U_Max_Ctrl) def GetUMinCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_U_Min_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_U_Min_Ctrl) def GetPollingMaxCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_Polling_Max_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_Polling_Max_Ctrl) def GetPollingMinCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_Polling_Min_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_Polling_Min_Ctrl) def GetNumAxesCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_Num_Axes_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_Num_Axes_Ctrl) def GetNumButtonsCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_Num_Buttons_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_Num_Buttons_Ctrl) def GetXMaxCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_X_Max_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_X_Max_Ctrl) def GetZMinCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_Z_Min_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_Z_Min_Ctrl) def GetProdNameCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_Prod_Name_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_Prod_Name_Ctrl) def GetMfgIdCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_Mfg_ID_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_Mfg_ID_Ctrl) def GetHasPov4dirCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_Has_POV_4DIR_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_Has_POV_4DIR_Ctrl) def GetHasPovCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_Has_POV_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_Has_POV_Ctrl) def GetHasZCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_Has_Z_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_Has_Z_Ctrl) def GetHasRudderCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_Has_Rudder_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_Has_Rudder_Ctrl) def GetRudderPosCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_Rudder_Pos_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_Rudder_Pos_Ctrl) def GetPovCtsPosCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_POV_CTS_Pos_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_POV_CTS_Pos_Ctrl) def GetZPositionCtrl(self): - return wxPyTypeCast( self.FindWindowById(ID_Z_Position_Ctrl), "wxTextCtrl" ) + return self.FindWindowById(ID_Z_Position_Ctrl) # WDR: handler implementations for JoysticktestPanel diff --git a/wxPython/setup.py b/wxPython/setup.py index eb6f0fc4d6..9f05c579a3 100755 --- a/wxPython/setup.py +++ b/wxPython/setup.py @@ -13,7 +13,7 @@ from my_distutils import run_swig, contrib_copy_tree # flags and values that affect this script #---------------------------------------------------------------------- -VERSION = "2.3b4" +VERSION = "2.3.0" DESCRIPTION = "Cross platform GUI toolkit for Python" AUTHOR = "Robin Dunn" AUTHOR_EMAIL = "robin@alldunn.com" diff --git a/wxPython/src/__version__.py b/wxPython/src/__version__.py index 2eebed83e3..13287b25a0 100644 --- a/wxPython/src/__version__.py +++ b/wxPython/src/__version__.py @@ -1 +1 @@ -ver = '2.3b4' +ver = '2.3.0' diff --git a/wxPython/src/_defs.i b/wxPython/src/_defs.i index e0489610d9..78583baecf 100644 --- a/wxPython/src/_defs.i +++ b/wxPython/src/_defs.i @@ -212,6 +212,7 @@ enum { wxRESIZE_BORDER, wxDIALOG_MODAL, wxDIALOG_MODELESS, + wxDIALOG_NO_PARENT, wxDEFAULT_FRAME_STYLE, wxDEFAULT_DIALOG_STYLE, diff --git a/wxPython/src/cmndlgs.i b/wxPython/src/cmndlgs.i index d2173f407e..321c4e7ddd 100644 --- a/wxPython/src/cmndlgs.i +++ b/wxPython/src/cmndlgs.i @@ -42,7 +42,7 @@ public: ~wxColourData(); bool GetChooseFull(); - wxColour& GetColour(); + wxColour GetColour(); wxColour GetCustomColour(int i); void SetChooseFull(int flag); void SetColour(const wxColour& colour); @@ -198,7 +198,7 @@ public: void EnableEffects(bool enable); bool GetAllowSymbols(); - wxColour& GetColour(); + wxColour GetColour(); wxFont GetChosenFont(); bool GetEnableEffects(); wxFont GetInitialFont(); diff --git a/wxPython/src/gdi.i b/wxPython/src/gdi.i index 159bea062e..c6423519f5 100644 --- a/wxPython/src/gdi.i +++ b/wxPython/src/gdi.i @@ -442,7 +442,7 @@ public: ~wxPen(); int GetCap(); - wxColour& GetColour(); + wxColour GetColour(); int GetJoin(); int GetStyle(); @@ -482,7 +482,7 @@ public: wxBrush(const wxColour& colour, int style=wxSOLID); ~wxBrush(); - wxColour& GetColour(); + wxColour GetColour(); wxBitmap * GetStipple(); int GetStyle(); bool Ok(); @@ -567,12 +567,12 @@ public: %name(GetSizeTuple)void GetSize(int* OUTPUT, int* OUTPUT); wxSize GetSize(); wxSize GetSizeMM(); - wxColour& GetTextBackground(); + wxColour GetTextBackground(); void GetTextExtent(const wxString& string, long *OUTPUT, long *OUTPUT); %name(GetFullTextExtent)void GetTextExtent(const wxString& string, long *OUTPUT, long *OUTPUT, long *OUTPUT, long* OUTPUT, const wxFont* font = NULL); - wxColour& GetTextForeground(); + wxColour GetTextForeground(); void GetUserScale(double *OUTPUT, double *OUTPUT); long LogicalToDeviceX(long x); long LogicalToDeviceXRel(long x); diff --git a/wxPython/src/msw/cmndlgs.cpp b/wxPython/src/msw/cmndlgs.cpp index 94ccc52678..351a41e1dd 100644 --- a/wxPython/src/msw/cmndlgs.cpp +++ b/wxPython/src/msw/cmndlgs.cpp @@ -207,18 +207,12 @@ static PyObject *_wrap_wxColourData_GetColour(PyObject *self, PyObject *args, Py } { wxPy_BEGIN_ALLOW_THREADS; - wxColour & _result_ref = wxColourData_GetColour(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxColourData_GetColour(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -2171,18 +2165,12 @@ static PyObject *_wrap_wxFontData_GetColour(PyObject *self, PyObject *args, PyOb } { wxPy_BEGIN_ALLOW_THREADS; - wxColour & _result_ref = wxFontData_GetColour(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxFontData_GetColour(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } diff --git a/wxPython/src/msw/cmndlgs.py b/wxPython/src/msw/cmndlgs.py index cbbb523526..05e508a769 100644 --- a/wxPython/src/msw/cmndlgs.py +++ b/wxPython/src/msw/cmndlgs.py @@ -29,7 +29,7 @@ class wxColourDataPtr(wxObjectPtr): return val def GetColour(self, *_args, **_kwargs): val = apply(cmndlgsc.wxColourData_GetColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetCustomColour(self, *_args, **_kwargs): val = apply(cmndlgsc.wxColourData_GetCustomColour,(self,) + _args, _kwargs) @@ -241,7 +241,7 @@ class wxFontDataPtr(wxObjectPtr): return val def GetColour(self, *_args, **_kwargs): val = apply(cmndlgsc.wxFontData_GetColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetChosenFont(self, *_args, **_kwargs): val = apply(cmndlgsc.wxFontData_GetChosenFont,(self,) + _args, _kwargs) diff --git a/wxPython/src/msw/gdi.cpp b/wxPython/src/msw/gdi.cpp index f247558b63..618c1929c3 100644 --- a/wxPython/src/msw/gdi.cpp +++ b/wxPython/src/msw/gdi.cpp @@ -4523,18 +4523,12 @@ static PyObject *_wrap_wxPen_GetColour(PyObject *self, PyObject *args, PyObject } { wxPy_BEGIN_ALLOW_THREADS; - wxColour & _result_ref = wxPen_GetColour(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxPen_GetColour(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -5187,18 +5181,12 @@ static PyObject *_wrap_wxBrush_GetColour(PyObject *self, PyObject *args, PyObjec } { wxPy_BEGIN_ALLOW_THREADS; - wxColour & _result_ref = wxBrush_GetColour(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxBrush_GetColour(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -7063,18 +7051,12 @@ static PyObject *_wrap_wxDC_GetTextBackground(PyObject *self, PyObject *args, Py } { wxPy_BEGIN_ALLOW_THREADS; - wxColour & _result_ref = wxDC_GetTextBackground(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxDC_GetTextBackground(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -7272,18 +7254,12 @@ static PyObject *_wrap_wxDC_GetTextForeground(PyObject *self, PyObject *args, Py } { wxPy_BEGIN_ALLOW_THREADS; - wxColour & _result_ref = wxDC_GetTextForeground(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxDC_GetTextForeground(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } diff --git a/wxPython/src/msw/gdi.py b/wxPython/src/msw/gdi.py index 6387dff88c..35e6cdaeff 100644 --- a/wxPython/src/msw/gdi.py +++ b/wxPython/src/msw/gdi.py @@ -414,7 +414,7 @@ class wxPenPtr(wxGDIObjectPtr): return val def GetColour(self, *_args, **_kwargs): val = apply(gdic.wxPen_GetColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetJoin(self, *_args, **_kwargs): val = apply(gdic.wxPen_GetJoin,(self,) + _args, _kwargs) @@ -498,7 +498,7 @@ class wxBrushPtr(wxGDIObjectPtr): gdic.delete_wxBrush(self) def GetColour(self, *_args, **_kwargs): val = apply(gdic.wxBrush_GetColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetStipple(self, *_args, **_kwargs): val = apply(gdic.wxBrush_GetStipple,(self,) + _args, _kwargs) @@ -694,7 +694,7 @@ class wxDCPtr(wxObjectPtr): return val def GetTextBackground(self, *_args, **_kwargs): val = apply(gdic.wxDC_GetTextBackground,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetTextExtent(self, *_args, **_kwargs): val = apply(gdic.wxDC_GetTextExtent,(self,) + _args, _kwargs) @@ -704,7 +704,7 @@ class wxDCPtr(wxObjectPtr): return val def GetTextForeground(self, *_args, **_kwargs): val = apply(gdic.wxDC_GetTextForeground,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetUserScale(self, *_args, **_kwargs): val = apply(gdic.wxDC_GetUserScale,(self,) + _args, _kwargs) diff --git a/wxPython/src/msw/misc.cpp b/wxPython/src/msw/misc.cpp index 9ed6c4e5ac..15e9210546 100644 --- a/wxPython/src/msw/misc.cpp +++ b/wxPython/src/msw/misc.cpp @@ -631,24 +631,6 @@ static PyObject *_wrap_wxEnableTopLevelWindows(PyObject *self, PyObject *args, P return _resultobj; } -static PyObject *_wrap_wxFlushEvents(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - char *_kwnames[] = { NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxFlushEvents",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - wxFlushEvents(); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - static PyObject *_wrap_wxGetResource(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; char * _result; @@ -4192,7 +4174,6 @@ static PyMethodDef misccMethods[] = { { "wxGetEmailAddress", (PyCFunction) _wrap_wxGetEmailAddress, METH_VARARGS | METH_KEYWORDS }, { "wxStripMenuCodes", (PyCFunction) _wrap_wxStripMenuCodes, METH_VARARGS | METH_KEYWORDS }, { "wxGetResource", (PyCFunction) _wrap_wxGetResource, METH_VARARGS | METH_KEYWORDS }, - { "wxFlushEvents", (PyCFunction) _wrap_wxFlushEvents, METH_VARARGS | METH_KEYWORDS }, { "wxEnableTopLevelWindows", (PyCFunction) _wrap_wxEnableTopLevelWindows, METH_VARARGS | METH_KEYWORDS }, { "wxYieldIfNeeded", (PyCFunction) _wrap_wxYieldIfNeeded, METH_VARARGS | METH_KEYWORDS }, { "wxYield", (PyCFunction) _wrap_wxYield, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/misc.py b/wxPython/src/msw/misc.py index 0b991b1599..13e92a9c84 100644 --- a/wxPython/src/msw/misc.py +++ b/wxPython/src/msw/misc.py @@ -587,8 +587,6 @@ wxYieldIfNeeded = miscc.wxYieldIfNeeded wxEnableTopLevelWindows = miscc.wxEnableTopLevelWindows -wxFlushEvents = miscc.wxFlushEvents - wxGetResource = miscc.wxGetResource wxStripMenuCodes = miscc.wxStripMenuCodes diff --git a/wxPython/src/msw/misc2.cpp b/wxPython/src/msw/misc2.cpp index 2fd97af5d6..5a6a508910 100644 --- a/wxPython/src/msw/misc2.cpp +++ b/wxPython/src/msw/misc2.cpp @@ -1425,6 +1425,23 @@ static PyObject *_wrap_wxCheckForInterrupt(PyObject *self, PyObject *args, PyObj return _resultobj; } +static PyObject *_wrap_wxFlushEvents(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxFlushEvents",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFlushEvents(); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static PyObject *_wrap_wxResourceAddIdentifier(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; @@ -7234,6 +7251,7 @@ static PyMethodDef misc2cMethods[] = { { "wxResourceCreateBitmap", (PyCFunction) _wrap_wxResourceCreateBitmap, METH_VARARGS | METH_KEYWORDS }, { "wxResourceClear", (PyCFunction) _wrap_wxResourceClear, METH_VARARGS | METH_KEYWORDS }, { "wxResourceAddIdentifier", (PyCFunction) _wrap_wxResourceAddIdentifier, METH_VARARGS | METH_KEYWORDS }, + { "wxFlushEvents", (PyCFunction) _wrap_wxFlushEvents, METH_VARARGS | METH_KEYWORDS }, { "wxCheckForInterrupt", (PyCFunction) _wrap_wxCheckForInterrupt, METH_VARARGS | METH_KEYWORDS }, { "wxFindWindowAtPoint", (PyCFunction) _wrap_wxFindWindowAtPoint, METH_VARARGS | METH_KEYWORDS }, { "wxGenericFindWindowAtPoint", (PyCFunction) _wrap_wxGenericFindWindowAtPoint, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/misc2.py b/wxPython/src/msw/misc2.py index 443f0f8a3d..c52a0c9924 100644 --- a/wxPython/src/msw/misc2.py +++ b/wxPython/src/msw/misc2.py @@ -726,6 +726,8 @@ def wxFindWindowAtPoint(*_args, **_kwargs): wxCheckForInterrupt = misc2c.wxCheckForInterrupt +wxFlushEvents = misc2c.wxFlushEvents + wxResourceAddIdentifier = misc2c.wxResourceAddIdentifier wxResourceClear = misc2c.wxResourceClear diff --git a/wxPython/src/msw/windows.cpp b/wxPython/src/msw/windows.cpp index ae5f36982c..7c66007aa3 100644 --- a/wxPython/src/msw/windows.cpp +++ b/wxPython/src/msw/windows.cpp @@ -9976,18 +9976,12 @@ static PyObject *_wrap_wxMenuItem_GetTextColour(PyObject *self, PyObject *args, } { wxPy_BEGIN_ALLOW_THREADS; - wxColour & _result_ref = wxMenuItem_GetTextColour(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxMenuItem_GetTextColour(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -10048,18 +10042,12 @@ static PyObject *_wrap_wxMenuItem_GetBackgroundColour(PyObject *self, PyObject * } { wxPy_BEGIN_ALLOW_THREADS; - wxColour & _result_ref = wxMenuItem_GetBackgroundColour(_arg0); - _result = (wxColour *) &_result_ref; + _result = new wxColour (wxMenuItem_GetBackgroundColour(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } diff --git a/wxPython/src/msw/windows.py b/wxPython/src/msw/windows.py index 5a7fe39ea4..0d0a66e585 100644 --- a/wxPython/src/msw/windows.py +++ b/wxPython/src/msw/windows.py @@ -950,14 +950,14 @@ class wxMenuItemPtr(wxObjectPtr): return val def GetTextColour(self, *_args, **_kwargs): val = apply(windowsc.wxMenuItem_GetTextColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def SetBackgroundColour(self, *_args, **_kwargs): val = apply(windowsc.wxMenuItem_SetBackgroundColour,(self,) + _args, _kwargs) return val def GetBackgroundColour(self, *_args, **_kwargs): val = apply(windowsc.wxMenuItem_GetBackgroundColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def SetBitmaps(self, *_args, **_kwargs): val = apply(windowsc.wxMenuItem_SetBitmaps,(self,) + _args, _kwargs) diff --git a/wxPython/src/windows.i b/wxPython/src/windows.i index ddbf6b644a..85b0a9aafd 100644 --- a/wxPython/src/windows.i +++ b/wxPython/src/windows.i @@ -696,9 +696,9 @@ public: void SetFont(const wxFont& font); wxFont& GetFont(); void SetTextColour(const wxColour& colText); - wxColour& GetTextColour(); + wxColour GetTextColour(); void SetBackgroundColour(const wxColour& colBack); - wxColour& GetBackgroundColour(); + wxColour GetBackgroundColour(); void SetBitmaps(const wxBitmap& bmpChecked, const wxBitmap& bmpUnchecked = wxNullBitmap); void SetBitmap(const wxBitmap& bmpChecked); diff --git a/wxPython/src/windows2.i b/wxPython/src/windows2.i index 581c663807..cfddb6a4d3 100644 --- a/wxPython/src/windows2.i +++ b/wxPython/src/windows2.i @@ -59,9 +59,9 @@ public: void SetTextValue(const wxString& str); wxFont& GetFont(); void SetFont(wxFont& f); - wxColour& GetTextColour(); + wxColour GetTextColour(); void SetTextColour(const wxColour& colour); - wxColour& GetBackgroundColour(); + wxColour GetBackgroundColour(); void SetBackgroundColour(const wxColour& colour); wxBrush& GetBackgroundBrush(); int GetAlignment(); @@ -122,7 +122,7 @@ public: wxGridCell* GetCell(int row, int col); int GetCellAlignment(int row, int col); %name(GetDefCellAlignment)int GetCellAlignment(); - wxColour& GetCellBackgroundColour(int row, int col); + wxColour GetCellBackgroundColour(int row, int col); %name(GetDefCellBackgroundColour) wxColour& GetCellBackgroundColour(); //wxGridCell *** GetCells(); @@ -148,7 +148,7 @@ public: return rows; } } - wxColour& GetCellTextColour(int row, int col); + wxColour GetCellTextColour(int row, int col); %name(GetDefCellTextColour)wxColour& GetCellTextColour(); wxFont& GetCellTextFont(int row, int col); %name(GetDefCellTextFont)wxFont& GetCellTextFont(); @@ -161,9 +161,9 @@ public: bool GetEditable(); wxScrollBar * GetHorizScrollBar(); int GetLabelAlignment(int orientation); - wxColour& GetLabelBackgroundColour(); + wxColour GetLabelBackgroundColour(); int GetLabelSize(int orientation); - wxColour& GetLabelTextColour(); + wxColour GetLabelTextColour(); wxFont& GetLabelTextFont(); wxString& GetLabelValue(int orientation, int pos); int GetRowHeight(int row); -- 2.45.2