]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/apptraits.tex
typo
[wxWidgets.git] / docs / latex / wx / apptraits.tex
CommitLineData
afdf936c
VZ
1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2%% Name: apptraits.tex
3%% Purpose: wxAppTraits
4%% Author: Francesco Montorsi
5%% Modified by:
6%% Created: 5-7-2006
7%% RCS-ID: $Id$
8%% Copyright: (c) wxWidgets Team
9%% License: wxWindows license
10%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12\section{\class{wxAppTraits}}\label{wxapptraits}
13
14The {\bf wxAppTraits} class defines various configurable aspects of a \helpref{wxApp}{wxapp}.
15You can access it using \helpref{wxApp::GetTraits}{wxappgettraits} function and you can
16create your own \helpref{wxAppTraits}{wxapptraits} overriding the
17\helpref{wxApp::CreateTraits}{wxappcreatetraits} function.
18
19By default, wxWidgets creates a {\tt wxConsoleAppTraits} object for console applications
20(i.e. those applications linked against wxBase library only - see the
21\helpref{Libraries list}{librarieslist} page) and a {\tt wxGUIAppTraits} object for GUI
22applications.
23
24\wxheading{Derived from}
25
26None
27
28\wxheading{Include files}
29
30<wx/apptrait.h>
31
a7af285d
VZ
32\wxheading{Library}
33
34\helpref{wxBase}{librarieslist}
35
afdf936c
VZ
36\wxheading{See also}
37
38\helpref{wxApp overview}{wxappoverview}, \helpref{wxApp}{wxapp}
39
40\latexignore{\rtfignore{\wxheading{Members}}}
41
42
0d5c7b2d
VZ
43\membersection{wxAppTraits::CreateConfig}\label{wxapptraitscreateconfig}
44
45\func{virtual wxConfigBase *}{CreateConfig}{\void}
46
47Called by wxWidgets to create the default configuration object for the
48application. The default version creates a registry-based
49\helpref{wxRegConfig}{wxconfigbase} class under MSW and
50\helpref{wxFileConfig}{wxfileconfig} under all other platforms. The
51\helpref{wxApp}{wxapp} \helpref{GetAppName()}{wxappgetappname} and
52\helpref{GetVendorName()}{wxappgetvendorname} methods are used to determine the
53registry key or file name.
54
55
b98bd6af 56\membersection{wxAppTraits::CreateFontMapper}\label{wxapptraitscreatefontmapper}
8bb6b2c0 57
b98bd6af 58\func{virtual wxFontMapper *}{CreateFontMapper}{\void}
8bb6b2c0 59
b98bd6af 60Creates the global font mapper object used for encodings/charset mapping.
8bb6b2c0 61
8bb6b2c0 62
afdf936c 63
b98bd6af 64\membersection{wxAppTraits::CreateLogTarget}\label{wxapptraitscreatelogtarget}
afdf936c 65
b98bd6af 66\func{virtual wxLog *}{CreateLogTarget}{\void}
afdf936c 67
b98bd6af 68Creates the default log target for the application.
afdf936c 69
afdf936c 70
b98bd6af 71\membersection{wxAppTraits::CreateMessageOutput}\label{wxapptraitscreatemessageoutput}
afdf936c 72
b98bd6af 73\func{virtual wxMessageOutput *}{CreateMessageOutput}{\void}
afdf936c 74
b98bd6af 75Creates the global object used for printing out messages.
afdf936c 76
afdf936c 77
b98bd6af 78\membersection{wxAppTraits::CreateRenderer}\label{wxapptraitscreaterenderer}
afdf936c 79
b98bd6af 80\func{virtual wxRendererNative *}{CreateRenderer}{\void}
afdf936c 81
b98bd6af
VS
82Returns the renderer to use for drawing the generic controls (return value may be \NULL
83in which case the default renderer for the current platform is used);
84this is used in GUI mode only and always returns \NULL in console.
afdf936c 85
b98bd6af 86NOTE: returned pointer will be deleted by the caller.
afdf936c 87
b5f0ae57
RR
88\membersection{wxAppTraits::GetDesktopEnvironment}\label{wxapptraitsgetdesktopenvironment}
89
90\constfunc{virtual wxString}{GetDesktopEnvironment}{\void}
91
92This method returns the name of the desktop environment currently
93running in a Unix desktop. Currently only "KDE" or "GNOME" are
94supported and the code uses the X11 session protocol vendor name
4483a3d2
RR
95to figure out, which desktop environment is running. The method
96returns an empty string otherwise and on all other platforms.
afdf936c
VZ
97
98\membersection{wxAppTraits::GetStandardPaths}\label{wxapptraitsgetstandardpaths}
99
100\func{virtual wxStandardPaths \&}{GetStandardPaths}{\void}
101
102Returns the wxStandardPaths object for the application.
103It's normally the same for wxBase and wxGUI except in the case of wxMac and wxCocoa.
104
b98bd6af 105\membersection{wxAppTraits::GetToolkitVersion}\label{wxapptraitsgettoolkitversion}
afdf936c 106
b98bd6af 107\func{virtual wxPortId}{GetToolkitVersion}{\param{int *}{major = NULL}, \param{int *}{minor = NULL}}
afdf936c 108
b98bd6af
VS
109Returns the wxWidgets port ID used by the running program and eventually
110fills the given pointers with the values of the major and minor digits
111of the native toolkit currently used.
449090b5
VZ
112The version numbers returned are thus detected at run-time and not compile-time
113(except when this is not possible e.g. wxMotif).
afdf936c 114
dabb05ac 115E.g. if your program is using wxGTK port this function will return wxPORT\_GTK and
b98bd6af 116put in given pointers the versions of the GTK library in use.
afdf936c 117
b98bd6af 118See \helpref{wxPlatformInfo}{wxplatforminfo} for more details.
afdf936c 119
afdf936c 120
b98bd6af 121\membersection{wxAppTraits::HasStderr}\label{wxapptraitshasstderr}
afdf936c 122
b98bd6af 123\func{virtual bool}{HasStderr}{\void}
afdf936c 124
b98bd6af 125Returns \true if {\tt fprintf(stderr)} goes somewhere, \false otherwise.
afdf936c 126
afdf936c 127
b98bd6af 128\membersection{wxAppTraits::IsUsingUniversalWidgets}\label{wxapptraitsisusinguniversalwidgets}
afdf936c 129
b98bd6af 130\constfunc{bool}{IsUsingUniversalWidgets}{\void}
afdf936c 131
b98bd6af
VS
132Returns \true if the library was built as wxUniversal. Always returns
133\false for wxBase-only apps.
afdf936c 134
afdf936c 135
b98bd6af 136\membersection{wxAppTraits::ShowAssertDialog}\label{wxapptraitsshowassertdialog}
afdf936c 137
b98bd6af 138\func{virtual bool}{ShowAssertDialog}{\param{const wxString \&}{ msg}}
afdf936c 139
b98bd6af
VS
140Shows the assert dialog with the specified message in GUI mode or just prints
141the string to stderr in console mode.
afdf936c 142
b98bd6af 143Returns \true to suppress subsequent asserts, \false to continue as before.
b67a86d5 144