]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/msw/animate.py
test for special keys first, before testing for alphanumeric ones as even keys such...
[wxWidgets.git] / wxPython / src / msw / animate.py
CommitLineData
b39fe951
RD
1# This file was created automatically by SWIG 1.3.29.
2# Don't modify this file, modify the SWIG interface instead.
3
4"""
5Simple animation player classes, including `GIFAnimationCtrl` for displaying
6animated GIF files
7
8"""
9
10import _animate
11import new
12new_instancemethod = new.instancemethod
13def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
14 if (name == "thisown"): return self.this.own(value)
15 if (name == "this"):
16 if type(value).__name__ == 'PySwigObject':
17 self.__dict__[name] = value
18 return
19 method = class_type.__swig_setmethods__.get(name,None)
20 if method: return method(self,value)
21 if (not static) or hasattr(self,name):
22 self.__dict__[name] = value
23 else:
24 raise AttributeError("You cannot add attributes to %s" % self)
25
26def _swig_setattr(self,class_type,name,value):
27 return _swig_setattr_nondynamic(self,class_type,name,value,0)
28
29def _swig_getattr(self,class_type,name):
30 if (name == "thisown"): return self.this.own()
31 method = class_type.__swig_getmethods__.get(name,None)
32 if method: return method(self)
33 raise AttributeError,name
34
35def _swig_repr(self):
36 try: strthis = "proxy of " + self.this.__repr__()
37 except: strthis = ""
38 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
39
40import types
41try:
42 _object = types.ObjectType
43 _newclass = 1
44except AttributeError:
45 class _object : pass
46 _newclass = 0
47del types
48
49
50def _swig_setattr_nondynamic_method(set):
51 def set_attr(self,name,value):
52 if (name == "thisown"): return self.this.own(value)
53 if hasattr(self,name) or (name == "this"):
54 set(self,name,value)
55 else:
56 raise AttributeError("You cannot add attributes to %s" % self)
57 return set_attr
58
59
60import _core
61import wx
62__docfilter__ = wx._core.__DocFilter(globals())
63ANIM_UNSPECIFIED = _animate.ANIM_UNSPECIFIED
64ANIM_DONOTREMOVE = _animate.ANIM_DONOTREMOVE
65ANIM_TOBACKGROUND = _animate.ANIM_TOBACKGROUND
66ANIM_TOPREVIOUS = _animate.ANIM_TOPREVIOUS
67ANIMATION_TYPE_INVALID = _animate.ANIMATION_TYPE_INVALID
68ANIMATION_TYPE_GIF = _animate.ANIMATION_TYPE_GIF
69ANIMATION_TYPE_ANI = _animate.ANIMATION_TYPE_ANI
70ANIMATION_TYPE_ANY = _animate.ANIMATION_TYPE_ANY
71class AnimationBase(_core.Object):
72 """Proxy of C++ AnimationBase class"""
73 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
74 def __init__(self): raise AttributeError, "No constructor defined"
75 __repr__ = _swig_repr
76 __swig_destroy__ = _animate.delete_AnimationBase
77 __del__ = lambda self : None;
78 def IsOk(*args, **kwargs):
79 """IsOk(self) -> bool"""
80 return _animate.AnimationBase_IsOk(*args, **kwargs)
81
82 def GetDelay(*args, **kwargs):
3f7f284d 83 """GetDelay(self, int i) -> int"""
b39fe951
RD
84 return _animate.AnimationBase_GetDelay(*args, **kwargs)
85
86 def GetFrameCount(*args, **kwargs):
3f7f284d 87 """GetFrameCount(self) -> int"""
b39fe951
RD
88 return _animate.AnimationBase_GetFrameCount(*args, **kwargs)
89
90 def GetFrame(*args, **kwargs):
3f7f284d 91 """GetFrame(self, int i) -> Image"""
b39fe951
RD
92 return _animate.AnimationBase_GetFrame(*args, **kwargs)
93
94 def GetSize(*args, **kwargs):
95 """GetSize(self) -> Size"""
96 return _animate.AnimationBase_GetSize(*args, **kwargs)
97
98 def LoadFile(*args, **kwargs):
99 """LoadFile(self, String name, int type=ANIMATION_TYPE_ANY) -> bool"""
100 return _animate.AnimationBase_LoadFile(*args, **kwargs)
101
102 def Load(*args, **kwargs):
103 """Load(self, InputStream stream, int type=ANIMATION_TYPE_ANY) -> bool"""
104 return _animate.AnimationBase_Load(*args, **kwargs)
105
106_animate.AnimationBase_swigregister(AnimationBase)
107cvar = _animate.cvar
108AnimationCtrlNameStr = cvar.AnimationCtrlNameStr
109
110class Animation(AnimationBase):
111 """Proxy of C++ Animation class"""
112 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
113 __repr__ = _swig_repr
114 def __init__(self, *args):
115 """
116 __init__(self) -> Animation
117 __init__(self, String name, int type=ANIMATION_TYPE_ANY) -> Animation
118 """
119 _animate.Animation_swiginit(self,_animate.new_Animation(*args))
120 __swig_destroy__ = _animate.delete_Animation
121 __del__ = lambda self : None;
122 def GetFramePosition(*args, **kwargs):
3f7f284d 123 """GetFramePosition(self, int frame) -> Point"""
b39fe951
RD
124 return _animate.Animation_GetFramePosition(*args, **kwargs)
125
f8eb59b9 126 def GetFrameSize(*args, **kwargs):
3f7f284d 127 """GetFrameSize(self, int frame) -> Size"""
f8eb59b9
RD
128 return _animate.Animation_GetFrameSize(*args, **kwargs)
129
b39fe951 130 def GetDisposalMethod(*args, **kwargs):
3f7f284d 131 """GetDisposalMethod(self, int frame) -> int"""
b39fe951
RD
132 return _animate.Animation_GetDisposalMethod(*args, **kwargs)
133
f8eb59b9 134 def GetTransparentColour(*args, **kwargs):
3f7f284d 135 """GetTransparentColour(self, int frame) -> Colour"""
f8eb59b9
RD
136 return _animate.Animation_GetTransparentColour(*args, **kwargs)
137
b39fe951
RD
138 def GetBackgroundColour(*args, **kwargs):
139 """GetBackgroundColour(self) -> Colour"""
140 return _animate.Animation_GetBackgroundColour(*args, **kwargs)
141
142_animate.Animation_swigregister(Animation)
143
144AC_NO_AUTORESIZE = _animate.AC_NO_AUTORESIZE
145AC_DEFAULT_STYLE = _animate.AC_DEFAULT_STYLE
146AN_FIT_ANIMATION = _animate.AN_FIT_ANIMATION
147class AnimationCtrlBase(_core.Control):
148 """Proxy of C++ AnimationCtrlBase class"""
149 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
150 def __init__(self): raise AttributeError, "No constructor defined"
151 __repr__ = _swig_repr
152 def LoadFile(*args, **kwargs):
153 """LoadFile(self, String filename, int type=ANIMATION_TYPE_ANY) -> bool"""
154 return _animate.AnimationCtrlBase_LoadFile(*args, **kwargs)
155
156 def SetAnimation(*args, **kwargs):
157 """SetAnimation(self, Animation anim)"""
158 return _animate.AnimationCtrlBase_SetAnimation(*args, **kwargs)
159
160 def GetAnimation(*args, **kwargs):
161 """GetAnimation(self) -> Animation"""
162 return _animate.AnimationCtrlBase_GetAnimation(*args, **kwargs)
163
164 Animation = property(GetAnimation,SetAnimation)
165 def Play(*args, **kwargs):
166 """Play(self) -> bool"""
167 return _animate.AnimationCtrlBase_Play(*args, **kwargs)
168
169 def Stop(*args, **kwargs):
170 """Stop(self)"""
171 return _animate.AnimationCtrlBase_Stop(*args, **kwargs)
172
173 def IsPlaying(*args, **kwargs):
174 """IsPlaying(self) -> bool"""
175 return _animate.AnimationCtrlBase_IsPlaying(*args, **kwargs)
176
0a27f394
RD
177 def SetInactiveBitmap(*args, **kwargs):
178 """SetInactiveBitmap(self, Bitmap bmp)"""
179 return _animate.AnimationCtrlBase_SetInactiveBitmap(*args, **kwargs)
180
181 def GetInactiveBitmap(*args, **kwargs):
182 """GetInactiveBitmap(self) -> Bitmap"""
183 return _animate.AnimationCtrlBase_GetInactiveBitmap(*args, **kwargs)
184
185 InactiveBitmap = property(GetInactiveBitmap,SetInactiveBitmap)
b39fe951
RD
186_animate.AnimationCtrlBase_swigregister(AnimationCtrlBase)
187NullAnimation = cvar.NullAnimation
188
189class AnimationCtrl(AnimationCtrlBase):
190 """Proxy of C++ AnimationCtrl class"""
191 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
192 __repr__ = _swig_repr
193 def __init__(self, *args, **kwargs):
194 """
195 __init__(self, Window parent, int id=-1, Animation anim=NullAnimation,
196 Point pos=DefaultPosition, Size size=DefaultSize,
197 long style=AC_DEFAULT_STYLE, String name=AnimationCtrlNameStr) -> AnimationCtrl
198 """
199 _animate.AnimationCtrl_swiginit(self,_animate.new_AnimationCtrl(*args, **kwargs))
200 self._setOORInfo(self)
201
202 def Create(*args, **kwargs):
203 """
204 Create(self, Window parent, int id, Animation anim=NullAnimation,
205 Point pos=DefaultPosition, Size size=DefaultSize,
206 long style=AC_DEFAULT_STYLE, String name=AnimationCtrlNameStr) -> bool
207 """
208 return _animate.AnimationCtrl_Create(*args, **kwargs)
209
210 def SetUseWindowBackgroundColour(*args, **kwargs):
211 """SetUseWindowBackgroundColour(self, bool useWinBackground=True)"""
212 return _animate.AnimationCtrl_SetUseWindowBackgroundColour(*args, **kwargs)
213
214 def IsUsingWindowBackgroundColour(*args, **kwargs):
215 """IsUsingWindowBackgroundColour(self) -> bool"""
216 return _animate.AnimationCtrl_IsUsingWindowBackgroundColour(*args, **kwargs)
217
218 def DrawCurrentFrame(*args, **kwargs):
219 """DrawCurrentFrame(self, DC dc)"""
220 return _animate.AnimationCtrl_DrawCurrentFrame(*args, **kwargs)
221
222 def GetBackingStore(*args, **kwargs):
223 """GetBackingStore(self) -> Bitmap"""
224 return _animate.AnimationCtrl_GetBackingStore(*args, **kwargs)
225
226_animate.AnimationCtrl_swigregister(AnimationCtrl)
227
228def PreAnimationCtrl(*args, **kwargs):
229 """PreAnimationCtrl() -> AnimationCtrl"""
230 val = _animate.new_PreAnimationCtrl(*args, **kwargs)
231 return val
232
233class GIFAnimationCtrl(AnimationCtrl):
234 """
235 Backwards compatibility class for AnimationCtrl.
236 """
237 def __init__(self, parent, id=-1, filename="",
238 pos=wx.DefaultPosition, size=wx.DefaultSize,
239 style=AC_DEFAULT_STYLE,
240 name="gifAnimation"):
241 AnimationCtrl.__init__(self, parent, id, NullAnimation, pos, size, style, name)
242 self.LoadFile(filename)
243
244 def GetPlayer(self):
245 return self
246
247 def UseBackgroundColour(self, useBackground=True):
248 self.SetUseWindowBackgroundColour(useBackground)
249
250
251