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