1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %% Purpose: wxAnimation documentation
4 %% Author: Francesco Montorsi
7 %% Copyright: (c) 2006 Francesco Montorsi
8 %% License: wxWindows license
9 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11 \section{\class{wxAnimation
}}\label{wxanimation
}
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.
17 \wxheading{Derived from
}
19 \helpref{wxGDIObject
}{wxgdiobject
}\\
20 \helpref{wxObject
}{wxobject
}
22 \wxheading{Include files
}
28 \helpref{wxAdv
}{librarieslist
}
30 \wxheading{Predefined objects
}
38 \helpref{wxAnimationCtrl
}{wxanimationctrl
}
40 \latexignore{\rtfignore{\wxheading{Members
}}}
43 \membersection{wxAnimation::wxAnimation
}\label{wxanimationctor
}
45 \func{}{wxAnimation
}{\void}
49 \func{}{wxAnimation
}{\param{const wxAnimation\&
}{anim
}}
51 Copy constructor, uses
\helpref{reference counting
}{trefcount
}.
53 \func{}{wxAnimation
}{\param{const wxString\&
}{name
},
\param{wxAnimationType
}{ type = wxANIMATION
\_TYPE\_ANY}}
55 Loads an animation from a file.
57 \docparam{name
}{The name of the file to load.
}
59 \docparam{type
}{See
\helpref{LoadFile
}{wxanimationloadfile
} for more info.
}
62 \membersection{wxAnimation::
\destruct{wxAnimation
}}\label{wxanimationdtor
}
64 \func{}{\destruct{wxAnimation
}}{\void}
67 See
\helpref{reference-counted object destruction
}{refcountdestruct
} for more info.
70 \membersection{wxAnimation::GetDelay
}\label{wxanimationgetdelay
}
72 \constfunc{int
}{GetDelay
}{\param{unsigned int
}{i
}}
74 Returns the delay for the i-th frame in milliseconds.
75 If
{\tt -
1} is returned the frame is to be displayed forever.
78 \membersection{wxAnimation::GetFrameCount
}\label{wxanimationgetframecount
}
80 \constfunc{unsigned int
}{GetFrameCount
}{\void}
82 Returns the number of frames for this animation.
85 \membersection{wxAnimation::GetFrame
}\label{wxanimationgetframe
}
87 \constfunc{wxImage
}{GetFrame
}{\param{unsigned int
}{i
}}
89 Returns the i-th frame as a
\helpref{wxImage
}{wximage
}.
92 \membersection{wxAnimation::GetSize
}\label{wxanimationgetsize
}
94 \constfunc{wxSize
}{GetSize
}{\void}
96 Returns the size of the animation.
99 \membersection{wxAnimation::IsOk
}\label{wxanimationisok
}
101 \constfunc{bool
}{IsOk
}{\void}
103 Returns
\true if animation data is present.
106 \membersection{wxAnimation::Load
}\label{wxanimationload
}
108 \func{bool
}{Load
}{\param{wxInputStream\&
}{ stream
},
\param{wxAnimationType
}{ type = wxANIMATION
\_TYPE\_ANY}}
110 Loads an animation from the given stream.
112 \wxheading{Parameters
}
114 \docparam{stream
}{The stream to use to load the animation.
}
116 \docparam{type
}{One of the following values:
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.
}
126 \wxheading{Return value
}
128 \true if the operation succeeded,
\false otherwise.
131 \membersection{wxAnimation::LoadFile
}\label{wxanimationloadfile
}
133 \func{bool
}{LoadFile
}{\param{const wxString\&
}{ name
},
\param{wxAnimationType
}{ type = wxANIMATION
\_TYPE\_ANY}}
135 Loads an animation from a file.
137 \wxheading{Parameters
}
139 \docparam{name
}{A filename.
}
141 \docparam{type
}{One of the following values:
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.
}
151 \wxheading{Return value
}
153 \true if the operation succeeded,
\false otherwise.
156 \membersection{wxAnimation::operator $=$
}\label{wxanimationassignment
}
158 \func{wxAnimation\&
}{operator $=$
}{\param{const wxAnimation\&
}{brush
}}
160 Assignment operator, using
\helpref{reference counting
}{trefcount
}.