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