]> git.saurik.com Git - wxWidgets.git/blob - include/wx/chkconf.h
Added RTTI macros to wxToolTip
[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_LISTBOX
209 # ifdef wxABORT_ON_CONFIG_ERROR
210 # error "wxUSE_LISTBOX must be defined."
211 # else
212 # define wxUSE_LISTBOX 0
213 # endif
214 #endif /* !defined(wxUSE_LISTBOX) */
215
216 #ifndef wxUSE_LISTCTRL
217 # ifdef wxABORT_ON_CONFIG_ERROR
218 # error "wxUSE_LISTCTRL must be defined."
219 # else
220 # define wxUSE_LISTCTRL 0
221 # endif
222 #endif /* !defined(wxUSE_LISTCTRL) */
223
224 #ifndef wxUSE_LOG
225 # ifdef wxABORT_ON_CONFIG_ERROR
226 # error "wxUSE_LOG must be defined."
227 # else
228 # define wxUSE_LOG 0
229 # endif
230 #endif /* !defined(wxUSE_LOG) */
231
232 #ifndef wxUSE_LOGGUI
233 # ifdef wxABORT_ON_CONFIG_ERROR
234 # error "wxUSE_LOGGUI must be defined."
235 # else
236 # define wxUSE_LOGGUI 0
237 # endif
238 #endif /* !defined(wxUSE_LOGGUI) */
239
240 #ifndef wxUSE_LOGWINDOW
241 # ifdef wxABORT_ON_CONFIG_ERROR
242 # error "wxUSE_LOGWINDOW must be defined."
243 # else
244 # define wxUSE_LOGWINDOW 0
245 # endif
246 #endif /* !defined(wxUSE_LOGWINDOW) */
247
248 /* For now... */
249 #ifndef __WXGTK__
250 #ifndef wxUSE_LOG_DIALOG
251 # ifdef wxABORT_ON_CONFIG_ERROR
252 # error "wxUSE_LOG_DIALOG must be defined."
253 # else
254 # define wxUSE_LOG_DIALOG 0
255 # endif
256 #endif /* !defined(wxUSE_LOG_DIALOG) */
257 #endif
258
259 #ifndef wxUSE_MDI_ARCHITECTURE
260 # ifdef wxABORT_ON_CONFIG_ERROR
261 # error "wxUSE_MDI_ARCHITECTURE must be defined."
262 # else
263 # define wxUSE_MDI_ARCHITECTURE 0
264 # endif
265 #endif /* !defined(wxUSE_MDI_ARCHITECTURE) */
266
267 #ifndef wxUSE_MENUS
268 # ifdef wxABORT_ON_CONFIG_ERROR
269 # error "wxUSE_MENUS must be defined."
270 # else
271 # define wxUSE_MENUS 0
272 # endif
273 #endif /* !defined(wxUSE_MENUS) */
274
275 #ifndef wxUSE_MIMETYPE
276 # ifdef wxABORT_ON_CONFIG_ERROR
277 # error "wxUSE_MIMETYPE must be defined."
278 # else
279 # define wxUSE_MIMETYPE 0
280 # endif
281 #endif /* !defined(wxUSE_MIMETYPE) */
282
283 #ifndef wxUSE_MSGDLG
284 # ifdef wxABORT_ON_CONFIG_ERROR
285 # error "wxUSE_MSGDLG must be defined."
286 # else
287 # define wxUSE_MSGDLG 0
288 # endif
289 #endif /* !defined(wxUSE_MSGDLG) */
290
291 #ifndef wxUSE_NEW_GRID
292 # ifdef wxABORT_ON_CONFIG_ERROR
293 # error "wxUSE_NEW_GRID must be defined."
294 # else
295 # define wxUSE_NEW_GRID 0
296 # endif
297 #endif /* !defined(wxUSE_NEW_GRID) */
298
299 #ifndef wxUSE_NOTEBOOK
300 # ifdef wxABORT_ON_CONFIG_ERROR
301 # error "wxUSE_NOTEBOOK must be defined."
302 # else
303 # define wxUSE_NOTEBOOK 0
304 # endif
305 #endif /* !defined(wxUSE_NOTEBOOK) */
306
307 #ifndef wxUSE_POPUPWIN
308 # ifdef wxABORT_ON_CONFIG_ERROR
309 # error "wxUSE_POPUPWIN must be defined."
310 # else
311 # define wxUSE_POPUPWIN 0
312 # endif
313 #endif /* !defined(wxUSE_POPUPWIN) */
314
315 #ifndef wxUSE_PRINTING_ARCHITECTURE
316 # ifdef wxABORT_ON_CONFIG_ERROR
317 # error "wxUSE_PRINTING_ARCHITECTURE must be defined."
318 # else
319 # define wxUSE_PRINTING_ARCHITECTURE 0
320 # endif
321 #endif /* !defined(wxUSE_PRINTING_ARCHITECTURE) */
322
323 #ifndef wxUSE_RADIOBOX
324 # ifdef wxABORT_ON_CONFIG_ERROR
325 # error "wxUSE_RADIOBOX must be defined."
326 # else
327 # define wxUSE_RADIOBOX 0
328 # endif
329 #endif /* !defined(wxUSE_RADIOBOX) */
330
331 #ifndef wxUSE_RADIOBTN
332 # ifdef wxABORT_ON_CONFIG_ERROR
333 # error "wxUSE_RADIOBTN must be defined."
334 # else
335 # define wxUSE_RADIOBTN 0
336 # endif
337 #endif /* !defined(wxUSE_RADIOBTN) */
338
339 #ifndef wxUSE_REGEX
340 # ifdef wxABORT_ON_CONFIG_ERROR
341 # error "wxUSE_REGEX must be defined."
342 # else
343 # define wxUSE_REGEX 0
344 # endif
345 #endif /* !defined(wxUSE_REGEX) */
346
347 #ifndef wxUSE_SASH
348 # ifdef wxABORT_ON_CONFIG_ERROR
349 # error "wxUSE_SASH must be defined."
350 # else
351 # define wxUSE_SASH 0
352 # endif
353 #endif /* !defined(wxUSE_SASH) */
354
355 #ifndef wxUSE_SCROLLBAR
356 # ifdef wxABORT_ON_CONFIG_ERROR
357 # error "wxUSE_SCROLLBAR must be defined."
358 # else
359 # define wxUSE_SCROLLBAR 0
360 # endif
361 #endif /* !defined(wxUSE_SCROLLBAR) */
362
363 #ifndef wxUSE_SLIDER
364 # ifdef wxABORT_ON_CONFIG_ERROR
365 # error "wxUSE_SLIDER must be defined."
366 # else
367 # define wxUSE_SLIDER 0
368 # endif
369 #endif /* !defined(wxUSE_SLIDER) */
370
371 #ifndef wxUSE_SPINBTN
372 # ifdef wxABORT_ON_CONFIG_ERROR
373 # error "wxUSE_SPINBTN must be defined."
374 # else
375 # define wxUSE_SPINBTN 0
376 # endif
377 #endif /* !defined(wxUSE_SPINBTN) */
378
379 #ifndef wxUSE_SPINCTRL
380 # ifdef wxABORT_ON_CONFIG_ERROR
381 # error "wxUSE_SPINCTRL must be defined."
382 # else
383 # define wxUSE_SPINCTRL 0
384 # endif
385 #endif /* !defined(wxUSE_SPINCTRL) */
386
387 #ifndef wxUSE_SPLITTER
388 # ifdef wxABORT_ON_CONFIG_ERROR
389 # error "wxUSE_SPLITTER must be defined."
390 # else
391 # define wxUSE_SPLITTER 0
392 # endif
393 #endif /* !defined(wxUSE_SPLITTER) */
394
395 #ifndef wxUSE_STATBMP
396 # ifdef wxABORT_ON_CONFIG_ERROR
397 # error "wxUSE_STATBMP must be defined."
398 # else
399 # define wxUSE_STATBMP 0
400 # endif
401 #endif /* !defined(wxUSE_STATBMP) */
402
403 #ifndef wxUSE_STATBOX
404 # ifdef wxABORT_ON_CONFIG_ERROR
405 # error "wxUSE_STATBOX must be defined."
406 # else
407 # define wxUSE_STATBOX 0
408 # endif
409 #endif /* !defined(wxUSE_STATBOX) */
410
411 #ifndef wxUSE_STATLINE
412 # ifdef wxABORT_ON_CONFIG_ERROR
413 # error "wxUSE_STATLINE must be defined."
414 # else
415 # define wxUSE_STATLINE 0
416 # endif
417 #endif /* !defined(wxUSE_STATLINE) */
418
419 #ifndef wxUSE_STATTEXT
420 # ifdef wxABORT_ON_CONFIG_ERROR
421 # error "wxUSE_STATTEXT must be defined."
422 # else
423 # define wxUSE_STATTEXT 0
424 # endif
425 #endif /* !defined(wxUSE_STATTEXT) */
426
427 #ifndef wxUSE_STATUSBAR
428 # ifdef wxABORT_ON_CONFIG_ERROR
429 # error "wxUSE_STATUSBAR must be defined."
430 # else
431 # define wxUSE_STATUSBAR 0
432 # endif
433 #endif /* !defined(wxUSE_STATUSBAR) */
434
435 #ifndef wxUSE_STOPWATCH
436 # ifdef wxABORT_ON_CONFIG_ERROR
437 # error "wxUSE_STOPWATCH must be defined."
438 # else
439 # define wxUSE_STOPWATCH 0
440 # endif
441 #endif /* !defined(wxUSE_STOPWATCH) */
442
443 #ifndef wxUSE_TAB_DIALOG
444 # ifdef wxABORT_ON_CONFIG_ERROR
445 # error "wxUSE_TAB_DIALOG must be defined."
446 # else
447 # define wxUSE_TAB_DIALOG 0
448 # endif
449 #endif /* !defined(wxUSE_TAB_DIALOG) */
450
451 #ifndef wxUSE_TEXTCTRL
452 # ifdef wxABORT_ON_CONFIG_ERROR
453 # error "wxUSE_TEXTCTRL must be defined."
454 # else
455 # define wxUSE_TEXTCTRL 0
456 # endif
457 #endif /* !defined(wxUSE_TEXTCTRL) */
458
459 #ifndef wxUSE_TOOLBAR
460 # ifdef wxABORT_ON_CONFIG_ERROR
461 # error "wxUSE_TOOLBAR must be defined."
462 # else
463 # define wxUSE_TOOLBAR 0
464 # endif
465 #endif /* !defined(wxUSE_TOOLBAR) */
466
467 #ifndef wxUSE_TOOLTIPS
468 # ifdef wxABORT_ON_CONFIG_ERROR
469 # error "wxUSE_TOOLTIPS must be defined."
470 # else
471 # define wxUSE_TOOLTIPS 0
472 # endif
473 #endif /* !defined(wxUSE_TOOLTIPS) */
474
475 #ifndef wxUSE_TREECTRL
476 # ifdef wxABORT_ON_CONFIG_ERROR
477 # error "wxUSE_TREECTRL must be defined."
478 # else
479 # define wxUSE_TREECTRL 0
480 # endif
481 #endif /* !defined(wxUSE_TREECTRL) */
482
483 #ifndef wxUSE_WXHTML_HELP
484 # ifdef wxABORT_ON_CONFIG_ERROR
485 # error "wxUSE_WXHTML_HELP must be defined."
486 # else
487 # define wxUSE_WXHTML_HELP 0
488 # endif
489 #endif /* !defined(wxUSE_WXHTML_HELP) */
490
491 /*
492 check consistency of the settings
493 */
494 #if wxUSE_BUTTON || \
495 wxUSE_CALENDARCTRL || \
496 wxUSE_CARET || \
497 wxUSE_COMBOBOX || \
498 wxUSE_BMPBUTTON || \
499 wxUSE_CHECKBOX || \
500 wxUSE_CHECKLISTBOX || \
501 wxUSE_CHOICE || \
502 wxUSE_GAUGE || \
503 wxUSE_GRID || \
504 wxUSE_NEW_GRID || \
505 wxUSE_LISTBOX || \
506 wxUSE_LISTCTRL || \
507 wxUSE_NOTEBOOK || \
508 wxUSE_RADIOBOX || \
509 wxUSE_RADIOBTN || \
510 wxUSE_SCROLLBAR || \
511 wxUSE_SLIDER || \
512 wxUSE_SPINBTN || \
513 wxUSE_SPINCTRL || \
514 wxUSE_STATBMP || \
515 wxUSE_STATBOX || \
516 wxUSE_STATLINE || \
517 wxUSE_STATTEXT || \
518 wxUSE_STATUSBAR || \
519 wxUSE_TEXTCTRL || \
520 wxUSE_TOOLBAR || \
521 wxUSE_TREECTRL
522 # if !wxUSE_CONTROLS
523 # ifdef wxABORT_ON_CONFIG_ERROR
524 # error "wxUSE_CONTROLS unset but some controls used"
525 # else
526 # undef wxUSE_CONTROLS
527 # define wxUSE_CONTROLS 1
528 # endif
529 # endif
530 #endif /* controls */
531
532 /* wxUniv-specific dependencies */
533 #if defined(__WXUNIVERSAL__)
534 # if (wxUSE_COMBOBOX || wxUSE_MENUS) && !wxUSE_POPUPWIN
535 # ifdef wxABORT_ON_CONFIG_ERROR
536 # error "wxUSE_POPUPWIN must be defined to use comboboxes/menus"
537 # else
538 # undef wxUSE_POPUPWIN
539 # define wxUSE_POPUPWIN 1
540 # endif
541 # endif
542
543 # if wxUSE_COMBOBOX
544 # if !wxUSE_LISTBOX
545 # ifdef wxABORT_ON_CONFIG_ERROR
546 # error "wxComboBox requires wxListBox in wxUniversal"
547 # else
548 # undef wxUSE_LISTBOX
549 # define wxUSE_LISTBOX 1
550 # endif
551 # endif
552 # endif /* wxUSE_COMBOBOX */
553
554 # if wxUSE_RADIOBTN
555 # if !wxUSE_CHECKBOX
556 # ifdef wxABORT_ON_CONFIG_ERROR
557 # error "wxUSE_RADIOBTN requires wxUSE_CHECKBOX in wxUniversal"
558 # else
559 # undef wxUSE_CHECKBOX
560 # define wxUSE_CHECKBOX 1
561 # endif
562 # endif
563 # endif /* wxUSE_RADIOBTN */
564
565 # if wxUSE_TEXTCTRL
566 # if !wxUSE_CARET
567 # ifdef wxABORT_ON_CONFIG_ERROR
568 # error "wxTextCtrl requires wxCaret in wxUniversal"
569 # else
570 # undef wxUSE_CARET
571 # define wxUSE_CARET 1
572 # endif
573 # endif /* wxUSE_CARET */
574
575 # if !wxUSE_SCROLLBAR
576 # ifdef wxABORT_ON_CONFIG_ERROR
577 # error "wxTextCtrl requires wxScrollBar in wxUniversal"
578 # else
579 # undef wxUSE_SCROLLBAR
580 # define wxUSE_SCROLLBAR 1
581 # endif
582 # endif /* wxUSE_SCROLLBAR */
583 # endif /* wxUSE_TEXTCTRL */
584 #endif /* __WXUNIVERSAL__ */
585
586 /* wxGTK-specific dependencies */
587 #if defined(__WXGTK__) && !defined(__WXUNIVERSAL__)
588 # if wxUSE_MDI_ARCHITECTURE && !wxUSE_MENUS
589 # ifdef wxABORT_ON_CONFIG_ERROR
590 # error "MDI requires wxUSE_MENUS in wxGTK"
591 # else
592 # undef wxUSE_MENUS
593 # define wxUSE_MENUS 1
594 # endif
595 # endif
596 #endif /* wxGTK && !wxUniv */
597
598 /* wxMotif-specific dependencies */
599 #if defined(__WXMOTIF__) && wxUSE_NOTEBOOK && !wxUSE_TAB_DIALOG
600 # undef wxUSE_TAB_DIALOG
601 # define wxUSE_TAB_DIALOG 1
602 #endif
603 #if defined(__WXMOTIF__) && wxUSE_TOGGLEBTN
604 # undef wxUSE_TOGGLEBTN
605 # define wxUSE_TOGGLEBTN 0
606 #endif
607
608 /* generic controls dependencies */
609 #if !defined(__WXMSW__) || defined(__WXUNIVERSAL__)
610 # if wxUSE_FONTDLG || wxUSE_FILEDLG || wxUSE_CHOICEDLG
611 /* all common controls are needed by these dialogs */
612 # if !defined(wxUSE_CHOICE) || \
613 !defined(wxUSE_TEXTCTRL) || \
614 !defined(wxUSE_BUTTON) || \
615 !defined(wxUSE_CHECKBOX) || \
616 !defined(wxUSE_STATTEXT)
617 # ifdef wxABORT_ON_CONFIG_ERROR
618 # error "These common controls are needed by common dialogs"
619 # else
620 # undef wxUSE_CHOICE
621 # define wxUSE_CHOICE 1
622 # undef wxUSE_TEXTCTRL
623 # define wxUSE_TEXTCTRL 1
624 # undef wxUSE_BUTTON
625 # define wxUSE_BUTTON 1
626 # undef wxUSE_CHECKBOX
627 # define wxUSE_CHECKBOX 1
628 # undef wxUSE_STATTEXT
629 # define wxUSE_STATTEXT 1
630 # endif
631 # endif
632 # endif
633 #endif /* !wxMSW || wxUniv */
634
635 /* common dependencies */
636 #if wxUSE_CALENDARCTRL
637 # if !(wxUSE_SPINBTN && wxUSE_COMBOBOX)
638 # ifdef wxABORT_ON_CONFIG_ERROR
639 # error "wxCalendarCtrl requires wxSpinButton and wxComboBox"
640 # else
641 # undef wxUSE_SPINBTN
642 # undef wxUSE_COMBOBOX
643 # define wxUSE_SPINBTN 1
644 # define wxUSE_COMBOBOX 1
645 # endif
646 # endif
647 #endif /* wxUSE_CALENDARCTRL */
648
649 #if wxUSE_CHECKLISTBOX
650 # if !wxUSE_LISTBOX
651 # ifdef wxABORT_ON_CONFIG_ERROR
652 # error "wxCheckListBox requires wxListBox"
653 # else
654 # undef wxUSE_LISTBOX
655 # define wxUSE_LISTBOX 1
656 # endif
657 # endif
658 #endif /* wxUSE_RADIOBTN */
659
660 #if wxUSE_WXHTML_HELP
661 # if !wxUSE_HELP || !wxUSE_HTML || !wxUSE_COMBOBOX
662 # ifdef wxABORT_ON_CONFIG_ERROR
663 # error "Built in help controller can't be compiled"
664 # else
665 # undef wxUSE_HELP
666 # define wxUSE_HELP 1
667 # undef wxUSE_HTML
668 # define wxUSE_HTML 1
669 # undef wxUSE_COMBOBOX
670 # define wxUSE_COMBOBOX 1
671 # endif
672 # endif
673 #endif /* wxUSE_WXHTML_HELP */
674
675 #if wxUSE_PRINTING_ARCHITECTURE
676 # if !wxUSE_COMBOBOX
677 # ifdef wxABORT_ON_CONFIG_ERROR
678 # error "Print dialog requires wxUSE_COMBOBOX"
679 # else
680 # undef wxUSE_COMBOBOX
681 # define wxUSE_COMBOBOX 1
682 # endif
683 # endif
684 #endif /* wxUSE_PRINTING_ARCHITECTURE */
685
686 #if wxUSE_DOC_VIEW_ARCHITECTURE
687 # if !wxUSE_MENUS
688 # ifdef wxABORT_ON_CONFIG_ERROR
689 # error "DocView requires wxUSE_MENUS"
690 # else
691 # undef wxUSE_MENUS
692 # define wxUSE_MENUS 1
693 # endif
694 # endif
695 #endif /* wxUSE_DOC_VIEW_ARCHITECTURE */
696
697 #if !wxUSE_FILEDLG
698 # if wxUSE_DOC_VIEW_ARCHITECTURE || wxUSE_HTML
699 # ifdef wxABORT_ON_CONFIG_ERROR
700 # error "wxFileDialog must be compiled as well"
701 # else
702 # undef wxUSE_FILEDLG
703 # define wxUSE_FILEDLG 1
704 # endif
705 # endif
706 #endif /* wxUSE_FILEDLG */
707
708 #if !wxUSE_IMAGLIST
709 # if wxUSE_TREECTRL || wxUSE_NOTEBOOK || wxUSE_LISTCTRL
710 # ifdef wxABORT_ON_CONFIG_ERROR
711 # error "wxImageList must be compiled as well"
712 # else
713 # undef wxUSE_IMAGLIST
714 # define wxUSE_IMAGLIST 1
715 # endif
716 # endif
717 #endif /* !wxUSE_IMAGLIST */
718
719 #if !wxUSE_MSGDLG
720 # ifdef wxABORT_ON_CONFIG_ERROR
721 /* FIXME: should compile without it, of course, but doesn't */
722 # error "wxMessageBox is always needed"
723 # else
724 # undef wxUSE_MSGDLG
725 # define wxUSE_MSGDLG 1
726 # endif
727 #endif
728
729 #if wxUSE_RADIOBOX
730 # if !wxUSE_RADIOBTN || !wxUSE_STATBOX
731 # ifdef wxABORT_ON_CONFIG_ERROR
732 # error "wxUSE_RADIOBOX requires wxUSE_RADIOBTN and wxUSE_STATBOX"
733 # else
734 # undef wxUSE_RADIOBTN
735 # undef wxUSE_STATBOX
736 # define wxUSE_RADIOBTN 1
737 # define wxUSE_STATBOX 1
738 # endif
739 # endif
740 #endif /* wxUSE_RADIOBOX */
741
742 #if wxUSE_STOPWATCH
743 # if !wxUSE_LONGLONG
744 # ifdef wxABORT_ON_CONFIG_ERROR
745 # error "wxUSE_STOPWATCH requires wxUSE_LONGLONG"
746 # else
747 # undef wxUSE_LONGLONG
748 # define wxUSE_LONGLONG 1
749 # endif
750 # endif
751 #endif /* wxUSE_STOPWATCH */
752
753 #if wxUSE_LOGWINDOW
754 # if !wxUSE_TEXTCTRL
755 # ifdef wxABORT_ON_CONFIG_ERROR
756 # error "wxUSE_LOGWINDOW requires wxUSE_TEXTCTRL"
757 # else
758 # undef wxUSE_TEXTCTRL
759 # define wxUSE_TEXTCTRL 1
760 # endif
761 # endif
762 #endif /* wxUSE_LOGWINDOW */
763
764 #if wxUSE_LOG_DIALOG
765 # if !wxUSE_LISTCTRL
766 # ifdef wxABORT_ON_CONFIG_ERROR
767 # error "wxUSE_LOG_DIALOG requires wxUSE_LISTCTRL"
768 # else
769 # undef wxUSE_LISTCTRL
770 # define wxUSE_LISTCTRL 1
771 # endif
772 # endif
773 #endif /* wxUSE_LOG_DIALOG */
774
775 /* I wonder if we shouldn't just remove all occurrences of
776 wxUSE_DYNAMIC_CLASSES from the sources? */
777 #if !defined(wxUSE_DYNAMIC_CLASSES) || !wxUSE_DYNAMIC_CLASSES
778 # ifdef wxABORT_ON_CONFIG_ERROR
779 # error "wxUSE_DYNAMIC_CLASSES must be defined as 1"
780 # else
781 # undef wxUSE_DYNAMIC_CLASSES
782 # define wxUSE_DYNAMIC_CLASSES
783 # endif
784 #endif /* wxUSE_DYNAMIC_CLASSES */
785
786 #if wxUSE_MIMETYPE && !wxUSE_TEXTFILE
787 # ifdef wxABORT_ON_CONFIG_ERROR
788 # error "wxUSE_MIMETYPE requires wxUSE_TEXTFILE"
789 # else
790 # undef wxUSE_TEXTFILE
791 # define wxUSE_TEXTFILE 1
792 # endif
793 #endif /* wxUSE_MIMETYPE */
794
795 #if wxUSE_TEXTFILE && !wxUSE_FILE
796 # ifdef wxABORT_ON_CONFIG_ERROR
797 # error "wxUSE_TEXTFILE requires wxUSE_FILE"
798 # else
799 # undef wxUSE_FILE
800 # define wxUSE_FILE 1
801 # endif
802 #endif /* wxUSE_TEXTFILE */
803
804 #if wxUSE_CLIPBOARD && !wxUSE_DATAOBJ
805 # ifdef wxABORT_ON_CONFIG_ERROR
806 # error "wxClipboard requires wxDataObject"
807 # else
808 # undef wxUSE_DATAOBJ
809 # define wxUSE_DATAOBJ 1
810 # endif
811 #endif /* wxUSE_CLIPBOARD */
812
813 #endif /* wxUSE_GUI */
814