From: Robin Dunn Date: Wed, 2 Jun 2004 20:49:09 +0000 (+0000) Subject: Added $Id keyword, a bit of cleanup and also some backwards X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/6fd864d1591eca9ccd0cb2ccad5a92d9e15f893b Added $Id keyword, a bit of cleanup and also some backwards compatibility aliases. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27591 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/wx/lib/ogl/basic.py b/wxPython/wx/lib/ogl/basic.py index 3aacb596d0..43bdb74248 100644 --- a/wxPython/wx/lib/ogl/basic.py +++ b/wxPython/wx/lib/ogl/basic.py @@ -5,8 +5,8 @@ # # Author: Pierre Hjälm (from C++ original by Julian Smart) # -# Created: 20040508 -# RCS-ID: +# Created: 2004-05-08 +# RCS-ID: $Id$ # Copyright: (c) 2004 Pierre Hjälm - 1998 Julian Smart # Licence: wxWindows license #---------------------------------------------------------------------------- diff --git a/wxPython/wx/lib/ogl/bmpshape.py b/wxPython/wx/lib/ogl/bmpshape.py index 76e06de111..9346bc775f 100644 --- a/wxPython/wx/lib/ogl/bmpshape.py +++ b/wxPython/wx/lib/ogl/bmpshape.py @@ -5,8 +5,8 @@ # # Author: Pierre Hjälm (from C++ original by Julian Smart) # -# Created: 20040508 -# RCS-ID: +# Created: 2004-05-08 +# RCS-ID: $Id$ # Copyright: (c) 2004 Pierre Hjälm - 1998 Julian Smart # Licence: wxWindows license #---------------------------------------------------------------------------- diff --git a/wxPython/wx/lib/ogl/canvas.py b/wxPython/wx/lib/ogl/canvas.py index aaafd4d1e8..d9ad610b0f 100644 --- a/wxPython/wx/lib/ogl/canvas.py +++ b/wxPython/wx/lib/ogl/canvas.py @@ -5,8 +5,8 @@ # # Author: Pierre Hjälm (from C++ original by Julian Smart) # -# Created: 20040508 -# RCS-ID: +# Created: 2004-05-08 +# RCS-ID: $Id$ # Copyright: (c) 2004 Pierre Hjälm - 1998 Julian Smart # Licence: wxWindows license #---------------------------------------------------------------------------- diff --git a/wxPython/wx/lib/ogl/composit.py b/wxPython/wx/lib/ogl/composit.py index 8d53b9db95..6f502aba09 100644 --- a/wxPython/wx/lib/ogl/composit.py +++ b/wxPython/wx/lib/ogl/composit.py @@ -5,8 +5,8 @@ # # Author: Pierre Hjälm (from C++ original by Julian Smart) # -# Created: 20040508 -# RCS-ID: +# Created: 2004-05-08 +# RCS-ID: $Id$ # Copyright: (c) 2004 Pierre Hjälm - 1998 Julian Smart # Licence: wxWindows license #---------------------------------------------------------------------------- @@ -21,8 +21,8 @@ from oglmisc import * KEY_SHIFT, KEY_CTRL = 1, 2 -objectStartX = 0.0 -objectStartY = 0.0 +_objectStartX = 0.0 +_objectStartY = 0.0 CONSTRAINT_CENTRED_VERTICALLY = 1 CONSTRAINT_CENTRED_HORIZONTALLY = 2 @@ -44,6 +44,24 @@ CONSTRAINT_MIDALIGNED_LEFT = 14 CONSTRAINT_MIDALIGNED_RIGHT = 15 +# Backwards compatibility names. These should be removed eventually. +gyCONSTRAINT_CENTRED_VERTICALLY = CONSTRAINT_CENTRED_VERTICALLY +gyCONSTRAINT_CENTRED_HORIZONTALLY = CONSTRAINT_CENTRED_HORIZONTALLY +gyCONSTRAINT_CENTRED_BOTH = CONSTRAINT_CENTRED_BOTH +gyCONSTRAINT_LEFT_OF = CONSTRAINT_LEFT_OF +gyCONSTRAINT_RIGHT_OF = CONSTRAINT_RIGHT_OF +gyCONSTRAINT_ABOVE = CONSTRAINT_ABOVE +gyCONSTRAINT_BELOW = CONSTRAINT_BELOW +gyCONSTRAINT_ALIGNED_TOP = CONSTRAINT_ALIGNED_TOP +gyCONSTRAINT_ALIGNED_BOTTOM = CONSTRAINT_ALIGNED_BOTTOM +gyCONSTRAINT_ALIGNED_LEFT = CONSTRAINT_ALIGNED_LEFT +gyCONSTRAINT_ALIGNED_RIGHT = CONSTRAINT_ALIGNED_RIGHT +gyCONSTRAINT_MIDALIGNED_TOP = CONSTRAINT_MIDALIGNED_TOP +gyCONSTRAINT_MIDALIGNED_BOTTOM = CONSTRAINT_MIDALIGNED_BOTTOM +gyCONSTRAINT_MIDALIGNED_LEFT = CONSTRAINT_MIDALIGNED_LEFT +gyCONSTRAINT_MIDALIGNED_RIGHT = CONSTRAINT_MIDALIGNED_RIGHT + + class ConstraintType(object): def __init__(self, theType, theName, thePhrase): @@ -353,6 +371,8 @@ class Constraint(object): return False +OGLConstraint = wx._core._deprecated(Constraint, + "The OGLConstraint name is deprecated, use `ogl.Constraint` instead.") class CompositeShape(RectangleShape): @@ -412,8 +432,8 @@ class CompositeShape(RectangleShape): def OnDragLeft(self, draw, x, y, keys = 0, attachment = 0): xx, yy = self._canvas.Snap(x, y) - offsetX = xx-objectStartX - offsetY = yy-objectStartY + offsetX = xx - _objectStartX + offsetY = yy - _objectStartY dc = wx.ClientDC(self.GetCanvas()) self.GetCanvas().PrepareDC(dc) @@ -426,10 +446,10 @@ class CompositeShape(RectangleShape): self.GetEventHandler().OnDrawOutline(dc, self.GetX() + offsetX, self.GetY() + offsetY, self.GetWidth(), self.GetHeight()) def OnBeginDragLeft(self, x, y, keys = 0, attachment = 0): - global objectStartX, objectStartY + global _objectStartX, _objectStartY - objectStartX = x - objectStartY = y + _objectStartX = x + _objectStartY = y dc = wx.ClientDC(self.GetCanvas()) self.GetCanvas().PrepareDC(dc) @@ -443,8 +463,8 @@ class CompositeShape(RectangleShape): self._canvas.CaptureMouse() xx, yy = self._canvas.Snap(x, y) - offsetX = xx-objectStartX - offsetY = yy-objectStartY + offsetX = xx - _objectStartX + offsetY = yy - _objectStartY self.GetEventHandler().OnDrawOutline(dc, self.GetX() + offsetX, self.GetY() + offsetY, self.GetWidth(), self.GetHeight()) @@ -465,8 +485,8 @@ class CompositeShape(RectangleShape): dc.SetLogicalFunction(wx.COPY) xx, yy = self._canvas.Snap(x, y) - offsetX = xx-objectStartX - offsetY = yy-objectStartY + offsetX = xx - _objectStartX + offsetY = yy - _objectStartY self.Move(dc, self.GetX() + offsetX, self.GetY() + offsetY) diff --git a/wxPython/wx/lib/ogl/diagram.py b/wxPython/wx/lib/ogl/diagram.py index 86c0dd9e02..95ef272206 100644 --- a/wxPython/wx/lib/ogl/diagram.py +++ b/wxPython/wx/lib/ogl/diagram.py @@ -5,8 +5,8 @@ # # Author: Pierre Hjälm (from C++ original by Julian Smart) # -# Created: 20040508 -# RCS-ID: +# Created: 2004-05-08 +# RCS-ID: $Id$ # Copyright: (c) 2004 Pierre Hjälm - 1998 Julian Smart # Licence: wxWindows license #---------------------------------------------------------------------------- diff --git a/wxPython/wx/lib/ogl/divided.py b/wxPython/wx/lib/ogl/divided.py index 73ea006c06..2c7a5b8e67 100644 --- a/wxPython/wx/lib/ogl/divided.py +++ b/wxPython/wx/lib/ogl/divided.py @@ -5,8 +5,8 @@ # # Author: Pierre Hjälm (from C++ original by Julian Smart) # -# Created: 20040508 -# RCS-ID: +# Created: 2004-05-08 +# RCS-ID: $Id$ # Copyright: (c) 2004 Pierre Hjälm - 1998 Julian Smart # Licence: wxWindows license #---------------------------------------------------------------------------- diff --git a/wxPython/wx/lib/ogl/lines.py b/wxPython/wx/lib/ogl/lines.py index 1012d160cc..f4a191be9a 100644 --- a/wxPython/wx/lib/ogl/lines.py +++ b/wxPython/wx/lib/ogl/lines.py @@ -5,8 +5,8 @@ # # Author: Pierre Hjälm (from C++ original by Julian Smart) # -# Created: 20040508 -# RCS-ID: +# Created: 2004-05-08 +# RCS-ID: $Id$ # Copyright: (c) 2004 Pierre Hjälm - 1998 Julian Smart # Licence: wxWindows license #---------------------------------------------------------------------------- diff --git a/wxPython/wx/lib/ogl/oglmisc.py b/wxPython/wx/lib/ogl/oglmisc.py index a899c0e96b..478f2ee774 100644 --- a/wxPython/wx/lib/ogl/oglmisc.py +++ b/wxPython/wx/lib/ogl/oglmisc.py @@ -5,8 +5,8 @@ # # Author: Pierre Hjälm (from C++ original by Julian Smart) # -# Created: 20040508 -# RCS-ID: +# Created: 2004-05-08 +# RCS-ID: $Id$ # Copyright: (c) 2004 Pierre Hjälm - 1998 Julian Smart # Licence: wxWindows license #----------------------------------------------------------------------------