]>
git.saurik.com Git - wxWidgets.git/blob - interface/srchctrl.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxSearchCtrl
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
13 A search control is a composite control with a search button, a text
14 control, and a cancel button.
17 @style{wxTE_PROCESS_ENTER}
18 The control will generate the event wxEVT_COMMAND_TEXT_ENTER
19 (otherwise pressing Enter key is either processed internally by the
20 control or used for navigation between dialog controls).
21 @style{wxTE_PROCESS_TAB}
22 The control will receive wxEVT_CHAR events for TAB pressed -
23 normally, TAB is used for passing to the next control in a dialog
24 instead. For the control created with this style, you can still use
25 Ctrl-Enter to pass to the next control from the keyboard.
26 @style{wxTE_NOHIDESEL}
27 By default, the Windows text control doesn't show the selection
28 when it doesn't have focus - use this style to force it to always
29 show it. It doesn't do anything under other platforms.
31 The text in the control will be left-justified (default).
33 The text in the control will be centered (currently wxMSW and
36 The text in the control will be right-justified (currently wxMSW
38 @style{wxTE_CAPITALIZE}
39 On PocketPC and Smartphone, causes the first letter to be
46 @see wxTextCtrl::Create, wxValidator
48 class wxSearchCtrl
: public wxTextCtrl
53 Constructor, creating and showing a text control.
56 Parent window. Should not be @NULL.
58 Control identifier. A value of -1 denotes a default value.
62 Text control position.
66 Window style. See wxSearchCtrl.
72 @see wxTextCtrl::Create, wxValidator
75 wxSearchCtrl(wxWindow
* parent
, wxWindowID id
,
76 const wxString
& value
= "",
77 const wxPoint
& pos
= wxDefaultPosition
,
78 const wxSize
& size
= wxDefaultSize
,
80 const wxValidator
& validator
= wxDefaultValidator
,
81 const wxString
& name
= wxSearchCtrlNameStr
);
85 Destructor, destroying the search control.
90 Returns a pointer to the search control's menu object or @NULL if there is no
93 virtual wxMenu
* GetMenu();
96 Returns the search button visibility value.
97 If there is a menu attached, the search button will be visible regardless of
99 button visibility value.
100 This always returns @false in Mac OS X v10.3
102 virtual bool IsSearchButtonVisible();
105 Sets the search control's menu object. If there is already a menu associated
107 the search control it is deleted.
110 Menu to attach to the search control.
112 virtual void SetMenu(wxMenu
* menu
);
115 Shows or hides the cancel button.
117 virtual void ShowCancelButton(bool show
);
120 Sets the search button visibility value on the search control.
121 If there is a menu attached, the search button will be visible regardless of
123 button visibility value.
124 This has no effect in Mac OS X v10.3
126 virtual void ShowSearchButton(bool show
);