]> git.saurik.com Git - wxWidgets.git/blame - include/wx/chkconf.h
Added wxTreeCtrl::GetItemParent to deprecate GetParent.
[wxWidgets.git] / include / wx / chkconf.h
CommitLineData
1e6feb95
VZ
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
6962f34e
VZ
22/*
23 global features
24 */
25
26/* GUI build by default */
27#if !defined(wxUSE_GUI)
28# define wxUSE_GUI 1
29#endif /* !defined(wxUSE_GUI) */
30
31/* wxBase doesn't need compatibility settings as it's a new port */
32#if !wxUSE_GUI
33# undef WXWIN_COMPATIBILITY
34# undef WXWIN_COMPATIBILITY_2
35# undef WXWIN_COMPATIBILITY_2_2
36# define WXWIN_COMPATIBILITY 0
37# define WXWIN_COMPATIBILITY_2 0
38# define WXWIN_COMPATIBILITY_2_2 0
39#endif /* !wxUSE_GUI */
03169422 40
1e6feb95 41/*
03169422
RL
42 tests for non GUI features
43 */
44
45#ifndef wxUSE_DYNLIB_CLASS
46# ifdef wxABORT_ON_CONFIG_ERROR
47# error "wxUSE_DYNLIB_CLASS must be defined."
48# else
49# define wxUSE_DYNLIB_CLASS 0
50# endif
51#endif /* !defined(wxUSE_DYNLIB_CLASS) */
52
c7f3eecc
VZ
53#ifndef wxUSE_FILESYSTEM
54# ifdef wxABORT_ON_CONFIG_ERROR
55# error "wxUSE_FILESYSTEM must be defined."
56# else
57# define wxUSE_FILESYSTEM 0
58# endif
59#endif /* !defined(wxUSE_FILESYSTEM) */
60
6fb17fd5 61/* don't give an error about this one yet, it's not fully implemented */
05815ab3 62#ifndef wxUSE_FSVOLUME
6fb17fd5 63# define wxUSE_FSVOLUME 0
05815ab3
VZ
64#endif /* !defined(wxUSE_FSVOLUME) */
65
03169422
RL
66#ifndef wxUSE_DYNAMIC_LOADER
67# ifdef wxABORT_ON_CONFIG_ERROR
68# error "wxUSE_DYNAMIC_LOADER must be defined."
69# else
70# define wxUSE_DYNAMIC_LOADER 0
71# endif
72#endif /* !defined(wxUSE_DYNAMIC_LOADER) */
73
a5d46b73
VZ
74#ifndef wxUSE_LOG
75# ifdef wxABORT_ON_CONFIG_ERROR
76# error "wxUSE_LOG must be defined."
77# else
78# define wxUSE_LOG 0
79# endif
80#endif /* !defined(wxUSE_LOG) */
81
82#ifndef wxUSE_LONGLONG
83# ifdef wxABORT_ON_CONFIG_ERROR
84# error "wxUSE_LONGLONG must be defined."
85# else
86# define wxUSE_LONGLONG 0
87# endif
88#endif /* !defined(wxUSE_LONGLONG) */
89
90#ifndef wxUSE_MIMETYPE
91# ifdef wxABORT_ON_CONFIG_ERROR
92# error "wxUSE_MIMETYPE must be defined."
93# else
94# define wxUSE_MIMETYPE 0
95# endif
96#endif /* !defined(wxUSE_MIMETYPE) */
97
2b5f62a0
VZ
98#ifndef wxUSE_PROLOGIO
99# ifdef wxABORT_ON_CONFIG_ERROR
100# error "wxUSE_PROLOGIO must be defined."
101# else
102# define wxUSE_PROLOGIO 0
103# endif
104#endif /* !defined(wxUSE_PROLOGIO) */
105
a5d46b73
VZ
106#ifndef wxUSE_PROTOCOL
107# ifdef wxABORT_ON_CONFIG_ERROR
108# error "wxUSE_PROTOCOL must be defined."
109# else
110# define wxUSE_PROTOCOL 0
111# endif
112#endif /* !defined(wxUSE_PROTOCOL) */
113
114/* we may not define wxUSE_PROTOCOL_XXX if wxUSE_PROTOCOL is set to 0 */
115#if !wxUSE_PROTOCOL
116# undef wxUSE_PROTOCOL_HTTP
117# undef wxUSE_PROTOCOL_FTP
118# undef wxUSE_PROTOCOL_FILE
119# define wxUSE_PROTOCOL_HTTP 0
120# define wxUSE_PROTOCOL_FTP 0
121# define wxUSE_PROTOCOL_FILE 0
122#endif /* wxUSE_PROTOCOL */
123
124#ifndef wxUSE_PROTOCOL_HTTP
125# ifdef wxABORT_ON_CONFIG_ERROR
126# error "wxUSE_PROTOCOL_HTTP must be defined."
127# else
128# define wxUSE_PROTOCOL_HTTP 0
129# endif
130#endif /* !defined(wxUSE_PROTOCOL_HTTP) */
131
132#ifndef wxUSE_PROTOCOL_FTP
133# ifdef wxABORT_ON_CONFIG_ERROR
134# error "wxUSE_PROTOCOL_FTP must be defined."
135# else
136# define wxUSE_PROTOCOL_FTP 0
137# endif
138#endif /* !defined(wxUSE_PROTOCOL_FTP) */
139
140#ifndef wxUSE_PROTOCOL_FILE
141# ifdef wxABORT_ON_CONFIG_ERROR
142# error "wxUSE_PROTOCOL_FILE must be defined."
143# else
144# define wxUSE_PROTOCOL_FILE 0
145# endif
146#endif /* !defined(wxUSE_PROTOCOL_FILE) */
147
148#ifndef wxUSE_REGEX
149# ifdef wxABORT_ON_CONFIG_ERROR
150# error "wxUSE_REGEX must be defined."
151# else
152# define wxUSE_REGEX 0
153# endif
154#endif /* !defined(wxUSE_REGEX) */
155
156#ifndef wxUSE_SOCKETS
157# ifdef wxABORT_ON_CONFIG_ERROR
158# error "wxUSE_SOCKETS must be defined."
159# else
160# define wxUSE_SOCKETS 0
161# endif
162#endif /* !defined(wxUSE_SOCKETS) */
163
164#ifndef wxUSE_STREAMS
165# ifdef wxABORT_ON_CONFIG_ERROR
166# error "wxUSE_STREAMS must be defined."
167# else
168# define wxUSE_STREAMS 0
169# endif
170#endif /* !defined(wxUSE_STREAMS) */
171
172#ifndef wxUSE_STOPWATCH
173# ifdef wxABORT_ON_CONFIG_ERROR
174# error "wxUSE_STOPWATCH must be defined."
175# else
176# define wxUSE_STOPWATCH 0
177# endif
178#endif /* !defined(wxUSE_STOPWATCH) */
179
180#ifndef wxUSE_TEXTBUFFER
181# ifdef wxABORT_ON_CONFIG_ERROR
182# error "wxUSE_TEXTBUFFER must be defined."
183# else
184# define wxUSE_TEXTBUFFER 0
185# endif
186#endif /* !defined(wxUSE_TEXTBUFFER) */
187
188#ifndef wxUSE_TEXTFILE
189# ifdef wxABORT_ON_CONFIG_ERROR
190# error "wxUSE_TEXTFILE must be defined."
191# else
192# define wxUSE_TEXTFILE 0
193# endif
194#endif /* !defined(wxUSE_TEXTFILE) */
195
196#ifndef wxUSE_UNICODE
197# ifdef wxABORT_ON_CONFIG_ERROR
198# error "wxUSE_UNICODE must be defined."
199# else
200# define wxUSE_UNICODE 0
201# endif
202#endif /* !defined(wxUSE_UNICODE) */
203
204#ifndef wxUSE_URL
205# ifdef wxABORT_ON_CONFIG_ERROR
206# error "wxUSE_URL must be defined."
207# else
208# define wxUSE_URL 0
209# endif
210#endif /* !defined(wxUSE_URL) */
211
03169422
RL
212/*
213 all these tests are for GUI only
1e6feb95
VZ
214 */
215#if wxUSE_GUI
216
217/*
218 all of the settings tested below must be defined or we'd get an error from
219 preprocessor about invalid integer expression
220 */
221
222#ifndef wxUSE_ACCEL
223# ifdef wxABORT_ON_CONFIG_ERROR
224# error "wxUSE_ACCEL must be defined."
225# else
226# define wxUSE_ACCEL 0
227# endif
228#endif /* !defined(wxUSE_ACCEL) */
229
230#ifndef wxUSE_BMPBUTTON
231# ifdef wxABORT_ON_CONFIG_ERROR
232# error "wxUSE_BMPBUTTON must be defined."
233# else
234# define wxUSE_BMPBUTTON 0
235# endif
236#endif /* !defined(wxUSE_BMPBUTTON) */
237
238#ifndef wxUSE_BUTTON
239# ifdef wxABORT_ON_CONFIG_ERROR
240# error "wxUSE_BUTTON must be defined."
241# else
242# define wxUSE_BUTTON 0
243# endif
244#endif /* !defined(wxUSE_BUTTON) */
245
246#ifndef wxUSE_CALENDARCTRL
247# ifdef wxABORT_ON_CONFIG_ERROR
248# error "wxUSE_CALENDARCTRL must be defined."
249# else
250# define wxUSE_CALENDARCTRL 0
251# endif
252#endif /* !defined(wxUSE_CALENDARCTRL) */
253
254#ifndef wxUSE_CARET
255# ifdef wxABORT_ON_CONFIG_ERROR
256# error "wxUSE_CARET must be defined."
257# else
258# define wxUSE_CARET 0
259# endif
260#endif /* !defined(wxUSE_CARET) */
261
262#ifndef wxUSE_CHECKBOX
263# ifdef wxABORT_ON_CONFIG_ERROR
264# error "wxUSE_CHECKBOX must be defined."
265# else
266# define wxUSE_CHECKBOX 0
267# endif
268#endif /* !defined(wxUSE_CHECKBOX) */
269
270#ifndef wxUSE_CHECKLISTBOX
271# ifdef wxABORT_ON_CONFIG_ERROR
272# error "wxUSE_CHECKLISTBOX must be defined."
273# else
274# define wxUSE_CHECKLISTBOX 0
275# endif
276#endif /* !defined(wxUSE_CHECKLISTBOX) */
277
278#ifndef wxUSE_CHOICE
279# ifdef wxABORT_ON_CONFIG_ERROR
280# error "wxUSE_CHOICE must be defined."
281# else
282# define wxUSE_CHOICE 0
283# endif
284#endif /* !defined(wxUSE_CHOICE) */
285
3379ed37
VZ
286#ifndef wxUSE_CHOICEDLG
287# ifdef wxABORT_ON_CONFIG_ERROR
288# error "wxUSE_CHOICEDLG must be defined."
289# else
290# define wxUSE_CHOICEDLG 0
291# endif
292#endif /* !defined(wxUSE_CHOICEDLG) */
293
1e6feb95
VZ
294#ifndef wxUSE_CLIPBOARD
295# ifdef wxABORT_ON_CONFIG_ERROR
296# error "wxUSE_CLIPBOARD must be defined."
297# else
298# define wxUSE_CLIPBOARD 0
299# endif
300#endif /* !defined(wxUSE_CLIPBOARD) */
301
a2c0a9c5
VZ
302#ifndef wxUSE_COLOURDLG
303# ifdef wxABORT_ON_CONFIG_ERROR
304# error "wxUSE_COLOURDLG must be defined."
305# else
306# define wxUSE_COLOURDLG 0
307# endif
308#endif /* !defined(wxUSE_COLOURDLG) */
309
1e6feb95
VZ
310#ifndef wxUSE_COMBOBOX
311# ifdef wxABORT_ON_CONFIG_ERROR
312# error "wxUSE_COMBOBOX must be defined."
313# else
314# define wxUSE_COMBOBOX 0
315# endif
316#endif /* !defined(wxUSE_COMBOBOX) */
317
318#ifndef wxUSE_DATAOBJ
319# ifdef wxABORT_ON_CONFIG_ERROR
320# error "wxUSE_DATAOBJ must be defined."
321# else
322# define wxUSE_DATAOBJ 0
323# endif
324#endif /* !defined(wxUSE_DATAOBJ) */
325
3379ed37
VZ
326#ifndef wxUSE_DOC_VIEW_ARCHITECTURE
327# ifdef wxABORT_ON_CONFIG_ERROR
328# error "wxUSE_DOC_VIEW_ARCHITECTURE must be defined."
329# else
330# define wxUSE_DOC_VIEW_ARCHITECTURE 0
331# endif
332#endif /* !defined(wxUSE_DOC_VIEW_ARCHITECTURE) */
333
1e6feb95
VZ
334#ifndef wxUSE_FILEDLG
335# ifdef wxABORT_ON_CONFIG_ERROR
336# error "wxUSE_FILEDLG must be defined."
337# else
338# define wxUSE_FILEDLG 0
339# endif
340#endif /* !defined(wxUSE_FILEDLG) */
341
342#ifndef wxUSE_FONTDLG
343# ifdef wxABORT_ON_CONFIG_ERROR
344# error "wxUSE_FONTDLG must be defined."
345# else
346# define wxUSE_FONTDLG 0
347# endif
348#endif /* !defined(wxUSE_FONTDLG) */
349
350#ifndef wxUSE_FONTMAP
351# ifdef wxABORT_ON_CONFIG_ERROR
352# error "wxUSE_FONTMAP must be defined."
353# else
354# define wxUSE_FONTMAP 0
355# endif
356#endif /* !defined(wxUSE_FONTMAP) */
357
358#ifndef wxUSE_GAUGE
359# ifdef wxABORT_ON_CONFIG_ERROR
360# error "wxUSE_GAUGE must be defined."
361# else
362# define wxUSE_GAUGE 0
363# endif
364#endif /* !defined(wxUSE_GAUGE) */
365
366#ifndef wxUSE_GRID
367# ifdef wxABORT_ON_CONFIG_ERROR
368# error "wxUSE_GRID must be defined."
369# else
370# define wxUSE_GRID 0
371# endif
372#endif /* !defined(wxUSE_GRID) */
373
3379ed37
VZ
374#ifndef wxUSE_HELP
375# ifdef wxABORT_ON_CONFIG_ERROR
376# error "wxUSE_HELP must be defined."
377# else
378# define wxUSE_HELP 0
379# endif
380#endif /* !defined(wxUSE_HELP) */
381
05dcbb8e
VZ
382#ifndef wxUSE_HTML
383# ifdef wxABORT_ON_CONFIG_ERROR
384# error "wxUSE_HTML must be defined."
385# else
386# define wxUSE_HTML 0
387# endif
388#endif /* !defined(wxUSE_HTML) */
389
658974ae
VS
390#ifndef wxUSE_ICO_CUR
391# ifdef wxABORT_ON_CONFIG_ERROR
392# error "wxUSE_ICO_CUR must be defined."
393# else
394# define wxUSE_ICO_CUR 0
395# endif
396#endif /* !defined(wxUSE_ICO_CUR) */
397
1663afc0
VS
398#ifndef wxUSE_IFF
399# ifdef wxABORT_ON_CONFIG_ERROR
400# error "wxUSE_IFF must be defined."
401# else
402# define wxUSE_IFF 0
403# endif
404#endif /* !defined(wxUSE_IFF) */
405
1e6feb95
VZ
406#ifndef wxUSE_IMAGLIST
407# ifdef wxABORT_ON_CONFIG_ERROR
408# error "wxUSE_IMAGLIST must be defined."
409# else
410# define wxUSE_IMAGLIST 0
411# endif
412#endif /* !defined(wxUSE_IMAGLIST) */
413
2131b89d
VZ
414#ifndef wxUSE_JOYSTICK
415# ifdef wxABORT_ON_CONFIG_ERROR
416# error "wxUSE_JOYSTICK must be defined."
417# else
418# define wxUSE_JOYSTICK 0
419# endif
420#endif /* !defined(wxUSE_JOYSTICK) */
421
1e6feb95
VZ
422#ifndef wxUSE_LISTBOX
423# ifdef wxABORT_ON_CONFIG_ERROR
424# error "wxUSE_LISTBOX must be defined."
425# else
426# define wxUSE_LISTBOX 0
427# endif
428#endif /* !defined(wxUSE_LISTBOX) */
429
430#ifndef wxUSE_LISTCTRL
431# ifdef wxABORT_ON_CONFIG_ERROR
432# error "wxUSE_LISTCTRL must be defined."
433# else
434# define wxUSE_LISTCTRL 0
435# endif
436#endif /* !defined(wxUSE_LISTCTRL) */
437
3379ed37
VZ
438#ifndef wxUSE_LOGGUI
439# ifdef wxABORT_ON_CONFIG_ERROR
440# error "wxUSE_LOGGUI must be defined."
441# else
442# define wxUSE_LOGGUI 0
443# endif
444#endif /* !defined(wxUSE_LOGGUI) */
445
446#ifndef wxUSE_LOGWINDOW
447# ifdef wxABORT_ON_CONFIG_ERROR
448# error "wxUSE_LOGWINDOW must be defined."
449# else
450# define wxUSE_LOGWINDOW 0
451# endif
452#endif /* !defined(wxUSE_LOGWINDOW) */
e421922f 453
3e6e2754
JS
454#ifndef wxUSE_LOG_DIALOG
455# ifdef wxABORT_ON_CONFIG_ERROR
456# error "wxUSE_LOG_DIALOG must be defined."
457# else
458# define wxUSE_LOG_DIALOG 0
459# endif
71908213 460#endif /* !defined(wxUSE_LOG_DIALOG) */
3e6e2754 461
1e6feb95
VZ
462#ifndef wxUSE_MDI_ARCHITECTURE
463# ifdef wxABORT_ON_CONFIG_ERROR
464# error "wxUSE_MDI_ARCHITECTURE must be defined."
465# else
466# define wxUSE_MDI_ARCHITECTURE 0
467# endif
468#endif /* !defined(wxUSE_MDI_ARCHITECTURE) */
469
470#ifndef wxUSE_MENUS
471# ifdef wxABORT_ON_CONFIG_ERROR
472# error "wxUSE_MENUS must be defined."
473# else
474# define wxUSE_MENUS 0
475# endif
476#endif /* !defined(wxUSE_MENUS) */
477
3379ed37
VZ
478#ifndef wxUSE_MSGDLG
479# ifdef wxABORT_ON_CONFIG_ERROR
480# error "wxUSE_MSGDLG must be defined."
481# else
482# define wxUSE_MSGDLG 0
483# endif
484#endif /* !defined(wxUSE_MSGDLG) */
485
1e6feb95
VZ
486#ifndef wxUSE_NEW_GRID
487# ifdef wxABORT_ON_CONFIG_ERROR
488# error "wxUSE_NEW_GRID must be defined."
489# else
490# define wxUSE_NEW_GRID 0
491# endif
492#endif /* !defined(wxUSE_NEW_GRID) */
493
494#ifndef wxUSE_NOTEBOOK
495# ifdef wxABORT_ON_CONFIG_ERROR
496# error "wxUSE_NOTEBOOK must be defined."
497# else
498# define wxUSE_NOTEBOOK 0
499# endif
500#endif /* !defined(wxUSE_NOTEBOOK) */
501
d275c7eb
VZ
502#ifndef wxUSE_PALETTE
503# ifdef wxABORT_ON_CONFIG_ERROR
504# error "wxUSE_PALETTE must be defined."
505# else
506# define wxUSE_PALETTE 0
507# endif
508#endif /* !defined(wxUSE_PALETTE) */
509
1e6feb95
VZ
510#ifndef wxUSE_POPUPWIN
511# ifdef wxABORT_ON_CONFIG_ERROR
512# error "wxUSE_POPUPWIN must be defined."
513# else
514# define wxUSE_POPUPWIN 0
515# endif
516#endif /* !defined(wxUSE_POPUPWIN) */
517
3379ed37
VZ
518#ifndef wxUSE_PRINTING_ARCHITECTURE
519# ifdef wxABORT_ON_CONFIG_ERROR
520# error "wxUSE_PRINTING_ARCHITECTURE must be defined."
521# else
522# define wxUSE_PRINTING_ARCHITECTURE 0
523# endif
524#endif /* !defined(wxUSE_PRINTING_ARCHITECTURE) */
525
1e6feb95
VZ
526#ifndef wxUSE_RADIOBOX
527# ifdef wxABORT_ON_CONFIG_ERROR
528# error "wxUSE_RADIOBOX must be defined."
529# else
530# define wxUSE_RADIOBOX 0
531# endif
532#endif /* !defined(wxUSE_RADIOBOX) */
533
534#ifndef wxUSE_RADIOBTN
535# ifdef wxABORT_ON_CONFIG_ERROR
536# error "wxUSE_RADIOBTN must be defined."
537# else
538# define wxUSE_RADIOBTN 0
539# endif
540#endif /* !defined(wxUSE_RADIOBTN) */
541
542#ifndef wxUSE_SASH
543# ifdef wxABORT_ON_CONFIG_ERROR
544# error "wxUSE_SASH must be defined."
545# else
546# define wxUSE_SASH 0
547# endif
548#endif /* !defined(wxUSE_SASH) */
549
550#ifndef wxUSE_SCROLLBAR
551# ifdef wxABORT_ON_CONFIG_ERROR
552# error "wxUSE_SCROLLBAR must be defined."
553# else
554# define wxUSE_SCROLLBAR 0
555# endif
556#endif /* !defined(wxUSE_SCROLLBAR) */
557
558#ifndef wxUSE_SLIDER
559# ifdef wxABORT_ON_CONFIG_ERROR
560# error "wxUSE_SLIDER must be defined."
561# else
562# define wxUSE_SLIDER 0
563# endif
564#endif /* !defined(wxUSE_SLIDER) */
565
566#ifndef wxUSE_SPINBTN
567# ifdef wxABORT_ON_CONFIG_ERROR
568# error "wxUSE_SPINBTN must be defined."
569# else
570# define wxUSE_SPINBTN 0
571# endif
572#endif /* !defined(wxUSE_SPINBTN) */
573
574#ifndef wxUSE_SPINCTRL
575# ifdef wxABORT_ON_CONFIG_ERROR
576# error "wxUSE_SPINCTRL must be defined."
577# else
578# define wxUSE_SPINCTRL 0
579# endif
580#endif /* !defined(wxUSE_SPINCTRL) */
581
2654a046
MB
582#ifndef wxUSE_SPLASH
583# ifdef wxABORT_ON_CONFIG_ERROR
584# error "wxUSE_SPLASH must be defined."
585# else
586# define wxUSE_SPLASH 0
587# endif
588#endif /* !defined(wxUSE_SPLASH) */
589
1e6feb95
VZ
590#ifndef wxUSE_SPLITTER
591# ifdef wxABORT_ON_CONFIG_ERROR
592# error "wxUSE_SPLITTER must be defined."
593# else
594# define wxUSE_SPLITTER 0
595# endif
596#endif /* !defined(wxUSE_SPLITTER) */
597
598#ifndef wxUSE_STATBMP
599# ifdef wxABORT_ON_CONFIG_ERROR
600# error "wxUSE_STATBMP must be defined."
601# else
602# define wxUSE_STATBMP 0
603# endif
604#endif /* !defined(wxUSE_STATBMP) */
605
606#ifndef wxUSE_STATBOX
607# ifdef wxABORT_ON_CONFIG_ERROR
608# error "wxUSE_STATBOX must be defined."
609# else
610# define wxUSE_STATBOX 0
611# endif
612#endif /* !defined(wxUSE_STATBOX) */
613
614#ifndef wxUSE_STATLINE
615# ifdef wxABORT_ON_CONFIG_ERROR
616# error "wxUSE_STATLINE must be defined."
617# else
618# define wxUSE_STATLINE 0
619# endif
620#endif /* !defined(wxUSE_STATLINE) */
621
3379ed37
VZ
622#ifndef wxUSE_STATTEXT
623# ifdef wxABORT_ON_CONFIG_ERROR
624# error "wxUSE_STATTEXT must be defined."
625# else
626# define wxUSE_STATTEXT 0
627# endif
628#endif /* !defined(wxUSE_STATTEXT) */
629
1e6feb95
VZ
630#ifndef wxUSE_STATUSBAR
631# ifdef wxABORT_ON_CONFIG_ERROR
632# error "wxUSE_STATUSBAR must be defined."
633# else
634# define wxUSE_STATUSBAR 0
635# endif
636#endif /* !defined(wxUSE_STATUSBAR) */
637
1e6feb95
VZ
638#ifndef wxUSE_TAB_DIALOG
639# ifdef wxABORT_ON_CONFIG_ERROR
640# error "wxUSE_TAB_DIALOG must be defined."
641# else
642# define wxUSE_TAB_DIALOG 0
643# endif
644#endif /* !defined(wxUSE_TAB_DIALOG) */
645
646#ifndef wxUSE_TEXTCTRL
647# ifdef wxABORT_ON_CONFIG_ERROR
648# error "wxUSE_TEXTCTRL must be defined."
649# else
650# define wxUSE_TEXTCTRL 0
651# endif
652#endif /* !defined(wxUSE_TEXTCTRL) */
653
f38bcae5
VZ
654#ifndef wxUSE_TIPWINDOW
655# ifdef wxABORT_ON_CONFIG_ERROR
656# error "wxUSE_TIPWINDOW must be defined."
657# else
658# define wxUSE_TIPWINDOW 0
659# endif
660#endif /* !defined(wxUSE_TIPWINDOW) */
661
1e6feb95
VZ
662#ifndef wxUSE_TOOLBAR
663# ifdef wxABORT_ON_CONFIG_ERROR
664# error "wxUSE_TOOLBAR must be defined."
665# else
666# define wxUSE_TOOLBAR 0
667# endif
668#endif /* !defined(wxUSE_TOOLBAR) */
669
670#ifndef wxUSE_TOOLTIPS
671# ifdef wxABORT_ON_CONFIG_ERROR
672# error "wxUSE_TOOLTIPS must be defined."
673# else
674# define wxUSE_TOOLTIPS 0
675# endif
676#endif /* !defined(wxUSE_TOOLTIPS) */
677
678#ifndef wxUSE_TREECTRL
679# ifdef wxABORT_ON_CONFIG_ERROR
680# error "wxUSE_TREECTRL must be defined."
681# else
682# define wxUSE_TREECTRL 0
683# endif
684#endif /* !defined(wxUSE_TREECTRL) */
685
2b5f62a0
VZ
686#ifndef wxUSE_WX_RESOURCES
687# ifdef wxABORT_ON_CONFIG_ERROR
688# error "wxUSE_WX_RESOURCES must be defined."
689# else
690# define wxUSE_WX_RESOURCES 0
691# endif
692#endif /* !defined(wxUSE_WX_RESOURCES) */
693
3379ed37
VZ
694#ifndef wxUSE_WXHTML_HELP
695# ifdef wxABORT_ON_CONFIG_ERROR
696# error "wxUSE_WXHTML_HELP must be defined."
697# else
698# define wxUSE_WXHTML_HELP 0
699# endif
700#endif /* !defined(wxUSE_WXHTML_HELP) */
701
a5d46b73 702#endif /* wxUSE_GUI */
c4d596ea 703
1e6feb95
VZ
704/*
705 check consistency of the settings
706 */
a5d46b73
VZ
707
708#if wxUSE_PROTOCOL_FILE || wxUSE_PROTOCOL_FTP || wxUSE_PROTOCOL_HTTP
709# if !wxUSE_PROTOCOL
710# ifdef wxABORT_ON_CONFIG_ERROR
711# error "wxUSE_PROTOCOL_XXX requires wxUSE_PROTOCOL"
712# else
713# undef wxUSE_PROTOCOL
714# define wxUSE_PROTOCOL 1
715# endif
716# endif
717#endif /* wxUSE_PROTOCOL_XXX */
718
719#if wxUSE_URL
720# if !wxUSE_PROTOCOL
721# ifdef wxABORT_ON_CONFIG_ERROR
722# error "wxUSE_URL requires wxUSE_PROTOCOL"
723# else
724# undef wxUSE_PROTOCOL
725# define wxUSE_PROTOCOL 1
726# endif
727# endif
728#endif /* wxUSE_URL */
729
730#if wxUSE_PROTOCOL
731# if !wxUSE_SOCKETS
732# if wxUSE_PROTOCOL_HTTP || wxUSE_PROTOCOL_FTP
733# ifdef wxABORT_ON_CONFIG_ERROR
734# error "wxUSE_PROTOCOL_FTP/HTTP requires wxUSE_SOCKETS"
735# else
736# undef wxUSE_SOCKETS
737# define wxUSE_SOCKETS 1
738# endif
739# endif
740# endif
741
742# if !wxUSE_STREAMS
743# ifdef wxABORT_ON_CONFIG_ERROR
744# error "wxUSE_PROTOCOL requires wxUSE_STREAMS"
745# else
746# undef wxUSE_STREAMS
747# define wxUSE_STREAMS 1
748# endif
749# endif
750#endif /* wxUSE_PROTOCOL */
751
c7f3eecc
VZ
752/* have to test for wxUSE_HTML before wxUSE_FILESYSTEM */
753#if wxUSE_HTML
754# if !wxUSE_FILESYSTEM
755# ifdef wxABORT_ON_CONFIG_ERROR
756# error "wxHTML requires wxFileSystem"
757# else
758# undef wxUSE_FILESYSTEM
759# define wxUSE_FILESYSTEM 1
760# endif
761# endif
762#endif /* wxUSE_HTML */
763
764#if wxUSE_FILESYSTEM
765# if !wxUSE_STREAMS
766# ifdef wxABORT_ON_CONFIG_ERROR
767# error "wxUSE_FILESYSTEM requires wxUSE_STREAMS"
768# else
769# undef wxUSE_STREAMS
770# define wxUSE_STREAMS 1
771# endif
772# endif
773#endif /* wxUSE_FILESYSTEM */
774
775#if wxUSE_STOPWATCH || wxUSE_DATETIME
a5d46b73
VZ
776# if !wxUSE_LONGLONG
777# ifdef wxABORT_ON_CONFIG_ERROR
c7f3eecc 778# error "wxUSE_STOPWATCH and wxUSE_DATETIME require wxUSE_LONGLONG"
a5d46b73
VZ
779# else
780# undef wxUSE_LONGLONG
781# define wxUSE_LONGLONG 1
782# endif
783# endif
784#endif /* wxUSE_STOPWATCH */
785
786#if wxUSE_MIMETYPE && !wxUSE_TEXTFILE
787# ifdef wxABORT_ON_CONFIG_ERROR
788# error "wxUSE_MIMETYPE requires wxUSE_TEXTFILE"
789# else
790# undef wxUSE_TEXTFILE
791# define wxUSE_TEXTFILE 1
792# endif
793#endif /* wxUSE_MIMETYPE */
794
795#if wxUSE_TEXTFILE && !wxUSE_TEXTBUFFER
796# ifdef wxABORT_ON_CONFIG_ERROR
797# error "wxUSE_TEXTFILE requires wxUSE_TEXTBUFFER"
798# else
799# undef wxUSE_TEXTBUFFER
800# define wxUSE_TEXTBUFFER 1
801# endif
802#endif /* wxUSE_TEXTFILE */
803
804#if wxUSE_TEXTFILE && !wxUSE_FILE
805# ifdef wxABORT_ON_CONFIG_ERROR
806# error "wxUSE_TEXTFILE requires wxUSE_FILE"
807# else
808# undef wxUSE_FILE
809# define wxUSE_FILE 1
810# endif
811#endif /* wxUSE_TEXTFILE */
812
813#if wxUSE_UNICODE_MSLU && !wxUSE_UNICODE
814# ifdef wxABORT_ON_CONFIG_ERROR
815# error "wxUSE_UNICODE_MSLU requires wxUSE_UNICODE"
816# else
817# undef wxUSE_UNICODE
818# define wxUSE_UNICODE 1
819# endif
820#endif /* wxUSE_UNICODE_MSLU */
821
4ccf704a
VZ
822#if wxUSE_ODBC && wxUSE_UNICODE
823# ifdef wxABORT_ON_CONFIG_ERROR
824 /* (ODBC classes aren't Unicode-compatible yet) */
825# error "wxUSE_ODBC can't be used with wxUSE_UNICODE"
826# else
827# undef wxUSE_ODBC
828# define wxUSE_ODBC 0
829# endif
830#endif /* wxUSE_ODBC */
831
a5d46b73
VZ
832/* the rest of the tests is for the GUI settings only */
833#if wxUSE_GUI
834
1e6feb95
VZ
835#if wxUSE_BUTTON || \
836 wxUSE_CALENDARCTRL || \
837 wxUSE_CARET || \
838 wxUSE_COMBOBOX || \
839 wxUSE_BMPBUTTON || \
840 wxUSE_CHECKBOX || \
841 wxUSE_CHECKLISTBOX || \
842 wxUSE_CHOICE || \
843 wxUSE_GAUGE || \
844 wxUSE_GRID || \
845 wxUSE_NEW_GRID || \
846 wxUSE_LISTBOX || \
847 wxUSE_LISTCTRL || \
848 wxUSE_NOTEBOOK || \
849 wxUSE_RADIOBOX || \
850 wxUSE_RADIOBTN || \
851 wxUSE_SCROLLBAR || \
852 wxUSE_SLIDER || \
853 wxUSE_SPINBTN || \
854 wxUSE_SPINCTRL || \
855 wxUSE_STATBMP || \
856 wxUSE_STATBOX || \
857 wxUSE_STATLINE || \
3379ed37 858 wxUSE_STATTEXT || \
1e6feb95
VZ
859 wxUSE_STATUSBAR || \
860 wxUSE_TEXTCTRL || \
861 wxUSE_TOOLBAR || \
862 wxUSE_TREECTRL
863# if !wxUSE_CONTROLS
864# ifdef wxABORT_ON_CONFIG_ERROR
865# error "wxUSE_CONTROLS unset but some controls used"
866# else
867# undef wxUSE_CONTROLS
868# define wxUSE_CONTROLS 1
869# endif
870# endif
871#endif /* controls */
872
3379ed37
VZ
873/* wxUniv-specific dependencies */
874#if defined(__WXUNIVERSAL__)
875# if (wxUSE_COMBOBOX || wxUSE_MENUS) && !wxUSE_POPUPWIN
876# ifdef wxABORT_ON_CONFIG_ERROR
877# error "wxUSE_POPUPWIN must be defined to use comboboxes/menus"
878# else
879# undef wxUSE_POPUPWIN
880# define wxUSE_POPUPWIN 1
881# endif
882# endif
883
884# if wxUSE_COMBOBOX
885# if !wxUSE_LISTBOX
886# ifdef wxABORT_ON_CONFIG_ERROR
887# error "wxComboBox requires wxListBox in wxUniversal"
888# else
889# undef wxUSE_LISTBOX
890# define wxUSE_LISTBOX 1
891# endif
892# endif
893# endif /* wxUSE_COMBOBOX */
894
895# if wxUSE_RADIOBTN
896# if !wxUSE_CHECKBOX
897# ifdef wxABORT_ON_CONFIG_ERROR
898# error "wxUSE_RADIOBTN requires wxUSE_CHECKBOX in wxUniversal"
899# else
900# undef wxUSE_CHECKBOX
901# define wxUSE_CHECKBOX 1
902# endif
903# endif
904# endif /* wxUSE_RADIOBTN */
905
906# if wxUSE_TEXTCTRL
907# if !wxUSE_CARET
908# ifdef wxABORT_ON_CONFIG_ERROR
909# error "wxTextCtrl requires wxCaret in wxUniversal"
910# else
911# undef wxUSE_CARET
912# define wxUSE_CARET 1
913# endif
914# endif /* wxUSE_CARET */
915
916# if !wxUSE_SCROLLBAR
917# ifdef wxABORT_ON_CONFIG_ERROR
918# error "wxTextCtrl requires wxScrollBar in wxUniversal"
919# else
920# undef wxUSE_SCROLLBAR
921# define wxUSE_SCROLLBAR 1
922# endif
923# endif /* wxUSE_SCROLLBAR */
924# endif /* wxUSE_TEXTCTRL */
925#endif /* __WXUNIVERSAL__ */
926
927/* wxGTK-specific dependencies */
2131b89d
VZ
928#ifdef __WXGTK__
929# ifndef __WXUNIVERSAL__
930# if wxUSE_MDI_ARCHITECTURE && !wxUSE_MENUS
931# ifdef wxABORT_ON_CONFIG_ERROR
932# error "MDI requires wxUSE_MENUS in wxGTK"
933# else
934# undef wxUSE_MENUS
935# define wxUSE_MENUS 1
936# endif
937# endif
938# endif /* !__WXUNIVERSAL__ */
939
940# if wxUSE_JOYSTICK
941# if !wxUSE_THREADS
942# ifdef wxABORT_ON_CONFIG_ERROR
943# error "wxJoystick requires threads in wxGTK"
944# else
945# undef wxUSE_JOYSTICK
946# define wxUSE_JOYSTICK 0
947# endif
3379ed37
VZ
948# endif
949# endif
950#endif /* wxGTK && !wxUniv */
951
03169422
RL
952/* wxMSW-specific dependencies */
953#ifdef __WXMSW__
954# ifndef wxUSE_UNICODE_MSLU
955# ifdef wxABORT_ON_CONFIG_ERROR
956# error "wxUSE_UNICODE_MSLU must be defined."
957# else
958# define wxUSE_UNICODE_MSLU 0
959# endif
960# endif /* wxUSE_UNICODE_MSLU */
961# ifndef wxUSE_MS_HTML_HELP
962# ifdef wxABORT_ON_CONFIG_ERROR
963# error "wxUSE_MS_HTML_HELP must be defined."
964# else
965# define wxUSE_MS_HTML_HELP 0
966# endif
967# endif /* !defined(wxUSE_MS_HTML_HELP) */
968# ifndef wxUSE_DIALUP_MANAGER
969# ifdef wxABORT_ON_CONFIG_ERROR
970# error "wxUSE_DIALUP_MANAGER must be defined."
971# else
972# define wxUSE_DIALUP_MANAGER 0
973# endif
974# endif /* !defined(wxUSE_DIALUP_MANAGER) */
975
19f478fd 976# if !wxUSE_DYNAMIC_LOADER
03169422
RL
977# if wxUSE_MS_HTML_HELP
978# ifdef wxABORT_ON_CONFIG_ERROR
979# error "wxUSE_MS_HTML_HELP requires wxUSE_DYNAMIC_LOADER."
980# else
981# define wxUSE_DYNAMIC_LOADER 1
982# endif
983# endif
984# if wxUSE_DIALUP_MANAGER
985# ifdef wxABORT_ON_CONFIG_ERROR
986# error "wxUSE_DIALUP_MANAGER requires wxUSE_DYNAMIC_LOADER."
987# else
988# define wxUSE_DYNAMIC_LOADER 1
989# endif
990# endif
991# endif /* wxUSE_DYNAMIC_LOADER */
992#endif /* wxMSW */
993
9806a47c
JS
994/* wxMotif-specific dependencies */
995#if defined(__WXMOTIF__) && wxUSE_NOTEBOOK && !wxUSE_TAB_DIALOG
996# undef wxUSE_TAB_DIALOG
997# define wxUSE_TAB_DIALOG 1
998#endif
999#if defined(__WXMOTIF__) && wxUSE_TOGGLEBTN
1000# undef wxUSE_TOGGLEBTN
1001# define wxUSE_TOGGLEBTN 0
1002#endif
1003
bfc4a1c1
VS
1004/* wxMGL-specific dependencies */
1005#ifdef __WXMGL__
1006# if !wxUSE_PALETTE
1007# error "wxMGL requires wxUSE_PALETTE=1"
1008# endif
1009#endif /* wxMGL */
1010
3379ed37
VZ
1011/* generic controls dependencies */
1012#if !defined(__WXMSW__) || defined(__WXUNIVERSAL__)
1013# if wxUSE_FONTDLG || wxUSE_FILEDLG || wxUSE_CHOICEDLG
1014 /* all common controls are needed by these dialogs */
1015# if !defined(wxUSE_CHOICE) || \
1016 !defined(wxUSE_TEXTCTRL) || \
1017 !defined(wxUSE_BUTTON) || \
1018 !defined(wxUSE_CHECKBOX) || \
1019 !defined(wxUSE_STATTEXT)
1020# ifdef wxABORT_ON_CONFIG_ERROR
1021# error "These common controls are needed by common dialogs"
1022# else
1023# undef wxUSE_CHOICE
1024# define wxUSE_CHOICE 1
1025# undef wxUSE_TEXTCTRL
1026# define wxUSE_TEXTCTRL 1
1027# undef wxUSE_BUTTON
1028# define wxUSE_BUTTON 1
1029# undef wxUSE_CHECKBOX
1030# define wxUSE_CHECKBOX 1
1031# undef wxUSE_STATTEXT
1032# define wxUSE_STATTEXT 1
1033# endif
1034# endif
1035# endif
1036#endif /* !wxMSW || wxUniv */
1037
1038/* common dependencies */
1e6feb95
VZ
1039#if wxUSE_CALENDARCTRL
1040# if !(wxUSE_SPINBTN && wxUSE_COMBOBOX)
1041# ifdef wxABORT_ON_CONFIG_ERROR
1042# error "wxCalendarCtrl requires wxSpinButton and wxComboBox"
1043# else
1044# undef wxUSE_SPINBTN
1045# undef wxUSE_COMBOBOX
1046# define wxUSE_SPINBTN 1
1047# define wxUSE_COMBOBOX 1
1048# endif
1049# endif
1050#endif /* wxUSE_CALENDARCTRL */
1051
1052#if wxUSE_CHECKLISTBOX
1053# if !wxUSE_LISTBOX
1054# ifdef wxABORT_ON_CONFIG_ERROR
1055# error "wxCheckListBox requires wxListBox"
1056# else
1057# undef wxUSE_LISTBOX
1058# define wxUSE_LISTBOX 1
1059# endif
1060# endif
1061#endif /* wxUSE_RADIOBTN */
1062
3379ed37
VZ
1063#if wxUSE_WXHTML_HELP
1064# if !wxUSE_HELP || !wxUSE_HTML || !wxUSE_COMBOBOX
1065# ifdef wxABORT_ON_CONFIG_ERROR
1066# error "Built in help controller can't be compiled"
1067# else
1068# undef wxUSE_HELP
1069# define wxUSE_HELP 1
1070# undef wxUSE_HTML
1071# define wxUSE_HTML 1
1072# undef wxUSE_COMBOBOX
1073# define wxUSE_COMBOBOX 1
1074# endif
1075# endif
1076#endif /* wxUSE_WXHTML_HELP */
1077
1078#if wxUSE_PRINTING_ARCHITECTURE
1079# if !wxUSE_COMBOBOX
1080# ifdef wxABORT_ON_CONFIG_ERROR
1081# error "Print dialog requires wxUSE_COMBOBOX"
1082# else
1083# undef wxUSE_COMBOBOX
1084# define wxUSE_COMBOBOX 1
1085# endif
1086# endif
1087#endif /* wxUSE_PRINTING_ARCHITECTURE */
1088
1089#if wxUSE_DOC_VIEW_ARCHITECTURE
1090# if !wxUSE_MENUS
1e6feb95 1091# ifdef wxABORT_ON_CONFIG_ERROR
3379ed37 1092# error "DocView requires wxUSE_MENUS"
1e6feb95 1093# else
3379ed37
VZ
1094# undef wxUSE_MENUS
1095# define wxUSE_MENUS 1
1e6feb95
VZ
1096# endif
1097# endif
3379ed37 1098#endif /* wxUSE_DOC_VIEW_ARCHITECTURE */
1e6feb95
VZ
1099
1100#if !wxUSE_FILEDLG
2119e280 1101# if wxUSE_DOC_VIEW_ARCHITECTURE || wxUSE_WXHTML_HELP
1e6feb95
VZ
1102# ifdef wxABORT_ON_CONFIG_ERROR
1103# error "wxFileDialog must be compiled as well"
1104# else
1105# undef wxUSE_FILEDLG
1106# define wxUSE_FILEDLG 1
1107# endif
1108# endif
e421922f 1109#endif /* wxUSE_FILEDLG */
1e6feb95 1110
1e6feb95
VZ
1111#if !wxUSE_IMAGLIST
1112# if wxUSE_TREECTRL || wxUSE_NOTEBOOK || wxUSE_LISTCTRL
1113# ifdef wxABORT_ON_CONFIG_ERROR
1114# error "wxImageList must be compiled as well"
1115# else
1116# undef wxUSE_IMAGLIST
1117# define wxUSE_IMAGLIST 1
1118# endif
1119# endif
1120#endif /* !wxUSE_IMAGLIST */
1121
e421922f
VZ
1122#if !wxUSE_MSGDLG
1123# ifdef wxABORT_ON_CONFIG_ERROR
1124 /* FIXME: should compile without it, of course, but doesn't */
1125# error "wxMessageBox is always needed"
1126# else
1127# undef wxUSE_MSGDLG
1128# define wxUSE_MSGDLG 1
1129# endif
1130#endif
1131
1e6feb95
VZ
1132#if wxUSE_RADIOBOX
1133# if !wxUSE_RADIOBTN || !wxUSE_STATBOX
1134# ifdef wxABORT_ON_CONFIG_ERROR
1135# error "wxUSE_RADIOBOX requires wxUSE_RADIOBTN and wxUSE_STATBOX"
1136# else
1137# undef wxUSE_RADIOBTN
1138# undef wxUSE_STATBOX
1139# define wxUSE_RADIOBTN 1
1140# define wxUSE_STATBOX 1
1141# endif
1142# endif
1143#endif /* wxUSE_RADIOBOX */
1144
3379ed37
VZ
1145#if wxUSE_LOGWINDOW
1146# if !wxUSE_TEXTCTRL
1147# ifdef wxABORT_ON_CONFIG_ERROR
1148# error "wxUSE_LOGWINDOW requires wxUSE_TEXTCTRL"
1149# else
1150# undef wxUSE_TEXTCTRL
1151# define wxUSE_TEXTCTRL 1
1152# endif
1153# endif
1154#endif /* wxUSE_LOGWINDOW */
1e6feb95 1155
3e6e2754
JS
1156#if wxUSE_LOG_DIALOG
1157# if !wxUSE_LISTCTRL
1158# ifdef wxABORT_ON_CONFIG_ERROR
1159# error "wxUSE_LOG_DIALOG requires wxUSE_LISTCTRL"
1160# else
1161# undef wxUSE_LISTCTRL
1162# define wxUSE_LISTCTRL 1
1163# endif
1164# endif
1165#endif /* wxUSE_LOG_DIALOG */
1166
1e6feb95
VZ
1167/* I wonder if we shouldn't just remove all occurrences of
1168 wxUSE_DYNAMIC_CLASSES from the sources? */
1169#if !defined(wxUSE_DYNAMIC_CLASSES) || !wxUSE_DYNAMIC_CLASSES
3379ed37 1170# ifdef wxABORT_ON_CONFIG_ERROR
1e6feb95
VZ
1171# error "wxUSE_DYNAMIC_CLASSES must be defined as 1"
1172# else
1173# undef wxUSE_DYNAMIC_CLASSES
03169422 1174# define wxUSE_DYNAMIC_CLASSES 1
1e6feb95
VZ
1175# endif
1176#endif /* wxUSE_DYNAMIC_CLASSES */
1177
1e6feb95 1178#if wxUSE_CLIPBOARD && !wxUSE_DATAOBJ
3379ed37 1179# ifdef wxABORT_ON_CONFIG_ERROR
1e6feb95
VZ
1180# error "wxClipboard requires wxDataObject"
1181# else
1182# undef wxUSE_DATAOBJ
1183# define wxUSE_DATAOBJ 1
1184# endif
1185#endif /* wxUSE_CLIPBOARD */
1186
2b5f62a0
VZ
1187#if wxUSE_WX_RESOURCES && !wxUSE_PROLOGIO
1188# ifdef wxABORT_ON_CONFIG_ERROR
1189# error "wxr resources require PrologIO"
1190# else
1191# undef wxUSE_PROLOGIO
1192# define wxUSE_PROLOGIO 1
1193# endif
1194#endif /* wxUSE_WX_RESOURCES */
1195
1e6feb95
VZ
1196#endif /* wxUSE_GUI */
1197