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