]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/msw/_controls_wrap.cpp
fixed deadlock when calling wxPostEvent() from worker thread
[wxWidgets.git] / wxPython / src / msw / _controls_wrap.cpp
index 6383baa408c33282fd8f1c4ea62a177b0e556668..3f2c1d706a60d9d43759919edaecce317dded53a 100644 (file)
@@ -3379,6 +3379,49 @@ SWIGINTERN wxDateTime wxDatePickerCtrl_GetUpperLimit(wxDatePickerCtrl *self){
  static const wxString wxPyFontPickerCtrlNameStr(wxFontPickerCtrlNameStr); 
  static const wxString wxPyCollapsiblePaneNameStr(wxCollapsiblePaneNameStr); 
  static const wxString wxPySearchCtrlNameStr(wxSearchCtrlNameStr); 
+
+#if !defined(wxUSE_SEARCHCTRL) || !wxUSE_SEARCHCTRL
+// define a dummy class for builds that don't have wxSearchCtrl
+
+enum {
+    wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN,
+    wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN
+};
+
+class wxSearchCtrl : public wxTextCtrl
+{
+public:
+    wxSearchCtrl() { wxPyRaiseNotImplemented(); }
+    wxSearchCtrl(wxWindow*, wxWindowID,
+                 const wxString&,
+                 const wxPoint&,
+                 const wxSize&,
+                 long style,
+                 const wxValidator&,
+                 const wxString& name)
+    { wxPyRaiseNotImplemented(); }
+
+    bool Create( wxWindow*, wxWindowID,
+                 const wxString&,
+                 const wxPoint&,
+                 const wxSize&,
+                 long style,
+                 const wxValidator&,
+                 const wxString& name) {}
+        
+    virtual void SetMenu( wxMenu* ) {}
+    virtual wxMenu* GetMenu() { return NULL; }
+    
+    // get/set search options
+    // ----------------------
+    virtual void ShowSearchButton( bool ) {}
+    virtual bool IsSearchButtonVisible() const { return false; }
+
+    virtual void ShowCancelButton( bool ) {}
+    virtual bool IsCancelButtonVisible() const { return false; }
+};    
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -50796,7 +50839,7 @@ SWIGEXPORT void SWIG_init(void) {
   SWIG_Python_SetConstant(d, "CP_NO_TLW_RESIZE",SWIG_From_int(static_cast< int >(wxCP_NO_TLW_RESIZE)));
   PyDict_SetItemString(d, "wxEVT_COMMAND_COLLPANE_CHANGED", PyInt_FromLong(wxEVT_COMMAND_COLLPANE_CHANGED));
   SWIG_addvarlink(SWIG_globals(),(char*)"SearchCtrlNameStr",SearchCtrlNameStr_get, SearchCtrlNameStr_set);
-  PyDict_SetItemString(d, "wxEVT_COMMAND_SEARCHCTRL_CANCEL", PyInt_FromLong(wxEVT_COMMAND_SEARCHCTRL_CANCEL));
-  PyDict_SetItemString(d, "wxEVT_COMMAND_SEARCHCTRL_SEARCH", PyInt_FromLong(wxEVT_COMMAND_SEARCHCTRL_SEARCH));
+  PyDict_SetItemString(d, "wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN", PyInt_FromLong(wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN));
+  PyDict_SetItemString(d, "wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN", PyInt_FromLong(wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN));
 }