]>
git.saurik.com Git - wxWidgets.git/blob - src/xrc/xmladv.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: src/xrc/xmladv.cpp
3 // Purpose: Parts of wxXRC library depending on wxAdv: they must not be in
4 // xmlres.cpp itself or it becomes impossible to use wxXRC without
5 // linking wxAdv even if the latter is not used at all.
6 // Author: Vadim Zeitlin (extracted from src/xrc/xmlres.cpp)
9 // Copyright: (c) 2000 Vaclav Slavik
10 // Licence: wxWindows licence
11 ///////////////////////////////////////////////////////////////////////////////
13 // ============================================================================
15 // ============================================================================
17 // ----------------------------------------------------------------------------
19 // ----------------------------------------------------------------------------
21 // for compilers that support precompilation, includes "wx.h".
22 #include "wx/wxprec.h"
30 #include "wx/xrc/xmlres.h"
36 #include "wx/animate.h"
37 #include "wx/scopedptr.h"
39 // ============================================================================
41 // ============================================================================
43 #if wxUSE_ANIMATIONCTRL
44 wxAnimation
* wxXmlResourceHandlerImpl::GetAnimation(const wxString
& param
)
46 const wxString name
= GetParamValue(param
);
50 // load the animation from file
51 wxScopedPtr
<wxAnimation
> ani(new wxAnimation
);
54 fsfile
= GetCurFileSystem().OpenFile(name
, wxFS_READ
| wxFS_SEEKABLE
);
57 ani
->Load(*fsfile
->GetStream());
69 wxString::Format("cannot create animation from \"%s\"", name
)
76 #endif // wxUSE_ANIMATIONCTRL