-enum wxXmlResourceFlags
-{
- wxXRC_USE_LOCALE = 1,
- wxXRC_NO_SUBCLASSING = 2
-};
-
-
-// This class holds XML resources from one or more .xml files
-// (or derived forms, either binary or zipped -- see manual for
-// details).
-
-class wxXmlResource : public wxObject
-{
-public:
- // Ctor.
- // Flags: wxXRC_USE_LOCALE
- // translatable strings will be translated via _()
- // wxXRC_NO_SUBCLASSING
- // subclass property of object nodes will be ignored
- // (useful for previews in XRC editors)
- %name(wxXmlResourceEmpty)wxXmlResource(int flags = wxXRC_USE_LOCALE); // TODO, a better %name
-
- %addmethods {
- wxXmlResource(const wxString* filemask, int flags = wxXRC_USE_LOCALE) {
- wxXmlResource* res = new wxXmlResource(*filemask, flags);
- res->InitAllHandlers();
- return res;
- }
- }
-
- ~wxXmlResource();
-
-
- // Loads resources from XML files that match given filemask.
- // This method understands VFS (see filesys.h).
- bool Load(const wxString& filemask);
-
- // Initialize handlers for all supported controls/windows. This will
- // make the executable quite big because it forces linking against
- // most of wxWin library
- void InitAllHandlers();
-
- // Initialize only specific handler (or custom handler). Convention says
- // that handler name is equal to control's name plus 'XmlHandler', e.g.
- // wxTextCtrlXmlHandler, wxHtmlWindowXmlHandler. XML resource compiler
- // (xmlres) can create include file that contains initialization code for
- // all controls used within the resource.
- void AddHandler(wxXmlResourceHandler *handler);
-
- // Removes all handlers
- void ClearHandlers();
-
- // Loads menu from resource. Returns NULL on failure.
- wxMenu *LoadMenu(const wxString& name);
-
- // Loads menubar from resource. Returns NULL on failure.
- wxMenuBar *LoadMenuBar(const wxString& name);