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