X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ae3c17b4013e80b99976c750c19fca47729517f6..92c0fc34c104c8d7c12d6a3b78ea232690fc23f4:/interface/wx/animate.h diff --git a/interface/wx/animate.h b/interface/wx/animate.h index 62e2ab5a8f..f4376a3e29 100644 --- a/interface/wx/animate.h +++ b/interface/wx/animate.h @@ -2,8 +2,7 @@ // Name: animate.h // Purpose: interface of wxAnimation* classes // Author: wxWidgets team -// RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** @@ -23,9 +22,13 @@ enum wxAnimationType wxANIMATION_TYPE_ANY }; + +#define wxAC_NO_AUTORESIZE (0x0010) +#define wxAC_DEFAULT_STYLE (wxBORDER_NONE) + + /** @class wxAnimationCtrl - @wxheader{animate.h} This is a static control which displays an animation. wxAnimationCtrl API is as simple as possible and won't give you full control @@ -50,7 +53,7 @@ enum wxAnimationType @nativeimpl{wxgtk,wxmsw} - + @appearance{animationctrl} @see wxAnimation, @sample{animate} */ @@ -71,7 +74,7 @@ public: /** Creates the control with the given @a anim animation. - After control creation you must explicitely call Play() to start to play + After control creation you must explicitly call Play() to start to play the animation. Until that function won't be called, the first frame of the animation is displayed. @@ -177,12 +180,17 @@ public: /** @class wxAnimation - @wxheader{animate.h} 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. + Note that on wxGTK wxAnimation is capable of loading the formats supported + by the internally-used @c gdk-pixbuf library (typically this means only + @c wxANIMATION_TYPE_GIF). + On other platforms wxAnimation is always capable of loading both GIF and ANI + formats (i.e. both @c wxANIMATION_TYPE_GIF and @c wxANIMATION_TYPE_ANI). + @library{wxadv} @category{gdi} @@ -191,9 +199,14 @@ public: @see wxAnimationCtrl, @sample{animate} */ -class wxAnimation : public wxGDIObject +class wxAnimation : public wxObject { public: + /** + Default ctor. + */ + wxAnimation(); + /** Copy ctor. */ @@ -205,7 +218,7 @@ public: @param name The name of the file to load. @param type - See LoadFile for more info. + See LoadFile() for more info. */ wxAnimation(const wxString& name, wxAnimationType type = wxANIMATION_TYPE_ANY); @@ -224,11 +237,17 @@ public: /** Returns the i-th frame as a wxImage. + + This method is not implemented in the native wxGTK implementation of + this class and always returns an invalid image there. */ virtual wxImage GetFrame(unsigned int i) const; /** Returns the number of frames for this animation. + + This method is not implemented in the native wxGTK implementation of + this class and always returns 0 there. */ virtual unsigned int GetFrameCount() const; @@ -247,11 +266,10 @@ public: @param stream The stream to use to load the animation. + Under wxGTK may be any kind of stream; under other platforms + this must be a seekable stream. @param type - One of the following values: - @li wxANIMATION_TYPE_GIF: loads an animated GIF file; - @li wxANIMATION_TYPE_ANI: load an ANI file; - @li wxANIMATION_TYPE_ANY: tries to autodetect the filetype. + One of the ::wxAnimationType enumeration values. @return @true if the operation succeeded, @false otherwise. */ @@ -264,7 +282,7 @@ public: @param name A filename. @param type - One of the wxAnimationType values; wxANIMATION_TYPE_ANY + One of the ::wxAnimationType values; wxANIMATION_TYPE_ANY means that the function should try to autodetect the filetype. @return @true if the operation succeeded, @false otherwise.