X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1b8c7ba607a15a2ff8a04448138df9ffff7df6c5..260c9c7df3a2968f93a4c474024c60b425fdea12:/wxPython/src/_misc.i diff --git a/wxPython/src/_misc.i b/wxPython/src/_misc.i index 15d4c69340..ef64c3ef7b 100644 --- a/wxPython/src/_misc.i +++ b/wxPython/src/_misc.i @@ -43,8 +43,16 @@ MustHaveApp(wxCaret); class wxCaret { public: wxCaret(wxWindow* window, const wxSize& size); - ~wxCaret(); - +// ~wxCaret(); Window takes ownership + + %extend { + DocStr(Destroy, + "Deletes the C++ object this Python object is a proxy for.", ""); + void Destroy() { + delete self; + } + } + bool IsOk(); bool IsVisible(); @@ -70,17 +78,11 @@ public: void Hide(); %pythoncode { def __nonzero__(self): return self.IsOk() } -}; -%inline %{ - int wxCaret_GetBlinkTime() { - return wxCaret::GetBlinkTime(); - } + static int GetBlinkTime(); + static void SetBlinkTime(int milliseconds); +}; - void wxCaret_SetBlinkTime(int milliseconds) { - wxCaret::SetBlinkTime(milliseconds); - } -%} //--------------------------------------------------------------------------- @@ -207,7 +209,7 @@ public: //--------------------------------------------------------------------------- // Experimental... - +#if 0 %{ #ifdef __WXMSW__ @@ -279,14 +281,15 @@ void wxDrawWindowOnDC(wxWindow* window, const wxDC& dc, int method) } if (pfnPrintWindow) { - printf("Using PrintWindow\n"); + //printf("Using PrintWindow\n"); pfnPrintWindow(GetHwndOf(window), GetHdcOf(dc), 0); } else { - printf("Using WM_PRINT\n"); + //printf("Using WM_PRINT\n"); ::SendMessage(GetHwndOf(window), WM_PRINT, (long)GetHdcOf(dc), - PRF_CLIENT | PRF_NONCLIENT | PRF_CHILDREN | PRF_ERASEBKGND | PRF_OWNED ); + PRF_CLIENT | PRF_NONCLIENT | PRF_CHILDREN | + PRF_ERASEBKGND | PRF_OWNED ); } } #endif @@ -294,5 +297,7 @@ void wxDrawWindowOnDC(wxWindow* window, const wxDC& dc, int method) %} +#endif + //--------------------------------------------------------------------------- //---------------------------------------------------------------------------