1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %% Purpose: wxFindReplaceDialog documentation
4 %% Author: Vadim Zeitlin
8 %% Copyright: (c) 2001 Vadim Zeitlin
9 %% License: wxWindows license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12 \section{\class{wxFindDialogEvent
}}\label{wxfinddialogevent
}
14 wxFindReplaceDialog events
16 \wxheading{Derived from
}
18 \helpref{wxCommandEvent
}{wxcommandevent
}\\
19 \helpref{wxEvent
}{wxevent
}\\
20 \helpref{wxObject
}{wxobject
}
22 \wxheading{Include files
}
28 \helpref{wxCore
}{librarieslist
}
30 \wxheading{Event table macros
}
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.
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.
}
49 \latexignore{\rtfignore{\wxheading{Members
}}}
51 \membersection{wxFindDialogEvent::wxFindDialogEvent
}\label{wxfinddialogeventwxfinddialogevent
}
53 \func{}{wxFindDialogEvent
}{\param{wxEventType
}{commandType = wxEVT
\_NULL},
\param{int
}{id =
0}}
55 Constuctor used by wxWidgets only.
57 \membersection{wxFindDialogEvent::GetFlags
}\label{wxfinddialogeventgetflags
}
59 \constfunc{int
}{GetFlags
}{\void}
61 Get the currently selected flags: this is the combination of
{\tt wxFR
\_DOWN},
62 {\tt wxFR
\_WHOLEWORD} and
{\tt wxFR
\_MATCHCASE} flags.
64 \membersection{wxFindDialogEvent::GetFindString
}\label{wxfinddialogeventgetfindstring
}
66 \constfunc{wxString
}{GetFindString
}{\void}
68 Return the string to find (never empty).
70 \membersection{wxFindDialogEvent::GetReplaceString
}\label{wxfinddialogeventgetreplacestring
}
72 \constfunc{const wxString\&
}{GetReplaceString
}{\void}
74 Return the string to replace the search string with (only for replace and
77 \membersection{wxFindDialogEvent::GetDialog
}\label{wxfinddialogeventgetdialog
}
79 \constfunc{wxFindReplaceDialog*
}{GetDialog
}{\void}
81 Return the pointer to the dialog which generated this event.
83 \section{\class{wxFindReplaceData
}}\label{wxfindreplacedata
}
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.
92 Note that all
{\tt SetXXX()
} methods may only be called before showing the
93 dialog and calling them has no effect later.
95 \wxheading{Include files
}
98 #include <wx/fdrepdlg.h>
102 \helpref{wxCore
}{librarieslist
}
105 \wxheading{Derived from
}
107 \helpref{wxObject
}{wxobject
}
109 \wxheading{Data structures
}
112 \helpref{wxFindReplaceData::GetFlags()
}{wxfindreplacedatagetflags
} and
113 \helpref{wxFindDialogEvent::GetFlags()
}{wxfinddialogeventgetflags
}:
116 enum wxFindReplaceFlags
118 // downward search/replace selected (otherwise - upwards)
121 // whole word search/replace selected
124 // case sensitive search/replace selected (otherwise - case insensitive)
129 These flags can be specified in
130 \helpref{wxFindReplaceDialog ctor
}{wxfindreplacedialogctor
} or
131 \helpref{Create()
}{wxfindreplacedialogcreate
}:
134 enum wxFindReplaceDialogStyles
136 // replace dialog (otherwise find dialog)
137 wxFR_REPLACEDIALOG =
1,
139 // don't allow changing the search direction
142 // don't allow case sensitive searching
143 wxFR_NOMATCHCASE =
4,
145 // don't allow whole word searching
150 \latexignore{\rtfignore{\wxheading{Members
}}}
152 \membersection{wxFindReplaceData::wxFindReplaceData
}\label{wxfindreplacedatactor
}
154 \func{}{wxFindReplaceData
}{\param{wxUint32
}{flags =
0}}
156 Constuctor initializes the flags to default value ($
0$).
158 \membersection{wxFindReplaceData::GetFindString
}\label{wxfindreplacedatagetfindstring
}
160 \func{const wxString\&
}{GetFindString
}{\void}
162 Get the string to find.
164 \membersection{wxFindReplaceData::GetReplaceString
}\label{wxfindreplacedatagetreplacestring
}
166 \func{const wxString\&
}{GetReplaceString
}{\void}
168 Get the replacement string.
170 \membersection{wxFindReplaceData::GetFlags
}\label{wxfindreplacedatagetflags
}
172 \constfunc{int
}{GetFlags
}{\void}
174 Get the combination of
{\tt wxFindReplaceFlags
} values.
176 \membersection{wxFindReplaceData::SetFlags
}\label{wxfindreplacedatasetflags
}
178 \func{void
}{SetFlags
}{\param{wxUint32
}{flags
}}
180 Set the flags to use to initialize the controls of the dialog.
182 \membersection{wxFindReplaceData::SetFindString
}\label{wxfindreplacedatasetfindstring
}
184 \func{void
}{SetFindString
}{\param{const wxString\&
}{str
}}
186 Set the string to find (used as initial value by the dialog).
188 \membersection{wxFindReplaceData::SetReplaceString
}\label{wxfindreplacedatasetreplacestring
}
190 \func{void
}{SetReplaceString
}{\param{const wxString\&
}{str
}}
192 Set the replacement string (used as initial value by the dialog).
194 \section{\class{wxFindReplaceDialog
}}\label{wxfindreplacedialog
}
196 wxFindReplaceDialog is a standard modeless dialog which is used to allow the
197 user to search for some text (and possibly replace it with something else).
198 The actual searching is supposed to be done in the owner window which is the
199 parent of this dialog. Note that it means that unlike for the other standard
200 dialogs this one
{\bf must
} have a parent window. Also note that there is no
201 way to use this dialog in a modal way; it is always, by design and
202 implementation, modeless.
204 Please see the dialogs sample for an example of using it.
206 \wxheading{Include files
}
209 #include <wx/fdrepdlg.h>
213 \helpref{wxCore
}{librarieslist
}
216 \wxheading{Derived from
}
218 \helpref{wxDialog
}{wxdialog
}\\
219 \helpref{wxTopLevelWindow
}{wxtoplevelwindow
}\\
220 \helpref{wxWindow
}{wxwindow
}\\
221 \helpref{wxEvtHandler
}{wxevthandler
}\\
222 \helpref{wxObject
}{wxobject
}
224 \latexignore{\rtfignore{\wxheading{Members
}}}
226 \membersection{wxFindReplaceDialog::wxFindReplaceDialog
}\label{wxfindreplacedialogctor
}
228 \func{}{wxFindReplaceDialog
}{\void}
230 \func{}{wxFindReplaceDialog
}{\param{wxWindow *
}{parent
},
\param{wxFindReplaceData*
}{data
},
\param{const wxString\&
}{title
},
\param{int
}{style =
0}}
232 After using default constructor
\helpref{Create()
}{wxfindreplacedialogcreate
}
235 The
{\it parent
} and
{\it data
} parameters must be non-
{\tt NULL
}.
237 \membersection{wxFindReplaceDialog::
\destruct{wxFindReplaceDialog
}}\label{wxfindreplacedialogdtor
}
239 \func{}{\destruct{wxFindReplaceDialog
}}{\void}
243 \membersection{wxFindReplaceDialog::Create
}\label{wxfindreplacedialogcreate
}
245 \func{bool
}{Create
}{\param{wxWindow *
}{parent
},
\param{wxFindReplaceData*
}{data
},
\param{const wxString\&
}{title
},
\param{int
}{style =
0}}
247 Creates the dialog; use
\helpref{Show
}{wxwindowshow
} to show it on screen.
249 The
{\it parent
} and
{\it data
} parameters must be non-
{\tt NULL
}.
250 \membersection{wxFindReplaceDialog::GetData
}\label{wxfindreplacedialoggetdata
}
252 \constfunc{const wxFindReplaceData*
}{GetData
}{\void}
254 Get the
\helpref{wxFindReplaceData
}{wxfindreplacedata
} object used by this