1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/osx/srchctrl.h
3 // Purpose: mac carbon wxSearchCtrl class
4 // Author: Vince Harron
6 // Copyright: Vince Harron
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_SEARCHCTRL_H_
11 #define _WX_SEARCHCTRL_H_
15 class wxSearchWidgetImpl
;
17 class WXDLLIMPEXP_CORE wxSearchCtrl
: public wxSearchCtrlBase
24 wxSearchCtrl(wxWindow
*parent
, wxWindowID id
,
25 const wxString
& value
= wxEmptyString
,
26 const wxPoint
& pos
= wxDefaultPosition
,
27 const wxSize
& size
= wxDefaultSize
,
29 const wxValidator
& validator
= wxDefaultValidator
,
30 const wxString
& name
= wxSearchCtrlNameStr
);
32 virtual ~wxSearchCtrl();
34 bool Create(wxWindow
*parent
, wxWindowID id
,
35 const wxString
& value
= wxEmptyString
,
36 const wxPoint
& pos
= wxDefaultPosition
,
37 const wxSize
& size
= wxDefaultSize
,
39 const wxValidator
& validator
= wxDefaultValidator
,
40 const wxString
& name
= wxSearchCtrlNameStr
);
42 // get/set search button menu
43 // --------------------------
44 virtual void SetMenu( wxMenu
* menu
);
45 virtual wxMenu
* GetMenu();
47 // get/set search options
48 // ----------------------
49 virtual void ShowSearchButton( bool show
);
50 virtual bool IsSearchButtonVisible() const;
52 virtual void ShowCancelButton( bool show
);
53 virtual bool IsCancelButtonVisible() const;
55 // TODO: In 2.9 these should probably be virtual, and declared in the base class...
56 void SetDescriptiveText(const wxString
& text
);
57 wxString
GetDescriptiveText() const;
59 virtual bool HandleSearchFieldSearchHit() ;
60 virtual bool HandleSearchFieldCancelHit() ;
62 wxSearchWidgetImpl
* GetSearchPeer() const;
66 wxSize
DoGetBestSize() const;
72 wxString m_descriptiveText
;
75 DECLARE_DYNAMIC_CLASS(wxSearchCtrl
)
80 #endif // wxUSE_SEARCHCTRL
82 #endif // _WX_SEARCHCTRL_H_