X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/38b97c15acf982020caf8291c2ccc0b0a36eceab..9e477492e29e03c02827b1e42a16cb09a13f5149:/wxPython/src/_xmlhandler.i?ds=sidebyside diff --git a/wxPython/src/_xmlhandler.i b/wxPython/src/_xmlhandler.i index 018d20777a..bf0a5d970b 100644 --- a/wxPython/src/_xmlhandler.i +++ b/wxPython/src/_xmlhandler.i @@ -24,7 +24,7 @@ class wxPyXmlResourceHandler : public wxXmlResourceHandler { public: wxPyXmlResourceHandler() : wxXmlResourceHandler() {} - //~wxPyXmlResourceHandler(); + ~wxPyXmlResourceHandler() {} // Base class virtuals @@ -40,7 +40,6 @@ public: wxObject* GetParent() { return m_parent; } wxObject* GetInstance() { return m_instance; } wxWindow* GetParentAsWindow() { return m_parentAsWindow; } - wxWindow* GetInstanceAsWindow() { return m_instanceAsWindow; } // turn some protected methods into public via delegation @@ -69,7 +68,7 @@ public: int GetStyle(const wxString& param = wxT("style"), int defaults = 0) { return wxXmlResourceHandler::GetStyle(param, defaults); } - wxString GetText(const wxString& param, bool translate = True) + wxString GetText(const wxString& param, bool translate = true) { return wxXmlResourceHandler::GetText(param, translate); } int GetID() @@ -78,7 +77,7 @@ public: wxString GetName() { return wxXmlResourceHandler::GetName(); } - bool GetBool(const wxString& param, bool defaultv = False) + bool GetBool(const wxString& param, bool defaultv = false) { return wxXmlResourceHandler::GetBool(param, defaultv); } long GetLong( const wxString& param, long defaultv = 0 ) @@ -106,13 +105,16 @@ public: wxSize size = wxDefaultSize) { return wxXmlResourceHandler::GetIcon(param, defaultArtClient, size); } + wxAnimation GetAnimation(const wxString& param = wxT("animation")) + { return wxXmlResourceHandler::GetAnimation(param); } + wxFont GetFont(const wxString& param = wxT("font")) { return wxXmlResourceHandler::GetFont(param); } void SetupWindow(wxWindow *wnd) { wxXmlResourceHandler::SetupWindow(wnd); } - void CreateChildren(wxObject *parent, bool this_hnd_only = False) + void CreateChildren(wxObject *parent, bool this_hnd_only = false) { wxXmlResourceHandler::CreateChildren(parent, this_hnd_only); } void CreateChildrenPrivately(wxObject *parent, wxXmlNode *rootnode = NULL) @@ -138,11 +140,12 @@ IMP_PYCALLBACK_BOOL_NODE_pure(wxPyXmlResourceHandler, wxXmlResourceHandler, CanH // Now the version that will be SWIGged. -%name(XmlResourceHandler) class wxPyXmlResourceHandler : public wxObject { +%rename(XmlResourceHandler) wxPyXmlResourceHandler; +class wxPyXmlResourceHandler : public wxObject { public: - %pythonAppend wxPyXmlResourceHandler "self._setCallbackInfo(self, XmlResourceHandler)" + %pythonAppend wxPyXmlResourceHandler setCallbackInfo(XmlResourceHandler) wxPyXmlResourceHandler() : wxXmlResourceHandler() {} - //~wxPyXmlResourceHandler(); + ~wxPyXmlResourceHandler(); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -166,7 +169,7 @@ public: wxObject* GetParent() { return m_parent; } wxObject* GetInstance() { return m_instance; } wxWindow* GetParentAsWindow() { return m_parentAsWindow; } - wxWindow* GetInstanceAsWindow() { return m_instanceAsWindow; } +// wxWindow* GetInstanceAsWindow() { return m_instanceAsWindow; } // Returns true if the node has a property class equal to classname, @@ -204,7 +207,7 @@ public: // - replaces \n, \r, \t by respective chars (according to C syntax) // - replaces _ by & and __ by _ (needed for _File => &File because of XML) // - calls wxGetTranslations (unless disabled in wxXmlResource) - wxString GetText(const wxString& param, bool translate = True); + wxString GetText(const wxString& param, bool translate = true); // Returns the XRCID. int GetID(); @@ -212,8 +215,8 @@ public: // Returns the resource name. wxString GetName(); - // Gets a bool flag (1, t, yes, on, true are True, everything else is False). - bool GetBool(const wxString& param, bool defaultv = False); + // Gets a bool flag (1, t, yes, on, true are True, everything else is false). + bool GetBool(const wxString& param, bool defaultv = false); // Gets the integer value from the parameter. long GetLong( const wxString& param, long defaultv = 0 ); @@ -243,11 +246,14 @@ public: // Gets a font. wxFont GetFont(const wxString& param = wxPyFontString); + // Gets an animation. + wxAnimation GetAnimation(const wxString& param = wxPyAnimationString); + // Sets common window options. void SetupWindow(wxWindow *wnd); // Creates children. - void CreateChildren(wxObject *parent, bool this_hnd_only = False); + void CreateChildren(wxObject *parent, bool this_hnd_only = false); // Helper function. void CreateChildrenPrivately(wxObject *parent, wxXmlNode *rootnode = NULL); @@ -258,6 +264,16 @@ public: // helper wxFileSystem& GetCurFileSystem(); + + %property(Class, GetClass, doc="See `GetClass`"); + %property(CurFileSystem, GetCurFileSystem, doc="See `GetCurFileSystem`"); + %property(ID, GetID, doc="See `GetID`"); + %property(Instance, GetInstance, doc="See `GetInstance`"); + %property(Name, GetName, doc="See `GetName`"); + %property(Node, GetNode, doc="See `GetNode`"); + %property(Parent, GetParent, doc="See `GetParent`"); + %property(ParentAsWindow, GetParentAsWindow, doc="See `GetParentAsWindow`"); + %property(Resource, GetResource, doc="See `GetResource`"); };