]>
Commit | Line | Data |
---|---|---|
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{Predefined objects} | |
27 | ||
28 | Objects: | |
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 | ||
43 | Default constructor. | |
44 | ||
45 | \func{}{wxAnimation}{\param{const wxAnimation\& }{anim}} | |
46 | ||
47 | Copy constructor, uses \helpref{reference counting}{trefcount}. | |
48 | ||
49 | \func{}{wxAnimation}{\param{const wxString\& }{name}, \param{wxAnimationType}{ type = wxANIMATION\_TYPE\_ANY}} | |
50 | ||
51 | Loads 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 | ||
62 | Destructor. | |
63 | See \helpref{reference-counted object destruction}{refcountdestruct} for more info. | |
64 | ||
65 | ||
66 | \membersection{wxAnimation::GetDelay}\label{wxanimationgetdelay} | |
67 | ||
68 | \constfunc{int}{GetDelay}{\param{unsigned int }{i}} | |
69 | ||
70 | Returns the delay for the i-th frame in milliseconds. | |
71 | If {\tt -1} is returned the frame is to be displayed forever. | |
72 | ||
73 | ||
74 | \membersection{wxAnimation::GetFrameCount}\label{wxanimationgetframecount} | |
75 | ||
76 | \constfunc{unsigned int}{GetFrameCount}{\void} | |
77 | ||
78 | Returns the number of frames for this animation. | |
79 | ||
80 | ||
81 | \membersection{wxAnimation::GetFrame}\label{wxanimationgetframe} | |
82 | ||
83 | \constfunc{wxImage}{GetFrame}{\param{unsigned int }{i}} | |
84 | ||
85 | Returns the i-th frame as a \helpref{wxImage}{wximage}. | |
86 | ||
87 | ||
88 | \membersection{wxAnimation::GetSize}\label{wxanimationgetsize} | |
89 | ||
90 | \constfunc{wxSize}{GetSize}{\void} | |
91 | ||
92 | Returns the size of the animation. | |
93 | ||
94 | ||
95 | \membersection{wxAnimation::IsOk}\label{wxanimationisok} | |
96 | ||
97 | \constfunc{bool}{IsOk}{\void} | |
98 | ||
99 | Returns \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 | ||
106 | Loads 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{wxANIMATION\_TYPE\_GIF}}{Load an animated GIF file.} | |
117 | \twocolitem{\indexit{wxANIMATION\_TYPE\_ANI}}{Load an ANI file.} | |
118 | \twocolitem{\indexit{wxANIMATION\_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 | ||
131 | Loads 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{wxANIMATION\_TYPE\_GIF}}{Load an animated GIF file.} | |
142 | \twocolitem{\indexit{wxANIMATION\_TYPE\_ANI}}{Load an ANI file.} | |
143 | \twocolitem{\indexit{wxANIMATION\_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 | ||
151 | ||
152 | \membersection{wxAnimation::operator $=$}\label{wxanimationassignment} | |
153 | ||
154 | \func{wxAnimation\&}{operator $=$}{\param{const wxAnimation\& }{brush}} | |
155 | ||
156 | Assignment operator, using \helpref{reference counting}{trefcount}. | |
157 |