X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/48271822ef3d56c8f91af882b68fd1b674a8e8e6..3201a1046ba71ba8e5ef2ed694fde34d12f743f3:/src/generic/animateg.cpp diff --git a/src/generic/animateg.cpp b/src/generic/animateg.cpp index dc7062fc07..a2a50f94be 100644 --- a/src/generic/animateg.cpp +++ b/src/generic/animateg.cpp @@ -15,7 +15,7 @@ #pragma hdrstop #endif //__BORLANDC__ -#if wxUSE_ANIMATIONCTRL && (!defined(__WXGTK20__) || defined(__WXUNIVERSAL__)) +#if wxUSE_ANIMATIONCTRL #include "wx/animate.h" @@ -307,10 +307,15 @@ wxAnimationCtrl::~wxAnimationCtrl() } bool wxAnimationCtrl::LoadFile(const wxString& filename, wxAnimationType type) +{ + wxFileInputStream fis(filename); + return Load(fis, type); +} + +bool wxAnimationCtrl::Load(wxInputStream& stream, wxAnimationType type) { wxAnimation anim; - if (!anim.LoadFile(filename, type) || - !anim.IsOk()) + if ( !anim.Load(stream, type) || !anim.IsOk() ) return false; SetAnimation(anim); @@ -687,5 +692,5 @@ void wxAnimationCtrl::OnSize(wxSizeEvent &WXUNUSED(event)) } } -#endif // wxUSE_ANIMATIONCTRL +#endif // wxUSE_ANIMATIONCTRL