]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/fdrepdlg.tex
fix missing end brace
[wxWidgets.git] / docs / latex / wx / fdrepdlg.tex
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %% Name: fdrepdlg.tex
3 %% Purpose: wxFindReplaceDialog documentation
4 %% Author: Vadim Zeitlin
5 %% Modified by:
6 %% Created: 01.08.01
7 %% RCS-ID: $Id$
8 %% Copyright: (c) 2001 Vadim Zeitlin
9 %% License: wxWindows license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12 \section{\class{wxFindDialogEvent}}\label{wxfinddialogevent}
13
14 wxFindReplaceDialog events
15
16 \wxheading{Derived from}
17
18 \helpref{wxCommandEvent}{wxcommandevent}\\
19 \helpref{wxEvent}{wxevent}\\
20 \helpref{wxObject}{wxobject}
21
22 \wxheading{Include files}
23
24 <wx/fdrepdlg.h>
25
26 \wxheading{Library}
27
28 \helpref{wxCore}{librarieslist}
29
30 \wxheading{Event table macros}
31
32 To process a command event from
33 \helpref{wxFindReplaceDialog}{wxfindreplacedialog}, use these event handler
34 macros to direct input to member functions that take a wxFindDialogEvent
35 argument. The {\it id} parameter is the identifier of the find dialog and you
36 may usually specify $-1$ for it unless you plan to have several find dialogs
37 sending events to the same owner window simultaneously.
38
39 \twocolwidtha{7cm}
40 \begin{twocollist}\itemsep=0pt
41 \twocolitem{{\bf EVT\_FIND(id, func)}}{Find button was pressed in the dialog.}
42 \twocolitem{{\bf EVT\_FIND\_NEXT(id, func)}}{Find next button was pressed in the dialog.}
43 \twocolitem{{\bf EVT\_FIND\_REPLACE(id, func)}}{Replace button was pressed in the dialog.}
44 \twocolitem{{\bf EVT\_FIND\_REPLACE\_ALL(id, func)}}{Replace all button was pressed in the dialog.}
45 \twocolitem{{\bf EVT\_FIND\_CLOSE(id, func)}}{The dialog is being destroyed,
46 any pointers to it cannot be used any longer.}
47 \end{twocollist}%
48
49 \latexignore{\rtfignore{\wxheading{Members}}}
50
51 \membersection{wxFindDialogEvent::wxFindDialogEvent}\label{wxfinddialogeventwxfinddialogevent}
52
53 \func{}{wxFindDialogEvent}{\param{wxEventType }{commandType = wxEVT\_NULL}, \param{int }{id = 0}}
54
55 Constuctor used by wxWidgets only.
56
57 \membersection{wxFindDialogEvent::GetFlags}\label{wxfinddialogeventgetflags}
58
59 \constfunc{int}{GetFlags}{\void}
60
61 Get the currently selected flags: this is the combination of {\tt wxFR\_DOWN},
62 {\tt wxFR\_WHOLEWORD} and {\tt wxFR\_MATCHCASE} flags.
63
64 \membersection{wxFindDialogEvent::GetFindString}\label{wxfinddialogeventgetfindstring}
65
66 \constfunc{wxString}{GetFindString}{\void}
67
68 Return the string to find (never empty).
69
70 \membersection{wxFindDialogEvent::GetReplaceString}\label{wxfinddialogeventgetreplacestring}
71
72 \constfunc{const wxString\&}{GetReplaceString}{\void}
73
74 Return the string to replace the search string with (only for replace and
75 replace all events).
76
77 \membersection{wxFindDialogEvent::GetDialog}\label{wxfinddialogeventgetdialog}
78
79 \constfunc{wxFindReplaceDialog*}{GetDialog}{\void}
80
81 Return the pointer to the dialog which generated this event.
82
83 \section{\class{wxFindReplaceData}}\label{wxfindreplacedata}
84
85 wxFindReplaceData holds the data for
86 \helpref{wxFindReplaceDialog}{wxfindreplacedialog}. It is used to initialize
87 the dialog with the default values and will keep the last values from the
88 dialog when it is closed. It is also updated each time a
89 \helpref{wxFindDialogEvent}{wxfinddialogevent} is generated so instead of
90 using the wxFindDialogEvent methods you can also directly query this object.
91
92 Note that all {\tt SetXXX()} methods may only be called before showing the
93 dialog and calling them has no effect later.
94
95 \wxheading{Include files}
96
97 <wx/fdrepdlg.h>
98
99 \wxheading{Library}
100
101 \helpref{wxCore}{librarieslist}
102
103
104 \wxheading{Derived from}
105
106 \helpref{wxObject}{wxobject}
107
108 \wxheading{Data structures}
109
110 Flags used by
111 \helpref{wxFindReplaceData::GetFlags()}{wxfindreplacedatagetflags} and
112 \helpref{wxFindDialogEvent::GetFlags()}{wxfinddialogeventgetflags}:
113
114 \begin{verbatim}
115 enum wxFindReplaceFlags
116 {
117 // downward search/replace selected (otherwise - upwards)
118 wxFR_DOWN = 1,
119
120 // whole word search/replace selected
121 wxFR_WHOLEWORD = 2,
122
123 // case sensitive search/replace selected (otherwise - case insensitive)
124 wxFR_MATCHCASE = 4
125 }
126 \end{verbatim}
127
128 These flags can be specified in
129 \helpref{wxFindReplaceDialog ctor}{wxfindreplacedialogctor} or
130 \helpref{Create()}{wxfindreplacedialogcreate}:
131
132 \begin{verbatim}
133 enum wxFindReplaceDialogStyles
134 {
135 // replace dialog (otherwise find dialog)
136 wxFR_REPLACEDIALOG = 1,
137
138 // don't allow changing the search direction
139 wxFR_NOUPDOWN = 2,
140
141 // don't allow case sensitive searching
142 wxFR_NOMATCHCASE = 4,
143
144 // don't allow whole word searching
145 wxFR_NOWHOLEWORD = 8
146 }
147 \end{verbatim}
148
149 \latexignore{\rtfignore{\wxheading{Members}}}
150
151 \membersection{wxFindReplaceData::wxFindReplaceData}\label{wxfindreplacedatactor}
152
153 \func{}{wxFindReplaceData}{\param{wxUint32 }{flags = 0}}
154
155 Constuctor initializes the flags to default value ($0$).
156
157 \membersection{wxFindReplaceData::GetFindString}\label{wxfindreplacedatagetfindstring}
158
159 \func{const wxString\&}{GetFindString}{\void}
160
161 Get the string to find.
162
163 \membersection{wxFindReplaceData::GetReplaceString}\label{wxfindreplacedatagetreplacestring}
164
165 \func{const wxString\&}{GetReplaceString}{\void}
166
167 Get the replacement string.
168
169 \membersection{wxFindReplaceData::GetFlags}\label{wxfindreplacedatagetflags}
170
171 \constfunc{int}{GetFlags}{\void}
172
173 Get the combination of {\tt wxFindReplaceFlags} values.
174
175 \membersection{wxFindReplaceData::SetFlags}\label{wxfindreplacedatasetflags}
176
177 \func{void}{SetFlags}{\param{wxUint32 }{flags}}
178
179 Set the flags to use to initialize the controls of the dialog.
180
181 \membersection{wxFindReplaceData::SetFindString}\label{wxfindreplacedatasetfindstring}
182
183 \func{void}{SetFindString}{\param{const wxString\& }{str}}
184
185 Set the string to find (used as initial value by the dialog).
186
187 \membersection{wxFindReplaceData::SetReplaceString}\label{wxfindreplacedatasetreplacestring}
188
189 \func{void}{SetReplaceString}{\param{const wxString\& }{str}}
190
191 Set the replacement string (used as initial value by the dialog).
192
193
194
195
196 \section{\class{wxFindReplaceDialog}}\label{wxfindreplacedialog}
197
198 wxFindReplaceDialog is a standard modeless dialog which is used to allow the
199 user to search for some text (and possibly replace it with something else).
200 The actual searching is supposed to be done in the owner window which is the
201 parent of this dialog. Note that it means that unlike for the other standard
202 dialogs this one {\bf must} have a parent window. Also note that there is no
203 way to use this dialog in a modal way; it is always, by design and
204 implementation, modeless.
205
206 Please see the dialogs sample for an example of using it.
207
208 \wxheading{Include files}
209
210 <wx/fdrepdlg.h>
211
212 \wxheading{Library}
213
214 \helpref{wxCore}{librarieslist}
215
216
217 \wxheading{Derived from}
218
219 \helpref{wxDialog}{wxdialog}\\
220 \helpref{wxTopLevelWindow}{wxtoplevelwindow}\\
221 \helpref{wxWindow}{wxwindow}\\
222 \helpref{wxEvtHandler}{wxevthandler}\\
223 \helpref{wxObject}{wxobject}
224
225 \latexignore{\rtfignore{\wxheading{Members}}}
226
227 \membersection{wxFindReplaceDialog::wxFindReplaceDialog}\label{wxfindreplacedialogctor}
228
229 \func{}{wxFindReplaceDialog}{\void}
230
231 \func{}{wxFindReplaceDialog}{\param{wxWindow * }{parent}, \param{wxFindReplaceData* }{data}, \param{const wxString\& }{title}, \param{int }{style = 0}}
232
233 After using default constructor \helpref{Create()}{wxfindreplacedialogcreate}
234 must be called.
235
236 The {\it parent} and {\it data} parameters must be non-{\tt NULL}.
237
238 \membersection{wxFindReplaceDialog::\destruct{wxFindReplaceDialog}}\label{wxfindreplacedialogdtor}
239
240 \func{}{\destruct{wxFindReplaceDialog}}{\void}
241
242 Destructor.
243
244 \membersection{wxFindReplaceDialog::Create}\label{wxfindreplacedialogcreate}
245
246 \func{bool}{Create}{\param{wxWindow * }{parent}, \param{wxFindReplaceData* }{data}, \param{const wxString\& }{title}, \param{int }{style = 0}}
247
248 Creates the dialog; use \helpref{Show}{wxwindowshow} to show it on screen.
249
250 The {\it parent} and {\it data} parameters must be non-{\tt NULL}.
251 \membersection{wxFindReplaceDialog::GetData}\label{wxfindreplacedialoggetdata}
252
253 \constfunc{const wxFindReplaceData*}{GetData}{\void}
254
255 Get the \helpref{wxFindReplaceData}{wxfindreplacedata} object used by this
256 dialog.
257