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