##
## DO NOT EDIT
##
#----------------------------------------------------------------------#
# This is a minimal wxPython program to show a SplashScreen widget.
#
# Tian Xie
# 3/8/2005
#----------------------------------------------------------------------#
import wx
class MDIFrame(wx.MDIParentFrame):
def __init__(self):
wx.MDIParentFrame.__init__(self, None, -1, "MDI Parent", size = (600,400))
menu = wx.Menu()
menu.Append(5000, "&New Window")
menu.Append(5001, "&Exit")
menubar = wx.MenuBar()
menubar.Append(menu, "&File")
self.SetMenuBar(menubar)
self.Bind(wx.EVT_MENU, self.OnNewWindow, id = 5000)
self.Bind(wx.EVT_MENU, self.OnExit, id = 5001)
def OnExit(self, evt):
self.Close(True)
"def __init__(self, parent, id, title):"
"wx.Frame.__init__(self, parent, id, title)"
class MyGUI(wx.MDIParentFrame):
"""
Hello World!
"""
def __init__(self, parent, id, title):
ThexType=wx.MDIParentFrame.__init__(self, parent, id, title)
# Put more GUI code here for a fancier application.
#----------------------------------------------------------------------#
class MySplashScreen(wx.SplashScreen):
"""
Create a splash screen widget.
"""
def __init__(self, parent=None):
# This is a recipe to a the screen.
# Modify the following variables as necessary.
aBitmap = wx.Image(name = "nvidia.jpg").ConvertToBitmap()
splashStyle = wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_TIMEOUT
splashDuration = 1000 # milliseconds
# Call the constructor with the above arguments in exactly the
# following order.
wx.SplashScreen.__init__(self, aBitmap, splashStyle,
splashDuration, parent)
self.Bind(wx.EVT_CLOSE, self.OnExit)
wx.Yield()
#----------------------------------------------------------------------#
def OnExit(self, evt):
self.Hide()
MyFrame = MyGUI(None, -1, XType)
app.SetTopWindow(MyFrame)
MyFrame.Show(True)
evt.Skip() # Make sure the default handler runs too...
#----------------------------------------------------------------------#
class MyApp(wx.App):
def OnInit(self):
"frame = MDIFrame()"
"frame.Show()"
"win = wx.MDIChildFrame(self, -1, Child Window)"
"win.Show(True)"
MySplash = MySplashScreen()
MySplash.Show()
return True
#----------------------------------------------------------------------#
app = MyApp(redirect=True, filename = "demo.log")
app.MainLoop()