]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/platinfo.tex
added wxWindow::IsVisible() method
[wxWidgets.git] / docs / latex / wx / platinfo.tex
CommitLineData
8bb6b2c0
VZ
1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2%% Name: platinfo.tex
3%% Purpose: wxPlatformInfo
4%% Author: Francesco Montorsi
5%% Modified by:
6%% Created: 31-7-2006
7%% RCS-ID: $Id$
8%% Copyright: (c) wxWidgets Team
9%% License: wxWindows license
10%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12\section{\class{wxPlatformInfo}}\label{wxplatforminfo}
13
14This class holds informations about the operating system and the toolkit that the application
15is running under and some basic architecture info of the machine where it's running.
16
17\wxheading{Derived from}
18
19\helpref{wxObject}{wxobject}
20
21\wxheading{Include files}
22
23<include/wx/platinfo.h>
24
25\wxheading{See also}
26
27\helpref{wxGetOSVersion}{wxgetosversion}, \helpref{wxIsPlatformLittleEndian}{wxisplatformlittleendian},
28\helpref{wxIsPlatform64Bit}{wxisplatform64bit}, \helpref{wxAppTraits}{wxapptraits}
29
30\wxheading{Data structures}
31
32The following are the operating systems which are recognized by wxWidgets
33and whose version can be detected at run-time. The values of the constants
34are chosen so that they can be combined as flags; this allows to check
35for operating system {\it families} like e.g. wxOS\_MAC and wxOS\_UNIX.
36
37\begin{verbatim}
38enum wxOperatingSystemId
39{
40 wxOS_UNKNOWN = 0, // returned on error
41
42 wxOS_MAC_OS = 1 << 0, // Apple Mac OS 8/9/X with Mac paths
43 wxOS_MAC_OSX_DARWIN = 1 << 1, // Apple Mac OS X with Unix paths
44 wxOS_MAC = wxOS_MAC_OS|wxOS_MAC_OSX_DARWIN,
45
46 wxOS_WINDOWS_9X = 1 << 2, // Windows 9x family (95/98/ME)
47 wxOS_WINDOWS_NT = 1 << 3, // Windows NT family (NT/2000/XP)
48 wxOS_WINDOWS_MICRO = 1 << 4, // MicroWindows
49 wxOS_WINDOWS_CE = 1 << 5, // Windows CE (Window Mobile)
50 wxOS_WINDOWS = wxOS_WINDOWS_9X |
51 wxOS_WINDOWS_NT |
52 wxOS_WINDOWS_MICRO |
53 wxOS_WINDOWS_CE,
54
55 wxOS_UNIX_LINUX = 1 << 6, // Linux
56 wxOS_UNIX_FREEBSD = 1 << 7, // FreeBSD
57 wxOS_UNIX_OPENBSD = 1 << 8, // OpenBSD
58 wxOS_UNIX_NETBSD = 1 << 9, // NetBSD
59 wxOS_UNIX_SOLARIS = 1 << 10, // SunOS
60 wxOS_UNIX_AIX = 1 << 11, // AIX
61 wxOS_UNIX_HPUX = 1 << 12, // HP/UX
62 wxOS_UNIX = wxOS_UNIX_LINUX |
63 wxOS_UNIX_FREEBSD |
64 wxOS_UNIX_OPENBSD |
65 wxOS_UNIX_NETBSD |
66 wxOS_UNIX_SOLARIS |
67 wxOS_UNIX_AIX |
68 wxOS_UNIX_HPUX,
69
70 wxOS_DOS = 1 << 15, // Microsoft DOS
71 wxOS_OS2 = 1 << 16 // OS/2
72};
73\end{verbatim}
74
75The list of wxWidgets ports. Some of them can be used with more than
76a single (native) toolkit; e.g. wxWinCE port sources can be used with
77smartphones, pocket PCs and handheld devices SDKs.
78
79\begin{verbatim}
80enum wxPortId
81{
82 wxPORT_UNKNOWN = 0, // returned on error
83
84 wxPORT_BASE = 1 << 0, // wxBase, no native toolkit used
85
86 wxPORT_MSW = 1 << 1, // wxMSW, native toolkit is Windows API
87 wxPORT_MOTIF = 1 << 2, // wxMotif, using [Open]Motif or Lesstif
88 wxPORT_GTK = 1 << 3, // wxGTK, using GTK+ 1.x, 2.x, GPE or Maemo
89 wxPORT_MGL = 1 << 4, // wxMGL, using wxUniversal
90 wxPORT_X11 = 1 << 5, // wxX11, using wxUniversal
91 wxPORT_OS2 = 1 << 6, // wxOS2, using OS/2 Presentation Manager
92 wxPORT_MAC = 1 << 7, // wxMac, using Carbon or Classic Mac API
93 wxPORT_COCOA = 1 << 8, // wxCocoa, using Cocoa NextStep/Mac API
94 wxPORT_WINCE = 1 << 9, // wxWinCE, toolkit is WinCE SDK API
95 wxPORT_PALMOS = 1 << 10 // wxPalmOS, toolkit is PalmOS API
96};
97\end{verbatim}
98
99The architecture of the operating system (regardless of the build environment
100of wxWidgets library - see \helpref{wxIsPlatform64bit}{wxisplatform64bit} documentation
101for more info).
102
103\begin{verbatim}
104enum wxArchitecture
105{
106 wxARCH_INVALID = -1, // returned on error
107
108 wxARCH_32, // 32 bit
109 wxARCH_64,
110
111 wxARCH_MAX
112}
113\end{verbatim}
114
115The endian-ness of the machine.
116
117\begin{verbatim}
118enum wxEndianness
119{
120 wxENDIAN_INVALID = -1, // returned on error
121
122 wxENDIAN_BIG, // 4321
123 wxENDIAN_LITTLE, // 1234
124 wxENDIAN_PDP, // 3412
125
126 wxENDIAN_MAX
127}
128\end{verbatim}
129
130\latexignore{\rtfignore{\wxheading{Members}}}
131
132
133\membersection{wxPlatformInfo::wxPlatformInfo}\label{wxplatforminfowxplatforminfo}
134
135\func{}{wxPlatformInfo}{}
136
137Initializes the instance with the values corresponding to the currently running platform.
138
139\func{}{wxPlatformInfo}{\param{wxPortId }{pid = wxPORT\_UNKNOWN}, \param{int }{tkMajor = -1}, \param{int }{tkMinor = -1}, \param{wxOperatingSystemId }{id = wxOS\_UNKNOWN}, \param{int }{osMajor = -1}, \param{int }{osMinor = -1}, \param{wxArchitecture }{arch = wxARCH\_INVALID}, \param{wxEndianness }{endian = wxENDIAN\_INVALID}}
140
141Initializes the object using given values.
142
143
144
145
146\membersection{wxPlatformInfo::GetArch}\label{wxplatforminfogetarch}
147
148\func{static wxArchitecture}{GetArch}{\param{const wxString\& }{arch}}
149
150Converts the given string to a wxArchitecture enum value or to
d4417426 151wxARCH\_INVALID if the given string is not a valid architecture string
8bb6b2c0
VZ
152(i.e. does not contain nor {\tt 32} nor {\tt 64} strings).
153
154
155\membersection{wxPlatformInfo::GetArchName}\label{wxplatforminfogetarchname}
156
157\func{static wxString}{GetArchName}{\param{wxArchitecture }{arch}}
158
159Returns the name for the given wxArchitecture enumeration value.
160
161\constfunc{wxString}{GetArchName}{\void}
162
163Returns the name for the architecture of this wxPlatformInfo instance.
164
165
166\membersection{wxPlatformInfo::GetArchitecture}\label{wxplatforminfogetarchitecture}
167
168\constfunc{wxArchitecture}{GetArchitecture}{\void}
169
170Returns the architecture ID of this wxPlatformInfo instance.
171
172
173
174
175\membersection{wxPlatformInfo::GetEndianness}\label{wxplatforminfogetendianness}
176
177\func{static wxEndianness}{GetEndianness}{\param{const wxString\& }{end}}
178
179Converts the given string to a wxEndianness enum value or to
d4417426 180wxENDIAN\_INVALID if the given string is not a valid endianness string
8bb6b2c0
VZ
181(i.e. does not contain nor {\tt little} nor {\tt big} strings).
182
183\constfunc{wxEndianness}{GetEndianness}{\void}
184
185Returns the endianness ID of this wxPlatformInfo instance.
186
187\membersection{wxPlatformInfo::GetEndiannessName}\label{wxplatforminfogetendiannessname}
188
189\func{static wxString}{GetEndiannessName}{\param{wxEndianness }{end}}
190
191Returns name for the given wxEndianness enumeration value.
192
193\constfunc{wxString}{GetEndiannessName}{\void}
194
195Returns the name for the endianness of this wxPlatformInfo instance.
196
197
198
199
200
201\membersection{wxPlatformInfo::GetOSMajorVersion}\label{wxplatforminfogetosmajorversion}
202
203\constfunc{int}{GetOSMajorVersion}{\void}
204
205Returns the major version of the OS associated with this wxPlatformInfo instance.
206
207\membersection{wxPlatformInfo::GetOSMinorVersion}\label{wxplatforminfogetosminorversion}
208
209\constfunc{int}{GetOSMinorVersion}{\void}
210
211Returns the minor version of the OS associated with this wxPlatformInfo instance.
212
213
214
215
216\membersection{wxPlatformInfo::GetOperatingSystemFamilyName}\label{wxplatforminfogetoperatingsystemfamilyname}
217
218\func{static wxString}{GetOperatingSystemFamilyName}{\param{wxOperatingSystemId }{os}}
219
220Returns the operating system family name for the given wxOperatingSystemId enumeration value:
d4417426
VS
221{\tt Unix} for wxOS\_UNIX, {\tt Macintosh} for wxOS\_MAC, {\tt Windows} for wxOS\_WINDOWS,
222{\tt DOS} for wxOS\_DOS, {\tt OS/2} for wxOS\_OS2.
8bb6b2c0
VZ
223
224\constfunc{wxString}{GetOperatingSystemFamilyName}{\void}
225
226Returns the operating system family name of the OS associated with this wxPlatformInfo instance.
227
228
229
230\membersection{wxPlatformInfo::GetOperatingSystemId}\label{wxplatforminfogetoperatingsystemid}
231
232\func{static wxOperatingSystemId}{GetOperatingSystemId}{\param{const wxString\& }{name}}
233
234Converts the given string to a wxOperatingSystemId enum value or to
d4417426 235wxOS\_UNKNOWN if the given string is not a valid operating system name.
8bb6b2c0
VZ
236
237\constfunc{wxOperatingSystemId}{GetOperatingSystemId}{\void}
238
239Returns the operating system ID of this wxPlatformInfo instance.
240
241
242
243\membersection{wxPlatformInfo::GetOperatingSystemIdName}\label{wxplatforminfogetoperatingsystemidname}
244
245\func{static wxString}{GetOperatingSystemIdName}{\param{wxOperatingSystemId }{os}}
246
247Returns the name for the given operating system ID value. This can be a long name
248(e.g. {\tt Microsoft Windows NT}); use \helpref{GetOperatingSystemFamilyName}{wxplatforminfogetoperatingsystemfamilyname} to
249retrieve a short, generic name.
250
251
252\constfunc{wxString}{GetOperatingSystemIdName}{\void}
253
254Returns the operating system name of the OS associated with this wxPlatformInfo instance.
255
256
257
258
259
260\membersection{wxPlatformInfo::GetPortId}\label{wxplatforminfogetportid}
261
262\func{static wxPortId}{GetPortId}{\param{const wxString\& }{portname}}
263
d4417426 264Converts the given string to a wxWidgets port ID value or to wxPORT\_UNKNOWN if
8bb6b2c0
VZ
265the given string does not match any of the wxWidgets canonical name ports ("wxGTK", "wxMSW", etc)
266nor any of the short wxWidgets name ports ("gtk", "msw", etc).
267
268\constfunc{wxPortId}{GetPortId}{\void}
269
270Returns the wxWidgets port ID associated with this wxPlatformInfo instance.
271
272\membersection{wxPlatformInfo::GetPortIdName}\label{wxplatforminfogetportidname}
273
b98bd6af 274\func{static wxString}{GetPortIdName}{\param{wxPortId }{port}, \param{bool }{usingUniversal}}
8bb6b2c0 275
b98bd6af
VS
276Returns the name of the given wxWidgets port ID value. The \arg{usingUniversal}
277argument specifies whether the port is in its native or wxUniversal variant.
278
279The returned string always starts with the "wx" prefix and is a mixed-case
280string.
8bb6b2c0
VZ
281
282\constfunc{wxString}{GetPortIdName}{\void}
283
284Returns the name of the wxWidgets port ID associated with this wxPlatformInfo instance.
285
286
287
288
289\membersection{wxPlatformInfo::GetPortIdShortName}\label{wxplatforminfogetportidshortname}
290
b98bd6af
VS
291\func{static wxString}{GetPortIdShortName}{\param{wxPortId }{port}, \param{bool }{usingUniversal}}
292
293Returns the short name of the given wxWidgets port ID value. The
294\arg{usingUniversal} argument specifies whether the port is in its native or
295wxUniversal variant.
8bb6b2c0 296
b98bd6af
VS
297The returned string does not start with the "wx" prefix and is always lower
298case.
8bb6b2c0
VZ
299
300\constfunc{wxString}{GetPortIdShortName}{\void}
301
302Returns the short name of the wxWidgets port ID associated with this wxPlatformInfo instance.
303
304
305
306
307\membersection{wxPlatformInfo::GetToolkitMajorVersion}\label{wxplatforminfogettoolkitmajorversion}
308
309\constfunc{int}{GetToolkitMajorVersion}{\void}
310
311Returns the major version of the toolkit associated with this wxPlatformInfo instance.
d4417426 312Note that if {GetPortId}{wxplatforminfogetportid} returns wxPORT\_BASE, then this value is zero (unless externally modified with SetToolkitVersion); that is, no native toolkit is in use.
8bb6b2c0
VZ
313
314\membersection{wxPlatformInfo::GetToolkitMinorVersion}\label{wxplatforminfogettoolkitminorversion}
315
316\constfunc{int}{GetToolkitMinorVersion}{\void}
317
318Returns the minor version of the toolkit associated with this wxPlatformInfo instance.
d4417426 319Note that if {GetPortId}{wxplatforminfogetportid} returns wxPORT\_BASE, then this value is zero (unless externally modified with SetToolkitVersion); that is, no native toolkit is in use.
8bb6b2c0
VZ
320
321
322
323
324\membersection{wxPlatformInfo::IsOk}\label{wxplatforminfoisok}
325
326\constfunc{bool}{IsOk}{\void}
327
328Returns \true if this instance is fully initialized with valid values.
329
330
331
332\membersection{wxPlatformInfo::IsUsingUniversalWidgets}\label{wxplatforminfoisusinguniversalwidgets}
333
b98bd6af 334\constfunc{bool}{IsUsingUniversalWidgets}{\void}
8bb6b2c0 335
b98bd6af 336Returns \true if this wxPlatformInfo describes wxUniversal build.
8bb6b2c0
VZ
337
338
339\membersection{wxPlatformInfo::SetArchitecture}\label{wxplatforminfosetarchitecture}
340
341\func{void}{SetArchitecture}{\param{wxArchitecture }{n}}
342
343Sets the architecture enum value associated with this wxPlatformInfo instance.
344
345
346
347\membersection{wxPlatformInfo::SetEndianness}\label{wxplatforminfosetendianness}
348
349\func{void}{SetEndianness}{\param{wxEndianness }{n}}
350
351Sets the endianness enum value associated with this wxPlatformInfo instance.
352
353
354\membersection{wxPlatformInfo::SetOSVersion}\label{wxplatforminfosetosversion}
355
356\func{void}{SetOSVersion}{\param{int }{major}, \param{int }{minor}}
357
358Sets the version of the operating system associated with this wxPlatformInfo instance.
359
360
361
362\membersection{wxPlatformInfo::SetOperatingSystemId}\label{wxplatforminfosetoperatingsystemid}
363
364\func{void}{SetOperatingSystemId}{\param{wxOperatingSystemId }{n}}
365
366Sets the operating system associated with this wxPlatformInfo instance.
367
368
369
370\membersection{wxPlatformInfo::SetPortId}\label{wxplatforminfosetportid}
371
372\func{void}{SetPortId}{\param{wxPortId }{n}}
373
374Sets the wxWidgets port ID associated with this wxPlatformInfo instance.
375
376
377
378\membersection{wxPlatformInfo::SetToolkitVersion}\label{wxplatforminfosettoolkitversion}
379
380\func{void}{SetToolkitVersion}{\param{int }{major}, \param{int }{minor}}
381
382Sets the version of the toolkit associated with this wxPlatformInfo instance.
383
384
385
386\membersection{wxPlatformInfo::operator!=}\label{wxplatforminfooperatorunknown}
387
388\constfunc{bool}{operator!=}{\param{const wxPlatformInfo\& }{t}}
389
390Inequality operator. Tests all class' internal variables.
391
392
393\membersection{wxPlatformInfo::operator==}\label{wxplatforminfooperatorequal}
394
395\constfunc{bool}{operator==}{\param{const wxPlatformInfo\& }{t}}
396
397Equality operator. Tests all class' internal variables.
398