Some missing methods and etc. added
Some minor tweaks and fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -59,9 +59,14 @@ class SplashScreen(wxFrame):
|
||||
size = (size[0], wxSystemSettings_GetSystemMetric(wxSYS_SCREEN_Y))
|
||||
|
||||
wxFrame.__init__(self, parent, ID, title, pos, size, style)
|
||||
EVT_LEFT_DOWN(self, self.OnMouseClick)
|
||||
EVT_CLOSE(self, self.OnCloseWindow)
|
||||
EVT_PAINT(self, self.OnPaint)
|
||||
EVT_ERASE_BACKGROUND(self, self.OnEraseBG)
|
||||
|
||||
self.Show(true)
|
||||
dc = wxClientDC(self)
|
||||
dc.DrawBitmap(self.bitmap, 0,0, false)
|
||||
#dc = wxClientDC(self)
|
||||
#dc.DrawBitmap(self.bitmap, 0,0, false)
|
||||
|
||||
class SplashTimer(wxTimer):
|
||||
def __init__(self, targetFunction):
|
||||
@@ -73,26 +78,23 @@ class SplashScreen(wxFrame):
|
||||
|
||||
self.timer = SplashTimer(callback)
|
||||
self.timer.Start(duration, 1) # one-shot only
|
||||
EVT_LEFT_DOWN(self, self.OnMouseClick)
|
||||
EVT_CLOSE(self, self.OnCloseWindow)
|
||||
EVT_PAINT(self, self.OnPaint)
|
||||
|
||||
def OnPaint(self, event):
|
||||
dc = wxPaintDC(self)
|
||||
dc.DrawBitmap(self.bitmap, 0,0, false)
|
||||
|
||||
def OnEraseBG(self, event):
|
||||
pass
|
||||
|
||||
def OnSplashExitDefault(self, event=None):
|
||||
self.Close(true)
|
||||
|
||||
|
||||
def OnCloseWindow(self, event=None):
|
||||
self.Show(false)
|
||||
self.timer.Stop()
|
||||
del self.timer
|
||||
self.Destroy()
|
||||
|
||||
|
||||
def OnMouseClick(self, event):
|
||||
self.timer.Notify()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user