extract parts of wxXRC depending on wxAdv in a separate file to allow statically linking with wxXRC but without wxAdv; note that rebaked project/make files also contain ustring.cpp/h now
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54924 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1170,40 +1170,6 @@ wxBitmap wxXmlResourceHandler::GetBitmap(const wxString& param,
|
||||
return wxBitmap(img);
|
||||
}
|
||||
|
||||
#if wxUSE_ANIMATIONCTRL
|
||||
wxAnimation wxXmlResourceHandler::GetAnimation(const wxString& param)
|
||||
{
|
||||
wxAnimation ani;
|
||||
|
||||
/* load the animation from file: */
|
||||
wxString name = GetParamValue(param);
|
||||
if (name.empty()) return wxNullAnimation;
|
||||
#if wxUSE_FILESYSTEM
|
||||
wxFSFile *fsfile = GetCurFileSystem().OpenFile(name, wxFS_READ | wxFS_SEEKABLE);
|
||||
if (fsfile == NULL)
|
||||
{
|
||||
wxLogError(_("XRC resource: Cannot create animation from '%s'."),
|
||||
name.c_str());
|
||||
return wxNullAnimation;
|
||||
}
|
||||
ani.Load(*(fsfile->GetStream()));
|
||||
delete fsfile;
|
||||
#else
|
||||
ani.LoadFile(name);
|
||||
#endif
|
||||
|
||||
if (!ani.IsOk())
|
||||
{
|
||||
wxLogError(_("XRC resource: Cannot create animation from '%s'."),
|
||||
name.c_str());
|
||||
return wxNullAnimation;
|
||||
}
|
||||
|
||||
return ani;
|
||||
}
|
||||
#endif // wxUSE_ANIMATIONCTRL
|
||||
|
||||
|
||||
|
||||
wxIcon wxXmlResourceHandler::GetIcon(const wxString& param,
|
||||
const wxArtClient& defaultArtClient,
|
||||
|
Reference in New Issue
Block a user