added wxXmlResource::Unload() (replaces patch 1178853)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34839 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-07-13 18:01:43 +00:00
parent 2148dc99a9
commit 60fd818a78
4 changed files with 135 additions and 23 deletions

View File

@@ -124,6 +124,9 @@ public:
// This method understands VFS (see filesys.h).
bool Load(const wxString& filemask);
// Unload resource from the given XML file (wildcards not allowed)
bool Unload(const wxString& filename);
// Initialize handlers for all supported controls/windows. This will
// make the executable quite big because it forces linking against
// most of the wxWidgets library.
@@ -250,6 +253,17 @@ protected:
wxObject *instance = NULL,
wxXmlResourceHandler *handlerToUse = NULL);
// Helper of Load() and Unload(): returns the URL corresponding to the
// given file if it's indeed a file, otherwise returns the original string
// unmodified
static wxString ConvertFileNameToURL(const wxString& filename);
// loading resources from archives is impossible without wxFileSystem
#if wxUSE_FILESYSTEM
// Another helper: detect if the filename is a ZIP or XRS file
static bool IsArchive(const wxString& filename);
#endif // wxUSE_FILESYSTEM
private:
long m_version;