]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/animation.tex
Add FindLength()
[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
47Copy constructor.
48wxAnimation objects are reference counted so that this operation is very fast.
49
50\func{}{wxAnimation}{\param{const wxString\& }{name}, \param{wxAnimationType}{ type = wxANIMATION\_TYPE\_ANY}}
51
52Loads an animation from a file.
53
54\docparam{name}{The name of the file to load.}
55
56\docparam{type}{See \helpref{LoadFile}{wxanimationloadfile} for more info.}
57
58
59\membersection{wxAnimation::\destruct{wxAnimation}}\label{wxanimationdtor}
60
61\func{}{\destruct{wxAnimation}}{\void}
62
63Destroys the wxAnimation object and possibly the underlying animation data.
64Because reference counting is used, the animation may not actually be
65destroyed at this point - only when the reference count is zero will the
66data be deleted.
67
68
69\membersection{wxAnimation::GetDelay}\label{wxanimationgetdelay}
70
c2f12218 71\constfunc{int}{GetDelay}{\param{size\_t }{i}}
72045d57
VZ
72
73Returns the delay for the i-th frame in milliseconds.
74If {\tt -1} is returned the frame is to be displayed forever.
75
76
77\membersection{wxAnimation::GetFrameCount}\label{wxanimationgetframecount}
78
c2f12218 79\constfunc{size\_t}{GetFrameCount}{\void}
72045d57
VZ
80
81Returns the number of frames for this animation.
82
83
84\membersection{wxAnimation::GetFrame}\label{wxanimationgetframe}
85
c2f12218 86\constfunc{wxImage}{GetFrame}{\param{size\_t }{i}}
72045d57
VZ
87
88Returns the i-th frame as a \helpref{wxImage}{wximage}.
89
90
91\membersection{wxAnimation::GetSize}\label{wxanimationgetsize}
92
93\constfunc{wxSize}{GetSize}{\void}
94
95Returns the size of the animation.
96
97
98\membersection{wxAnimation::IsOk}\label{wxanimationisok}
99
100\constfunc{bool}{IsOk}{\void}
101
102Returns \true if animation data is present.
103
104
105\membersection{wxAnimation::Load}\label{wxanimationload}
106
107\func{bool}{Load}{\param{wxInputStream&}{ stream}, \param{wxAnimationType}{ type = wxANIMATION\_TYPE\_ANY}}
108
109Loads an animation from the given stream.
110
111\wxheading{Parameters}
112
113\docparam{stream}{The stream to use to load the animation.}
114
115\docparam{type}{One of the following values:
116
117\twocolwidtha{5cm}
118\begin{twocollist}
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.}
122\end{twocollist}
123}
124
125\wxheading{Return value}
126
127\true if the operation succeeded, \false otherwise.
128
129
130\membersection{wxAnimation::LoadFile}\label{wxanimationloadfile}
131
132\func{bool}{LoadFile}{\param{const wxString\&}{ name}, \param{wxAnimationType}{ type = wxANIMATION\_TYPE\_ANY}}
133
134Loads an animation from a file.
135
136\wxheading{Parameters}
137
138\docparam{name}{A filename.}
139
140\docparam{type}{One of the following values:
141
142\twocolwidtha{5cm}
143\begin{twocollist}
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.}
147\end{twocollist}
148}
149
150\wxheading{Return value}
151
152\true if the operation succeeded, \false otherwise.
153