]> git.saurik.com Git - wxWidgets.git/blob - interface/fdrepdlg.h
598806acf76f58a211fb7cd2eb2c327c3727109c
[wxWidgets.git] / interface / fdrepdlg.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: fdrepdlg.h
3 // Purpose: documentation for wxFindDialogEvent class
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9 /**
10 @class wxFindDialogEvent
11 @wxheader{fdrepdlg.h}
12
13 wxFindReplaceDialog events
14
15 @library{wxcore}
16 @category{events}
17 */
18 class wxFindDialogEvent : public wxCommandEvent
19 {
20 public:
21 /**
22 Constuctor used by wxWidgets only.
23 */
24 wxFindDialogEvent(wxEventType commandType = wxEVT_NULL,
25 int id = 0);
26
27 /**
28 Return the pointer to the dialog which generated this event.
29 */
30 wxFindReplaceDialog* GetDialog() const;
31
32 /**
33 Return the string to find (never empty).
34 */
35 wxString GetFindString() const;
36
37 /**
38 Get the currently selected flags: this is the combination of @c wxFR_DOWN,
39 @c wxFR_WHOLEWORD and @c wxFR_MATCHCASE flags.
40 */
41 int GetFlags() const;
42
43 /**
44 Return the string to replace the search string with (only for replace and
45 replace all events).
46 */
47 const wxString GetReplaceString() const;
48 };
49
50
51 /**
52 @class wxFindReplaceData
53 @wxheader{fdrepdlg.h}
54
55 wxFindReplaceData holds the data for
56 wxFindReplaceDialog. It is used to initialize
57 the dialog with the default values and will keep the last values from the
58 dialog when it is closed. It is also updated each time a
59 wxFindDialogEvent is generated so instead of
60 using the wxFindDialogEvent methods you can also directly query this object.
61
62 Note that all @c SetXXX() methods may only be called before showing the
63 dialog and calling them has no effect later.
64
65 @library{wxcore}
66 @category{FIXME}
67 */
68 class wxFindReplaceData : public wxObject
69 {
70 public:
71 /**
72 Constuctor initializes the flags to default value (0).
73 */
74 wxFindReplaceData(wxUint32 flags = 0);
75
76 /**
77 Get the string to find.
78 */
79 const wxString GetFindString();
80
81 /**
82 Get the combination of @c wxFindReplaceFlags values.
83 */
84 int GetFlags() const;
85
86 /**
87 Get the replacement string.
88 */
89 const wxString GetReplaceString();
90
91 /**
92 Set the string to find (used as initial value by the dialog).
93 */
94 void SetFindString(const wxString& str);
95
96 /**
97 Set the flags to use to initialize the controls of the dialog.
98 */
99 void SetFlags(wxUint32 flags);
100
101 /**
102 Set the replacement string (used as initial value by the dialog).
103 */
104 void SetReplaceString(const wxString& str);
105 };
106
107
108 /**
109 @class wxFindReplaceDialog
110 @wxheader{fdrepdlg.h}
111
112 wxFindReplaceDialog is a standard modeless dialog which is used to allow the
113 user to search for some text (and possibly replace it with something else).
114 The actual searching is supposed to be done in the owner window which is the
115 parent of this dialog. Note that it means that unlike for the other standard
116 dialogs this one @b must have a parent window. Also note that there is no
117 way to use this dialog in a modal way; it is always, by design and
118 implementation, modeless.
119
120 Please see the dialogs sample for an example of using it.
121
122 @library{wxcore}
123 @category{cmndlg}
124 */
125 class wxFindReplaceDialog : public wxDialog
126 {
127 public:
128 //@{
129 /**
130 After using default constructor Create()
131 must be called.
132 The @a parent and @a data parameters must be non-@NULL.
133 */
134 wxFindReplaceDialog();
135 wxFindReplaceDialog(wxWindow* parent,
136 wxFindReplaceData* data,
137 const wxString& title,
138 int style = 0);
139 //@}
140
141 /**
142 Destructor.
143 */
144 ~wxFindReplaceDialog();
145
146 /**
147 Creates the dialog; use wxWindow::Show to show it on screen.
148 The @a parent and @a data parameters must be non-@NULL.
149 */
150 bool Create(wxWindow* parent, wxFindReplaceData* data,
151 const wxString& title, int style = 0);
152
153 /**
154 Get the wxFindReplaceData object used by this
155 dialog.
156 */
157 const wxFindReplaceData* GetData() const;
158 };