X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c15893b50ef35e3760c3c255e0d84f660b8cd370..59ccbf7fec7543fb2629f195592cb8aa67aa143b:/wxPython/src/_xmlres.i?ds=sidebyside diff --git a/wxPython/src/_xmlres.i b/wxPython/src/_xmlres.i index d313e342ec..ba07720eea 100644 --- a/wxPython/src/_xmlres.i +++ b/wxPython/src/_xmlres.i @@ -45,8 +45,10 @@ class wxXmlResource : public wxObject { public: - %pythonAppend wxXmlResource(const wxString& filemask, int flags) "self.InitAllHandlers()" - %pythonAppend wxXmlResource(int flags) "val.InitAllHandlers()" + %pythonAppend wxXmlResource(const wxString& filemask, int flags, + const wxString& domain=wxEmptyString) "self.InitAllHandlers()" + %pythonAppend wxXmlResource(int flags, + const wxString& domain=wxEmptyString) "val.InitAllHandlers()" // Ctors. // Flags: wxXRC_USE_LOCALE @@ -54,11 +56,15 @@ public: // wxXRC_NO_SUBCLASSING // subclass property of object nodes will be ignored // (useful for previews in XRC editors) - wxXmlResource(const wxString& filemask, int flags = wxXRC_USE_LOCALE); - %RenameCtor(EmptyXmlResource, wxXmlResource(int flags = wxXRC_USE_LOCALE)); + wxXmlResource(const wxString& filemask, int flags = wxXRC_USE_LOCALE, + const wxString& domain=wxEmptyString); + %RenameCtor(EmptyXmlResource, wxXmlResource(int flags = wxXRC_USE_LOCALE, + const wxString& domain=wxEmptyString)); + ~wxXmlResource(); - + //wxXmlNode* GetFirstRoot(); ** Link error + // Loads resources from XML files that match given filemask. // This method understands VFS (see filesys.h). bool Load(const wxString& filemask); @@ -97,6 +103,9 @@ public: // Initialize handlers for all supported controls/windows. void InitAllHandlers(); + + %disownarg( wxPyXmlResourceHandler *handler ); + // 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 @@ -107,6 +116,9 @@ public: // Add a new handler at the begining of the handler list void InsertHandler(wxPyXmlResourceHandler *handler); + %cleardisown( wxPyXmlResourceHandler *handler ); + + // Removes all handlers void ClearHandlers(); @@ -195,6 +207,13 @@ public: // Set flags after construction. void SetFlags(int flags) { m_flags = flags; } + // Get/Set the domain to be passed to the translation functions, defaults to NULL. + wxString GetDomain() const; + void SetDomain(const wxString& domain); + + %property(Domain, GetDomain, SetDomain, doc="See `GetDomain` and `SetDomain`"); + %property(Flags, GetFlags, SetFlags, doc="See `GetFlags` and `SetFlags`"); + %property(Version, GetVersion, doc="See `GetVersion`"); }; //----------------------------------------------------------------------