]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/srchctrl.h
a1211f8b933c998bb1f10924915b0353bcb38a97
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxSearchCtrl
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
12 A search control is a composite control with a search button, a text
13 control, and a cancel button.
16 @style{wxTE_PROCESS_ENTER}
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).
20 @style{wxTE_PROCESS_TAB}
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.
25 @style{wxTE_NOHIDESEL}
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.
30 The text in the control will be left-justified (default).
32 The text in the control will be centered (currently wxMSW and
35 The text in the control will be right-justified (currently wxMSW
37 @style{wxTE_CAPITALIZE}
38 On PocketPC and Smartphone, causes the first letter to be
45 @see wxTextCtrl::Create, wxValidator
47 class wxSearchCtrl
: public wxTextCtrl
56 Constructor, creating and showing a text control.
59 Parent window. Should not be @NULL.
61 Control identifier. A value of -1 denotes a default value.
65 Text control position.
69 Window style. See wxSearchCtrl.
75 @see wxTextCtrl::Create, wxValidator
77 wxSearchCtrl(wxWindow
* parent
, wxWindowID id
,
78 const wxString
& value
= "",
79 const wxPoint
& pos
= wxDefaultPosition
,
80 const wxSize
& size
= wxDefaultSize
,
82 const wxValidator
& validator
= wxDefaultValidator
,
83 const wxString
& name
= wxSearchCtrlNameStr
);
86 Destructor, destroying the search control.
88 virtual ~wxSearchCtrl();
91 Returns a pointer to the search control's menu object or @NULL if there is no
94 virtual wxMenu
* GetMenu();
97 Returns the search button visibility value.
98 If there is a menu attached, the search button will be visible regardless of
100 button visibility value.
101 This always returns @false in Mac OS X v10.3
103 virtual bool IsSearchButtonVisible() const;
106 Sets the search control's menu object. If there is already a menu associated
108 the search control it is deleted.
111 Menu to attach to the search control.
113 virtual void SetMenu(wxMenu
* menu
);
116 Shows or hides the cancel button.
118 virtual void ShowCancelButton(bool show
);
121 Sets the search button visibility value on the search control.
122 If there is a menu attached, the search button will be visible regardless of
124 button visibility value.
125 This has no effect in Mac OS X v10.3
127 virtual void ShowSearchButton(bool show
);