]>
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: | |
9ad2fe62 | 118 | virtual bool OnInit(); |
457814b5 | 119 | |
9ad2fe62 VZ |
120 | protected: |
121 | #if wxUSE_LOG | |
122 | virtual wxAppTraits *CreateTraits() { return new MyAppTraits; } | |
123 | #endif // wxUSE_LOG | |
457814b5 JS |
124 | }; |
125 | ||
b4954d19 WS |
126 | #if USE_MODAL_PRESENTATION |
127 | ||
f6bcfd97 | 128 | // A custom modeless dialog |
4c45f240 VZ |
129 | class MyModelessDialog : public wxDialog |
130 | { | |
131 | public: | |
132 | MyModelessDialog(wxWindow *parent); | |
abceee76 | 133 | |
5d987909 | 134 | void OnButton(wxCommandEvent& event); |
abceee76 VZ |
135 | void OnClose(wxCloseEvent& event); |
136 | ||
137 | private: | |
138 | DECLARE_EVENT_TABLE() | |
4c45f240 VZ |
139 | }; |
140 | ||
f6bcfd97 BP |
141 | // A custom modal dialog |
142 | class MyModalDialog : public wxDialog | |
143 | { | |
144 | public: | |
145 | MyModalDialog(wxWindow *parent); | |
146 | ||
147 | void OnButton(wxCommandEvent& event); | |
148 | ||
149 | private: | |
5315ebfa VZ |
150 | wxButton *m_btnModal, |
151 | *m_btnModeless, | |
152 | *m_btnDelete; | |
f6bcfd97 BP |
153 | |
154 | DECLARE_EVENT_TABLE() | |
155 | }; | |
156 | ||
b4954d19 WS |
157 | #endif // USE_MODAL_PRESENTATION |
158 | ||
44b25eac | 159 | // A class demonstrating CreateStdDialogButtonSizer() |
8e1dac82 VZ |
160 | class StdButtonSizerDialog : public wxDialog |
161 | { | |
162 | public: | |
163 | StdButtonSizerDialog(wxWindow *parent); | |
164 | ||
165 | void OnEvent(wxCommandEvent& event); | |
166 | ||
167 | private: | |
168 | void EnableDisableControls(); | |
169 | ||
170 | wxCheckBox *m_chkboxAffirmativeButton; | |
171 | wxRadioButton *m_radiobtnOk, | |
172 | *m_radiobtnYes; | |
173 | ||
174 | wxCheckBox *m_chkboxDismissButton; | |
175 | wxRadioButton *m_radiobtnClose, | |
176 | *m_radiobtnCancel; | |
177 | ||
178 | wxCheckBox *m_chkboxApply, | |
179 | *m_chkboxNo, | |
180 | *m_chkboxHelp, | |
181 | *m_chkboxNoDefault; | |
182 | ||
183 | wxSizer *m_buttonsSizer; | |
184 | ||
185 | DECLARE_EVENT_TABLE() | |
186 | }; | |
187 | ||
44b25eac VZ |
188 | // Test harness for wxMessageDialog. |
189 | class TestMessageBoxDialog : public wxDialog | |
190 | { | |
191 | public: | |
192 | TestMessageBoxDialog(wxWindow *parent); | |
193 | ||
a1bdd4ab VZ |
194 | bool Create(); |
195 | ||
196 | protected: | |
197 | wxString GetMessage() { return m_textMsg->GetValue(); } | |
198 | long GetStyle(); | |
199 | ||
200 | void PrepareMessageDialog(wxMessageDialogBase &dlg); | |
201 | ||
202 | virtual void AddAdditionalTextOptions(wxSizer *WXUNUSED(sizer)) { } | |
203 | virtual void AddAdditionalFlags(wxSizer *WXUNUSED(sizer)) { } | |
204 | ||
44b25eac VZ |
205 | void OnApply(wxCommandEvent& event); |
206 | void OnClose(wxCommandEvent& event); | |
207 | void OnUpdateLabelUI(wxUpdateUIEvent& event); | |
4e2dc789 | 208 | void OnUpdateNoDefaultUI(wxUpdateUIEvent& event); |
44b25eac | 209 | |
a1bdd4ab | 210 | private: |
44b25eac VZ |
211 | enum |
212 | { | |
213 | Btn_Yes, | |
214 | Btn_No, | |
215 | Btn_Ok, | |
216 | Btn_Cancel, | |
217 | Btn_Max | |
218 | }; | |
219 | ||
220 | struct BtnInfo | |
221 | { | |
222 | int flag; | |
b3ca7c85 | 223 | const char *name; |
44b25eac VZ |
224 | }; |
225 | ||
b3ca7c85 | 226 | static const BtnInfo ms_btnInfo[Btn_Max]; |
44b25eac | 227 | |
8783d72f VZ |
228 | enum |
229 | { | |
230 | MsgDlgIcon_No, | |
231 | MsgDlgIcon_None, | |
232 | MsgDlgIcon_Info, | |
233 | MsgDlgIcon_Question, | |
234 | MsgDlgIcon_Warning, | |
235 | MsgDlgIcon_Error, | |
236 | MsgDlgIcon_Max | |
237 | }; | |
238 | ||
44b25eac VZ |
239 | wxTextCtrl *m_textMsg, |
240 | *m_textExtMsg; | |
241 | ||
242 | wxCheckBox *m_buttons[Btn_Max]; | |
243 | wxTextCtrl *m_labels[Btn_Max]; | |
244 | ||
245 | wxRadioBox *m_icons; | |
246 | ||
4e2dc789 VZ |
247 | wxCheckBox *m_chkNoDefault, |
248 | *m_chkCentre; | |
249 | ||
44b25eac | 250 | DECLARE_EVENT_TABLE() |
c0c133e1 | 251 | wxDECLARE_NO_COPY_CLASS(TestMessageBoxDialog); |
44b25eac VZ |
252 | }; |
253 | ||
a1bdd4ab VZ |
254 | #if wxUSE_RICHMSGDLG |
255 | class TestRichMessageDialog : public TestMessageBoxDialog | |
256 | { | |
257 | public: | |
258 | TestRichMessageDialog(wxWindow *parent); | |
259 | ||
260 | protected: | |
261 | // overrides method in base class | |
262 | virtual void AddAdditionalTextOptions(wxSizer *sizer); | |
263 | virtual void AddAdditionalFlags(wxSizer *sizer); | |
264 | ||
265 | void OnApply(wxCommandEvent& event); | |
266 | ||
267 | private: | |
268 | wxTextCtrl *m_textCheckBox; | |
269 | wxCheckBox *m_initialValueCheckBox; | |
270 | wxTextCtrl *m_textDetailed; | |
271 | ||
272 | DECLARE_EVENT_TABLE() | |
273 | }; | |
274 | #endif // wxUSE_RICHMSGDLG | |
275 | ||
a625c5b6 RR |
276 | class TestDefaultActionDialog: public wxDialog |
277 | { | |
278 | public: | |
279 | TestDefaultActionDialog( wxWindow *parent ); | |
44b25eac | 280 | |
a625c5b6 RR |
281 | void OnListBoxDClick(wxCommandEvent& event); |
282 | void OnCatchListBoxDClick(wxCommandEvent& event); | |
44b25eac | 283 | |
a625c5b6 RR |
284 | private: |
285 | bool m_catchListBoxDClick; | |
286 | ||
287 | private: | |
288 | DECLARE_EVENT_TABLE() | |
289 | }; | |
290 | ||
291 | ||
532d575b | 292 | #if USE_SETTINGS_DIALOG |
0f5d8ecf JS |
293 | // Property sheet dialog |
294 | class SettingsDialog: public wxPropertySheetDialog | |
295 | { | |
296 | DECLARE_CLASS(SettingsDialog) | |
297 | public: | |
64d3ed17 | 298 | SettingsDialog(wxWindow* parent, int dialogType); |
cc8bc5aa | 299 | ~SettingsDialog(); |
0f5d8ecf JS |
300 | |
301 | wxPanel* CreateGeneralSettingsPage(wxWindow* parent); | |
302 | wxPanel* CreateAestheticSettingsPage(wxWindow* parent); | |
303 | ||
304 | protected: | |
305 | ||
306 | enum { | |
307 | ID_SHOW_TOOLTIPS = 100, | |
308 | ID_AUTO_SAVE, | |
309 | ID_AUTO_SAVE_MINS, | |
310 | ID_LOAD_LAST_PROJECT, | |
311 | ||
312 | ID_APPLY_SETTINGS_TO, | |
313 | ID_BACKGROUND_STYLE, | |
314 | ID_FONT_SIZE | |
315 | }; | |
316 | ||
cc8bc5aa JS |
317 | wxImageList* m_imageList; |
318 | ||
0f5d8ecf JS |
319 | DECLARE_EVENT_TABLE() |
320 | }; | |
321 | ||
532d575b WS |
322 | #endif // USE_SETTINGS_DIALOG |
323 | ||
457814b5 JS |
324 | // Define a new frame type |
325 | class MyFrame: public wxFrame | |
c49245f8 VZ |
326 | { |
327 | public: | |
5b05ce47 | 328 | MyFrame(const wxString& title); |
e36a1739 | 329 | virtual ~MyFrame(); |
13188def | 330 | |
8cf304f8 | 331 | #if wxUSE_MSGDLG |
13188def | 332 | void MessageBox(wxCommandEvent& event); |
44b25eac | 333 | void MessageBoxDialog(wxCommandEvent& event); |
8cf304f8 | 334 | void MessageBoxInfo(wxCommandEvent& event); |
86c3808c SC |
335 | void MessageBoxWindowModal(wxCommandEvent& event); |
336 | void MessageBoxWindowModalClosed(wxWindowModalDialogEvent& event); | |
8cf304f8 | 337 | #endif // wxUSE_MSGDLG |
a1bdd4ab VZ |
338 | #if wxUSE_RICHMSGDLG |
339 | void RichMessageDialog(wxCommandEvent& event); | |
340 | #endif // wxUSE_RICHMSGDLG | |
457814b5 | 341 | |
13188def | 342 | #if wxUSE_COLOURDLG |
329e86bf | 343 | void ChooseColour(wxCommandEvent& event); |
e6ef9ea4 | 344 | void GetColour(wxCommandEvent& event); |
13188def WS |
345 | #endif // wxUSE_COLOURDLG |
346 | ||
347 | #if wxUSE_FONTDLG | |
329e86bf | 348 | void ChooseFont(wxCommandEvent& event); |
13188def WS |
349 | #endif // wxUSE_FONTDLG |
350 | ||
351 | #if wxUSE_LOG_DIALOG | |
d93c719a | 352 | void LogDialog(wxCommandEvent& event); |
13188def WS |
353 | #endif // wxUSE_LOG_DIALOG |
354 | ||
a92b5dfe VZ |
355 | #if wxUSE_INFOBAR |
356 | void InfoBarSimple(wxCommandEvent& event); | |
357 | void InfoBarAdvanced(wxCommandEvent& event); | |
358 | #endif // wxUSE_INFOBAR | |
359 | ||
13188def | 360 | #if wxUSE_CHOICEDLG |
457814b5 | 361 | void SingleChoice(wxCommandEvent& event); |
d6c9c1b7 | 362 | void MultiChoice(wxCommandEvent& event); |
13188def WS |
363 | #endif // wxUSE_CHOICEDLG |
364 | ||
5a5f305a VZ |
365 | void Rearrange(wxCommandEvent& event); |
366 | ||
13188def | 367 | #if wxUSE_TEXTDLG |
457814b5 | 368 | void TextEntry(wxCommandEvent& event); |
a294c6d5 | 369 | void PasswordEntry(wxCommandEvent& event); |
13188def WS |
370 | #endif // wxUSE_TEXTDLG |
371 | ||
372 | #if wxUSE_NUMBERDLG | |
c49245f8 | 373 | void NumericEntry(wxCommandEvent& event); |
13188def WS |
374 | #endif // wxUSE_NUMBERDLG |
375 | ||
376 | #if wxUSE_FILEDLG | |
457814b5 | 377 | void FileOpen(wxCommandEvent& event); |
35b45b33 | 378 | void FileOpen2(wxCommandEvent& event); |
c61f4f6d | 379 | void FilesOpen(wxCommandEvent& event); |
457814b5 | 380 | void FileSave(wxCommandEvent& event); |
13188def WS |
381 | #endif // wxUSE_FILEDLG |
382 | ||
695fe764 WS |
383 | #if USE_FILEDLG_GENERIC |
384 | void FileOpenGeneric(wxCommandEvent& event); | |
385 | void FilesOpenGeneric(wxCommandEvent& event); | |
386 | void FileSaveGeneric(wxCommandEvent& event); | |
387 | #endif // USE_FILEDLG_GENERIC | |
388 | ||
13188def | 389 | #if wxUSE_DIRDLG |
457814b5 | 390 | void DirChoose(wxCommandEvent& event); |
f09c8393 | 391 | void DirChooseNew(wxCommandEvent& event); |
13188def WS |
392 | #endif // wxUSE_DIRDLG |
393 | ||
394 | #if USE_DIRDLG_GENERIC | |
51a58d8b | 395 | void GenericDirChoose(wxCommandEvent& event); |
13188def WS |
396 | #endif // USE_DIRDLG_GENERIC |
397 | ||
398 | #if wxUSE_STARTUP_TIPS | |
c50f1fb9 | 399 | void ShowTip(wxCommandEvent& event); |
13188def WS |
400 | #endif // wxUSE_STARTUP_TIPS |
401 | ||
402 | #if USE_MODAL_PRESENTATION | |
f6bcfd97 | 403 | void ModalDlg(wxCommandEvent& event); |
1baa0a9d | 404 | #endif // USE_MODAL_PRESENTATION |
4c45f240 | 405 | void ModelessDlg(wxCommandEvent& event); |
cae50e6b VZ |
406 | void DlgCenteredScreen(wxCommandEvent& event); |
407 | void DlgCenteredParent(wxCommandEvent& event); | |
1baa0a9d | 408 | void MiniFrame(wxCommandEvent& event); |
8e5dbcdd | 409 | void DlgOnTop(wxCommandEvent& event); |
13188def | 410 | |
761989ff | 411 | #if wxUSE_PROGRESSDLG |
abceee76 | 412 | void ShowProgress(wxCommandEvent& event); |
761989ff | 413 | #endif // wxUSE_PROGRESSDLG |
13188def | 414 | |
ca7adbf8 VZ |
415 | #if wxUSE_ABOUTDLG |
416 | void ShowSimpleAboutDialog(wxCommandEvent& event); | |
417 | void ShowFancyAboutDialog(wxCommandEvent& event); | |
453c9e3b VZ |
418 | void ShowFullAboutDialog(wxCommandEvent& event); |
419 | void ShowCustomAboutDialog(wxCommandEvent& event); | |
ca7adbf8 VZ |
420 | #endif // wxUSE_ABOUTDLG |
421 | ||
a62b0bcc VZ |
422 | #if wxUSE_BUSYINFO |
423 | void ShowBusyInfo(wxCommandEvent& event); | |
424 | #endif // wxUSE_BUSYINFO | |
13188def | 425 | |
761989ff VZ |
426 | #if wxUSE_FINDREPLDLG |
427 | void ShowFindDialog(wxCommandEvent& event); | |
428 | void ShowReplaceDialog(wxCommandEvent& event); | |
761989ff VZ |
429 | void OnFindDialog(wxFindDialogEvent& event); |
430 | #endif // wxUSE_FINDREPLDLG | |
457814b5 | 431 | |
13188def | 432 | #if USE_COLOURDLG_GENERIC |
329e86bf | 433 | void ChooseColourGeneric(wxCommandEvent& event); |
13188def WS |
434 | #endif // USE_COLOURDLG_GENERIC |
435 | ||
436 | #if USE_FONTDLG_GENERIC | |
329e86bf | 437 | void ChooseFontGeneric(wxCommandEvent& event); |
13188def | 438 | #endif // USE_FONTDLG_GENERIC |
c49245f8 | 439 | |
0f5d8ecf | 440 | void OnPropertySheet(wxCommandEvent& event); |
e36a1739 | 441 | |
29e3d1f9 | 442 | void OnRequestUserAttention(wxCommandEvent& event); |
e36a1739 VZ |
443 | #if wxUSE_NOTIFICATION_MESSAGE |
444 | void OnNotifMsgAuto(wxCommandEvent& event); | |
445 | void OnNotifMsgShow(wxCommandEvent& event); | |
446 | void OnNotifMsgHide(wxCommandEvent& event); | |
447 | #endif // wxUSE_NOTIFICATION_MESSAGE | |
448 | ||
8e1dac82 | 449 | void OnStandardButtonsSizerDialog(wxCommandEvent& event); |
44b25eac | 450 | |
a625c5b6 | 451 | void OnTestDefaultActionDialog(wxCommandEvent& event); |
44b25eac | 452 | |
329e86bf | 453 | void OnExit(wxCommandEvent& event); |
c49245f8 | 454 | |
4c45f240 | 455 | private: |
13188def | 456 | #if wxUSE_DIRDLG |
f09c8393 | 457 | void DoDirChoose(int style); |
13188def | 458 | #endif // wxUSE_DIRDLG |
f09c8393 | 459 | |
13188def | 460 | #if USE_MODAL_PRESENTATION |
4c45f240 | 461 | MyModelessDialog *m_dialog; |
13188def | 462 | #endif // USE_MODAL_PRESENTATION |
4c45f240 | 463 | |
761989ff VZ |
464 | #if wxUSE_FINDREPLDLG |
465 | wxFindReplaceData m_findData; | |
14fca738 VZ |
466 | |
467 | wxFindReplaceDialog *m_dlgFind, | |
468 | *m_dlgReplace; | |
761989ff VZ |
469 | #endif // wxUSE_FINDREPLDLG |
470 | ||
e36a1739 VZ |
471 | #if wxUSE_NOTIFICATION_MESSAGE |
472 | wxNotificationMessage *m_notifMsg; | |
473 | #endif // wxUSE_NOTIFICATION_MESSAGE | |
474 | ||
d33dd9ef VS |
475 | wxColourData m_clrData; |
476 | ||
87a18679 VZ |
477 | // just a window which we use to show the effect of font/colours selection |
478 | wxWindow *m_canvas; | |
479 | ||
a92b5dfe | 480 | #if wxUSE_INFOBAR |
c0945eb2 VZ |
481 | void OnInfoBarRedo(wxCommandEvent& event); |
482 | ||
a92b5dfe VZ |
483 | wxInfoBar *m_infoBarSimple, |
484 | *m_infoBarAdvanced; | |
485 | #endif // wxUSE_INFOBAR | |
486 | ||
4c45f240 | 487 | DECLARE_EVENT_TABLE() |
457814b5 JS |
488 | }; |
489 | ||
490 | class MyCanvas: public wxScrolledWindow | |
491 | { | |
c49245f8 | 492 | public: |
87a18679 VZ |
493 | MyCanvas(wxWindow *parent) : wxScrolledWindow(parent, wxID_ANY) |
494 | { | |
3406ebd4 | 495 | SetForegroundColour(*wxBLACK); |
87a18679 | 496 | SetBackgroundColour(*wxWHITE); |
3406ebd4 | 497 | SetFont(*wxNORMAL_FONT); |
87a18679 | 498 | } |
c49245f8 | 499 | |
87a18679 | 500 | private: |
c49245f8 VZ |
501 | void OnPaint(wxPaintEvent& event); |
502 | ||
503 | DECLARE_EVENT_TABLE() | |
457814b5 JS |
504 | }; |
505 | ||
506 | ||
507 | // Menu IDs | |
a294c6d5 VZ |
508 | enum |
509 | { | |
13188def | 510 | DIALOGS_CHOOSE_COLOUR = wxID_HIGHEST, |
e6ef9ea4 | 511 | DIALOGS_GET_COLOUR, |
a294c6d5 VZ |
512 | DIALOGS_CHOOSE_COLOUR_GENERIC, |
513 | DIALOGS_CHOOSE_FONT, | |
514 | DIALOGS_CHOOSE_FONT_GENERIC, | |
515 | DIALOGS_MESSAGE_BOX, | |
86c3808c | 516 | DIALOGS_MESSAGE_BOX_WINDOW_MODAL, |
44b25eac | 517 | DIALOGS_MESSAGE_DIALOG, |
8cf304f8 | 518 | DIALOGS_MESSAGE_BOX_WXINFO, |
a1bdd4ab | 519 | DIALOGS_RICH_MESSAGE_DIALOG, |
a294c6d5 | 520 | DIALOGS_SINGLE_CHOICE, |
d6c9c1b7 | 521 | DIALOGS_MULTI_CHOICE, |
5a5f305a | 522 | DIALOGS_REARRANGE, |
a294c6d5 VZ |
523 | DIALOGS_TEXT_ENTRY, |
524 | DIALOGS_PASSWORD_ENTRY, | |
525 | DIALOGS_FILE_OPEN, | |
35b45b33 | 526 | DIALOGS_FILE_OPEN2, |
a294c6d5 VZ |
527 | DIALOGS_FILES_OPEN, |
528 | DIALOGS_FILE_SAVE, | |
695fe764 WS |
529 | DIALOGS_FILE_OPEN_GENERIC, |
530 | DIALOGS_FILES_OPEN_GENERIC, | |
531 | DIALOGS_FILE_SAVE_GENERIC, | |
a294c6d5 | 532 | DIALOGS_DIR_CHOOSE, |
f09c8393 | 533 | DIALOGS_DIRNEW_CHOOSE, |
51a58d8b | 534 | DIALOGS_GENERIC_DIR_CHOOSE, |
a294c6d5 VZ |
535 | DIALOGS_TIP, |
536 | DIALOGS_NUM_ENTRY, | |
4c45f240 | 537 | DIALOGS_LOG_DIALOG, |
a92b5dfe VZ |
538 | DIALOGS_INFOBAR_SIMPLE, |
539 | DIALOGS_INFOBAR_ADVANCED, | |
f6bcfd97 | 540 | DIALOGS_MODAL, |
4c45f240 | 541 | DIALOGS_MODELESS, |
cae50e6b VZ |
542 | DIALOGS_CENTRE_SCREEN, |
543 | DIALOGS_CENTRE_PARENT, | |
1baa0a9d | 544 | DIALOGS_MINIFRAME, |
8e5dbcdd | 545 | DIALOGS_ONTOP, |
abceee76 | 546 | DIALOGS_MODELESS_BTN, |
761989ff | 547 | DIALOGS_PROGRESS, |
ca7adbf8 VZ |
548 | DIALOGS_ABOUTDLG_SIMPLE, |
549 | DIALOGS_ABOUTDLG_FANCY, | |
453c9e3b VZ |
550 | DIALOGS_ABOUTDLG_FULL, |
551 | DIALOGS_ABOUTDLG_CUSTOM, | |
a62b0bcc | 552 | DIALOGS_BUSYINFO, |
761989ff | 553 | DIALOGS_FIND, |
29e3d1f9 | 554 | DIALOGS_REPLACE, |
0f5d8ecf | 555 | DIALOGS_REQUEST, |
e36a1739 VZ |
556 | DIALOGS_NOTIFY_AUTO, |
557 | DIALOGS_NOTIFY_SHOW, | |
558 | DIALOGS_NOTIFY_HIDE, | |
cc8bc5aa | 559 | DIALOGS_PROPERTY_SHEET, |
64d3ed17 | 560 | DIALOGS_PROPERTY_SHEET_TOOLBOOK, |
8e1dac82 | 561 | DIALOGS_PROPERTY_SHEET_BUTTONTOOLBOOK, |
a625c5b6 RR |
562 | DIALOGS_STANDARD_BUTTON_SIZER_DIALOG, |
563 | DIALOGS_TEST_DEFAULT_ACTION | |
a294c6d5 | 564 | }; |
457814b5 JS |
565 | |
566 | #endif | |
567 |