Minor tweaks

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@34304 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2005-05-23 22:29:06 +00:00
parent 5da070d00f
commit c580b5db1f
8 changed files with 27 additions and 22 deletions

View File

@@ -96,14 +96,18 @@ else:
EVT_LEFT_UP(self, self.OnMouseUp)
EVT_MOTION(self, self.OnMouseMotion)
def OnEraseBackground(self, event):
pass # Do nothing, to avoid flashing on MSW.
def OnSize(self, event):
size = self.GetClientSize()
if self.GetContext():
self.SetCurrent()
glViewport(0, 0, size.width, size.height)
event.Skip()
def OnPaint(self, event):
dc = wxPaintDC(self)
@@ -113,12 +117,15 @@ else:
self.init = True
self.OnDraw()
def OnMouseDown(self, evt):
self.CaptureMouse()
def OnMouseUp(self, evt):
self.ReleaseMouse()
def OnMouseMotion(self, evt):
if evt.Dragging() and evt.LeftIsDown():
self.x, self.y = self.lastx, self.lasty