From 843ab900d9aec84f3dc4a81ca96f990de1faa450 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 11 Mar 2003 19:41:55 +0000 Subject: [PATCH] Updated to 0.9b of PyCrust git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19551 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/distrib/make_installer.py | 2 +- wxPython/setup.py | 2 +- wxPython/wxPython/lib/PyCrust/CHANGES.txt | 3 +- wxPython/wxPython/lib/PyCrust/PyCrustApp.py | 24 +- wxPython/wxPython/lib/PyCrust/PyFillingApp.py | 15 +- wxPython/wxPython/lib/PyCrust/PyShellApp.py | 24 +- wxPython/wxPython/lib/PyCrust/crust.py | 12 +- .../wxPython/lib/PyCrust/decor/wxDecor.py | 57 - .../wxPython/lib/PyCrust/decor/wxFunctions.py | 1272 ----------------- .../lib/PyCrust/decor/wxParameters.py | 76 - wxPython/wxPython/lib/PyCrust/shell.py | 13 +- wxPython/wxPython/lib/PyCrust/version.py | 2 +- .../wxAccelerators.py => wxd/Accelerators.py} | 32 +- .../PyCrust/{decor/wxApp.py => wxd/App.py} | 52 +- .../PyCrust/{decor/wxBase.py => wxd/Base.py} | 38 +- .../wxClipDragDrop.py => wxd/ClipDragDrop.py} | 42 +- .../{decor/wxConfig.py => wxd/Config.py} | 8 +- .../{decor/wxControls.py => wxd/Controls.py} | 118 +- .../DataStructures.py} | 12 +- .../{decor/wxDateTime.py => wxd/DateTime.py} | 8 +- .../{decor/wxDialogs.py => wxd/Dialogs.py} | 38 +- .../{decor/wxDrawing.py => wxd/Drawing.py} | 60 +- .../{decor/wxErrors.py => wxd/Errors.py} | 4 +- .../EventFunctions.py} | 0 .../{decor/wxEvents.py => wxd/Events.py} | 102 +- .../wxFileSystem.py => wxd/FileSystem.py} | 18 +- .../{decor/wxFrames.py => wxd/Frames.py} | 98 +- .../wxPython/lib/PyCrust/wxd/Functions.py | 1264 ++++++++++++++++ .../PyCrust/{decor/wxHelp.py => wxd/Help.py} | 18 +- .../ImageHandlers.py} | 26 +- .../{decor/wxJoystick.py => wxd/Joystick.py} | 6 +- .../LayoutConstraints.py} | 8 +- .../{decor/wxLogging.py => wxd/Logging.py} | 18 +- .../{decor/wxMenus.py => wxd/Menus.py} | 14 +- .../wxMimeTypes.py => wxd/MimeTypes.py} | 8 +- .../PyCrust/{decor/wxMisc.py => wxd/Misc.py} | 42 +- .../{decor/wxPanel.py => wxd/Panel.py} | 34 +- .../wxPython/lib/PyCrust/wxd/Parameters.py | 82 ++ .../{decor/wxPrinting.py => wxd/Printing.py} | 26 +- .../{decor/wxProcess.py => wxd/Process.py} | 4 +- .../wxSashSplitter.py => wxd/SashSplitter.py} | 10 +- .../{decor/wxSizers.py => wxd/Sizers.py} | 20 +- .../{decor/wxStreams.py => wxd/Streams.py} | 4 +- .../StyledTextConstants.py} | 0 .../wxThreading.py => wxd/Threading.py} | 2 +- .../{decor/wxToolBar.py => wxd/ToolBar.py} | 14 +- .../PyCrust/{decor/wxTree.py => wxd/Tree.py} | 14 +- .../wxValidators.py => wxd/Validators.py} | 8 +- .../{decor/wxWindow.py => wxd/Window.py} | 42 +- .../lib/PyCrust/{decor => wxd}/__init__.py | 0 wxPython/wxPython/lib/PyCrust/wxd/d_stc.py | 17 + wxPython/wxPython/lib/PyCrust/wxd/d_wx.py | 17 + .../{decor/decorate.py => wxd/decorator.py} | 82 +- wxPython/wxPython/lib/PyCrust/wxd/gen.py | 71 + .../{decor/stcDecor.py => wxd/stc_.py} | 20 +- wxPython/wxPython/lib/PyCrust/wxd/wx_.py | 57 + 56 files changed, 2072 insertions(+), 1988 deletions(-) delete mode 100644 wxPython/wxPython/lib/PyCrust/decor/wxDecor.py delete mode 100644 wxPython/wxPython/lib/PyCrust/decor/wxFunctions.py delete mode 100644 wxPython/wxPython/lib/PyCrust/decor/wxParameters.py rename wxPython/wxPython/lib/PyCrust/{decor/wxAccelerators.py => wxd/Accelerators.py} (88%) rename wxPython/wxPython/lib/PyCrust/{decor/wxApp.py => wxd/App.py} (88%) rename wxPython/wxPython/lib/PyCrust/{decor/wxBase.py => wxd/Base.py} (86%) rename wxPython/wxPython/lib/PyCrust/{decor/wxClipDragDrop.py => wxd/ClipDragDrop.py} (88%) rename wxPython/wxPython/lib/PyCrust/{decor/wxConfig.py => wxd/Config.py} (96%) rename wxPython/wxPython/lib/PyCrust/{decor/wxControls.py => wxd/Controls.py} (90%) rename wxPython/wxPython/lib/PyCrust/{decor/wxDataStructures.py => wxd/DataStructures.py} (98%) rename wxPython/wxPython/lib/PyCrust/{decor/wxDateTime.py => wxd/DateTime.py} (98%) rename wxPython/wxPython/lib/PyCrust/{decor/wxDialogs.py => wxd/Dialogs.py} (90%) rename wxPython/wxPython/lib/PyCrust/{decor/wxDrawing.py => wxd/Drawing.py} (95%) rename wxPython/wxPython/lib/PyCrust/{decor/wxErrors.py => wxd/Errors.py} (89%) rename wxPython/wxPython/lib/PyCrust/{decor/wxEventFunctions.py => wxd/EventFunctions.py} (100%) rename wxPython/wxPython/lib/PyCrust/{decor/wxEvents.py => wxd/Events.py} (89%) rename wxPython/wxPython/lib/PyCrust/{decor/wxFileSystem.py => wxd/FileSystem.py} (87%) rename wxPython/wxPython/lib/PyCrust/{decor/wxFrames.py => wxd/Frames.py} (87%) create mode 100644 wxPython/wxPython/lib/PyCrust/wxd/Functions.py rename wxPython/wxPython/lib/PyCrust/{decor/wxHelp.py => wxd/Help.py} (84%) rename wxPython/wxPython/lib/PyCrust/{decor/wxImageHandlers.py => wxd/ImageHandlers.py} (78%) rename wxPython/wxPython/lib/PyCrust/{decor/wxJoystick.py => wxd/Joystick.py} (97%) rename wxPython/wxPython/lib/PyCrust/{decor/wxLayoutConstraints.py => wxd/LayoutConstraints.py} (89%) rename wxPython/wxPython/lib/PyCrust/{decor/wxLogging.py => wxd/Logging.py} (89%) rename wxPython/wxPython/lib/PyCrust/{decor/wxMenus.py => wxd/Menus.py} (96%) rename wxPython/wxPython/lib/PyCrust/{decor/wxMimeTypes.py => wxd/MimeTypes.py} (96%) rename wxPython/wxPython/lib/PyCrust/{decor/wxMisc.py => wxd/Misc.py} (92%) rename wxPython/wxPython/lib/PyCrust/{decor/wxPanel.py => wxd/Panel.py} (81%) create mode 100644 wxPython/wxPython/lib/PyCrust/wxd/Parameters.py rename wxPython/wxPython/lib/PyCrust/{decor/wxPrinting.py => wxd/Printing.py} (95%) rename wxPython/wxPython/lib/PyCrust/{decor/wxProcess.py => wxd/Process.py} (95%) rename wxPython/wxPython/lib/PyCrust/{decor/wxSashSplitter.py => wxd/SashSplitter.py} (95%) rename wxPython/wxPython/lib/PyCrust/{decor/wxSizers.py => wxd/Sizers.py} (95%) rename wxPython/wxPython/lib/PyCrust/{decor/wxStreams.py => wxd/Streams.py} (97%) rename wxPython/wxPython/lib/PyCrust/{decor/stcConstants.py => wxd/StyledTextConstants.py} (100%) rename wxPython/wxPython/lib/PyCrust/{decor/wxThreading.py => wxd/Threading.py} (95%) rename wxPython/wxPython/lib/PyCrust/{decor/wxToolBar.py => wxd/ToolBar.py} (96%) rename wxPython/wxPython/lib/PyCrust/{decor/wxTree.py => wxd/Tree.py} (96%) rename wxPython/wxPython/lib/PyCrust/{decor/wxValidators.py => wxd/Validators.py} (86%) rename wxPython/wxPython/lib/PyCrust/{decor/wxWindow.py => wxd/Window.py} (92%) rename wxPython/wxPython/lib/PyCrust/{decor => wxd}/__init__.py (100%) create mode 100644 wxPython/wxPython/lib/PyCrust/wxd/d_stc.py create mode 100644 wxPython/wxPython/lib/PyCrust/wxd/d_wx.py rename wxPython/wxPython/lib/PyCrust/{decor/decorate.py => wxd/decorator.py} (51%) create mode 100644 wxPython/wxPython/lib/PyCrust/wxd/gen.py rename wxPython/wxPython/lib/PyCrust/{decor/stcDecor.py => wxd/stc_.py} (98%) create mode 100644 wxPython/wxPython/lib/PyCrust/wxd/wx_.py diff --git a/wxPython/distrib/make_installer.py b/wxPython/distrib/make_installer.py index 137469829b..d8e49891a6 100644 --- a/wxPython/distrib/make_installer.py +++ b/wxPython/distrib/make_installer.py @@ -96,7 +96,7 @@ Source: "wxPython\lib\mixins\*.py"; DestDir: "{app}\wxPython\lib\mixins" Source: "wxPython\lib\PyCrust\*.py"; DestDir: "{app}\wxPython\lib\PyCrust"; Components: core Source: "wxPython\lib\PyCrust\*.txt"; DestDir: "{app}\wxPython\lib\PyCrust"; Components: core Source: "wxPython\lib\PyCrust\*.ico"; DestDir: "{app}\wxPython\lib\PyCrust"; Components: core -Source: "wxPython\lib\PyCrust\decor\*.py"; DestDir: "{app}\wxPython\lib\PyCrust\decor"; Components: core +Source: "wxPython\lib\PyCrust\wxd\*.py"; DestDir: "{app}\wxPython\lib\PyCrust\wxd"; Components: core Source: "wxPython\lib\colourchooser\*.py"; DestDir: "{app}\wxPython\lib\colourchooser"; Components: core %(LOCALE)s diff --git a/wxPython/setup.py b/wxPython/setup.py index 95b9ad6acb..ad8da943af 100755 --- a/wxPython/setup.py +++ b/wxPython/setup.py @@ -1206,7 +1206,7 @@ if __name__ == "__main__": PKGDIR+'.lib.editor', PKGDIR+'.lib.mixins', PKGDIR+'.lib.PyCrust', - PKGDIR+'.lib.PyCrust.decor', + PKGDIR+'.lib.PyCrust.wxd', PKGDIR+'.tools', PKGDIR+'.tools.XRCed', ], diff --git a/wxPython/wxPython/lib/PyCrust/CHANGES.txt b/wxPython/wxPython/lib/PyCrust/CHANGES.txt index 733dd35083..dde8560573 100644 --- a/wxPython/wxPython/lib/PyCrust/CHANGES.txt +++ b/wxPython/wxPython/lib/PyCrust/CHANGES.txt @@ -29,7 +29,7 @@ Introduced new tabbed interface: * wxSTC Docs Filling.tree now expands tuples as well as lists. (It should have done -this all along, I just never noticed this before.) +this all along, I just never noticed this omission before.) Added this True/False test to all modules: @@ -39,6 +39,7 @@ Added this True/False test to all modules: True = 1==1 False = 1==0 +Added wxd directory with decoration classes. 0.8.2 (1/5/2003 to 2/26/2003) diff --git a/wxPython/wxPython/lib/PyCrust/PyCrustApp.py b/wxPython/wxPython/lib/PyCrust/PyCrustApp.py index d97c1ec388..1720f48aa5 100755 --- a/wxPython/wxPython/lib/PyCrust/PyCrustApp.py +++ b/wxPython/wxPython/lib/PyCrust/PyCrustApp.py @@ -41,19 +41,29 @@ class App(wx.wxApp): sys.application = self return 1 +''' +The main() function needs to handle being imported, such as with the +pycrust script that wxPython installs: + + #!/usr/bin/env python + + from wxPython.lib.PyCrust.PyCrustApp import main + main() +''' def main(): - locals = __main__.__dict__ + import __main__ + md = __main__.__dict__ keepers = original keepers.append('App') - for key in locals.keys(): + for key in md.keys(): if key not in keepers: - del locals[key] + del md[key] application = App(0) - if locals.has_key('App') and locals['App'] is App: - del locals['App'] - if locals.has_key('__main__') and locals['__main__'] is __main__: - del locals['__main__'] + if md.has_key('App') and md['App'] is App: + del md['App'] + if md.has_key('__main__') and md['__main__'] is __main__: + del md['__main__'] application.MainLoop() if __name__ == '__main__': diff --git a/wxPython/wxPython/lib/PyCrust/PyFillingApp.py b/wxPython/wxPython/lib/PyCrust/PyFillingApp.py index cd2b07c540..b204210a80 100755 --- a/wxPython/wxPython/lib/PyCrust/PyFillingApp.py +++ b/wxPython/wxPython/lib/PyCrust/PyFillingApp.py @@ -6,7 +6,7 @@ __cvsid__ = "$Id$" __revision__ = "$Revision$"[11:-2] # We use this object to get more introspection when run standalone. -application = None +app = None import filling @@ -30,16 +30,15 @@ except NameError: class App(filling.App): def OnInit(self): filling.App.OnInit(self) - root = self.fillingFrame.filling.fillingTree.root - self.fillingFrame.filling.fillingTree.Expand(root) - return 1 - + self.root = self.fillingFrame.filling.tree.root + return True def main(): """Create and run the application.""" - global application - application = App(0) - application.MainLoop() + global app + app = App(0) + app.fillingFrame.filling.tree.Expand(app.root) + app.MainLoop() if __name__ == '__main__': diff --git a/wxPython/wxPython/lib/PyCrust/PyShellApp.py b/wxPython/wxPython/lib/PyCrust/PyShellApp.py index d1a3a28d44..7876d17933 100755 --- a/wxPython/wxPython/lib/PyCrust/PyShellApp.py +++ b/wxPython/wxPython/lib/PyCrust/PyShellApp.py @@ -42,19 +42,29 @@ class App(wx.wxApp): sys.application = self return 1 +''' +The main() function needs to handle being imported, such as with the +pycrust script that wxPython installs: + + #!/usr/bin/env python + + from wxPython.lib.PyCrust.PyCrustApp import main + main() +''' def main(): - locals = __main__.__dict__ + import __main__ + md = __main__.__dict__ keepers = original keepers.append('App') - for key in locals.keys(): + for key in md.keys(): if key not in keepers: - del locals[key] + del md[key] application = App(0) - if locals.has_key('App') and locals['App'] is App: - del locals['App'] - if locals.has_key('__main__') and locals['__main__'] is __main__: - del locals['__main__'] + if md.has_key('App') and md['App'] is App: + del md['App'] + if md.has_key('__main__') and md['__main__'] is __main__: + del md['__main__'] application.MainLoop() if __name__ == '__main__': diff --git a/wxPython/wxPython/lib/PyCrust/crust.py b/wxPython/wxPython/lib/PyCrust/crust.py index cdf5b1ff88..176180b05f 100644 --- a/wxPython/wxPython/lib/PyCrust/crust.py +++ b/wxPython/wxPython/lib/PyCrust/crust.py @@ -50,20 +50,20 @@ class Crust(wx.wxSplitterWindow): self.notebook.AddPage(self.sessionlisting, 'Session') self.dispatcherlisting = DispatcherListing(parent=self.notebook) self.notebook.AddPage(self.dispatcherlisting, 'Dispatcher') - from decor import wxDecor + from wxd import wx_ self.wxdocs = Filling(parent=self.notebook, - rootObject=wxDecor, + rootObject=wx_, rootLabel='wx', rootIsNamespace=False, static=True) self.notebook.AddPage(self.wxdocs, 'wxPython Docs') - from decor import stcDecor + from wxd import stc_ self.stcdocs = Filling(parent=self.notebook, - rootObject=stcDecor.wxStyledTextCtrl, - rootLabel='wxStyledTextCtrl', + rootObject=stc_.StyledTextCtrl, + rootLabel='StyledTextCtrl', rootIsNamespace=False, static=True) - self.notebook.AddPage(self.stcdocs, 'wxSTC Docs') + self.notebook.AddPage(self.stcdocs, 'StyledTextCtrl Docs') self.SplitHorizontally(self.shell, self.notebook, 300) self.SetMinimumPaneSize(1) diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxDecor.py b/wxPython/wxPython/lib/PyCrust/decor/wxDecor.py deleted file mode 100644 index 714af98a58..0000000000 --- a/wxPython/wxPython/lib/PyCrust/decor/wxDecor.py +++ /dev/null @@ -1,57 +0,0 @@ -"""Decorator classes for documentation and shell scripting. -""" - -__author__ = "Patrick K. O'Brien " -__cvsid__ = "$Id$" -__revision__ = "$Revision$"[11:-2] - - -# These are not the real wxPython classes. These are Python versions -# for documentation purposes. They are also used to apply docstrings -# to the real wxPython classes, which are SWIG-generated wrappers for -# C-language classes. - - -_topics = { - 'wxAccelerators': None, - 'wxApp': None, - 'wxBase': None, - 'wxClipDragDrop': None, - 'wxConfig': None, - 'wxControls': None, - 'wxDataStructures': None, - 'wxDateTime': None, - 'wxDialogs': None, - 'wxDrawing': None, - 'wxErrors': None, - 'wxEventFunctions': None, - 'wxEvents': None, - 'wxFileSystem': None, - 'wxFrames': None, - 'wxFunctions': None, - 'wxHelp': None, - 'wxImageHandlers': None, - 'wxJoystick': None, - 'wxLayoutConstraints': None, - 'wxLogging': None, - 'wxMenus': None, - 'wxMimeTypes': None, - 'wxMisc': None, - 'wxPanel': None, - 'wxPrinting': None, - 'wxProcess': None, - 'wxSashSplitter': None, - 'wxSizers': None, - 'wxStreams': None, - 'wxThreading': None, - 'wxToolBar': None, - 'wxTree': None, - 'wxValidators': None, - 'wxWindow': None, - } - -for topic in _topics: - _topics[topic] = __import__(topic, globals()) - exec 'from %s import *' % topic - -del topic # Cleanup the namespace. diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxFunctions.py b/wxPython/wxPython/lib/PyCrust/decor/wxFunctions.py deleted file mode 100644 index e899c478f9..0000000000 --- a/wxPython/wxPython/lib/PyCrust/decor/wxFunctions.py +++ /dev/null @@ -1,1272 +0,0 @@ -"""Decorator classes for documentation and shell scripting. -""" - -__author__ = "Patrick K. O'Brien " -__cvsid__ = "$Id$" -__revision__ = "$Revision$"[11:-2] - - -# These are not the real wxPython classes. These are Python versions -# for documentation purposes. They are also used to apply docstrings -# to the real wxPython classes, which are SWIG-generated wrappers for -# C-language classes. - - -import wxParameters as wx - - -def NewId(): - """""" - pass - -def RegisterId(): - """""" - pass - -def wxArtProvider_GetBitmap(): - """""" - pass - -def wxArtProvider_GetIcon(): - """""" - pass - -def wxArtProvider_PopProvider(): - """""" - pass - -def wxArtProvider_PushProvider(): - """""" - pass - -def wxArtProvider_RemoveProvider(): - """""" - pass - -def wxBeginBusyCursor(): - """""" - pass - -def wxBell(): - """""" - pass - -def wxBitmapFromBits(): - """""" - pass - -def wxBitmapFromIcon(): - """""" - pass - -def wxBitmapFromImage(): - """""" - pass - -def wxBitmapFromXPMData(): - """""" - pass - -def wxBufferedDCInternalBuffer(): - """""" - pass - -def wxButton_GetDefaultSize(): - """""" - pass - -## def wxCallAfter(): -## """""" -## pass - -from wxPython import wx as wxpy -wxCallAfter = wxpy.wxCallAfter -del wxpy - -def wxCaret_GetBlinkTime(): - """""" - pass - -def wxCaret_SetBlinkTime(): - """""" - pass - -def wxClientDisplayRect(): - """""" - pass - -def wxColourDisplay(): - """""" - pass - -def wxConfigBase_Create(): - """""" - pass - -def wxConfigBase_DontCreateOnDemand(): - """""" - pass - -def wxConfigBase_Get(): - """""" - pass - -def wxConfigBase_Set(): - """""" - pass - -def wxCreateFileTipProvider(): - """""" - pass - -def wxCustomDataFormat(): - """""" - pass - -def wxDLG_PNT(): - """""" - pass - -def wxDLG_SZE(): - """""" - pass - -def wxDateSpan_Day(): - """""" - pass - -def wxDateSpan_Days(): - """""" - pass - -def wxDateSpan_Month(): - """""" - pass - -def wxDateSpan_Months(): - """""" - pass - -def wxDateSpan_Week(): - """""" - pass - -def wxDateSpan_Weeks(): - """""" - pass - -def wxDateSpan_Year(): - """""" - pass - -def wxDateSpan_Years(): - """""" - pass - -def wxDateTimeFromDMY(): - """""" - pass - -def wxDateTimeFromHMS(): - """""" - pass - -def wxDateTimeFromJDN(): - """""" - pass - -def wxDateTimeFromTimeT(): - """""" - pass - -def wxDateTime_ConvertYearToBC(): - """""" - pass - -def wxDateTime_GetAmPmStrings(): - """""" - pass - -def wxDateTime_GetBeginDST(): - """""" - pass - -def wxDateTime_GetCentury(): - """""" - pass - -def wxDateTime_GetCountry(): - """""" - pass - -def wxDateTime_GetCurrentMonth(): - """""" - pass - -def wxDateTime_GetCurrentYear(): - """""" - pass - -def wxDateTime_GetEndDST(): - """""" - pass - -def wxDateTime_GetMonthName(): - """""" - pass - -def wxDateTime_GetNumberOfDaysInMonth(): - """""" - pass - -def wxDateTime_GetNumberOfDaysinYear(): - """""" - pass - -def wxDateTime_GetWeekDayName(): - """""" - pass - -def wxDateTime_IsDSTApplicable(): - """""" - pass - -def wxDateTime_IsLeapYear(): - """""" - pass - -def wxDateTime_IsWestEuropeanCountry(): - """""" - pass - -def wxDateTime_Now(): - """""" - pass - -def wxDateTime_SetCountry(): - """""" - pass - -def wxDateTime_Today(): - """""" - pass - -def wxDateTime_UNow(): - """""" - pass - -def wxDirSelector(): - """""" - pass - -def wxDisplayDepth(): - """""" - pass - -def wxDisplaySize(): - """""" - pass - -def wxDisplaySizeMM(): - """""" - pass - -def wxDragIcon(): - """""" - pass - -def wxDragListItem(): - """""" - pass - -def wxDragString(): - """""" - pass - -def wxDragTreeItem(): - """""" - pass - -def wxEmptyBitmap(): - """""" - pass - -def wxEmptyIcon(): - """""" - pass - -def wxEmptyImage(): - """""" - pass - -def wxEnableTopLevelWindows(): - """""" - pass - -def wxEncodingConverter_GetAllEquivalents(): - """""" - pass - -def wxEncodingConverter_GetPlatformEquivalents(): - """""" - pass - -def wxEndBusyCursor(): - """""" - pass - -def wxExecute(): - """""" - pass - -def wxFileSelector(): - """""" - pass - -def wxFileSystem_AddHandler(): - """""" - pass - -def wxFileSystem_CleanUpHandlers(): - """""" - pass - -def wxFileTypeInfoSequence(): - """""" - pass - -def wxFileType_ExpandCommand(): - """""" - pass - -def wxFindWindowAtPoint(): - """""" - pass - -def wxFindWindowById(id, parent=wx.NULL): - """""" - pass - -def wxFindWindowByLabel(label, parent=wx.NULL): - """""" - pass - -def wxFindWindowByName(name, parent=wx.NULL): - """""" - pass - -def wxFontFromNativeInfo(): - """""" - pass - -def wxFontMapper_Get(): - """""" - pass - -def wxFontMapper_GetDefaultConfigPath(): - """""" - pass - -def wxFontMapper_GetEncodingDescription(): - """""" - pass - -def wxFontMapper_GetEncodingName(): - """""" - pass - -def wxFontMapper_Set(): - """""" - pass - -def wxFont_GetDefaultEncoding(): - """""" - pass - -def wxFont_SetDefaultEncoding(): - """""" - pass - -def wxGenericFindWindowAtPoint(): - """""" - pass - -def wxGetAccelFromString(): - """""" - pass - -def wxGetActiveWindow(): - """""" - pass - -def wxGetApp(): - """""" - pass - -def wxGetClientDisplayRect(): - """""" - pass - -def wxGetCurrentId(): - """""" - pass - -def wxGetCurrentTime(): - """""" - pass - -def wxGetDisplayDepth(): - """""" - pass - -def wxGetDisplaySize(): - """""" - pass - -def wxGetDisplaySizeMM(): - """""" - pass - -def wxGetElapsedTime(): - """""" - pass - -def wxGetEmailAddress(): - """""" - pass - -def wxGetFullHostName(): - """""" - pass - -def wxGetHomeDir(): - """""" - pass - -def wxGetHostName(): - """""" - pass - -def wxGetLocalTime(): - """""" - pass - -def wxGetLocalTimeMillis(): - """""" - pass - -def wxGetLocale(): - """""" - pass - -def wxGetMousePosition(): - """""" - pass - -def wxGetNumberFromUser(): - """""" - pass - -def wxGetOsDescription(): - """""" - pass - -def wxGetOsVersion(): - """""" - pass - -def wxGetPasswordFromUser(): - """""" - pass - -def wxGetProcessId(): - """""" - pass - -def wxGetSingleChoice(): - """""" - pass - -def wxGetSingleChoiceIndex(): - """""" - pass - -def wxGetTextFromUser(): - """""" - pass - -def wxGetTopLevelParent(): - """""" - pass - -def wxGetTranslation(): - """""" - pass - -def wxGetUTCTime(): - """""" - pass - -def wxGetUserHome(): - """""" - pass - -def wxGetUserId(): - """""" - pass - -def wxGetUserName(): - """""" - pass - -def wxIconBundleFromFile(): - """""" - pass - -def wxIconBundleFromIcon(): - """""" - pass - -def wxIconFromBitmap(): - """""" - pass - -def wxIconFromXPMData(): - """""" - pass - -def wxImageFromBitmap(): - """""" - pass - -def wxImageFromData(): - """""" - pass - -def wxImageFromMime(): - """""" - pass - -def wxImageFromStream(): - """""" - pass - -def wxImageFromStreamMime(): - """""" - pass - -def wxImage_AddHandler(): - """""" - pass - -def wxImage_CanRead(): - """""" - pass - -def wxImage_CanReadStream(): - """""" - pass - -def wxImage_GetImageCount(): - """""" - pass - -def wxImage_InsertHandler(): - """""" - pass - -def wxImage_RemoveHandler(): - """""" - pass - -def wxInitAllImageHandlers(): - """""" - pass - -def wxIntersectRect(): - """""" - pass - -def wxIsBusy(): - """""" - pass - -def wxIsDragResultOk(): - """""" - pass - -def wxLoadFileSelector(): - """""" - pass - -def wxLocale_AddCatalogLookupPathPrefix(): - """""" - pass - -def wxLocale_AddLanguage(): - """""" - pass - -def wxLocale_GetLanguageInfo(): - """""" - pass - -def wxLocale_GetSystemEncoding(): - """""" - pass - -def wxLocale_GetSystemEncodingName(): - """""" - pass - -def wxLocale_GetSystemLanguage(): - """""" - pass - -def wxLogDebug(): - """""" - pass - -def wxLogError(): - """""" - pass - -def wxLogFatalError(): - """""" - pass - -def wxLogGeneric(): - """""" - pass - -def wxLogInfo(): - """""" - pass - -def wxLogMessage(): - """""" - pass - -def wxLogStatus(): - """""" - pass - -def wxLogStatusFrame(): - """""" - pass - -def wxLogSysError(): - """""" - pass - -def wxLogTrace(): - """""" - pass - -def wxLogTraceMask(): - """""" - pass - -def wxLogVerbose(): - """""" - pass - -def wxLogWarning(): - """""" - pass - -def wxLog_AddTraceMask(): - """""" - pass - -def wxLog_ClearTraceMasks(): - """""" - pass - -def wxLog_DontCreateOnDemand(): - """""" - pass - -def wxLog_EnableLogging(): - """""" - pass - -def wxLog_FlushActive(): - """""" - pass - -def wxLog_GetActiveTarget(): - """""" - pass - -def wxLog_GetLogLevel(): - """""" - pass - -def wxLog_GetTimestamp(): - """""" - pass - -def wxLog_GetTraceMask(): - """""" - pass - -def wxLog_GetTraceMasks(): - """""" - pass - -def wxLog_IsAllowedTraceMask(): - """""" - pass - -def wxLog_IsEnabled(): - """""" - pass - -def wxLog_OnLog(): - """""" - pass - -def wxLog_RemoveTraceMask(): - """""" - pass - -def wxLog_Resume(): - """""" - pass - -def wxLog_SetActiveTarget(): - """""" - pass - -def wxLog_SetLogLevel(): - """""" - pass - -def wxLog_SetTimestamp(): - """""" - pass - -def wxLog_SetTraceMask(): - """""" - pass - -def wxLog_SetVerbose(): - """""" - pass - -def wxLog_Suspend(): - """""" - pass - -def wxMaskColour(): - """""" - pass - -def wxMemoryDCFromDC(): - """""" - pass - -def wxMemoryFSHandler_AddFile(): - """""" - pass - -def wxMemoryFSHandler_RemoveFile(): - """""" - pass - -def wxMenuItem_GetLabelFromText(): - """""" - pass - -def wxMessageBox(): - """""" - pass - -def wxMimeTypesManager_IsOfType(): - """""" - pass - -def wxMutexGuiEnter(): - """""" - pass - -def wxMutexGuiLeave(): - """""" - pass - -def wxNamedColour(): - """""" - pass - -def wxNamedColour(): - """""" - pass - -def wxNewEventType(): - """""" - pass - -def wxNewId(): - """""" - pass - -def wxNow(): - """""" - pass - -def wxNullFileTypeInfo(): - """""" - pass - -def wxPoint2DDoubleCopy(): - """""" - pass - -def wxPoint2DDoubleFromPoint(): - """""" - pass - -def wxPostEvent(): - """""" - pass - -def wxPostScriptDC_GetResolution(): - """""" - pass - -def wxPostScriptDC_SetResolution(): - """""" - pass - -def wxPreBitmapButton(): - """""" - pass - -def wxPreButton(): - """""" - pass - -def wxPreCheckBox(): - """""" - pass - -def wxPreCheckListBox(): - """""" - pass - -def wxPreChoice(): - """""" - pass - -def wxPreComboBox(): - """""" - pass - -def wxPreControl(): - """""" - pass - -def wxPreDialog(): - """""" - pass - -def wxPreDirFilterListCtrl(): - """""" - pass - -def wxPreFindReplaceDialog(): - """""" - pass - -def wxPreFrame(): - """""" - pass - -def wxPreGauge(): - """""" - pass - -def wxPreGenericDirCtrl(): - """""" - pass - -def wxPreListBox(): - """""" - pass - -def wxPreListCtrl(): - """""" - pass - -def wxPreListView(): - """""" - pass - -def wxPreMDIChildFrame(): - """""" - pass - -def wxPreMDIClientWindow(): - """""" - pass - -def wxPreMDIParentFrame(): - """""" - pass - -def wxPreMiniFrame(): - """""" - pass - -def wxPreNotebook(): - """""" - pass - -def wxPrePanel(): - """""" - pass - -def wxPrePopupTransientWindow(): - """""" - pass - -def wxPrePopupWindow(): - """""" - pass - -def wxPreRadioBox(): - """""" - pass - -def wxPreRadioButton(): - """""" - pass - -def wxPreSashLayoutWindow(): - """""" - pass - -def wxPreSashWindow(): - """""" - pass - -def wxPreScrollBar(): - """""" - pass - -def wxPreScrolledWindow(): - """""" - pass - -def wxPreSingleInstanceChecker(): - """""" - pass - -def wxPreSlider(): - """""" - pass - -def wxPreSpinButton(): - """""" - pass - -def wxPreSpinCtrl(): - """""" - pass - -def wxPreSplitterWindow(): - """""" - pass - -def wxPreStaticBitmap(): - """""" - pass - -def wxPreStaticBox(): - """""" - pass - -def wxPreStaticLine(): - """""" - pass - -def wxPreStaticText(): - """""" - pass - -def wxPreStatusBar(): - """""" - pass - -def wxPreTextCtrl(): - """""" - pass - -def wxPreToggleButton(): - """""" - pass - -def wxPreToolBar(): - """""" - pass - -def wxPreToolBarSimple(): - """""" - pass - -def wxPreTopLevelWindow(): - """""" - pass - -def wxPreTreeCtrl(): - """""" - pass - -def wxPreWindow(): - """""" - pass - -def wxProcess_Exists(): - """""" - pass - -def wxProcess_Kill(): - """""" - pass - -def wxProcess_Open(): - """""" - pass - -def wxPyTypeCast(obj, typeStr): - """This helper function will take a wxPython object and convert it - to another wxPython object type. This will not be able to create - objects that are derived from wxPython classes by the user, only - those that are actually part of wxPython and directly corespond to - C++ objects. - - This is useful in situations where some method returns a generic - type such as wxWindow, but you know that it is actually some - derived type such as a wxTextCtrl. You can't call wxTextCtrl - specific methods on a wxWindow object, but you can use this - function to create a wxTextCtrl object that will pass the same - pointer to the C++ code. You use it like this: - - textCtrl = wxPyTypeCast(window, "wxTextCtrl") - - WARNING: Using this function to type cast objects into types that - they are not is not recommended and is likely to cause - your program to crash... Hard.""" - pass - -def wxPy_isinstance(obj, klasses): - """An isinstance for Python < 2.2 that can check a sequence of - class objects like the one in 2.2 can.""" - pass - -def wxRegionFromPoints(): - """""" - pass - -def wxRegisterId(): - """""" - pass - -## def wxRunLater(callable, *args, **kw): -## """An alias for wxCallAfter.""" -## pass - -wxRunLater = wxCallAfter - -def wxSafeShowMessage(): - """""" - pass - -def wxSafeYield(): - """""" - pass - -def wxSaveFileSelector(): - """""" - pass - -def wxSetCursor(): - """""" - pass - -def wxShell(): - """""" - pass - -def wxShowTip(): - """""" - pass - -def wxShutdown(): - """""" - pass - -def wxSleep(): - """""" - pass - -def wxStartTimer(): - """""" - pass - -def wxStockCursor(): - """""" - pass - -def wxStripMenuCodes(): - """""" - pass - -def wxSysErrorCode(): - """""" - pass - -def wxSysErrorMsg(): - """""" - pass - -def wxSystemSettings_GetColour(): - """""" - pass - -def wxSystemSettings_GetFont(): - """""" - pass - -def wxSystemSettings_GetMetric(): - """""" - pass - -def wxSystemSettings_GetScreenType(): - """""" - pass - -def wxSystemSettings_GetColour(): - """""" - pass - -def wxSystemSettings_GetFont(): - """""" - pass - -def wxSystemSettings_GetMetric(): - """""" - pass - -def wxSystemSettings_HasFeature(): - """""" - pass - -def wxSystemSettings_SetScreenType(): - """""" - pass - -def wxTextAttr_Combine(): - """""" - pass - -def wxThread_IsMain(): - """""" - pass - -def wxTimeSpan_Day(): - """""" - pass - -def wxTimeSpan_Days(): - """""" - pass - -def wxTimeSpan_Hour(): - """""" - pass - -def wxTimeSpan_Hours(): - """""" - pass - -def wxTimeSpan_Minute(): - """""" - pass - -def wxTimeSpan_Minutes(): - """""" - pass - -def wxTimeSpan_Second(): - """""" - pass - -def wxTimeSpan_Seconds(): - """""" - pass - -def wxTimeSpan_Week(): - """""" - pass - -def wxTimeSpan_Weeks(): - """""" - pass - -def wxToolTip_Enable(): - """""" - pass - -def wxToolTip_SetDelay(): - """""" - pass - -def wxUsleep(): - """""" - pass - -def wxValidator_IsSilent(): - """""" - pass - -def wxValidator_SetBellOnError(): - """""" - pass - -def wxWakeUpIdle(): - """""" - pass - -def wxWaveData(): - """""" - pass - -def wxWindow_FindFocus(): - """""" - pass - -def wxWindow_GetCapture(): - """""" - pass - -def wxWindow_NewControlId(): - """""" - pass - -def wxWindow_NextControlId(): - """""" - pass - -def wxWindow_PrevControlId(): - """""" - pass - -def wxYield(): - """""" - pass - -def wxYieldIfNeeded(): - """""" - pass diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxParameters.py b/wxPython/wxPython/lib/PyCrust/decor/wxParameters.py deleted file mode 100644 index 9fd410a9f4..0000000000 --- a/wxPython/wxPython/lib/PyCrust/decor/wxParameters.py +++ /dev/null @@ -1,76 +0,0 @@ -"""Decorator classes for documentation and shell scripting. -""" - -__author__ = "Patrick K. O'Brien " -__cvsid__ = "$Id$" -__revision__ = "$Revision$"[11:-2] - - -# These are not the real wxPython classes. These are Python versions -# for documentation purposes. They are also used to apply docstrings -# to the real wxPython classes, which are SWIG-generated wrappers for -# C-language classes. - - -class Param: - """Used by this module to represent default wxPython parameter values, - including parameter representations like style=wxHSCROLL|wxVSCROLL.""" - - def __init__(self, value=None): - if value is None: - value = self.__class__.__name__ - self.value = value - - def __repr__(self): - return self.value - - def __or__(self, other): - value = '%s|%s' % (self, other) - return self.__class__(value) - - -class NULL(Param): pass -NULL = NULL() - -class wxBOTH(Param): pass -wxBOTH = wxBOTH() - -class wxDefaultPosition(Param): pass -wxDefaultPosition = wxDefaultPosition() - -class wxDefaultSize(Param): pass -wxDefaultSize = wxDefaultSize() - -class wxDefaultValidator(Param): pass -wxDefaultValidator = wxDefaultValidator() - -class wxEVT_NULL(Param): pass -wxEVT_NULL = wxEVT_NULL() - -class wxHSCROLL(Param): pass -wxHSCROLL = wxHSCROLL() - -class wxNullColour(Param): pass -wxNullColour = wxNullColour() - -class wxPyNOTEBOOK_NAME(Param): pass -wxPyNOTEBOOK_NAME = wxPyNOTEBOOK_NAME() - -class wxPyPanelNameStr(Param): pass -wxPyPanelNameStr = wxPyPanelNameStr() - -class wxPySTCNameStr(Param): pass -wxPySTCNameStr = wxPySTCNameStr() - -class wxSIZE_AUTO(Param): pass -wxSIZE_AUTO = wxSIZE_AUTO() - -class wxSIZE_USE_EXISTING(Param): pass -wxSIZE_USE_EXISTING = wxSIZE_USE_EXISTING() - -class wxTAB_TRAVERSAL(Param): pass -wxTAB_TRAVERSAL = wxTAB_TRAVERSAL() - -class wxVSCROLL(Param): pass -wxVSCROLL = wxVSCROLL() - diff --git a/wxPython/wxPython/lib/PyCrust/shell.py b/wxPython/wxPython/lib/PyCrust/shell.py index 816825e7c0..dc20e07401 100644 --- a/wxPython/wxPython/lib/PyCrust/shell.py +++ b/wxPython/wxPython/lib/PyCrust/shell.py @@ -22,13 +22,18 @@ from version import VERSION import dispatcher try: - import decor + import wxd.d_wx except ImportError: from wxPython import wx +else: + from wxd.d_wx import wx + +try: + import wxd.d_stc +except ImportError: from wxPython import stc else: - from decor.decorate import wx - from decor.decorate import stc + from wxd.d_stc import stc try: True @@ -259,6 +264,7 @@ class Shell(stc.wxStyledTextCtrl): # Do this last so the user has complete control over their # environment. They can override anything they want. self.execStartupScript(self.interp.startupScript) + wx.wxCallAfter(self.ScrollToLine, 0) def fontsizer(self, signal): """Receiver for Font* signals.""" @@ -315,7 +321,6 @@ class Shell(stc.wxStyledTextCtrl): self.write(self.interp.introText) except AttributeError: pass - wx.wxCallAfter(self.ScrollToLine, 0) def setBuiltinKeywords(self): """Create pseudo keywords as part of builtins. diff --git a/wxPython/wxPython/lib/PyCrust/version.py b/wxPython/wxPython/lib/PyCrust/version.py index 6e8877b276..54c2eb7348 100644 --- a/wxPython/wxPython/lib/PyCrust/version.py +++ b/wxPython/wxPython/lib/PyCrust/version.py @@ -7,5 +7,5 @@ __author__ = "Patrick K. O'Brien " __cvsid__ = "$Id$" __revision__ = "$Revision$"[11:-2] -VERSION = '0.9a' +VERSION = '0.9b' diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxAccelerators.py b/wxPython/wxPython/lib/PyCrust/wxd/Accelerators.py similarity index 88% rename from wxPython/wxPython/lib/PyCrust/decor/wxAccelerators.py rename to wxPython/wxPython/lib/PyCrust/wxd/Accelerators.py index d877dc1f20..2ab1469239 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxAccelerators.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/Accelerators.py @@ -12,13 +12,21 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -from wxBase import wxObject -import wxParameters as wx +from Base import Object +import Parameters as wx -class wxAcceleratorEntry: +class AcceleratorEntry: """""" + def __init__(self): + """""" + pass + + def __del__(self): + """""" + pass + def GetCommand(self): """""" pass @@ -35,24 +43,16 @@ class wxAcceleratorEntry: """""" pass - def __del__(self): - """""" - pass - def __init__(self): - """""" - pass - - -class wxAcceleratorTable(wxObject): +class AcceleratorTable(Object): """""" - def __del__(self): - """""" - pass - def __init__(self): """""" pass + def __del__(self): + """""" + pass + diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxApp.py b/wxPython/wxPython/lib/PyCrust/wxd/App.py similarity index 88% rename from wxPython/wxPython/lib/PyCrust/decor/wxApp.py rename to wxPython/wxPython/lib/PyCrust/wxd/App.py index c6969d7f92..1aa141a70f 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxApp.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/App.py @@ -12,10 +12,10 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -from wxBase import wxEvtHandler +from Base import EvtHandler -class wxPyApp(wxEvtHandler): +class PyApp(EvtHandler): """Python Application base class. It is used to: @@ -24,13 +24,13 @@ class wxPyApp(wxEvtHandler): - implement the windowing system message or event loop; - - initiate application processing via wxApp.OnInit; + - initiate application processing via App.OnInit; - allow default processing of events not handled by other objects in the application.""" def __init__(self): - """Create a wxPyApp instance.""" + """Create a PyApp instance.""" pass def __del__(self): @@ -84,7 +84,7 @@ class wxPyApp(wxEvtHandler): def GetTopWindow(self): """Return the top window. - If the top window hasn't been set using wxApp.SetTopWindow, + If the top window hasn't been set using App.SetTopWindow, this method will find the first top-level window (frame or dialog) and return that.""" pass @@ -100,7 +100,7 @@ class wxPyApp(wxEvtHandler): def Initialized(self): """Return True if the application has been initialized - (i.e. if wxApp.OnInit has returned successfully). This can be + (i.e. if App.OnInit has returned successfully). This can be useful for error message routines to determine which method of output is best for the current state of the program (some windowing systems may not like dialogs to pop up before the @@ -118,7 +118,7 @@ class wxPyApp(wxEvtHandler): def OnAssert(self, file, line, cond, msg): """Called when an assert failure occurs, i.e. the condition - specified in wxASSERT macro evaluated to FALSE. It is only + specified in ASSERT macro evaluated to FALSE. It is only called in debug mode (when __WXDEBUG__ is defined) as asserts are not left in the release code at all. @@ -132,8 +132,8 @@ class wxPyApp(wxEvtHandler): cond is the condition of the failed assert in string form - msg is the message specified as argument to wxASSERT_MSG or - wxFAIL_MSG, will be NULL if just wxASSERT or wxFAIL was used""" + msg is the message specified as argument to ASSERT_MSG or + FAIL_MSG, will be NULL if just ASSERT or FAIL was used""" pass def OnExit(self): @@ -146,7 +146,7 @@ class wxPyApp(wxEvtHandler): def OnInit(self): """This must be provided by the application, and will usually create the application's main window, optionally calling - wxApp.SetTopWindow. + App.SetTopWindow. Return True to continue processing, False to exit the application.""" @@ -174,8 +174,8 @@ class wxPyApp(wxEvtHandler): def SetAssertMode(self, mode): """Lets you control how C++ assertions are processed. - Valid modes are: wxPYAPP_ASSERT_SUPPRESS, - wxPYAPP_ASSERT_EXCEPTION, and wxPYAPP_ASSERT_DIALOG. Using + Valid modes are: PYAPP_ASSERT_SUPPRESS, + PYAPP_ASSERT_EXCEPTION, and PYAPP_ASSERT_DIALOG. Using _SUPPRESS will give you behavior like the old final builds and the assert will be ignored, _EXCEPTION is the new default described above, and _DIALOG is like the default in 2.3.3.1 @@ -208,7 +208,7 @@ class wxPyApp(wxEvtHandler): def SetTopWindow(self, window): """Set the 'top' window. - You can call this from within wxApp.OnInit to let wxWindows + You can call this from within App.OnInit to let wxWindows know which is the main window. You don't have to set the top window; it is only a convenience so that (for example) certain dialogs without parents can use a specific window as the top @@ -226,7 +226,7 @@ class wxPyApp(wxEvtHandler): mode. Note that this function has to be called in the constructor of - the wxApp instance and won't have any effect when called later + the App instance and won't have any effect when called later on. This function currently only has effect under GTK.""" @@ -249,7 +249,7 @@ class wxPyApp(wxEvtHandler): the user to perform actions which are not compatible with the current task. Disabling menu items or whole menus during processing can avoid unwanted reentrance of code: see - wx.wxSafeYield for a better function. + wx.SafeYield for a better function. Calling Yield() recursively is normally an error and an assert failure is raised in debug build if such situation is @@ -258,7 +258,7 @@ class wxPyApp(wxEvtHandler): pass -class wxApp(wxPyApp): +class App(PyApp): """The main application class. Inherit from this class and implement an OnInit method that @@ -316,29 +316,29 @@ class wxApp(wxPyApp): ## sys.stdout, sys.stderr = self.saveStdio -class wxPyOnDemandOutputWindow: - """Used by wxApp to display stdout and stderr messages if app is - created using wxApp(redirect=True). Mostly useful on Windows or +class PyOnDemandOutputWindow: + """Used by App to display stdout and stderr messages if app is + created using App(redirect=True). Mostly useful on Windows or Mac where apps aren't always launched from the command line.""" pass -class wxPySimpleApp(wxApp): - """Use instead of wxApp for simple apps with a simple frame or +class PySimpleApp(App): + """Use instead of App for simple apps with a simple frame or dialog, particularly for testing.""" def __init__(self, flag=0): - """Create a wxPySimpleApp instance. + """Create a PySimpleApp instance. - flag is the same as wxApp's redirect parameter to redirect stdio.""" + flag is the same as App's redirect parameter to redirect stdio.""" pass def OnInit(self): - """Automatically does a wxInitAllImageHandlers().""" + """Automatically does a wx.InitAllImageHandlers().""" pass -class wxPyWidgetTester(wxApp): +class PyWidgetTester(App): """""" def __init__(self): @@ -354,7 +354,7 @@ class wxPyWidgetTester(wxApp): pass -class wxSingleInstanceChecker: +class SingleInstanceChecker: """""" def __init__(self): diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxBase.py b/wxPython/wxPython/lib/PyCrust/wxd/Base.py similarity index 86% rename from wxPython/wxPython/lib/PyCrust/decor/wxBase.py rename to wxPython/wxPython/lib/PyCrust/wxd/Base.py index e2133a47b3..bf2af301d0 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxBase.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/Base.py @@ -12,18 +12,18 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -import wxParameters as wx +import Parameters as wx -class wxObject: +class Object: """Base class for all other wxPython classes.""" def __init__(self): - """Create a wxObject instance.""" + """Create a Object instance.""" pass def Destroy(self): - """Destroy the wxObject instance.""" + """Destroy the Object instance.""" pass def GetClassName(self): @@ -31,7 +31,7 @@ class wxObject: pass -class wxEvtHandler(wxObject): +class EvtHandler(Object): """Base class that can handle events from the windowing system. If the handler is part of a chain, the destructor will unlink @@ -39,7 +39,7 @@ class wxEvtHandler(wxObject): point to each other.""" def __init__(self): - """Create a wxEvtHandler instance.""" + """Create a EvtHandler instance.""" pass def _setOORInfo(self): @@ -61,7 +61,7 @@ class wxEvtHandler(wxObject): A copy of event is made by the function, so the original can be deleted as soon as function returns (it is common that the original is created on the stack). This requires that the - wxEvent::Clone method be implemented by event so that it can + Event::Clone method be implemented by event so that it can be duplicated and stored until it gets processed. This is also the method to call for inter-thread @@ -75,7 +75,7 @@ class wxEvtHandler(wxObject): This method automatically wakes up idle handling if the underlying window system is currently idle and thus would not send any idle events. (Waking up idle handling is done - calling wxWakeUpIdle.)""" + calling WakeUpIdle.)""" pass def Connect(self, id, lastId, eventType, func): @@ -97,12 +97,12 @@ class wxEvtHandler(wxObject): userData is data to be associated with the event table entry.""" pass - def Disconnect(self, id, lastId=-1, eventType=wx.wxEVT_NULL): + def Disconnect(self, id, lastId=-1, eventType=wx.EVT_NULL): """Disconnects the given function dynamically from the event handler, using the specified parameters as search criteria and returning True if a matching function has been found and removed. This method can only disconnect functions which have - been added using the wxEvtHandler.Connect method. There is no + been added using the EvtHandler.Connect method. There is no way to disconnect functions connected using the (static) event tables. @@ -137,7 +137,7 @@ class wxEvtHandler(wxObject): """Processes an event, searching event tables and calling zero or more suitable event handler function(s). Return True if a suitable event handler function was found and executed, and - the function did not call wxEvent.Skip(). + the function did not call Event.Skip(). event is an Event to process. @@ -157,17 +157,17 @@ class wxEvtHandler(wxObject): potential event handlers. When an event reaches a frame, ProcessEvent will need to be called on the associated document and view in case event handler functions are associated with - these objects. The property classes library (wxProperty) also + these objects. The property classes library (Property) also overrides ProcessEvent for similar reasons. The normal order of event table searching is as follows: 1. If the object is disabled (via a call to - wxEvtHandler.SetEvtHandlerEnabled) the function skips to step + EvtHandler.SetEvtHandlerEnabled) the function skips to step (6). - 2. If the object is a wxWindow, ProcessEvent is recursively - called on the window's wxValidator. If this returns TRUE, the + 2. If the object is a Window, ProcessEvent is recursively + called on the window's Validator. If this returns TRUE, the function exits. 3. SearchEventTable is called for this event handler. If this @@ -179,16 +179,16 @@ class wxEvtHandler(wxObject): handlers (usually the chain has a length of one). If this succeeds, the function exits. - 5. If the object is a wxWindow and the event is a - wxCommandEvent, ProcessEvent is recursively applied to the + 5. If the object is a Window and the event is a + CommandEvent, ProcessEvent is recursively applied to the parent window's event handler. If this returns TRUE, the function exits. - 6. Finally, ProcessEvent is called on the wxApp object. + 6. Finally, ProcessEvent is called on the App object. See also: - wxEvtHandler::SearchEventTable""" + EvtHandler::SearchEventTable""" pass def SetEvtHandlerEnabled(self, enabled): diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxClipDragDrop.py b/wxPython/wxPython/lib/PyCrust/wxd/ClipDragDrop.py similarity index 88% rename from wxPython/wxPython/lib/PyCrust/decor/wxClipDragDrop.py rename to wxPython/wxPython/lib/PyCrust/wxd/ClipDragDrop.py index 3d6f03630d..cae61264a2 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxClipDragDrop.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/ClipDragDrop.py @@ -12,11 +12,11 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -from wxBase import wxObject -import wxParameters as wx +from Base import Object +import Parameters as wx -class wxClipboard(wxObject): +class Clipboard(Object): """""" def AddData(self): @@ -64,7 +64,7 @@ class wxClipboard(wxObject): pass -class wxDataFormat: +class DataFormat: """""" def GetId(self): @@ -92,7 +92,7 @@ class wxDataFormat: pass -class wxDataObject: +class DataObject: """""" def GetAllFormats(self): @@ -132,7 +132,7 @@ class wxDataObject: pass -class wxDataObjectComposite(wxDataObject): +class DataObjectComposite(DataObject): """""" def Add(self): @@ -144,7 +144,7 @@ class wxDataObjectComposite(wxDataObject): pass -class wxDataObjectSimple(wxDataObject): +class DataObjectSimple(DataObject): """""" def GetFormat(self): @@ -160,7 +160,7 @@ class wxDataObjectSimple(wxDataObject): pass -class wxPyDataObjectSimple(wxDataObjectSimple): +class PyDataObjectSimple(DataObjectSimple): """""" def __init__(self): @@ -172,7 +172,7 @@ class wxPyDataObjectSimple(wxDataObjectSimple): pass -class wxBitmapDataObject(wxDataObjectSimple): +class BitmapDataObject(DataObjectSimple): """""" def GetBitmap(self): @@ -188,7 +188,7 @@ class wxBitmapDataObject(wxDataObjectSimple): pass -class wxPyBitmapDataObject(wxBitmapDataObject): +class PyBitmapDataObject(BitmapDataObject): """""" def __init__(self): @@ -200,7 +200,7 @@ class wxPyBitmapDataObject(wxBitmapDataObject): pass -class wxCustomDataObject(wxDataObjectSimple): +class CustomDataObject(DataObjectSimple): """""" def GetData(self): @@ -224,7 +224,7 @@ class wxCustomDataObject(wxDataObjectSimple): pass -class wxDragImage(wxObject): +class DragImage(Object): """""" def BeginDrag(self): @@ -272,7 +272,7 @@ class wxDragImage(wxObject): pass -class wxDropSource: +class DropSource: """""" def DoDragDrop(self): @@ -308,7 +308,7 @@ class wxDropSource: pass -class wxDropTarget: +class DropTarget: """""" def __init__(self): @@ -316,7 +316,7 @@ class wxDropTarget: pass -class wxPyDropTarget(wxDropTarget): +class PyDropTarget(DropTarget): """""" def GetData(self): @@ -360,7 +360,7 @@ class wxPyDropTarget(wxDropTarget): pass -class wxFileDataObject(wxDataObjectSimple): +class FileDataObject(DataObjectSimple): """""" def GetFilenames(self): @@ -372,7 +372,7 @@ class wxFileDataObject(wxDataObjectSimple): pass -class wxFileDropTarget(wxPyDropTarget): +class FileDropTarget(PyDropTarget): """""" def __init__(self): @@ -404,7 +404,7 @@ class wxFileDropTarget(wxPyDropTarget): pass -class wxTextDataObject(wxDataObjectSimple): +class TextDataObject(DataObjectSimple): """""" def GetText(self): @@ -424,7 +424,7 @@ class wxTextDataObject(wxDataObjectSimple): pass -class wxPyTextDataObject(wxTextDataObject): +class PyTextDataObject(TextDataObject): """""" def __init__(self): @@ -436,7 +436,7 @@ class wxPyTextDataObject(wxTextDataObject): pass -class wxTextDropTarget(wxPyDropTarget): +class TextDropTarget(PyDropTarget): """""" def __init__(self): @@ -468,7 +468,7 @@ class wxTextDropTarget(wxPyDropTarget): pass -class wxURLDataObject(wxDataObjectComposite): +class URLDataObject(DataObjectComposite): """""" def GetURL(self): diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxConfig.py b/wxPython/wxPython/lib/PyCrust/wxd/Config.py similarity index 96% rename from wxPython/wxPython/lib/PyCrust/decor/wxConfig.py rename to wxPython/wxPython/lib/PyCrust/wxd/Config.py index 354fbc0572..1ef8602f05 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxConfig.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/Config.py @@ -12,10 +12,10 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -import wxParameters as wx +import Parameters as wx -class wxConfigBase: +class ConfigBase: """""" def DeleteAll(self): @@ -175,7 +175,7 @@ class wxConfigBase: pass -class wxConfig(wxConfigBase): +class Config(ConfigBase): """""" def __del__(self): @@ -187,7 +187,7 @@ class wxConfig(wxConfigBase): pass -class wxFileConfig(wxConfigBase): +class FileConfig(ConfigBase): """""" def __del__(self): diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxControls.py b/wxPython/wxPython/lib/PyCrust/wxd/Controls.py similarity index 90% rename from wxPython/wxPython/lib/PyCrust/decor/wxControls.py rename to wxPython/wxPython/lib/PyCrust/wxd/Controls.py index 6acd812ee9..9d1d77983a 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxControls.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/Controls.py @@ -12,32 +12,32 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -from wxBase import wxObject -import wxParameters as wx -from wxWindow import wxWindow +from Base import Object +import Parameters as wx +from Window import Window -class wxControl(wxWindow): +class Control(Window): """Base class for a control or 'widget'. A control is generally a small window which processes user input and/or displays one or more item of data.""" - def __init__(self, parent, id, pos=wx.wxDefaultPosition, - size=wx.wxDefaultSize, style=0, - validator=wx.wxDefaultValidator, name='control'): - """Create a wxControl instance.""" + def __init__(self, parent, id, pos=wx.DefaultPosition, + size=wx.DefaultSize, style=0, + validator=wx.DefaultValidator, name='control'): + """Create a Control instance.""" pass def Command(self, event): """Simulates the effect of the user issuing a command to the - item. See wxCommandEvent.""" + item. See CommandEvent.""" pass - def Create(self, parent, id, pos=wx.wxDefaultPosition, - size=wx.wxDefaultSize, style=0, - validator=wx.wxDefaultValidator, name='control'): - """Create a wxControl instance.""" + def Create(self, parent, id, pos=wx.DefaultPosition, + size=wx.DefaultSize, style=0, + validator=wx.DefaultValidator, name='control'): + """Create a Control instance.""" pass def GetLabel(self): @@ -49,7 +49,7 @@ class wxControl(wxWindow): pass -class wxPyControl(wxControl): +class PyControl(Control): """""" def __init__(self): @@ -133,7 +133,7 @@ class wxPyControl(wxControl): pass -class wxControlWithItems(wxControl): +class ControlWithItems(Control): """""" def Append(self): @@ -193,7 +193,7 @@ class wxControlWithItems(wxControl): pass -class wxButton(wxControl): +class Button(Control): """A button is a control that contains a text string, and is one of the most common elements of a GUI. It may be placed on a dialog box or panel, or indeed almost any other window. @@ -201,16 +201,16 @@ class wxButton(wxControl): Styles ------ - wxBU_LEFT: Left-justifies the label. WIN32 only. + BU_LEFT: Left-justifies the label. WIN32 only. - wxBU_TOP: Aligns the label to the top of the button. WIN32 only. + BU_TOP: Aligns the label to the top of the button. WIN32 only. - wxBU_RIGHT: Right-justifies the bitmap label. WIN32 only. + BU_RIGHT: Right-justifies the bitmap label. WIN32 only. - wxBU_BOTTOM: Aligns the label to the bottom of the button. WIN32 + BU_BOTTOM: Aligns the label to the bottom of the button. WIN32 only. - wxBU_EXACTFIT: Creates the button as small as possible instead of + BU_EXACTFIT: Creates the button as small as possible instead of making it of the standard size (which is the default behaviour.) Events @@ -218,9 +218,9 @@ class wxButton(wxControl): EVT_BUTTON(win,id,func): Sent when the button is clicked.""" - def __init__(self, parent, id, label, pos=wx.wxDefaultPosition, - size=wx.wxDefaultSize, style=0, - validator=wx.wxDefaultValidator, name='button'): + def __init__(self, parent, id, label, pos=wx.DefaultPosition, + size=wx.DefaultSize, style=0, + validator=wx.DefaultValidator, name='button'): """Create and show a button. parent: Parent window. Must not be None. @@ -229,14 +229,14 @@ class wxButton(wxControl): pos: The button position on it's parent. size: Button size. If the default size (-1, -1) is specified then the button is sized appropriately for the text. - style: Window style. See wxButton. + style: Window style. See Button. validator: Window validator. name: Window name.""" pass - def Create(self, parent, id, label, pos=wx.wxDefaultPosition, - size=wx.wxDefaultSize, style=0, - validator=wx.wxDefaultValidator, name='button'): + def Create(self, parent, id, label, pos=wx.DefaultPosition, + size=wx.DefaultSize, style=0, + validator=wx.DefaultValidator, name='button'): """Create and show a button.""" pass @@ -251,9 +251,9 @@ class wxButton(wxControl): Under Windows, only dialog box buttons respond to this function. As normal under Windows and Motif, pressing return causes the default button to be depressed when the return key - is pressed. See also wxWindow.SetFocus which sets the keyboard + is pressed. See also Window.SetFocus which sets the keyboard focus for windows and text panel items, and - wxPanel.SetDefaultItem.""" + Panel.SetDefaultItem.""" pass def SetForegroundColour(self): @@ -261,7 +261,7 @@ class wxButton(wxControl): pass -class wxBitmapButton(wxButton): +class BitmapButton(Button): """""" def Create(self): @@ -317,7 +317,7 @@ class wxBitmapButton(wxButton): pass -class wxCheckBox(wxControl): +class CheckBox(Control): """""" def __init__(self): @@ -341,7 +341,7 @@ class wxCheckBox(wxControl): pass -class wxChoice(wxControlWithItems): +class Choice(ControlWithItems): """""" def __init__(self): @@ -381,7 +381,7 @@ class wxChoice(wxControlWithItems): pass -class wxGauge(wxControl): +class Gauge(Control): """""" def Create(self): @@ -425,7 +425,7 @@ class wxGauge(wxControl): pass -class wxGenericDirCtrl(wxControl): +class GenericDirCtrl(Control): """""" def Create(self): @@ -497,7 +497,7 @@ class wxGenericDirCtrl(wxControl): pass -class wxListBox(wxControlWithItems): +class ListBox(ControlWithItems): """""" def Clear(self): @@ -557,7 +557,7 @@ class wxListBox(wxControlWithItems): pass -class wxCheckListBox(wxListBox): +class CheckListBox(ListBox): """""" def __init__(self): @@ -593,7 +593,7 @@ class wxCheckListBox(wxListBox): pass -class wxListCtrl(wxControl): +class ListCtrl(Control): """""" def Append(self): @@ -889,7 +889,7 @@ class wxListCtrl(wxControl): pass -class wxListItem(wxObject): +class ListItem(Object): """""" def Clear(self): @@ -1025,7 +1025,7 @@ class wxListItem(wxObject): pass -class wxListItemAttr: +class ListItemAttr: """""" def GetBackgroundColour(self): @@ -1069,7 +1069,7 @@ class wxListItemAttr: pass -class wxListView(wxListCtrl): +class ListView(ListCtrl): """""" def ClearColumnImage(self): @@ -1113,10 +1113,10 @@ class wxListView(wxListCtrl): pass -class wxNotebook(wxControl): +class Notebook(Control): - def __init__(self, parent, id, pos=wx.wxDefaultPosition, - size=wx.wxDefaultSize, style=0, name=wx.wxPyNOTEBOOK_NAME): + def __init__(self, parent, id, pos=wx.DefaultPosition, + size=wx.DefaultSize, style=0, name=wx.PyNOTEBOOK_NAME): """""" pass @@ -1132,8 +1132,8 @@ class wxNotebook(wxControl): """""" pass - def Create(self, parent, id, pos=wx.wxDefaultPosition, - size=wx.wxDefaultSize, style=0, name=wx.wxPyNOTEBOOK_NAME): + def Create(self, parent, id, pos=wx.DefaultPosition, + size=wx.DefaultSize, style=0, name=wx.PyNOTEBOOK_NAME): """""" pass @@ -1210,7 +1210,7 @@ class wxNotebook(wxControl): pass -class wxRadioBox(wxControl): +class RadioBox(Control): """""" def Create(self): @@ -1278,7 +1278,7 @@ class wxRadioBox(wxControl): pass -class wxRadioButton(wxControl): +class RadioButton(Control): """""" def Create(self): @@ -1298,7 +1298,7 @@ class wxRadioButton(wxControl): pass -class wxScrollBar(wxControl): +class ScrollBar(Control): """""" def Create(self): @@ -1342,7 +1342,7 @@ class wxScrollBar(wxControl): pass -class wxSlider(wxControl): +class Slider(Control): """""" def ClearSel(self): @@ -1430,7 +1430,7 @@ class wxSlider(wxControl): pass -class wxSpinButton(wxControl): +class SpinButton(Control): """""" def Create(self): @@ -1462,7 +1462,7 @@ class wxSpinButton(wxControl): pass -class wxSpinCtrl(wxSpinButton): +class SpinCtrl(SpinButton): """""" def Create(self): @@ -1494,7 +1494,7 @@ class wxSpinCtrl(wxSpinButton): pass -class wxStaticBitmap(wxControl): +class StaticBitmap(Control): """""" def Create(self): @@ -1518,7 +1518,7 @@ class wxStaticBitmap(wxControl): pass -class wxStaticBox(wxControl): +class StaticBox(Control): """""" def Create(self): @@ -1530,7 +1530,7 @@ class wxStaticBox(wxControl): pass -class wxStaticLine(wxControl): +class StaticLine(Control): """""" def Create(self): @@ -1542,7 +1542,7 @@ class wxStaticLine(wxControl): pass -class wxStaticText(wxControl): +class StaticText(Control): """""" def Create(self): @@ -1562,7 +1562,7 @@ class wxStaticText(wxControl): pass -class wxTextAttr: +class TextAttr: """""" def GetBackgroundColour(self): @@ -1614,7 +1614,7 @@ class wxTextAttr: pass -class wxTextCtrl(wxControl): +class TextCtrl(Control): """""" def AppendText(self): @@ -1814,7 +1814,7 @@ class wxTextCtrl(wxControl): pass -class wxToggleButton(wxControl): +class ToggleButton(Control): """""" def Create(self): diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxDataStructures.py b/wxPython/wxPython/lib/PyCrust/wxd/DataStructures.py similarity index 98% rename from wxPython/wxPython/lib/PyCrust/decor/wxDataStructures.py rename to wxPython/wxPython/lib/PyCrust/wxd/DataStructures.py index 43c6158909..59e533ea3c 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxDataStructures.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/DataStructures.py @@ -12,10 +12,10 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -import wxParameters as wx +import Parameters as wx -class wxPoint: +class Point: """""" def Set(self): @@ -79,7 +79,7 @@ class wxPoint: pass -class wxPoint2DDouble: +class Point2DDouble: """""" def GetCrossProduct(self): @@ -195,7 +195,7 @@ class wxPoint2DDouble: pass -class wxRealPoint: +class RealPoint: """""" def Set(self): @@ -259,7 +259,7 @@ class wxRealPoint: pass -class wxRect: +class Rect: """""" def GetBottom(self): @@ -403,7 +403,7 @@ class wxRect: pass -class wxSize: +class Size: """""" def GetHeight(self): diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxDateTime.py b/wxPython/wxPython/lib/PyCrust/wxd/DateTime.py similarity index 98% rename from wxPython/wxPython/lib/PyCrust/decor/wxDateTime.py rename to wxPython/wxPython/lib/PyCrust/wxd/DateTime.py index 351ad7a3d1..a6fb8d7fdd 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxDateTime.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/DateTime.py @@ -8,10 +8,10 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -import wxParameters as wx +import Parameters as wx -class wxDateSpan: +class DateSpan: """""" def Add(self): @@ -95,7 +95,7 @@ class wxDateSpan: pass -class wxDateTime: +class DateTime: """""" def AddDS(self): @@ -443,7 +443,7 @@ class wxDateTime: pass -class wxTimeSpan: +class TimeSpan: """""" def Abs(self): diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxDialogs.py b/wxPython/wxPython/lib/PyCrust/wxd/Dialogs.py similarity index 90% rename from wxPython/wxPython/lib/PyCrust/decor/wxDialogs.py rename to wxPython/wxPython/lib/PyCrust/wxd/Dialogs.py index 4cf37b62ca..56ca3c2d17 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxDialogs.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/Dialogs.py @@ -12,13 +12,13 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -from wxBase import wxObject -from wxFrames import wxFrame -import wxParameters as wx -from wxWindow import wxTopLevelWindow +from Base import Object +from Frames import Frame +import Parameters as wx +from Window import TopLevelWindow -class wxDialog(wxTopLevelWindow): +class Dialog(TopLevelWindow): """""" def Centre(self): @@ -66,7 +66,7 @@ class wxDialog(wxTopLevelWindow): pass -class wxColourDialog(wxDialog): +class ColourDialog(Dialog): """""" def GetColourData(self): @@ -82,7 +82,7 @@ class wxColourDialog(wxDialog): pass -class wxColourData(wxObject): +class ColourData(Object): """""" def GetChooseFull(self): @@ -118,7 +118,7 @@ class wxColourData(wxObject): pass -class wxColourDatabase(wxObject): +class ColourDatabase(Object): """""" def Append(self): @@ -138,7 +138,7 @@ class wxColourDatabase(wxObject): pass -class wxDirDialog(wxDialog): +class DirDialog(Dialog): """""" def GetMessage(self): @@ -170,7 +170,7 @@ class wxDirDialog(wxDialog): pass -class wxFileDialog(wxDialog): +class FileDialog(Dialog): """""" def GetDirectory(self): @@ -246,7 +246,7 @@ class wxFileDialog(wxDialog): pass -class wxFindReplaceDialog(wxDialog): +class FindReplaceDialog(Dialog): """""" def Create(self): @@ -266,7 +266,7 @@ class wxFindReplaceDialog(wxDialog): pass -class wxFindReplaceData(wxObject): +class FindReplaceData(Object): """""" def GetFindString(self): @@ -302,7 +302,7 @@ class wxFindReplaceData(wxObject): pass -class wxFontDialog(wxDialog): +class FontDialog(Dialog): """""" def GetFontData(self): @@ -318,7 +318,7 @@ class wxFontDialog(wxDialog): pass -class wxFontData(wxObject): +class FontData(Object): """""" def EnableEffects(self): @@ -382,7 +382,7 @@ class wxFontData(wxObject): pass -class wxMessageDialog(wxDialog): +class MessageDialog(Dialog): """""" def ShowModal(self): @@ -395,7 +395,7 @@ class wxMessageDialog(wxDialog): -class wxMultiChoiceDialog(wxDialog): +class MultiChoiceDialog(Dialog): """""" def GetSelections(self): @@ -411,7 +411,7 @@ class wxMultiChoiceDialog(wxDialog): pass -class wxProgressDialog(wxFrame): +class ProgressDialog(Frame): """""" def Resume(self): @@ -427,7 +427,7 @@ class wxProgressDialog(wxFrame): pass -class wxSingleChoiceDialog(wxDialog): +class SingleChoiceDialog(Dialog): """""" def GetSelection(self): @@ -451,7 +451,7 @@ class wxSingleChoiceDialog(wxDialog): pass -class wxTextEntryDialog(wxDialog): +class TextEntryDialog(Dialog): """""" def GetValue(self): diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxDrawing.py b/wxPython/wxPython/lib/PyCrust/wxd/Drawing.py similarity index 95% rename from wxPython/wxPython/lib/PyCrust/decor/wxDrawing.py rename to wxPython/wxPython/lib/PyCrust/wxd/Drawing.py index 00b91467e2..a6819f532c 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxDrawing.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/Drawing.py @@ -12,11 +12,11 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -from wxBase import wxObject -import wxParameters as wx +from Base import Object +import Parameters as wx -class wxDC(wxObject): +class DC(Object): """""" def BeginDrawing(self): @@ -408,7 +408,7 @@ class wxDC(wxObject): pass -class wxClientDC(wxDC): +class ClientDC(DC): """""" def __init__(self): @@ -416,7 +416,7 @@ class wxClientDC(wxDC): pass -class wxMemoryDC(wxDC): +class MemoryDC(DC): """""" def SelectObject(self): @@ -428,7 +428,7 @@ class wxMemoryDC(wxDC): pass -class wxBufferedDC(wxMemoryDC): +class BufferedDC(MemoryDC): """""" def UnMask(self): @@ -440,7 +440,7 @@ class wxBufferedDC(wxMemoryDC): pass -class wxBufferedPaintDC(wxBufferedDC): +class BufferedPaintDC(BufferedDC): """""" def __init__(self): @@ -448,7 +448,7 @@ class wxBufferedPaintDC(wxBufferedDC): pass -class wxPaintDC(wxDC): +class PaintDC(DC): """""" def __init__(self): @@ -456,7 +456,7 @@ class wxPaintDC(wxDC): pass -class wxPostScriptDC(wxDC): +class PostScriptDC(DC): """""" def GetPrintData(self): @@ -472,7 +472,7 @@ class wxPostScriptDC(wxDC): pass -class wxScreenDC(wxDC): +class ScreenDC(DC): """""" def EndDrawingOnTop(self): @@ -492,7 +492,7 @@ class wxScreenDC(wxDC): pass -class wxWindowDC(wxDC): +class WindowDC(DC): """""" def __init__(self): @@ -500,7 +500,7 @@ class wxWindowDC(wxDC): pass -class wxGDIObject(wxObject): +class GDIObject(Object): """""" def GetVisible(self): @@ -524,7 +524,7 @@ class wxGDIObject(wxObject): pass -class wxBitmap(wxGDIObject): +class Bitmap(GDIObject): """""" def CopyFromIcon(self): @@ -592,7 +592,7 @@ class wxBitmap(wxGDIObject): pass -class wxBrush(wxGDIObject): +class Brush(GDIObject): """""" def GetColour(self): @@ -632,7 +632,7 @@ class wxBrush(wxGDIObject): pass -class wxBrushList(wxObject): +class BrushList(Object): """""" def AddBrush(self): @@ -656,7 +656,7 @@ class wxBrushList(wxObject): pass -class wxColour(wxObject): +class Colour(Object): """""" def Blue(self): @@ -712,7 +712,7 @@ class wxColour(wxObject): pass -class wxCursor(wxGDIObject): +class Cursor(GDIObject): """""" def Ok(self): @@ -728,7 +728,7 @@ class wxCursor(wxGDIObject): pass -class wxFont(wxObject): +class Font(Object): """""" def GetEncoding(self): @@ -848,7 +848,7 @@ class wxFont(wxObject): pass -class wxFontList(wxObject): +class FontList(Object): """""" def AddFont(self): @@ -872,7 +872,7 @@ class wxFontList(wxObject): pass -class wxIcon(wxGDIObject): +class Icon(GDIObject): """""" def CopyFromBitmap(self): @@ -920,7 +920,7 @@ class wxIcon(wxGDIObject): pass -class wxIconBundle: +class IconBundle: """""" def AddIcon(self): @@ -944,7 +944,7 @@ class wxIconBundle: pass -class wxImage(wxObject): +class Image(Object): """""" def ConvertToBitmap(self): @@ -1132,7 +1132,7 @@ class wxImage(wxObject): pass -class wxImageList(wxObject): +class ImageList(Object): """""" def Add(self): @@ -1180,7 +1180,7 @@ class wxImageList(wxObject): pass -class wxMask(wxObject): +class Mask(Object): """""" def Destroy(self): @@ -1192,7 +1192,7 @@ class wxMask(wxObject): pass -class wxPalette(wxGDIObject): +class Palette(GDIObject): """""" def GetPixel(self): @@ -1216,7 +1216,7 @@ class wxPalette(wxGDIObject): pass -class wxPen(wxGDIObject): +class Pen(GDIObject): """""" def GetCap(self): @@ -1280,7 +1280,7 @@ class wxPen(wxGDIObject): pass -class wxPenList(wxObject): +class PenList(Object): """""" def AddPen(self): @@ -1304,7 +1304,7 @@ class wxPenList(wxObject): pass -class wxPyPen(wxPen): +class PyPen(Pen): """""" def SetDashes(self): @@ -1320,7 +1320,7 @@ class wxPyPen(wxPen): pass -class wxRegion(wxGDIObject): +class Region(GDIObject): """""" def Clear(self): @@ -1412,7 +1412,7 @@ class wxRegion(wxGDIObject): pass -class wxRegionIterator(wxObject): +class RegionIterator(Object): """""" def GetH(self): diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxErrors.py b/wxPython/wxPython/lib/PyCrust/wxd/Errors.py similarity index 89% rename from wxPython/wxPython/lib/PyCrust/decor/wxErrors.py rename to wxPython/wxPython/lib/PyCrust/wxd/Errors.py index 5d759c2386..e1b5fea2bd 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxErrors.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/Errors.py @@ -12,12 +12,12 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -class wxPyAssertionError(AssertionError): +class PyAssertionError(AssertionError): """""" pass -class wxPyDeadObjectError(AttributeError): +class PyDeadObjectError(AttributeError): """Instances of wx objects that are OOR capable will have their __class__ attribute changed to a _wxPyDeadObject class when the C++ object is deleted. Subsequent attempts to access object diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxEventFunctions.py b/wxPython/wxPython/lib/PyCrust/wxd/EventFunctions.py similarity index 100% rename from wxPython/wxPython/lib/PyCrust/decor/wxEventFunctions.py rename to wxPython/wxPython/lib/PyCrust/wxd/EventFunctions.py diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxEvents.py b/wxPython/wxPython/lib/PyCrust/wxd/Events.py similarity index 89% rename from wxPython/wxPython/lib/PyCrust/decor/wxEvents.py rename to wxPython/wxPython/lib/PyCrust/wxd/Events.py index 40e33fd81c..c9e5a642e3 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxEvents.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/Events.py @@ -12,11 +12,11 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -from wxBase import wxObject -import wxParameters as wx +from Base import Object +import Parameters as wx -class wxEvent(wxObject): +class Event(Object): """""" def __init__(self): @@ -68,7 +68,7 @@ class wxEvent(wxObject): pass -class wxPyEvent(wxEvent): +class PyEvent(Event): """""" def GetSelf(self): @@ -88,7 +88,7 @@ class wxPyEvent(wxEvent): pass -class wxActivateEvent(wxEvent): +class ActivateEvent(Event): """""" def GetActive(self): @@ -100,7 +100,7 @@ class wxActivateEvent(wxEvent): pass -class wxCalculateLayoutEvent(wxEvent): +class CalculateLayoutEvent(Event): """""" def GetFlags(self): @@ -124,7 +124,7 @@ class wxCalculateLayoutEvent(wxEvent): pass -class wxCloseEvent(wxEvent): +class CloseEvent(Event): """""" def CanVeto(self): @@ -156,7 +156,7 @@ class wxCloseEvent(wxEvent): pass -class wxCommandEvent(wxEvent): +class CommandEvent(Event): """""" def __init__(self): @@ -208,7 +208,7 @@ class wxCommandEvent(wxEvent): pass -class wxChildFocusEvent(wxCommandEvent): +class ChildFocusEvent(CommandEvent): """""" def GetWindow(self): @@ -220,7 +220,7 @@ class wxChildFocusEvent(wxCommandEvent): pass -class wxContextMenuEvent(wxCommandEvent): +class ContextMenuEvent(CommandEvent): """""" def GetPosition(self): @@ -236,7 +236,7 @@ class wxContextMenuEvent(wxCommandEvent): pass -class wxDisplayChangedEvent(wxEvent): +class DisplayChangedEvent(Event): """""" def __init__(self): @@ -244,7 +244,7 @@ class wxDisplayChangedEvent(wxEvent): pass -class wxDropFilesEvent(wxEvent): +class DropFilesEvent(Event): """""" def GetFiles(self): @@ -264,7 +264,7 @@ class wxDropFilesEvent(wxEvent): pass -class wxEraseEvent(wxEvent): +class EraseEvent(Event): """""" def GetDC(self): @@ -276,7 +276,7 @@ class wxEraseEvent(wxEvent): pass -class wxFindDialogEvent(wxCommandEvent): +class FindDialogEvent(CommandEvent): """""" def GetDialog(self): @@ -312,7 +312,7 @@ class wxFindDialogEvent(wxCommandEvent): pass -class wxFocusEvent(wxEvent): +class FocusEvent(Event): """""" def __init__(self): @@ -320,7 +320,7 @@ class wxFocusEvent(wxEvent): pass -class wxIconizeEvent(wxEvent): +class IconizeEvent(Event): """""" def Iconized(self): @@ -332,7 +332,7 @@ class wxIconizeEvent(wxEvent): pass -class wxIdleEvent(wxEvent): +class IdleEvent(Event): """""" def MoreRequested(self): @@ -348,7 +348,7 @@ class wxIdleEvent(wxEvent): pass -class wxInitDialogEvent(wxEvent): +class InitDialogEvent(Event): """""" def __init__(self): @@ -356,7 +356,7 @@ class wxInitDialogEvent(wxEvent): pass -class wxJoystickEvent(wxEvent): +class JoystickEvent(Event): """""" def ButtonDown(self): @@ -428,7 +428,7 @@ class wxJoystickEvent(wxEvent): pass -class wxKeyEvent(wxEvent): +class KeyEvent(Event): """""" def AltDown(self): @@ -496,7 +496,7 @@ class wxKeyEvent(wxEvent): pass -class wxMaximizeEvent(wxEvent): +class MaximizeEvent(Event): """""" def __init__(self): @@ -504,7 +504,7 @@ class wxMaximizeEvent(wxEvent): pass -class wxMenuEvent(wxEvent): +class MenuEvent(Event): """""" def GetMenuId(self): @@ -520,7 +520,7 @@ class wxMenuEvent(wxEvent): pass -class wxMouseCaptureChangedEvent(wxEvent): +class MouseCaptureChangedEvent(Event): """""" def GetCapturedWindow(self): @@ -532,7 +532,7 @@ class wxMouseCaptureChangedEvent(wxEvent): pass -class wxMouseEvent(wxEvent): +class MouseEvent(Event): """""" def AltDown(self): @@ -684,7 +684,7 @@ class wxMouseEvent(wxEvent): pass -class wxMoveEvent(wxEvent): +class MoveEvent(Event): """""" def GetPosition(self): @@ -696,7 +696,7 @@ class wxMoveEvent(wxEvent): pass -class wxNavigationKeyEvent(wxEvent): +class NavigationKeyEvent(Event): """""" def GetCurrentFocus(self): @@ -728,7 +728,7 @@ class wxNavigationKeyEvent(wxEvent): pass -class wxNotifyEvent(wxCommandEvent): +class NotifyEvent(CommandEvent): """""" def __init__(self): @@ -748,7 +748,7 @@ class wxNotifyEvent(wxCommandEvent): pass -class wxListEvent(wxNotifyEvent): +class ListEvent(NotifyEvent): """""" def GetCacheFrom(self): @@ -816,9 +816,9 @@ class wxListEvent(wxNotifyEvent): pass -class wxNotebookEvent(wxNotifyEvent): +class NotebookEvent(NotifyEvent): - def __init__(self, commandType=wx.wxEVT_NULL, id=0, nSel=-1, nOldSel=-1): + def __init__(self, commandType=wx.EVT_NULL, id=0, nSel=-1, nOldSel=-1): """""" pass @@ -839,7 +839,7 @@ class wxNotebookEvent(wxNotifyEvent): pass -class wxPaintEvent(wxEvent): +class PaintEvent(Event): """""" def __init__(self): @@ -847,7 +847,7 @@ class wxPaintEvent(wxEvent): pass -class wxPaletteChangedEvent(wxEvent): +class PaletteChangedEvent(Event): """""" def GetChangedWindow(self): @@ -863,7 +863,7 @@ class wxPaletteChangedEvent(wxEvent): pass -class wxProcessEvent(wxEvent): +class ProcessEvent(Event): """""" def GetExitCode(self): @@ -887,7 +887,7 @@ class wxProcessEvent(wxEvent): pass -class wxPyCommandEvent(wxCommandEvent): +class PyCommandEvent(CommandEvent): """""" def GetSelf(self): @@ -907,7 +907,7 @@ class wxPyCommandEvent(wxCommandEvent): pass -class wxQueryLayoutInfoEvent(wxEvent): +class QueryLayoutInfoEvent(Event): """""" def GetAlignment(self): @@ -955,7 +955,7 @@ class wxQueryLayoutInfoEvent(wxEvent): pass -class wxQueryNewPaletteEvent(wxEvent): +class QueryNewPaletteEvent(Event): """""" def GetPaletteRealized(self): @@ -971,7 +971,7 @@ class wxQueryNewPaletteEvent(wxEvent): pass -class wxSashEvent(wxCommandEvent): +class SashEvent(CommandEvent): """""" def GetDragRect(self): @@ -1003,7 +1003,7 @@ class wxSashEvent(wxCommandEvent): pass -class wxScrollEvent(wxCommandEvent): +class ScrollEvent(CommandEvent): """""" def GetOrientation(self): @@ -1019,7 +1019,7 @@ class wxScrollEvent(wxCommandEvent): pass -class wxScrollWinEvent(wxEvent): +class ScrollWinEvent(Event): """""" def GetOrientation(self): @@ -1035,7 +1035,7 @@ class wxScrollWinEvent(wxEvent): pass -class wxSetCursorEvent(wxEvent): +class SetCursorEvent(Event): """""" def GetCursor(self): @@ -1063,7 +1063,7 @@ class wxSetCursorEvent(wxEvent): pass -class wxShowEvent(wxEvent): +class ShowEvent(Event): """""" def GetShow(self): @@ -1079,7 +1079,7 @@ class wxShowEvent(wxEvent): pass -class wxSizeEvent(wxEvent): +class SizeEvent(Event): """""" def GetSize(self): @@ -1091,7 +1091,7 @@ class wxSizeEvent(wxEvent): pass -class wxSpinEvent(wxScrollEvent): +class SpinEvent(ScrollEvent): """""" def __init__(self): @@ -1099,7 +1099,7 @@ class wxSpinEvent(wxScrollEvent): pass -class wxSplitterEvent(wxNotifyEvent): +class SplitterEvent(NotifyEvent): """""" def GetSashPosition(self): @@ -1127,7 +1127,7 @@ class wxSplitterEvent(wxNotifyEvent): pass -class wxSysColourChangedEvent(wxEvent): +class SysColourChangedEvent(Event): """""" def __init__(self): @@ -1135,7 +1135,7 @@ class wxSysColourChangedEvent(wxEvent): pass -class wxTextUrlEvent(wxCommandEvent): +class TextUrlEvent(CommandEvent): """""" def GetMouseEvent(self): @@ -1155,7 +1155,7 @@ class wxTextUrlEvent(wxCommandEvent): pass -class wxTimerEvent(wxEvent): +class TimerEvent(Event): """""" def GetInterval(self): @@ -1167,7 +1167,7 @@ class wxTimerEvent(wxEvent): pass -class wxTreeEvent(wxNotifyEvent): +class TreeEvent(NotifyEvent): """""" def GetCode(self): @@ -1207,7 +1207,7 @@ class wxTreeEvent(wxNotifyEvent): pass -class wxUpdateUIEvent(wxEvent): +class UpdateUIEvent(Event): """""" def Check(self): @@ -1251,7 +1251,7 @@ class wxUpdateUIEvent(wxEvent): pass -class wxWindowCreateEvent(wxCommandEvent): +class WindowCreateEvent(CommandEvent): """""" def GetWindow(self): @@ -1263,7 +1263,7 @@ class wxWindowCreateEvent(wxCommandEvent): pass -class wxWindowDestroyEvent(wxCommandEvent): +class WindowDestroyEvent(CommandEvent): """""" def GetWindow(self): diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxFileSystem.py b/wxPython/wxPython/lib/PyCrust/wxd/FileSystem.py similarity index 87% rename from wxPython/wxPython/lib/PyCrust/decor/wxFileSystem.py rename to wxPython/wxPython/lib/PyCrust/wxd/FileSystem.py index 34f3603d37..41780660c4 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxFileSystem.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/FileSystem.py @@ -12,11 +12,11 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -from wxBase import wxObject -import wxParameters as wx +from Base import Object +import Parameters as wx -class wxFSFile(wxObject): +class FSFile(Object): """""" def GetAnchor(self): @@ -44,7 +44,7 @@ class wxFSFile(wxObject): pass -class wxFileSystem(wxObject): +class FileSystem(Object): """""" def ChangePathTo(self): @@ -72,7 +72,7 @@ class wxFileSystem(wxObject): pass -class wxCPPFileSystemHandler(wxObject): +class CPPFileSystemHandler(Object): """""" def __init__(self): @@ -80,7 +80,7 @@ class wxCPPFileSystemHandler(wxObject): pass -class wxFileSystemHandler(wxCPPFileSystemHandler): +class FileSystemHandler(CPPFileSystemHandler): """""" def CanOpen(self): @@ -128,7 +128,7 @@ class wxFileSystemHandler(wxCPPFileSystemHandler): pass -class wxInternetFSHandler(wxCPPFileSystemHandler): +class InternetFSHandler(CPPFileSystemHandler): """""" def CanOpen(self): @@ -144,7 +144,7 @@ class wxInternetFSHandler(wxCPPFileSystemHandler): pass -class wxMemoryFSHandler(wxCPPFileSystemHandler): +class MemoryFSHandler(CPPFileSystemHandler): """""" def CanOpen(self): @@ -168,7 +168,7 @@ class wxMemoryFSHandler(wxCPPFileSystemHandler): pass -class wxZipFSHandler(wxCPPFileSystemHandler): +class ZipFSHandler(CPPFileSystemHandler): """""" def CanOpen(self): diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxFrames.py b/wxPython/wxPython/lib/PyCrust/wxd/Frames.py similarity index 87% rename from wxPython/wxPython/lib/PyCrust/decor/wxFrames.py rename to wxPython/wxPython/lib/PyCrust/wxd/Frames.py index d51d9afda7..4ec3542fe7 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxFrames.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/Frames.py @@ -12,22 +12,28 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -from wxBase import wxObject -import wxParameters as wx -from wxWindow import wxTopLevelWindow, wxWindow +from Base import Object +import Parameters as wx +from Window import TopLevelWindow, Window -class wxFrame(wxTopLevelWindow): +class Frame(TopLevelWindow): """""" - def Command(self): - """""" + def __init__(self, parent, id, title, pos=wx.DefaultPosition, + size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE, + name=wx.PyFrameNameStr): + """Create a Frame instance.""" pass def Create(self): """""" pass + def Command(self): + """""" + pass + def CreateStatusBar(self): """""" pass @@ -100,14 +106,14 @@ class wxFrame(wxTopLevelWindow): """""" pass + +class LayoutAlgorithm(Object): + """""" + def __init__(self): """""" pass - -class wxLayoutAlgorithm(wxObject): - """""" - def LayoutFrame(self): """""" pass @@ -120,23 +126,19 @@ class wxLayoutAlgorithm(wxObject): """""" pass - def __del__(self): - """""" - pass + +class MDIChildFrame(Frame): + """""" def __init__(self): """""" pass - -class wxMDIChildFrame(wxFrame): - """""" - - def Activate(self): + def Create(self): """""" pass - def Create(self): + def Activate(self): """""" pass @@ -148,25 +150,29 @@ class wxMDIChildFrame(wxFrame): """""" pass + +class MDIClientWindow(Window): + """""" + def __init__(self): """""" pass - -class wxMDIClientWindow(wxWindow): - """""" - def Create(self): """""" pass + +class MDIParentFrame(Frame): + """""" + def __init__(self): """""" pass - -class wxMDIParentFrame(wxFrame): - """""" + def Create(self): + """""" + pass def ActivateNext(self): """""" @@ -184,10 +190,6 @@ class wxMDIParentFrame(wxFrame): """""" pass - def Create(self): - """""" - pass - def GetActiveChild(self): """""" pass @@ -204,26 +206,26 @@ class wxMDIParentFrame(wxFrame): """""" pass + +class MiniFrame(Frame): + """""" + def __init__(self): """""" pass - -class wxMiniFrame(wxFrame): - """""" - def Create(self): """""" pass + +class SplashScreen(Frame): + """""" + def __init__(self): """""" pass - -class wxSplashScreen(wxFrame): - """""" - def GetSplashStyle(self): """""" pass @@ -236,14 +238,14 @@ class wxSplashScreen(wxFrame): """""" pass + +class SplashScreenWindow(Window): + """""" + def __init__(self): """""" pass - -class wxSplashScreenWindow(wxWindow): - """""" - def GetBitmap(self): """""" pass @@ -252,14 +254,14 @@ class wxSplashScreenWindow(wxWindow): """""" pass + +class StatusBar(Window): + """""" + def __init__(self): """""" pass - -class wxStatusBar(wxWindow): - """""" - def Create(self): """""" pass @@ -308,8 +310,4 @@ class wxStatusBar(wxWindow): """""" pass - def __init__(self): - """""" - pass - diff --git a/wxPython/wxPython/lib/PyCrust/wxd/Functions.py b/wxPython/wxPython/lib/PyCrust/wxd/Functions.py new file mode 100644 index 0000000000..0ce7741e60 --- /dev/null +++ b/wxPython/wxPython/lib/PyCrust/wxd/Functions.py @@ -0,0 +1,1264 @@ +"""Decorator classes for documentation and shell scripting. +""" + +__author__ = "Patrick K. O'Brien " +__cvsid__ = "$Id$" +__revision__ = "$Revision$"[11:-2] + + +# These are not the real wxPython classes. These are Python versions +# for documentation purposes. They are also used to apply docstrings +# to the real wxPython classes, which are SWIG-generated wrappers for +# C-language classes. + + +import Parameters as wx + + +def ArtProvider_GetBitmap(): + """""" + pass + +def ArtProvider_GetIcon(): + """""" + pass + +def ArtProvider_PopProvider(): + """""" + pass + +def ArtProvider_PushProvider(): + """""" + pass + +def ArtProvider_RemoveProvider(): + """""" + pass + +def BeginBusyCursor(): + """""" + pass + +def Bell(): + """""" + pass + +def BitmapFromBits(): + """""" + pass + +def BitmapFromIcon(): + """""" + pass + +def BitmapFromImage(): + """""" + pass + +def BitmapFromXPMData(): + """""" + pass + +def BufferedDCInternalBuffer(): + """""" + pass + +def Button_GetDefaultSize(): + """""" + pass + +## def CallAfter(): +## """""" +## pass + +import wx as wxpy +CallAfter = wxpy.CallAfter +del wxpy + +def Caret_GetBlinkTime(): + """""" + pass + +def Caret_SetBlinkTime(): + """""" + pass + +def ClientDisplayRect(): + """""" + pass + +def ColourDisplay(): + """""" + pass + +def ConfigBase_Create(): + """""" + pass + +def ConfigBase_DontCreateOnDemand(): + """""" + pass + +def ConfigBase_Get(): + """""" + pass + +def ConfigBase_Set(): + """""" + pass + +def CreateFileTipProvider(): + """""" + pass + +def CustomDataFormat(): + """""" + pass + +def DLG_PNT(): + """""" + pass + +def DLG_SZE(): + """""" + pass + +def DateSpan_Day(): + """""" + pass + +def DateSpan_Days(): + """""" + pass + +def DateSpan_Month(): + """""" + pass + +def DateSpan_Months(): + """""" + pass + +def DateSpan_Week(): + """""" + pass + +def DateSpan_Weeks(): + """""" + pass + +def DateSpan_Year(): + """""" + pass + +def DateSpan_Years(): + """""" + pass + +def DateTimeFromDMY(): + """""" + pass + +def DateTimeFromHMS(): + """""" + pass + +def DateTimeFromJDN(): + """""" + pass + +def DateTimeFromTimeT(): + """""" + pass + +def DateTime_ConvertYearToBC(): + """""" + pass + +def DateTime_GetAmPmStrings(): + """""" + pass + +def DateTime_GetBeginDST(): + """""" + pass + +def DateTime_GetCentury(): + """""" + pass + +def DateTime_GetCountry(): + """""" + pass + +def DateTime_GetCurrentMonth(): + """""" + pass + +def DateTime_GetCurrentYear(): + """""" + pass + +def DateTime_GetEndDST(): + """""" + pass + +def DateTime_GetMonthName(): + """""" + pass + +def DateTime_GetNumberOfDaysInMonth(): + """""" + pass + +def DateTime_GetNumberOfDaysinYear(): + """""" + pass + +def DateTime_GetWeekDayName(): + """""" + pass + +def DateTime_IsDSTApplicable(): + """""" + pass + +def DateTime_IsLeapYear(): + """""" + pass + +def DateTime_IsWestEuropeanCountry(): + """""" + pass + +def DateTime_Now(): + """""" + pass + +def DateTime_SetCountry(): + """""" + pass + +def DateTime_Today(): + """""" + pass + +def DateTime_UNow(): + """""" + pass + +def DirSelector(): + """""" + pass + +def DisplayDepth(): + """""" + pass + +def DisplaySize(): + """""" + pass + +def DisplaySizeMM(): + """""" + pass + +def DragIcon(): + """""" + pass + +def DragListItem(): + """""" + pass + +def DragString(): + """""" + pass + +def DragTreeItem(): + """""" + pass + +def EmptyBitmap(): + """""" + pass + +def EmptyIcon(): + """""" + pass + +def EmptyImage(): + """""" + pass + +def EnableTopLevelWindows(): + """""" + pass + +def EncodingConverter_GetAllEquivalents(): + """""" + pass + +def EncodingConverter_GetPlatformEquivalents(): + """""" + pass + +def EndBusyCursor(): + """""" + pass + +def Execute(): + """""" + pass + +def FileSelector(): + """""" + pass + +def FileSystem_AddHandler(): + """""" + pass + +def FileSystem_CleanUpHandlers(): + """""" + pass + +def FileTypeInfoSequence(): + """""" + pass + +def FileType_ExpandCommand(): + """""" + pass + +def FindWindowAtPoint(): + """""" + pass + +def FindWindowById(id, parent=wx.NULL): + """""" + pass + +def FindWindowByLabel(label, parent=wx.NULL): + """""" + pass + +def FindWindowByName(name, parent=wx.NULL): + """""" + pass + +def FontFromNativeInfo(): + """""" + pass + +def FontMapper_Get(): + """""" + pass + +def FontMapper_GetDefaultConfigPath(): + """""" + pass + +def FontMapper_GetEncodingDescription(): + """""" + pass + +def FontMapper_GetEncodingName(): + """""" + pass + +def FontMapper_Set(): + """""" + pass + +def Font_GetDefaultEncoding(): + """""" + pass + +def Font_SetDefaultEncoding(): + """""" + pass + +def GenericFindWindowAtPoint(): + """""" + pass + +def GetAccelFromString(): + """""" + pass + +def GetActiveWindow(): + """""" + pass + +def GetApp(): + """""" + pass + +def GetClientDisplayRect(): + """""" + pass + +def GetCurrentId(): + """""" + pass + +def GetCurrentTime(): + """""" + pass + +def GetDisplayDepth(): + """""" + pass + +def GetDisplaySize(): + """""" + pass + +def GetDisplaySizeMM(): + """""" + pass + +def GetElapsedTime(): + """""" + pass + +def GetEmailAddress(): + """""" + pass + +def GetFullHostName(): + """""" + pass + +def GetHomeDir(): + """""" + pass + +def GetHostName(): + """""" + pass + +def GetLocalTime(): + """""" + pass + +def GetLocalTimeMillis(): + """""" + pass + +def GetLocale(): + """""" + pass + +def GetMousePosition(): + """""" + pass + +def GetNumberFromUser(): + """""" + pass + +def GetOsDescription(): + """""" + pass + +def GetOsVersion(): + """""" + pass + +def GetPasswordFromUser(): + """""" + pass + +def GetProcessId(): + """""" + pass + +def GetSingleChoice(): + """""" + pass + +def GetSingleChoiceIndex(): + """""" + pass + +def GetTextFromUser(): + """""" + pass + +def GetTopLevelParent(): + """""" + pass + +def GetTranslation(): + """""" + pass + +def GetUTCTime(): + """""" + pass + +def GetUserHome(): + """""" + pass + +def GetUserId(): + """""" + pass + +def GetUserName(): + """""" + pass + +def IconBundleFromFile(): + """""" + pass + +def IconBundleFromIcon(): + """""" + pass + +def IconFromBitmap(): + """""" + pass + +def IconFromXPMData(): + """""" + pass + +def ImageFromBitmap(): + """""" + pass + +def ImageFromData(): + """""" + pass + +def ImageFromMime(): + """""" + pass + +def ImageFromStream(): + """""" + pass + +def ImageFromStreamMime(): + """""" + pass + +def Image_AddHandler(): + """""" + pass + +def Image_CanRead(): + """""" + pass + +def Image_CanReadStream(): + """""" + pass + +def Image_GetImageCount(): + """""" + pass + +def Image_InsertHandler(): + """""" + pass + +def Image_RemoveHandler(): + """""" + pass + +def InitAllImageHandlers(): + """""" + pass + +def IntersectRect(): + """""" + pass + +def IsBusy(): + """""" + pass + +def IsDragResultOk(): + """""" + pass + +def LoadFileSelector(): + """""" + pass + +def Locale_AddCatalogLookupPathPrefix(): + """""" + pass + +def Locale_AddLanguage(): + """""" + pass + +def Locale_GetLanguageInfo(): + """""" + pass + +def Locale_GetSystemEncoding(): + """""" + pass + +def Locale_GetSystemEncodingName(): + """""" + pass + +def Locale_GetSystemLanguage(): + """""" + pass + +def LogDebug(): + """""" + pass + +def LogError(): + """""" + pass + +def LogFatalError(): + """""" + pass + +def LogGeneric(): + """""" + pass + +def LogInfo(): + """""" + pass + +def LogMessage(): + """""" + pass + +def LogStatus(): + """""" + pass + +def LogStatusFrame(): + """""" + pass + +def LogSysError(): + """""" + pass + +def LogTrace(): + """""" + pass + +def LogTraceMask(): + """""" + pass + +def LogVerbose(): + """""" + pass + +def LogWarning(): + """""" + pass + +def Log_AddTraceMask(): + """""" + pass + +def Log_ClearTraceMasks(): + """""" + pass + +def Log_DontCreateOnDemand(): + """""" + pass + +def Log_EnableLogging(): + """""" + pass + +def Log_FlushActive(): + """""" + pass + +def Log_GetActiveTarget(): + """""" + pass + +def Log_GetLogLevel(): + """""" + pass + +def Log_GetTimestamp(): + """""" + pass + +def Log_GetTraceMask(): + """""" + pass + +def Log_GetTraceMasks(): + """""" + pass + +def Log_IsAllowedTraceMask(): + """""" + pass + +def Log_IsEnabled(): + """""" + pass + +def Log_OnLog(): + """""" + pass + +def Log_RemoveTraceMask(): + """""" + pass + +def Log_Resume(): + """""" + pass + +def Log_SetActiveTarget(): + """""" + pass + +def Log_SetLogLevel(): + """""" + pass + +def Log_SetTimestamp(): + """""" + pass + +def Log_SetTraceMask(): + """""" + pass + +def Log_SetVerbose(): + """""" + pass + +def Log_Suspend(): + """""" + pass + +def MaskColour(): + """""" + pass + +def MemoryDCFromDC(): + """""" + pass + +def MemoryFSHandler_AddFile(): + """""" + pass + +def MemoryFSHandler_RemoveFile(): + """""" + pass + +def MenuItem_GetLabelFromText(): + """""" + pass + +def MessageBox(): + """""" + pass + +def MimeTypesManager_IsOfType(): + """""" + pass + +def MutexGuiEnter(): + """""" + pass + +def MutexGuiLeave(): + """""" + pass + +def NamedColour(): + """""" + pass + +def NamedColour(): + """""" + pass + +def NewEventType(): + """""" + pass + +def NewId(): + """""" + pass + +def Now(): + """""" + pass + +def NullFileTypeInfo(): + """""" + pass + +def Point2DDoubleCopy(): + """""" + pass + +def Point2DDoubleFromPoint(): + """""" + pass + +def PostEvent(): + """""" + pass + +def PostScriptDC_GetResolution(): + """""" + pass + +def PostScriptDC_SetResolution(): + """""" + pass + +def PreBitmapButton(): + """""" + pass + +def PreButton(): + """""" + pass + +def PreCheckBox(): + """""" + pass + +def PreCheckListBox(): + """""" + pass + +def PreChoice(): + """""" + pass + +def PreComboBox(): + """""" + pass + +def PreControl(): + """""" + pass + +def PreDialog(): + """""" + pass + +def PreDirFilterListCtrl(): + """""" + pass + +def PreFindReplaceDialog(): + """""" + pass + +def PreFrame(): + """""" + pass + +def PreGauge(): + """""" + pass + +def PreGenericDirCtrl(): + """""" + pass + +def PreListBox(): + """""" + pass + +def PreListCtrl(): + """""" + pass + +def PreListView(): + """""" + pass + +def PreMDIChildFrame(): + """""" + pass + +def PreMDIClientWindow(): + """""" + pass + +def PreMDIParentFrame(): + """""" + pass + +def PreMiniFrame(): + """""" + pass + +def PreNotebook(): + """""" + pass + +def PrePanel(): + """""" + pass + +def PrePopupTransientWindow(): + """""" + pass + +def PrePopupWindow(): + """""" + pass + +def PreRadioBox(): + """""" + pass + +def PreRadioButton(): + """""" + pass + +def PreSashLayoutWindow(): + """""" + pass + +def PreSashWindow(): + """""" + pass + +def PreScrollBar(): + """""" + pass + +def PreScrolledWindow(): + """""" + pass + +def PreSingleInstanceChecker(): + """""" + pass + +def PreSlider(): + """""" + pass + +def PreSpinButton(): + """""" + pass + +def PreSpinCtrl(): + """""" + pass + +def PreSplitterWindow(): + """""" + pass + +def PreStaticBitmap(): + """""" + pass + +def PreStaticBox(): + """""" + pass + +def PreStaticLine(): + """""" + pass + +def PreStaticText(): + """""" + pass + +def PreStatusBar(): + """""" + pass + +def PreTextCtrl(): + """""" + pass + +def PreToggleButton(): + """""" + pass + +def PreToolBar(): + """""" + pass + +def PreToolBarSimple(): + """""" + pass + +def PreTopLevelWindow(): + """""" + pass + +def PreTreeCtrl(): + """""" + pass + +def PreWindow(): + """""" + pass + +def Process_Exists(): + """""" + pass + +def Process_Kill(): + """""" + pass + +def Process_Open(): + """""" + pass + +def PyTypeCast(obj, typeStr): + """This helper function will take a wxPython object and convert it + to another wxPython object type. This will not be able to create + objects that are derived from wxPython classes by the user, only + those that are actually part of wxPython and directly corespond to + C++ objects. + + This is useful in situations where some method returns a generic + type such as wxWindow, but you know that it is actually some + derived type such as a TextCtrl. You can't call TextCtrl + specific methods on a Window object, but you can use this + function to create a TextCtrl object that will pass the same + pointer to the C++ code. You use it like this: + + textCtrl = PyTypeCast(window, "TextCtrl") + + WARNING: Using this function to type cast objects into types that + they are not is not recommended and is likely to cause + your program to crash... Hard.""" + pass + +def Py_isinstance(obj, klasses): + """An isinstance for Python < 2.2 that can check a sequence of + class objects like the one in 2.2 can.""" + pass + +def RegionFromPoints(): + """""" + pass + +def RegisterId(): + """""" + pass + +## def RunLater(callable, *args, **kw): +## """An alias for CallAfter.""" +## pass + +RunLater = CallAfter + +def SafeShowMessage(): + """""" + pass + +def SafeYield(): + """""" + pass + +def SaveFileSelector(): + """""" + pass + +def SetCursor(): + """""" + pass + +def Shell(): + """""" + pass + +def ShowTip(): + """""" + pass + +def Shutdown(): + """""" + pass + +def Sleep(): + """""" + pass + +def StartTimer(): + """""" + pass + +def StockCursor(): + """""" + pass + +def StripMenuCodes(): + """""" + pass + +def SysErrorCode(): + """""" + pass + +def SysErrorMsg(): + """""" + pass + +def SystemSettings_GetColour(): + """""" + pass + +def SystemSettings_GetFont(): + """""" + pass + +def SystemSettings_GetMetric(): + """""" + pass + +def SystemSettings_GetScreenType(): + """""" + pass + +def SystemSettings_GetColour(): + """""" + pass + +def SystemSettings_GetFont(): + """""" + pass + +def SystemSettings_GetMetric(): + """""" + pass + +def SystemSettings_HasFeature(): + """""" + pass + +def SystemSettings_SetScreenType(): + """""" + pass + +def TextAttr_Combine(): + """""" + pass + +def Thread_IsMain(): + """""" + pass + +def TimeSpan_Day(): + """""" + pass + +def TimeSpan_Days(): + """""" + pass + +def TimeSpan_Hour(): + """""" + pass + +def TimeSpan_Hours(): + """""" + pass + +def TimeSpan_Minute(): + """""" + pass + +def TimeSpan_Minutes(): + """""" + pass + +def TimeSpan_Second(): + """""" + pass + +def TimeSpan_Seconds(): + """""" + pass + +def TimeSpan_Week(): + """""" + pass + +def TimeSpan_Weeks(): + """""" + pass + +def ToolTip_Enable(): + """""" + pass + +def ToolTip_SetDelay(): + """""" + pass + +def Usleep(): + """""" + pass + +def Validator_IsSilent(): + """""" + pass + +def Validator_SetBellOnError(): + """""" + pass + +def WakeUpIdle(): + """""" + pass + +def WaveData(): + """""" + pass + +def Window_FindFocus(): + """""" + pass + +def Window_GetCapture(): + """""" + pass + +def Window_NewControlId(): + """""" + pass + +def Window_NextControlId(): + """""" + pass + +def Window_PrevControlId(): + """""" + pass + +def Yield(): + """""" + pass + +def YieldIfNeeded(): + """""" + pass diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxHelp.py b/wxPython/wxPython/lib/PyCrust/wxd/Help.py similarity index 84% rename from wxPython/wxPython/lib/PyCrust/decor/wxHelp.py rename to wxPython/wxPython/lib/PyCrust/wxd/Help.py index 7fdff0bf06..e2518b37cc 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxHelp.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/Help.py @@ -12,12 +12,12 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -from wxBase import wxObject -import wxParameters as wx -from wxWindow import wxWindow +from Base import Object +import Parameters as wx +from Window import Window -class wxPopupWindow(wxWindow): +class PopupWindow(Window): """""" def Create(self): @@ -33,7 +33,7 @@ class wxPopupWindow(wxWindow): pass -class wxPopupTransientWindow(wxPopupWindow): +class PopupTransientWindow(PopupWindow): """""" def Dismiss(self): @@ -53,7 +53,7 @@ class wxPopupTransientWindow(wxPopupWindow): pass -class wxTipProvider: +class TipProvider: """""" def GetCurrentTip(self): @@ -77,7 +77,7 @@ class wxTipProvider: pass -class wxPyTipProvider(wxTipProvider): +class PyTipProvider(TipProvider): """""" def __init__(self): @@ -89,7 +89,7 @@ class wxPyTipProvider(wxTipProvider): pass -class wxTipWindow(wxPopupTransientWindow): +class TipWindow(PopupTransientWindow): """""" def Close(self): @@ -105,7 +105,7 @@ class wxTipWindow(wxPopupTransientWindow): pass -class wxToolTip(wxObject): +class ToolTip(Object): """""" def GetTip(self): diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxImageHandlers.py b/wxPython/wxPython/lib/PyCrust/wxd/ImageHandlers.py similarity index 78% rename from wxPython/wxPython/lib/PyCrust/decor/wxImageHandlers.py rename to wxPython/wxPython/lib/PyCrust/wxd/ImageHandlers.py index 4170fc9b52..f034f394bb 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxImageHandlers.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/ImageHandlers.py @@ -12,11 +12,11 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -from wxBase import wxObject -import wxParameters as wx +from Base import Object +import Parameters as wx -class wxImageHandler(wxObject): +class ImageHandler(Object): """""" def CanRead(self): @@ -60,7 +60,7 @@ class wxImageHandler(wxObject): pass -class wxBMPHandler(wxImageHandler): +class BMPHandler(ImageHandler): """""" def __init__(self): @@ -68,7 +68,7 @@ class wxBMPHandler(wxImageHandler): pass -class wxGIFHandler(wxImageHandler): +class GIFHandler(ImageHandler): """""" def __init__(self): @@ -76,7 +76,7 @@ class wxGIFHandler(wxImageHandler): pass -class wxICOHandler(wxBMPHandler): +class ICOHandler(BMPHandler): """""" def __init__(self): @@ -84,7 +84,7 @@ class wxICOHandler(wxBMPHandler): pass -class wxCURHandler(wxICOHandler): +class CURHandler(ICOHandler): """""" def __init__(self): @@ -92,7 +92,7 @@ class wxCURHandler(wxICOHandler): pass -class wxANIHandler(wxCURHandler): +class ANIHandler(CURHandler): """""" def __init__(self): @@ -100,7 +100,7 @@ class wxANIHandler(wxCURHandler): pass -class wxJPEGHandler(wxImageHandler): +class JPEGHandler(ImageHandler): """""" def __init__(self): @@ -108,7 +108,7 @@ class wxJPEGHandler(wxImageHandler): pass -class wxPCXHandler(wxImageHandler): +class PCXHandler(ImageHandler): """""" def __init__(self): @@ -116,7 +116,7 @@ class wxPCXHandler(wxImageHandler): pass -class wxPNGHandler(wxImageHandler): +class PNGHandler(ImageHandler): """""" def __init__(self): @@ -124,7 +124,7 @@ class wxPNGHandler(wxImageHandler): pass -class wxPNMHandler(wxImageHandler): +class PNMHandler(ImageHandler): """""" def __init__(self): @@ -132,7 +132,7 @@ class wxPNMHandler(wxImageHandler): pass -class wxTIFFHandler(wxImageHandler): +class TIFFHandler(ImageHandler): """""" def __init__(self): diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxJoystick.py b/wxPython/wxPython/lib/PyCrust/wxd/Joystick.py similarity index 97% rename from wxPython/wxPython/lib/PyCrust/decor/wxJoystick.py rename to wxPython/wxPython/lib/PyCrust/wxd/Joystick.py index bb8ab56685..2d787b63ce 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxJoystick.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/Joystick.py @@ -12,11 +12,11 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -from wxBase import wxObject -import wxParameters as wx +from Base import Object +import Parameters as wx -class wxJoystick(wxObject): +class Joystick(Object): """""" def GetButtonState(self): diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxLayoutConstraints.py b/wxPython/wxPython/lib/PyCrust/wxd/LayoutConstraints.py similarity index 89% rename from wxPython/wxPython/lib/PyCrust/decor/wxLayoutConstraints.py rename to wxPython/wxPython/lib/PyCrust/wxd/LayoutConstraints.py index 56e6eebb57..5017e62c43 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxLayoutConstraints.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/LayoutConstraints.py @@ -12,11 +12,11 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -from wxBase import wxObject -import wxParameters as wx +from Base import Object +import Parameters as wx -class wxIndividualLayoutConstraint(wxObject): +class IndividualLayoutConstraint(Object): """""" def Above(self): @@ -64,7 +64,7 @@ class wxIndividualLayoutConstraint(wxObject): pass -class wxLayoutConstraints(wxObject): +class LayoutConstraints(Object): """""" def __getattr__(self): diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxLogging.py b/wxPython/wxPython/lib/PyCrust/wxd/Logging.py similarity index 89% rename from wxPython/wxPython/lib/PyCrust/decor/wxLogging.py rename to wxPython/wxPython/lib/PyCrust/wxd/Logging.py index 2886d95950..ca2ed02d70 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxLogging.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/Logging.py @@ -12,10 +12,10 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -import wxParameters as wx +import Parameters as wx -class wxLog: +class Log: """""" def Flush(self): @@ -39,7 +39,7 @@ class wxLog: pass -class wxPyLog(wxLog): +class PyLog(Log): """""" def Destroy(self): @@ -55,7 +55,7 @@ class wxPyLog(wxLog): pass -class wxLogChain(wxLog): +class LogChain(Log): """""" def GetOldLog(self): @@ -79,7 +79,7 @@ class wxLogChain(wxLog): pass -class wxLogGui(wxLog): +class LogGui(Log): """""" def __init__(self): @@ -87,7 +87,7 @@ class wxLogGui(wxLog): pass -class wxLogNull: +class LogNull: """""" def __del__(self): @@ -99,7 +99,7 @@ class wxLogNull: pass -class wxLogStderr(wxLog): +class LogStderr(Log): """""" def __init__(self): @@ -107,7 +107,7 @@ class wxLogStderr(wxLog): pass -class wxLogTextCtrl(wxLog): +class LogTextCtrl(Log): """""" def __init__(self): @@ -115,7 +115,7 @@ class wxLogTextCtrl(wxLog): pass -class wxLogWindow(wxLog): +class LogWindow(Log): """""" def GetFrame(self): diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxMenus.py b/wxPython/wxPython/lib/PyCrust/wxd/Menus.py similarity index 96% rename from wxPython/wxPython/lib/PyCrust/decor/wxMenus.py rename to wxPython/wxPython/lib/PyCrust/wxd/Menus.py index 89eee2fc68..3ec16fd151 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxMenus.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/Menus.py @@ -12,12 +12,12 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -from wxBase import wxObject, wxEvtHandler -import wxParameters as wx -from wxWindow import wxWindow +from Base import Object, EvtHandler +import Parameters as wx +from Window import Window -class wxFileHistory(wxObject): +class FileHistory(Object): """""" def AddFileToHistory(self): @@ -77,7 +77,7 @@ class wxFileHistory(wxObject): pass -class wxMenu(wxEvtHandler): +class Menu(EvtHandler): """""" def Append(self): @@ -281,7 +281,7 @@ class wxMenu(wxEvtHandler): pass -class wxMenuBar(wxWindow): +class MenuBar(Window): """""" def Append(self): @@ -372,7 +372,7 @@ class wxMenuBar(wxWindow): """""" pass -class wxMenuItem(wxObject): +class MenuItem(Object): """""" def Check(self): diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxMimeTypes.py b/wxPython/wxPython/lib/PyCrust/wxd/MimeTypes.py similarity index 96% rename from wxPython/wxPython/lib/PyCrust/decor/wxMimeTypes.py rename to wxPython/wxPython/lib/PyCrust/wxd/MimeTypes.py index da96fb84f5..2637b3dd37 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxMimeTypes.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/MimeTypes.py @@ -12,10 +12,10 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -import wxParameters as wx +import Parameters as wx -class wxFileType: +class FileType: """""" def GetAllCommands(self): @@ -75,7 +75,7 @@ class wxFileType: pass -class wxFileTypeInfo: +class FileTypeInfo: """""" def GetDescription(self): @@ -131,7 +131,7 @@ class wxFileTypeInfo: pass -class wxMimeTypesManager: +class MimeTypesManager: """""" def AddFallback(self): diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxMisc.py b/wxPython/wxPython/lib/PyCrust/wxd/Misc.py similarity index 92% rename from wxPython/wxPython/lib/PyCrust/decor/wxMisc.py rename to wxPython/wxPython/lib/PyCrust/wxd/Misc.py index e2f36ddf13..132e85cea8 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxMisc.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/Misc.py @@ -12,11 +12,11 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -from wxBase import wxObject -import wxParameters as wx +from Base import Object +import Parameters as wx -class wxArtProvider(wxObject): +class ArtProvider(Object): """""" def __init__(self): @@ -28,7 +28,7 @@ class wxArtProvider(wxObject): pass -class wxBusyCursor: +class BusyCursor: """""" def __del__(self): @@ -40,7 +40,7 @@ class wxBusyCursor: pass -class wxBusyInfo(wxObject): +class BusyInfo(Object): """""" def __del__(self): @@ -52,7 +52,7 @@ class wxBusyInfo(wxObject): pass -class wxCaret: +class Caret: """""" def GetPosition(self): @@ -116,7 +116,7 @@ class wxCaret: pass -class wxEncodingConverter(wxObject): +class EncodingConverter(Object): """""" def Convert(self): @@ -136,7 +136,7 @@ class wxEncodingConverter(wxObject): pass -class wxDirItemData(wxObject): +class DirItemData(Object): """""" def SetNewDirName(self): @@ -156,7 +156,7 @@ class wxDirItemData(wxObject): pass -class wxEffects(wxObject): +class Effects(Object): """""" def DrawSunkenEdge(self): @@ -216,7 +216,7 @@ class wxEffects(wxObject): pass -class wxFontEnumerator: +class FontEnumerator: """""" def EnumerateEncodings(self): @@ -248,7 +248,7 @@ class wxFontEnumerator: pass -class wxFontMapper: +class FontMapper: """""" def CharsetToEncoding(self): @@ -288,7 +288,7 @@ class wxFontMapper: pass -class wxLanguageInfo: +class LanguageInfo: """""" def __getattr__(self): @@ -304,7 +304,7 @@ class wxLanguageInfo: pass -class wxLocale: +class Locale: """""" def AddCatalog(self): @@ -356,7 +356,7 @@ class wxLocale: pass -class wxNativeFontInfo: +class NativeFontInfo: """""" def FromString(self): @@ -444,7 +444,7 @@ class wxNativeFontInfo: pass -class wxPyTimer(wxObject): +class PyTimer(Object): """""" def GetInterval(self): @@ -480,7 +480,7 @@ class wxPyTimer(wxObject): pass -class wxStopWatch: +class StopWatch: """""" def Pause(self): @@ -508,7 +508,7 @@ class wxStopWatch: pass -class wxSystemSettings: +class SystemSettings: """""" def __init__(self): @@ -516,15 +516,15 @@ class wxSystemSettings: pass -class wxTimer(wxPyTimer): +class Timer(PyTimer): """""" def __init__(self, evtHandler=None, id=-1): - """Create a wxTimer instance.""" + """Create a Timer instance.""" pass -class wxWave(wxObject): +class Wave(Object): """""" def IsOk(self): @@ -544,7 +544,7 @@ class wxWave(wxObject): pass -class wxWindowDisabler: +class WindowDisabler: """""" def __del__(self): diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxPanel.py b/wxPython/wxPython/lib/PyCrust/wxd/Panel.py similarity index 81% rename from wxPython/wxPython/lib/PyCrust/decor/wxPanel.py rename to wxPython/wxPython/lib/PyCrust/wxd/Panel.py index bb189a49c7..a28c3d4e4a 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxPanel.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/Panel.py @@ -12,22 +12,22 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -import wxParameters as wx -from wxWindow import wxWindow +import Parameters as wx +from Window import Window -class wxPanel(wxWindow): +class Panel(Window): """""" - def __init__(self, parent, id, pos=wx.wxDefaultPosition, - size=wx.wxDefaultSize, style=wx.wxTAB_TRAVERSAL, - name=wx.wxPyPanelNameStr): + def __init__(self, parent, id, pos=wx.DefaultPosition, + size=wx.DefaultSize, style=wx.TAB_TRAVERSAL, + name=wx.PyPanelNameStr): """""" pass - def Create(self, parent, id, pos=wx.wxDefaultPosition, - size=wx.wxDefaultSize, style=wx.wxTAB_TRAVERSAL, - name=wx.wxPyPanelNameStr): + def Create(self, parent, id, pos=wx.DefaultPosition, + size=wx.DefaultSize, style=wx.TAB_TRAVERSAL, + name=wx.PyPanelNameStr): """""" pass @@ -36,7 +36,7 @@ class wxPanel(wxWindow): pass -class wxPyPanel(wxPanel): +class PyPanel(Panel): """""" def __init__(self): @@ -120,18 +120,18 @@ class wxPyPanel(wxPanel): pass -class wxScrolledWindow(wxPanel): +class ScrolledWindow(Panel): """""" - def __init__(self, parent, id=-1, pos=wx.wxDefaultPosition, - size=wx.wxDefaultSize, style=wx.wxHSCROLL|wx.wxVSCROLL, - name=wx.wxPyPanelNameStr): + def __init__(self, parent, id=-1, pos=wx.DefaultPosition, + size=wx.DefaultSize, style=wx.HSCROLL|wx.VSCROLL, + name=wx.PyPanelNameStr): """""" pass - def Create(self, parent, id=-1, pos=wx.wxDefaultPosition, - size=wx.wxDefaultSize, style=wx.wxHSCROLL|wx.wxVSCROLL, - name=wx.wxPyPanelNameStr): + def Create(self, parent, id=-1, pos=wx.DefaultPosition, + size=wx.DefaultSize, style=wx.HSCROLL|wx.VSCROLL, + name=wx.PyPanelNameStr): """""" pass diff --git a/wxPython/wxPython/lib/PyCrust/wxd/Parameters.py b/wxPython/wxPython/lib/PyCrust/wxd/Parameters.py new file mode 100644 index 0000000000..81ba979976 --- /dev/null +++ b/wxPython/wxPython/lib/PyCrust/wxd/Parameters.py @@ -0,0 +1,82 @@ +"""Decorator classes for documentation and shell scripting. +""" + +__author__ = "Patrick K. O'Brien " +__cvsid__ = "$Id$" +__revision__ = "$Revision$"[11:-2] + + +# These are not the real wxPython classes. These are Python versions +# for documentation purposes. They are also used to apply docstrings +# to the real wxPython classes, which are SWIG-generated wrappers for +# C-language classes. + + +class Param: + """Used by this module to represent default wxPython parameter values, + including parameter representations like style=wx.HSCROLL|wx.VSCROLL.""" + + def __init__(self, value=None): + if value is None: + value = self.__class__.__name__ + self.value = value + + def __repr__(self): + return self.value + + def __or__(self, other): + value = '%s|%s' % (self, other) + return self.__class__(value) + + +class NULL(Param): pass +NULL = NULL() + +class BOTH(Param): pass +BOTH = BOTH() + +class DEFAULT_FRAME_STYLE(Param): pass +DEFAULT_FRAME_STYLE = DEFAULT_FRAME_STYLE() + +class DefaultPosition(Param): pass +DefaultPosition = DefaultPosition() + +class DefaultSize(Param): pass +DefaultSize = DefaultSize() + +class DefaultValidator(Param): pass +DefaultValidator = DefaultValidator() + +class EVT_NULL(Param): pass +EVT_NULL = EVT_NULL() + +class HSCROLL(Param): pass +HSCROLL = HSCROLL() + +class NullColour(Param): pass +NullColour = NullColour() + +class PyFrameNameStr(Param): pass +PyFrameNameStr = PyFrameNameStr() + +class PyNOTEBOOK_NAME(Param): pass +PyNOTEBOOK_NAME = PyNOTEBOOK_NAME() + +class PyPanelNameStr(Param): pass +PyPanelNameStr = PyPanelNameStr() + +class PySTCNameStr(Param): pass +PySTCNameStr = PySTCNameStr() + +class SIZE_AUTO(Param): pass +SIZE_AUTO = SIZE_AUTO() + +class SIZE_USE_EXISTING(Param): pass +SIZE_USE_EXISTING = SIZE_USE_EXISTING() + +class TAB_TRAVERSAL(Param): pass +TAB_TRAVERSAL = TAB_TRAVERSAL() + +class VSCROLL(Param): pass +VSCROLL = VSCROLL() + diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxPrinting.py b/wxPython/wxPython/lib/PyCrust/wxd/Printing.py similarity index 95% rename from wxPython/wxPython/lib/PyCrust/decor/wxPrinting.py rename to wxPython/wxPython/lib/PyCrust/wxd/Printing.py index c3da4a5eb5..e51d4e0e8c 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxPrinting.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/Printing.py @@ -12,13 +12,13 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -from wxBase import wxObject -from wxDialogs import wxDialog -from wxFrames import wxFrame -import wxParameters as wx +from Base import Object +from Dialogs import Dialog +from Frames import Frame +import Parameters as wx -class wxPageSetupDialog(wxDialog): +class PageSetupDialog(Dialog): """""" def GetPageSetupData(self): @@ -34,7 +34,7 @@ class wxPageSetupDialog(wxDialog): pass -class wxPageSetupDialogData(wxObject): +class PageSetupDialogData(Object): """""" def EnableHelp(self): @@ -162,7 +162,7 @@ class wxPageSetupDialogData(wxObject): pass -class wxPrintDialog(wxDialog): +class PrintDialog(Dialog): """""" def GetPrintDC(self): @@ -182,7 +182,7 @@ class wxPrintDialog(wxDialog): pass -class wxPrintDialogData(wxObject): +class PrintDialogData(Object): """""" def EnableHelp(self): @@ -286,7 +286,7 @@ class wxPrintDialogData(wxObject): pass -class wxPreviewFrame(wxFrame): +class PreviewFrame(Frame): """""" def Initialize(self): @@ -298,7 +298,7 @@ class wxPreviewFrame(wxFrame): pass -class wxPrintData(wxObject): +class PrintData(Object): """""" def GetCollate(self): @@ -474,7 +474,7 @@ class wxPrintData(wxObject): pass -class wxPrintPreview(wxObject): +class PrintPreview(Object): """""" def GetCanvas(self): @@ -546,7 +546,7 @@ class wxPrintPreview(wxObject): pass -class wxPrinter(wxObject): +class Printer(Object): """""" def CreateAbortWindow(self): @@ -582,7 +582,7 @@ class wxPrinter(wxObject): pass -class wxPrintout(wxObject): +class Printout(Object): """""" def Destroy(self): diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxProcess.py b/wxPython/wxPython/lib/PyCrust/wxd/Process.py similarity index 95% rename from wxPython/wxPython/lib/PyCrust/decor/wxProcess.py rename to wxPython/wxPython/lib/PyCrust/wxd/Process.py index c2da848f51..97c410eaf2 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxProcess.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/Process.py @@ -12,10 +12,10 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -from wxBase import wxEvtHandler +from Base import EvtHandler -class wxProcess(wxEvtHandler): +class Process(EvtHandler): """""" def CloseOutput(self): diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxSashSplitter.py b/wxPython/wxPython/lib/PyCrust/wxd/SashSplitter.py similarity index 95% rename from wxPython/wxPython/lib/PyCrust/decor/wxSashSplitter.py rename to wxPython/wxPython/lib/PyCrust/wxd/SashSplitter.py index 00f9da1176..fd35e0c718 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxSashSplitter.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/SashSplitter.py @@ -12,11 +12,11 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -import wxParameters as wx -from wxWindow import wxWindow +import Parameters as wx +from Window import Window -class wxSashWindow(wxWindow): +class SashWindow(Window): """""" def Create(self): @@ -96,7 +96,7 @@ class wxSashWindow(wxWindow): pass -class wxSashLayoutWindow(wxSashWindow): +class SashLayoutWindow(SashWindow): """""" def Create(self): @@ -128,7 +128,7 @@ class wxSashLayoutWindow(wxSashWindow): pass -class wxSplitterWindow(wxWindow): +class SplitterWindow(Window): """""" def Create(self): diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxSizers.py b/wxPython/wxPython/lib/PyCrust/wxd/Sizers.py similarity index 95% rename from wxPython/wxPython/lib/PyCrust/decor/wxSizers.py rename to wxPython/wxPython/lib/PyCrust/wxd/Sizers.py index 3dfa64d2a2..44446b3d51 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxSizers.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/Sizers.py @@ -12,11 +12,11 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -from wxBase import wxObject -import wxParameters as wx +from Base import Object +import Parameters as wx -class wxSizer(wxObject): +class Sizer(Object): """""" def Add(self): @@ -220,7 +220,7 @@ class wxSizer(wxObject): pass -class wxSizerItem(wxObject): +class SizerItem(Object): """""" def CalcMin(self): @@ -332,7 +332,7 @@ class wxSizerItem(wxObject): pass -class wxBoxSizer(wxSizer): +class BoxSizer(Sizer): """""" def CalcMin(self): @@ -356,7 +356,7 @@ class wxBoxSizer(wxSizer): pass -class wxGridSizer(wxSizer): +class GridSizer(Sizer): """""" def CalcMin(self): @@ -404,7 +404,7 @@ class wxGridSizer(wxSizer): pass -class wxFlexGridSizer(wxGridSizer): +class FlexGridSizer(GridSizer): """""" def AddGrowableCol(self): @@ -436,7 +436,7 @@ class wxFlexGridSizer(wxGridSizer): pass -class wxNotebookSizer(wxSizer): +class NotebookSizer(Sizer): """""" def CalcMin(self): @@ -456,7 +456,7 @@ class wxNotebookSizer(wxSizer): pass -class wxPySizer(wxSizer): +class PySizer(Sizer): """""" def __init__(self): @@ -468,7 +468,7 @@ class wxPySizer(wxSizer): pass -class wxStaticBoxSizer(wxBoxSizer): +class StaticBoxSizer(BoxSizer): """""" def CalcMin(self): diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxStreams.py b/wxPython/wxPython/lib/PyCrust/wxd/Streams.py similarity index 97% rename from wxPython/wxPython/lib/PyCrust/decor/wxStreams.py rename to wxPython/wxPython/lib/PyCrust/wxd/Streams.py index e3eba0ec49..a08b7b336b 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxStreams.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/Streams.py @@ -12,7 +12,7 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -class wxInputStream: +class InputStream: """""" def CanRead(self): @@ -84,7 +84,7 @@ class wxInputStream: pass -class wxOutputStream: +class OutputStream: """""" def __init__(self): diff --git a/wxPython/wxPython/lib/PyCrust/decor/stcConstants.py b/wxPython/wxPython/lib/PyCrust/wxd/StyledTextConstants.py similarity index 100% rename from wxPython/wxPython/lib/PyCrust/decor/stcConstants.py rename to wxPython/wxPython/lib/PyCrust/wxd/StyledTextConstants.py diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxThreading.py b/wxPython/wxPython/lib/PyCrust/wxd/Threading.py similarity index 95% rename from wxPython/wxPython/lib/PyCrust/decor/wxThreading.py rename to wxPython/wxPython/lib/PyCrust/wxd/Threading.py index a3daa52de1..ff1f86bd93 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxThreading.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/Threading.py @@ -12,7 +12,7 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -class wxMutexGuiLocker: +class MutexGuiLocker: """""" def __del__(self): diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxToolBar.py b/wxPython/wxPython/lib/PyCrust/wxd/ToolBar.py similarity index 96% rename from wxPython/wxPython/lib/PyCrust/decor/wxToolBar.py rename to wxPython/wxPython/lib/PyCrust/wxd/ToolBar.py index 72506f72a7..d12ac61b54 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxToolBar.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/ToolBar.py @@ -12,12 +12,12 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -from wxBase import wxObject -from wxControls import wxControl -import wxParameters as wx +from Base import Object +from Controls import Control +import Parameters as wx -class wxToolBarBase(wxControl): +class ToolBarBase(Control): """""" def AddCheckLabelTool(self): @@ -225,7 +225,7 @@ class wxToolBarBase(wxControl): pass -class wxToolBar(wxToolBarBase): +class ToolBar(ToolBarBase): """""" def Create(self): @@ -241,7 +241,7 @@ class wxToolBar(wxToolBarBase): pass -class wxToolBarSimple(wxToolBarBase): +class ToolBarSimple(ToolBarBase): """""" def Create(self): @@ -257,7 +257,7 @@ class wxToolBarSimple(wxToolBarBase): pass -class wxToolBarToolBase(wxObject): +class ToolBarToolBase(Object): """""" def Attach(self): diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxTree.py b/wxPython/wxPython/lib/PyCrust/wxd/Tree.py similarity index 96% rename from wxPython/wxPython/lib/PyCrust/decor/wxTree.py rename to wxPython/wxPython/lib/PyCrust/wxd/Tree.py index 91a4711479..46ae981f33 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxTree.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/Tree.py @@ -12,12 +12,12 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -from wxBase import wxObject -from wxControls import wxControl -import wxParameters as wx +from Base import Object +from Controls import Control +import Parameters as wx -class wxTreeCtrl(wxControl): +class TreeCtrl(Control): """""" def AddRoot(self): @@ -309,7 +309,7 @@ class wxTreeCtrl(wxControl): pass -class wxTreeItemAttr: +class TreeItemAttr: """""" def GetBackgroundColour(self): @@ -353,7 +353,7 @@ class wxTreeItemAttr: pass -class wxTreeItemData(wxObject): +class TreeItemData(Object): """""" def GetData(self): @@ -377,7 +377,7 @@ class wxTreeItemData(wxObject): pass -class wxTreeItemId: +class TreeItemId: """""" def IsOk(self): diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxValidators.py b/wxPython/wxPython/lib/PyCrust/wxd/Validators.py similarity index 86% rename from wxPython/wxPython/lib/PyCrust/decor/wxValidators.py rename to wxPython/wxPython/lib/PyCrust/wxd/Validators.py index 11e83f60ac..88f1054a0e 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxValidators.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/Validators.py @@ -12,11 +12,11 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -from wxBase import wxEvtHandler -import wxParameters as wx +from Base import EvtHandler +import Parameters as wx -class wxValidator(wxEvtHandler): +class Validator(EvtHandler): """""" def __init__(self): @@ -36,7 +36,7 @@ class wxValidator(wxEvtHandler): pass -class wxPyValidator(wxValidator): +class PyValidator(Validator): """""" def __init__(self): diff --git a/wxPython/wxPython/lib/PyCrust/decor/wxWindow.py b/wxPython/wxPython/lib/PyCrust/wxd/Window.py similarity index 92% rename from wxPython/wxPython/lib/PyCrust/decor/wxWindow.py rename to wxPython/wxPython/lib/PyCrust/wxd/Window.py index 9f6b8204a9..16ec016480 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/wxWindow.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/Window.py @@ -12,15 +12,15 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -from wxBase import wxEvtHandler -import wxParameters as wx +from Base import EvtHandler +import Parameters as wx -class wxWindow(wxEvtHandler): +class Window(EvtHandler): """""" - def __init__(self, parent, id, pos=wx.wxDefaultPosition, - size=wx.wxDefaultSize, style=0, name=wx.wxPyPanelNameStr): + def __init__(self, parent, id, pos=wx.DefaultPosition, + size=wx.DefaultSize, style=0, name=wx.PyPanelNameStr): """""" pass @@ -36,27 +36,27 @@ class wxWindow(wxEvtHandler): """""" pass - def Center(self, direction=wx.wxBOTH): + def Center(self, direction=wx.BOTH): """""" pass - def CenterOnParent(self, direction=wx.wxBOTH): + def CenterOnParent(self, direction=wx.BOTH): """""" pass - def CenterOnScreen(self, direction=wx.wxBOTH): + def CenterOnScreen(self, direction=wx.BOTH): """""" pass - def Centre(self, direction=wx.wxBOTH): + def Centre(self, direction=wx.BOTH): """""" pass - def CentreOnParent(self, direction=wx.wxBOTH): + def CentreOnParent(self, direction=wx.BOTH): """""" pass - def CentreOnScreen(self, direction=wx.wxBOTH): + def CentreOnScreen(self, direction=wx.BOTH): """""" pass @@ -92,8 +92,8 @@ class wxWindow(wxEvtHandler): """""" pass - def Create(self, parent, id, pos=wx.wxDefaultPosition, - size=wx.wxDefaultSize, style=0, name=wx.wxPyPanelNameStr): + def Create(self, parent, id, pos=wx.DefaultPosition, + size=wx.DefaultSize, style=0, name=wx.PyPanelNameStr): """""" pass @@ -402,7 +402,7 @@ class wxWindow(wxEvtHandler): pass def LoadFromResource(self, parent, resourceName, resourceTable=wx.NULL): - """Only if wxUSE_WX_RESOURCES.""" + """Only if USE_WX_RESOURCES.""" pass def Lower(self): @@ -413,11 +413,11 @@ class wxWindow(wxEvtHandler): """""" pass - def Move(self, point, flags=wx.wxSIZE_USE_EXISTING): + def Move(self, point, flags=wx.SIZE_USE_EXISTING): """""" pass - def MoveXY(self, x, y, flags=wx.wxSIZE_USE_EXISTING): + def MoveXY(self, x, y, flags=wx.SIZE_USE_EXISTING): """""" pass @@ -589,11 +589,11 @@ class wxWindow(wxEvtHandler): """""" pass - def SetPosition(self, pos, flags=wx.wxSIZE_USE_EXISTING): + def SetPosition(self, pos, flags=wx.SIZE_USE_EXISTING): """""" pass - def SetRect(self, rect, sizeFlags=wx.wxSIZE_AUTO): + def SetRect(self, rect, sizeFlags=wx.SIZE_AUTO): """""" pass @@ -605,7 +605,7 @@ class wxWindow(wxEvtHandler): """""" pass - def SetSize(self, x, y, width, height, sizeFlags=wx.wxSIZE_AUTO): + def SetSize(self, x, y, width, height, sizeFlags=wx.SIZE_AUTO): """""" pass @@ -698,7 +698,7 @@ class wxWindow(wxEvtHandler): pass -class wxPyWindow(wxWindow): +class PyWindow(Window): """""" def __init__(self): @@ -782,7 +782,7 @@ class wxPyWindow(wxWindow): pass -class wxTopLevelWindow(wxWindow): +class TopLevelWindow(Window): """""" def Create(self): diff --git a/wxPython/wxPython/lib/PyCrust/decor/__init__.py b/wxPython/wxPython/lib/PyCrust/wxd/__init__.py similarity index 100% rename from wxPython/wxPython/lib/PyCrust/decor/__init__.py rename to wxPython/wxPython/lib/PyCrust/wxd/__init__.py diff --git a/wxPython/wxPython/lib/PyCrust/wxd/d_stc.py b/wxPython/wxPython/lib/PyCrust/wxd/d_stc.py new file mode 100644 index 0000000000..e906ffc889 --- /dev/null +++ b/wxPython/wxPython/lib/PyCrust/wxd/d_stc.py @@ -0,0 +1,17 @@ +"""Decorator utility for documentation and shell scripting. + +When you import stc from this module, all of the classes get decorated +with docstrings from our decoration class definitions. +""" + +__author__ = "Patrick K. O'Brien " +__cvsid__ = "$Id$" +__revision__ = "$Revision$"[11:-2] + +from wxPython import stc + +import stc_ + +import decorator + +decorator.decorate(real=stc, decoration=stc_) diff --git a/wxPython/wxPython/lib/PyCrust/wxd/d_wx.py b/wxPython/wxPython/lib/PyCrust/wxd/d_wx.py new file mode 100644 index 0000000000..f837473463 --- /dev/null +++ b/wxPython/wxPython/lib/PyCrust/wxd/d_wx.py @@ -0,0 +1,17 @@ +"""Decorator utility for documentation and shell scripting. + +When you import wx from this module, all of the classes get decorated +with docstrings from our decoration class definitions. +""" + +__author__ = "Patrick K. O'Brien " +__cvsid__ = "$Id$" +__revision__ = "$Revision$"[11:-2] + +from wxPython import wx + +import wx_ + +import decorator + +decorator.decorate(real=wx, decoration=wx_) diff --git a/wxPython/wxPython/lib/PyCrust/decor/decorate.py b/wxPython/wxPython/lib/PyCrust/wxd/decorator.py similarity index 51% rename from wxPython/wxPython/lib/PyCrust/decor/decorate.py rename to wxPython/wxPython/lib/PyCrust/wxd/decorator.py index f7c7ede890..26b619d3f9 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/decorate.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/decorator.py @@ -1,41 +1,30 @@ -"""Decorator utility for documentation and shell scripting. - -When you import wx and stc from this module, all of their classes get -decorated with docstrings from our decorator class definitions. -""" +"""Decorator utility for documentation and shell scripting.""" __author__ = "Patrick K. O'Brien " __cvsid__ = "$Id$" __revision__ = "$Revision$"[11:-2] -# The classes in these modules will get decorated. -#------------------------------------------------- - -from wxPython import wx -from wxPython import stc - - -# Code for decorating existing classes. -# ------------------------------------- - import inspect -def decorate(item, wxdict): - """Use item to decorate the matching class in wxdict.""" - if inspect.isclass(item): - decorateClass(item, wxdict) - elif inspect.isfunction(item): - decorateFunction(item, wxdict) +def decorate(real, decoration): + """Decorate real module with docstrings from decoration module.""" + realdict = real.__dict__ + for item in decoration.__dict__.itervalues(): + if inspect.isclass(item): + decorateClass(item, realdict) + elif inspect.isfunction(item): + decorateFunction(item, realdict) -def decorateClass(item, wxdict): +def decorateClass(item, realdict): classname = item.__name__ - if classname in wxdict.keys(): - wxclass = wxdict[classname] -## XXX Not sure if we'll need this or not, but it's here just in case. -## pointername = classname + 'Ptr' -## if pointer in wxdict: -## wxclassPtr = wxdict[pointername] + if not classname.startswith('wx'): + classname = 'wx' + classname + try: + wxclass = realdict[classname] + except: + print classname + else: if item.__doc__: wxclass.__doc__ = item.__doc__ # Get attributes from only the item's local dictionary! @@ -59,10 +48,10 @@ def decorateClass(item, wxdict): except: pass -def decorateFunction(item, wxdict): +def decorateFunction(item, realdict): funcname = item.__name__ - if funcname in wxdict.keys(): - func = wxdict[funcname] + if funcname in realdict.keys(): + func = realdict[funcname] doc = getdoc(item, drop=False) try: # Built-in functions have a read-only docstring. :-( @@ -95,34 +84,3 @@ def getdoc(attr, drop=False): if tip != firstline: doc = '%s\n\n%s' % (tip, doc) return doc - - -# For each decorator class, apply docstrings to the matching class. -#--------------------------------------------------------------------- -# The order in which docstrings are applied could be important, -# depending on how we handle multiple inheritance. We may want to -# work from parent to child. We may also have to be clever about how -# we apply the docstrings in the case where our class definitions are -# not an exact match with the wxPython class definitions. For -# example, if we define a method in a child class that wxPython does -# not, our docstring for the child method may end up on the parent or -# grandparent method. If the parent or grandparent is not just an -# abstract class, or if the method is shared by more than one -# subclass, none of which override it, the docstring would be -# misleading. - - -import wxDecor -[decorate(item, wx.__dict__) for item in wxDecor.__dict__.values()] - -import stcDecor -[decorate(item, stc.__dict__) for item in stcDecor.__dict__.values()] - - -# Test the timing of the list comprehension approach vs. the for loop: - -##for item in wxDecor.__dict__.itervalues(): -## decorate(item, wx.__dict__) -## -##for item in stcDecor.__dict__.itervalues(): -## decorate(item, stc.__dict__) diff --git a/wxPython/wxPython/lib/PyCrust/wxd/gen.py b/wxPython/wxPython/lib/PyCrust/wxd/gen.py new file mode 100644 index 0000000000..2e07922ade --- /dev/null +++ b/wxPython/wxPython/lib/PyCrust/wxd/gen.py @@ -0,0 +1,71 @@ + +import inspect +from wxPython import wx + + +def scan(): + d = wx.__dict__ + newd = {} + keys = d.keys() + keys.sort() + for key in keys: + if key.endswith('Ptr'): + # Skip + pass + elif key+'Ptr' in keys: + # Rename + newd[key] = d[key+'Ptr'] + else: + # Include as is + newd[key] = d[key] + d = newd + keys = d.keys() + keys.sort() + for key in keys: + value = d[key] + if inspect.isclass(value): + # genClass(value) + pass + elif callable(value): + genFunction(value) + pass + else: + # print type(value), value + pass + + +def genClass(cls): + sp4 = ' ' * 4 + name = cls.__name__ + if name.endswith('Ptr'): + name = name[:-3] +## if name != 'wxNotebook': +## return + parent = '' + if cls.__bases__: + parent = cls.__bases__[0].__name__ + if parent.endswith('Ptr'): + parent = parent[:-3] + parent = '(%s)' % parent + items = cls.__dict__.keys() + items.sort() + print + print 'class %s%s:' % (name, parent) + print sp4 + '""""""' + print + for item in items: + attr = cls.__dict__[item] + if inspect.isfunction(attr): + print sp4 + 'def ' + item + '(self):' + print sp4 + sp4 + '""""""' + print sp4 + sp4 + 'pass' + print + + +def genFunction(func): + sp4 = ' ' * 4 + name = func.__name__ + print 'def %s():' % name + print sp4 + '""""""' + print sp4 + 'pass' + print diff --git a/wxPython/wxPython/lib/PyCrust/decor/stcDecor.py b/wxPython/wxPython/lib/PyCrust/wxd/stc_.py similarity index 98% rename from wxPython/wxPython/lib/PyCrust/decor/stcDecor.py rename to wxPython/wxPython/lib/PyCrust/wxd/stc_.py index 21e0a23a7d..2902d24cb5 100644 --- a/wxPython/wxPython/lib/PyCrust/decor/stcDecor.py +++ b/wxPython/wxPython/lib/PyCrust/wxd/stc_.py @@ -12,16 +12,16 @@ __revision__ = "$Revision$"[11:-2] # C-language classes. -from wxControls import wxControl -import wxParameters as wx +from Controls import Control +import Parameters as wx -class wxStyledTextCtrl(wxControl): - """wxStyledTextCtrl class.""" +class StyledTextCtrl(Control): + """StyledTextCtrl class.""" - def __init__(self, parent, id, pos=wx.wxDefaultPosition, - size=wx.wxDefaultSize, style=0, name=wx.wxPySTCNameStr): - """Create a wxStyledTextCtrl instance.""" + def __init__(self, parent, id, pos=wx.DefaultPosition, + size=wx.DefaultSize, style=0, name=wx.PySTCNameStr): + """Create a StyledTextCtrl instance.""" pass def AddRefDocument(self, docPointer): @@ -216,7 +216,7 @@ class wxStyledTextCtrl(wxControl): pass def CmdKeyExecute(self, cmd): - """Perform one of the operations defined by the wxSTC_CMD_* + """Perform one of the operations defined by the STC_CMD_* constants.""" pass @@ -721,7 +721,7 @@ class wxStyledTextCtrl(wxControl): pass def MarkerDefine(self, markerNumber, markerSymbol, - foreground=wx.wxNullColour, background=wx.wxNullColour): + foreground=wx.NullColour, background=wx.NullColour): """Set the symbol used for a particular marker number, and optionally the fore and background colours.""" pass @@ -1306,7 +1306,7 @@ class wxStyledTextCtrl(wxControl): def StyleSetFont(self, styleNum, font): """Set style size, face, bold, italic, and underline - attributes from a wxFont's attributes.""" + attributes from a Font's attributes.""" pass def StyleSetFontAttr(self, styleNum, size, faceName, diff --git a/wxPython/wxPython/lib/PyCrust/wxd/wx_.py b/wxPython/wxPython/lib/PyCrust/wxd/wx_.py new file mode 100644 index 0000000000..c2ba522a49 --- /dev/null +++ b/wxPython/wxPython/lib/PyCrust/wxd/wx_.py @@ -0,0 +1,57 @@ +"""Decorator classes for documentation and shell scripting. +""" + +__author__ = "Patrick K. O'Brien " +__cvsid__ = "$Id$" +__revision__ = "$Revision$"[11:-2] + + +# These are not the real wxPython classes. These are Python versions +# for documentation purposes. They are also used to apply docstrings +# to the real wxPython classes, which are SWIG-generated wrappers for +# C-language classes. + + +_topics = { + 'Accelerators': None, + 'App': None, + 'Base': None, + 'ClipDragDrop': None, + 'Config': None, + 'Controls': None, + 'DataStructures': None, + 'DateTime': None, + 'Dialogs': None, + 'Drawing': None, + 'Errors': None, + 'EventFunctions': None, + 'Events': None, + 'FileSystem': None, + 'Frames': None, + 'Functions': None, + 'Help': None, + 'ImageHandlers': None, + 'Joystick': None, + 'LayoutConstraints': None, + 'Logging': None, + 'Menus': None, + 'MimeTypes': None, + 'Misc': None, + 'Panel': None, + 'Printing': None, + 'Process': None, + 'SashSplitter': None, + 'Sizers': None, + 'Streams': None, + 'Threading': None, + 'ToolBar': None, + 'Tree': None, + 'Validators': None, + 'Window': None, + } + +for topic in _topics: + _topics[topic] = __import__(topic, globals()) + exec 'from %s import *' % topic + +del topic # Cleanup the namespace.