]> git.saurik.com Git - wxWidgets.git/blob - include/wx/chkconf.h
fixed wxDropFilesEvent dtor, added copy ctor and implemented Clone() for it
[wxWidgets.git] / include / wx / chkconf.h
1 /*
2 * Name: wx/chkconf.h
3 * Purpose: check the config settings for consistency
4 * Author: Vadim Zeitlin
5 * Modified by:
6 * Created: 09.08.00
7 * RCS-ID: $Id$
8 * Copyright: (c) 2000 Vadim Zeitlin <vadim@wxwindows.org>
9 * Licence: wxWindows license
10 */
11
12 /* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
13
14 /*
15 this global setting determintes what should we do if the setting FOO
16 requires BAR and BAR is not set: we can either silently define BAR
17 (default, recommended) or give an error and abort (mainly useful for
18 developpers only)
19 */
20 #define wxABORT_ON_CONFIG_ERROR
21
22 /*
23 all these tests are for GUI onlu
24 */
25 #if wxUSE_GUI
26
27 /*
28 all of the settings tested below must be defined or we'd get an error from
29 preprocessor about invalid integer expression
30 */
31
32 #ifndef wxUSE_ACCEL
33 # ifdef wxABORT_ON_CONFIG_ERROR
34 # error "wxUSE_ACCEL must be defined."
35 # else
36 # define wxUSE_ACCEL 0
37 # endif
38 #endif /* !defined(wxUSE_ACCEL) */
39
40 #ifndef wxUSE_BMPBUTTON
41 # ifdef wxABORT_ON_CONFIG_ERROR
42 # error "wxUSE_BMPBUTTON must be defined."
43 # else
44 # define wxUSE_BMPBUTTON 0
45 # endif
46 #endif /* !defined(wxUSE_BMPBUTTON) */
47
48 #ifndef wxUSE_BUTTON
49 # ifdef wxABORT_ON_CONFIG_ERROR
50 # error "wxUSE_BUTTON must be defined."
51 # else
52 # define wxUSE_BUTTON 0
53 # endif
54 #endif /* !defined(wxUSE_BUTTON) */
55
56 #ifndef wxUSE_CALENDARCTRL
57 # ifdef wxABORT_ON_CONFIG_ERROR
58 # error "wxUSE_CALENDARCTRL must be defined."
59 # else
60 # define wxUSE_CALENDARCTRL 0
61 # endif
62 #endif /* !defined(wxUSE_CALENDARCTRL) */
63
64 #ifndef wxUSE_CARET
65 # ifdef wxABORT_ON_CONFIG_ERROR
66 # error "wxUSE_CARET must be defined."
67 # else
68 # define wxUSE_CARET 0
69 # endif
70 #endif /* !defined(wxUSE_CARET) */
71
72 #ifndef wxUSE_CHECKBOX
73 # ifdef wxABORT_ON_CONFIG_ERROR
74 # error "wxUSE_CHECKBOX must be defined."
75 # else
76 # define wxUSE_CHECKBOX 0
77 # endif
78 #endif /* !defined(wxUSE_CHECKBOX) */
79
80 #ifndef wxUSE_CHECKLISTBOX
81 # ifdef wxABORT_ON_CONFIG_ERROR
82 # error "wxUSE_CHECKLISTBOX must be defined."
83 # else
84 # define wxUSE_CHECKLISTBOX 0
85 # endif
86 #endif /* !defined(wxUSE_CHECKLISTBOX) */
87
88 #ifndef wxUSE_CHOICE
89 # ifdef wxABORT_ON_CONFIG_ERROR
90 # error "wxUSE_CHOICE must be defined."
91 # else
92 # define wxUSE_CHOICE 0
93 # endif
94 #endif /* !defined(wxUSE_CHOICE) */
95
96 #ifndef wxUSE_CHOICEDLG
97 # ifdef wxABORT_ON_CONFIG_ERROR
98 # error "wxUSE_CHOICEDLG must be defined."
99 # else
100 # define wxUSE_CHOICEDLG 0
101 # endif
102 #endif /* !defined(wxUSE_CHOICEDLG) */
103
104 #ifndef wxUSE_CLIPBOARD
105 # ifdef wxABORT_ON_CONFIG_ERROR
106 # error "wxUSE_CLIPBOARD must be defined."
107 # else
108 # define wxUSE_CLIPBOARD 0
109 # endif
110 #endif /* !defined(wxUSE_CLIPBOARD) */
111
112 #ifndef wxUSE_COLOURDLG
113 # ifdef wxABORT_ON_CONFIG_ERROR
114 # error "wxUSE_COLOURDLG must be defined."
115 # else
116 # define wxUSE_COLOURDLG 0
117 # endif
118 #endif /* !defined(wxUSE_COLOURDLG) */
119
120 #ifndef wxUSE_COMBOBOX
121 # ifdef wxABORT_ON_CONFIG_ERROR
122 # error "wxUSE_COMBOBOX must be defined."
123 # else
124 # define wxUSE_COMBOBOX 0
125 # endif
126 #endif /* !defined(wxUSE_COMBOBOX) */
127
128 #ifndef wxUSE_DATAOBJ
129 # ifdef wxABORT_ON_CONFIG_ERROR
130 # error "wxUSE_DATAOBJ must be defined."
131 # else
132 # define wxUSE_DATAOBJ 0
133 # endif
134 #endif /* !defined(wxUSE_DATAOBJ) */
135
136 #ifndef wxUSE_DOC_VIEW_ARCHITECTURE
137 # ifdef wxABORT_ON_CONFIG_ERROR
138 # error "wxUSE_DOC_VIEW_ARCHITECTURE must be defined."
139 # else
140 # define wxUSE_DOC_VIEW_ARCHITECTURE 0
141 # endif
142 #endif /* !defined(wxUSE_DOC_VIEW_ARCHITECTURE) */
143
144 #ifndef wxUSE_FILEDLG
145 # ifdef wxABORT_ON_CONFIG_ERROR
146 # error "wxUSE_FILEDLG must be defined."
147 # else
148 # define wxUSE_FILEDLG 0
149 # endif
150 #endif /* !defined(wxUSE_FILEDLG) */
151
152 #ifndef wxUSE_FONTDLG
153 # ifdef wxABORT_ON_CONFIG_ERROR
154 # error "wxUSE_FONTDLG must be defined."
155 # else
156 # define wxUSE_FONTDLG 0
157 # endif
158 #endif /* !defined(wxUSE_FONTDLG) */
159
160 #ifndef wxUSE_FONTMAP
161 # ifdef wxABORT_ON_CONFIG_ERROR
162 # error "wxUSE_FONTMAP must be defined."
163 # else
164 # define wxUSE_FONTMAP 0
165 # endif
166 #endif /* !defined(wxUSE_FONTMAP) */
167
168 #ifndef wxUSE_GAUGE
169 # ifdef wxABORT_ON_CONFIG_ERROR
170 # error "wxUSE_GAUGE must be defined."
171 # else
172 # define wxUSE_GAUGE 0
173 # endif
174 #endif /* !defined(wxUSE_GAUGE) */
175
176 #ifndef wxUSE_GRID
177 # ifdef wxABORT_ON_CONFIG_ERROR
178 # error "wxUSE_GRID must be defined."
179 # else
180 # define wxUSE_GRID 0
181 # endif
182 #endif /* !defined(wxUSE_GRID) */
183
184 #ifndef wxUSE_HELP
185 # ifdef wxABORT_ON_CONFIG_ERROR
186 # error "wxUSE_HELP must be defined."
187 # else
188 # define wxUSE_HELP 0
189 # endif
190 #endif /* !defined(wxUSE_HELP) */
191
192 #ifndef wxUSE_HTML
193 # ifdef wxABORT_ON_CONFIG_ERROR
194 # error "wxUSE_HTML must be defined."
195 # else
196 # define wxUSE_HTML 0
197 # endif
198 #endif /* !defined(wxUSE_HTML) */
199
200 #ifndef wxUSE_IMAGLIST
201 # ifdef wxABORT_ON_CONFIG_ERROR
202 # error "wxUSE_IMAGLIST must be defined."
203 # else
204 # define wxUSE_IMAGLIST 0
205 # endif
206 #endif /* !defined(wxUSE_IMAGLIST) */
207
208 #ifndef wxUSE_JOYSTICK
209 # ifdef wxABORT_ON_CONFIG_ERROR
210 # error "wxUSE_JOYSTICK must be defined."
211 # else
212 # define wxUSE_JOYSTICK 0
213 # endif
214 #endif /* !defined(wxUSE_JOYSTICK) */
215
216 #ifndef wxUSE_LISTBOX
217 # ifdef wxABORT_ON_CONFIG_ERROR
218 # error "wxUSE_LISTBOX must be defined."
219 # else
220 # define wxUSE_LISTBOX 0
221 # endif
222 #endif /* !defined(wxUSE_LISTBOX) */
223
224 #ifndef wxUSE_LISTCTRL
225 # ifdef wxABORT_ON_CONFIG_ERROR
226 # error "wxUSE_LISTCTRL must be defined."
227 # else
228 # define wxUSE_LISTCTRL 0
229 # endif
230 #endif /* !defined(wxUSE_LISTCTRL) */
231
232 #ifndef wxUSE_LOG
233 # ifdef wxABORT_ON_CONFIG_ERROR
234 # error "wxUSE_LOG must be defined."
235 # else
236 # define wxUSE_LOG 0
237 # endif
238 #endif /* !defined(wxUSE_LOG) */
239
240 #ifndef wxUSE_LOGGUI
241 # ifdef wxABORT_ON_CONFIG_ERROR
242 # error "wxUSE_LOGGUI must be defined."
243 # else
244 # define wxUSE_LOGGUI 0
245 # endif
246 #endif /* !defined(wxUSE_LOGGUI) */
247
248 #ifndef wxUSE_LOGWINDOW
249 # ifdef wxABORT_ON_CONFIG_ERROR
250 # error "wxUSE_LOGWINDOW must be defined."
251 # else
252 # define wxUSE_LOGWINDOW 0
253 # endif
254 #endif /* !defined(wxUSE_LOGWINDOW) */
255
256 #ifndef wxUSE_LOG_DIALOG
257 # ifdef wxABORT_ON_CONFIG_ERROR
258 # error "wxUSE_LOG_DIALOG must be defined."
259 # else
260 # define wxUSE_LOG_DIALOG 0
261 # endif
262 #endif /* !defined(wxUSE_LOG_DIALOG) */
263
264 #ifndef wxUSE_MDI_ARCHITECTURE
265 # ifdef wxABORT_ON_CONFIG_ERROR
266 # error "wxUSE_MDI_ARCHITECTURE must be defined."
267 # else
268 # define wxUSE_MDI_ARCHITECTURE 0
269 # endif
270 #endif /* !defined(wxUSE_MDI_ARCHITECTURE) */
271
272 #ifndef wxUSE_MENUS
273 # ifdef wxABORT_ON_CONFIG_ERROR
274 # error "wxUSE_MENUS must be defined."
275 # else
276 # define wxUSE_MENUS 0
277 # endif
278 #endif /* !defined(wxUSE_MENUS) */
279
280 #ifndef wxUSE_MIMETYPE
281 # ifdef wxABORT_ON_CONFIG_ERROR
282 # error "wxUSE_MIMETYPE must be defined."
283 # else
284 # define wxUSE_MIMETYPE 0
285 # endif
286 #endif /* !defined(wxUSE_MIMETYPE) */
287
288 #ifndef wxUSE_MSGDLG
289 # ifdef wxABORT_ON_CONFIG_ERROR
290 # error "wxUSE_MSGDLG must be defined."
291 # else
292 # define wxUSE_MSGDLG 0
293 # endif
294 #endif /* !defined(wxUSE_MSGDLG) */
295
296 #ifndef wxUSE_NEW_GRID
297 # ifdef wxABORT_ON_CONFIG_ERROR
298 # error "wxUSE_NEW_GRID must be defined."
299 # else
300 # define wxUSE_NEW_GRID 0
301 # endif
302 #endif /* !defined(wxUSE_NEW_GRID) */
303
304 #ifndef wxUSE_NOTEBOOK
305 # ifdef wxABORT_ON_CONFIG_ERROR
306 # error "wxUSE_NOTEBOOK must be defined."
307 # else
308 # define wxUSE_NOTEBOOK 0
309 # endif
310 #endif /* !defined(wxUSE_NOTEBOOK) */
311
312 #ifndef wxUSE_PALETTE
313 # ifdef wxABORT_ON_CONFIG_ERROR
314 # error "wxUSE_PALETTE must be defined."
315 # else
316 # define wxUSE_PALETTE 0
317 # endif
318 #endif /* !defined(wxUSE_PALETTE) */
319
320 #ifndef wxUSE_POPUPWIN
321 # ifdef wxABORT_ON_CONFIG_ERROR
322 # error "wxUSE_POPUPWIN must be defined."
323 # else
324 # define wxUSE_POPUPWIN 0
325 # endif
326 #endif /* !defined(wxUSE_POPUPWIN) */
327
328 #ifndef wxUSE_PRINTING_ARCHITECTURE
329 # ifdef wxABORT_ON_CONFIG_ERROR
330 # error "wxUSE_PRINTING_ARCHITECTURE must be defined."
331 # else
332 # define wxUSE_PRINTING_ARCHITECTURE 0
333 # endif
334 #endif /* !defined(wxUSE_PRINTING_ARCHITECTURE) */
335
336 #ifndef wxUSE_RADIOBOX
337 # ifdef wxABORT_ON_CONFIG_ERROR
338 # error "wxUSE_RADIOBOX must be defined."
339 # else
340 # define wxUSE_RADIOBOX 0
341 # endif
342 #endif /* !defined(wxUSE_RADIOBOX) */
343
344 #ifndef wxUSE_RADIOBTN
345 # ifdef wxABORT_ON_CONFIG_ERROR
346 # error "wxUSE_RADIOBTN must be defined."
347 # else
348 # define wxUSE_RADIOBTN 0
349 # endif
350 #endif /* !defined(wxUSE_RADIOBTN) */
351
352 #ifndef wxUSE_REGEX
353 # ifdef wxABORT_ON_CONFIG_ERROR
354 # error "wxUSE_REGEX must be defined."
355 # else
356 # define wxUSE_REGEX 0
357 # endif
358 #endif /* !defined(wxUSE_REGEX) */
359
360 #ifndef wxUSE_SASH
361 # ifdef wxABORT_ON_CONFIG_ERROR
362 # error "wxUSE_SASH must be defined."
363 # else
364 # define wxUSE_SASH 0
365 # endif
366 #endif /* !defined(wxUSE_SASH) */
367
368 #ifndef wxUSE_SCROLLBAR
369 # ifdef wxABORT_ON_CONFIG_ERROR
370 # error "wxUSE_SCROLLBAR must be defined."
371 # else
372 # define wxUSE_SCROLLBAR 0
373 # endif
374 #endif /* !defined(wxUSE_SCROLLBAR) */
375
376 #ifndef wxUSE_SLIDER
377 # ifdef wxABORT_ON_CONFIG_ERROR
378 # error "wxUSE_SLIDER must be defined."
379 # else
380 # define wxUSE_SLIDER 0
381 # endif
382 #endif /* !defined(wxUSE_SLIDER) */
383
384 #ifndef wxUSE_SPINBTN
385 # ifdef wxABORT_ON_CONFIG_ERROR
386 # error "wxUSE_SPINBTN must be defined."
387 # else
388 # define wxUSE_SPINBTN 0
389 # endif
390 #endif /* !defined(wxUSE_SPINBTN) */
391
392 #ifndef wxUSE_SPINCTRL
393 # ifdef wxABORT_ON_CONFIG_ERROR
394 # error "wxUSE_SPINCTRL must be defined."
395 # else
396 # define wxUSE_SPINCTRL 0
397 # endif
398 #endif /* !defined(wxUSE_SPINCTRL) */
399
400 #ifndef wxUSE_SPLASH
401 # ifdef wxABORT_ON_CONFIG_ERROR
402 # error "wxUSE_SPLASH must be defined."
403 # else
404 # define wxUSE_SPLASH 0
405 # endif
406 #endif /* !defined(wxUSE_SPLASH) */
407
408 #ifndef wxUSE_SPLITTER
409 # ifdef wxABORT_ON_CONFIG_ERROR
410 # error "wxUSE_SPLITTER must be defined."
411 # else
412 # define wxUSE_SPLITTER 0
413 # endif
414 #endif /* !defined(wxUSE_SPLITTER) */
415
416 #ifndef wxUSE_STATBMP
417 # ifdef wxABORT_ON_CONFIG_ERROR
418 # error "wxUSE_STATBMP must be defined."
419 # else
420 # define wxUSE_STATBMP 0
421 # endif
422 #endif /* !defined(wxUSE_STATBMP) */
423
424 #ifndef wxUSE_STATBOX
425 # ifdef wxABORT_ON_CONFIG_ERROR
426 # error "wxUSE_STATBOX must be defined."
427 # else
428 # define wxUSE_STATBOX 0
429 # endif
430 #endif /* !defined(wxUSE_STATBOX) */
431
432 #ifndef wxUSE_STATLINE
433 # ifdef wxABORT_ON_CONFIG_ERROR
434 # error "wxUSE_STATLINE must be defined."
435 # else
436 # define wxUSE_STATLINE 0
437 # endif
438 #endif /* !defined(wxUSE_STATLINE) */
439
440 #ifndef wxUSE_STATTEXT
441 # ifdef wxABORT_ON_CONFIG_ERROR
442 # error "wxUSE_STATTEXT must be defined."
443 # else
444 # define wxUSE_STATTEXT 0
445 # endif
446 #endif /* !defined(wxUSE_STATTEXT) */
447
448 #ifndef wxUSE_STATUSBAR
449 # ifdef wxABORT_ON_CONFIG_ERROR
450 # error "wxUSE_STATUSBAR must be defined."
451 # else
452 # define wxUSE_STATUSBAR 0
453 # endif
454 #endif /* !defined(wxUSE_STATUSBAR) */
455
456 #ifndef wxUSE_STOPWATCH
457 # ifdef wxABORT_ON_CONFIG_ERROR
458 # error "wxUSE_STOPWATCH must be defined."
459 # else
460 # define wxUSE_STOPWATCH 0
461 # endif
462 #endif /* !defined(wxUSE_STOPWATCH) */
463
464 #ifndef wxUSE_TAB_DIALOG
465 # ifdef wxABORT_ON_CONFIG_ERROR
466 # error "wxUSE_TAB_DIALOG must be defined."
467 # else
468 # define wxUSE_TAB_DIALOG 0
469 # endif
470 #endif /* !defined(wxUSE_TAB_DIALOG) */
471
472 #ifndef wxUSE_TEXTBUFFER
473 # ifdef wxABORT_ON_CONFIG_ERROR
474 # error "wxUSE_TEXTBUFFER must be defined."
475 # else
476 # define wxUSE_TEXTBUFFER 0
477 # endif
478 #endif /* !defined(wxUSE_TEXTBUFFER) */
479
480 #ifndef wxUSE_TEXTCTRL
481 # ifdef wxABORT_ON_CONFIG_ERROR
482 # error "wxUSE_TEXTCTRL must be defined."
483 # else
484 # define wxUSE_TEXTCTRL 0
485 # endif
486 #endif /* !defined(wxUSE_TEXTCTRL) */
487
488 #ifndef wxUSE_TEXTFILE
489 # ifdef wxABORT_ON_CONFIG_ERROR
490 # error "wxUSE_TEXTFILE must be defined."
491 # else
492 # define wxUSE_TEXTFILE 0
493 # endif
494 #endif /* !defined(wxUSE_TEXTFILE) */
495
496 #ifndef wxUSE_TOOLBAR
497 # ifdef wxABORT_ON_CONFIG_ERROR
498 # error "wxUSE_TOOLBAR must be defined."
499 # else
500 # define wxUSE_TOOLBAR 0
501 # endif
502 #endif /* !defined(wxUSE_TOOLBAR) */
503
504 #ifndef wxUSE_TOOLTIPS
505 # ifdef wxABORT_ON_CONFIG_ERROR
506 # error "wxUSE_TOOLTIPS must be defined."
507 # else
508 # define wxUSE_TOOLTIPS 0
509 # endif
510 #endif /* !defined(wxUSE_TOOLTIPS) */
511
512 #ifndef wxUSE_TREECTRL
513 # ifdef wxABORT_ON_CONFIG_ERROR
514 # error "wxUSE_TREECTRL must be defined."
515 # else
516 # define wxUSE_TREECTRL 0
517 # endif
518 #endif /* !defined(wxUSE_TREECTRL) */
519
520 #ifndef wxUSE_WXHTML_HELP
521 # ifdef wxABORT_ON_CONFIG_ERROR
522 # error "wxUSE_WXHTML_HELP must be defined."
523 # else
524 # define wxUSE_WXHTML_HELP 0
525 # endif
526 #endif /* !defined(wxUSE_WXHTML_HELP) */
527
528 /*
529 check consistency of the settings
530 */
531 #if wxUSE_BUTTON || \
532 wxUSE_CALENDARCTRL || \
533 wxUSE_CARET || \
534 wxUSE_COMBOBOX || \
535 wxUSE_BMPBUTTON || \
536 wxUSE_CHECKBOX || \
537 wxUSE_CHECKLISTBOX || \
538 wxUSE_CHOICE || \
539 wxUSE_GAUGE || \
540 wxUSE_GRID || \
541 wxUSE_NEW_GRID || \
542 wxUSE_LISTBOX || \
543 wxUSE_LISTCTRL || \
544 wxUSE_NOTEBOOK || \
545 wxUSE_RADIOBOX || \
546 wxUSE_RADIOBTN || \
547 wxUSE_SCROLLBAR || \
548 wxUSE_SLIDER || \
549 wxUSE_SPINBTN || \
550 wxUSE_SPINCTRL || \
551 wxUSE_STATBMP || \
552 wxUSE_STATBOX || \
553 wxUSE_STATLINE || \
554 wxUSE_STATTEXT || \
555 wxUSE_STATUSBAR || \
556 wxUSE_TEXTCTRL || \
557 wxUSE_TOOLBAR || \
558 wxUSE_TREECTRL
559 # if !wxUSE_CONTROLS
560 # ifdef wxABORT_ON_CONFIG_ERROR
561 # error "wxUSE_CONTROLS unset but some controls used"
562 # else
563 # undef wxUSE_CONTROLS
564 # define wxUSE_CONTROLS 1
565 # endif
566 # endif
567 #endif /* controls */
568
569 /* wxUniv-specific dependencies */
570 #if defined(__WXUNIVERSAL__)
571 # if (wxUSE_COMBOBOX || wxUSE_MENUS) && !wxUSE_POPUPWIN
572 # ifdef wxABORT_ON_CONFIG_ERROR
573 # error "wxUSE_POPUPWIN must be defined to use comboboxes/menus"
574 # else
575 # undef wxUSE_POPUPWIN
576 # define wxUSE_POPUPWIN 1
577 # endif
578 # endif
579
580 # if wxUSE_COMBOBOX
581 # if !wxUSE_LISTBOX
582 # ifdef wxABORT_ON_CONFIG_ERROR
583 # error "wxComboBox requires wxListBox in wxUniversal"
584 # else
585 # undef wxUSE_LISTBOX
586 # define wxUSE_LISTBOX 1
587 # endif
588 # endif
589 # endif /* wxUSE_COMBOBOX */
590
591 # if wxUSE_RADIOBTN
592 # if !wxUSE_CHECKBOX
593 # ifdef wxABORT_ON_CONFIG_ERROR
594 # error "wxUSE_RADIOBTN requires wxUSE_CHECKBOX in wxUniversal"
595 # else
596 # undef wxUSE_CHECKBOX
597 # define wxUSE_CHECKBOX 1
598 # endif
599 # endif
600 # endif /* wxUSE_RADIOBTN */
601
602 # if wxUSE_TEXTCTRL
603 # if !wxUSE_CARET
604 # ifdef wxABORT_ON_CONFIG_ERROR
605 # error "wxTextCtrl requires wxCaret in wxUniversal"
606 # else
607 # undef wxUSE_CARET
608 # define wxUSE_CARET 1
609 # endif
610 # endif /* wxUSE_CARET */
611
612 # if !wxUSE_SCROLLBAR
613 # ifdef wxABORT_ON_CONFIG_ERROR
614 # error "wxTextCtrl requires wxScrollBar in wxUniversal"
615 # else
616 # undef wxUSE_SCROLLBAR
617 # define wxUSE_SCROLLBAR 1
618 # endif
619 # endif /* wxUSE_SCROLLBAR */
620 # endif /* wxUSE_TEXTCTRL */
621 #endif /* __WXUNIVERSAL__ */
622
623 /* wxGTK-specific dependencies */
624 #ifdef __WXGTK__
625 # ifndef __WXUNIVERSAL__
626 # if wxUSE_MDI_ARCHITECTURE && !wxUSE_MENUS
627 # ifdef wxABORT_ON_CONFIG_ERROR
628 # error "MDI requires wxUSE_MENUS in wxGTK"
629 # else
630 # undef wxUSE_MENUS
631 # define wxUSE_MENUS 1
632 # endif
633 # endif
634 # endif /* !__WXUNIVERSAL__ */
635
636 # if wxUSE_JOYSTICK
637 # if !wxUSE_THREADS
638 # ifdef wxABORT_ON_CONFIG_ERROR
639 # error "wxJoystick requires threads in wxGTK"
640 # else
641 # undef wxUSE_JOYSTICK
642 # define wxUSE_JOYSTICK 0
643 # endif
644 # endif
645 # endif
646 #endif /* wxGTK && !wxUniv */
647
648 /* wxMotif-specific dependencies */
649 #if defined(__WXMOTIF__) && wxUSE_NOTEBOOK && !wxUSE_TAB_DIALOG
650 # undef wxUSE_TAB_DIALOG
651 # define wxUSE_TAB_DIALOG 1
652 #endif
653 #if defined(__WXMOTIF__) && wxUSE_TOGGLEBTN
654 # undef wxUSE_TOGGLEBTN
655 # define wxUSE_TOGGLEBTN 0
656 #endif
657
658 /* generic controls dependencies */
659 #if !defined(__WXMSW__) || defined(__WXUNIVERSAL__)
660 # if wxUSE_FONTDLG || wxUSE_FILEDLG || wxUSE_CHOICEDLG
661 /* all common controls are needed by these dialogs */
662 # if !defined(wxUSE_CHOICE) || \
663 !defined(wxUSE_TEXTCTRL) || \
664 !defined(wxUSE_BUTTON) || \
665 !defined(wxUSE_CHECKBOX) || \
666 !defined(wxUSE_STATTEXT)
667 # ifdef wxABORT_ON_CONFIG_ERROR
668 # error "These common controls are needed by common dialogs"
669 # else
670 # undef wxUSE_CHOICE
671 # define wxUSE_CHOICE 1
672 # undef wxUSE_TEXTCTRL
673 # define wxUSE_TEXTCTRL 1
674 # undef wxUSE_BUTTON
675 # define wxUSE_BUTTON 1
676 # undef wxUSE_CHECKBOX
677 # define wxUSE_CHECKBOX 1
678 # undef wxUSE_STATTEXT
679 # define wxUSE_STATTEXT 1
680 # endif
681 # endif
682 # endif
683 #endif /* !wxMSW || wxUniv */
684
685 /* common dependencies */
686 #if wxUSE_CALENDARCTRL
687 # if !(wxUSE_SPINBTN && wxUSE_COMBOBOX)
688 # ifdef wxABORT_ON_CONFIG_ERROR
689 # error "wxCalendarCtrl requires wxSpinButton and wxComboBox"
690 # else
691 # undef wxUSE_SPINBTN
692 # undef wxUSE_COMBOBOX
693 # define wxUSE_SPINBTN 1
694 # define wxUSE_COMBOBOX 1
695 # endif
696 # endif
697 #endif /* wxUSE_CALENDARCTRL */
698
699 #if wxUSE_CHECKLISTBOX
700 # if !wxUSE_LISTBOX
701 # ifdef wxABORT_ON_CONFIG_ERROR
702 # error "wxCheckListBox requires wxListBox"
703 # else
704 # undef wxUSE_LISTBOX
705 # define wxUSE_LISTBOX 1
706 # endif
707 # endif
708 #endif /* wxUSE_RADIOBTN */
709
710 #if wxUSE_WXHTML_HELP
711 # if !wxUSE_HELP || !wxUSE_HTML || !wxUSE_COMBOBOX
712 # ifdef wxABORT_ON_CONFIG_ERROR
713 # error "Built in help controller can't be compiled"
714 # else
715 # undef wxUSE_HELP
716 # define wxUSE_HELP 1
717 # undef wxUSE_HTML
718 # define wxUSE_HTML 1
719 # undef wxUSE_COMBOBOX
720 # define wxUSE_COMBOBOX 1
721 # endif
722 # endif
723 #endif /* wxUSE_WXHTML_HELP */
724
725 #if wxUSE_PRINTING_ARCHITECTURE
726 # if !wxUSE_COMBOBOX
727 # ifdef wxABORT_ON_CONFIG_ERROR
728 # error "Print dialog requires wxUSE_COMBOBOX"
729 # else
730 # undef wxUSE_COMBOBOX
731 # define wxUSE_COMBOBOX 1
732 # endif
733 # endif
734 #endif /* wxUSE_PRINTING_ARCHITECTURE */
735
736 #if wxUSE_DOC_VIEW_ARCHITECTURE
737 # if !wxUSE_MENUS
738 # ifdef wxABORT_ON_CONFIG_ERROR
739 # error "DocView requires wxUSE_MENUS"
740 # else
741 # undef wxUSE_MENUS
742 # define wxUSE_MENUS 1
743 # endif
744 # endif
745 #endif /* wxUSE_DOC_VIEW_ARCHITECTURE */
746
747 #if !wxUSE_FILEDLG
748 # if wxUSE_DOC_VIEW_ARCHITECTURE || wxUSE_WXHTML_HELP
749 # ifdef wxABORT_ON_CONFIG_ERROR
750 # error "wxFileDialog must be compiled as well"
751 # else
752 # undef wxUSE_FILEDLG
753 # define wxUSE_FILEDLG 1
754 # endif
755 # endif
756 #endif /* wxUSE_FILEDLG */
757
758 #if !wxUSE_IMAGLIST
759 # if wxUSE_TREECTRL || wxUSE_NOTEBOOK || wxUSE_LISTCTRL
760 # ifdef wxABORT_ON_CONFIG_ERROR
761 # error "wxImageList must be compiled as well"
762 # else
763 # undef wxUSE_IMAGLIST
764 # define wxUSE_IMAGLIST 1
765 # endif
766 # endif
767 #endif /* !wxUSE_IMAGLIST */
768
769 #if !wxUSE_MSGDLG
770 # ifdef wxABORT_ON_CONFIG_ERROR
771 /* FIXME: should compile without it, of course, but doesn't */
772 # error "wxMessageBox is always needed"
773 # else
774 # undef wxUSE_MSGDLG
775 # define wxUSE_MSGDLG 1
776 # endif
777 #endif
778
779 #if wxUSE_RADIOBOX
780 # if !wxUSE_RADIOBTN || !wxUSE_STATBOX
781 # ifdef wxABORT_ON_CONFIG_ERROR
782 # error "wxUSE_RADIOBOX requires wxUSE_RADIOBTN and wxUSE_STATBOX"
783 # else
784 # undef wxUSE_RADIOBTN
785 # undef wxUSE_STATBOX
786 # define wxUSE_RADIOBTN 1
787 # define wxUSE_STATBOX 1
788 # endif
789 # endif
790 #endif /* wxUSE_RADIOBOX */
791
792 #if wxUSE_STOPWATCH
793 # if !wxUSE_LONGLONG
794 # ifdef wxABORT_ON_CONFIG_ERROR
795 # error "wxUSE_STOPWATCH requires wxUSE_LONGLONG"
796 # else
797 # undef wxUSE_LONGLONG
798 # define wxUSE_LONGLONG 1
799 # endif
800 # endif
801 #endif /* wxUSE_STOPWATCH */
802
803 #if wxUSE_LOGWINDOW
804 # if !wxUSE_TEXTCTRL
805 # ifdef wxABORT_ON_CONFIG_ERROR
806 # error "wxUSE_LOGWINDOW requires wxUSE_TEXTCTRL"
807 # else
808 # undef wxUSE_TEXTCTRL
809 # define wxUSE_TEXTCTRL 1
810 # endif
811 # endif
812 #endif /* wxUSE_LOGWINDOW */
813
814 #if wxUSE_LOG_DIALOG
815 # if !wxUSE_LISTCTRL
816 # ifdef wxABORT_ON_CONFIG_ERROR
817 # error "wxUSE_LOG_DIALOG requires wxUSE_LISTCTRL"
818 # else
819 # undef wxUSE_LISTCTRL
820 # define wxUSE_LISTCTRL 1
821 # endif
822 # endif
823 #endif /* wxUSE_LOG_DIALOG */
824
825 /* I wonder if we shouldn't just remove all occurrences of
826 wxUSE_DYNAMIC_CLASSES from the sources? */
827 #if !defined(wxUSE_DYNAMIC_CLASSES) || !wxUSE_DYNAMIC_CLASSES
828 # ifdef wxABORT_ON_CONFIG_ERROR
829 # error "wxUSE_DYNAMIC_CLASSES must be defined as 1"
830 # else
831 # undef wxUSE_DYNAMIC_CLASSES
832 # define wxUSE_DYNAMIC_CLASSES
833 # endif
834 #endif /* wxUSE_DYNAMIC_CLASSES */
835
836 #if wxUSE_MIMETYPE && !wxUSE_TEXTFILE
837 # ifdef wxABORT_ON_CONFIG_ERROR
838 # error "wxUSE_MIMETYPE requires wxUSE_TEXTFILE"
839 # else
840 # undef wxUSE_TEXTFILE
841 # define wxUSE_TEXTFILE 1
842 # endif
843 #endif /* wxUSE_MIMETYPE */
844
845 #if wxUSE_TEXTFILE && !wxUSE_TEXTBUFFER
846 # ifdef wxABORT_ON_CONFIG_ERROR
847 # error "wxUSE_TEXTFILE requires wxUSE_TEXTBUFFER"
848 # else
849 # undef wxUSE_TEXTBUFFER
850 # define wxUSE_TEXTBUFFER 1
851 # endif
852 #endif /* wxUSE_TEXTFILE */
853
854 #if wxUSE_TEXTFILE && !wxUSE_FILE
855 # ifdef wxABORT_ON_CONFIG_ERROR
856 # error "wxUSE_TEXTFILE requires wxUSE_FILE"
857 # else
858 # undef wxUSE_FILE
859 # define wxUSE_FILE 1
860 # endif
861 #endif /* wxUSE_TEXTFILE */
862
863 #if wxUSE_CLIPBOARD && !wxUSE_DATAOBJ
864 # ifdef wxABORT_ON_CONFIG_ERROR
865 # error "wxClipboard requires wxDataObject"
866 # else
867 # undef wxUSE_DATAOBJ
868 # define wxUSE_DATAOBJ 1
869 # endif
870 #endif /* wxUSE_CLIPBOARD */
871
872 #endif /* wxUSE_GUI */
873