]> git.saurik.com Git - wxWidgets.git/blob - include/wx/chkconf.h
Allow wxStaticText to have a custom fg without a custom bg
[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@wxwidgets.org>
9 * Licence: wxWindows licence
10 */
11
12 /* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
13
14 /*
15 Compiler-specific checking.
16 */
17
18 #if defined(__WXPALMOS__)
19 # include "wx/palmos/chkconf.h"
20 #elif defined(__WXWINCE__)
21 # include "wx/msw/wince/chkconf.h"
22 #elif defined(__WXMSW__)
23 # include "wx/msw/chkconf.h"
24 #elif defined(__WXMAC__)
25 # include "wx/mac/chkconf.h"
26 #endif
27
28 /*
29 this global setting determines what should we do if the setting FOO
30 requires BAR and BAR is not set: we can either silently define BAR
31 (default, recommended) or give an error and abort (mainly useful for
32 developers only)
33 */
34 #define wxABORT_ON_CONFIG_ERROR
35
36 /*
37 global features
38 */
39
40 /* GUI build by default */
41 #if !defined(wxUSE_GUI)
42 # define wxUSE_GUI 1
43 #endif /* !defined(wxUSE_GUI) */
44
45 /*
46 If we're compiling without support for threads/exceptions we have to
47 disable the corresponding features.
48 */
49 #ifdef wxNO_THREADS
50 # undef wxUSE_THREADS
51 # define wxUSE_THREADS 0
52 #endif /* wxNO_THREADS */
53
54 #ifdef wxNO_EXCEPTIONS
55 # undef wxUSE_EXCEPTIONS
56 # define wxUSE_EXCEPTIONS 0
57 #endif /* wxNO_EXCEPTIONS */
58
59 /* we also must disable exceptions if compiler doesn't support them */
60 #if defined(_MSC_VER) && !defined(_CPPUNWIND)
61 # undef wxUSE_EXCEPTIONS
62 # define wxUSE_EXCEPTIONS 0
63 #endif /* VC++ without exceptions support */
64
65
66 /*
67 tests for non GUI features
68 */
69
70 #ifndef wxUSE_DYNLIB_CLASS
71 # ifdef wxABORT_ON_CONFIG_ERROR
72 # error "wxUSE_DYNLIB_CLASS must be defined."
73 # else
74 # define wxUSE_DYNLIB_CLASS 0
75 # endif
76 #endif /* !defined(wxUSE_DYNLIB_CLASS) */
77
78 #ifndef wxUSE_EXCEPTIONS
79 # ifdef wxABORT_ON_CONFIG_ERROR
80 # error "wxUSE_EXCEPTIONS must be defined."
81 # else
82 # define wxUSE_EXCEPTIONS 0
83 # endif
84 #endif /* !defined(wxUSE_EXCEPTIONS) */
85
86 #ifndef wxUSE_FILESYSTEM
87 # ifdef wxABORT_ON_CONFIG_ERROR
88 # error "wxUSE_FILESYSTEM must be defined."
89 # else
90 # define wxUSE_FILESYSTEM 0
91 # endif
92 #endif /* !defined(wxUSE_FILESYSTEM) */
93
94 /* don't give an error about this one yet, it's not fully implemented */
95 #ifndef wxUSE_FSVOLUME
96 # define wxUSE_FSVOLUME 0
97 #endif /* !defined(wxUSE_FSVOLUME) */
98
99 #ifndef wxUSE_DYNAMIC_LOADER
100 # ifdef wxABORT_ON_CONFIG_ERROR
101 # error "wxUSE_DYNAMIC_LOADER must be defined."
102 # else
103 # define wxUSE_DYNAMIC_LOADER 0
104 # endif
105 #endif /* !defined(wxUSE_DYNAMIC_LOADER) */
106
107 #ifndef wxUSE_LOG
108 # ifdef wxABORT_ON_CONFIG_ERROR
109 # error "wxUSE_LOG must be defined."
110 # else
111 # define wxUSE_LOG 0
112 # endif
113 #endif /* !defined(wxUSE_LOG) */
114
115 #ifndef wxUSE_LONGLONG
116 # ifdef wxABORT_ON_CONFIG_ERROR
117 # error "wxUSE_LONGLONG must be defined."
118 # else
119 # define wxUSE_LONGLONG 0
120 # endif
121 #endif /* !defined(wxUSE_LONGLONG) */
122
123 #ifndef wxUSE_MIMETYPE
124 # ifdef wxABORT_ON_CONFIG_ERROR
125 # error "wxUSE_MIMETYPE must be defined."
126 # else
127 # define wxUSE_MIMETYPE 0
128 # endif
129 #endif /* !defined(wxUSE_MIMETYPE) */
130
131 #ifndef wxUSE_PROTOCOL
132 # ifdef wxABORT_ON_CONFIG_ERROR
133 # error "wxUSE_PROTOCOL must be defined."
134 # else
135 # define wxUSE_PROTOCOL 0
136 # endif
137 #endif /* !defined(wxUSE_PROTOCOL) */
138
139 /* we may not define wxUSE_PROTOCOL_XXX if wxUSE_PROTOCOL is set to 0 */
140 #if !wxUSE_PROTOCOL
141 # undef wxUSE_PROTOCOL_HTTP
142 # undef wxUSE_PROTOCOL_FTP
143 # undef wxUSE_PROTOCOL_FILE
144 # define wxUSE_PROTOCOL_HTTP 0
145 # define wxUSE_PROTOCOL_FTP 0
146 # define wxUSE_PROTOCOL_FILE 0
147 #endif /* wxUSE_PROTOCOL */
148
149 #ifndef wxUSE_PROTOCOL_HTTP
150 # ifdef wxABORT_ON_CONFIG_ERROR
151 # error "wxUSE_PROTOCOL_HTTP must be defined."
152 # else
153 # define wxUSE_PROTOCOL_HTTP 0
154 # endif
155 #endif /* !defined(wxUSE_PROTOCOL_HTTP) */
156
157 #ifndef wxUSE_PROTOCOL_FTP
158 # ifdef wxABORT_ON_CONFIG_ERROR
159 # error "wxUSE_PROTOCOL_FTP must be defined."
160 # else
161 # define wxUSE_PROTOCOL_FTP 0
162 # endif
163 #endif /* !defined(wxUSE_PROTOCOL_FTP) */
164
165 #ifndef wxUSE_PROTOCOL_FILE
166 # ifdef wxABORT_ON_CONFIG_ERROR
167 # error "wxUSE_PROTOCOL_FILE must be defined."
168 # else
169 # define wxUSE_PROTOCOL_FILE 0
170 # endif
171 #endif /* !defined(wxUSE_PROTOCOL_FILE) */
172
173 #ifndef wxUSE_REGEX
174 # ifdef wxABORT_ON_CONFIG_ERROR
175 # error "wxUSE_REGEX must be defined."
176 # else
177 # define wxUSE_REGEX 0
178 # endif
179 #endif /* !defined(wxUSE_REGEX) */
180
181 #ifndef wxUSE_STDPATHS
182 # ifdef wxABORT_ON_CONFIG_ERROR
183 # error "wxUSE_STDPATHS must be defined."
184 # else
185 # define wxUSE_STDPATHS 1
186 # endif
187 #endif /* !defined(wxUSE_STDPATHS) */
188
189 #ifndef wxUSE_XML
190 # ifdef wxABORT_ON_CONFIG_ERROR
191 # error "wxUSE_XML must be defined."
192 # else
193 # define wxUSE_XML 0
194 # endif
195 #endif /* !defined(wxUSE_XML) */
196
197 #ifndef wxUSE_SOCKETS
198 # ifdef wxABORT_ON_CONFIG_ERROR
199 # error "wxUSE_SOCKETS must be defined."
200 # else
201 # define wxUSE_SOCKETS 0
202 # endif
203 #endif /* !defined(wxUSE_SOCKETS) */
204
205 #ifndef wxUSE_STREAMS
206 # ifdef wxABORT_ON_CONFIG_ERROR
207 # error "wxUSE_STREAMS must be defined."
208 # else
209 # define wxUSE_STREAMS 0
210 # endif
211 #endif /* !defined(wxUSE_STREAMS) */
212
213 #ifndef wxUSE_STOPWATCH
214 # ifdef wxABORT_ON_CONFIG_ERROR
215 # error "wxUSE_STOPWATCH must be defined."
216 # else
217 # define wxUSE_STOPWATCH 0
218 # endif
219 #endif /* !defined(wxUSE_STOPWATCH) */
220
221 #ifndef wxUSE_TEXTBUFFER
222 # ifdef wxABORT_ON_CONFIG_ERROR
223 # error "wxUSE_TEXTBUFFER must be defined."
224 # else
225 # define wxUSE_TEXTBUFFER 0
226 # endif
227 #endif /* !defined(wxUSE_TEXTBUFFER) */
228
229 #ifndef wxUSE_TEXTFILE
230 # ifdef wxABORT_ON_CONFIG_ERROR
231 # error "wxUSE_TEXTFILE must be defined."
232 # else
233 # define wxUSE_TEXTFILE 0
234 # endif
235 #endif /* !defined(wxUSE_TEXTFILE) */
236
237 #ifndef wxUSE_UNICODE
238 # ifdef wxABORT_ON_CONFIG_ERROR
239 # error "wxUSE_UNICODE must be defined."
240 # else
241 # define wxUSE_UNICODE 0
242 # endif
243 #endif /* !defined(wxUSE_UNICODE) */
244
245 #ifndef wxUSE_URL
246 # ifdef wxABORT_ON_CONFIG_ERROR
247 # error "wxUSE_URL must be defined."
248 # else
249 # define wxUSE_URL 0
250 # endif
251 #endif /* !defined(wxUSE_URL) */
252
253 /*
254 all these tests are for GUI only
255 */
256 #if wxUSE_GUI
257
258 /*
259 all of the settings tested below must be defined or we'd get an error from
260 preprocessor about invalid integer expression
261 */
262
263 #ifndef wxUSE_ACCEL
264 # ifdef wxABORT_ON_CONFIG_ERROR
265 # error "wxUSE_ACCEL must be defined."
266 # else
267 # define wxUSE_ACCEL 0
268 # endif
269 #endif /* !defined(wxUSE_ACCEL) */
270
271 #ifndef wxUSE_BMPBUTTON
272 # ifdef wxABORT_ON_CONFIG_ERROR
273 # error "wxUSE_BMPBUTTON must be defined."
274 # else
275 # define wxUSE_BMPBUTTON 0
276 # endif
277 #endif /* !defined(wxUSE_BMPBUTTON) */
278
279 #ifndef wxUSE_BUTTON
280 # ifdef wxABORT_ON_CONFIG_ERROR
281 # error "wxUSE_BUTTON must be defined."
282 # else
283 # define wxUSE_BUTTON 0
284 # endif
285 #endif /* !defined(wxUSE_BUTTON) */
286
287 #ifndef wxUSE_CALENDARCTRL
288 # ifdef wxABORT_ON_CONFIG_ERROR
289 # error "wxUSE_CALENDARCTRL must be defined."
290 # else
291 # define wxUSE_CALENDARCTRL 0
292 # endif
293 #endif /* !defined(wxUSE_CALENDARCTRL) */
294
295 #ifndef wxUSE_CARET
296 # ifdef wxABORT_ON_CONFIG_ERROR
297 # error "wxUSE_CARET must be defined."
298 # else
299 # define wxUSE_CARET 0
300 # endif
301 #endif /* !defined(wxUSE_CARET) */
302
303 #ifndef wxUSE_CHECKBOX
304 # ifdef wxABORT_ON_CONFIG_ERROR
305 # error "wxUSE_CHECKBOX must be defined."
306 # else
307 # define wxUSE_CHECKBOX 0
308 # endif
309 #endif /* !defined(wxUSE_CHECKBOX) */
310
311 #ifndef wxUSE_CHECKLISTBOX
312 # ifdef wxABORT_ON_CONFIG_ERROR
313 # error "wxUSE_CHECKLISTBOX must be defined."
314 # else
315 # define wxUSE_CHECKLISTBOX 0
316 # endif
317 #endif /* !defined(wxUSE_CHECKLISTBOX) */
318
319 #ifndef wxUSE_CHOICE
320 # ifdef wxABORT_ON_CONFIG_ERROR
321 # error "wxUSE_CHOICE must be defined."
322 # else
323 # define wxUSE_CHOICE 0
324 # endif
325 #endif /* !defined(wxUSE_CHOICE) */
326
327 #ifndef wxUSE_CHOICEBOOK
328 # ifdef wxABORT_ON_CONFIG_ERROR
329 # error "wxUSE_CHOICEBOOK must be defined."
330 # else
331 # define wxUSE_CHOICEBOOK 0
332 # endif
333 #endif /* !defined(wxUSE_CHOICEBOOK) */
334
335 #ifndef wxUSE_CHOICEDLG
336 # ifdef wxABORT_ON_CONFIG_ERROR
337 # error "wxUSE_CHOICEDLG must be defined."
338 # else
339 # define wxUSE_CHOICEDLG 0
340 # endif
341 #endif /* !defined(wxUSE_CHOICEDLG) */
342
343 #ifndef wxUSE_CLIPBOARD
344 # ifdef wxABORT_ON_CONFIG_ERROR
345 # error "wxUSE_CLIPBOARD must be defined."
346 # else
347 # define wxUSE_CLIPBOARD 0
348 # endif
349 #endif /* !defined(wxUSE_CLIPBOARD) */
350
351 #ifndef wxUSE_COLOURDLG
352 # ifdef wxABORT_ON_CONFIG_ERROR
353 # error "wxUSE_COLOURDLG must be defined."
354 # else
355 # define wxUSE_COLOURDLG 0
356 # endif
357 #endif /* !defined(wxUSE_COLOURDLG) */
358
359 #ifndef wxUSE_COMBOBOX
360 # ifdef wxABORT_ON_CONFIG_ERROR
361 # error "wxUSE_COMBOBOX must be defined."
362 # else
363 # define wxUSE_COMBOBOX 0
364 # endif
365 #endif /* !defined(wxUSE_COMBOBOX) */
366
367 #ifndef wxUSE_DATAOBJ
368 # ifdef wxABORT_ON_CONFIG_ERROR
369 # error "wxUSE_DATAOBJ must be defined."
370 # else
371 # define wxUSE_DATAOBJ 0
372 # endif
373 #endif /* !defined(wxUSE_DATAOBJ) */
374
375 #ifndef wxUSE_DATEPICKCTRL
376 # ifdef wxABORT_ON_CONFIG_ERROR
377 # error "wxUSE_DATEPICKCTRL must be defined."
378 # else
379 # define wxUSE_DATEPICKCTRL 0
380 # endif
381 #endif /* !defined(wxUSE_DATEPICKCTRL) */
382
383 #ifndef wxUSE_DISPLAY
384 # ifdef wxABORT_ON_CONFIG_ERROR
385 # error "wxUSE_DISPLAY must be defined."
386 # else
387 # define wxUSE_DISPLAY 0
388 # endif
389 #endif /* !defined(wxUSE_DISPLAY) */
390
391 #ifndef wxUSE_DOC_VIEW_ARCHITECTURE
392 # ifdef wxABORT_ON_CONFIG_ERROR
393 # error "wxUSE_DOC_VIEW_ARCHITECTURE must be defined."
394 # else
395 # define wxUSE_DOC_VIEW_ARCHITECTURE 0
396 # endif
397 #endif /* !defined(wxUSE_DOC_VIEW_ARCHITECTURE) */
398
399 #ifndef wxUSE_FILEDLG
400 # ifdef wxABORT_ON_CONFIG_ERROR
401 # error "wxUSE_FILEDLG must be defined."
402 # else
403 # define wxUSE_FILEDLG 0
404 # endif
405 #endif /* !defined(wxUSE_FILEDLG) */
406
407 #ifndef wxUSE_FONTDLG
408 # ifdef wxABORT_ON_CONFIG_ERROR
409 # error "wxUSE_FONTDLG must be defined."
410 # else
411 # define wxUSE_FONTDLG 0
412 # endif
413 #endif /* !defined(wxUSE_FONTDLG) */
414
415 #ifndef wxUSE_FONTMAP
416 # ifdef wxABORT_ON_CONFIG_ERROR
417 # error "wxUSE_FONTMAP must be defined."
418 # else
419 # define wxUSE_FONTMAP 0
420 # endif
421 #endif /* !defined(wxUSE_FONTMAP) */
422
423 #ifndef wxUSE_GAUGE
424 # ifdef wxABORT_ON_CONFIG_ERROR
425 # error "wxUSE_GAUGE must be defined."
426 # else
427 # define wxUSE_GAUGE 0
428 # endif
429 #endif /* !defined(wxUSE_GAUGE) */
430
431 #ifndef wxUSE_GRID
432 # ifdef wxABORT_ON_CONFIG_ERROR
433 # error "wxUSE_GRID must be defined."
434 # else
435 # define wxUSE_GRID 0
436 # endif
437 #endif /* !defined(wxUSE_GRID) */
438
439 #ifndef wxUSE_HELP
440 # ifdef wxABORT_ON_CONFIG_ERROR
441 # error "wxUSE_HELP must be defined."
442 # else
443 # define wxUSE_HELP 0
444 # endif
445 #endif /* !defined(wxUSE_HELP) */
446
447 #ifndef wxUSE_HTML
448 # ifdef wxABORT_ON_CONFIG_ERROR
449 # error "wxUSE_HTML must be defined."
450 # else
451 # define wxUSE_HTML 0
452 # endif
453 #endif /* !defined(wxUSE_HTML) */
454
455 #ifndef wxUSE_XRC
456 # ifdef wxABORT_ON_CONFIG_ERROR
457 # error "wxUSE_XRC must be defined."
458 # else
459 # define wxUSE_XRC 0
460 # endif
461 #endif /* !defined(wxUSE_XRC) */
462
463 #ifndef wxUSE_LIBMSPACK
464 # ifndef __UNIX__
465 /* set to 0 on platforms that don't have libmspack */
466 # define wxUSE_LIBMSPACK 0
467 # else
468 # ifdef wxABORT_ON_CONFIG_ERROR
469 # error "wxUSE_LIBMSPACK must be defined."
470 # else
471 # define wxUSE_LIBMSPACK 0
472 # endif
473 # endif
474 #endif /* !defined(wxUSE_LIBMSPACK) */
475
476 #ifndef wxUSE_ICO_CUR
477 # ifdef wxABORT_ON_CONFIG_ERROR
478 # error "wxUSE_ICO_CUR must be defined."
479 # else
480 # define wxUSE_ICO_CUR 0
481 # endif
482 #endif /* !defined(wxUSE_ICO_CUR) */
483
484 #ifndef wxUSE_IFF
485 # ifdef wxABORT_ON_CONFIG_ERROR
486 # error "wxUSE_IFF must be defined."
487 # else
488 # define wxUSE_IFF 0
489 # endif
490 #endif /* !defined(wxUSE_IFF) */
491
492 #ifndef wxUSE_IMAGLIST
493 # ifdef wxABORT_ON_CONFIG_ERROR
494 # error "wxUSE_IMAGLIST must be defined."
495 # else
496 # define wxUSE_IMAGLIST 0
497 # endif
498 #endif /* !defined(wxUSE_IMAGLIST) */
499
500 #ifndef wxUSE_JOYSTICK
501 # ifdef wxABORT_ON_CONFIG_ERROR
502 # error "wxUSE_JOYSTICK must be defined."
503 # else
504 # define wxUSE_JOYSTICK 0
505 # endif
506 #endif /* !defined(wxUSE_JOYSTICK) */
507
508 #ifndef wxUSE_LISTBOOK
509 # ifdef wxABORT_ON_CONFIG_ERROR
510 # error "wxUSE_LISTBOOK must be defined."
511 # else
512 # define wxUSE_LISTBOOK 0
513 # endif
514 #endif /* !defined(wxUSE_LISTBOOK) */
515
516 #ifndef wxUSE_LISTBOX
517 # ifdef wxABORT_ON_CONFIG_ERROR
518 # error "wxUSE_LISTBOX must be defined."
519 # else
520 # define wxUSE_LISTBOX 0
521 # endif
522 #endif /* !defined(wxUSE_LISTBOX) */
523
524 #ifndef wxUSE_LISTCTRL
525 # ifdef wxABORT_ON_CONFIG_ERROR
526 # error "wxUSE_LISTCTRL must be defined."
527 # else
528 # define wxUSE_LISTCTRL 0
529 # endif
530 #endif /* !defined(wxUSE_LISTCTRL) */
531
532 #ifndef wxUSE_LOGGUI
533 # ifdef wxABORT_ON_CONFIG_ERROR
534 # error "wxUSE_LOGGUI must be defined."
535 # else
536 # define wxUSE_LOGGUI 0
537 # endif
538 #endif /* !defined(wxUSE_LOGGUI) */
539
540 #ifndef wxUSE_LOGWINDOW
541 # ifdef wxABORT_ON_CONFIG_ERROR
542 # error "wxUSE_LOGWINDOW must be defined."
543 # else
544 # define wxUSE_LOGWINDOW 0
545 # endif
546 #endif /* !defined(wxUSE_LOGWINDOW) */
547
548 #ifndef wxUSE_LOG_DIALOG
549 # ifdef wxABORT_ON_CONFIG_ERROR
550 # error "wxUSE_LOG_DIALOG must be defined."
551 # else
552 # define wxUSE_LOG_DIALOG 0
553 # endif
554 #endif /* !defined(wxUSE_LOG_DIALOG) */
555
556 #ifndef wxUSE_MDI
557 # ifdef wxABORT_ON_CONFIG_ERROR
558 # error "wxUSE_MDI must be defined."
559 # else
560 # define wxUSE_MDI 0
561 # endif
562 #endif /* !defined(wxUSE_MDI) */
563
564 #ifndef wxUSE_MDI_ARCHITECTURE
565 # ifdef wxABORT_ON_CONFIG_ERROR
566 # error "wxUSE_MDI_ARCHITECTURE must be defined."
567 # else
568 # define wxUSE_MDI_ARCHITECTURE 0
569 # endif
570 #endif /* !defined(wxUSE_MDI_ARCHITECTURE) */
571
572 #ifndef wxUSE_MENUS
573 # ifdef wxABORT_ON_CONFIG_ERROR
574 # error "wxUSE_MENUS must be defined."
575 # else
576 # define wxUSE_MENUS 0
577 # endif
578 #endif /* !defined(wxUSE_MENUS) */
579
580 #ifndef wxUSE_MSGDLG
581 # ifdef wxABORT_ON_CONFIG_ERROR
582 # error "wxUSE_MSGDLG must be defined."
583 # else
584 # define wxUSE_MSGDLG 0
585 # endif
586 #endif /* !defined(wxUSE_MSGDLG) */
587
588 #ifndef wxUSE_NOTEBOOK
589 # ifdef wxABORT_ON_CONFIG_ERROR
590 # error "wxUSE_NOTEBOOK must be defined."
591 # else
592 # define wxUSE_NOTEBOOK 0
593 # endif
594 #endif /* !defined(wxUSE_NOTEBOOK) */
595
596 #ifndef wxUSE_PALETTE
597 # ifdef wxABORT_ON_CONFIG_ERROR
598 # error "wxUSE_PALETTE must be defined."
599 # else
600 # define wxUSE_PALETTE 0
601 # endif
602 #endif /* !defined(wxUSE_PALETTE) */
603
604 #ifndef wxUSE_POPUPWIN
605 # ifdef wxABORT_ON_CONFIG_ERROR
606 # error "wxUSE_POPUPWIN must be defined."
607 # else
608 # define wxUSE_POPUPWIN 0
609 # endif
610 #endif /* !defined(wxUSE_POPUPWIN) */
611
612 #ifndef wxUSE_PRINTING_ARCHITECTURE
613 # ifdef wxABORT_ON_CONFIG_ERROR
614 # error "wxUSE_PRINTING_ARCHITECTURE must be defined."
615 # else
616 # define wxUSE_PRINTING_ARCHITECTURE 0
617 # endif
618 #endif /* !defined(wxUSE_PRINTING_ARCHITECTURE) */
619
620 #ifndef wxUSE_RADIOBOX
621 # ifdef wxABORT_ON_CONFIG_ERROR
622 # error "wxUSE_RADIOBOX must be defined."
623 # else
624 # define wxUSE_RADIOBOX 0
625 # endif
626 #endif /* !defined(wxUSE_RADIOBOX) */
627
628 #ifndef wxUSE_RADIOBTN
629 # ifdef wxABORT_ON_CONFIG_ERROR
630 # error "wxUSE_RADIOBTN must be defined."
631 # else
632 # define wxUSE_RADIOBTN 0
633 # endif
634 #endif /* !defined(wxUSE_RADIOBTN) */
635
636 #ifndef wxUSE_SASH
637 # ifdef wxABORT_ON_CONFIG_ERROR
638 # error "wxUSE_SASH must be defined."
639 # else
640 # define wxUSE_SASH 0
641 # endif
642 #endif /* !defined(wxUSE_SASH) */
643
644 #ifndef wxUSE_SCROLLBAR
645 # ifdef wxABORT_ON_CONFIG_ERROR
646 # error "wxUSE_SCROLLBAR must be defined."
647 # else
648 # define wxUSE_SCROLLBAR 0
649 # endif
650 #endif /* !defined(wxUSE_SCROLLBAR) */
651
652 #ifndef wxUSE_SLIDER
653 # ifdef wxABORT_ON_CONFIG_ERROR
654 # error "wxUSE_SLIDER must be defined."
655 # else
656 # define wxUSE_SLIDER 0
657 # endif
658 #endif /* !defined(wxUSE_SLIDER) */
659
660 #ifndef wxUSE_SOUND
661 # ifdef wxABORT_ON_CONFIG_ERROR
662 # error "wxUSE_SOUND must be defined."
663 # else
664 # define wxUSE_SOUND 0
665 # endif
666 #endif /* !defined(wxUSE_SOUND) */
667
668 #ifndef wxUSE_SPINBTN
669 # ifdef wxABORT_ON_CONFIG_ERROR
670 # error "wxUSE_SPINBTN must be defined."
671 # else
672 # define wxUSE_SPINBTN 0
673 # endif
674 #endif /* !defined(wxUSE_SPINBTN) */
675
676 #ifndef wxUSE_SPINCTRL
677 # ifdef wxABORT_ON_CONFIG_ERROR
678 # error "wxUSE_SPINCTRL must be defined."
679 # else
680 # define wxUSE_SPINCTRL 0
681 # endif
682 #endif /* !defined(wxUSE_SPINCTRL) */
683
684 #ifndef wxUSE_SPLASH
685 # ifdef wxABORT_ON_CONFIG_ERROR
686 # error "wxUSE_SPLASH must be defined."
687 # else
688 # define wxUSE_SPLASH 0
689 # endif
690 #endif /* !defined(wxUSE_SPLASH) */
691
692 #ifndef wxUSE_SPLITTER
693 # ifdef wxABORT_ON_CONFIG_ERROR
694 # error "wxUSE_SPLITTER must be defined."
695 # else
696 # define wxUSE_SPLITTER 0
697 # endif
698 #endif /* !defined(wxUSE_SPLITTER) */
699
700 #ifndef wxUSE_STATBMP
701 # ifdef wxABORT_ON_CONFIG_ERROR
702 # error "wxUSE_STATBMP must be defined."
703 # else
704 # define wxUSE_STATBMP 0
705 # endif
706 #endif /* !defined(wxUSE_STATBMP) */
707
708 #ifndef wxUSE_STATBOX
709 # ifdef wxABORT_ON_CONFIG_ERROR
710 # error "wxUSE_STATBOX must be defined."
711 # else
712 # define wxUSE_STATBOX 0
713 # endif
714 #endif /* !defined(wxUSE_STATBOX) */
715
716 #ifndef wxUSE_STATLINE
717 # ifdef wxABORT_ON_CONFIG_ERROR
718 # error "wxUSE_STATLINE must be defined."
719 # else
720 # define wxUSE_STATLINE 0
721 # endif
722 #endif /* !defined(wxUSE_STATLINE) */
723
724 #ifndef wxUSE_STATTEXT
725 # ifdef wxABORT_ON_CONFIG_ERROR
726 # error "wxUSE_STATTEXT must be defined."
727 # else
728 # define wxUSE_STATTEXT 0
729 # endif
730 #endif /* !defined(wxUSE_STATTEXT) */
731
732 #ifndef wxUSE_STATUSBAR
733 # ifdef wxABORT_ON_CONFIG_ERROR
734 # error "wxUSE_STATUSBAR must be defined."
735 # else
736 # define wxUSE_STATUSBAR 0
737 # endif
738 #endif /* !defined(wxUSE_STATUSBAR) */
739
740 #ifndef wxUSE_TAB_DIALOG
741 # ifdef wxABORT_ON_CONFIG_ERROR
742 # error "wxUSE_TAB_DIALOG must be defined."
743 # else
744 # define wxUSE_TAB_DIALOG 0
745 # endif
746 #endif /* !defined(wxUSE_TAB_DIALOG) */
747
748 #ifndef wxUSE_TEXTCTRL
749 # ifdef wxABORT_ON_CONFIG_ERROR
750 # error "wxUSE_TEXTCTRL must be defined."
751 # else
752 # define wxUSE_TEXTCTRL 0
753 # endif
754 #endif /* !defined(wxUSE_TEXTCTRL) */
755
756 #ifndef wxUSE_TIPWINDOW
757 # ifdef wxABORT_ON_CONFIG_ERROR
758 # error "wxUSE_TIPWINDOW must be defined."
759 # else
760 # define wxUSE_TIPWINDOW 0
761 # endif
762 #endif /* !defined(wxUSE_TIPWINDOW) */
763
764 #ifndef wxUSE_TOOLBAR
765 # ifdef wxABORT_ON_CONFIG_ERROR
766 # error "wxUSE_TOOLBAR must be defined."
767 # else
768 # define wxUSE_TOOLBAR 0
769 # endif
770 #endif /* !defined(wxUSE_TOOLBAR) */
771
772 #ifndef wxUSE_TOOLTIPS
773 # ifdef wxABORT_ON_CONFIG_ERROR
774 # error "wxUSE_TOOLTIPS must be defined."
775 # else
776 # define wxUSE_TOOLTIPS 0
777 # endif
778 #endif /* !defined(wxUSE_TOOLTIPS) */
779
780 #ifndef wxUSE_TREECTRL
781 # ifdef wxABORT_ON_CONFIG_ERROR
782 # error "wxUSE_TREECTRL must be defined."
783 # else
784 # define wxUSE_TREECTRL 0
785 # endif
786 #endif /* !defined(wxUSE_TREECTRL) */
787
788 #ifndef wxUSE_VALIDATORS
789 # ifdef wxABORT_ON_CONFIG_ERROR
790 # error "wxUSE_VALIDATORS must be defined."
791 # else
792 # define wxUSE_VALIDATORS 0
793 # endif
794 #endif /* !defined(wxUSE_VALIDATORS) */
795
796 #ifndef wxUSE_WXHTML_HELP
797 # ifdef wxABORT_ON_CONFIG_ERROR
798 # error "wxUSE_WXHTML_HELP must be defined."
799 # else
800 # define wxUSE_WXHTML_HELP 0
801 # endif
802 #endif /* !defined(wxUSE_WXHTML_HELP) */
803
804 #endif /* wxUSE_GUI */
805
806 /*
807 check consistency of the settings
808 */
809
810 #if wxUSE_PROTOCOL_FILE || wxUSE_PROTOCOL_FTP || wxUSE_PROTOCOL_HTTP
811 # if !wxUSE_PROTOCOL
812 # ifdef wxABORT_ON_CONFIG_ERROR
813 # error "wxUSE_PROTOCOL_XXX requires wxUSE_PROTOCOL"
814 # else
815 # undef wxUSE_PROTOCOL
816 # define wxUSE_PROTOCOL 1
817 # endif
818 # endif
819 #endif /* wxUSE_PROTOCOL_XXX */
820
821 #if wxUSE_URL
822 # if !wxUSE_PROTOCOL
823 # ifdef wxABORT_ON_CONFIG_ERROR
824 # error "wxUSE_URL requires wxUSE_PROTOCOL"
825 # else
826 # undef wxUSE_PROTOCOL
827 # define wxUSE_PROTOCOL 1
828 # endif
829 # endif
830 #endif /* wxUSE_URL */
831
832 #if wxUSE_PROTOCOL
833 # if !wxUSE_SOCKETS
834 # if wxUSE_PROTOCOL_HTTP || wxUSE_PROTOCOL_FTP
835 # ifdef wxABORT_ON_CONFIG_ERROR
836 # error "wxUSE_PROTOCOL_FTP/HTTP requires wxUSE_SOCKETS"
837 # else
838 # undef wxUSE_SOCKETS
839 # define wxUSE_SOCKETS 1
840 # endif
841 # endif
842 # endif
843
844 # if !wxUSE_STREAMS
845 # ifdef wxABORT_ON_CONFIG_ERROR
846 # error "wxUSE_PROTOCOL requires wxUSE_STREAMS"
847 # else
848 # undef wxUSE_STREAMS
849 # define wxUSE_STREAMS 1
850 # endif
851 # endif
852 #endif /* wxUSE_PROTOCOL */
853
854 /* have to test for wxUSE_HTML before wxUSE_FILESYSTEM */
855 #if wxUSE_HTML
856 # if !wxUSE_FILESYSTEM
857 # ifdef wxABORT_ON_CONFIG_ERROR
858 # error "wxHTML requires wxFileSystem"
859 # else
860 # undef wxUSE_FILESYSTEM
861 # define wxUSE_FILESYSTEM 1
862 # endif
863 # endif
864 #endif /* wxUSE_HTML */
865
866 #if wxUSE_FILESYSTEM
867 # if !wxUSE_STREAMS
868 # ifdef wxABORT_ON_CONFIG_ERROR
869 # error "wxUSE_FILESYSTEM requires wxUSE_STREAMS"
870 # else
871 # undef wxUSE_STREAMS
872 # define wxUSE_STREAMS 1
873 # endif
874 # endif
875 #endif /* wxUSE_FILESYSTEM */
876
877 #if wxUSE_FS_INET
878 # if !wxUSE_PROTOCOL
879 # ifdef wxABORT_ON_CONFIG_ERROR
880 # error "wxUSE_FS_INET requires wxUSE_PROTOCOL"
881 # else
882 # undef wxUSE_PROTOCOL
883 # define wxUSE_PROTOCOL 1
884 # endif
885 # endif
886 #endif /* wxUSE_FS_INET */
887
888 #if wxUSE_STOPWATCH || wxUSE_DATETIME
889 # if !wxUSE_LONGLONG
890 # ifdef wxABORT_ON_CONFIG_ERROR
891 # error "wxUSE_STOPWATCH and wxUSE_DATETIME require wxUSE_LONGLONG"
892 # else
893 # undef wxUSE_LONGLONG
894 # define wxUSE_LONGLONG 1
895 # endif
896 # endif
897 #endif /* wxUSE_STOPWATCH */
898
899 #if wxUSE_MIMETYPE && !wxUSE_TEXTFILE
900 # ifdef wxABORT_ON_CONFIG_ERROR
901 # error "wxUSE_MIMETYPE requires wxUSE_TEXTFILE"
902 # else
903 # undef wxUSE_TEXTFILE
904 # define wxUSE_TEXTFILE 1
905 # endif
906 #endif /* wxUSE_MIMETYPE */
907
908 #if wxUSE_TEXTFILE && !wxUSE_TEXTBUFFER
909 # ifdef wxABORT_ON_CONFIG_ERROR
910 # error "wxUSE_TEXTFILE requires wxUSE_TEXTBUFFER"
911 # else
912 # undef wxUSE_TEXTBUFFER
913 # define wxUSE_TEXTBUFFER 1
914 # endif
915 #endif /* wxUSE_TEXTFILE */
916
917 #if wxUSE_TEXTFILE && !wxUSE_FILE
918 # ifdef wxABORT_ON_CONFIG_ERROR
919 # error "wxUSE_TEXTFILE requires wxUSE_FILE"
920 # else
921 # undef wxUSE_FILE
922 # define wxUSE_FILE 1
923 # endif
924 #endif /* wxUSE_TEXTFILE */
925
926 #if wxUSE_UNICODE_MSLU && !wxUSE_UNICODE
927 # ifdef wxABORT_ON_CONFIG_ERROR
928 # error "wxUSE_UNICODE_MSLU requires wxUSE_UNICODE"
929 # else
930 # undef wxUSE_UNICODE
931 # define wxUSE_UNICODE 1
932 # endif
933 #endif /* wxUSE_UNICODE_MSLU */
934
935 /* ODBC and Unicode are now compatible */
936
937 #if 0 /* wxUSE_ODBC && wxUSE_UNICODE */
938 # ifdef wxABORT_ON_CONFIG_ERROR
939 /* (ODBC classes aren't Unicode-compatible yet) */
940 # error "wxUSE_ODBC can't be used with wxUSE_UNICODE"
941 # else
942 # undef wxUSE_ODBC
943 # define wxUSE_ODBC 0
944 # endif
945 #endif /* wxUSE_ODBC */
946
947 #if wxUSE_XML && !wxUSE_WCHAR_T
948 # ifdef wxABORT_ON_CONFIG_ERROR
949 # error "wxUSE_XML requires wxUSE_WCHAR_T"
950 # else
951 # undef wxUSE_XML
952 # define wxUSE_XML 0
953 # endif
954 #endif /* wxUSE_UNICODE_MSLU */
955
956 #if !wxUSE_DYNLIB_CLASS
957 # if wxUSE_DYNAMIC_LOADER
958 # ifdef wxABORT_ON_CONFIG_ERROR
959 # error "wxUSE_DYNAMIC_LOADER requires wxUSE_DYNLIB_CLASS."
960 # else
961 # define wxUSE_DYNLIB_CLASS 1
962 # endif
963 # endif
964 #endif /* wxUSE_DYNLIB_CLASS */
965
966 #if wxUSE_ZIPSTREAM
967 # if !wxUSE_ZLIB
968 # ifdef wxABORT_ON_CONFIG_ERROR
969 # error "wxZip requires wxZlib"
970 # else
971 # undef wxUSE_ZLIB
972 # define wxUSE_ZLIB 1
973 # endif
974 # endif
975 # if !wxUSE_ARCHIVE_STREAMS
976 # ifdef wxABORT_ON_CONFIG_ERROR
977 # error "wxZip requires wxArchive"
978 # else
979 # undef wxUSE_ARCHIVE_STREAMS
980 # define wxUSE_ARCHIVE_STREAMS 1
981 # endif
982 # endif
983 #endif /* wxUSE_ZIPSTREAM */
984
985 /* the rest of the tests is for the GUI settings only */
986 #if wxUSE_GUI
987
988 #if wxUSE_BUTTON || \
989 wxUSE_CALENDARCTRL || \
990 wxUSE_CARET || \
991 wxUSE_COMBOBOX || \
992 wxUSE_BMPBUTTON || \
993 wxUSE_CHECKBOX || \
994 wxUSE_CHECKLISTBOX || \
995 wxUSE_CHOICE || \
996 wxUSE_GAUGE || \
997 wxUSE_GRID || \
998 wxUSE_LISTBOX || \
999 wxUSE_LISTCTRL || \
1000 wxUSE_NOTEBOOK || \
1001 wxUSE_RADIOBOX || \
1002 wxUSE_RADIOBTN || \
1003 wxUSE_SCROLLBAR || \
1004 wxUSE_SLIDER || \
1005 wxUSE_SPINBTN || \
1006 wxUSE_SPINCTRL || \
1007 wxUSE_STATBMP || \
1008 wxUSE_STATBOX || \
1009 wxUSE_STATLINE || \
1010 wxUSE_STATTEXT || \
1011 wxUSE_STATUSBAR || \
1012 wxUSE_TEXTCTRL || \
1013 wxUSE_TOOLBAR || \
1014 wxUSE_TREECTRL
1015 # if !wxUSE_CONTROLS
1016 # ifdef wxABORT_ON_CONFIG_ERROR
1017 # error "wxUSE_CONTROLS unset but some controls used"
1018 # else
1019 # undef wxUSE_CONTROLS
1020 # define wxUSE_CONTROLS 1
1021 # endif
1022 # endif
1023 #endif /* controls */
1024
1025 #if wxUSE_BMPBUTTON
1026 # if !wxUSE_BUTTON
1027 # ifdef wxABORT_ON_CONFIG_ERROR
1028 # error "wxUSE_BMPBUTTON requires wxUSE_BUTTON"
1029 # else
1030 # undef wxUSE_BUTTON
1031 # define wxUSE_BUTTON 1
1032 # endif
1033 # endif
1034 #endif /* wxUSE_BMPBUTTON */
1035
1036 #if wxUSE_NOTEBOOK || wxUSE_LISTBOOK || wxUSE_CHOICEBOOK
1037 # if defined(wxUSE_BOOKCTRL) && !wxUSE_BOOKCTRL
1038 # ifdef wxABORT_ON_CONFIG_ERROR
1039 # error "wxUSE_BOOKCTRL must be set."
1040 # else
1041 # undef wxUSE_BOOKCTRL
1042 # endif
1043 # endif
1044
1045 # ifndef wxUSE_BOOKCTRL
1046 # define wxUSE_BOOKCTRL 1
1047 # endif
1048 #endif /* wxUSE_NOTEBOOK */
1049
1050 #if wxUSE_LISTBOOK
1051 # if !wxUSE_LISTCTRL
1052 # ifdef wxABORT_ON_CONFIG_ERROR
1053 # error "wxListbook requires wxListCtrl"
1054 # else
1055 # undef wxUSE_LISTCTRL
1056 # define wxUSE_LISTCTRL 1
1057 # endif
1058 # endif
1059 #endif /* wxUSE_LISTBOOK */
1060
1061 #if wxUSE_CHOICEBOOK
1062 # if !wxUSE_CHOICE
1063 # ifdef wxABORT_ON_CONFIG_ERROR
1064 # error "wxChoicebook requires wxChoice"
1065 # else
1066 # undef wxUSE_CHOICE
1067 # define wxUSE_CHOICE 1
1068 # endif
1069 # endif
1070 #endif /* wxUSE_CHOICEBOOK */
1071
1072 /* don't attempt to use native status bar on the platforms not having it */
1073 #ifndef wxUSE_NATIVE_STATUSBAR
1074 # define wxUSE_NATIVE_STATUSBAR 0
1075 #elif wxUSE_NATIVE_STATUSBAR
1076 # if defined(__WXUNIVERSAL__) || !( defined(__WXMSW__) || \
1077 defined(__WXMAC__) || \
1078 defined(__WXPALMOS__) )
1079 # undef wxUSE_NATIVE_STATUSBAR
1080 # define wxUSE_NATIVE_STATUSBAR 0
1081 # endif
1082 #endif
1083
1084 /* wxUniv-specific dependencies */
1085 #if defined(__WXUNIVERSAL__)
1086 # if (wxUSE_COMBOBOX || wxUSE_MENUS) && !wxUSE_POPUPWIN
1087 # ifdef wxABORT_ON_CONFIG_ERROR
1088 # error "wxUSE_POPUPWIN must be defined to use comboboxes/menus"
1089 # else
1090 # undef wxUSE_POPUPWIN
1091 # define wxUSE_POPUPWIN 1
1092 # endif
1093 # endif
1094
1095 # if wxUSE_COMBOBOX
1096 # if !wxUSE_LISTBOX
1097 # ifdef wxABORT_ON_CONFIG_ERROR
1098 # error "wxComboBox requires wxListBox in wxUniversal"
1099 # else
1100 # undef wxUSE_LISTBOX
1101 # define wxUSE_LISTBOX 1
1102 # endif
1103 # endif
1104 # endif /* wxUSE_COMBOBOX */
1105
1106 # if wxUSE_RADIOBTN
1107 # if !wxUSE_CHECKBOX
1108 # ifdef wxABORT_ON_CONFIG_ERROR
1109 # error "wxUSE_RADIOBTN requires wxUSE_CHECKBOX in wxUniversal"
1110 # else
1111 # undef wxUSE_CHECKBOX
1112 # define wxUSE_CHECKBOX 1
1113 # endif
1114 # endif
1115 # endif /* wxUSE_RADIOBTN */
1116
1117 # if wxUSE_TEXTCTRL
1118 # if !wxUSE_CARET
1119 # ifdef wxABORT_ON_CONFIG_ERROR
1120 # error "wxTextCtrl requires wxCaret in wxUniversal"
1121 # else
1122 # undef wxUSE_CARET
1123 # define wxUSE_CARET 1
1124 # endif
1125 # endif /* wxUSE_CARET */
1126
1127 # if !wxUSE_SCROLLBAR
1128 # ifdef wxABORT_ON_CONFIG_ERROR
1129 # error "wxTextCtrl requires wxScrollBar in wxUniversal"
1130 # else
1131 # undef wxUSE_SCROLLBAR
1132 # define wxUSE_SCROLLBAR 1
1133 # endif
1134 # endif /* wxUSE_SCROLLBAR */
1135 # endif /* wxUSE_TEXTCTRL */
1136 #endif /* __WXUNIVERSAL__ */
1137
1138 /* wxGTK-specific dependencies */
1139 #ifdef __WXGTK__
1140 # ifndef __WXUNIVERSAL__
1141 # if wxUSE_MDI_ARCHITECTURE && !wxUSE_MENUS
1142 # ifdef wxABORT_ON_CONFIG_ERROR
1143 # error "MDI requires wxUSE_MENUS in wxGTK"
1144 # else
1145 # undef wxUSE_MENUS
1146 # define wxUSE_MENUS 1
1147 # endif
1148 # endif
1149 # endif /* !__WXUNIVERSAL__ */
1150
1151 # if wxUSE_JOYSTICK
1152 # if !wxUSE_THREADS
1153 # ifdef wxABORT_ON_CONFIG_ERROR
1154 # error "wxJoystick requires threads in wxGTK"
1155 # else
1156 # undef wxUSE_JOYSTICK
1157 # define wxUSE_JOYSTICK 0
1158 # endif
1159 # endif
1160 # endif
1161 #endif /* wxGTK && !wxUniv */
1162
1163 /* wxMSW-specific dependencies */
1164 #ifdef __WXMSW__
1165 # ifndef wxUSE_UNICODE_MSLU
1166 # ifdef wxABORT_ON_CONFIG_ERROR
1167 # error "wxUSE_UNICODE_MSLU must be defined."
1168 # else
1169 # define wxUSE_UNICODE_MSLU 0
1170 # endif
1171 # endif /* wxUSE_UNICODE_MSLU */
1172 # ifndef wxUSE_UXTHEME
1173 # ifdef wxABORT_ON_CONFIG_ERROR
1174 # error "wxUSE_UXTHEME must be defined."
1175 # else
1176 # define wxUSE_UXTHEME 0
1177 # endif
1178 # endif /* wxUSE_UXTHEME */
1179 # ifndef wxUSE_UXTHEME_AUTO
1180 # ifdef wxABORT_ON_CONFIG_ERROR
1181 # error "wxUSE_UXTHEME_AUTO must be defined."
1182 # else
1183 # define wxUSE_UXTHEME_AUTO 0
1184 # endif
1185 # endif /* wxUSE_UXTHEME_AUTO */
1186 # ifndef wxUSE_MS_HTML_HELP
1187 # ifdef wxABORT_ON_CONFIG_ERROR
1188 # error "wxUSE_MS_HTML_HELP must be defined."
1189 # else
1190 # define wxUSE_MS_HTML_HELP 0
1191 # endif
1192 # endif /* !defined(wxUSE_MS_HTML_HELP) */
1193 # ifndef wxUSE_DIALUP_MANAGER
1194 # ifdef wxABORT_ON_CONFIG_ERROR
1195 # error "wxUSE_DIALUP_MANAGER must be defined."
1196 # else
1197 # define wxUSE_DIALUP_MANAGER 0
1198 # endif
1199 # endif /* !defined(wxUSE_DIALUP_MANAGER) */
1200
1201 # if !wxUSE_DYNAMIC_LOADER
1202 # if wxUSE_MS_HTML_HELP
1203 # ifdef wxABORT_ON_CONFIG_ERROR
1204 # error "wxUSE_MS_HTML_HELP requires wxUSE_DYNAMIC_LOADER."
1205 # else
1206 # define wxUSE_DYNAMIC_LOADER 1
1207 # endif
1208 # endif
1209 # if wxUSE_DIALUP_MANAGER
1210 # ifdef wxABORT_ON_CONFIG_ERROR
1211 # error "wxUSE_DIALUP_MANAGER requires wxUSE_DYNAMIC_LOADER."
1212 # else
1213 # define wxUSE_DYNAMIC_LOADER 1
1214 # endif
1215 # endif
1216 # endif /* wxUSE_DYNAMIC_LOADER */
1217
1218 #endif /* wxMSW */
1219
1220 /* wxMAC-specific dependencies */
1221 #ifdef __WXMAC__
1222 # if wxUSE_UNICODE
1223 # if !TARGET_CARBON
1224 # ifdef wxABORT_ON_CONFIG_ERROR
1225 # error "wxUSE_UNICODE is only supported for Carbon Targets."
1226 # else
1227 # define wxUSE_UNICODE 0
1228 # endif
1229 # endif
1230 # endif
1231 #endif /* wxMAC */
1232 /* wxMotif-specific dependencies */
1233 #if defined(__WXMOTIF__) && wxUSE_NOTEBOOK && !wxUSE_TAB_DIALOG
1234 # undef wxUSE_TAB_DIALOG
1235 # define wxUSE_TAB_DIALOG 1
1236 #endif
1237
1238 /* wxMGL-specific dependencies */
1239 #ifdef __WXMGL__
1240 # if !wxUSE_PALETTE
1241 # error "wxMGL requires wxUSE_PALETTE=1"
1242 # endif
1243 #endif /* wxMGL */
1244
1245 /* Hopefully we can emulate these dialogs in due course */
1246 #if defined(__SMARTPHONE__) && defined(__WXWINCE__)
1247 # ifdef wxUSE_COLOURDLG
1248 # undef wxUSE_COLOURDLG
1249 # define wxUSE_COLOURDLG 0
1250 # endif
1251 #endif /* __SMARTPHONE__ && __WXWINCE__ */
1252
1253
1254 /* generic controls dependencies */
1255 #if !defined(__WXMSW__) || defined(__WXUNIVERSAL__)
1256 # if wxUSE_FONTDLG || wxUSE_FILEDLG || wxUSE_CHOICEDLG
1257 /* all common controls are needed by these dialogs */
1258 # if !defined(wxUSE_CHOICE) || \
1259 !defined(wxUSE_TEXTCTRL) || \
1260 !defined(wxUSE_BUTTON) || \
1261 !defined(wxUSE_CHECKBOX) || \
1262 !defined(wxUSE_STATTEXT)
1263 # ifdef wxABORT_ON_CONFIG_ERROR
1264 # error "These common controls are needed by common dialogs"
1265 # else
1266 # undef wxUSE_CHOICE
1267 # define wxUSE_CHOICE 1
1268 # undef wxUSE_TEXTCTRL
1269 # define wxUSE_TEXTCTRL 1
1270 # undef wxUSE_BUTTON
1271 # define wxUSE_BUTTON 1
1272 # undef wxUSE_CHECKBOX
1273 # define wxUSE_CHECKBOX 1
1274 # undef wxUSE_STATTEXT
1275 # define wxUSE_STATTEXT 1
1276 # endif
1277 # endif
1278 # endif
1279 #endif /* !wxMSW || wxUniv */
1280
1281 /* common dependencies */
1282 #if wxUSE_CALENDARCTRL
1283 # if !(wxUSE_SPINBTN && wxUSE_COMBOBOX)
1284 # ifdef wxABORT_ON_CONFIG_ERROR
1285 # error "wxCalendarCtrl requires wxSpinButton and wxComboBox"
1286 # else
1287 # undef wxUSE_SPINBTN
1288 # undef wxUSE_COMBOBOX
1289 # define wxUSE_SPINBTN 1
1290 # define wxUSE_COMBOBOX 1
1291 # endif
1292 # endif
1293
1294 # if !wxUSE_DATETIME
1295 # ifdef wxABORT_ON_CONFIG_ERROR
1296 # error "wxCalendarCtrl requires wxUSE_DATETIME"
1297 # else
1298 # undef wxUSE_DATETIME
1299 # define wxUSE_DATETIME 1
1300 # endif
1301 # endif
1302 #endif /* wxUSE_CALENDARCTRL */
1303
1304 #if wxUSE_DATEPICKCTRL
1305 # if !wxUSE_DATETIME
1306 # ifdef wxABORT_ON_CONFIG_ERROR
1307 # error "wxDatePickerCtrl requires wxUSE_DATETIME"
1308 # else
1309 # undef wxUSE_DATETIME
1310 # define wxUSE_DATETIME 1
1311 # endif
1312 # endif
1313 #endif /* wxUSE_DATEPICKCTRL */
1314
1315 #if wxUSE_CHECKLISTBOX
1316 # if !wxUSE_LISTBOX
1317 # ifdef wxABORT_ON_CONFIG_ERROR
1318 # error "wxCheckListBox requires wxListBox"
1319 # else
1320 # undef wxUSE_LISTBOX
1321 # define wxUSE_LISTBOX 1
1322 # endif
1323 # endif
1324 #endif /* wxUSE_CHECKLISTBOX */
1325
1326 #if wxUSE_CHOICEDLG
1327 # if !wxUSE_LISTBOX
1328 # ifdef wxABORT_ON_CONFIG_ERROR
1329 # error "Choice dialogs requires wxListBox"
1330 # else
1331 # undef wxUSE_LISTBOX
1332 # define wxUSE_LISTBOX 1
1333 # endif
1334 # endif
1335 #endif /* wxUSE_CHOICEDLG */
1336
1337 #if wxUSE_HELP
1338 # if !wxUSE_BMPBUTTON
1339 # ifdef wxABORT_ON_CONFIG_ERROR
1340 # error "wxUSE_HELP requires wxUSE_BMPBUTTON"
1341 # else
1342 # undef wxUSE_BMPBUTTON
1343 # define wxUSE_BMPBUTTON 1
1344 # endif
1345 # endif
1346
1347 # if !wxUSE_CHOICEDLG
1348 # ifdef wxABORT_ON_CONFIG_ERROR
1349 # error "wxUSE_HELP requires wxUSE_CHOICEDLG"
1350 # else
1351 # undef wxUSE_CHOICEDLG
1352 # define wxUSE_CHOICEDLG 1
1353 # endif
1354 # endif
1355 #endif /* wxUSE_HELP */
1356
1357 #if wxUSE_WXHTML_HELP
1358 # if !wxUSE_HELP || !wxUSE_HTML || !wxUSE_COMBOBOX || !wxUSE_NOTEBOOK || !wxUSE_SPINCTRL
1359 # ifdef wxABORT_ON_CONFIG_ERROR
1360 # error "Built in help controller can't be compiled"
1361 # else
1362 # undef wxUSE_HELP
1363 # define wxUSE_HELP 1
1364 # undef wxUSE_HTML
1365 # define wxUSE_HTML 1
1366 # undef wxUSE_COMBOBOX
1367 # define wxUSE_COMBOBOX 1
1368 # undef wxUSE_NOTEBOOK
1369 # define wxUSE_NOTEBOOK 1
1370 # undef wxUSE_SPINCTRL
1371 # define wxUSE_SPINCTRL 1
1372 # endif
1373 # endif
1374 #endif /* wxUSE_WXHTML_HELP */
1375
1376 #if !wxUSE_IMAGE
1377 /*
1378 The default wxUSE_IMAGE setting is 1, so if it's set to 0 we assume the
1379 user explicitly wants this and disable all other features that require
1380 wxUSE_IMAGE.
1381 */
1382 # if wxUSE_DRAGIMAGE
1383 # ifdef wxABORT_ON_CONFIG_ERROR
1384 # error "wxUSE_DRAGIMAGE requires wxUSE_IMAGE"
1385 # else
1386 # undef wxUSE_DRAGIMAGE
1387 # define wxUSE_DRAGIMAGE 0
1388 # endif
1389 # endif
1390
1391 # if wxUSE_LIBPNG
1392 # ifdef wxABORT_ON_CONFIG_ERROR
1393 # error "wxUSE_LIBPNG requires wxUSE_IMAGE"
1394 # else
1395 # undef wxUSE_LIBPNG
1396 # define wxUSE_LIBPNG 0
1397 # endif
1398 # endif
1399
1400 # if wxUSE_LIBJPEG
1401 # ifdef wxABORT_ON_CONFIG_ERROR
1402 # error "wxUSE_LIBJPEG requires wxUSE_IMAGE"
1403 # else
1404 # undef wxUSE_LIBJPEG
1405 # define wxUSE_LIBJPEG 0
1406 # endif
1407 # endif
1408
1409 # if wxUSE_LIBTIFF
1410 # ifdef wxABORT_ON_CONFIG_ERROR
1411 # error "wxUSE_LIBTIFF requires wxUSE_IMAGE"
1412 # else
1413 # undef wxUSE_LIBTIFF
1414 # define wxUSE_LIBTIFF 0
1415 # endif
1416 # endif
1417
1418 # if wxUSE_GIF
1419 # ifdef wxABORT_ON_CONFIG_ERROR
1420 # error "wxUSE_GIF requires wxUSE_IMAGE"
1421 # else
1422 # undef wxUSE_GIF
1423 # define wxUSE_GIF 0
1424 # endif
1425 # endif
1426
1427 # if wxUSE_PNM
1428 # ifdef wxABORT_ON_CONFIG_ERROR
1429 # error "wxUSE_PNM requires wxUSE_IMAGE"
1430 # else
1431 # undef wxUSE_PNM
1432 # define wxUSE_PNM 0
1433 # endif
1434 # endif
1435
1436 # if wxUSE_PCX
1437 # ifdef wxABORT_ON_CONFIG_ERROR
1438 # error "wxUSE_PCX requires wxUSE_IMAGE"
1439 # else
1440 # undef wxUSE_PCX
1441 # define wxUSE_PCX 0
1442 # endif
1443 # endif
1444
1445 # if wxUSE_IFF
1446 # ifdef wxABORT_ON_CONFIG_ERROR
1447 # error "wxUSE_IFF requires wxUSE_IMAGE"
1448 # else
1449 # undef wxUSE_IFF
1450 # define wxUSE_IFF 0
1451 # endif
1452 # endif
1453
1454 # if wxUSE_TOOLBAR
1455 # ifdef wxABORT_ON_CONFIG_ERROR
1456 # error "wxUSE_TOOLBAR requires wxUSE_IMAGE"
1457 # else
1458 # undef wxUSE_TOOLBAR
1459 # define wxUSE_TOOLBAR 0
1460 # endif
1461 # endif
1462
1463 # if wxUSE_XPM
1464 # ifdef wxABORT_ON_CONFIG_ERROR
1465 # error "wxUSE_XPM requires wxUSE_IMAGE"
1466 # else
1467 # undef wxUSE_XPM
1468 # define wxUSE_XPM 0
1469 # endif
1470 # endif
1471
1472 #endif /* !wxUSE_IMAGE */
1473
1474 #if wxUSE_DOC_VIEW_ARCHITECTURE
1475 # if !wxUSE_MENUS
1476 # ifdef wxABORT_ON_CONFIG_ERROR
1477 # error "DocView requires wxUSE_MENUS"
1478 # else
1479 # undef wxUSE_MENUS
1480 # define wxUSE_MENUS 1
1481 # endif
1482 # endif
1483
1484 # if !wxUSE_CHOICEDLG
1485 # ifdef wxABORT_ON_CONFIG_ERROR
1486 # error "DocView requires wxUSE_CHOICEDLG"
1487 # else
1488 # undef wxUSE_CHOICEDLG
1489 # define wxUSE_CHOICEDLG 1
1490 # endif
1491 # endif
1492
1493 # if !wxUSE_STREAMS && !wxUSE_STD_IOSTREAM
1494 # ifdef wxABORT_ON_CONFIG_ERROR
1495 # error "DocView requires wxUSE_STREAMS or wxUSE_STD_IOSTREAM"
1496 # else
1497 # undef wxUSE_STREAMS
1498 # define wxUSE_STREAMS 1
1499 # endif
1500 # endif
1501 #endif /* wxUSE_DOC_VIEW_ARCHITECTURE */
1502
1503 #if wxUSE_PRINTING_ARCHITECTURE
1504 # if !wxUSE_COMBOBOX
1505 # ifdef wxABORT_ON_CONFIG_ERROR
1506 # error "Print dialog requires wxUSE_COMBOBOX"
1507 # else
1508 # undef wxUSE_COMBOBOX
1509 # define wxUSE_COMBOBOX 1
1510 # endif
1511 # endif
1512 #endif /* wxUSE_PRINTING_ARCHITECTURE */
1513
1514 #if wxUSE_MDI_ARCHITECTURE
1515 # if !wxUSE_MDI
1516 # ifdef wxABORT_ON_CONFIG_ERROR
1517 # error "MDI requires wxUSE_MDI"
1518 # else
1519 # undef wxUSE_MDI
1520 # define wxUSE_MDI 1
1521 # endif
1522 # endif
1523
1524 # if !wxUSE_DOC_VIEW_ARCHITECTURE
1525 # ifdef wxABORT_ON_CONFIG_ERROR
1526 # error "MDI requires wxUSE_DOC_VIEW_ARCHITECTURE"
1527 # else
1528 # undef wxUSE_DOC_VIEW_ARCHITECTURE
1529 # define wxUSE_DOC_VIEW_ARCHITECTURE 1
1530 # endif
1531 # endif
1532 #endif /* wxUSE_MDI_ARCHITECTURE */
1533
1534 #if !wxUSE_FILEDLG
1535 # if wxUSE_DOC_VIEW_ARCHITECTURE || wxUSE_WXHTML_HELP
1536 # ifdef wxABORT_ON_CONFIG_ERROR
1537 # error "wxFileDialog must be compiled as well"
1538 # else
1539 # undef wxUSE_FILEDLG
1540 # define wxUSE_FILEDLG 1
1541 # endif
1542 # endif
1543 #endif /* wxUSE_FILEDLG */
1544
1545 #if !wxUSE_GAUGE || !wxUSE_BUTTON
1546 # if wxUSE_PROGRESSDLG && !defined(__WXPALMOS__)
1547 # ifdef wxABORT_ON_CONFIG_ERROR
1548 # error "Generic progress dialog requires wxUSE_GAUGE and wxUSE_BUTTON"
1549 # else
1550 # undef wxUSE_GAUGE
1551 # undef wxUSE_BUTTON
1552 # define wxUSE_GAUGE 1
1553 # define wxUSE_BUTTON 1
1554 # endif
1555 # endif
1556 #endif /* !wxUSE_GAUGE */
1557
1558 #if !wxUSE_BUTTON
1559 # if wxUSE_FONTDLG || \
1560 wxUSE_FILEDLG || \
1561 wxUSE_CHOICEDLG || \
1562 wxUSE_NUMBERDLG || \
1563 wxUSE_TEXTDLG || \
1564 wxUSE_DIRDLG || \
1565 wxUSE_STARTUP_TIPS || \
1566 wxUSE_WIZARDDLG
1567 # ifdef wxABORT_ON_CONFIG_ERROR
1568 # error "Common and generic dialogs require wxUSE_BUTTON"
1569 # else
1570 # undef wxUSE_BUTTON
1571 # define wxUSE_BUTTON 1
1572 # endif
1573 # endif
1574 #endif /* !wxUSE_BUTTON */
1575
1576 #if !wxUSE_TOOLBAR
1577 # if wxUSE_TOOLBAR_NATIVE
1578 # ifdef wxABORT_ON_CONFIG_ERROR
1579 # error "wxUSE_TOOLBAR is set to 0 but wxUSE_TOOLBAR_NATIVE is set to 1"
1580 # else
1581 # undef wxUSE_TOOLBAR_NATIVE
1582 # define wxUSE_TOOLBAR_NATIVE 0
1583 # endif
1584 # endif
1585
1586 # if wxUSE_TOOLBAR_SIMPLE
1587 # ifdef wxABORT_ON_CONFIG_ERROR
1588 # error "wxUSE_TOOLBAR is set to 0 but wxUSE_TOOLBAR_SIMPLE is set to 1"
1589 # else
1590 # undef wxUSE_TOOLBAR_SIMPLE
1591 # define wxUSE_TOOLBAR_SIMPLE 0
1592 # endif
1593 # endif
1594 #endif
1595
1596 #if !wxUSE_IMAGLIST
1597 # if wxUSE_TREECTRL || wxUSE_NOTEBOOK || wxUSE_LISTCTRL
1598 # ifdef wxABORT_ON_CONFIG_ERROR
1599 # error "wxImageList must be compiled as well"
1600 # else
1601 # undef wxUSE_IMAGLIST
1602 # define wxUSE_IMAGLIST 1
1603 # endif
1604 # endif
1605 #endif /* !wxUSE_IMAGLIST */
1606
1607 #if !wxUSE_MSGDLG
1608 # ifdef wxABORT_ON_CONFIG_ERROR
1609 /* FIXME: should compile without it, of course, but doesn't */
1610 # error "wxMessageBox is always needed"
1611 # else
1612 # undef wxUSE_MSGDLG
1613 # define wxUSE_MSGDLG 1
1614 # endif
1615 #endif
1616
1617 #if wxUSE_RADIOBOX
1618 # if !wxUSE_RADIOBTN
1619 # ifdef wxABORT_ON_CONFIG_ERROR
1620 # error "wxUSE_RADIOBOX requires wxUSE_RADIOBTN"
1621 # else
1622 # undef wxUSE_RADIOBTN
1623 # define wxUSE_RADIOBTN 1
1624 # endif
1625 # endif
1626 # if !wxUSE_STATBOX && !defined(__WXPALMOS__)
1627 # ifdef wxABORT_ON_CONFIG_ERROR
1628 # error "wxUSE_RADIOBOX requires wxUSE_STATBOX"
1629 # else
1630 # undef wxUSE_STATBOX
1631 # define wxUSE_STATBOX 1
1632 # endif
1633 # endif
1634 #endif /* wxUSE_RADIOBOX */
1635
1636 #if wxUSE_LOGWINDOW
1637 # if !wxUSE_TEXTCTRL
1638 # ifdef wxABORT_ON_CONFIG_ERROR
1639 # error "wxUSE_LOGWINDOW requires wxUSE_TEXTCTRL"
1640 # else
1641 # undef wxUSE_TEXTCTRL
1642 # define wxUSE_TEXTCTRL 1
1643 # endif
1644 # endif
1645 #endif /* wxUSE_LOGWINDOW */
1646
1647 #if wxUSE_LOG_DIALOG
1648 # if !wxUSE_LISTCTRL || !wxUSE_BUTTON
1649 # ifdef wxABORT_ON_CONFIG_ERROR
1650 # error "wxUSE_LOG_DIALOG requires wxUSE_LISTCTRL and wxUSE_BUTTON"
1651 # else
1652 # undef wxUSE_LISTCTRL
1653 # define wxUSE_LISTCTRL 1
1654 # undef wxUSE_BUTTON
1655 # define wxUSE_BUTTON 1
1656 # endif
1657 # endif
1658 #endif /* wxUSE_LOG_DIALOG */
1659
1660 #if wxUSE_CLIPBOARD && !wxUSE_DATAOBJ
1661 # ifdef wxABORT_ON_CONFIG_ERROR
1662 # error "wxClipboard requires wxDataObject"
1663 # else
1664 # undef wxUSE_DATAOBJ
1665 # define wxUSE_DATAOBJ 1
1666 # endif
1667 #endif /* wxUSE_CLIPBOARD */
1668
1669 #if wxUSE_WX_RESOURCES && !wxUSE_PROLOGIO
1670 # ifdef wxABORT_ON_CONFIG_ERROR
1671 # error "wxr resources require PrologIO"
1672 # else
1673 # undef wxUSE_PROLOGIO
1674 # define wxUSE_PROLOGIO 1
1675 # endif
1676 #endif /* wxUSE_WX_RESOURCES */
1677
1678 #if wxUSE_XRC && !wxUSE_XML
1679 # ifdef wxABORT_ON_CONFIG_ERROR
1680 # error "wxUSE_XRC requires wxUSE_XML"
1681 # else
1682 # undef wxUSE_XRC
1683 # define wxUSE_XRC 0
1684 # endif
1685 #endif /* wxUSE_XRC */
1686
1687 #if wxUSE_SOCKETS && !wxUSE_STOPWATCH
1688 # ifdef wxABORT_ON_CONFIG_ERROR
1689 # error "wxUSE_SOCKETS requires wxUSE_STOPWATCH"
1690 # else
1691 # undef wxUSE_SOCKETS
1692 # define wxUSE_SOCKETS 0
1693 # endif
1694 #endif /* wxUSE_SOCKETS */
1695
1696 #endif /* wxUSE_GUI */
1697