]>
git.saurik.com Git - wxWidgets.git/blob - interface/fdrepdlg.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxFindDialogEvent
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
10 @class wxFindDialogEvent
13 wxFindReplaceDialog events
18 class wxFindDialogEvent
: public wxCommandEvent
22 Constuctor used by wxWidgets only.
24 wxFindDialogEvent(wxEventType commandType
= wxEVT_NULL
,
28 Return the pointer to the dialog which generated this event.
30 wxFindReplaceDialog
* GetDialog() const;
33 Return the string to find (never empty).
35 wxString
GetFindString() const;
38 Get the currently selected flags: this is the combination of @c wxFR_DOWN,
39 @c wxFR_WHOLEWORD and @c wxFR_MATCHCASE flags.
44 Return the string to replace the search string with (only for replace and
47 const wxString
GetReplaceString() const;
53 @class wxFindReplaceData
56 wxFindReplaceData holds the data for
57 wxFindReplaceDialog. It is used to initialize
58 the dialog with the default values and will keep the last values from the
59 dialog when it is closed. It is also updated each time a
60 wxFindDialogEvent is generated so instead of
61 using the wxFindDialogEvent methods you can also directly query this object.
63 Note that all @c SetXXX() methods may only be called before showing the
64 dialog and calling them has no effect later.
69 class wxFindReplaceData
: public wxObject
73 Constuctor initializes the flags to default value (0).
75 wxFindReplaceData(wxUint32 flags
= 0);
78 Get the string to find.
80 const wxString
GetFindString();
83 Get the combination of @c wxFindReplaceFlags values.
88 Get the replacement string.
90 const wxString
GetReplaceString();
93 Set the string to find (used as initial value by the dialog).
95 void SetFindString(const wxString
& str
);
98 Set the flags to use to initialize the controls of the dialog.
100 void SetFlags(wxUint32 flags
);
103 Set the replacement string (used as initial value by the dialog).
105 void SetReplaceString(const wxString
& str
);
111 @class wxFindReplaceDialog
112 @wxheader{fdrepdlg.h}
114 wxFindReplaceDialog is a standard modeless dialog which is used to allow the
115 user to search for some text (and possibly replace it with something else).
116 The actual searching is supposed to be done in the owner window which is the
117 parent of this dialog. Note that it means that unlike for the other standard
118 dialogs this one @b must have a parent window. Also note that there is no
119 way to use this dialog in a modal way; it is always, by design and
120 implementation, modeless.
122 Please see the dialogs sample for an example of using it.
127 class wxFindReplaceDialog
: public wxDialog
132 After using default constructor Create()
134 The @a parent and @a data parameters must be non-@NULL.
136 wxFindReplaceDialog();
137 wxFindReplaceDialog(wxWindow
* parent
,
138 wxFindReplaceData
* data
,
139 const wxString
& title
,
146 ~wxFindReplaceDialog();
149 Creates the dialog; use wxWindow::Show to show it on screen.
150 The @a parent and @a data parameters must be non-@NULL.
152 bool Create(wxWindow
* parent
, wxFindReplaceData
* data
,
153 const wxString
& title
, int style
= 0);
156 Get the wxFindReplaceData object used by this
159 const wxFindReplaceData
* GetData() const;