]>
Commit | Line | Data |
---|---|---|
457814b5 JS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: dialogs.h | |
3 | // Purpose: Common dialogs demo | |
5b05ce47 | 4 | // Author: Julian Smart, Vadim Zeitlin, ABX |
457814b5 | 5 | // Created: 04/01/98 |
6aa89a22 | 6 | // Copyright: (c) Julian Smart |
5b05ce47 VZ |
7 | // (c) 2004 ABX |
8 | // (c) Vadim Zeitlin | |
526954c5 | 9 | // Licence: wxWindows licence |
457814b5 JS |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
4c8fc4d6 | 12 | /* |
08375332 | 13 | This sample shows how to use the common dialogs available from wxWidgets. |
4c8fc4d6 WS |
14 | It also shows that generic implementations of common dialogs can be exchanged |
15 | with native dialogs and can coexist in one application. The need for generic | |
16 | dialogs addition is recognized thanks to setup of below USE_*** setting. Their | |
08375332 WS |
17 | combinations reflects conditions of makefiles and project files to avoid unresolved |
18 | references during linking. For now some generic dialogs are added in static builds | |
4c8fc4d6 WS |
19 | of MSW, MAC and OS2 |
20 | */ | |
21 | ||
457814b5 JS |
22 | #ifndef __DIALOGSH__ |
23 | #define __DIALOGSH__ | |
24 | ||
da7a8602 WS |
25 | #ifdef __WXUNIVERSAL__ |
26 | #define USE_WXUNIVERSAL 1 | |
27 | #else | |
28 | #define USE_WXUNIVERSAL 0 | |
29 | #endif | |
30 | ||
f50ff87b WS |
31 | #ifdef WXUSINGDLL |
32 | #define USE_DLL 1 | |
33 | #else | |
34 | #define USE_DLL 0 | |
35 | #endif | |
36 | ||
684883e3 WS |
37 | #if defined(__WXWINCE__) |
38 | #define USE_WXWINCE 1 | |
39 | #else | |
40 | #define USE_WXWINCE 0 | |
41 | #endif | |
42 | ||
43 | #if defined(__WXMSW__) && !USE_WXWINCE | |
da7a8602 WS |
44 | #define USE_WXMSW 1 |
45 | #else | |
46 | #define USE_WXMSW 0 | |
47 | #endif | |
48 | ||
49 | #ifdef __WXMAC__ | |
50 | #define USE_WXMAC 1 | |
51 | #else | |
52 | #define USE_WXMAC 0 | |
53 | #endif | |
54 | ||
cea9c5b1 | 55 | #if defined(__WXMAC_OSX__) && ( MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2) && USE_NATIVE_FONT_DIALOG_FOR_MACOSX |
71622a68 RN |
56 | #define USE_WXMACFONTDLG 1 |
57 | #else | |
58 | #define USE_WXMACFONTDLG 0 | |
59 | #endif | |
60 | ||
da7a8602 WS |
61 | #ifdef __WXGTK__ |
62 | #define USE_WXGTK 1 | |
63 | #else | |
64 | #define USE_WXGTK 0 | |
65 | #endif | |
66 | ||
67 | #ifdef __WXPM__ | |
68 | #define USE_WXPM 1 | |
69 | #else | |
70 | #define USE_WXPM 0 | |
71 | #endif | |
72 | ||
29e3d1f9 | 73 | #define USE_GENERIC_DIALOGS (!USE_WXUNIVERSAL && !USE_DLL) |
13188def | 74 | |
29e3d1f9 VZ |
75 | #define USE_COLOURDLG_GENERIC \ |
76 | ((USE_WXMSW || USE_WXMAC) && USE_GENERIC_DIALOGS && wxUSE_COLOURDLG) | |
77 | #define USE_DIRDLG_GENERIC \ | |
78 | ((USE_WXMSW || USE_WXMAC) && USE_GENERIC_DIALOGS && wxUSE_DIRDLG) | |
79 | #define USE_FILEDLG_GENERIC \ | |
8ce68f7f VZ |
80 | ((((USE_WXMSW || USE_WXMAC || USE_WXPM || USE_WXGTK) \ |
81 | && USE_GENERIC_DIALOGS) || USE_WXWINCE) && wxUSE_FILEDLG) | |
29e3d1f9 | 82 | #define USE_FONTDLG_GENERIC \ |
684883e3 | 83 | ((USE_WXMSW || USE_WXMACFONTDLG || USE_WXPM) && USE_GENERIC_DIALOGS && wxUSE_FONTDLG) |
4c8fc4d6 | 84 | |
08375332 WS |
85 | // Turn USE_MODAL_PRESENTATION to 0 if there is any reason for not presenting difference |
86 | // between modal and modeless dialogs (ie. not implemented it in your port yet) | |
532d575b | 87 | #if defined(__SMARTPHONE__) || !wxUSE_BOOKCTRL |
08375332 WS |
88 | #define USE_MODAL_PRESENTATION 0 |
89 | #else | |
90 | #define USE_MODAL_PRESENTATION 1 | |
91 | #endif | |
4c8fc4d6 | 92 | |
13188def | 93 | |
532d575b WS |
94 | // Turn USE_SETTINGS_DIALOG to 0 if supported |
95 | #if wxUSE_BOOKCTRL | |
96 | #define USE_SETTINGS_DIALOG 1 | |
97 | #else | |
98 | #define USE_SETTINGS_DIALOG 0 | |
99 | #endif | |
100 | ||
9ad2fe62 VZ |
101 | #if wxUSE_LOG |
102 | ||
103 | // Custom application traits class which we use to override the default log | |
104 | // target creation | |
105 | class MyAppTraits : public wxGUIAppTraits | |
106 | { | |
107 | public: | |
108 | virtual wxLog *CreateLogTarget(); | |
109 | }; | |
110 | ||
111 | #endif // wxUSE_LOG | |
532d575b | 112 | |
457814b5 JS |
113 | // Define a new application type |
114 | class MyApp: public wxApp | |
c49245f8 VZ |
115 | { |
116 | public: | |
f434800c VZ |
117 | MyApp() { m_startupProgressStyle = -1; } |
118 | ||
9ad2fe62 | 119 | virtual bool OnInit(); |
457814b5 | 120 | |
f434800c VZ |
121 | #if wxUSE_CMDLINE_PARSER |
122 | virtual void OnInitCmdLine(wxCmdLineParser& parser); | |
123 | virtual bool OnCmdLineParsed(wxCmdLineParser& parser); | |
124 | #endif // wxUSE_CMDLINE_PARSER | |
125 | ||
9ad2fe62 VZ |
126 | protected: |
127 | #if wxUSE_LOG | |
128 | virtual wxAppTraits *CreateTraits() { return new MyAppTraits; } | |
129 | #endif // wxUSE_LOG | |
f434800c VZ |
130 | |
131 | private: | |
132 | // Flag set to a valid value if command line option "progress" is used, | |
133 | // this allows testing of wxProgressDialog before the main event loop is | |
134 | // started. If this option is not specified it is set to -1 by default | |
135 | // meaning that progress dialog shouldn't be shown at all. | |
136 | long m_startupProgressStyle; | |
457814b5 JS |
137 | }; |
138 | ||
b4954d19 WS |
139 | #if USE_MODAL_PRESENTATION |
140 | ||
f6bcfd97 | 141 | // A custom modeless dialog |
4c45f240 VZ |
142 | class MyModelessDialog : public wxDialog |
143 | { | |
144 | public: | |
145 | MyModelessDialog(wxWindow *parent); | |
abceee76 | 146 | |
5d987909 | 147 | void OnButton(wxCommandEvent& event); |
abceee76 VZ |
148 | void OnClose(wxCloseEvent& event); |
149 | ||
150 | private: | |
151 | DECLARE_EVENT_TABLE() | |
4c45f240 VZ |
152 | }; |
153 | ||
f6bcfd97 BP |
154 | // A custom modal dialog |
155 | class MyModalDialog : public wxDialog | |
156 | { | |
157 | public: | |
158 | MyModalDialog(wxWindow *parent); | |
159 | ||
160 | void OnButton(wxCommandEvent& event); | |
161 | ||
162 | private: | |
5315ebfa VZ |
163 | wxButton *m_btnModal, |
164 | *m_btnModeless, | |
165 | *m_btnDelete; | |
f6bcfd97 BP |
166 | |
167 | DECLARE_EVENT_TABLE() | |
168 | }; | |
169 | ||
b4954d19 WS |
170 | #endif // USE_MODAL_PRESENTATION |
171 | ||
44b25eac | 172 | // A class demonstrating CreateStdDialogButtonSizer() |
8e1dac82 VZ |
173 | class StdButtonSizerDialog : public wxDialog |
174 | { | |
175 | public: | |
176 | StdButtonSizerDialog(wxWindow *parent); | |
177 | ||
178 | void OnEvent(wxCommandEvent& event); | |
179 | ||
180 | private: | |
181 | void EnableDisableControls(); | |
182 | ||
183 | wxCheckBox *m_chkboxAffirmativeButton; | |
184 | wxRadioButton *m_radiobtnOk, | |
185 | *m_radiobtnYes; | |
186 | ||
187 | wxCheckBox *m_chkboxDismissButton; | |
188 | wxRadioButton *m_radiobtnClose, | |
189 | *m_radiobtnCancel; | |
190 | ||
191 | wxCheckBox *m_chkboxApply, | |
192 | *m_chkboxNo, | |
193 | *m_chkboxHelp, | |
194 | *m_chkboxNoDefault; | |
195 | ||
196 | wxSizer *m_buttonsSizer; | |
197 | ||
198 | DECLARE_EVENT_TABLE() | |
199 | }; | |
200 | ||
44b25eac VZ |
201 | // Test harness for wxMessageDialog. |
202 | class TestMessageBoxDialog : public wxDialog | |
203 | { | |
204 | public: | |
205 | TestMessageBoxDialog(wxWindow *parent); | |
206 | ||
a1bdd4ab VZ |
207 | bool Create(); |
208 | ||
209 | protected: | |
c8648b64 | 210 | wxString GetBoxTitle() { return m_textTitle->GetValue(); } |
a1bdd4ab VZ |
211 | wxString GetMessage() { return m_textMsg->GetValue(); } |
212 | long GetStyle(); | |
213 | ||
214 | void PrepareMessageDialog(wxMessageDialogBase &dlg); | |
215 | ||
216 | virtual void AddAdditionalTextOptions(wxSizer *WXUNUSED(sizer)) { } | |
217 | virtual void AddAdditionalFlags(wxSizer *WXUNUSED(sizer)) { } | |
218 | ||
44b25eac VZ |
219 | void OnApply(wxCommandEvent& event); |
220 | void OnClose(wxCommandEvent& event); | |
221 | void OnUpdateLabelUI(wxUpdateUIEvent& event); | |
4e2dc789 | 222 | void OnUpdateNoDefaultUI(wxUpdateUIEvent& event); |
44b25eac | 223 | |
a1bdd4ab | 224 | private: |
44b25eac VZ |
225 | enum |
226 | { | |
227 | Btn_Yes, | |
228 | Btn_No, | |
229 | Btn_Ok, | |
230 | Btn_Cancel, | |
7112cdd1 | 231 | Btn_Help, |
44b25eac VZ |
232 | Btn_Max |
233 | }; | |
234 | ||
235 | struct BtnInfo | |
236 | { | |
237 | int flag; | |
b3ca7c85 | 238 | const char *name; |
44b25eac VZ |
239 | }; |
240 | ||
b3ca7c85 | 241 | static const BtnInfo ms_btnInfo[Btn_Max]; |
44b25eac | 242 | |
8783d72f VZ |
243 | enum |
244 | { | |
245 | MsgDlgIcon_No, | |
246 | MsgDlgIcon_None, | |
247 | MsgDlgIcon_Info, | |
248 | MsgDlgIcon_Question, | |
249 | MsgDlgIcon_Warning, | |
250 | MsgDlgIcon_Error, | |
67315c8b | 251 | MsgDlgIcon_AuthNeeded, |
8783d72f VZ |
252 | MsgDlgIcon_Max |
253 | }; | |
254 | ||
d60a9c00 VZ |
255 | wxTextCtrl *m_textTitle, |
256 | *m_textMsg, | |
44b25eac VZ |
257 | *m_textExtMsg; |
258 | ||
259 | wxCheckBox *m_buttons[Btn_Max]; | |
260 | wxTextCtrl *m_labels[Btn_Max]; | |
261 | ||
262 | wxRadioBox *m_icons; | |
263 | ||
4e2dc789 VZ |
264 | wxCheckBox *m_chkNoDefault, |
265 | *m_chkCentre; | |
266 | ||
44b25eac | 267 | DECLARE_EVENT_TABLE() |
c0c133e1 | 268 | wxDECLARE_NO_COPY_CLASS(TestMessageBoxDialog); |
44b25eac VZ |
269 | }; |
270 | ||
a1bdd4ab VZ |
271 | #if wxUSE_RICHMSGDLG |
272 | class TestRichMessageDialog : public TestMessageBoxDialog | |
273 | { | |
274 | public: | |
275 | TestRichMessageDialog(wxWindow *parent); | |
276 | ||
277 | protected: | |
278 | // overrides method in base class | |
279 | virtual void AddAdditionalTextOptions(wxSizer *sizer); | |
280 | virtual void AddAdditionalFlags(wxSizer *sizer); | |
281 | ||
282 | void OnApply(wxCommandEvent& event); | |
283 | ||
284 | private: | |
285 | wxTextCtrl *m_textCheckBox; | |
286 | wxCheckBox *m_initialValueCheckBox; | |
287 | wxTextCtrl *m_textDetailed; | |
288 | ||
289 | DECLARE_EVENT_TABLE() | |
290 | }; | |
291 | #endif // wxUSE_RICHMSGDLG | |
292 | ||
a625c5b6 RR |
293 | class TestDefaultActionDialog: public wxDialog |
294 | { | |
295 | public: | |
296 | TestDefaultActionDialog( wxWindow *parent ); | |
44b25eac | 297 | |
a625c5b6 | 298 | void OnListBoxDClick(wxCommandEvent& event); |
efaf7865 VZ |
299 | void OnDisableOK(wxCommandEvent& event); |
300 | void OnDisableCancel(wxCommandEvent& event); | |
a625c5b6 | 301 | void OnCatchListBoxDClick(wxCommandEvent& event); |
efaf7865 | 302 | void OnTextEnter(wxCommandEvent& event); |
44b25eac | 303 | |
a625c5b6 RR |
304 | private: |
305 | bool m_catchListBoxDClick; | |
306 | ||
307 | private: | |
308 | DECLARE_EVENT_TABLE() | |
309 | }; | |
310 | ||
311 | ||
532d575b | 312 | #if USE_SETTINGS_DIALOG |
0f5d8ecf JS |
313 | // Property sheet dialog |
314 | class SettingsDialog: public wxPropertySheetDialog | |
315 | { | |
316 | DECLARE_CLASS(SettingsDialog) | |
317 | public: | |
64d3ed17 | 318 | SettingsDialog(wxWindow* parent, int dialogType); |
cc8bc5aa | 319 | ~SettingsDialog(); |
0f5d8ecf JS |
320 | |
321 | wxPanel* CreateGeneralSettingsPage(wxWindow* parent); | |
322 | wxPanel* CreateAestheticSettingsPage(wxWindow* parent); | |
323 | ||
324 | protected: | |
325 | ||
326 | enum { | |
327 | ID_SHOW_TOOLTIPS = 100, | |
328 | ID_AUTO_SAVE, | |
329 | ID_AUTO_SAVE_MINS, | |
330 | ID_LOAD_LAST_PROJECT, | |
331 | ||
332 | ID_APPLY_SETTINGS_TO, | |
333 | ID_BACKGROUND_STYLE, | |
334 | ID_FONT_SIZE | |
335 | }; | |
336 | ||
cc8bc5aa JS |
337 | wxImageList* m_imageList; |
338 | ||
0f5d8ecf JS |
339 | DECLARE_EVENT_TABLE() |
340 | }; | |
341 | ||
532d575b WS |
342 | #endif // USE_SETTINGS_DIALOG |
343 | ||
457814b5 JS |
344 | // Define a new frame type |
345 | class MyFrame: public wxFrame | |
c49245f8 VZ |
346 | { |
347 | public: | |
5b05ce47 | 348 | MyFrame(const wxString& title); |
e36a1739 | 349 | virtual ~MyFrame(); |
13188def | 350 | |
8cf304f8 | 351 | #if wxUSE_MSGDLG |
13188def | 352 | void MessageBox(wxCommandEvent& event); |
44b25eac | 353 | void MessageBoxDialog(wxCommandEvent& event); |
8cf304f8 | 354 | void MessageBoxInfo(wxCommandEvent& event); |
86c3808c SC |
355 | void MessageBoxWindowModal(wxCommandEvent& event); |
356 | void MessageBoxWindowModalClosed(wxWindowModalDialogEvent& event); | |
8cf304f8 | 357 | #endif // wxUSE_MSGDLG |
a1bdd4ab VZ |
358 | #if wxUSE_RICHMSGDLG |
359 | void RichMessageDialog(wxCommandEvent& event); | |
360 | #endif // wxUSE_RICHMSGDLG | |
457814b5 | 361 | |
13188def | 362 | #if wxUSE_COLOURDLG |
329e86bf | 363 | void ChooseColour(wxCommandEvent& event); |
e6ef9ea4 | 364 | void GetColour(wxCommandEvent& event); |
13188def WS |
365 | #endif // wxUSE_COLOURDLG |
366 | ||
367 | #if wxUSE_FONTDLG | |
329e86bf | 368 | void ChooseFont(wxCommandEvent& event); |
13188def WS |
369 | #endif // wxUSE_FONTDLG |
370 | ||
371 | #if wxUSE_LOG_DIALOG | |
d93c719a | 372 | void LogDialog(wxCommandEvent& event); |
13188def WS |
373 | #endif // wxUSE_LOG_DIALOG |
374 | ||
a92b5dfe VZ |
375 | #if wxUSE_INFOBAR |
376 | void InfoBarSimple(wxCommandEvent& event); | |
377 | void InfoBarAdvanced(wxCommandEvent& event); | |
378 | #endif // wxUSE_INFOBAR | |
379 | ||
13188def | 380 | #if wxUSE_CHOICEDLG |
457814b5 | 381 | void SingleChoice(wxCommandEvent& event); |
d6c9c1b7 | 382 | void MultiChoice(wxCommandEvent& event); |
13188def WS |
383 | #endif // wxUSE_CHOICEDLG |
384 | ||
5a5f305a VZ |
385 | void Rearrange(wxCommandEvent& event); |
386 | ||
13188def | 387 | #if wxUSE_TEXTDLG |
50a2a355 | 388 | void LineEntry(wxCommandEvent& event); |
457814b5 | 389 | void TextEntry(wxCommandEvent& event); |
a294c6d5 | 390 | void PasswordEntry(wxCommandEvent& event); |
13188def WS |
391 | #endif // wxUSE_TEXTDLG |
392 | ||
393 | #if wxUSE_NUMBERDLG | |
c49245f8 | 394 | void NumericEntry(wxCommandEvent& event); |
13188def WS |
395 | #endif // wxUSE_NUMBERDLG |
396 | ||
397 | #if wxUSE_FILEDLG | |
457814b5 | 398 | void FileOpen(wxCommandEvent& event); |
35b45b33 | 399 | void FileOpen2(wxCommandEvent& event); |
c61f4f6d | 400 | void FilesOpen(wxCommandEvent& event); |
457814b5 | 401 | void FileSave(wxCommandEvent& event); |
13188def WS |
402 | #endif // wxUSE_FILEDLG |
403 | ||
695fe764 WS |
404 | #if USE_FILEDLG_GENERIC |
405 | void FileOpenGeneric(wxCommandEvent& event); | |
406 | void FilesOpenGeneric(wxCommandEvent& event); | |
407 | void FileSaveGeneric(wxCommandEvent& event); | |
408 | #endif // USE_FILEDLG_GENERIC | |
409 | ||
13188def | 410 | #if wxUSE_DIRDLG |
457814b5 | 411 | void DirChoose(wxCommandEvent& event); |
f09c8393 | 412 | void DirChooseNew(wxCommandEvent& event); |
13188def WS |
413 | #endif // wxUSE_DIRDLG |
414 | ||
415 | #if USE_DIRDLG_GENERIC | |
51a58d8b | 416 | void GenericDirChoose(wxCommandEvent& event); |
13188def WS |
417 | #endif // USE_DIRDLG_GENERIC |
418 | ||
419 | #if wxUSE_STARTUP_TIPS | |
c50f1fb9 | 420 | void ShowTip(wxCommandEvent& event); |
13188def WS |
421 | #endif // wxUSE_STARTUP_TIPS |
422 | ||
423 | #if USE_MODAL_PRESENTATION | |
f6bcfd97 | 424 | void ModalDlg(wxCommandEvent& event); |
1baa0a9d | 425 | #endif // USE_MODAL_PRESENTATION |
4c45f240 | 426 | void ModelessDlg(wxCommandEvent& event); |
cae50e6b VZ |
427 | void DlgCenteredScreen(wxCommandEvent& event); |
428 | void DlgCenteredParent(wxCommandEvent& event); | |
1baa0a9d | 429 | void MiniFrame(wxCommandEvent& event); |
8e5dbcdd | 430 | void DlgOnTop(wxCommandEvent& event); |
13188def | 431 | |
761989ff | 432 | #if wxUSE_PROGRESSDLG |
abceee76 | 433 | void ShowProgress(wxCommandEvent& event); |
761989ff | 434 | #endif // wxUSE_PROGRESSDLG |
13188def | 435 | |
ca7adbf8 VZ |
436 | #if wxUSE_ABOUTDLG |
437 | void ShowSimpleAboutDialog(wxCommandEvent& event); | |
438 | void ShowFancyAboutDialog(wxCommandEvent& event); | |
453c9e3b VZ |
439 | void ShowFullAboutDialog(wxCommandEvent& event); |
440 | void ShowCustomAboutDialog(wxCommandEvent& event); | |
ca7adbf8 VZ |
441 | #endif // wxUSE_ABOUTDLG |
442 | ||
a62b0bcc VZ |
443 | #if wxUSE_BUSYINFO |
444 | void ShowBusyInfo(wxCommandEvent& event); | |
445 | #endif // wxUSE_BUSYINFO | |
13188def | 446 | |
761989ff VZ |
447 | #if wxUSE_FINDREPLDLG |
448 | void ShowFindDialog(wxCommandEvent& event); | |
449 | void ShowReplaceDialog(wxCommandEvent& event); | |
761989ff VZ |
450 | void OnFindDialog(wxFindDialogEvent& event); |
451 | #endif // wxUSE_FINDREPLDLG | |
457814b5 | 452 | |
13188def | 453 | #if USE_COLOURDLG_GENERIC |
329e86bf | 454 | void ChooseColourGeneric(wxCommandEvent& event); |
13188def WS |
455 | #endif // USE_COLOURDLG_GENERIC |
456 | ||
457 | #if USE_FONTDLG_GENERIC | |
329e86bf | 458 | void ChooseFontGeneric(wxCommandEvent& event); |
13188def | 459 | #endif // USE_FONTDLG_GENERIC |
c49245f8 | 460 | |
0f5d8ecf | 461 | void OnPropertySheet(wxCommandEvent& event); |
e36a1739 | 462 | |
29e3d1f9 | 463 | void OnRequestUserAttention(wxCommandEvent& event); |
e36a1739 VZ |
464 | #if wxUSE_NOTIFICATION_MESSAGE |
465 | void OnNotifMsgAuto(wxCommandEvent& event); | |
466 | void OnNotifMsgShow(wxCommandEvent& event); | |
467 | void OnNotifMsgHide(wxCommandEvent& event); | |
468 | #endif // wxUSE_NOTIFICATION_MESSAGE | |
469 | ||
e520c3f7 VZ |
470 | #if wxUSE_RICHTOOLTIP |
471 | void OnRichTipDialog(wxCommandEvent& event); | |
472 | #endif // wxUSE_RICHTOOLTIP | |
473 | ||
8e1dac82 | 474 | void OnStandardButtonsSizerDialog(wxCommandEvent& event); |
44b25eac | 475 | |
a625c5b6 | 476 | void OnTestDefaultActionDialog(wxCommandEvent& event); |
691745ab | 477 | void OnModalHook(wxCommandEvent& event); |
44b25eac | 478 | |
329e86bf | 479 | void OnExit(wxCommandEvent& event); |
c49245f8 | 480 | |
4c45f240 | 481 | private: |
13188def | 482 | #if wxUSE_DIRDLG |
f09c8393 | 483 | void DoDirChoose(int style); |
13188def | 484 | #endif // wxUSE_DIRDLG |
f09c8393 | 485 | |
13188def | 486 | #if USE_MODAL_PRESENTATION |
4c45f240 | 487 | MyModelessDialog *m_dialog; |
13188def | 488 | #endif // USE_MODAL_PRESENTATION |
4c45f240 | 489 | |
761989ff VZ |
490 | #if wxUSE_FINDREPLDLG |
491 | wxFindReplaceData m_findData; | |
14fca738 VZ |
492 | |
493 | wxFindReplaceDialog *m_dlgFind, | |
494 | *m_dlgReplace; | |
761989ff VZ |
495 | #endif // wxUSE_FINDREPLDLG |
496 | ||
e36a1739 VZ |
497 | #if wxUSE_NOTIFICATION_MESSAGE |
498 | wxNotificationMessage *m_notifMsg; | |
499 | #endif // wxUSE_NOTIFICATION_MESSAGE | |
500 | ||
d33dd9ef VS |
501 | wxColourData m_clrData; |
502 | ||
87a18679 VZ |
503 | // just a window which we use to show the effect of font/colours selection |
504 | wxWindow *m_canvas; | |
505 | ||
a92b5dfe | 506 | #if wxUSE_INFOBAR |
c0945eb2 VZ |
507 | void OnInfoBarRedo(wxCommandEvent& event); |
508 | ||
a92b5dfe VZ |
509 | wxInfoBar *m_infoBarSimple, |
510 | *m_infoBarAdvanced; | |
511 | #endif // wxUSE_INFOBAR | |
512 | ||
4c45f240 | 513 | DECLARE_EVENT_TABLE() |
457814b5 JS |
514 | }; |
515 | ||
516 | class MyCanvas: public wxScrolledWindow | |
517 | { | |
c49245f8 | 518 | public: |
87a18679 VZ |
519 | MyCanvas(wxWindow *parent) : wxScrolledWindow(parent, wxID_ANY) |
520 | { | |
3406ebd4 | 521 | SetForegroundColour(*wxBLACK); |
87a18679 | 522 | SetBackgroundColour(*wxWHITE); |
3406ebd4 | 523 | SetFont(*wxNORMAL_FONT); |
87a18679 | 524 | } |
c49245f8 | 525 | |
87a18679 | 526 | private: |
c49245f8 VZ |
527 | void OnPaint(wxPaintEvent& event); |
528 | ||
529 | DECLARE_EVENT_TABLE() | |
457814b5 JS |
530 | }; |
531 | ||
532 | ||
533 | // Menu IDs | |
a294c6d5 VZ |
534 | enum |
535 | { | |
13188def | 536 | DIALOGS_CHOOSE_COLOUR = wxID_HIGHEST, |
e6ef9ea4 | 537 | DIALOGS_GET_COLOUR, |
a294c6d5 VZ |
538 | DIALOGS_CHOOSE_COLOUR_GENERIC, |
539 | DIALOGS_CHOOSE_FONT, | |
540 | DIALOGS_CHOOSE_FONT_GENERIC, | |
541 | DIALOGS_MESSAGE_BOX, | |
86c3808c | 542 | DIALOGS_MESSAGE_BOX_WINDOW_MODAL, |
44b25eac | 543 | DIALOGS_MESSAGE_DIALOG, |
8cf304f8 | 544 | DIALOGS_MESSAGE_BOX_WXINFO, |
a1bdd4ab | 545 | DIALOGS_RICH_MESSAGE_DIALOG, |
a294c6d5 | 546 | DIALOGS_SINGLE_CHOICE, |
d6c9c1b7 | 547 | DIALOGS_MULTI_CHOICE, |
5a5f305a | 548 | DIALOGS_REARRANGE, |
50a2a355 | 549 | DIALOGS_LINE_ENTRY, |
a294c6d5 VZ |
550 | DIALOGS_TEXT_ENTRY, |
551 | DIALOGS_PASSWORD_ENTRY, | |
552 | DIALOGS_FILE_OPEN, | |
35b45b33 | 553 | DIALOGS_FILE_OPEN2, |
a294c6d5 VZ |
554 | DIALOGS_FILES_OPEN, |
555 | DIALOGS_FILE_SAVE, | |
695fe764 WS |
556 | DIALOGS_FILE_OPEN_GENERIC, |
557 | DIALOGS_FILES_OPEN_GENERIC, | |
558 | DIALOGS_FILE_SAVE_GENERIC, | |
a294c6d5 | 559 | DIALOGS_DIR_CHOOSE, |
f09c8393 | 560 | DIALOGS_DIRNEW_CHOOSE, |
51a58d8b | 561 | DIALOGS_GENERIC_DIR_CHOOSE, |
a294c6d5 VZ |
562 | DIALOGS_TIP, |
563 | DIALOGS_NUM_ENTRY, | |
4c45f240 | 564 | DIALOGS_LOG_DIALOG, |
a92b5dfe VZ |
565 | DIALOGS_INFOBAR_SIMPLE, |
566 | DIALOGS_INFOBAR_ADVANCED, | |
f6bcfd97 | 567 | DIALOGS_MODAL, |
4c45f240 | 568 | DIALOGS_MODELESS, |
cae50e6b VZ |
569 | DIALOGS_CENTRE_SCREEN, |
570 | DIALOGS_CENTRE_PARENT, | |
1baa0a9d | 571 | DIALOGS_MINIFRAME, |
8e5dbcdd | 572 | DIALOGS_ONTOP, |
abceee76 | 573 | DIALOGS_MODELESS_BTN, |
761989ff | 574 | DIALOGS_PROGRESS, |
ca7adbf8 VZ |
575 | DIALOGS_ABOUTDLG_SIMPLE, |
576 | DIALOGS_ABOUTDLG_FANCY, | |
453c9e3b VZ |
577 | DIALOGS_ABOUTDLG_FULL, |
578 | DIALOGS_ABOUTDLG_CUSTOM, | |
a62b0bcc | 579 | DIALOGS_BUSYINFO, |
761989ff | 580 | DIALOGS_FIND, |
29e3d1f9 | 581 | DIALOGS_REPLACE, |
0f5d8ecf | 582 | DIALOGS_REQUEST, |
e36a1739 VZ |
583 | DIALOGS_NOTIFY_AUTO, |
584 | DIALOGS_NOTIFY_SHOW, | |
585 | DIALOGS_NOTIFY_HIDE, | |
e520c3f7 | 586 | DIALOGS_RICHTIP_DIALOG, |
cc8bc5aa | 587 | DIALOGS_PROPERTY_SHEET, |
64d3ed17 | 588 | DIALOGS_PROPERTY_SHEET_TOOLBOOK, |
8e1dac82 | 589 | DIALOGS_PROPERTY_SHEET_BUTTONTOOLBOOK, |
a625c5b6 | 590 | DIALOGS_STANDARD_BUTTON_SIZER_DIALOG, |
691745ab VZ |
591 | DIALOGS_TEST_DEFAULT_ACTION, |
592 | DIALOGS_MODAL_HOOK | |
a294c6d5 | 593 | }; |
457814b5 JS |
594 | |
595 | #endif | |
596 |