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(); }