]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_srchctrl.i
use CPPUNIT_ASSERT_EQUAL instead of CPPUNIT_ASSERT as this gives more detailed inform...
[wxWidgets.git] / wxPython / src / _srchctrl.i
index 83a244b345cfcc088a7f2d9bd30876c1717d0427..894b8a49a6352f836e659e9cc5573ff3bd4f24df 100644 (file)
@@ -23,8 +23,8 @@ MAKE_CONST_WXSTRING(SearchCtrlNameStr);
 // define a dummy class for builds that don't have wxSearchCtrl
 
 enum {
-    wxEVT_COMMAND_SEARCHCTRL_CANCEL,
-    wxEVT_COMMAND_SEARCHCTRL_SEARCH
+    wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN,
+    wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN
 };
 
 class wxSearchCtrl : public wxTextCtrl
@@ -58,6 +58,9 @@ public:
 
     virtual void ShowCancelButton( bool ) {}
     virtual bool IsCancelButtonVisible() const { return false; }
+
+    virtual void SetDescriptiveText(const wxString& text);
+    virtual wxString GetDescriptiveText() const;
 };    
 #endif
 %}
@@ -71,7 +74,7 @@ DocStr(wxSearchCtrl,
 "A search control is a composite of a `wx.TextCtrl` with optional
 bitmap buttons and a drop-down menu.  Controls like this can typically
 be found on a toolbar of applications that support some form of search
-functionality.  On the Mac this control is implemneted using the
+functionality.  On the Mac this control is implemented using the
 native HISearchField control, on the other platforms a generic control
 is used, although that may change in the future as more platforms
 introduce native search widgets.
@@ -94,14 +97,14 @@ Enter key in the control and wishes to start a search.
 
 Events
 -------
-    ======================    =========================================
-    EVT_SEARCHCTRL_SEARCH     Sent when the search icon is clicked
-    EVT_SEARCHCTRL_CANCEL     Sent when the cancel icon is clicked
-    EVT_TEXT                  Sent when the text changes
-    EVT_TEXT_ENTER            Sent when the RETURN/ENTER key is pressed 
-                              in the search control and the control has
-                              the wx.TE_PROCESS_ENTER style flag set.
-    ======================    =========================================
+    =========================    =========================================
+    EVT_SEARCHCTRL_SEARCH_BTN    Sent when the search icon is clicked
+    EVT_SEARCHCTRL_CANCEL_BTN    Sent when the cancel icon is clicked
+    EVT_TEXT                     Sent when the text changes
+    EVT_TEXT_ENTER               Sent when the RETURN/ENTER key is pressed 
+                                 in the search control and the control has
+                                 the wx.TE_PROCESS_ENTER style flag set.
+    =========================    =========================================
 ");
 
 
@@ -167,6 +170,17 @@ button visibility value.  This always returns false in Mac OS X v10.3", "");
         "Indicates whether the cancel button is visible. ", "");
     
 
+    DocDeclStr(
+        virtual void , SetDescriptiveText(const wxString& text),
+        "Set the text to be displayed when the user has not yet typed anything
+in the control.", "");
+    
+    DocDeclStr(
+        virtual wxString , GetDescriptiveText() const,
+        "Get the text to be displayed when the user has not yet typed anything
+in the control.", "");
+    
+    
     DocStr(SetSearchBitmap,
            "Sets the bitmap to use for the search button.  This currently does not
 work on the Mac.", "");
@@ -177,6 +191,7 @@ on the Mac.", "");
     DocStr(SetCancelBitmap,
            "Sets the bitmap to use for the cancel button.  This currently does not
 work on the Mac.", "");
+
     
 #ifdef __WXMAC__
     %extend {
@@ -194,6 +209,7 @@ work on the Mac.", "");
     %property(Menu, GetMenu, SetMenu);
     %property(SearchButtonVisible, IsSearchButtonVisible, ShowSearchButton);
     %property(CancelButtonVisible, IsCancelButtonVisible, ShowCancelButton);
+    %property(DescriptiveText, GetDescriptiveText, SetDescriptiveText);
 };