2006-07-24 14:20:18 -04:00
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
%% Name: apptraits.tex
|
|
|
|
%% Purpose: wxAppTraits
|
|
|
|
%% Author: Francesco Montorsi
|
|
|
|
%% Modified by:
|
|
|
|
%% Created: 5-7-2006
|
|
|
|
%% RCS-ID: $Id$
|
|
|
|
%% Copyright: (c) wxWidgets Team
|
|
|
|
%% License: wxWindows license
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
|
|
|
|
\section{\class{wxAppTraits}}\label{wxapptraits}
|
|
|
|
|
|
|
|
The {\bf wxAppTraits} class defines various configurable aspects of a \helpref{wxApp}{wxapp}.
|
|
|
|
You can access it using \helpref{wxApp::GetTraits}{wxappgettraits} function and you can
|
|
|
|
create your own \helpref{wxAppTraits}{wxapptraits} overriding the
|
|
|
|
\helpref{wxApp::CreateTraits}{wxappcreatetraits} function.
|
|
|
|
|
|
|
|
By default, wxWidgets creates a {\tt wxConsoleAppTraits} object for console applications
|
|
|
|
(i.e. those applications linked against wxBase library only - see the
|
|
|
|
\helpref{Libraries list}{librarieslist} page) and a {\tt wxGUIAppTraits} object for GUI
|
|
|
|
applications.
|
|
|
|
|
|
|
|
\wxheading{Derived from}
|
|
|
|
|
|
|
|
None
|
|
|
|
|
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/apptrait.h>
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxApp overview}{wxappoverview}, \helpref{wxApp}{wxapp}
|
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
|
|
|
|
2006-08-16 13:18:34 -04:00
|
|
|
\membersection{wxAppTraits::CreateFontMapper}\label{wxapptraitscreatefontmapper}
|
2006-08-13 17:00:32 -04:00
|
|
|
|
2006-08-16 13:18:34 -04:00
|
|
|
\func{virtual wxFontMapper *}{CreateFontMapper}{\void}
|
2006-08-13 17:00:32 -04:00
|
|
|
|
2006-08-16 13:18:34 -04:00
|
|
|
Creates the global font mapper object used for encodings/charset mapping.
|
2006-08-13 17:00:32 -04:00
|
|
|
|
|
|
|
|
2006-07-24 14:20:18 -04:00
|
|
|
|
2006-08-16 13:18:34 -04:00
|
|
|
\membersection{wxAppTraits::CreateLogTarget}\label{wxapptraitscreatelogtarget}
|
2006-07-24 14:20:18 -04:00
|
|
|
|
2006-08-16 13:18:34 -04:00
|
|
|
\func{virtual wxLog *}{CreateLogTarget}{\void}
|
2006-07-24 14:20:18 -04:00
|
|
|
|
2006-08-16 13:18:34 -04:00
|
|
|
Creates the default log target for the application.
|
2006-07-24 14:20:18 -04:00
|
|
|
|
|
|
|
|
2006-08-16 13:18:34 -04:00
|
|
|
\membersection{wxAppTraits::CreateMessageOutput}\label{wxapptraitscreatemessageoutput}
|
2006-07-24 14:20:18 -04:00
|
|
|
|
2006-08-16 13:18:34 -04:00
|
|
|
\func{virtual wxMessageOutput *}{CreateMessageOutput}{\void}
|
2006-07-24 14:20:18 -04:00
|
|
|
|
2006-08-16 13:18:34 -04:00
|
|
|
Creates the global object used for printing out messages.
|
2006-07-24 14:20:18 -04:00
|
|
|
|
|
|
|
|
2006-08-16 13:18:34 -04:00
|
|
|
\membersection{wxAppTraits::CreateRenderer}\label{wxapptraitscreaterenderer}
|
2006-07-24 14:20:18 -04:00
|
|
|
|
2006-08-16 13:18:34 -04:00
|
|
|
\func{virtual wxRendererNative *}{CreateRenderer}{\void}
|
2006-07-24 14:20:18 -04:00
|
|
|
|
2006-08-16 13:18:34 -04:00
|
|
|
Returns the renderer to use for drawing the generic controls (return value may be \NULL
|
|
|
|
in which case the default renderer for the current platform is used);
|
|
|
|
this is used in GUI mode only and always returns \NULL in console.
|
2006-07-24 14:20:18 -04:00
|
|
|
|
2006-08-16 13:18:34 -04:00
|
|
|
NOTE: returned pointer will be deleted by the caller.
|
2006-07-24 14:20:18 -04:00
|
|
|
|
|
|
|
|
|
|
|
\membersection{wxAppTraits::GetStandardPaths}\label{wxapptraitsgetstandardpaths}
|
|
|
|
|
|
|
|
\func{virtual wxStandardPaths \&}{GetStandardPaths}{\void}
|
|
|
|
|
|
|
|
Returns the wxStandardPaths object for the application.
|
|
|
|
It's normally the same for wxBase and wxGUI except in the case of wxMac and wxCocoa.
|
|
|
|
|
2006-08-16 13:18:34 -04:00
|
|
|
\membersection{wxAppTraits::GetToolkitVersion}\label{wxapptraitsgettoolkitversion}
|
2006-07-24 14:20:18 -04:00
|
|
|
|
2006-08-16 13:18:34 -04:00
|
|
|
\func{virtual wxPortId}{GetToolkitVersion}{\param{int *}{major = NULL}, \param{int *}{minor = NULL}}
|
2006-07-24 14:20:18 -04:00
|
|
|
|
2006-08-16 13:18:34 -04:00
|
|
|
Returns the wxWidgets port ID used by the running program and eventually
|
|
|
|
fills the given pointers with the values of the major and minor digits
|
|
|
|
of the native toolkit currently used.
|
2006-07-24 14:20:18 -04:00
|
|
|
|
2006-08-25 13:26:57 -04:00
|
|
|
E.g. if your program is using wxGTK port this function will return wxPORT\_GTK and
|
2006-08-16 13:18:34 -04:00
|
|
|
put in given pointers the versions of the GTK library in use.
|
2006-07-24 14:20:18 -04:00
|
|
|
|
2006-08-16 13:18:34 -04:00
|
|
|
See \helpref{wxPlatformInfo}{wxplatforminfo} for more details.
|
2006-07-24 14:20:18 -04:00
|
|
|
|
|
|
|
|
2006-08-16 13:18:34 -04:00
|
|
|
\membersection{wxAppTraits::HasStderr}\label{wxapptraitshasstderr}
|
2006-07-24 14:20:18 -04:00
|
|
|
|
2006-08-16 13:18:34 -04:00
|
|
|
\func{virtual bool}{HasStderr}{\void}
|
2006-07-24 14:20:18 -04:00
|
|
|
|
2006-08-16 13:18:34 -04:00
|
|
|
Returns \true if {\tt fprintf(stderr)} goes somewhere, \false otherwise.
|
2006-07-24 14:20:18 -04:00
|
|
|
|
|
|
|
|
2006-08-16 13:18:34 -04:00
|
|
|
\membersection{wxAppTraits::IsUsingUniversalWidgets}\label{wxapptraitsisusinguniversalwidgets}
|
2006-07-24 14:20:18 -04:00
|
|
|
|
2006-08-16 13:18:34 -04:00
|
|
|
\constfunc{bool}{IsUsingUniversalWidgets}{\void}
|
2006-07-24 14:20:18 -04:00
|
|
|
|
2006-08-16 13:18:34 -04:00
|
|
|
Returns \true if the library was built as wxUniversal. Always returns
|
|
|
|
\false for wxBase-only apps.
|
2006-07-24 14:20:18 -04:00
|
|
|
|
|
|
|
|
2006-08-16 13:18:34 -04:00
|
|
|
\membersection{wxAppTraits::ShowAssertDialog}\label{wxapptraitsshowassertdialog}
|
2006-07-24 14:20:18 -04:00
|
|
|
|
2006-08-16 13:18:34 -04:00
|
|
|
\func{virtual bool}{ShowAssertDialog}{\param{const wxString \&}{ msg}}
|
2006-07-24 14:20:18 -04:00
|
|
|
|
2006-08-16 13:18:34 -04:00
|
|
|
Shows the assert dialog with the specified message in GUI mode or just prints
|
|
|
|
the string to stderr in console mode.
|
2006-07-24 14:20:18 -04:00
|
|
|
|
2006-08-16 13:18:34 -04:00
|
|
|
Returns \true to suppress subsequent asserts, \false to continue as before.
|