]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/animation.tex
added ReadType convenience functions (patch 1764160)
[wxWidgets.git] / docs / latex / wx / animation.tex
CommitLineData
72045d57
VZ
1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2%% Name: animation.tex
3%% Purpose: wxAnimation documentation
4%% Author: Francesco Montorsi
5%% Created: 24-9-2006
6%% RCS-ID: $Id$
7%% Copyright: (c) 2006 Francesco Montorsi
8%% License: wxWindows license
9%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10
11\section{\class{wxAnimation}}\label{wxanimation}
12
13This class encapsulates the concept of a platform-dependent animation.
14An animation is a sequence of frames of the same size.
15Sound is not supported by wxAnimation.
16
17\wxheading{Derived from}
18
19\helpref{wxGDIObject}{wxgdiobject}\\
20\helpref{wxObject}{wxobject}
21
22\wxheading{Include files}
23
24<wx/animate.h>
25
a7af285d
VZ
26\wxheading{Library}
27
28\helpref{wxAdv}{librarieslist}
29
72045d57
VZ
30\wxheading{Predefined objects}
31
32Objects:
33
34{\bf wxNullAnimation}
35
36\wxheading{See also}
37
38\helpref{wxAnimationCtrl}{wxanimationctrl}
39
40\latexignore{\rtfignore{\wxheading{Members}}}
41
42
43\membersection{wxAnimation::wxAnimation}\label{wxanimationctor}
44
45\func{}{wxAnimation}{\void}
46
47Default constructor.
48
49\func{}{wxAnimation}{\param{const wxAnimation\& }{anim}}
50
55ccdb93 51Copy constructor, uses \helpref{reference counting}{trefcount}.
72045d57
VZ
52
53\func{}{wxAnimation}{\param{const wxString\& }{name}, \param{wxAnimationType}{ type = wxANIMATION\_TYPE\_ANY}}
54
55Loads an animation from a file.
56
57\docparam{name}{The name of the file to load.}
58
59\docparam{type}{See \helpref{LoadFile}{wxanimationloadfile} for more info.}
60
61
62\membersection{wxAnimation::\destruct{wxAnimation}}\label{wxanimationdtor}
63
64\func{}{\destruct{wxAnimation}}{\void}
65
55ccdb93
VZ
66Destructor.
67See \helpref{reference-counted object destruction}{refcountdestruct} for more info.
72045d57
VZ
68
69
70\membersection{wxAnimation::GetDelay}\label{wxanimationgetdelay}
71
870cf35c 72\constfunc{int}{GetDelay}{\param{unsigned int }{i}}
72045d57
VZ
73
74Returns the delay for the i-th frame in milliseconds.
75If {\tt -1} is returned the frame is to be displayed forever.
76
77
78\membersection{wxAnimation::GetFrameCount}\label{wxanimationgetframecount}
79
870cf35c 80\constfunc{unsigned int}{GetFrameCount}{\void}
72045d57
VZ
81
82Returns the number of frames for this animation.
83
84
85\membersection{wxAnimation::GetFrame}\label{wxanimationgetframe}
86
870cf35c 87\constfunc{wxImage}{GetFrame}{\param{unsigned int }{i}}
72045d57
VZ
88
89Returns the i-th frame as a \helpref{wxImage}{wximage}.
90
91
92\membersection{wxAnimation::GetSize}\label{wxanimationgetsize}
93
94\constfunc{wxSize}{GetSize}{\void}
95
96Returns the size of the animation.
97
98
99\membersection{wxAnimation::IsOk}\label{wxanimationisok}
100
101\constfunc{bool}{IsOk}{\void}
102
103Returns \true if animation data is present.
104
105
106\membersection{wxAnimation::Load}\label{wxanimationload}
107
0f7e3559 108\func{bool}{Load}{\param{wxInputStream\&}{ stream}, \param{wxAnimationType}{ type = wxANIMATION\_TYPE\_ANY}}
72045d57
VZ
109
110Loads an animation from the given stream.
111
112\wxheading{Parameters}
113
114\docparam{stream}{The stream to use to load the animation.}
115
116\docparam{type}{One of the following values:
117
118\twocolwidtha{5cm}
119\begin{twocollist}
0f7e3559
RR
120\twocolitem{\indexit{wxANIMATION\_TYPE\_GIF}}{Load an animated GIF file.}
121\twocolitem{\indexit{wxANIMATION\_TYPE\_ANI}}{Load an ANI file.}
122\twocolitem{\indexit{wxANIMATION\_TYPE\_ANY}}{Try to autodetect the filetype.}
72045d57
VZ
123\end{twocollist}
124}
125
126\wxheading{Return value}
127
128\true if the operation succeeded, \false otherwise.
129
130
131\membersection{wxAnimation::LoadFile}\label{wxanimationloadfile}
132
133\func{bool}{LoadFile}{\param{const wxString\&}{ name}, \param{wxAnimationType}{ type = wxANIMATION\_TYPE\_ANY}}
134
135Loads an animation from a file.
136
137\wxheading{Parameters}
138
139\docparam{name}{A filename.}
140
141\docparam{type}{One of the following values:
142
143\twocolwidtha{5cm}
144\begin{twocollist}
0f7e3559
RR
145\twocolitem{\indexit{wxANIMATION\_TYPE\_GIF}}{Load an animated GIF file.}
146\twocolitem{\indexit{wxANIMATION\_TYPE\_ANI}}{Load an ANI file.}
147\twocolitem{\indexit{wxANIMATION\_TYPE\_ANY}}{Try to autodetect the filetype.}
72045d57
VZ
148\end{twocollist}
149}
150
151\wxheading{Return value}
152
153\true if the operation succeeded, \false otherwise.
154
55ccdb93
VZ
155
156\membersection{wxAnimation::operator $=$}\label{wxanimationassignment}
157
158\func{wxAnimation\&}{operator $=$}{\param{const wxAnimation\& }{brush}}
159
160Assignment operator, using \helpref{reference counting}{trefcount}.
161