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