]> git.saurik.com Git - wxWidgets.git/blob - interface/srchctrl.h
fixed category
[wxWidgets.git] / interface / srchctrl.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: srchctrl.h
3 // Purpose: documentation for wxSearchCtrl class
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9 /**
10 @class wxSearchCtrl
11 @wxheader{srchctrl.h}
12
13 A search control is a composite control with a search button, a text
14 control, and a cancel button.
15
16 @beginStyleTable
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.
30 @style{wxTE_LEFT}:
31 The text in the control will be left-justified (default).
32 @style{wxTE_CENTRE}:
33 The text in the control will be centered (currently wxMSW and
34 wxGTK2 only).
35 @style{wxTE_RIGHT}:
36 The text in the control will be right-justified (currently wxMSW
37 and wxGTK2 only).
38 @style{wxTE_CAPITALIZE}:
39 On PocketPC and Smartphone, causes the first letter to be
40 capitalized.
41 @endStyleTable
42
43 @library{wxcore}
44 @category{FIXME}
45
46 @seealso
47 wxTextCtrl::Create, wxValidator
48 */
49 class wxSearchCtrl : public wxTextCtrl
50 {
51 public:
52 //@{
53 /**
54 Constructor, creating and showing a text control.
55
56 @param parent
57 Parent window. Should not be @NULL.
58 @param id
59 Control identifier. A value of -1 denotes a default value.
60 @param value
61 Default text value.
62 @param pos
63 Text control position.
64 @param size
65 Text control size.
66 @param style
67 Window style. See wxSearchCtrl.
68 @param validator
69 Window validator.
70 @param name
71 Window name.
72
73 @see wxTextCtrl::Create, wxValidator
74 */
75 wxSearchCtrl();
76 wxSearchCtrl(wxWindow* parent, wxWindowID id,
77 const wxString& value = "",
78 const wxPoint& pos = wxDefaultPosition,
79 const wxSize& size = wxDefaultSize,
80 long style = 0,
81 const wxValidator& validator = wxDefaultValidator,
82 const wxString& name = wxSearchCtrlNameStr);
83 //@}
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 };