]>
Commit | Line | Data |
---|---|---|
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 | ||
14 | The {\bf wxAppTraits} class defines various configurable aspects of a \helpref{wxApp}{wxapp}. | |
15 | You can access it using \helpref{wxApp::GetTraits}{wxappgettraits} function and you can | |
16 | create your own \helpref{wxAppTraits}{wxapptraits} overriding the | |
17 | \helpref{wxApp::CreateTraits}{wxappcreatetraits} function. | |
18 | ||
19 | By 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 | |
22 | applications. | |
23 | ||
24 | \wxheading{Derived from} | |
25 | ||
26 | None | |
27 | ||
28 | \wxheading{Include files} | |
29 | ||
30 | <wx/apptrait.h> | |
31 | ||
32 | \wxheading{See also} | |
33 | ||
34 | \helpref{wxApp overview}{wxappoverview}, \helpref{wxApp}{wxapp} | |
35 | ||
36 | \latexignore{\rtfignore{\wxheading{Members}}} | |
37 | ||
38 | ||
b98bd6af | 39 | \membersection{wxAppTraits::CreateFontMapper}\label{wxapptraitscreatefontmapper} |
8bb6b2c0 | 40 | |
b98bd6af | 41 | \func{virtual wxFontMapper *}{CreateFontMapper}{\void} |
8bb6b2c0 | 42 | |
b98bd6af | 43 | Creates the global font mapper object used for encodings/charset mapping. |
8bb6b2c0 | 44 | |
8bb6b2c0 | 45 | |
afdf936c | 46 | |
b98bd6af | 47 | \membersection{wxAppTraits::CreateLogTarget}\label{wxapptraitscreatelogtarget} |
afdf936c | 48 | |
b98bd6af | 49 | \func{virtual wxLog *}{CreateLogTarget}{\void} |
afdf936c | 50 | |
b98bd6af | 51 | Creates the default log target for the application. |
afdf936c | 52 | |
afdf936c | 53 | |
b98bd6af | 54 | \membersection{wxAppTraits::CreateMessageOutput}\label{wxapptraitscreatemessageoutput} |
afdf936c | 55 | |
b98bd6af | 56 | \func{virtual wxMessageOutput *}{CreateMessageOutput}{\void} |
afdf936c | 57 | |
b98bd6af | 58 | Creates the global object used for printing out messages. |
afdf936c | 59 | |
afdf936c | 60 | |
b98bd6af | 61 | \membersection{wxAppTraits::CreateRenderer}\label{wxapptraitscreaterenderer} |
afdf936c | 62 | |
b98bd6af | 63 | \func{virtual wxRendererNative *}{CreateRenderer}{\void} |
afdf936c | 64 | |
b98bd6af VS |
65 | Returns the renderer to use for drawing the generic controls (return value may be \NULL |
66 | in which case the default renderer for the current platform is used); | |
67 | this is used in GUI mode only and always returns \NULL in console. | |
afdf936c | 68 | |
b98bd6af | 69 | NOTE: returned pointer will be deleted by the caller. |
afdf936c VZ |
70 | |
71 | ||
72 | \membersection{wxAppTraits::GetStandardPaths}\label{wxapptraitsgetstandardpaths} | |
73 | ||
74 | \func{virtual wxStandardPaths \&}{GetStandardPaths}{\void} | |
75 | ||
76 | Returns the wxStandardPaths object for the application. | |
77 | It's normally the same for wxBase and wxGUI except in the case of wxMac and wxCocoa. | |
78 | ||
b98bd6af | 79 | \membersection{wxAppTraits::GetToolkitVersion}\label{wxapptraitsgettoolkitversion} |
afdf936c | 80 | |
b98bd6af | 81 | \func{virtual wxPortId}{GetToolkitVersion}{\param{int *}{major = NULL}, \param{int *}{minor = NULL}} |
afdf936c | 82 | |
b98bd6af VS |
83 | Returns the wxWidgets port ID used by the running program and eventually |
84 | fills the given pointers with the values of the major and minor digits | |
85 | of the native toolkit currently used. | |
449090b5 VZ |
86 | The version numbers returned are thus detected at run-time and not compile-time |
87 | (except when this is not possible e.g. wxMotif). | |
afdf936c | 88 | |
dabb05ac | 89 | E.g. if your program is using wxGTK port this function will return wxPORT\_GTK and |
b98bd6af | 90 | put in given pointers the versions of the GTK library in use. |
afdf936c | 91 | |
b98bd6af | 92 | See \helpref{wxPlatformInfo}{wxplatforminfo} for more details. |
afdf936c | 93 | |
afdf936c | 94 | |
b98bd6af | 95 | \membersection{wxAppTraits::HasStderr}\label{wxapptraitshasstderr} |
afdf936c | 96 | |
b98bd6af | 97 | \func{virtual bool}{HasStderr}{\void} |
afdf936c | 98 | |
b98bd6af | 99 | Returns \true if {\tt fprintf(stderr)} goes somewhere, \false otherwise. |
afdf936c | 100 | |
afdf936c | 101 | |
b98bd6af | 102 | \membersection{wxAppTraits::IsUsingUniversalWidgets}\label{wxapptraitsisusinguniversalwidgets} |
afdf936c | 103 | |
b98bd6af | 104 | \constfunc{bool}{IsUsingUniversalWidgets}{\void} |
afdf936c | 105 | |
b98bd6af VS |
106 | Returns \true if the library was built as wxUniversal. Always returns |
107 | \false for wxBase-only apps. | |
afdf936c | 108 | |
afdf936c | 109 | |
b98bd6af | 110 | \membersection{wxAppTraits::ShowAssertDialog}\label{wxapptraitsshowassertdialog} |
afdf936c | 111 | |
b98bd6af | 112 | \func{virtual bool}{ShowAssertDialog}{\param{const wxString \&}{ msg}} |
afdf936c | 113 | |
b98bd6af VS |
114 | Shows the assert dialog with the specified message in GUI mode or just prints |
115 | the string to stderr in console mode. | |
afdf936c | 116 | |
b98bd6af | 117 | Returns \true to suppress subsequent asserts, \false to continue as before. |
b67a86d5 | 118 |