]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/src/msw/animate.py
1 # This file was created automatically by SWIG 1.3.29.
2 # Don't modify this file, modify the SWIG interface instead.
5 Simple animation player classes, including `GIFAnimationCtrl` for displaying
12 new_instancemethod
= new
.instancemethod
13 def _swig_setattr_nondynamic(self
,class_type
,name
,value
,static
=1):
14 if (name
== "thisown"): return self
.this
.own(value
)
16 if type(value
).__name
__ == 'PySwigObject':
17 self
.__dict
__[name
] = value
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
24 raise AttributeError("You cannot add attributes to %s" % self
)
26 def _swig_setattr(self
,class_type
,name
,value
):
27 return _swig_setattr_nondynamic(self
,class_type
,name
,value
,0)
29 def _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
36 try: strthis
= "proxy of " + self
.this
.__repr
__()
38 return "<%s.%s; %s >" % (self
.__class
__.__module
__, self
.__class
__.__name
__, strthis
,)
42 _object
= types
.ObjectType
44 except AttributeError:
50 def _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"):
56 raise AttributeError("You cannot add attributes to %s" % self
)
62 __docfilter__
= wx
._core
.__DocFilter
(globals())
63 ANIM_UNSPECIFIED
= _animate
.ANIM_UNSPECIFIED
64 ANIM_DONOTREMOVE
= _animate
.ANIM_DONOTREMOVE
65 ANIM_TOBACKGROUND
= _animate
.ANIM_TOBACKGROUND
66 ANIM_TOPREVIOUS
= _animate
.ANIM_TOPREVIOUS
67 ANIMATION_TYPE_INVALID
= _animate
.ANIMATION_TYPE_INVALID
68 ANIMATION_TYPE_GIF
= _animate
.ANIMATION_TYPE_GIF
69 ANIMATION_TYPE_ANI
= _animate
.ANIMATION_TYPE_ANI
70 ANIMATION_TYPE_ANY
= _animate
.ANIMATION_TYPE_ANY
71 class 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"
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
)
82 def GetDelay(*args
, **kwargs
):
83 """GetDelay(self, size_t i) -> int"""
84 return _animate
.AnimationBase_GetDelay(*args
, **kwargs
)
86 def GetFrameCount(*args
, **kwargs
):
87 """GetFrameCount(self) -> size_t"""
88 return _animate
.AnimationBase_GetFrameCount(*args
, **kwargs
)
90 def GetFrame(*args
, **kwargs
):
91 """GetFrame(self, size_t i) -> Image"""
92 return _animate
.AnimationBase_GetFrame(*args
, **kwargs
)
94 def GetSize(*args
, **kwargs
):
95 """GetSize(self) -> Size"""
96 return _animate
.AnimationBase_GetSize(*args
, **kwargs
)
98 def LoadFile(*args
, **kwargs
):
99 """LoadFile(self, String name, int type=ANIMATION_TYPE_ANY) -> bool"""
100 return _animate
.AnimationBase_LoadFile(*args
, **kwargs
)
102 def Load(*args
, **kwargs
):
103 """Load(self, InputStream stream, int type=ANIMATION_TYPE_ANY) -> bool"""
104 return _animate
.AnimationBase_Load(*args
, **kwargs
)
106 _animate
.AnimationBase_swigregister(AnimationBase
)
108 AnimationCtrlNameStr
= cvar
.AnimationCtrlNameStr
110 class 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
):
116 __init__(self) -> Animation
117 __init__(self, String name, int type=ANIMATION_TYPE_ANY) -> Animation
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
):
123 """GetFramePosition(self, size_t frame) -> Point"""
124 return _animate
.Animation_GetFramePosition(*args
, **kwargs
)
126 def GetDisposalMethod(*args
, **kwargs
):
127 """GetDisposalMethod(self, size_t frame) -> int"""
128 return _animate
.Animation_GetDisposalMethod(*args
, **kwargs
)
130 def GetBackgroundColour(*args
, **kwargs
):
131 """GetBackgroundColour(self) -> Colour"""
132 return _animate
.Animation_GetBackgroundColour(*args
, **kwargs
)
134 _animate
.Animation_swigregister(Animation
)
136 AC_NO_AUTORESIZE
= _animate
.AC_NO_AUTORESIZE
137 AC_DEFAULT_STYLE
= _animate
.AC_DEFAULT_STYLE
138 AN_FIT_ANIMATION
= _animate
.AN_FIT_ANIMATION
139 class AnimationCtrlBase(_core
.Control
):
140 """Proxy of C++ AnimationCtrlBase class"""
141 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
142 def __init__(self
): raise AttributeError, "No constructor defined"
143 __repr__
= _swig_repr
144 def LoadFile(*args
, **kwargs
):
145 """LoadFile(self, String filename, int type=ANIMATION_TYPE_ANY) -> bool"""
146 return _animate
.AnimationCtrlBase_LoadFile(*args
, **kwargs
)
148 def SetAnimation(*args
, **kwargs
):
149 """SetAnimation(self, Animation anim)"""
150 return _animate
.AnimationCtrlBase_SetAnimation(*args
, **kwargs
)
152 def GetAnimation(*args
, **kwargs
):
153 """GetAnimation(self) -> Animation"""
154 return _animate
.AnimationCtrlBase_GetAnimation(*args
, **kwargs
)
156 Animation
= property(GetAnimation
,SetAnimation
)
157 def Play(*args
, **kwargs
):
158 """Play(self) -> bool"""
159 return _animate
.AnimationCtrlBase_Play(*args
, **kwargs
)
161 def Stop(*args
, **kwargs
):
163 return _animate
.AnimationCtrlBase_Stop(*args
, **kwargs
)
165 def IsPlaying(*args
, **kwargs
):
166 """IsPlaying(self) -> bool"""
167 return _animate
.AnimationCtrlBase_IsPlaying(*args
, **kwargs
)
169 _animate
.AnimationCtrlBase_swigregister(AnimationCtrlBase
)
170 NullAnimation
= cvar
.NullAnimation
172 class AnimationCtrl(AnimationCtrlBase
):
173 """Proxy of C++ AnimationCtrl class"""
174 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
175 __repr__
= _swig_repr
176 def __init__(self
, *args
, **kwargs
):
178 __init__(self, Window parent, int id=-1, Animation anim=NullAnimation,
179 Point pos=DefaultPosition, Size size=DefaultSize,
180 long style=AC_DEFAULT_STYLE, String name=AnimationCtrlNameStr) -> AnimationCtrl
182 _animate
.AnimationCtrl_swiginit(self
,_animate
.new_AnimationCtrl(*args
, **kwargs
))
183 self
._setOORInfo
(self
)
185 def Create(*args
, **kwargs
):
187 Create(self, Window parent, int id, Animation anim=NullAnimation,
188 Point pos=DefaultPosition, Size size=DefaultSize,
189 long style=AC_DEFAULT_STYLE, String name=AnimationCtrlNameStr) -> bool
191 return _animate
.AnimationCtrl_Create(*args
, **kwargs
)
193 def SetUseWindowBackgroundColour(*args
, **kwargs
):
194 """SetUseWindowBackgroundColour(self, bool useWinBackground=True)"""
195 return _animate
.AnimationCtrl_SetUseWindowBackgroundColour(*args
, **kwargs
)
197 def IsUsingWindowBackgroundColour(*args
, **kwargs
):
198 """IsUsingWindowBackgroundColour(self) -> bool"""
199 return _animate
.AnimationCtrl_IsUsingWindowBackgroundColour(*args
, **kwargs
)
201 def DrawCurrentFrame(*args
, **kwargs
):
202 """DrawCurrentFrame(self, DC dc)"""
203 return _animate
.AnimationCtrl_DrawCurrentFrame(*args
, **kwargs
)
205 def GetBackingStore(*args
, **kwargs
):
206 """GetBackingStore(self) -> Bitmap"""
207 return _animate
.AnimationCtrl_GetBackingStore(*args
, **kwargs
)
209 _animate
.AnimationCtrl_swigregister(AnimationCtrl
)
211 def PreAnimationCtrl(*args
, **kwargs
):
212 """PreAnimationCtrl() -> AnimationCtrl"""
213 val
= _animate
.new_PreAnimationCtrl(*args
, **kwargs
)
216 class GIFAnimationCtrl(AnimationCtrl
):
218 Backwards compatibility class for AnimationCtrl.
220 def __init__(self
, parent
, id=-1, filename
="",
221 pos
=wx
.DefaultPosition
, size
=wx
.DefaultSize
,
222 style
=AC_DEFAULT_STYLE
,
223 name
="gifAnimation"):
224 AnimationCtrl
.__init
__(self
, parent
, id, NullAnimation
, pos
, size
, style
, name
)
225 self
.LoadFile(filename
)
230 def UseBackgroundColour(self
, useBackground
=True):
231 self
.SetUseWindowBackgroundColour(useBackground
)