]>
Commit | Line | Data |
---|---|---|
3f7f284d RD |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: wx/mac/carbon/srchctrl.h | |
3 | // Purpose: mac carbon wxSearchCtrl class | |
4 | // Author: Vince Harron | |
3f7f284d | 5 | // Created: 2006-02-19 |
8bc333d7 | 6 | // RCS-ID: $Id$ |
3f7f284d RD |
7 | // Copyright: Vince Harron |
8 | // Licence: wxWindows licence | |
9 | ///////////////////////////////////////////////////////////////////////////// | |
10 | ||
11 | #ifndef _WX_SEARCHCTRL_H_ | |
12 | #define _WX_SEARCHCTRL_H_ | |
13 | ||
14 | #if wxUSE_SEARCHCTRL | |
15 | ||
3f7f284d RD |
16 | class wxMacSearchFieldControl; |
17 | ||
18 | class WXDLLEXPORT wxSearchCtrl : public wxSearchCtrlBase | |
19 | { | |
20 | public: | |
21 | // creation | |
22 | // -------- | |
23 | ||
24 | wxSearchCtrl(); | |
25 | wxSearchCtrl(wxWindow *parent, wxWindowID id, | |
26 | const wxString& value = wxEmptyString, | |
27 | const wxPoint& pos = wxDefaultPosition, | |
28 | const wxSize& size = wxDefaultSize, | |
29 | long style = 0, | |
30 | const wxValidator& validator = wxDefaultValidator, | |
31 | const wxString& name = wxSearchCtrlNameStr); | |
32 | ||
8bc333d7 | 33 | virtual ~wxSearchCtrl(); |
3f7f284d RD |
34 | |
35 | bool Create(wxWindow *parent, wxWindowID id, | |
36 | const wxString& value = wxEmptyString, | |
37 | const wxPoint& pos = wxDefaultPosition, | |
38 | const wxSize& size = wxDefaultSize, | |
39 | long style = 0, | |
40 | const wxValidator& validator = wxDefaultValidator, | |
41 | const wxString& name = wxSearchCtrlNameStr); | |
42 | ||
43 | // get/set search button menu | |
44 | // -------------------------- | |
45 | virtual void SetMenu( wxMenu* menu ); | |
46 | virtual wxMenu* GetMenu(); | |
8bc333d7 | 47 | |
3f7f284d RD |
48 | // get/set search options |
49 | // ---------------------- | |
ec184e32 VZ |
50 | virtual void ShowSearchButton( bool show ); |
51 | virtual bool IsSearchButtonVisible() const; | |
3f7f284d | 52 | |
ec184e32 VZ |
53 | virtual void ShowCancelButton( bool show ); |
54 | virtual bool IsCancelButtonVisible() const; | |
3f7f284d | 55 | |
6646ca90 RD |
56 | // TODO: In 2.9 these should probably be virtual, and declared in the base class... |
57 | void SetDescriptiveText(const wxString& text); | |
58 | wxString GetDescriptiveText() const; | |
6646ca90 | 59 | |
3f7f284d RD |
60 | virtual wxInt32 MacSearchFieldSearchHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ; |
61 | virtual wxInt32 MacSearchFieldCancelHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ; | |
62 | ||
63 | wxMacSearchFieldControl * GetPeer() const | |
64 | { return (wxMacSearchFieldControl*) m_peer; } | |
8bc333d7 | 65 | |
698db322 | 66 | virtual void SetFocus(); |
8bc333d7 | 67 | |
3f7f284d RD |
68 | protected: |
69 | ||
70 | wxSize DoGetBestSize() const; | |
8bc333d7 | 71 | |
3f7f284d RD |
72 | void Init(); |
73 | ||
74 | virtual void CreatePeer( | |
75 | const wxString& str, | |
76 | const wxPoint& pos, | |
77 | const wxSize& size, long style ); | |
78 | ||
79 | wxMenu *m_menu; | |
80 | ||
81 | private: | |
82 | DECLARE_DYNAMIC_CLASS(wxSearchCtrl) | |
83 | ||
84 | DECLARE_EVENT_TABLE() | |
85 | }; | |
86 | ||
87 | #endif // wxUSE_SEARCHCTRL | |
88 | ||
89 | #endif // _WX_SEARCHCTRL_H_ | |
90 |