]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_misc.i
Version
[wxWidgets.git] / wxPython / src / _misc.i
index 15d4c69340cbeac570d0e1acca65d0d21ae82141..ef64c3ef7b5e67f0b6a45e7082faf2638cbc1065 100644 (file)
@@ -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
+
 //---------------------------------------------------------------------------
 //---------------------------------------------------------------------------