]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/chkconf.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / msw / chkconf.h
1 /*
2 * Name: wx/msw/chkconf.h
3 * Purpose: Compiler-specific configuration checking
4 * Author: Julian Smart
5 * Modified by:
6 * Created: 01/02/97
7 * Copyright: (c) Julian Smart
8 * Licence: wxWindows licence
9 */
10
11 /* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
12
13 #ifndef _WX_MSW_CHKCONF_H_
14 #define _WX_MSW_CHKCONF_H_
15
16 /* ensure that MSW-specific settings are defined */
17 #ifndef wxUSE_ACTIVEX
18 # ifdef wxABORT_ON_CONFIG_ERROR
19 # error "wxUSE_ACTIVEX must be defined."
20 # else
21 # define wxUSE_ACTIVEX 0
22 # endif
23 #endif /* !defined(wxUSE_ACTIVEX) */
24
25 #ifndef wxUSE_CRASHREPORT
26 # ifdef wxABORT_ON_CONFIG_ERROR
27 # error "wxUSE_CRASHREPORT must be defined."
28 # else
29 # define wxUSE_CRASHREPORT 0
30 # endif
31 #endif /* !defined(wxUSE_CRASHREPORT) */
32
33 #ifndef wxUSE_DC_CACHEING
34 # ifdef wxABORT_ON_CONFIG_ERROR
35 # error "wxUSE_DC_CACHEING must be defined"
36 # else
37 # define wxUSE_DC_CACHEING 1
38 # endif
39 #endif /* wxUSE_DC_CACHEING */
40
41 #ifndef wxUSE_DIALUP_MANAGER
42 # ifdef wxABORT_ON_CONFIG_ERROR
43 # error "wxUSE_DIALUP_MANAGER must be defined."
44 # else
45 # define wxUSE_DIALUP_MANAGER 0
46 # endif
47 #endif /* !defined(wxUSE_DIALUP_MANAGER) */
48
49 #ifndef wxUSE_MS_HTML_HELP
50 # ifdef wxABORT_ON_CONFIG_ERROR
51 # error "wxUSE_MS_HTML_HELP must be defined."
52 # else
53 # define wxUSE_MS_HTML_HELP 0
54 # endif
55 #endif /* !defined(wxUSE_MS_HTML_HELP) */
56
57 #ifndef wxUSE_INICONF
58 # ifdef wxABORT_ON_CONFIG_ERROR
59 # error "wxUSE_INICONF must be defined."
60 # else
61 # define wxUSE_INICONF 0
62 # endif
63 #endif /* !defined(wxUSE_INICONF) */
64
65 #ifndef wxUSE_OLE
66 # ifdef wxABORT_ON_CONFIG_ERROR
67 # error "wxUSE_OLE must be defined."
68 # else
69 # define wxUSE_OLE 0
70 # endif
71 #endif /* !defined(wxUSE_OLE) */
72
73 #ifndef wxUSE_OLE_AUTOMATION
74 # ifdef wxABORT_ON_CONFIG_ERROR
75 # error "wxUSE_OLE_AUTOMATION must be defined."
76 # else
77 # define wxUSE_OLE_AUTOMATION 0
78 # endif
79 #endif /* !defined(wxUSE_OLE_AUTOMATION) */
80
81 #ifndef wxUSE_TASKBARICON_BALLOONS
82 # ifdef wxABORT_ON_CONFIG_ERROR
83 # error "wxUSE_TASKBARICON_BALLOONS must be defined."
84 # else
85 # define wxUSE_TASKBARICON_BALLOONS 0
86 # endif
87 #endif /* wxUSE_TASKBARICON_BALLOONS */
88
89 #ifndef wxUSE_UNICODE_MSLU
90 # ifdef wxABORT_ON_CONFIG_ERROR
91 # error "wxUSE_UNICODE_MSLU must be defined."
92 # else
93 # define wxUSE_UNICODE_MSLU 0
94 # endif
95 #endif /* wxUSE_UNICODE_MSLU */
96
97 #ifndef wxUSE_UXTHEME
98 # ifdef wxABORT_ON_CONFIG_ERROR
99 # error "wxUSE_UXTHEME must be defined."
100 # else
101 # define wxUSE_UXTHEME 0
102 # endif
103 #endif /* wxUSE_UXTHEME */
104
105 /*
106 * We don't want to give an error if wxUSE_UNICODE_MSLU is enabled but
107 * wxUSE_UNICODE is not as this would make it impossible to simply set the
108 * former in wx/setup.h as then the library wouldn't compile in non-Unicode
109 * configurations, so instead simply unset it silently when it doesn't make
110 * sense.
111 */
112 #if wxUSE_UNICODE_MSLU && !wxUSE_UNICODE
113 # undef wxUSE_UNICODE_MSLU
114 # define wxUSE_UNICODE_MSLU 0
115 #endif
116
117
118 /*
119 * disable the settings which don't work for some compilers
120 */
121
122 #ifndef wxUSE_NORLANDER_HEADERS
123 # if ( wxCHECK_WATCOM_VERSION(1,0) || defined(__WINE__) ) || \
124 ((defined(__MINGW32__) || defined(__CYGWIN__)) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))))
125 # define wxUSE_NORLANDER_HEADERS 1
126 # else
127 # define wxUSE_NORLANDER_HEADERS 0
128 # endif
129 #endif
130
131 /*
132 * See WINVER definition in wx/msw/wrapwin.h for the explanation of this test
133 * logic.
134 */
135 #if (defined(__VISUALC__) && (__VISUALC__ < 1300)) && \
136 (!defined(WINVER) || WINVER < 0x0500)
137 # undef wxUSE_TASKBARICON_BALLOONS
138 # define wxUSE_TASKBARICON_BALLOONS 0
139 #endif
140
141 /*
142 * All of the settings below require SEH support (__try/__catch) and can't work
143 * without it.
144 */
145 #if !defined(_MSC_VER) && \
146 (!defined(__BORLANDC__) || __BORLANDC__ < 0x0550)
147 # undef wxUSE_ON_FATAL_EXCEPTION
148 # define wxUSE_ON_FATAL_EXCEPTION 0
149
150 # undef wxUSE_CRASHREPORT
151 # define wxUSE_CRASHREPORT 0
152
153 # undef wxUSE_STACKWALKER
154 # define wxUSE_STACKWALKER 0
155 #endif /* compiler doesn't support SEH */
156
157 #if defined(__GNUWIN32__)
158 /* These don't work as expected for mingw32 and cygwin32 */
159 # undef wxUSE_MEMORY_TRACING
160 # define wxUSE_MEMORY_TRACING 0
161
162 # undef wxUSE_GLOBAL_MEMORY_OPERATORS
163 # define wxUSE_GLOBAL_MEMORY_OPERATORS 0
164
165 # undef wxUSE_DEBUG_NEW_ALWAYS
166 # define wxUSE_DEBUG_NEW_ALWAYS 0
167
168 /* some Cygwin versions don't have wcslen */
169 # if defined(__CYGWIN__) || defined(__CYGWIN32__)
170 # if ! ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95)))
171 # undef wxUSE_WCHAR_T
172 # define wxUSE_WCHAR_T 0
173 # endif
174 #endif
175
176 #endif /* __GNUWIN32__ */
177
178 /* wxUSE_MFC is not defined when using configure as it doesn't make sense for
179 gcc or mingw32 anyhow */
180 #ifndef wxUSE_MFC
181 #define wxUSE_MFC 0
182 #endif /* !defined(wxUSE_MFC) */
183
184 /* MFC duplicates these operators */
185 #if wxUSE_MFC
186 # undef wxUSE_GLOBAL_MEMORY_OPERATORS
187 # define wxUSE_GLOBAL_MEMORY_OPERATORS 0
188
189 # undef wxUSE_DEBUG_NEW_ALWAYS
190 # define wxUSE_DEBUG_NEW_ALWAYS 0
191 #endif /* wxUSE_MFC */
192
193 #if (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS)
194 /* GnuWin32 doesn't have appropriate headers for e.g. IUnknown. */
195 # undef wxUSE_DRAG_AND_DROP
196 # define wxUSE_DRAG_AND_DROP 0
197 #endif
198
199 #if !wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__)
200 # undef wxUSE_CHECKLISTBOX
201 # define wxUSE_CHECKLISTBOX 0
202 #endif
203
204 #if wxUSE_SPINCTRL
205 # if !wxUSE_SPINBTN
206 # ifdef wxABORT_ON_CONFIG_ERROR
207 # error "wxSpinCtrl requires wxSpinButton on MSW"
208 # else
209 # undef wxUSE_SPINBTN
210 # define wxUSE_SPINBTN 1
211 # endif
212 # endif
213 #endif
214
215 /*
216 Win64-specific checks.
217 */
218 #ifdef __WIN64__
219 # if wxUSE_STACKWALKER
220 # undef wxUSE_CRASHREPORT
221 # define wxUSE_CRASHREPORT 0
222 # endif
223 #endif /* __WIN64__ */
224
225
226 /*
227 Compiler-specific checks.
228 */
229
230 /* Borland */
231 #ifdef __BORLANDC__
232
233 #if __BORLANDC__ < 0x500
234 /* BC++ 4.0 can't compile JPEG library */
235 # undef wxUSE_LIBJPEG
236 # define wxUSE_LIBJPEG 0
237 #endif
238
239 /* wxUSE_DEBUG_NEW_ALWAYS = 1 not compatible with BC++ in DLL mode */
240 #if defined(WXMAKINGDLL) || defined(WXUSINGDLL)
241 # undef wxUSE_DEBUG_NEW_ALWAYS
242 # define wxUSE_DEBUG_NEW_ALWAYS 0
243 #endif
244
245 #endif /* __BORLANDC__ */
246
247 /* DMC++ doesn't have definitions for date picker control, so use generic control
248 */
249 #ifdef __DMC__
250 # if wxUSE_DATEPICKCTRL
251 # undef wxUSE_DATEPICKCTRL_GENERIC
252 # undef wxUSE_DATEPICKCTRL
253 # endif
254 # define wxUSE_DATEPICKCTRL 0
255 # define wxUSE_DATEPICKCTRL_GENERIC 1
256 #endif
257
258
259
260 /*
261 un/redefine the options which we can't compile (after checking that they're
262 defined
263 */
264 #ifdef __WINE__
265 # if wxUSE_ACTIVEX
266 # undef wxUSE_ACTIVEX
267 # define wxUSE_ACTIVEX 0
268 # endif /* wxUSE_ACTIVEX */
269
270 # if wxUSE_UNICODE_MSLU
271 # undef wxUSE_UNICODE_MSLU
272 # define wxUSE_UNICODE_MSLU 0
273 # endif /* wxUSE_UNICODE_MSLU */
274 #endif /* __WINE__ */
275
276
277 /* check settings consistency for MSW-specific ones */
278 #if wxUSE_CRASHREPORT && !wxUSE_ON_FATAL_EXCEPTION
279 # ifdef wxABORT_ON_CONFIG_ERROR
280 # error "wxUSE_CRASHREPORT requires wxUSE_ON_FATAL_EXCEPTION"
281 # else
282 # undef wxUSE_CRASHREPORT
283 # define wxUSE_CRASHREPORT 0
284 # endif
285 #endif /* wxUSE_CRASHREPORT */
286
287 #if !wxUSE_VARIANT
288 # if wxUSE_ACTIVEX
289 # ifdef wxABORT_ON_CONFIG_ERROR
290 # error "wxActiveXContainer requires wxVariant"
291 # else
292 # undef wxUSE_ACTIVEX
293 # define wxUSE_ACTIVEX 0
294 # endif
295 # endif
296
297 # if wxUSE_OLE_AUTOMATION
298 # ifdef wxABORT_ON_CONFIG_ERROR
299 # error "wxAutomationObject requires wxVariant"
300 # else
301 # undef wxUSE_OLE_AUTOMATION
302 # define wxUSE_OLE_AUTOMATION 0
303 # endif
304 # endif
305 #endif /* !wxUSE_VARIANT */
306
307 #if !wxUSE_DYNAMIC_LOADER
308 # if wxUSE_MS_HTML_HELP
309 # ifdef wxABORT_ON_CONFIG_ERROR
310 # error "wxUSE_MS_HTML_HELP requires wxUSE_DYNAMIC_LOADER."
311 # else
312 # undef wxUSE_MS_HTML_HELP
313 # define wxUSE_MS_HTML_HELP 0
314 # endif
315 # endif
316 # if wxUSE_DIALUP_MANAGER
317 # ifdef wxABORT_ON_CONFIG_ERROR
318 # error "wxUSE_DIALUP_MANAGER requires wxUSE_DYNAMIC_LOADER."
319 # else
320 # undef wxUSE_DIALUP_MANAGER
321 # define wxUSE_DIALUP_MANAGER 0
322 # endif
323 # endif
324 #endif /* !wxUSE_DYNAMIC_LOADER */
325
326 #if !wxUSE_DYNLIB_CLASS
327 # if wxUSE_DC_TRANSFORM_MATRIX
328 # ifdef wxABORT_ON_CONFIG_ERROR
329 # error "wxUSE_DC_TRANSFORM_MATRIX requires wxUSE_DYNLIB_CLASS"
330 # else
331 # undef wxUSE_DC_TRANSFORM_MATRIX
332 # define wxUSE_DC_TRANSFORM_MATRIX 0
333 # endif
334 # endif
335 # if wxUSE_UXTHEME
336 # ifdef wxABORT_ON_CONFIG_ERROR
337 # error "wxUSE_UXTHEME requires wxUSE_DYNLIB_CLASS"
338 # else
339 # undef wxUSE_UXTHEME
340 # define wxUSE_UXTHEME 0
341 # endif
342 # endif
343 # if wxUSE_MEDIACTRL
344 # ifdef wxABORT_ON_CONFIG_ERROR
345 # error "wxUSE_MEDIACTRL requires wxUSE_DYNLIB_CLASS"
346 # else
347 # undef wxUSE_MEDIACTRL
348 # define wxUSE_MEDIACTRL 0
349 # endif
350 # endif
351 # if wxUSE_INKEDIT
352 # ifdef wxABORT_ON_CONFIG_ERROR
353 # error "wxUSE_INKEDIT requires wxUSE_DYNLIB_CLASS"
354 # else
355 # undef wxUSE_INKEDIT
356 # define wxUSE_INKEDIT 0
357 # endif
358 # endif
359 #endif /* !wxUSE_DYNLIB_CLASS */
360
361 #if !wxUSE_OLE
362 # if wxUSE_ACTIVEX
363 # ifdef wxABORT_ON_CONFIG_ERROR
364 # error "wxActiveXContainer requires wxUSE_OLE"
365 # else
366 # undef wxUSE_ACTIVEX
367 # define wxUSE_ACTIVEX 0
368 # endif
369 # endif
370
371 # if wxUSE_DATAOBJ
372 # ifdef wxABORT_ON_CONFIG_ERROR
373 # error "wxUSE_DATAOBJ requires wxUSE_OLE"
374 # else
375 # undef wxUSE_DATAOBJ
376 # define wxUSE_DATAOBJ 0
377 # endif
378 # endif
379
380 # if wxUSE_OLE_AUTOMATION
381 # ifdef wxABORT_ON_CONFIG_ERROR
382 # error "wxAutomationObject requires wxUSE_OLE"
383 # else
384 # undef wxUSE_OLE_AUTOMATION
385 # define wxUSE_OLE_AUTOMATION 0
386 # endif
387 # endif
388 #endif /* !wxUSE_OLE */
389
390 #if !wxUSE_ACTIVEX
391 # if wxUSE_MEDIACTRL
392 # ifdef wxABORT_ON_CONFIG_ERROR
393 # error "wxMediaCtl requires wxActiveXContainer"
394 # else
395 # undef wxUSE_MEDIACTRL
396 # define wxUSE_MEDIACTRL 0
397 # endif
398 # endif
399 # if wxUSE_WEB
400 # ifdef wxABORT_ON_CONFIG_ERROR
401 # error "wxWebView requires wxActiveXContainer under MSW"
402 # else
403 # undef wxUSE_WEB
404 # define wxUSE_WEB 0
405 # endif
406 # endif
407 #endif /* !wxUSE_ACTIVEX */
408
409 #if !wxUSE_THREADS
410 # if wxUSE_FSWATCHER
411 # ifdef wxABORT_ON_CONFIG_ERROR
412 # error "wxFileSystemWatcher requires wxThread under MSW"
413 # else
414 # undef wxUSE_FSWATCHER
415 # define wxUSE_FSWATCHER 0
416 # endif
417 # endif
418 #endif /* !wxUSE_THREADS */
419
420
421 #if !wxUSE_OLE_AUTOMATION
422 # if wxUSE_WEB
423 # ifdef wxABORT_ON_CONFIG_ERROR
424 # error "wxWebView requires wxUSE_OLE_AUTOMATION under MSW"
425 # else
426 # undef wxUSE_WEB
427 # define wxUSE_WEB 0
428 # endif
429 # endif
430 #endif /* !wxUSE_OLE_AUTOMATION */
431
432 #if defined(__WXUNIVERSAL__) && wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW && !wxUSE_POSTSCRIPT
433 # undef wxUSE_POSTSCRIPT
434 # define wxUSE_POSTSCRIPT 1
435 #endif
436
437 #endif /* _WX_MSW_CHKCONF_H_ */