]> git.saurik.com Git - wxWidgets.git/commitdiff
backwards compatibility aliases can be used in the wxPython namespace
authorRobin Dunn <robin@alldunn.com>
Tue, 23 Dec 2003 21:37:21 +0000 (21:37 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 23 Dec 2003 21:37:21 +0000 (21:37 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/src/_colour.i
wxPython/src/_settings.i
wxPython/wxPython/_wx.py

index 55af312eef71f5b013daaa6b487f316b90c217da..c1df0f8df2ece5d047b813697bc668bc60136df3 100644 (file)
@@ -83,9 +83,10 @@ public:
         }
 };
 
-%pythoncode {
-    Color = Colour
-    NamedColor = NamedColour    
-}
+// %pythoncode {
+//     Color = Colour
+//     NamedColor = NamedColour    
+// }
+
 //---------------------------------------------------------------------------
 
index 28ba50b29030087547d4bfc13b352f23740a1270..379a988facb29ab35a4ccc37cd1046d2fa52ed14 100644 (file)
@@ -175,12 +175,12 @@ public:
 };
 
 
-%pythoncode {
-%# backwards compatibility aliasses
-SystemSettings_GetSystemColour = SystemSettings_GetColour
-SystemSettings_GetSystemFont   = SystemSettings_GetFont
-SystemSettings_GetSystemMetric = SystemSettings_GetMetric
-}    
+// %pythoncode {
+// %# backwards compatibility aliasses
+// SystemSettings_GetSystemColour = SystemSettings_GetColour
+// SystemSettings_GetSystemFont   = SystemSettings_GetFont
+// SystemSettings_GetSystemMetric = SystemSettings_GetMetric
+// }    
 
 
 //---------------------------------------------------------------------------
index 9342b81db225010f1312cfb09ddaf8a962c368e4..848c96b70cc9f8dfdce49189a56781eaac8296c2 100644 (file)
@@ -9,3 +9,47 @@ from misc import *
 
 # Cleanup this one.
 del wx
+
+
+# Make some to help backawrds compatibility for the old namespace.
+# This is only for code that is using tthe wxPython.wx package and
+# using names and classes in the old way.  New code should use the wx
+# namespace and the new names.
+
+wxPyDefaultPosition = wxDefaultPosition
+wxPyDefaultSize = wxDefaultSize
+wxNoRefBitmap = wxBitmap
+wxSystemSettings_GetSystemColour = wxSystemSettings_GetColour
+wxSystemSettings_GetSystemFont   = wxSystemSettings_GetFont
+wxSystemSettings_GetSystemMetric = wxSystemSettings_GetMetric
+wxColor = wxColour
+wxNamedColor = wxNamedColour    
+
+NULL = None
+TRUE  = true  = True
+FALSE = false = False
+
+def wxPyTypeCast(obj, typeStr):
+    return obj
+
+wxPy_isinstance = isinstance
+
+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 
+