Remove all lines containing cvs/svn "$Id$" keyword.
[wxWidgets.git] / include / wx / osx / srchctrl.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/osx/srchctrl.h
3 // Purpose: mac carbon wxSearchCtrl class
4 // Author: Vince Harron
5 // Created: 2006-02-19
6 // Copyright: Vince Harron
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #ifndef _WX_SEARCHCTRL_H_
11 #define _WX_SEARCHCTRL_H_
12
13 #if wxUSE_SEARCHCTRL
14
15 class wxSearchWidgetImpl;
16
17 class WXDLLIMPEXP_CORE wxSearchCtrl : public wxSearchCtrlBase
18 {
19 public:
20 // creation
21 // --------
22
23 wxSearchCtrl();
24 wxSearchCtrl(wxWindow *parent, wxWindowID id,
25 const wxString& value = wxEmptyString,
26 const wxPoint& pos = wxDefaultPosition,
27 const wxSize& size = wxDefaultSize,
28 long style = 0,
29 const wxValidator& validator = wxDefaultValidator,
30 const wxString& name = wxSearchCtrlNameStr);
31
32 virtual ~wxSearchCtrl();
33
34 bool Create(wxWindow *parent, wxWindowID id,
35 const wxString& value = wxEmptyString,
36 const wxPoint& pos = wxDefaultPosition,
37 const wxSize& size = wxDefaultSize,
38 long style = 0,
39 const wxValidator& validator = wxDefaultValidator,
40 const wxString& name = wxSearchCtrlNameStr);
41
42 // get/set search button menu
43 // --------------------------
44 virtual void SetMenu( wxMenu* menu );
45 virtual wxMenu* GetMenu();
46
47 // get/set search options
48 // ----------------------
49 virtual void ShowSearchButton( bool show );
50 virtual bool IsSearchButtonVisible() const;
51
52 virtual void ShowCancelButton( bool show );
53 virtual bool IsCancelButtonVisible() const;
54
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;
58
59 virtual bool HandleSearchFieldSearchHit() ;
60 virtual bool HandleSearchFieldCancelHit() ;
61
62 wxSearchWidgetImpl * GetSearchPeer() const;
63
64 protected:
65
66 wxSize DoGetBestSize() const;
67
68 void Init();
69
70 wxMenu *m_menu;
71
72 wxString m_descriptiveText;
73
74 private:
75 DECLARE_DYNAMIC_CLASS(wxSearchCtrl)
76
77 DECLARE_EVENT_TABLE()
78 };
79
80 #endif // wxUSE_SEARCHCTRL
81
82 #endif // _WX_SEARCHCTRL_H_
83