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
}
26 \wxheading{Predefined objects
}
34 \helpref{wxAnimationCtrl
}{wxanimationctrl
}
36 \latexignore{\rtfignore{\wxheading{Members
}}}
39 \membersection{wxAnimation::wxAnimation
}\label{wxanimationctor
}
41 \func{}{wxAnimation
}{\void}
45 \func{}{wxAnimation
}{\param{const wxAnimation\&
}{anim
}}
47 Copy constructor, uses
\helpref{reference counting
}{trefcount
}.
49 \func{}{wxAnimation
}{\param{const wxString\&
}{name
},
\param{wxAnimationType
}{ type = wxANIMATION
\_TYPE\_ANY}}
51 Loads an animation from a file.
53 \docparam{name
}{The name of the file to load.
}
55 \docparam{type
}{See
\helpref{LoadFile
}{wxanimationloadfile
} for more info.
}
58 \membersection{wxAnimation::
\destruct{wxAnimation
}}\label{wxanimationdtor
}
60 \func{}{\destruct{wxAnimation
}}{\void}
63 See
\helpref{reference-counted object destruction
}{refcountdestruct
} for more info.
66 \membersection{wxAnimation::GetDelay
}\label{wxanimationgetdelay
}
68 \constfunc{int
}{GetDelay
}{\param{size
\_t }{i
}}
70 Returns the delay for the i-th frame in milliseconds.
71 If
{\tt -
1} is returned the frame is to be displayed forever.
74 \membersection{wxAnimation::GetFrameCount
}\label{wxanimationgetframecount
}
76 \constfunc{size
\_t}{GetFrameCount
}{\void}
78 Returns the number of frames for this animation.
81 \membersection{wxAnimation::GetFrame
}\label{wxanimationgetframe
}
83 \constfunc{wxImage
}{GetFrame
}{\param{size
\_t }{i
}}
85 Returns the i-th frame as a
\helpref{wxImage
}{wximage
}.
88 \membersection{wxAnimation::GetSize
}\label{wxanimationgetsize
}
90 \constfunc{wxSize
}{GetSize
}{\void}
92 Returns the size of the animation.
95 \membersection{wxAnimation::IsOk
}\label{wxanimationisok
}
97 \constfunc{bool
}{IsOk
}{\void}
99 Returns
\true if animation data is present.
102 \membersection{wxAnimation::Load
}\label{wxanimationload
}
104 \func{bool
}{Load
}{\param{wxInputStream&
}{ stream
},
\param{wxAnimationType
}{ type = wxANIMATION
\_TYPE\_ANY}}
106 Loads an animation from the given stream.
108 \wxheading{Parameters
}
110 \docparam{stream
}{The stream to use to load the animation.
}
112 \docparam{type
}{One of the following values:
116 \twocolitem{\indexit{wxANIM
\_TYPE\_GIF}}{Load an animated GIF file.
}
117 \twocolitem{\indexit{wxANIM
\_TYPE\_ANI}}{Load an ANI file.
}
118 \twocolitem{\indexit{wxANIM
\_TYPE\_ANY}}{Try to autodetect the filetype.
}
122 \wxheading{Return value
}
124 \true if the operation succeeded,
\false otherwise.
127 \membersection{wxAnimation::LoadFile
}\label{wxanimationloadfile
}
129 \func{bool
}{LoadFile
}{\param{const wxString\&
}{ name
},
\param{wxAnimationType
}{ type = wxANIMATION
\_TYPE\_ANY}}
131 Loads an animation from a file.
133 \wxheading{Parameters
}
135 \docparam{name
}{A filename.
}
137 \docparam{type
}{One of the following values:
141 \twocolitem{\indexit{wxANIM
\_TYPE\_GIF}}{Load an animated GIF file.
}
142 \twocolitem{\indexit{wxANIM
\_TYPE\_ANI}}{Load an ANI file.
}
143 \twocolitem{\indexit{wxANIM
\_TYPE\_ANY}}{Try to autodetect the filetype.
}
147 \wxheading{Return value
}
149 \true if the operation succeeded,
\false otherwise.
152 \membersection{wxAnimation::operator $=$
}\label{wxanimationassignment
}
154 \func{wxAnimation\&
}{operator $=$
}{\param{const wxAnimation\&
}{brush
}}
156 Assignment operator, using
\helpref{reference counting
}{trefcount
}.