added wxXmlResource::LoadAllFiles()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59509 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2009-03-13 13:26:46 +00:00
parent 95835bc453
commit 2bb9a404fb
4 changed files with 35 additions and 46 deletions

View File

@@ -44,7 +44,7 @@
#include "wx/fontenum.h"
#include "wx/fontmap.h"
#include "wx/artprov.h"
#include "wx/dir.h"
#include "wx/xml/xml.h"
@@ -183,6 +183,22 @@ bool wxXmlResource::LoadFile(const wxFileName& file)
return Load(wxFileSystem::FileNameToURL(file));
}
bool wxXmlResource::LoadAllFiles(const wxString& dirname)
{
bool ok = true;
wxArrayString files;
wxDir::GetAllFiles(dirname, &files, "*.xrc");
for ( wxArrayString::const_iterator i = files.begin(); i != files.end(); ++i )
{
if ( !LoadFile(*i) )
ok = false;
}
return ok;
}
bool wxXmlResource::Load(const wxString& filemask_)
{
wxString filemask = ConvertFileNameToURL(filemask_);