]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/gizmos/gizmos.i
fixed a few VC++ warnings (release mode only)
[wxWidgets.git] / wxPython / contrib / gizmos / gizmos.i
index 86a63f1df69e0b0eb289fe83756f2fa07050f306..25aa3ec04d2ac3f5819d582ff8c7e9d8bd82dcc7 100644 (file)
@@ -155,6 +155,11 @@ def EVT_DYNAMIC_SASH_UNIFY(win, id, func):
 //----------------------------------------------------------------------
 //----------------------------------------------------------------------
 
+enum {
+    wxEL_ALLOW_NEW,
+    wxEL_ALLOW_EDIT,
+    wxEL_ALLOW_DELETE,
+};
 
 // This class provides a composite control that lets the
 // user easily enter list of strings
@@ -165,6 +170,7 @@ public:
                       const wxString& label,
                       const wxPoint& pos = wxDefaultPosition,
                       const wxSize& size = wxDefaultSize,
+                      long style = wxEL_ALLOW_NEW | wxEL_ALLOW_EDIT | wxEL_ALLOW_DELETE,
                       const char* name = "editableListBox");
 
     %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
@@ -247,7 +253,7 @@ public:
 
     virtual void DrawItem(wxDC& dc, wxTreeItemId id, const wxRect& rect) {
         bool found;
-        wxPyTState* state = wxPyBeginBlockThreads();
+        wxPyBeginBlockThreads();
         if ((found = wxPyCBH_findCallback(m_myInst, "DrawItem"))) {
             PyObject* dcobj = wxPyMake_wxObject(&dc);
             PyObject* idobj = wxPyConstructObject((void*)&id, "wxTreeItemId", FALSE);
@@ -257,7 +263,7 @@ public:
             Py_DECREF(idobj);
             Py_DECREF(recobj);
         }
-        wxPyEndBlockThreads(state);
+        wxPyEndBlockThreads();
         if (! found)
             wxTreeCompanionWindow::DrawItem(dc, id, rect);
     }