]> git.saurik.com Git - wxWidgets.git/blob - interface/wx/srchctrl.h
Further corrections to wxFileName docs
[wxWidgets.git] / interface / wx / srchctrl.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: srchctrl.h
3 // Purpose: interface of wxSearchCtrl
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9 /**
10 @class wxSearchCtrl
11
12 A search control is a composite control with a search button, a text
13 control, and a cancel button.
14
15 @beginStyleTable
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.
29 @style{wxTE_LEFT}
30 The text in the control will be left-justified (default).
31 @style{wxTE_CENTRE}
32 The text in the control will be centered (currently wxMSW and
33 wxGTK2 only).
34 @style{wxTE_RIGHT}
35 The text in the control will be right-justified (currently wxMSW
36 and wxGTK2 only).
37 @style{wxTE_CAPITALIZE}
38 On PocketPC and Smartphone, causes the first letter to be
39 capitalized.
40 @endStyleTable
41
42 @library{wxcore}
43 @category{FIXME}
44
45 @see wxTextCtrl::Create, wxValidator
46 */
47 class wxSearchCtrl : public wxTextCtrl
48 {
49 public:
50 /**
51 Default constructor
52 */
53 wxSearchCtrl();
54
55 /**
56 Constructor, creating and showing a text control.
57
58 @param parent
59 Parent window. Should not be @NULL.
60 @param id
61 Control identifier. A value of -1 denotes a default value.
62 @param value
63 Default text value.
64 @param pos
65 Text control position.
66 @param size
67 Text control size.
68 @param style
69 Window style. See wxSearchCtrl.
70 @param validator
71 Window validator.
72 @param name
73 Window name.
74
75 @see wxTextCtrl::Create, wxValidator
76 */
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);
84
85 /**
86 Destructor, destroying the search control.
87 */
88 ~wxSearchCtrl();
89
90 /**
91 Returns a pointer to the search control's menu object or @NULL if there is no
92 menu attached.
93 */
94 virtual wxMenu* GetMenu();
95
96 /**
97 Returns the search button visibility value.
98 If there is a menu attached, the search button will be visible regardless of
99 the search
100 button visibility value.
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.
109
110 @param menu
111 Menu to attach to the search control.
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 /**
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
123 the search
124 button visibility value.
125 This has no effect in Mac OS X v10.3
126 */
127 virtual void ShowSearchButton(bool show);
128 };
129