X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e6056257ab676ea10a51ef96e19b1f1092f95b40..922ba68045d84789ab1dfceb4d1aa1b6e2c5e810:/wxPython/src/windows.i?ds=inline

diff --git a/wxPython/src/windows.i b/wxPython/src/windows.i
index 0da45474bc..bd9e38110e 100644
--- a/wxPython/src/windows.i
+++ b/wxPython/src/windows.i
@@ -63,6 +63,14 @@ public:
                           (wxObjectEventFunction) &wxPyCallback::EventThunker,
                           new wxPyCallback(func));
             }
+            else if (func == Py_None) {
+                self->Disconnect(id, lastId, eventType,
+                                 (wxObjectEventFunction)
+                                 &wxPyCallback::EventThunker);
+            }
+            else {
+                PyErr_SetString(PyExc_TypeError, "Expected callable object or None.");
+            }
         }
 
         bool Disconnect(int id, int lastId = -1,
@@ -226,7 +234,7 @@ public:
     wxLayoutConstraints * GetConstraints();
     wxEvtHandler* GetEventHandler();
 
-    wxFont& GetFont();
+    wxFont GetFont();
     wxColour GetForegroundColour();
     wxWindow * GetGrandParent();
     %addmethods {
@@ -324,11 +332,11 @@ public:
     %name(SetClientSizeWH)void SetClientSize(int width, int height);
     void SetClientSize(const wxSize& size);
     //void SetPalette(wxPalette* palette);
-    void SetCursor(const wxCursor&cursor);
+    void SetCursor(const wxCursor& cursor);
     void SetEventHandler(wxEvtHandler* handler);
     void SetExtraStyle(long exStyle);
     void SetTitle(const wxString& title);
-    bool Show(bool show);
+    bool Show(bool show=TRUE);
     bool TransferDataFromWindow();
     bool TransferDataToWindow();
     bool Validate();
@@ -392,6 +400,11 @@ public:
 
     void SetAcceleratorTable(const wxAcceleratorTable& accel);
     wxAcceleratorTable *GetAcceleratorTable();
+
+#ifdef __WXMSW__
+    // A way to do the native draw first...  Too bad it isn't in wxGTK too.
+    void OnPaint(wxPaintEvent& event);
+#endif
 };
 
 
@@ -444,7 +457,7 @@ public:
                 const char* name = "panel");
 
     %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
-    %pragma(python) addtomethod = "XXX:val._setOORInfo(self)"
+    %pragma(python) addtomethod = "wxPrePanel:val._setOORInfo(val)"
 
     void InitDialog();
     wxButton* GetDefaultItem();
@@ -648,7 +661,7 @@ public:
     // wxOwnerDrawn methods
 #ifdef __WXMSW__
     void SetFont(const wxFont& font);
-    wxFont& GetFont();
+    wxFont GetFont();
     void SetTextColour(const wxColour& colText);
     wxColour GetTextColour();
     void SetBackgroundColour(const wxColour& colBack);
@@ -656,7 +669,7 @@ public:
     void SetBitmaps(const wxBitmap& bmpChecked,
                     const wxBitmap& bmpUnchecked = wxNullBitmap);
     void SetBitmap(const wxBitmap& bmpChecked);
-    const wxBitmap& GetBitmap(bool bChecked = TRUE);
+    wxBitmap GetBitmap(bool bChecked = TRUE);
     void SetMarginWidth(int nWidth);
     int GetMarginWidth();
     static int GetDefaultMarginWidth();