Debian Codegraph @

traitsui/examples/demo/Extras/windows/flash.py

raw
1 # (C) Copyright 2004-2023 Enthought, Inc., Austin, TX
2 # All rights reserved.
3 #
4 # This software is provided without warranty under the terms of the BSD
5 # license included in LICENSE.txt and may be redistributed only under
6 # the conditions described in the aforementioned license. The license
7 # is also available online at http://www.enthought.com/licenses/BSD.txt
8 #
9 # Thanks for using Enthought open source!
10
11 """ Demo showing how to use the Windows specific Flash editor.
12 """
13
14 # Imports:
15 from traitsui.wx.extra.windows.flash_editor import FlashEditor
16
17 from traits.api import Enum, HasTraits
18
19 from traitsui.api import View, HGroup, Item
20
21 # The demo class:
22
23
24 class FlashDemo(HasTraits):
25
26 # The Flash file to display:
27 flash = Enum(
28 'http://www.ianag.com/arcade/swf/sudoku.swf',
29 'http://www.ianag.com/arcade/swf/f-336.swf',
30 'http://www.ianag.com/arcade/swf/f-3D-Reversi-1612.swf',
31 'http://www.ianag.com/arcade/swf/game_234.swf',
32 'http://www.ianag.com/arcade/swf/flashmanwm.swf',
33 'http://www.ianag.com/arcade/swf/2379_gyroball.swf',
34 'http://www.ianag.com/arcade/swf/f-1416.swf',
35 'http://www.ianag.com/arcade/swf/mah_jongg.swf',
36 'http://www.ianag.com/arcade/swf/game_e4fe4e55fedc2f502be627ee6df716c5.swf',
37 'http://www.ianag.com/arcade/swf/rhumb.swf',
38 )
39
40 # The view to display:
41 view = View(
42 HGroup(Item('flash', label='Pick a game to play')),
43 '_',
44 Item('flash', show_label=False, editor=FlashEditor()),
45 )
46
47
48 # Create the demo:
49 demo = FlashDemo()
50
51 # Run the demo (if invoked from the command line):
52 if __name__ == '__main__':
53 demo.configure_traits()