]>
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)
8 // Copyright: (c) 2000 Vaclav Slavik
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 // ============================================================================
14 // ============================================================================
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
20 // for compilers that support precompilation, includes "wx.h".
21 #include "wx/wxprec.h"
29 #include "wx/xrc/xmlres.h"
35 #include "wx/animate.h"
36 #include "wx/scopedptr.h"
38 // ============================================================================
40 // ============================================================================
42 #if wxUSE_ANIMATIONCTRL
43 wxAnimation
* wxXmlResourceHandlerImpl::GetAnimation(const wxString
& param
)
45 const wxString name
= GetParamValue(param
);
49 // load the animation from file
50 wxScopedPtr
<wxAnimation
> ani(new wxAnimation
);
53 fsfile
= GetCurFileSystem().OpenFile(name
, wxFS_READ
| wxFS_SEEKABLE
);
56 ani
->Load(*fsfile
->GetStream());
68 wxString::Format("cannot create animation from \"%s\"", name
)
75 #endif // wxUSE_ANIMATIONCTRL