From: Francesco Montorsi Date: Thu, 20 Mar 2008 22:33:57 +0000 (+0000) Subject: add the wxAnimation's ctor which automatically loads a file: it was documented but... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/70f9d2bef3aa1e7268723b57ca952eea72f24d74 add the wxAnimation's ctor which automatically loads a file: it was documented but not present in the actual code git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/generic/animate.h b/include/wx/generic/animate.h index efc1c29446..7a140b3b96 100644 --- a/include/wx/generic/animate.h +++ b/include/wx/generic/animate.h @@ -23,6 +23,9 @@ WX_DECLARE_LIST_WITH_DECL(wxAnimationDecoder, wxAnimationDecoderList, class WXDL class WXDLLIMPEXP_ADV wxAnimation : public wxAnimationBase { public: + wxAnimation(const wxString &name, wxAnimationType type = wxANIMATION_TYPE_ANY) + { LoadFile(name, type); } + virtual bool IsOk() const { return m_refData != NULL; } diff --git a/include/wx/gtk/animate.h b/include/wx/gtk/animate.h index 1bc82afc18..67a5f6d1b3 100644 --- a/include/wx/gtk/animate.h +++ b/include/wx/gtk/animate.h @@ -27,6 +27,8 @@ typedef struct _GdkPixbufAnimationIter GdkPixbufAnimationIter; class WXDLLIMPEXP_ADV wxAnimation : public wxAnimationBase { public: + wxAnimation(const wxString &name, wxAnimationType type = wxANIMATION_TYPE_ANY) + : m_pixbuf(NULL) { LoadFile(name, type); } wxAnimation(GdkPixbufAnimation *p = NULL); wxAnimation(const wxAnimation&); ~wxAnimation() { UnRef(); }