]> git.saurik.com Git - wxWidgets.git/blame_incremental - interface/fdrepdlg.h
Don't force wxBORDER_SUNKEN so the programmer can specify some other style.
[wxWidgets.git] / interface / fdrepdlg.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: fdrepdlg.h
3// Purpose: interface of wxFindDialogEvent
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*/
18class wxFindDialogEvent : public wxCommandEvent
19{
20public:
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/**
53 @class wxFindReplaceData
54 @wxheader{fdrepdlg.h}
55
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.
62
63 Note that all @c SetXXX() methods may only be called before showing the
64 dialog and calling them has no effect later.
65
66 @library{wxcore}
67 @category{FIXME}
68*/
69class wxFindReplaceData : public wxObject
70{
71public:
72 /**
73 Constuctor initializes the flags to default value (0).
74 */
75 wxFindReplaceData(wxUint32 flags = 0);
76
77 /**
78 Get the string to find.
79 */
80 const wxString GetFindString();
81
82 /**
83 Get the combination of @c wxFindReplaceFlags values.
84 */
85 int GetFlags() const;
86
87 /**
88 Get the replacement string.
89 */
90 const wxString GetReplaceString();
91
92 /**
93 Set the string to find (used as initial value by the dialog).
94 */
95 void SetFindString(const wxString& str);
96
97 /**
98 Set the flags to use to initialize the controls of the dialog.
99 */
100 void SetFlags(wxUint32 flags);
101
102 /**
103 Set the replacement string (used as initial value by the dialog).
104 */
105 void SetReplaceString(const wxString& str);
106};
107
108
109
110/**
111 @class wxFindReplaceDialog
112 @wxheader{fdrepdlg.h}
113
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.
121
122 Please see the dialogs sample for an example of using it.
123
124 @library{wxcore}
125 @category{cmndlg}
126*/
127class wxFindReplaceDialog : public wxDialog
128{
129public:
130 //@{
131 /**
132 After using default constructor Create()
133 must be called.
134 The @a parent and @a data parameters must be non-@NULL.
135 */
136 wxFindReplaceDialog();
137 wxFindReplaceDialog(wxWindow* parent,
138 wxFindReplaceData* data,
139 const wxString& title,
140 int style = 0);
141 //@}
142
143 /**
144 Destructor.
145 */
146 ~wxFindReplaceDialog();
147
148 /**
149 Creates the dialog; use wxWindow::Show to show it on screen.
150 The @a parent and @a data parameters must be non-@NULL.
151 */
152 bool Create(wxWindow* parent, wxFindReplaceData* data,
153 const wxString& title, int style = 0);
154
155 /**
156 Get the wxFindReplaceData object used by this
157 dialog.
158 */
159 const wxFindReplaceData* GetData() const;
160};
161