]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/carbon/srchctrl.h
reSWIGged
[wxWidgets.git] / include / wx / mac / carbon / srchctrl.h
CommitLineData
3f7f284d
RD
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/mac/carbon/srchctrl.h
3// Purpose: mac carbon wxSearchCtrl class
4// Author: Vince Harron
5// Modified by:
6// Created: 2006-02-19
7// RCS-ID:
8// Copyright: Vince Harron
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_SEARCHCTRL_H_
13#define _WX_SEARCHCTRL_H_
14
15#if wxUSE_SEARCHCTRL
16
17#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
18 #pragma interface "srchctrl.h"
19#endif
20
21class WXDLLEXPORT wxSearchCtrlBase : public wxTextCtrl
22{
23public:
24 wxSearchCtrlBase() {}
25 virtual ~wxSearchCtrlBase() {}
26
27 // search control
28 virtual void SetMenu( wxMenu* menu ) = 0;
29 virtual wxMenu* GetMenu() = 0;
30
31
32 // get/set options
33 virtual void SetSearchButtonVisible( bool show ) = 0;
34 virtual bool GetSearchButtonVisible() const = 0;
35
36 virtual void SetCancelButtonVisible( bool show ) = 0;
37 virtual bool GetCancelButtonVisible() const = 0;
38protected:
39};
40
41class wxMacSearchFieldControl;
42
43class WXDLLEXPORT wxSearchCtrl : public wxSearchCtrlBase
44{
45public:
46 // creation
47 // --------
48
49 wxSearchCtrl();
50 wxSearchCtrl(wxWindow *parent, wxWindowID id,
51 const wxString& value = wxEmptyString,
52 const wxPoint& pos = wxDefaultPosition,
53 const wxSize& size = wxDefaultSize,
54 long style = 0,
55 const wxValidator& validator = wxDefaultValidator,
56 const wxString& name = wxSearchCtrlNameStr);
57
58 ~wxSearchCtrl();
59
60 bool Create(wxWindow *parent, wxWindowID id,
61 const wxString& value = wxEmptyString,
62 const wxPoint& pos = wxDefaultPosition,
63 const wxSize& size = wxDefaultSize,
64 long style = 0,
65 const wxValidator& validator = wxDefaultValidator,
66 const wxString& name = wxSearchCtrlNameStr);
67
68 // get/set search button menu
69 // --------------------------
70 virtual void SetMenu( wxMenu* menu );
71 virtual wxMenu* GetMenu();
72
73 // get/set search options
74 // ----------------------
75 virtual void SetSearchButtonVisible( bool show );
76 virtual bool GetSearchButtonVisible() const;
77
78 virtual void SetCancelButtonVisible( bool show );
79 virtual bool GetCancelButtonVisible() const;
80
81 virtual wxInt32 MacSearchFieldSearchHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ;
82 virtual wxInt32 MacSearchFieldCancelHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ;
83
84 wxMacSearchFieldControl * GetPeer() const
85 { return (wxMacSearchFieldControl*) m_peer; }
86
87protected:
88
89 wxSize DoGetBestSize() const;
90
91 void Init();
92
93 virtual void CreatePeer(
94 const wxString& str,
95 const wxPoint& pos,
96 const wxSize& size, long style );
97
98 wxMenu *m_menu;
99
100private:
101 DECLARE_DYNAMIC_CLASS(wxSearchCtrl)
102
103 DECLARE_EVENT_TABLE()
104};
105
106#endif // wxUSE_SEARCHCTRL
107
108#endif // _WX_SEARCHCTRL_H_
109