]> git.saurik.com Git - wxWidgets.git/blob - docs/doxygen/mainpages/const_cpp.h
move pages under 'mainpages' and also adopt new link anchor naming and use @itemdef...
[wxWidgets.git] / docs / doxygen / mainpages / const_cpp.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: const_cpp.h
3 // Purpose: Preprocessor symbols
4 // Author: Vadim Zeitlin
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9
10 /*!
11
12 @page page_cppconst Preprocessor symbols defined by wxWidgets
13
14 These are preprocessor symbols used in the wxWidgets source, grouped
15 by category (and sorted by alphabetical order inside each category).
16 All of these macros except for the @c wxUSE_XXX variety is defined if the
17 corresponding condition is @true and undefined if it isn't, so they should be
18 always tested using @ifdef and not @if.
19
20 TODO: what can we use here instead of \twocolitem to keep text readable??
21
22 @li @ref page_cppconst_guisystem
23 @li @ref page_cppconst_os
24 @li @ref page_cppconst_cpu
25 @li @ref page_cppconst_hardware
26 @li @ref page_cppconst_compiler
27 @li @ref page_cppconst_featuretests
28 @li @ref page_cppconst_miscellaneous
29
30 <hr>
31
32
33 @section page_cppconst_guisystem GUI system
34
35 @beginDefList
36 @itemdef{__WINDOWS__, any Windows, you may also use __WXMSW__}
37 @itemdef{__WIN16__, Win16 API (not supported since wxWidgets 2.6)}
38 @itemdef{__WIN32__, Win32 API}
39 @itemdef{__WXBASE__, Only wxBase, no GUI features (same as @c wxUSE_GUI $== 0$)}
40 @itemdef{__WXCOCOA__, OS X using Cocoa API}
41 @itemdef{__WXDFB__, wxUniversal using DirectFB}
42 @itemdef{__WXWINCE__, Windows CE}
43 @itemdef{__WXGTK__, GTK+}
44 @itemdef{__WXGTK12__, GTK+ 1.2 or higher}
45 @itemdef{__WXGTK20__, GTK+ 2.0 or higher}
46 @itemdef{__WXGTK24__, GTK+ 2.4 or higher}
47 @itemdef{__WXGTK26__, GTK+ 2.6 or higher}
48 @itemdef{__WXGTK210__, GTK+ 2.10 or higher}
49 @itemdef{__WXMOTIF__, Motif}
50 @itemdef{__WXMOTIF20__, Motif 2.0 or higher}
51 @itemdef{__WXMAC__, Mac OS all targets}
52 @itemdef{__WXMAC_CLASSIC__, MacOS for Classic}
53 @itemdef{__WXMAC_CARBON__, MacOS for Carbon CFM (running under Classic or OSX)
54 or true OS X Mach-O Builds}
55 @itemdef{__WXMAC_OSX__, MacOS X Carbon Mach-O Builds}
56 @itemdef{__WXMGL__, SciTech Soft MGL (__WXUNIVERSAL__ will be also defined)}
57 @itemdef{__WXMSW__, Any Windows}
58 @itemdef{__WXOSX__, Any Mac OS X port (either Carbon or Cocoa)}
59 @itemdef{__WXPALMOS__, PalmOS}
60 @itemdef{__WXPM__, OS/2 native Presentation Manager}
61 @itemdef{__WXSTUBS__, Stubbed version ('template' wxWin implementation)}
62 @itemdef{__WXXT__, Xt; mutually exclusive with WX_MOTIF, not implemented in wxWidgets 2.x}
63 @itemdef{__WXX11__, wxX11 (__WXUNIVERSAL__ will be also defined)}
64 @itemdef{__WXWINE__, WINE (i.e. WIN32 on Unix)}
65 @itemdef{__WXUNIVERSAL__, wxUniversal port, always defined in addition
66 to one of the symbols above so this should be tested first.}
67 @itemdef{__X__, any X11-based GUI toolkit except GTK+}
68 @endDefList
69
70 There are two wxWidgets ports to Mac OS. One of them, wxMac, exists in two versions:
71 Classic and Carbon. The Classic version is the only one to work on Mac OS version 8.
72 The Carbon version may be built either as CFM or Mach-O (binary format, like ELF)
73 and the former may run under OS 9 while the latter only runs under OS X.
74 Finally, there is a new Cocoa port which can only be used under OS X. To
75 summarize:
76
77 @li If you want to test for all Mac platforms, classic and OS X, you
78 should test both @c __WXMAC__ and @c __WXCOCOA__.
79 @li If you want to test for any GUI Mac port under OS X, use
80 @c __WXOSX__.
81 @li If you want to test for any port under Mac OS X, including, for
82 example, wxGTK and also wxBase, use @c __DARWIN__ (see below).
83
84 The convention is to use the @c __WX prefix for these
85 symbols, although this has not always been followed.
86
87
88 @section page_cppconst_os Operating systems
89
90 @beginDefList
91 @itemdef{__APPLE__, any Mac OS version}
92 @itemdef{__AIX__, AIX}
93 @itemdef{__BSD__, Any *BSD system}
94 @itemdef{__CYGWIN__, Cygwin: Unix on Win32}
95 @itemdef{__DARWIN__, Mac OS X using the BSD Unix C library
96 (as opposed to using the Metrowerks MSL C/C++ library)}
97 @itemdef{__DATA_GENERAL__, DG-UX}
98 @itemdef{__DOS_GENERAL__, DOS (used with wxMGL only)}
99 @itemdef{__FREEBSD__, FreeBSD}
100 @itemdef{__HPUX__, HP-UX (Unix)}
101 @itemdef{__GNU__, GNU Hurd}
102 @itemdef{__LINUX__, Linux}
103 @itemdef{__MACH__, Mach-O Architecture (Mac OS X only builds)}
104 @itemdef{__OSF__, OSF/1}
105 @itemdef{__PALMOS__, PalmOS}
106 @itemdef{__SGI__, IRIX}
107 @itemdef{__SOLARIS__, Solaris}
108 @itemdef{__SUN__, Any Sun}
109 @itemdef{__SUNOS__, Sun OS}
110 @itemdef{__SVR4__, SystemV R4}
111 @itemdef{__SYSV__, SystemV generic}
112 @itemdef{__ULTRIX__, Ultrix}
113 @itemdef{__UNIX__, any Unix}
114 @itemdef{__UNIX_LIKE__, Unix, BeOS or VMS}
115 @itemdef{__VMS__, VMS}
116 @itemdef{__WINDOWS__, any Windows}
117 @itemdef{__WINE__, Wine}
118 @endDefList
119
120
121
122 @section page_cppconst_cpu Hardware architectures (CPU)
123
124 Note that not all of these symbols are always defined, it depends on the
125 compiler used.
126
127 @beginDefList
128 @itemdef{__ALPHA__, DEC Alpha architecture}
129 @itemdef{__INTEL__, Intel i386 or compatible}
130 @itemdef{__IA64__, Intel 64 bit architecture}
131 @itemdef{__POWERPC__, Motorola Power PC}
132 @endDefList
133
134
135
136 @section page_cppconst_hardware Hardware type
137
138 @beginDefList
139 @itemdef{__SMARTPHONE__, Generic mobile devices with phone buttons and a small display}
140 @itemdef{__PDA__, Personal digital assistant, usually with touch screen}
141 @itemdef{__HANDHELD__, Small but powerful computer, usually with a keyboard}
142 @itemdef{__POCKETPC__, Microsoft-powered PocketPC devices with touch-screen}
143 @itemdef{__WINCE_STANDARDSDK__, Microsoft-powered Windows CE devices, for generic Windows CE applications}
144 @itemdef{__WINCE_NET__, Microsoft-powered Windows CE .NET devices (_WIN32_WCE is 400 or greater)}
145 @itemdef{WIN32_PLATFORM_WFSP, Microsoft-powered smartphone}
146 @endDefList
147
148
149
150 @section page_cppconst_compiler Compilers
151
152 @beginDefList
153 @itemdef{__BORLANDC__, Borland C++. The value of the macro corresponds
154 to the compiler version: $500$ is $5.0$.}
155 @itemdef{__DJGPP__, DJGPP}
156 @itemdef{__DIGITALMARS__, Digital Mars}
157 @itemdef{__GNUG__, Gnu C++ on any platform, see also wxCHECK_GCC_VERSION}
158 @itemdef{__GNUWIN32__, Gnu-Win32 compiler, see also wxCHECK_W32API_VERSION}
159 @itemdef{__MINGW32__, MinGW}
160 @itemdef{__MWERKS__, CodeWarrior MetroWerks compiler}
161 @itemdef{__SUNCC__, Sun CC, see also wxCHECK_SUNCC_VERSION}
162 @itemdef{__SYMANTECC__, Symantec C++}
163 @itemdef{__VISAGECPP__, IBM Visual Age (OS/2)}
164 @itemdef{__VISUALC__, Microsoft Visual C++, see also wxCHECK_VISUALC_VERSION.
165 The value of this macro corresponds to the compiler version:
166 $1020$ for $4.2$ (the first supported version), $1100$ for
167 $5.0$, $1200$ for $6.0$ and so on. For convenience, the symbols
168 __VISUALCn__ are also defined for each major compiler version from
169 5 to 9, i.e. you can use tests such @ifdef __VISUALC7__ to test
170 for compiler version being precisely 7.}
171 @itemdef{__XLC__, AIX compiler}
172 @itemdef{__WATCOMC__, Watcom C++. The value of this macro corresponds to
173 the compiler version, $1100$ is $11.0$ and $1200$ is OpenWatcom.}
174 @itemdef{_WIN32_WCE, Windows CE version}
175 @endDefList
176
177
178
179 @section page_cppconst_featuretests Feature tests
180
181 Some library features may not be always available even if they were selected
182 by the user. To make it possible to check if this is the case, the library
183 predefines the symbols in the form @c wxHAS_FEATURE. Unlike
184 @c wxUSE_FEATURE symbols which are defined by the library user (directly
185 in @c setup.h or by running configure script) and which must be always
186 defined as either $0$ or $1$, the @c wxHAS symbols are only defined if
187 the corresponding feature is available and not defined at all otherwise.
188
189 Currently the following symbols exist:
190
191 @beginDefList
192 @itemdef{wxHAS_LARGE_FILES, Defined if wxFile supports files more than 4GB in size.}
193 @itemdef{wxHAS_LARGE_FFILES, Defined if wxFFile supports files more than 4GB in size.}
194 @itemdef{wxHAS_POWER_EVENTS, Defined if wxPowerEvent are ever generated on the current platform.}
195 @itemdef{wxHAS_RADIO_MENU_ITEMS,
196 Defined if the current port supports radio menu items (see wxMenu::AppendRadioItem).}
197 @itemdef{wxHAS_RAW_KEY_CODES, Defined if raw key codes (see wxKeyEvent::GetRawKeyCode are supported.}
198 @itemdef{wxHAS_REGEX_ADVANCED, Defined if advanced syntax is available in wxRegEx.}
199 @itemdef{wxHAS_TASK_BAR_ICON, Defined if wxTaskBarIcon is available on the current platform.}
200 @endDefList
201
202
203
204 @section page_cppconst_miscellaneous Miscellaneous
205
206 @beginDefList
207 @itemdef{__WXWINDOWS__,
208 always defined in wxWidgets applications, see also wxCHECK_VERSION}
209 @itemdef{__WXDEBUG__, defined in debug mode, undefined in release mode}
210 @itemdef{wxUSE_XXX,
211 if defined as $1$, feature XXX is active, see the
212 @ref page_wxusedef (the symbols of this form are always defined,
213 use @if and not @ifdef to test for them)}
214 @itemdef{WX_PRECOMP,
215 is defined if precompiled headers (PCH) are in use. In
216 this case, @c wx/wxprec.h includes @c wx/wx.h which, in turn,
217 includes a number of wxWidgets headers thus making it unnecessary to include
218 them explicitly. However if this is not defined, you do need to include them
219 and so the usual idiom which allows to support both cases is to first include
220 @c wx/wxprec.h} and then, inside @ifndef WX_PRECOMP, individual
221 headers you need.}
222 @itemdef{_UNICODE and UNICODE, both are defined if wxUSE_UNICODE is set to $1$}
223 @itemdef{wxUSE_GUI,
224 this particular feature test macro is defined to $1$
225 when compiling or using the library with the GUI features activated,
226 if it is defined as $0$, only wxBase is available.}
227 @itemdef{wxUSE_BASE,
228 only used by wxWidgets internally (defined as $1$ when
229 building wxBase code, either as a standalone library or as part of the
230 monolithic wxWidgets library, defined as $0$ when building GUI library only)}
231 @itemdef{wxNO_RTTI, is defined if the compiler RTTI support has been switched off}
232 @itemdef{wxNO_EXCEPTIONS,
233 is defined if the compiler support for C++ exceptions has been switched off}
234 @itemdef{wxNO_THREADS,
235 if this macro is defined, the compilation options
236 don't include compiler flags needed for multithreaded code generation. This
237 implies that wxUSE_THREADS is $0$ and also that other (non-wx-based) threading
238 packages cannot be used neither.}
239 @itemdef{WXMAKINGDLL_XXX,
240 used internally and defined when building the
241 library @c XXX as a DLL; when a monolithic wxWidgets build is used only a
242 single @c WXMAKINGDLL symbol is defined}
243 @itemdef{WXUSINGDLL,
244 defined when compiling code which uses wxWidgets as a DLL/shared library}
245 @itemdef{WXBUILDING,
246 defined when building wxWidgets itself, whether as a static or shared library}
247 @endDefList
248
249 */