]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_window.i
Gave wxWindow.GetHandle something to do on wxMac, although it won't
[wxWidgets.git] / wxPython / src / _window.i
index e0f5229c7d0f724685e8415dc0bc55d9807348a7..d6d9ad156edbcccdd358f410b2a95c48bd906594 100644 (file)
@@ -26,8 +26,8 @@ MAKE_CONST_WXSTRING(PanelNameStr);
 class wxWindow : public wxEvtHandler
 {
 public:
-    %addtofunc wxWindow         "self._setOORInfo(self)"
-    %addtofunc wxWindow()       ""
+    %pythonAppend wxWindow         "self._setOORInfo(self)"
+    %pythonAppend wxWindow()       ""
 
     wxWindow(wxWindow* parent, const wxWindowID id,
              const wxPoint& pos = wxDefaultPosition,
@@ -546,13 +546,13 @@ public:
 
     DocDeclAStr(
         void, GetTextExtent(const wxString& string, int *OUTPUT, int *OUTPUT),
-        "GetTextExtent(wxString string) -> (width, height)",
+        "GetTextExtent(String string) -> (width, height)",
         "Get the width and height of the text using the current font.");
     DocDeclAStrName(
         void, GetTextExtent(const wxString& string,
                             int *OUTPUT, int *OUTPUT, int *OUTPUT, int* OUTPUT, 
                             const wxFont* font = NULL),
-        "GetFullTextExtent(wxString string, Font font=None) ->\n   (width, height, descent, externalLeading)",
+        "GetFullTextExtent(String string, Font font=None) ->\n   (width, height, descent, externalLeading)",
         "Get the width, height, decent and leading of the text using the current or specified font.",
         GetFullTextExtent);
 
@@ -660,7 +660,7 @@ public:
     wxString GetHelpText() const;
 
 
-
+#ifndef __WXX11__
     // tooltips
     // --------
 
@@ -673,22 +673,27 @@ public:
     // get the associated tooltip or NULL if none
     wxToolTip* GetToolTip() const;
     // LINK ERROR --> wxString GetToolTipText() const;
+#endif
 
 
-
+    
+#ifndef __WXX11__
     // drag and drop
     // -------------
 
     // set/retrieve the drop target associated with this window (may be
     // NULL; it's owned by the window and will be deleted by it)
-    %addtofunc SetDropTarget "args[1].thisown = 0"
-    virtual void SetDropTarget( wxDropTarget *dropTarget );
-    virtual wxDropTarget *GetDropTarget() const;
+    %apply SWIGTYPE *DISOWN { wxPyDropTarget *dropTarget };
+    virtual void SetDropTarget( wxPyDropTarget *dropTarget );
+    %clear wxPyDropTarget *dropTarget;
+    
+    virtual wxPyDropTarget *GetDropTarget() const;
 
 #ifdef __WXMSW__  // TODO:  should I drop-kick this?
     void DragAcceptFiles(bool accept);
 #endif
-
+#endif
+    
 
     // constraints and sizers
     // ----------------------
@@ -762,13 +767,13 @@ def DLG_PNT(win, point_or_x, y=None):
     if y is None:
         return win.ConvertDialogPointToPixels(point_or_x)
     else:
-        return win.ConvertDialogPointToPixels(wxPoint(point_or_x, y))
+        return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
 
 def DLG_SZE(win, size_width, height=None):
     if height is None:
         return win.ConvertDialogSizeToPixels(size_width)
     else:
-        return win.ConvertDialogSizeToPixels(wxSize(size_width, height))
+        return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
 }
 
 
@@ -807,7 +812,7 @@ wxWindow* wxFindWindowByLabel( const wxString& label,
         win->SubclassWin(hWnd);
         return win;
 #else
-        PyErr_SetNone(PyExc_NotImplementedError);
+        wxPyRaiseNotImplemented();
         return NULL;
 #endif
     }