From a08cbc01686c6acf8260a230ccdae38290dbfd20 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 28 Jun 1999 03:10:35 +0000 Subject: [PATCH] Final tweaks for 2.1b1 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2914 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- utils/wxPython/README.txt | 1 + utils/wxPython/demo/Sizers.py | 3 +-- utils/wxPython/demo/wxListCtrl.py | 32 +++++++++++++++++++++++++++- utils/wxPython/distrib/wxPython.wse | 4 ++-- utils/wxPython/distrib/wxPython.wsm | Bin 19 -> 33 bytes utils/wxPython/distrib/zipit.bat | 3 ++- utils/wxPython/src/_defs.i | 3 +++ utils/wxPython/src/helpers.h | 3 +-- utils/wxPython/src/msw/wx.cpp | 8 ++++--- utils/wxPython/src/msw/wx.py | 3 +++ 10 files changed, 49 insertions(+), 11 deletions(-) diff --git a/utils/wxPython/README.txt b/utils/wxPython/README.txt index 5d1f41fd20..d4b90b7ac5 100644 --- a/utils/wxPython/README.txt +++ b/utils/wxPython/README.txt @@ -23,6 +23,7 @@ the help file. To help you save disk space I'm now using Microsoft's HTML Help format. If your system doesn't know what to do with the help file, you can install the HTML Help Viewer as part of IE 4+, NT Service Pack 4+, or the HTML Workshop at + http://msdn.microsoft.com/workshop/author/htmlhelp/download.asp. diff --git a/utils/wxPython/demo/Sizers.py b/utils/wxPython/demo/Sizers.py index fcc99b96e0..ea76aec68c 100644 --- a/utils/wxPython/demo/Sizers.py +++ b/utils/wxPython/demo/Sizers.py @@ -260,11 +260,10 @@ class TestFrame(wxFrame): self.sizer = sizerFunc(self) self.CreateStatusBar() - + self.SetStatusText("Resize this frame to see how the sizers respond...") self.sizer.FitWindow(self) - def OnSize(self, event): size = self.GetClientSize() self.sizer.Layout(size) diff --git a/utils/wxPython/demo/wxListCtrl.py b/utils/wxPython/demo/wxListCtrl.py index f9c0ac4d49..df3a9f53d2 100644 --- a/utils/wxPython/demo/wxListCtrl.py +++ b/utils/wxPython/demo/wxListCtrl.py @@ -50,6 +50,13 @@ class TestListCtrlPanel(wxPanel): EVT_LIST_ITEM_SELECTED(self, tID, self.OnItemSelected) EVT_LEFT_DCLICK(self.list, self.OnDoubleClick) EVT_COMMAND_RIGHT_CLICK(self.list, tID, self.OnRightClick) + EVT_RIGHT_DOWN(self.list, self.OnRightDown) + + + def OnRightDown(self, event): + self.x = event.GetX() + self.log.WriteText("x = %d\n" % self.x) + event.Skip() def OnItemSelected(self, event): self.currentItem = event.m_itemIndex @@ -58,9 +65,30 @@ class TestListCtrlPanel(wxPanel): def OnDoubleClick(self, event): self.log.WriteText("OnDoubleClick item %s\n" % self.list.GetItemText(self.currentItem)) + def OnRightClick(self, event): self.log.WriteText("OnRightClick %s\n" % self.list.GetItemText(self.currentItem)) - + menu = wxPyMenu() + tPopupID1 = 0 + tPopupID2 = 1 + tPopupID3 = 2 + menu.Append(tPopupID1, "One") + menu.Append(tPopupID2, "Two") + menu.Append(tPopupID3, "Three") + EVT_MENU(self, tPopupID1, self.OnPopupOne) + EVT_MENU(self, tPopupID2, self.OnPopupTwo) + EVT_MENU(self, tPopupID3, self.OnPopupThree) + pos = self.list.GetItemPosition(self.currentItem) + self.PopupMenu(menu, self.x, pos.y) + + def OnPopupOne(self, event): + self.log.WriteText("Popup one\n") + + def OnPopupTwo(self, event): + self.log.WriteText("Popup two\n") + + def OnPopupThree(self, event): + self.log.WriteText("Popup three\n") def OnSize(self, event): w,h = self.GetClientSizeTuple() @@ -69,6 +97,8 @@ class TestListCtrlPanel(wxPanel): + + #--------------------------------------------------------------------------- def runTest(frame, nb, log): diff --git a/utils/wxPython/distrib/wxPython.wse b/utils/wxPython/distrib/wxPython.wse index d8e328fde4..72b1b7d76d 100644 --- a/utils/wxPython/distrib/wxPython.wse +++ b/utils/wxPython/distrib/wxPython.wse @@ -812,12 +812,12 @@ end remarked item: End Block end item: Install File - Source=c:\WINNT\System32\Msvcirt.dll + Source=d:\WINNT\System32\Msvcirt.dll Destination=%SYS%\Msvcirt.dll Flags=0000001010000011 end item: Install File - Source=c:\WINNT\System32\Msvcrt.dll + Source=d:\WINNT\System32\Msvcrt.dll Destination=%SYS%\Msvcrt.dll Flags=0000001010000011 end diff --git a/utils/wxPython/distrib/wxPython.wsm b/utils/wxPython/distrib/wxPython.wsm index 47c17ecc09db0d5cfde2ba9f3770bc364a7799dd..49c7671da1794e515576f772c3ac5403a27ff7aa 100644 GIT binary patch literal 33 mcmWF!_BDGZ$-uzKa9d4i-j+w241dI#7(jqAv|J_8mjM8s!w6CU literal 19 acmWF!_BDGZ$-uzKa8+&fp0ep$3}pa29tJ%C diff --git a/utils/wxPython/distrib/zipit.bat b/utils/wxPython/distrib/zipit.bat index 17d6b2a906..b8713f58a8 100755 --- a/utils/wxPython/distrib/zipit.bat +++ b/utils/wxPython/distrib/zipit.bat @@ -5,7 +5,8 @@ zip -@ -r wxPython\wxPython-src-%1.zip < wxPython\distrib\wxPython.rsp mkdir wxPython\docs -copy %WXWIN%\docs\html\wx\*.* wxPython\docs +copy %WXWIN%\docs\html\wx\*.gif wxPython\docs +copy %WXWIN%\docs\html\wx\*.htm wxPython\docs copy wxPython\docs\wx.htm wxPython\docs\index.htm zip -r wxPython\wxPython-docs-%1.zip wxPython\docs diff --git a/utils/wxPython/src/_defs.i b/utils/wxPython/src/_defs.i index 0d53a38dac..f005f8a785 100644 --- a/utils/wxPython/src/_defs.i +++ b/utils/wxPython/src/_defs.i @@ -399,6 +399,9 @@ enum { wxPD_AUTO_HIDE, wxPD_APP_MODAL, wxPD_CAN_ABORT, + wxPD_ELAPSED_TIME, + wxPD_ESTIMATED_TIME, + wxPD_REMAINING_TIME, wxNO_DEFAULT, }; diff --git a/utils/wxPython/src/helpers.h b/utils/wxPython/src/helpers.h index 02433e748b..849625a4bf 100644 --- a/utils/wxPython/src/helpers.h +++ b/utils/wxPython/src/helpers.h @@ -146,8 +146,7 @@ private: // with looking up and invoking Python callback methods from C++ virtual // method redirections. For all classes which have virtuals which should be // overridable in wxPython, a new subclass is created that contains a -// wxPyCallbackList. This list is used to hold references to the Python -// methods. +// wxPyCallbackHelper. //--------------------------------------------------------------------------- class wxPyCallbackHelper { diff --git a/utils/wxPython/src/msw/wx.cpp b/utils/wxPython/src/msw/wx.cpp index 20d8e4f6ec..c576cf1f31 100644 --- a/utils/wxPython/src/msw/wx.cpp +++ b/utils/wxPython/src/msw/wx.cpp @@ -33,9 +33,8 @@ * and things like that. * * $Log$ - * Revision 1.11 1999/06/22 07:03:29 RD - * wxPython 2.1b1 for wxMSW (wxGTK coming soon) - * Lots of changes, see the README.txt for details... + * Revision 1.12 1999/06/28 03:10:35 RD + * Final tweaks for 2.1b1 * ************************************************************************/ @@ -1558,6 +1557,9 @@ SWIGEXPORT(void,initwxc)() { PyDict_SetItemString(d,"wxPD_AUTO_HIDE", PyInt_FromLong((long) wxPD_AUTO_HIDE)); PyDict_SetItemString(d,"wxPD_APP_MODAL", PyInt_FromLong((long) wxPD_APP_MODAL)); PyDict_SetItemString(d,"wxPD_CAN_ABORT", PyInt_FromLong((long) wxPD_CAN_ABORT)); + PyDict_SetItemString(d,"wxPD_ELAPSED_TIME", PyInt_FromLong((long) wxPD_ELAPSED_TIME)); + PyDict_SetItemString(d,"wxPD_ESTIMATED_TIME", PyInt_FromLong((long) wxPD_ESTIMATED_TIME)); + PyDict_SetItemString(d,"wxPD_REMAINING_TIME", PyInt_FromLong((long) wxPD_REMAINING_TIME)); PyDict_SetItemString(d,"wxNO_DEFAULT", PyInt_FromLong((long) wxNO_DEFAULT)); PyDict_SetItemString(d,"wxDEFAULT", PyInt_FromLong((long) wxDEFAULT)); PyDict_SetItemString(d,"wxDECORATIVE", PyInt_FromLong((long) wxDECORATIVE)); diff --git a/utils/wxPython/src/msw/wx.py b/utils/wxPython/src/msw/wx.py index 578ea9c6a7..3983021421 100644 --- a/utils/wxPython/src/msw/wx.py +++ b/utils/wxPython/src/msw/wx.py @@ -345,6 +345,9 @@ wxACCEL_SHIFT = wxc.wxACCEL_SHIFT wxPD_AUTO_HIDE = wxc.wxPD_AUTO_HIDE wxPD_APP_MODAL = wxc.wxPD_APP_MODAL wxPD_CAN_ABORT = wxc.wxPD_CAN_ABORT +wxPD_ELAPSED_TIME = wxc.wxPD_ELAPSED_TIME +wxPD_ESTIMATED_TIME = wxc.wxPD_ESTIMATED_TIME +wxPD_REMAINING_TIME = wxc.wxPD_REMAINING_TIME wxNO_DEFAULT = wxc.wxNO_DEFAULT wxDEFAULT = wxc.wxDEFAULT wxDECORATIVE = wxc.wxDECORATIVE -- 2.45.2