Switched to using True/False in the wxPython lib and demo instead of

true/false or TRUE/FALSE to prepare for the new boolean type and
constants being added to Python.  Added code to wx.py to test for the
existence of the new constants and to create suitable values if not
present.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-02-26 18:38:37 +00:00
parent a57fa3cc36
commit 64dfb023eb
135 changed files with 953 additions and 946 deletions

View File

@@ -9,9 +9,9 @@ class DragShape:
def __init__(self, bmp):
self.bmp = bmp
self.pos = wxPoint(0,0)
self.shown = true
self.shown = True
self.text = None
self.fullscreen = false
self.fullscreen = False
def HitTest(self, pt):
@@ -31,11 +31,11 @@ class DragShape:
dc.Blit(self.pos.x, self.pos.y,
self.bmp.GetWidth(), self.bmp.GetHeight(),
memDC, 0, 0, op, true)
memDC, 0, 0, op, True)
return true
return True
else:
return false
return False
@@ -58,7 +58,7 @@ class DragCanvas(wxScrolledWindow):
bmp = images.getTestStarBitmap()
shape = DragShape(bmp)
shape.pos = wxPoint(5, 5)
shape.fullscreen = true
shape.fullscreen = True
self.shapes.append(shape)
@@ -185,7 +185,7 @@ class DragCanvas(wxScrolledWindow):
# reposition and draw the shape
self.dragShape.pos = self.dragShape.pos + evt.GetPosition() - self.dragStartPos
self.dragShape.shown = true
self.dragShape.shown = True
self.dragShape.Draw(dc)
self.dragShape = None
@@ -207,7 +207,7 @@ class DragCanvas(wxScrolledWindow):
# erase the shape since it will be drawn independently now
dc = wxClientDC(self)
self.dragShape.shown = false
self.dragShape.shown = False
self.EraseShape(self.dragShape, dc)
@@ -228,16 +228,16 @@ class DragCanvas(wxScrolledWindow):
# if we have shape and image then move it, posibly highlighting another shape.
elif self.dragShape and self.dragImage:
onShape = self.FindShape(evt.GetPosition())
unhiliteOld = false
hiliteNew = false
unhiliteOld = False
hiliteNew = False
# figure out what to hilite and what to unhilite
if self.hiliteShape:
if onShape is None or self.hiliteShape is not onShape:
unhiliteOld = true
unhiliteOld = True
if onShape and onShape is not self.hiliteShape and onShape.shown:
hiliteNew = TRUE
hiliteNew = True
# if needed, hide the drag image so we can update the window
if unhiliteOld or hiliteNew: