1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/mac/carbon/srchctrl.h
3 // Purpose: mac carbon wxSearchCtrl class
4 // Author: Vince Harron
7 // Copyright: Vince Harron
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_SEARCHCTRL_H_
12 #define _WX_SEARCHCTRL_H_
16 class wxMacSearchFieldControl
;
18 class WXDLLEXPORT wxSearchCtrl
: public wxSearchCtrlBase
25 wxSearchCtrl(wxWindow
*parent
, wxWindowID id
,
26 const wxString
& value
= wxEmptyString
,
27 const wxPoint
& pos
= wxDefaultPosition
,
28 const wxSize
& size
= wxDefaultSize
,
30 const wxValidator
& validator
= wxDefaultValidator
,
31 const wxString
& name
= wxSearchCtrlNameStr
);
33 virtual ~wxSearchCtrl();
35 bool Create(wxWindow
*parent
, wxWindowID id
,
36 const wxString
& value
= wxEmptyString
,
37 const wxPoint
& pos
= wxDefaultPosition
,
38 const wxSize
& size
= wxDefaultSize
,
40 const wxValidator
& validator
= wxDefaultValidator
,
41 const wxString
& name
= wxSearchCtrlNameStr
);
43 // get/set search button menu
44 // --------------------------
45 virtual void SetMenu( wxMenu
* menu
);
46 virtual wxMenu
* GetMenu();
48 // get/set search options
49 // ----------------------
50 virtual void ShowSearchButton( bool show
);
51 virtual bool IsSearchButtonVisible() const;
53 virtual void ShowCancelButton( bool show
);
54 virtual bool IsCancelButtonVisible() const;
56 #if wxABI_VERSION >= 20802
57 // TODO: In 2.9 these should probably be virtual, and declared in the base class...
58 void SetDescriptiveText(const wxString
& text
);
59 wxString
GetDescriptiveText() const;
62 virtual wxInt32
MacSearchFieldSearchHit( WXEVENTHANDLERREF handler
, WXEVENTREF event
) ;
63 virtual wxInt32
MacSearchFieldCancelHit( WXEVENTHANDLERREF handler
, WXEVENTREF event
) ;
65 wxMacSearchFieldControl
* GetPeer() const
66 { return (wxMacSearchFieldControl
*) m_peer
; }
68 virtual void SetFocus();
72 wxSize
DoGetBestSize() const;
76 virtual void CreatePeer(
79 const wxSize
& size
, long style
);
84 DECLARE_DYNAMIC_CLASS(wxSearchCtrl
)
89 #endif // wxUSE_SEARCHCTRL
91 #endif // _WX_SEARCHCTRL_H_