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
}
20 \wxheading{Include files
}
24 \wxheading{Event table macros
}
26 To process a command event from
27 \helpref{wxFindReplaceDialog
}{wxfindreplacedialog
}, use these event handler
28 macros to direct input to member functions that take a wxFindDialogEvent
29 argument. The
{\it id
} parameter is the identifier of the find dialog and you
30 may usually specify $-
1$ for it unless you plan to have several find dialogs
31 sending events to the same owner window simultaneously.
34 \begin{twocollist
}\itemsep=
0pt
35 \twocolitem{{\bf EVT
\_FIND(id, func)
}}{Find button was pressed in the dialog.
}
36 \twocolitem{{\bf EVT
\_FIND\_NEXT(id, func)
}}{Find next button was pressed in the dialog.
}
37 \twocolitem{{\bf EVT
\_FIND\_REPLACE(id, func)
}}{Replace button was pressed in the dialog.
}
38 \twocolitem{{\bf EVT
\_FIND\_REPLACE\_ALL(id, func)
}}{Replace all button was pressed in the dialog.
}
39 \twocolitem{{\bf EVT
\_FIND\_CLOSE(id, func)
}}{The dialog is being destroyed,
40 any pointers to it cannot be used any longer.
}
43 \latexignore{\rtfignore{\wxheading{Members
}}}
45 \membersection{wxFindDialogEvent::wxFindDialogEvent
}\label{wxfinddialogeventwxfinddialogevent
}
47 \func{}{wxFindDialogEvent
}{\param{wxEventType
}{commandType = wxEVT
\_NULL},
\param{int
}{id =
0}}
49 Constuctor used by wxWindows only.
51 \membersection{wxFindDialogEvent::GetFlags
}\label{wxfinddialogeventgetflags
}
53 \constfunc{int
}{GetFlags
}{\void}
55 Get the currently selected flags: this is the combination of
{\tt wxFR
\_DOWN},
56 {\tt wxFR
\_WHOLEWORD} and
{\tt wxFR
\_MATCHCASE} flags.
58 \membersection{wxFindDialogEvent::GetFindString
}\label{wxfinddialogeventgetfindstring
}
60 \constfunc{wxString
}{GetFindString
}{\void}
62 Return the string to find (never empty).
64 \membersection{wxFindDialogEvent::GetReplaceString
}\label{wxfinddialogeventgetreplacestring
}
66 \constfunc{const wxString\&
}{GetReplaceString
}{\void}
68 Return the string to replace the search string with (only for replace and
71 \membersection{wxFindDialogEvent::GetDialog
}\label{wxfinddialogeventgetdialog
}
73 \constfunc{wxFindReplaceDialog*
}{GetDialog
}{\void}
75 Return the pointer to the dialog which generated this event.
77 \section{\class{wxFindReplaceData
}}\label{wxfindreplacedata
}
79 wxFindReplaceData holds the data for
80 \helpref{wxFindReplaceDialog
}{wxfindreplacedialog
}. It is used to initialize
81 the dialog with the default values and will keep the last values from the
82 dialog when it is closed. It is also updated each time a
83 \helpref{wxFindDialogEvent
}{wxfinddialogevent
} is generated so instead of
84 using the wxFindDialogEvent methods you can also directly query this object.
86 Note that all
{\tt SetXXX()
} methods may only be called before showing the
87 dialog and calling them has no effect later.
89 \wxheading{Include files
}
91 #include <wx/fdrepdlg.h>
93 \wxheading{Derived from
}
95 \helpref{wxObject
}{wxobject
}
97 \wxheading{Data structures
}
100 \helpref{wxFindReplaceData::GetFlags()
}{wxfindreplacedatagetflags
} and
101 \helpref{wxFindDialogEvent::GetFlags()
}{wxfinddialogeventgetflags
}:
104 enum wxFindReplaceFlags
106 // downward search/replace selected (otherwise - upwards)
109 // whole word search/replace selected
112 // case sensitive search/replace selected (otherwise - case insensitive)
117 These flags can be specified in
118 \helpref{wxFindReplaceDialog ctor
}{wxfindreplacedialogctor
} or
119 \helpref{Create()
}{wxfindreplacedialogcreate
}:
122 enum wxFindReplaceDialogStyles
124 // replace dialog (otherwise find dialog)
125 wxFR_REPLACEDIALOG =
1,
127 // don't allow changing the search direction
130 // don't allow case sensitive searching
131 wxFR_NOMATCHCASE =
4,
133 // don't allow whole word searching
138 \latexignore{\rtfignore{\wxheading{Members
}}}
140 \membersection{wxFindReplaceData::wxFindReplaceData
}\label{wxfindreplacedatactor
}
142 \func{}{wxFindReplaceData
}{\param{wxUint32
}{flags =
0}}
144 Constuctor initializes the flags to default value ($
0$).
146 \membersection{wxFindReplaceData::GetFindString
}\label{wxfindreplacedatagetfindstring
}
148 \func{const wxString\&
}{GetFindString
}{\void}
150 Get the string to find.
152 \membersection{wxFindReplaceData::GetReplaceString
}\label{wxfindreplacedatagetreplacestring
}
154 \func{const wxString\&
}{GetReplaceString
}{\void}
156 Get the replacement string.
158 \membersection{wxFindReplaceData::GetFlags
}\label{wxfindreplacedatagetflags
}
160 \constfunc{int
}{GetFlags
}{\void}
162 Get the combination of
{\tt wxFindReplaceFlags
} values.
164 \membersection{wxFindReplaceData::SetFlags
}\label{wxfindreplacedatasetflags
}
166 \func{void
}{SetFlags
}{\param{wxUint32
}{flags
}}
168 Set the flags to use to initialize the controls of the dialog.
170 \membersection{wxFindReplaceData::SetFindString
}\label{wxfindreplacedatasetfindstring
}
172 \func{void
}{SetFindString
}{\param{const wxString\&
}{str
}}
174 Set the string to find (used as initial value by the dialog).
176 \membersection{wxFindReplaceData::SetReplaceString
}\label{wxfindreplacedatasetreplacestring
}
178 \func{void
}{SetReplaceString
}{\param{const wxString\&
}{str
}}
180 Set the replacement string (used as initial value by the dialog).
182 \section{\class{wxFindReplaceDialog
}}\label{wxfindreplacedialog
}
184 wxFindReplaceDialog is a standard modeless dialog which is used to allow the
185 user to search for some text (and possible replace it with something else).
186 The actual searching is supposed to be done in the owner window which is the
187 parent of this dialog. Note that it means that unlike for the other standard
188 dialogs this one
{\bf must
} have a parent window.
190 Please see the dialogs sample for example of using it.
192 \wxheading{Include files
}
194 #include <wx/fdrepdlg.h>
196 \wxheading{Derived from
}
198 \helpref{wxDialog
}{wxdialog
}
200 \latexignore{\rtfignore{\wxheading{Members
}}}
202 \membersection{wxFindReplaceDialog::wxFindReplaceDialog
}\label{wxfindreplacedialogctor
}
204 \func{}{wxFindReplaceDialogBase
}{\void}
206 \func{}{wxFindReplaceDialogBase
}{\param{wxWindow *
}{parent
},
\param{wxFindReplaceData*
}{data
},
\param{const wxString\&
}{title
},
\param{int
}{style =
0}}
208 After using default constructor
\helpref{Created
}{wxfindreplacedialogcreate
}
211 The
{\it parent
} and
{\it data
} parameters must be non-
{\tt NULL
}.
213 \membersection{wxFindReplaceDialogBase::
\destruct{wxFindReplaceDialogBase
}}\label{wxfindreplacedialogdtor
}
215 \func{}{\destruct{wxFindReplaceDialogBase
}}{\void}
219 \func{bool
}{Create
}{\param{wxWindow *
}{parent
},
\param{wxFindReplaceData*
}{data
},
\param{const wxString\&
}{title
},
\param{int
}{style =
0}}
221 Creates the dialog and shows it on screen.
223 The
{\it parent
} and
{\it data
} parameters must be non-
{\tt NULL
}.
225 \membersection{wxFindReplaceDialogBase::GetData
}\label{wxfindreplacedialoggetdata
}
227 \constfunc{const wxFindReplaceData*
}{GetData
}{\void}
229 Get the
\helpref{wxFindReplaceData
}{wxfindreplacedata
} object used by this