]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/msw/windows2.py
added functions to read/write several elements at once (patch 754986)
[wxWidgets.git] / wxPython / src / msw / windows2.py
index f9850115824951e90c1cbb748de97940aa758abf..b263d3c4c785febd8e01c39edfe46ec661d58aa6 100644 (file)
@@ -249,9 +249,12 @@ class wxTaskBarIconPtr(wxEvtHandlerPtr):
     def __init__(self,this):
         self.this = this
         self.thisown = 0
-    def __del__(self,windows2c=windows2c):
-        if self.thisown == 1 :
-            windows2c.delete_wxTaskBarIcon(self)
+    def __del__(self, delfunc=windows2c.delete_wxTaskBarIcon):
+        if self.thisown == 1:
+            try:
+                delfunc(self)
+            except:
+                pass
     def SetIcon(self, *_args, **_kwargs):
         val = apply(windows2c.wxTaskBarIcon_SetIcon,(self,) + _args, _kwargs)
         return val
@@ -342,6 +345,12 @@ class wxPyWindowPtr(wxWindowPtr):
         val = apply(windows2c.wxPyWindow_base_GetMaxSize,(self,) + _args, _kwargs)
         if val: val = wxSizePtr(val) ; val.thisown = 1
         return val
+    def base_AddChild(self, *_args, **_kwargs):
+        val = apply(windows2c.wxPyWindow_base_AddChild,(self,) + _args, _kwargs)
+        return val
+    def base_RemoveChild(self, *_args, **_kwargs):
+        val = apply(windows2c.wxPyWindow_base_RemoveChild,(self,) + _args, _kwargs)
+        return val
     def __repr__(self):
         return "<C wxPyWindow instance at %s>" % (self.this,)
 class wxPyWindow(wxPyWindowPtr):
@@ -412,6 +421,12 @@ class wxPyControlPtr(wxControlPtr):
         val = apply(windows2c.wxPyControl_base_GetMaxSize,(self,) + _args, _kwargs)
         if val: val = wxSizePtr(val) ; val.thisown = 1
         return val
+    def base_AddChild(self, *_args, **_kwargs):
+        val = apply(windows2c.wxPyControl_base_AddChild,(self,) + _args, _kwargs)
+        return val
+    def base_RemoveChild(self, *_args, **_kwargs):
+        val = apply(windows2c.wxPyControl_base_RemoveChild,(self,) + _args, _kwargs)
+        return val
     def __repr__(self):
         return "<C wxPyControl instance at %s>" % (self.this,)
 class wxPyControl(wxPyControlPtr):
@@ -482,6 +497,12 @@ class wxPyPanelPtr(wxPanelPtr):
         val = apply(windows2c.wxPyPanel_base_GetMaxSize,(self,) + _args, _kwargs)
         if val: val = wxSizePtr(val) ; val.thisown = 1
         return val
+    def base_AddChild(self, *_args, **_kwargs):
+        val = apply(windows2c.wxPyPanel_base_AddChild,(self,) + _args, _kwargs)
+        return val
+    def base_RemoveChild(self, *_args, **_kwargs):
+        val = apply(windows2c.wxPyPanel_base_RemoveChild,(self,) + _args, _kwargs)
+        return val
     def __repr__(self):
         return "<C wxPyPanel instance at %s>" % (self.this,)
 class wxPyPanel(wxPyPanelPtr):