1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %% Purpose: wxAnimation documentation
4 %% Author: Francesco Montorsi
7 %% Copyright: (c) 2006 Francesco Montorsi
8 %% License: wxWindows license
9 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11 \section{\class{wxAnimation
}}\label{wxanimation
}
13 This class encapsulates the concept of a platform-dependent animation.
14 An animation is a sequence of frames of the same size.
15 Sound is not supported by wxAnimation.
17 \wxheading{Derived from
}
19 \helpref{wxGDIObject
}{wxgdiobject
}\\
20 \helpref{wxObject
}{wxobject
}
22 \wxheading{Include files
}
26 \wxheading{Predefined objects
}
34 \helpref{wxAnimationCtrl
}{wxanimationctrl
}
36 \latexignore{\rtfignore{\wxheading{Members
}}}
39 \membersection{wxAnimation::wxAnimation
}\label{wxanimationctor
}
41 \func{}{wxAnimation
}{\void}
45 \func{}{wxAnimation
}{\param{const wxAnimation\&
}{anim
}}
48 wxAnimation objects are reference counted so that this operation is very fast.
50 \func{}{wxAnimation
}{\param{const wxString\&
}{name
},
\param{wxAnimationType
}{ type = wxANIMATION
\_TYPE\_ANY}}
52 Loads an animation from a file.
54 \docparam{name
}{The name of the file to load.
}
56 \docparam{type
}{See
\helpref{LoadFile
}{wxanimationloadfile
} for more info.
}
59 \membersection{wxAnimation::
\destruct{wxAnimation
}}\label{wxanimationdtor
}
61 \func{}{\destruct{wxAnimation
}}{\void}
63 Destroys the wxAnimation object and possibly the underlying animation data.
64 Because reference counting is used, the animation may not actually be
65 destroyed at this point - only when the reference count is zero will the
69 \membersection{wxAnimation::GetDelay
}\label{wxanimationgetdelay
}
71 \constfunc{int
}{GetDelay
}{\param{size
\_t }{i
}}
73 Returns the delay for the i-th frame in milliseconds.
74 If
{\tt -
1} is returned the frame is to be displayed forever.
77 \membersection{wxAnimation::GetFrameCount
}\label{wxanimationgetframecount
}
79 \constfunc{size
\_t}{GetFrameCount
}{\void}
81 Returns the number of frames for this animation.
84 \membersection{wxAnimation::GetFrame
}\label{wxanimationgetframe
}
86 \constfunc{wxImage
}{GetFrame
}{\param{size
\_t }{i
}}
88 Returns the i-th frame as a
\helpref{wxImage
}{wximage
}.
91 \membersection{wxAnimation::GetSize
}\label{wxanimationgetsize
}
93 \constfunc{wxSize
}{GetSize
}{\void}
95 Returns the size of the animation.
98 \membersection{wxAnimation::IsOk
}\label{wxanimationisok
}
100 \constfunc{bool
}{IsOk
}{\void}
102 Returns
\true if animation data is present.
105 \membersection{wxAnimation::Load
}\label{wxanimationload
}
107 \func{bool
}{Load
}{\param{wxInputStream&
}{ stream
},
\param{wxAnimationType
}{ type = wxANIMATION
\_TYPE\_ANY}}
109 Loads an animation from the given stream.
111 \wxheading{Parameters
}
113 \docparam{stream
}{The stream to use to load the animation.
}
115 \docparam{type
}{One of the following values:
119 \twocolitem{\indexit{wxANIM
\_TYPE\_GIF}}{Load an animated GIF file.
}
120 \twocolitem{\indexit{wxANIM
\_TYPE\_ANI}}{Load an ANI file.
}
121 \twocolitem{\indexit{wxANIM
\_TYPE\_ANY}}{Try to autodetect the filetype.
}
125 \wxheading{Return value
}
127 \true if the operation succeeded,
\false otherwise.
130 \membersection{wxAnimation::LoadFile
}\label{wxanimationloadfile
}
132 \func{bool
}{LoadFile
}{\param{const wxString\&
}{ name
},
\param{wxAnimationType
}{ type = wxANIMATION
\_TYPE\_ANY}}
134 Loads an animation from a file.
136 \wxheading{Parameters
}
138 \docparam{name
}{A filename.
}
140 \docparam{type
}{One of the following values:
144 \twocolitem{\indexit{wxANIM
\_TYPE\_GIF}}{Load an animated GIF file.
}
145 \twocolitem{\indexit{wxANIM
\_TYPE\_ANI}}{Load an ANI file.
}
146 \twocolitem{\indexit{wxANIM
\_TYPE\_ANY}}{Try to autodetect the filetype.
}
150 \wxheading{Return value
}
152 \true if the operation succeeded,
\false otherwise.