Added wrappers and a demo for the animate contrib
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33337 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
61
wxPython/demo/GIFAnimationCtrl.py
Normal file
@@ -0,0 +1,61 @@
|
||||
|
||||
import wx
|
||||
from wx.animate import GIFAnimationCtrl
|
||||
|
||||
from Main import opj
|
||||
|
||||
GIFNames = [
|
||||
"bitmaps/ani-bttrfly.gif",
|
||||
"bitmaps/ani-avtr.gif",
|
||||
"bitmaps/ani-phone.gif",
|
||||
# "bitmaps/ani-walker.gif",
|
||||
"bitmaps/ani-man.gif",
|
||||
"bitmaps/ani-bookworm.gif",
|
||||
"bitmaps/ani-hooked.gif",
|
||||
]
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
class TestPanel(wx.Panel):
|
||||
def __init__(self, parent, log):
|
||||
self.log = log
|
||||
wx.Panel.__init__(self, parent, -1)
|
||||
|
||||
sizer = wx.FlexGridSizer(2,3,5,5)
|
||||
for name in GIFNames:
|
||||
ani = GIFAnimationCtrl(self, -1, opj(name))
|
||||
ani.GetPlayer().UseBackgroundColour(True)
|
||||
ani.Play()
|
||||
sizer.Add(ani, 0, wx.ALL, 10)
|
||||
|
||||
border = wx.BoxSizer()
|
||||
border.Add(sizer, 1, wx.EXPAND|wx.ALL, 20)
|
||||
self.SetSizer(border)
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
def runTest(frame, nb, log):
|
||||
win = TestPanel(nb, log)
|
||||
return win
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
overview = """<html><body>
|
||||
<h2><center>wx.animate.GIFAnimationCtrl</center></h2>
|
||||
|
||||
wx.animate.GIFAnimationCtrl is like a wx.StaticBitmap but is able to
|
||||
display an animation by extracing frames from a multi-images GIF file.
|
||||
|
||||
</body></html>
|
||||
"""
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
import sys,os
|
||||
import run
|
||||
run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])
|
||||
|
@@ -48,6 +48,7 @@ _treeList = [
|
||||
# new stuff
|
||||
('Recent Additions/Updates', [
|
||||
'FoldPanelBar',
|
||||
'GIFAnimationCtrl',
|
||||
]),
|
||||
|
||||
# managed windows == things with a (optional) caption you can close
|
||||
@@ -153,6 +154,7 @@ _treeList = [
|
||||
'FloatBar',
|
||||
'FloatCanvas',
|
||||
'FoldPanelBar',
|
||||
'GIFAnimationCtrl',
|
||||
'HtmlWindow',
|
||||
'IntCtrl',
|
||||
'MediaCtrl',
|
||||
@@ -211,6 +213,7 @@ _treeList = [
|
||||
'ArtProvider',
|
||||
'Cursor',
|
||||
'DragImage',
|
||||
'GIFAnimationCtrl',
|
||||
'Image',
|
||||
'ImageAlpha',
|
||||
'ImageFromStream',
|
||||
|
BIN
wxPython/demo/bitmaps/ani-avtr.gif
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
wxPython/demo/bitmaps/ani-bookworm.gif
Normal file
After Width: | Height: | Size: 6.5 KiB |
BIN
wxPython/demo/bitmaps/ani-bttrfly.gif
Normal file
After Width: | Height: | Size: 7.1 KiB |
BIN
wxPython/demo/bitmaps/ani-hooked.gif
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
wxPython/demo/bitmaps/ani-man.gif
Normal file
After Width: | Height: | Size: 7.2 KiB |
BIN
wxPython/demo/bitmaps/ani-phone.gif
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
wxPython/demo/bitmaps/ani-walker.gif
Normal file
After Width: | Height: | Size: 9.6 KiB |
BIN
wxPython/demo/bitmaps/tbttrfly.gif
Normal file
After Width: | Height: | Size: 7.1 KiB |