projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed comment bug [ 1390056 ] Wrong Documentation for TransferFromWindow
[wxWidgets.git]
/
wxPython
/
demo
/
Main.py
diff --git
a/wxPython/demo/Main.py
b/wxPython/demo/Main.py
index 7da1fcad42072b08d6d73dc44a1616374833ccec..d0711e384f9a3206bd3a37cd5cead146872f94a3 100644
(file)
--- a/
wxPython/demo/Main.py
+++ b/
wxPython/demo/Main.py
@@
-48,6
+48,12
@@
_treeList = [
# new stuff
('Recent Additions/Updates', [
'FoldPanelBar',
# new stuff
('Recent Additions/Updates', [
'FoldPanelBar',
+ 'GIFAnimationCtrl',
+ 'HyperLinkCtrl',
+ 'MultiSplitterWindow',
+ 'Throbber',
+ 'GetMouseState',
+ 'FloatCanvas',
]),
# managed windows == things with a (optional) caption you can close
]),
# managed windows == things with a (optional) caption you can close
@@
-78,7
+84,6
@@
_treeList = [
# dialogs from libraries
('More Dialogs', [
'ImageBrowser',
# dialogs from libraries
('More Dialogs', [
'ImageBrowser',
- 'MultipleChoiceDialog',
'ScrolledMessageDialog',
]),
'ScrolledMessageDialog',
]),
@@
-153,13
+158,15
@@
_treeList = [
'FloatBar',
'FloatCanvas',
'FoldPanelBar',
'FloatBar',
'FloatCanvas',
'FoldPanelBar',
+ 'GIFAnimationCtrl',
'HtmlWindow',
'HtmlWindow',
+ 'HyperLinkCtrl',
'IntCtrl',
'IntCtrl',
- 'MediaCtrl',
'MVCTree',
'MaskedEditControls',
'MaskedNumCtrl',
'MVCTree',
'MaskedEditControls',
'MaskedNumCtrl',
- 'MimeTypesManager',
+ 'MediaCtrl',
+ 'MultiSplitterWindow',
'PyCrust',
'PyPlot',
'PyShell',
'PyCrust',
'PyPlot',
'PyShell',
@@
-211,6
+218,7
@@
_treeList = [
'ArtProvider',
'Cursor',
'DragImage',
'ArtProvider',
'Cursor',
'DragImage',
+ 'GIFAnimationCtrl',
'Image',
'ImageAlpha',
'ImageFromStream',
'Image',
'ImageAlpha',
'ImageFromStream',
@@
-225,7
+233,9
@@
_treeList = [
'DrawXXXList',
'FileHistory',
'FontEnumerator',
'DrawXXXList',
'FileHistory',
'FontEnumerator',
+ 'GLCanvas',
'Joystick',
'Joystick',
+ 'MimeTypesManager',
'MouseGestures',
'OGL',
'PrintFramework',
'MouseGestures',
'OGL',
'PrintFramework',
@@
-235,11
+245,6
@@
_treeList = [
'Unicode',
]),
'Unicode',
]),
- # need libs not coming with the demo
- ('Samples using an external library', [
- 'GLCanvas',
- ]),
-
('Check out the samples dir too', [
]),
('Check out the samples dir too', [
]),
@@
-796,7
+801,8
@@
class DemoModules:
def LoadDict(self, modID):
if self.name != __name__:
source = self.modules[modID][1]
def LoadDict(self, modID):
if self.name != __name__:
source = self.modules[modID][1]
- description = self.modules[modID][3]
+ #description = self.modules[modID][3]
+ description = self.modules[modID][2]
try:
self.modules[modID][0] = {}
try:
self.modules[modID][0] = {}
@@
-932,7
+938,7
@@
class DemoErrorPanel(wx.Panel):
self.box = wx.BoxSizer(wx.VERTICAL)
# Main Label
self.box = wx.BoxSizer(wx.VERTICAL)
# Main Label
- self.box.Add(wx.StaticText(self, -1, "An error has occured while trying to run the demo")
+ self.box.Add(wx.StaticText(self, -1, "An error has occur
r
ed while trying to run the demo")
, 0, wx.ALIGN_CENTER | wx.TOP, 10)
# Exception Information
, 0, wx.ALIGN_CENTER | wx.TOP, 10)
# Exception Information
@@
-1075,8
+1081,7
@@
class DemoTaskBarIcon(wx.TaskBarIcon):
def OnTaskBarChange(self, evt):
def OnTaskBarChange(self, evt):
- names = [ "WXPdemo", "WXP", "Mondrian", "Test2m",
- "Blom08m", "Blom10m", "Blom15m" ]
+ names = [ "WXPdemo", "Mondrian", "Pencil", "Carrot" ]
name = names[self.imgidx]
getFunc = getattr(images, "get%sImage" % name)
name = names[self.imgidx]
getFunc = getattr(images, "get%sImage" % name)
@@
-1205,6
+1210,7
@@
class wxPythonDemo(wx.Frame):
self.SetMenuBar(self.mainmenu)
self.finddata = wx.FindReplaceData()
self.SetMenuBar(self.mainmenu)
self.finddata = wx.FindReplaceData()
+ self.finddata.SetFlags(wx.FR_DOWN)
if 0:
# This is another way to set Accelerators, in addition to
if 0:
# This is another way to set Accelerators, in addition to
@@
-1400,7
+1406,7
@@
class wxPythonDemo(wx.Frame):
# o The RunTest() for all samples must now return a window that can
# be palced in a tab in the main notebook.
# o The RunTest() for all samples must now return a window that can
# be palced in a tab in the main notebook.
- # o If an error occurs (or has occured before) an error tab is created.
+ # o If an error occurs (or has occur
r
ed before) an error tab is created.
if module is not None:
wx.LogMessage("Running demo module...")
if module is not None:
wx.LogMessage("Running demo module...")
@@
-1522,9
+1528,7
@@
class wxPythonDemo(wx.Frame):
self.nb.SetSelection(1)
self.finddlg = wx.FindReplaceDialog(self, self.finddata, "Find",
self.nb.SetSelection(1)
self.finddlg = wx.FindReplaceDialog(self, self.finddata, "Find",
- wx.FR_NOUPDOWN |
- wx.FR_NOMATCHCASE |
- wx.FR_NOWHOLEWORD)
+ wx.FR_NOMATCHCASE | wx.FR_NOWHOLEWORD)
self.finddlg.Show(True)
self.finddlg.Show(True)
@@
-1537,13
+1541,22
@@
class wxPythonDemo(wx.Frame):
self.nb.SetSelection(1)
end = editor.GetLastPosition()
textstring = editor.GetRange(0, end).lower()
self.nb.SetSelection(1)
end = editor.GetLastPosition()
textstring = editor.GetRange(0, end).lower()
- start = editor.GetSelection()[1]
findstring = self.finddata.GetFindString().lower()
findstring = self.finddata.GetFindString().lower()
- loc = textstring.find(findstring, start)
+ backward = not (self.finddata.GetFlags() & wx.FR_DOWN)
+ if backward:
+ start = editor.GetSelection()[0]
+ loc = textstring.rfind(findstring, 0, start)
+ else:
+ start = editor.GetSelection()[1]
+ loc = textstring.find(findstring, start)
if loc == -1 and start != 0:
# string not found, start at beginning
if loc == -1 and start != 0:
# string not found, start at beginning
- start = 0
- loc = textstring.find(findstring, start)
+ if backward:
+ start = end
+ loc = textstring.rfind(findstring, 0, start)
+ else:
+ start = 0
+ loc = textstring.find(findstring, start)
if loc == -1:
dlg = wx.MessageDialog(self, 'Find String Not Found',
'Find String Not Found in Demo File',
if loc == -1:
dlg = wx.MessageDialog(self, 'Find String Not Found',
'Find String Not Found in Demo File',
@@
-1670,18
+1683,33
@@
class wxPythonDemo(wx.Frame):
class MySplashScreen(wx.SplashScreen):
def __init__(self):
class MySplashScreen(wx.SplashScreen):
def __init__(self):
- bmp = wx.Image(opj("bitmaps/splash.
gif
")).ConvertToBitmap()
+ bmp = wx.Image(opj("bitmaps/splash.
png
")).ConvertToBitmap()
wx.SplashScreen.__init__(self, bmp,
wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_TIMEOUT,
wx.SplashScreen.__init__(self, bmp,
wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_TIMEOUT,
-
3
000, None, -1)
+
5
000, None, -1)
self.Bind(wx.EVT_CLOSE, self.OnClose)
self.Bind(wx.EVT_CLOSE, self.OnClose)
+ self.fc = wx.FutureCall(2000, self.ShowMain)
+
def OnClose(self, evt):
def OnClose(self, evt):
+ # Make sure the default handler runs too so this window gets
+ # destroyed
+ evt.Skip()
self.Hide()
self.Hide()
+
+ # if the timer is still running then go ahead and show the
+ # main frame now
+ if self.fc.IsRunning():
+ self.fc.Stop()
+ self.ShowMain()
+
+
+ def ShowMain(self):
frame = wxPythonDemo(None, "wxPython: (A Demonstration)")
frame.Show()
frame = wxPythonDemo(None, "wxPython: (A Demonstration)")
frame.Show()
- evt.Skip() # Make sure the default handler runs too...
-
+ if self.fc.IsRunning():
+ self.Raise()
+
class MyApp(wx.App):
def OnInit(self):
class MyApp(wx.App):
def OnInit(self):
@@
-1700,7
+1728,7
@@
class MyApp(wx.App):
# initialization, finally creating and showing the main
# application window(s). In this case we have nothing else to
# do so we'll delay showing the main frame until later (see
# initialization, finally creating and showing the main
# application window(s). In this case we have nothing else to
# do so we'll delay showing the main frame until later (see
- #
OnClose
above) so the users can see the SplashScreen effect.
+ #
ShowMain
above) so the users can see the SplashScreen effect.
splash = MySplashScreen()
splash.Show()
splash = MySplashScreen()
splash.Show()