]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/gizmos/gizmos.i
use right return type for GetListCtrl
[wxWidgets.git] / wxPython / contrib / gizmos / gizmos.i
index e24377889ecb3f417d5e61c68d5610c42d9f9100..098f3ac7bbaa79ff288ee68d4dbdcc7d83cac533 100644 (file)
@@ -15,7 +15,7 @@
 `LEDNumberCtrl`, `TreeListCtrl`, etc."
 %enddef
 
-%module(docstring=DOCSTRING) gizmos
+%module(package="wx", docstring=DOCSTRING) gizmos
 
 
 %{
@@ -40,8 +40,8 @@
 
 %import windows.i
 %import controls.i
-%pythoncode { wx = _core }
-%pythoncode { __docfilter__ = wx.__DocFilter(globals()) }
+%pythoncode { import wx }
+%pythoncode { __docfilter__ = wx._core.__DocFilter(globals()) }
 
 
 MAKE_CONST_WXSTRING2(DynamicSashNameStr,     wxT("dynamicSashWindow"));
@@ -146,13 +146,13 @@ public:
     %pythonAppend wxDynamicSashWindow         "self._setOORInfo(self)"
     %pythonAppend wxDynamicSashWindow()       ""
 
-    wxDynamicSashWindow(wxWindow *parent, wxWindowID id,
+    wxDynamicSashWindow(wxWindow *parent, wxWindowID id=-1,
                         const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
                         long style = wxCLIP_CHILDREN | wxDS_MANAGE_SCROLLBARS | wxDS_DRAG_CORNER,
                         const wxString& name = wxPyDynamicSashNameStr);
     %name(PreDynamicSashWindow)wxDynamicSashWindow();
 
-    bool Create(wxWindow *parent, wxWindowID id,
+    bool Create(wxWindow *parent, wxWindowID id=-1,
                 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
                 long style = wxCLIP_CHILDREN | wxDS_MANAGE_SCROLLBARS | wxDS_DRAG_CORNER,
                 const wxString& name = wxPyDynamicSashNameStr);
@@ -186,8 +186,8 @@ public:
     %pythonAppend wxEditableListBox         "self._setOORInfo(self)"
     %pythonAppend wxEditableListBox()       ""
 
-    wxEditableListBox(wxWindow *parent, wxWindowID id,
-                      const wxString& label,
+    wxEditableListBox(wxWindow *parent, wxWindowID id=-1,
+                      const wxString& label = wxPyEmptyString,
                       const wxPoint& pos = wxDefaultPosition,
                       const wxSize& size = wxDefaultSize,
                       long style = wxEL_ALLOW_NEW | wxEL_ALLOW_EDIT | wxEL_ALLOW_DELETE,
@@ -205,7 +205,7 @@ public:
         }
     }
 
-    wxListCtrl* GetListCtrl();
+    wxPyListCtrl* GetListCtrl();
     wxBitmapButton* GetDelButton();
     wxBitmapButton* GetNewButton();
     wxBitmapButton* GetUpButton();
@@ -285,7 +285,7 @@ public:
         bool found;
         bool blocked = wxPyBeginBlockThreads();
         if ((found = wxPyCBH_findCallback(m_myInst, "DrawItem"))) {
-            PyObject* dcobj = wxPyMake_wxObject(&dc);
+            PyObject* dcobj = wxPyMake_wxObject(&dc,false);
             PyObject* idobj = wxPyConstructObject((void*)&id, wxT("wxTreeItemId"), False);
             PyObject* recobj= wxPyConstructObject((void*)&rect, wxT("wxRect"), False);
             wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOO)", dcobj, idobj, recobj));
@@ -443,6 +443,11 @@ enum {
     wxTL_SEARCH_NOCASE
 };
 
+enum {
+    // extra tree styles
+    wxTR_DONT_ADJUST_MAC
+};
+%pythoncode { wx.TR_DONT_ADJUST_MAC = TR_DONT_ADJUST_MAC }
 
 
 class wxTreeListColumnInfo: public wxObject {
@@ -946,7 +951,7 @@ public:
     wxTreeItemId FindItem (const wxTreeItemId& item, const wxString& str, int flags = 0);
 
     wxWindow* GetHeaderWindow() const;
-    wxWindow* GetMainWindow() const;
+    wxScrolledWindow* GetMainWindow() const;
 
 };