X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/04ae32cdab5a96467db7a8d4eedb31c9799f0b56..75ac34cefc896f5fe466661e233bf6a6f0df8e84:/include/wx/xrc/xmlres.h?ds=inline diff --git a/include/wx/xrc/xmlres.h b/include/wx/xrc/xmlres.h index 0c80dfc9be..3ec28e0da7 100644 --- a/include/wx/xrc/xmlres.h +++ b/include/wx/xrc/xmlres.h @@ -31,6 +31,9 @@ #include "wx/xml/xml.h" +class WXDLLIMPEXP_FWD_BASE wxFileName; + +class WXDLLIMPEXP_FWD_CORE wxIconBundle; class WXDLLIMPEXP_FWD_CORE wxMenu; class WXDLLIMPEXP_FWD_CORE wxMenuBar; class WXDLLIMPEXP_FWD_CORE wxDialog; @@ -115,6 +118,9 @@ public: // Loads resources from single XRC file. bool LoadFile(const wxFileName& file); + // Loads all XRC files from a directory. + bool LoadAllFiles(const wxString& dirname); + // Unload resource from the given XML file (wildcards not allowed) bool Unload(const wxString& filename); @@ -258,6 +264,13 @@ public: { return GetResourceNodeAndLocation(name, wxString(), true); } protected: + // reports input error at position 'context' + void ReportError(wxXmlNode *context, const wxString& message); + + // override this in derived class to customize errors reporting + virtual void DoReportError(const wxString& xrcFile, wxXmlNode *position, + const wxString& message); + // Scans the resources list for unloaded files and loads them. Also reloads // files that have been modified since last loading. bool UpdateResources(); @@ -496,6 +509,10 @@ protected: const wxArtClient& defaultArtClient = wxART_OTHER, wxSize size = wxDefaultSize); + // Gets an icon bundle. + wxIconBundle GetIconBundle(const wxString& param, + const wxArtClient& defaultArtClient = wxART_OTHER); + #if wxUSE_ANIMATIONCTRL // Gets an animation. wxAnimation GetAnimation(const wxString& param = wxT("animation")); @@ -526,6 +543,13 @@ protected: #if wxUSE_FILESYSTEM wxFileSystem& GetCurFileSystem() { return m_resource->GetCurFileSystem(); } #endif + + // reports input error at position 'context' + void ReportError(wxXmlNode *context, const wxString& message); + // reports input error at m_node + void ReportError(const wxString& message); + // reports input error when parsing parameter with given name + void ReportParamError(const wxString& param, const wxString& message); };