Added a set of 2.4 compatibility classes for the wxDC classes that

replaces the normal Draw methods with those that have 2.4 compatible
parameter lists.  These classes are used by default only when
importing from wxPython.wx (the "old" namespace.)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25074 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-01-06 21:32:42 +00:00
parent 089142a562
commit 4942342c3e
4 changed files with 128 additions and 67 deletions

View File

@@ -35,28 +35,23 @@ def wxPyTypeCast(obj, typeStr):
wxPy_isinstance = isinstance
# To get wxDC methods compatible with the old 2.4 wxDC uncomment these
# lines. Note however that doing this will break any code that
# expects the new-style methods. (Is there a way to do this that does
# not have that problem? I suppose we could provide two versions of
# the DC classes and just rename them here...)
#wxDC.FloodFill = wxDC.FloodFillXY
#wxDC.GetPixel = wxDC.GetPixelXY
#wxDC.DrawLine = wxDC.DrawLineXY
#wxDC.CrossHair = wxDC.CrossHairXY
#wxDC.DrawArc = wxDC.DrawArcXY
#wxDC.DrawCheckMark = wxDC.DrawCheckMarkXY
#wxDC.DrawEllipticArc = wxDC.DrawEllipticArcXY
#wxDC.DrawPoint = wxDC.DrawPointXY
#wxDC.DrawRectangle = wxDC.DrawRectangleXY
#wxDC.DrawRoundedRectangle = wxDC.DrawRoundedRectangleXY
#wxDC.DrawCircle = wxDC.DrawCircleXY
#wxDC.DrawEllipse = wxDC.DrawEllipseXY
#wxDC.DrawIcon = wxDC.DrawIconXY
#wxDC.DrawBitmap = wxDC.DrawBitmapXY
#wxDC.DrawText = wxDC.DrawTextXY
#wxDC.DrawRotatedText = wxDC.DrawRotatedTextXY
#wxDC.Blit = wxDC.BlitXY
#wxDC.SetClippingRegion = wxDC.SetClippingRegionXY
# The wx*DC_old classes have Draw* method signatures that are mostly
# compatible with 2.4, so assign the new classes to wx*DC_new and make
# the _old classes be the defaults with the normal names.
# Too bad it doesn't currently work...
wxDC_new = wxDC; wxDC = wxDC_old
wxMemoryDC_new = wxMemoryDC; wxMemoryDC = wxMemoryDC_old
wxBufferedDC_new = wxBufferedDC; wxBufferedDC = wxBufferedDC_old
wxBufferedPaintDC_new = wxBufferedPaintDC; wxBufferedPaintDC = wxBufferedPaintDC_old
wxScreenDC_new = wxScreenDC; wxScreenDC = wxScreenDC_old
wxClientDC_new = wxClientDC; wxClientDC = wxClientDC_old
wxPaintDC_new = wxPaintDC; wxPaintDC = wxPaintDC_old
wxWindowDC_new = wxWindowDC; wxWindowDC = wxWindowDC_old
wxMirrorDC_new = wxMirrorDC; wxMirrorDC = wxMirrorDC_old
wxPostScriptDC_new = wxPostScriptDC; wxPostScriptDC = wxPostScriptDC_old
wxMetaFileDC_new = wxMetaFileDC; wxMetaFileDC = wxMetaFileDC_old
wxPrinterDC_new = wxPrinterDC; wxPrinterDC = wxPrinterDC_old