2006-10-09 13:51:07 -04:00
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
%% Name: animation.tex
|
|
|
|
%% Purpose: wxAnimation documentation
|
|
|
|
%% Author: Francesco Montorsi
|
|
|
|
%% Created: 24-9-2006
|
|
|
|
%% RCS-ID: $Id$
|
|
|
|
%% Copyright: (c) 2006 Francesco Montorsi
|
|
|
|
%% License: wxWindows license
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
|
|
|
|
\section{\class{wxAnimation}}\label{wxanimation}
|
|
|
|
|
|
|
|
This class encapsulates the concept of a platform-dependent animation.
|
|
|
|
An animation is a sequence of frames of the same size.
|
|
|
|
Sound is not supported by wxAnimation.
|
|
|
|
|
|
|
|
\wxheading{Derived from}
|
|
|
|
|
|
|
|
\helpref{wxGDIObject}{wxgdiobject}\\
|
|
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
|
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/animate.h>
|
|
|
|
|
|
|
|
\wxheading{Predefined objects}
|
|
|
|
|
|
|
|
Objects:
|
|
|
|
|
|
|
|
{\bf wxNullAnimation}
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxAnimationCtrl}{wxanimationctrl}
|
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
|
|
|
|
|
|
|
\membersection{wxAnimation::wxAnimation}\label{wxanimationctor}
|
|
|
|
|
|
|
|
\func{}{wxAnimation}{\void}
|
|
|
|
|
|
|
|
Default constructor.
|
|
|
|
|
|
|
|
\func{}{wxAnimation}{\param{const wxAnimation\& }{anim}}
|
|
|
|
|
2006-10-30 14:26:48 -05:00
|
|
|
Copy constructor, uses \helpref{reference counting}{trefcount}.
|
2006-10-09 13:51:07 -04:00
|
|
|
|
|
|
|
\func{}{wxAnimation}{\param{const wxString\& }{name}, \param{wxAnimationType}{ type = wxANIMATION\_TYPE\_ANY}}
|
|
|
|
|
|
|
|
Loads an animation from a file.
|
|
|
|
|
|
|
|
\docparam{name}{The name of the file to load.}
|
|
|
|
|
|
|
|
\docparam{type}{See \helpref{LoadFile}{wxanimationloadfile} for more info.}
|
|
|
|
|
|
|
|
|
|
|
|
\membersection{wxAnimation::\destruct{wxAnimation}}\label{wxanimationdtor}
|
|
|
|
|
|
|
|
\func{}{\destruct{wxAnimation}}{\void}
|
|
|
|
|
2006-10-30 14:26:48 -05:00
|
|
|
Destructor.
|
|
|
|
See \helpref{reference-counted object destruction}{refcountdestruct} for more info.
|
2006-10-09 13:51:07 -04:00
|
|
|
|
|
|
|
|
|
|
|
\membersection{wxAnimation::GetDelay}\label{wxanimationgetdelay}
|
|
|
|
|
2006-12-10 09:18:37 -05:00
|
|
|
\constfunc{int}{GetDelay}{\param{unsigned int }{i}}
|
2006-10-09 13:51:07 -04:00
|
|
|
|
|
|
|
Returns the delay for the i-th frame in milliseconds.
|
|
|
|
If {\tt -1} is returned the frame is to be displayed forever.
|
|
|
|
|
|
|
|
|
|
|
|
\membersection{wxAnimation::GetFrameCount}\label{wxanimationgetframecount}
|
|
|
|
|
2006-12-10 09:18:37 -05:00
|
|
|
\constfunc{unsigned int}{GetFrameCount}{\void}
|
2006-10-09 13:51:07 -04:00
|
|
|
|
|
|
|
Returns the number of frames for this animation.
|
|
|
|
|
|
|
|
|
|
|
|
\membersection{wxAnimation::GetFrame}\label{wxanimationgetframe}
|
|
|
|
|
2006-12-10 09:18:37 -05:00
|
|
|
\constfunc{wxImage}{GetFrame}{\param{unsigned int }{i}}
|
2006-10-09 13:51:07 -04:00
|
|
|
|
|
|
|
Returns the i-th frame as a \helpref{wxImage}{wximage}.
|
|
|
|
|
|
|
|
|
|
|
|
\membersection{wxAnimation::GetSize}\label{wxanimationgetsize}
|
|
|
|
|
|
|
|
\constfunc{wxSize}{GetSize}{\void}
|
|
|
|
|
|
|
|
Returns the size of the animation.
|
|
|
|
|
|
|
|
|
|
|
|
\membersection{wxAnimation::IsOk}\label{wxanimationisok}
|
|
|
|
|
|
|
|
\constfunc{bool}{IsOk}{\void}
|
|
|
|
|
|
|
|
Returns \true if animation data is present.
|
|
|
|
|
|
|
|
|
|
|
|
\membersection{wxAnimation::Load}\label{wxanimationload}
|
|
|
|
|
2006-11-26 13:43:24 -05:00
|
|
|
\func{bool}{Load}{\param{wxInputStream\&}{ stream}, \param{wxAnimationType}{ type = wxANIMATION\_TYPE\_ANY}}
|
2006-10-09 13:51:07 -04:00
|
|
|
|
|
|
|
Loads an animation from the given stream.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{stream}{The stream to use to load the animation.}
|
|
|
|
|
|
|
|
\docparam{type}{One of the following values:
|
|
|
|
|
|
|
|
\twocolwidtha{5cm}
|
|
|
|
\begin{twocollist}
|
2006-11-26 13:43:24 -05:00
|
|
|
\twocolitem{\indexit{wxANIMATION\_TYPE\_GIF}}{Load an animated GIF file.}
|
|
|
|
\twocolitem{\indexit{wxANIMATION\_TYPE\_ANI}}{Load an ANI file.}
|
|
|
|
\twocolitem{\indexit{wxANIMATION\_TYPE\_ANY}}{Try to autodetect the filetype.}
|
2006-10-09 13:51:07 -04:00
|
|
|
\end{twocollist}
|
|
|
|
}
|
|
|
|
|
|
|
|
\wxheading{Return value}
|
|
|
|
|
|
|
|
\true if the operation succeeded, \false otherwise.
|
|
|
|
|
|
|
|
|
|
|
|
\membersection{wxAnimation::LoadFile}\label{wxanimationloadfile}
|
|
|
|
|
|
|
|
\func{bool}{LoadFile}{\param{const wxString\&}{ name}, \param{wxAnimationType}{ type = wxANIMATION\_TYPE\_ANY}}
|
|
|
|
|
|
|
|
Loads an animation from a file.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{name}{A filename.}
|
|
|
|
|
|
|
|
\docparam{type}{One of the following values:
|
|
|
|
|
|
|
|
\twocolwidtha{5cm}
|
|
|
|
\begin{twocollist}
|
2006-11-26 13:43:24 -05:00
|
|
|
\twocolitem{\indexit{wxANIMATION\_TYPE\_GIF}}{Load an animated GIF file.}
|
|
|
|
\twocolitem{\indexit{wxANIMATION\_TYPE\_ANI}}{Load an ANI file.}
|
|
|
|
\twocolitem{\indexit{wxANIMATION\_TYPE\_ANY}}{Try to autodetect the filetype.}
|
2006-10-09 13:51:07 -04:00
|
|
|
\end{twocollist}
|
|
|
|
}
|
|
|
|
|
|
|
|
\wxheading{Return value}
|
|
|
|
|
|
|
|
\true if the operation succeeded, \false otherwise.
|
|
|
|
|
2006-10-30 14:26:48 -05:00
|
|
|
|
|
|
|
\membersection{wxAnimation::operator $=$}\label{wxanimationassignment}
|
|
|
|
|
|
|
|
\func{wxAnimation\&}{operator $=$}{\param{const wxAnimation\& }{brush}}
|
|
|
|
|
|
|
|
Assignment operator, using \helpref{reference counting}{trefcount}.
|
|
|
|
|