]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/animation.tex
some doc updates
[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
26\wxheading{Predefined objects}
27
28Objects:
29
30{\bf wxNullAnimation}
31
32\wxheading{See also}
33
34\helpref{wxAnimationCtrl}{wxanimationctrl}
35
36\latexignore{\rtfignore{\wxheading{Members}}}
37
38
39\membersection{wxAnimation::wxAnimation}\label{wxanimationctor}
40
41\func{}{wxAnimation}{\void}
42
43Default constructor.
44
45\func{}{wxAnimation}{\param{const wxAnimation\& }{anim}}
46
55ccdb93 47Copy constructor, uses \helpref{reference counting}{trefcount}.
72045d57
VZ
48
49\func{}{wxAnimation}{\param{const wxString\& }{name}, \param{wxAnimationType}{ type = wxANIMATION\_TYPE\_ANY}}
50
51Loads an animation from a file.
52
53\docparam{name}{The name of the file to load.}
54
55\docparam{type}{See \helpref{LoadFile}{wxanimationloadfile} for more info.}
56
57
58\membersection{wxAnimation::\destruct{wxAnimation}}\label{wxanimationdtor}
59
60\func{}{\destruct{wxAnimation}}{\void}
61
55ccdb93
VZ
62Destructor.
63See \helpref{reference-counted object destruction}{refcountdestruct} for more info.
72045d57
VZ
64
65
66\membersection{wxAnimation::GetDelay}\label{wxanimationgetdelay}
67
c2f12218 68\constfunc{int}{GetDelay}{\param{size\_t }{i}}
72045d57
VZ
69
70Returns the delay for the i-th frame in milliseconds.
71If {\tt -1} is returned the frame is to be displayed forever.
72
73
74\membersection{wxAnimation::GetFrameCount}\label{wxanimationgetframecount}
75
c2f12218 76\constfunc{size\_t}{GetFrameCount}{\void}
72045d57
VZ
77
78Returns the number of frames for this animation.
79
80
81\membersection{wxAnimation::GetFrame}\label{wxanimationgetframe}
82
c2f12218 83\constfunc{wxImage}{GetFrame}{\param{size\_t }{i}}
72045d57
VZ
84
85Returns the i-th frame as a \helpref{wxImage}{wximage}.
86
87
88\membersection{wxAnimation::GetSize}\label{wxanimationgetsize}
89
90\constfunc{wxSize}{GetSize}{\void}
91
92Returns the size of the animation.
93
94
95\membersection{wxAnimation::IsOk}\label{wxanimationisok}
96
97\constfunc{bool}{IsOk}{\void}
98
99Returns \true if animation data is present.
100
101
102\membersection{wxAnimation::Load}\label{wxanimationload}
103
104\func{bool}{Load}{\param{wxInputStream&}{ stream}, \param{wxAnimationType}{ type = wxANIMATION\_TYPE\_ANY}}
105
106Loads an animation from the given stream.
107
108\wxheading{Parameters}
109
110\docparam{stream}{The stream to use to load the animation.}
111
112\docparam{type}{One of the following values:
113
114\twocolwidtha{5cm}
115\begin{twocollist}
116\twocolitem{\indexit{wxANIM\_TYPE\_GIF}}{Load an animated GIF file.}
117\twocolitem{\indexit{wxANIM\_TYPE\_ANI}}{Load an ANI file.}
118\twocolitem{\indexit{wxANIM\_TYPE\_ANY}}{Try to autodetect the filetype.}
119\end{twocollist}
120}
121
122\wxheading{Return value}
123
124\true if the operation succeeded, \false otherwise.
125
126
127\membersection{wxAnimation::LoadFile}\label{wxanimationloadfile}
128
129\func{bool}{LoadFile}{\param{const wxString\&}{ name}, \param{wxAnimationType}{ type = wxANIMATION\_TYPE\_ANY}}
130
131Loads an animation from a file.
132
133\wxheading{Parameters}
134
135\docparam{name}{A filename.}
136
137\docparam{type}{One of the following values:
138
139\twocolwidtha{5cm}
140\begin{twocollist}
141\twocolitem{\indexit{wxANIM\_TYPE\_GIF}}{Load an animated GIF file.}
142\twocolitem{\indexit{wxANIM\_TYPE\_ANI}}{Load an ANI file.}
143\twocolitem{\indexit{wxANIM\_TYPE\_ANY}}{Try to autodetect the filetype.}
144\end{twocollist}
145}
146
147\wxheading{Return value}
148
149\true if the operation succeeded, \false otherwise.
150
55ccdb93
VZ
151
152\membersection{wxAnimation::operator $=$}\label{wxanimationassignment}
153
154\func{wxAnimation\&}{operator $=$}{\param{const wxAnimation\& }{brush}}
155
156Assignment operator, using \helpref{reference counting}{trefcount}.
157