]> git.saurik.com Git - wxWidgets.git/blame - docs/doxygen/mainpages/const_cpp.h
Fix problem with most of wxGTK headers not being installed.
[wxWidgets.git] / docs / doxygen / mainpages / const_cpp.h
CommitLineData
4514447c
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: const_cpp.h
3// Purpose: Preprocessor symbols
4// Author: Vadim Zeitlin
5// RCS-ID: $Id$
526954c5 6// Licence: wxWindows licence
4514447c
FM
7/////////////////////////////////////////////////////////////////////////////
8
9
880efa2a 10/**
4514447c 11
928f1a07
FM
12@page page_cppconst Preprocessor symbols defined by wxWidgets
13
14These are preprocessor symbols used in the wxWidgets source, grouped
15by category (and sorted by alphabetical order inside each category).
16All of these macros except for the @c wxUSE_XXX variety is defined if the
17corresponding condition is @true and undefined if it isn't, so they should be
18always tested using @ifdef_ and not @if_.
19
20@li @ref page_cppconst_guisystem
21@li @ref page_cppconst_os
22@li @ref page_cppconst_cpu
23@li @ref page_cppconst_hardware
24@li @ref page_cppconst_compiler
25@li @ref page_cppconst_featuretests
3fb26cf2 26@li @ref page_cppconst_msvc_setup_h
928f1a07
FM
27@li @ref page_cppconst_miscellaneous
28
29<hr>
30
31
32@section page_cppconst_guisystem GUI system
33
34@beginDefList
e2742bd6 35@itemdef{__WXBASE__, Only wxBase, no GUI features (same as @c wxUSE_GUI == 0)}
3f63d141 36@itemdef{__WXCOCOA__, OS X using wxCocoa Port}
928f1a07
FM
37@itemdef{__WXDFB__, wxUniversal using DirectFB}
38@itemdef{__WXWINCE__, Windows CE}
39@itemdef{__WXGTK__, GTK+}
40@itemdef{__WXGTK12__, GTK+ 1.2 or higher}
41@itemdef{__WXGTK20__, GTK+ 2.0 or higher}
42@itemdef{__WXGTK24__, GTK+ 2.4 or higher}
43@itemdef{__WXGTK26__, GTK+ 2.6 or higher}
44@itemdef{__WXGTK210__, GTK+ 2.10 or higher}
3f63d141 45@itemdef{__WXMAC__, old define for Mac OS X}
928f1a07
FM
46@itemdef{__WXMOTIF__, Motif}
47@itemdef{__WXMOTIF20__, Motif 2.0 or higher}
d98a58c5 48@itemdef{__WXMSW__, GUI using <a href="http://en.wikipedia.org/wiki/Windows_User">Windows Controls</a>}
3f63d141
SC
49@itemdef{__WXOSX__, any OS X}
50@itemdef{__WXOSX_IPHONE__, OS X iPhone}
51@itemdef{__WXOSX_CARBON__, Mac OS X using Carbon}
52@itemdef{__WXOSX_COCOA__, Mac OS X using Cocoa}
53@itemdef{__WXOSX_MAC__, Mac OS X (Carbon or Cocoa)}
54@itemdef{__WXOSX_OR_COCOA__, Any Mac OS X port (wxOSX-Carbon, wxOSX-Cocoa or
55 wxCocoa)}
928f1a07
FM
56@itemdef{__WXPM__, OS/2 native Presentation Manager}
57@itemdef{__WXSTUBS__, Stubbed version ('template' wxWin implementation)}
58@itemdef{__WXXT__, Xt; mutually exclusive with WX_MOTIF, not implemented in wxWidgets 2.x}
59@itemdef{__WXX11__, wxX11 (__WXUNIVERSAL__ will be also defined)}
60@itemdef{__WXWINE__, WINE (i.e. WIN32 on Unix)}
61@itemdef{__WXUNIVERSAL__, wxUniversal port, always defined in addition
62 to one of the symbols above so this should be tested first.}
63@itemdef{__X__, any X11-based GUI toolkit except GTK+}
64@endDefList
65
3f63d141
SC
66There are two wxWidgets ports to Mac OS X. One of them, wxOSX is the successor of the
67venerable wxMac, it currently exists in three versions: Carbon and Cocoa for the
68desktop and a very early iPhone port. And there is the Cocoa port named wxCocoa
69which has not been updated very actively since beginning 2008. To summarize:
928f1a07 70
3f63d141
SC
71@li If you want to test for wxOSX on the desktop, use
72 @c __WXOSX_MAC__.
73@li If you want to test for wxOSX on the iPhone, use
74 @c __WXOSX_IPHONE__.
928f1a07 75@li If you want to test for any GUI Mac port under OS X, use
3f63d141 76 @c __WXOSX_OR_COCOA__.
928f1a07
FM
77@li If you want to test for any port under Mac OS X, including, for
78 example, wxGTK and also wxBase, use @c __DARWIN__ (see below).
79
80The convention is to use the @c __WX prefix for these
81symbols, although this has not always been followed.
82
83
84@section page_cppconst_os Operating systems
85
86@beginDefList
87@itemdef{__APPLE__, any Mac OS version}
88@itemdef{__AIX__, AIX}
89@itemdef{__BSD__, Any *BSD system}
90@itemdef{__CYGWIN__, Cygwin: Unix on Win32}
2415cf67 91@itemdef{__DARWIN__, Mac OS X (with BSD C library)}
928f1a07 92@itemdef{__DATA_GENERAL__, DG-UX}
928f1a07
FM
93@itemdef{__FREEBSD__, FreeBSD}
94@itemdef{__HPUX__, HP-UX (Unix)}
95@itemdef{__GNU__, GNU Hurd}
96@itemdef{__LINUX__, Linux}
97@itemdef{__MACH__, Mach-O Architecture (Mac OS X only builds)}
98@itemdef{__OSF__, OSF/1}
229251af 99@itemdef{__QNX__, QNX Neutrino RTOS}
928f1a07
FM
100@itemdef{__SGI__, IRIX}
101@itemdef{__SOLARIS__, Solaris}
102@itemdef{__SUN__, Any Sun}
103@itemdef{__SUNOS__, Sun OS}
104@itemdef{__SVR4__, SystemV R4}
105@itemdef{__SYSV__, SystemV generic}
106@itemdef{__ULTRIX__, Ultrix}
107@itemdef{__UNIX__, any Unix}
108@itemdef{__UNIX_LIKE__, Unix, BeOS or VMS}
109@itemdef{__VMS__, VMS}
d98a58c5
VZ
110@itemdef{__WINDOWS__, Any Windows platform, using any port (see also @c __WXMSW__)}
111@itemdef{__WIN16__, Win16 API (not supported since wxWidgets 2.6)}
112@itemdef{__WIN32__, Win32 API}
113@itemdef{__WIN64__, Win64 (mostly same as Win32 but data type sizes are different)}
928f1a07 114@itemdef{__WINE__, Wine}
3795f11f 115@itemdef{_WIN32_WCE, Windows CE version}
928f1a07
FM
116@endDefList
117
118
119
120@section page_cppconst_cpu Hardware architectures (CPU)
121
122Note that not all of these symbols are always defined, it depends on the
123compiler used.
124
125@beginDefList
126@itemdef{__ALPHA__, DEC Alpha architecture}
127@itemdef{__INTEL__, Intel i386 or compatible}
128@itemdef{__IA64__, Intel 64 bit architecture}
129@itemdef{__POWERPC__, Motorola Power PC}
130@endDefList
131
132
133
134@section page_cppconst_hardware Hardware type
135
136@beginDefList
137@itemdef{__SMARTPHONE__, Generic mobile devices with phone buttons and a small display}
138@itemdef{__PDA__, Personal digital assistant, usually with touch screen}
139@itemdef{__HANDHELD__, Small but powerful computer, usually with a keyboard}
140@itemdef{__POCKETPC__, Microsoft-powered PocketPC devices with touch-screen}
141@itemdef{__WINCE_STANDARDSDK__, Microsoft-powered Windows CE devices, for generic Windows CE applications}
142@itemdef{__WINCE_NET__, Microsoft-powered Windows CE .NET devices (_WIN32_WCE is 400 or greater)}
143@itemdef{WIN32_PLATFORM_WFSP, Microsoft-powered smartphone}
144@endDefList
145
146
147
148@section page_cppconst_compiler Compilers
149
150@beginDefList
151@itemdef{__BORLANDC__, Borland C++. The value of the macro corresponds
e2742bd6 152 to the compiler version: 500 is 5.0.}
928f1a07
FM
153@itemdef{__DJGPP__, DJGPP}
154@itemdef{__DIGITALMARS__, Digital Mars}
3795f11f 155@itemdef{__EVC4__, Embedded Visual C++ 4 (can be only used for building wxWinCE)}
928f1a07
FM
156@itemdef{__GNUG__, Gnu C++ on any platform, see also wxCHECK_GCC_VERSION}
157@itemdef{__GNUWIN32__, Gnu-Win32 compiler, see also wxCHECK_W32API_VERSION}
158@itemdef{__MINGW32__, MinGW}
928f1a07
FM
159@itemdef{__SUNCC__, Sun CC, see also wxCHECK_SUNCC_VERSION}
160@itemdef{__SYMANTECC__, Symantec C++}
161@itemdef{__VISAGECPP__, IBM Visual Age (OS/2)}
4461c518 162@itemdef{__VISUALC__, Microsoft Visual C++, see also ::wxCHECK_VISUALC_VERSION.
928f1a07
FM
163 The value of this macro corresponds to the compiler version:
164 @c 1020 for @c 4.2 (the first supported version), @c 1100 for
165 @c 5.0, @c 1200 for @c 6.0 and so on. For convenience, the symbols
166 __VISUALCn__ are also defined for each major compiler version from
7eb02e44 167 5 to 11, i.e. you can use tests such @ifdef_ __VISUALC7__ to test
928f1a07
FM
168 for compiler version being precisely 7.}
169@itemdef{__XLC__, AIX compiler}
170@itemdef{__WATCOMC__, Watcom C++. The value of this macro corresponds to
171 the compiler version, @c 1100 is @c 11.0 and @c 1200 is OpenWatcom.}
928f1a07
FM
172@endDefList
173
174
175
176@section page_cppconst_featuretests Feature tests
177
178Some library features may not be always available even if they were selected
179by the user. To make it possible to check if this is the case, the library
180predefines the symbols in the form @c wxHAS_FEATURE. Unlike
181@c wxUSE_FEATURE symbols which are defined by the library user (directly
182in @c setup.h or by running configure script) and which must be always
e2742bd6 183defined as either 0 or 1, the @c wxHAS symbols are only defined if
928f1a07
FM
184the corresponding feature is available and not defined at all otherwise.
185
186Currently the following symbols exist:
187
188@beginDefList
817b7b0e
VZ
189@itemdef{wxHAS_3STATE_CHECKBOX, Defined if wxCheckBox supports wxCHK_3STATE
190 flag, i.e. is capable of showing three states and not only the usual two.
191 Currently defined for almost all ports.}
42124e68
VZ
192@itemdef{wxHAS_ATOMIC_OPS, Defined if wxAtomicInc() and wxAtomicDec() functions
193 have an efficient (CPU-specific) implementation. Notice that the functions
194 themselves are always available but can be prohibitively slow to use when
195 implemented in a generic way, using a critical section.}
323d36e4
VZ
196@itemdef{wxHAS_BITMAPTOGGLEBUTTON, Defined in @c wx/tglbtn.h if
197 wxBitmapToggleButton class is available in addition to wxToggleButton.}
f9bb777f
VZ
198@itemdef{wxHAS_CONFIG_TEMPLATE_RW, Defined if the currently used compiler
199 supports template Read() and Write() methods in wxConfig.}
68fe70ea
VZ
200@itemdef{wxHAS_LARGE_FILES, Defined if wxFile supports files more than 4GB in
201 size (notice that you must include @c wx/filefn.h before testing for this
202 symbol).}
203@itemdef{wxHAS_LARGE_FFILES, Defined if wxFFile supports files more than 4GB in
204 size (notice that you must include @c wx/filefn.h before testing for this
205 symbol).}
066e5e3f
VZ
206@itemdef{wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG, Defined if compiler supports a
207 64 bit integer type (available as @c wxLongLong_t) and this type is
208 different from long. Notice that, provided wxUSE_LONGLONG is not turned
209 off, some 64 bit type is always available to wxWidgets programs and this
210 symbol only indicates a presence of such primitive type. It is useful to
211 decide whether some function should be overloaded for both
212 <code>long</code> and <code>long long</code> types.}
26078494 213@itemdef{wxHAS_MULTIPLE_FILEDLG_FILTERS, Defined if wxFileDialog supports multiple ('|'-separated) filters.}
e7092398
VZ
214@itemdef{wxHAS_IMAGES_IN_RESOURCES, Defined if <a href="http://en.wikipedia.org/wiki/Resource_(Windows)">
215 Windows resource files</a> or OS/2 resource files are available on the current platform.}
928f1a07
FM
216@itemdef{wxHAS_POWER_EVENTS, Defined if wxPowerEvent are ever generated on the current platform.}
217@itemdef{wxHAS_RADIO_MENU_ITEMS,
218 Defined if the current port supports radio menu items (see wxMenu::AppendRadioItem).}
24671bc9 219@itemdef{wxHAS_RAW_BITMAP, Defined if direct access to bitmap data using the classes in @c wx/rawbmp.h is supported.}
928f1a07
FM
220@itemdef{wxHAS_RAW_KEY_CODES, Defined if raw key codes (see wxKeyEvent::GetRawKeyCode are supported.}
221@itemdef{wxHAS_REGEX_ADVANCED, Defined if advanced syntax is available in wxRegEx.}
222@itemdef{wxHAS_TASK_BAR_ICON, Defined if wxTaskBarIcon is available on the current platform.}
223@endDefList
224
225
226
3fb26cf2
VZ
227@section page_cppconst_msvc_setup_h Libraries selection for MSVC setup.h
228
229Microsoft Visual C++ users may use the special @c wx/setup.h file for this
230compiler in @c include/msvc subdirectory. This file implicitly links in all the
231wxWidgets libraries using MSVC-specific pragmas which usually is much more
232convenient than manually specifying the libraries list in all of the project
233configurations. However sometimes linking with all the libraries is not
234desirable, for example because some of them were not built and this is where
235the symbols in this section can be helpful: defining them allows to not link
236with the corresponding library. The following symbols are honoured:
237 - wxNO_ADV_LIB
238 - wxNO_AUI_LIB
239 - wxNO_HTML_LIB
240 - wxNO_MEDIA_LIB
241 - wxNO_NET_LIB
1c4293cb 242 - wxNO_PROPGRID_LIB
3fb26cf2
VZ
243 - wxNO_QA_LIB
244 - wxNO_RICHTEXT_LIB
43d53ee5 245 - wxNO_WEBVIEW_LIB
3fb26cf2
VZ
246 - wxNO_XML_LIB
247 - wxNO_REGEX_LIB
248 - wxNO_EXPAT_LIB
249 - wxNO_JPEG_LIB
250 - wxNO_PNG_LIB
251 - wxNO_TIFF_LIB
252 - wxNO_ZLIB_LIB
253
254Notice that the base library is always included and the core is always included
255for the GUI applications (i.e. those which don't define @c wxUSE_GUI as 0).
256
257
928f1a07
FM
258@section page_cppconst_miscellaneous Miscellaneous
259
260@beginDefList
261@itemdef{__WXWINDOWS__,
262 always defined in wxWidgets applications, see also wxCHECK_VERSION}
ab06470e
VZ
263@itemdef{wxDEBUG_LEVEL, defined as 1 by default, may be pre-defined as 0 before
264 including wxWidgets headers to disable generation of any code at all
265 for the assertion macros, see @ref overview_debugging}
266@itemdef{__WXDEBUG__, defined if wxDEBUG_LEVEL is 1 or more, undefined otherwise}
928f1a07 267@itemdef{wxUSE_XXX,
e2742bd6 268 if defined as 1, feature XXX is active, see the
928f1a07
FM
269 @ref page_wxusedef (the symbols of this form are always defined,
270 use @if_ and not @ifdef_ to test for them)}
271@itemdef{WX_PRECOMP,
272 is defined if precompiled headers (PCH) are in use. In
273 this case, @c wx/wxprec.h includes @c wx/wx.h which, in turn,
274 includes a number of wxWidgets headers thus making it unnecessary to include
275 them explicitly. However if this is not defined, you do need to include them
276 and so the usual idiom which allows to support both cases is to first include
277 @c wx/wxprec.h} and then, inside @ifndef_ WX_PRECOMP, individual
278 headers you need.}
279@itemdef{_UNICODE and UNICODE, both are defined if wxUSE_UNICODE is set to @c 1}
280@itemdef{wxUSE_GUI,
e2742bd6 281 this particular feature test macro is defined to 1
928f1a07
FM
282 when compiling or using the library with the GUI features activated,
283 if it is defined as @c 0, only wxBase is available.}
284@itemdef{wxUSE_BASE,
e2742bd6 285 only used by wxWidgets internally (defined as 1 when
928f1a07 286 building wxBase code, either as a standalone library or as part of the
e2742bd6 287 monolithic wxWidgets library, defined as 0 when building GUI library only)}
928f1a07
FM
288@itemdef{wxNO_RTTI, is defined if the compiler RTTI support has been switched off}
289@itemdef{wxNO_EXCEPTIONS,
290 is defined if the compiler support for C++ exceptions has been switched off}
291@itemdef{wxNO_THREADS,
292 if this macro is defined, the compilation options
293 don't include compiler flags needed for multithreaded code generation. This
e2742bd6 294 implies that wxUSE_THREADS is 0 and also that other (non-wx-based) threading
928f1a07
FM
295 packages cannot be used neither.}
296@itemdef{WXMAKINGDLL_XXX,
297 used internally and defined when building the
298 library @c XXX as a DLL; when a monolithic wxWidgets build is used only a
299 single @c WXMAKINGDLL symbol is defined}
300@itemdef{WXUSINGDLL,
301 defined when compiling code which uses wxWidgets as a DLL/shared library}
302@itemdef{WXBUILDING,
303 defined when building wxWidgets itself, whether as a static or shared library}
304@endDefList
4514447c
FM
305
306*/