X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3a194bda7be7c240a3856413e19d7152ecfd7439..d3fa4bc22e84e3ca4d88cc1772f2d414140a1017:/interface/wx/srchctrl.h diff --git a/interface/wx/srchctrl.h b/interface/wx/srchctrl.h index c7f1cd6af7..a29762df6c 100644 --- a/interface/wx/srchctrl.h +++ b/interface/wx/srchctrl.h @@ -14,7 +14,7 @@ @beginStyleTable @style{wxTE_PROCESS_ENTER} - The control will generate the event @c wxEVT_COMMAND_TEXT_ENTER + The control will generate the event @c wxEVT_TEXT_ENTER (otherwise pressing Enter key is either processed internally by the control or used for navigation between dialog controls). @style{wxTE_PROCESS_TAB} @@ -55,7 +55,7 @@ @library{wxcore} @category{ctrl} - @appearance{searchctrl.png} + @appearance{searchctrl} @see wxTextCtrl::Create, wxValidator */ @@ -102,6 +102,15 @@ public: */ virtual ~wxSearchCtrl(); + + bool Create(wxWindow* parent, wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxSearchCtrlNameStr); + /** Returns a pointer to the search control's menu object or @NULL if there is no menu attached. @@ -117,6 +126,11 @@ public: */ virtual bool IsSearchButtonVisible() const; + /** + Returns the cancel button's visibility state. + */ + virtual bool IsCancelButtonVisible() const; + /** Sets the search control's menu object. If there is already a menu associated with the search control it is deleted. @@ -139,5 +153,19 @@ public: This has no effect in Mac OS X v10.3 */ virtual void ShowSearchButton(bool show); + + /** + Set the text to be displayed in the search control when the user has + not yet typed anything in it. + */ + void SetDescriptiveText(const wxString& text); + + /** + Return the text displayed when there is not yet any user input. + */ + wxString GetDescriptiveText() const; }; + +wxEventType wxEVT_SEARCHCTRL_CANCEL_BTN; +wxEventType wxEVT_SEARCHCTRL_SEARCH_BTN;