]> git.saurik.com Git - wxWidgets.git/commitdiff
add the wxAnimation's ctor which automatically loads a file: it was documented but...
authorFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Thu, 20 Mar 2008 22:33:57 +0000 (22:33 +0000)
committerFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Thu, 20 Mar 2008 22:33:57 +0000 (22:33 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/generic/animate.h
include/wx/gtk/animate.h

index efc1c2944679bcb2c7e3f4d93606ee903aa6bd11..7a140b3b96112b4408649fb442b827e1d954225c 100644 (file)
@@ -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; }
 
index 1bc82afc180e147420f98fd6e603f561bae53ae8..67a5f6d1b3453fb6aa9066927747e07ff724b5cc 100644 (file)
@@ -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(); }