]> git.saurik.com Git - wxWidgets.git/blame - interface/wx/srchctrl.h
Moved wxPGChoices m_choices member from various property classes to base wxPGProperty...
[wxWidgets.git] / interface / wx / srchctrl.h
CommitLineData
23324ae1
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: srchctrl.h
e54c96f1 3// Purpose: interface of wxSearchCtrl
23324ae1
FM
4// Author: wxWidgets team
5// RCS-ID: $Id$
6// Licence: wxWindows license
7/////////////////////////////////////////////////////////////////////////////
8
9/**
10 @class wxSearchCtrl
7c913512
FM
11
12 A search control is a composite control with a search button, a text
23324ae1 13 control, and a cancel button.
7c913512 14
23324ae1 15 @beginStyleTable
8c6791e4 16 @style{wxTE_PROCESS_ENTER}
23324ae1
FM
17 The control will generate the event wxEVT_COMMAND_TEXT_ENTER
18 (otherwise pressing Enter key is either processed internally by the
19 control or used for navigation between dialog controls).
8c6791e4 20 @style{wxTE_PROCESS_TAB}
23324ae1
FM
21 The control will receive wxEVT_CHAR events for TAB pressed -
22 normally, TAB is used for passing to the next control in a dialog
23 instead. For the control created with this style, you can still use
24 Ctrl-Enter to pass to the next control from the keyboard.
8c6791e4 25 @style{wxTE_NOHIDESEL}
23324ae1
FM
26 By default, the Windows text control doesn't show the selection
27 when it doesn't have focus - use this style to force it to always
28 show it. It doesn't do anything under other platforms.
8c6791e4 29 @style{wxTE_LEFT}
23324ae1 30 The text in the control will be left-justified (default).
8c6791e4 31 @style{wxTE_CENTRE}
23324ae1
FM
32 The text in the control will be centered (currently wxMSW and
33 wxGTK2 only).
8c6791e4 34 @style{wxTE_RIGHT}
23324ae1
FM
35 The text in the control will be right-justified (currently wxMSW
36 and wxGTK2 only).
8c6791e4 37 @style{wxTE_CAPITALIZE}
23324ae1
FM
38 On PocketPC and Smartphone, causes the first letter to be
39 capitalized.
40 @endStyleTable
7c913512 41
23324ae1
FM
42 @library{wxcore}
43 @category{FIXME}
7c913512 44
e54c96f1 45 @see wxTextCtrl::Create, wxValidator
23324ae1
FM
46*/
47class wxSearchCtrl : public wxTextCtrl
48{
49public:
671600d8
RR
50 /**
51 Default constructor
52 */
53 wxSearchCtrl();
54
23324ae1
FM
55 /**
56 Constructor, creating and showing a text control.
3c4f71cc 57
7c913512 58 @param parent
4cc4bfaf 59 Parent window. Should not be @NULL.
7c913512 60 @param id
4cc4bfaf 61 Control identifier. A value of -1 denotes a default value.
7c913512 62 @param value
4cc4bfaf 63 Default text value.
7c913512 64 @param pos
4cc4bfaf 65 Text control position.
7c913512 66 @param size
4cc4bfaf 67 Text control size.
7c913512 68 @param style
4cc4bfaf 69 Window style. See wxSearchCtrl.
7c913512 70 @param validator
4cc4bfaf 71 Window validator.
7c913512 72 @param name
4cc4bfaf 73 Window name.
3c4f71cc 74
4cc4bfaf 75 @see wxTextCtrl::Create, wxValidator
23324ae1 76 */
7c913512
FM
77 wxSearchCtrl(wxWindow* parent, wxWindowID id,
78 const wxString& value = "",
79 const wxPoint& pos = wxDefaultPosition,
80 const wxSize& size = wxDefaultSize,
81 long style = 0,
82 const wxValidator& validator = wxDefaultValidator,
83 const wxString& name = wxSearchCtrlNameStr);
23324ae1
FM
84
85 /**
86 Destructor, destroying the search control.
87 */
88 ~wxSearchCtrl();
89
90 /**
7c913512 91 Returns a pointer to the search control's menu object or @NULL if there is no
23324ae1
FM
92 menu attached.
93 */
94 virtual wxMenu* GetMenu();
95
96 /**
7c913512 97 Returns the search button visibility value.
23324ae1
FM
98 If there is a menu attached, the search button will be visible regardless of
99 the search
7c913512 100 button visibility value.
23324ae1
FM
101 This always returns @false in Mac OS X v10.3
102 */
103 virtual bool IsSearchButtonVisible();
104
105 /**
106 Sets the search control's menu object. If there is already a menu associated
107 with
108 the search control it is deleted.
3c4f71cc 109
7c913512 110 @param menu
4cc4bfaf 111 Menu to attach to the search control.
23324ae1
FM
112 */
113 virtual void SetMenu(wxMenu* menu);
114
115 /**
116 Shows or hides the cancel button.
117 */
118 virtual void ShowCancelButton(bool show);
119
120 /**
7c913512 121 Sets the search button visibility value on the search control.
23324ae1
FM
122 If there is a menu attached, the search button will be visible regardless of
123 the search
7c913512 124 button visibility value.
23324ae1
FM
125 This has no effect in Mac OS X v10.3
126 */
127 virtual void ShowSearchButton(bool show);
128};
e54c96f1 129