\latexignore{\rtfignore{\wxheading{Members}}}
+
\membersection{wxApp::wxApp}
\func{void}{wxApp}{\void}
Constructor. Called implicitly with a definition of a wxApp object.
+
\membersection{wxApp::\destruct{wxApp}}
\func{void}{\destruct{wxApp}}{\void}
Destructor. Will be called implicitly on program exit if the wxApp
object is created on the stack.
+
\membersection{wxApp::argc}\label{wxappargc}
\member{int}{argc}
Number of command line arguments (after environment-specific processing).
+
\membersection{wxApp::argv}\label{wxappargv}
\member{char **}{argv}
Command line arguments (after environment-specific processing).
+
\membersection{wxApp::CreateLogTarget}\label{wxappcreatelogtarget}
\func{virtual wxLog*}{CreateLogTarget}{\void}
\helpref{wxLog}{wxlog}
+
\membersection{wxApp::Dispatch}\label{wxappdispatch}
\func{void}{Dispatch}{\void}
\helpref{wxApp::Pending}{wxapppending}
+
\membersection{wxApp::FilterEvent}\label{wxappfilterevent}
\func{int}{FilterEvent}{\param{wxEvent\& }{event}}
had been already processed (for the former return value) or that it is not
going to be processed at all (for the latter one).
+
\membersection{wxApp::GetAppName}\label{wxappgetappname}
\constfunc{wxString}{GetAppName}{\void}
wxWindows sets this to a reasonable default before
calling \helpref{wxApp::OnInit}{wxapponinit}, but the application can reset it at will.
+
\membersection{wxApp::GetAuto3D}\label{wxappgetauto3d}
\constfunc{bool}{GetAuto3D}{\void}
\helpref{wxApp::SetAuto3D}{wxappsetauto3d}
+
\membersection{wxApp::GetClassName}\label{wxappgetclassname}
\constfunc{wxString}{GetClassName}{\void}
\helpref{wxApp::SetClassName}{wxappsetclassname}
+
\membersection{wxApp::GetExitOnFrameDelete}\label{wxappgetexitonframedelete}
\constfunc{bool}{GetExitOnFrameDelete}{\void}
\helpref{wxApp::SetExitOnFrameDelete}{wxappsetexitonframedelete},\\
\helpref{wxApp shutdown overview}{wxappshutdownoverview}
+
\membersection{wxApp::GetTopWindow}\label{wxappgettopwindow}
\constfunc{virtual wxWindow *}{GetTopWindow}{\void}
\helpref{SetTopWindow}{wxappsettopwindow}
+
\membersection{wxApp::GetUseBestVisual}\label{wxappgetusebestvisual}
\constfunc{bool}{GetUseBestVisual}{\void}
\helpref{SetUseBestVisual}{wxappsetusebestvisual}
+
\membersection{wxApp::GetVendorName}\label{wxappgetvendorname}
\constfunc{wxString}{GetVendorName}{\void}
Returns the application's vendor name.
+
\membersection{wxApp::ExitMainLoop}\label{wxappexitmainloop}
\func{void}{ExitMainLoop}{\void}
You should normally exit the main loop (and the application) by deleting
the top window.
+
\membersection{wxApp::Initialized}\label{wxappinitialized}
\func{bool}{Initialized}{\void}
current state of the program (some windowing systems may not like
dialogs to pop up before the main loop has been entered).
+
\membersection{wxApp::MainLoop}\label{wxappmainloop}
\func{int}{MainLoop}{\void}
%%\helpref{wxKeyEvent}{wxkeyevent}, \helpref{wxWindow::OnChar}{wxwindowonchar},\rtfsp
%%\helpref{wxWindow::OnCharHook}{wxwindowoncharhook}, \helpref{wxDialog::OnCharHook}{wxdialogoncharhook}
+
\membersection{wxApp::OnAssert}\label{wxapponassert}
\func{void}{OnAssert}{\param{const wxChar }{*file}, \param{int }{line}, \param{const wxChar }{*cond}, \param{const wxChar }{*msg}}
be {\tt NULL} if just \helpref{wxASSERT}{wxassert} or \helpref{wxFAIL}{wxfail}
was used}
-\membersection{wxApp::OnExit}\label{wxapponexit}
-
-\func{int}{OnExit}{\void}
-
-Provide this member function for any processing which needs to be
-done as the application is about to exit. OnExit is called after
-destroying all application windows and controls, but before
-wxWindows cleanup.
\membersection{wxApp::OnCmdLineError}\label{wxapponcmdlineerror}
\helpref{OnInitCmdLine}{wxapponinitcmdline}
+
\membersection{wxApp::OnCmdLineHelp}\label{wxapponcmdlinehelp}
\func{bool}{OnCmdLineHelp}{\param{wxCmdLineParser\& }{parser}}
\helpref{OnInitCmdLine}{wxapponinitcmdline}
+
\membersection{wxApp::OnCmdLineParsed}\label{wxapponcmdlineparsed}
\func{bool}{OnCmdLineParsed}{\param{wxCmdLineParser\& }{parser}}
\helpref{OnInitCmdLine}{wxapponinitcmdline}
+
+\membersection{wxApp::OnExit}\label{wxapponexit}
+
+\func{int}{OnExit}{\void}
+
+Provide this member function for any processing which needs to be
+done as the application is about to exit. OnExit is called after
+destroying all application windows and controls, but before
+wxWindows cleanup.
+
+
\membersection{wxApp::OnFatalException}\label{wxapponfatalexception}
\func{void}{OnFatalException}{\void}
%%\helpref{wxCloseEvent}{wxcloseevent},\rtfsp
%%\helpref{wxApp::OnQueryEndSession}{wxapponqueryendsession}
+
\membersection{wxApp::OnInit}\label{wxapponinit}
\func{bool}{OnInit}{\void}
Return true to continue processing, false to exit the application.
+
\membersection{wxApp::OnInitCmdLine}\label{wxapponinitcmdline}
\func{void}{OnInitCmdLine}{\param{wxCmdLineParser\& }{parser}}
parser with the command line options for this application. The base class
versions adds support for a few standard options only.
+
\membersection{wxApp::OnQueryEndSession}\label{wxapponqueryendsession}
\func{void}{OnQueryEndSession}{\param{wxCloseEvent\& }{event}}
%% GD: OnXXX functions are not documented
%%\helpref{wxApp::OnEndSession}{wxapponendsession}
+
+\membersection{wxApp::OnRun}\label{wxapponrun}
+
+\func{virtual int}{OnRun}{\void}
+
+This virtual function is where the execution of a program written in wxWindows
+starts. The default implementation just enters the main loop and starts
+handling the events until it terminates, either because
+\helpref{ExitMainLoop}{wxappexitmainloop} has been explicitly called or because
+the last frame has been deleted and
+\helpref{GetExitOnFrameDelete}{wxappgetexitonframedelete} flag is \true (this
+is the default).
+
+
+\membersection{wxApp::OnUnhandledException}{wxapponunhandledexception}
+
+\func{virtual void}{OnUnhandledException}{\void}
+
+This function is called when an unhandled C++ exception occurs inside
+\helpref{OnRun()}{wxapponrun} (the exceptions which occur during the program
+startup and shutdown might not be caught at all).
+Note that the exception type is lost by now, so if you want to really handle
+the exception you should override \helpref{OnRun()}{wxapponrun} and put a
+try/catch clause around the call to the base class version there.
+
+
\membersection{wxApp::ProcessMessage}\label{wxappprocessmessage}
\func{bool}{ProcessMessage}{\param{WXMSG *}{msg}}
}
\end{verbatim}
+
\membersection{wxApp::Pending}\label{wxapppending}
\func{bool}{Pending}{\void}
\helpref{wxApp::Dispatch}{wxappdispatch}
+
\membersection{wxApp::SendIdleEvents}\label{wxappsendidleevents}
\func{bool}{SendIdleEvents}{\void}
%%\helpref{wxApp::OnIdle}{wxapponidle}
\helpref{wxIdleEvent}{wxidleevent}
+
\membersection{wxApp::SetAppName}\label{wxappsetappname}
\func{void}{SetAppName}{\param{const wxString\& }{name}}
\helpref{wxApp::GetAppName}{wxappgetappname}
+
\membersection{wxApp::SetAuto3D}\label{wxappsetauto3d}
\func{void}{SetAuto3D}{\param{const bool}{ auto3D}}
\helpref{wxApp::GetAuto3D}{wxappgetauto3d}
+
\membersection{wxApp::SetClassName}\label{wxappsetclassname}
\func{void}{SetClassName}{\param{const wxString\& }{name}}
\helpref{wxApp::GetClassName}{wxappgetclassname}
+
\membersection{wxApp::SetExitOnFrameDelete}\label{wxappsetexitonframedelete}
\func{void}{SetExitOnFrameDelete}{\param{bool}{ flag}}
\helpref{wxApp::GetExitOnFrameDelete}{wxappgetexitonframedelete},\\
\helpref{wxApp shutdown overview}{wxappshutdownoverview}
+
\membersection{wxApp::SetTopWindow}\label{wxappsettopwindow}
\func{void}{SetTopWindow}{\param{wxWindow* }{window}}
\helpref{wxApp::GetTopWindow}{wxappgettopwindow}, \helpref{wxApp::OnInit}{wxapponinit}
+
\membersection{wxApp::SetVendorName}\label{wxappsetvendorname}
\func{void}{SetVendorName}{\param{const wxString\& }{name}}
\helpref{wxApp::GetVendorName}{wxappgetvendorname}
+
\membersection{wxApp::SetUseBestVisual}\label{wxappsetusebestvisual}
\func{void}{SetUseBestVisual}{\param{bool}{ flag}}
\docparam{flag}{If true, the app will use the best visual.}
+
+\membersection{wxApp::HandleEvent}\label{wxapphandleevent}
+
+\constfunc{virtual void}{HandleEvent}{\param{wxEvtHandler}{ *handler}, \param{wxEventFunction}{ func}, \param{wxEvent\& }{event}}
+
+This function simply invokes the given method \arg{func} of the specified
+event handler \arg{handler} with the \arg{event} as parameter. It exists solely
+to allow to catch the C++ exceptions which could be thrown by all event
+handlers in the application in one place: if you want to do this, override this
+function in your wxApp-derived class and add try/catch clause(s) to it.
+
+
\membersection{wxApp::Yield}\label{wxappyield}
\func{bool}{Yield}{\param{bool}{ onlyIfNeeded = false}}
--- /dev/null
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Name: texcept.tex
+%% Purpose: C++ exceptions and wxWindows overview
+%% Author: Vadim Zeitlin
+%% Modified by:
+%% Created: 17.09.03
+%% RCS-ID: $Id$
+%% Copyright: (c) 2003 Vadim Zeitlin
+%% License: wxWindows license
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\section{C++ exceptions overview}\label{exceptionsoverview}
+
+\subsection{Introduction}
+
+wxWindows had been started long before the exceptions were introduced in C++ so
+it is not very surprizing that it is not built around using them as some more
+modern C++ libraries are. For instance, the library doesn't throw exceptions to
+signal about the errors. Moreover, up to (and including) the version 2.4 of
+wxWindows, even using the exceptions in the user code was dangerous because the
+library code wasn't exception-safe and so an exception propagating through it
+could result in memory and/or resource leaks, and also not very convenient.
+
+Starting from the version 2.5.1 wxWindows becomes more exception-friendly. It
+still doesn't use the exceptions by itself but it should be now safe to use the
+exceptions in the user code and the library tries to help you with this. Please
+note that making the library exception-safe is still work in progress.
+
+
+\subsection{Strategies for exceptions handling}
+
+There are several choice for using the exceptions in wxWindows programs. First
+of all, you may not use them at all. As stated above, the library doesn't throw
+any exceptions by itself and so you don't have to worry about exceptions at all
+unless your own code throws them. This is, of course, the simplest solution but
+may be not the best one to deal with all possible errors.
+
+Another strategy is to use exceptions only to signal truly fatal errors. In
+this case you probably don't expect to recover from them and the default
+behaviour -- to simply terminate the program -- may be appropriate. If it is
+not, you may override \helpref{OnUnhandledException()}{wxapponunhandledexception}
+in your wxApp-derived class to perform any clean up tasks. Note, however, that
+any information about the exact exception type is lost when this function is
+called, so if you need you should override \helpref{OnRun()}{wxapponrun} and
+add a try/catch clause around the call of the base class version. This would
+allow you to catch any exceptions generated during the execution of the main
+event loop. To deal with the exceptions which may arise during the program
+startup and/or shutdown you should insert try/catch clauses in
+\helpref{OnInit()}{wxapponinit} and/or \helpref{OnExit()}{wxappoxexit} as well.
+
+Finally, you may also want to continue running even when certain exceptions
+occur. If all of your exceptions may happen only in the event handlers of a
+single class (or only in the classes derived from it), you may centralize your
+exception handling code in \helpref{ProcessEvent}{wxevthandlerprocessevent}
+method of this class. If this is impractical, you may also consider overriding
+the \helpref{wxApp::HandleEvent()}{wxapphandleevent} which allows you to handle
+all the exceptions thrown by any event handler.
+
+
+\subsection{Technicalities}
+
+To use any kind of exception support in the library you need to build it with
+\texttt{wxUSE\_EXCEPTIONS} set to $1$. This should be the case by default but
+if it isn't, you should edit the \texttt{include/wx/msw/setup.h} file under
+Windows or run \texttt{configure} with \texttt{--enable-exceptions} argument
+under Unix.
+
+On the other hand, if you do \emph{not} plan to use exceptions, setting this
+flag to $0$ or using \texttt{--disable-exceptions} could result in a leaner and
+slightly faster library.
+
+As for any other library feature, there is a \helpref{sample}{sampleexcept}
+showing how to use it. Please look at its sources for further information.
+
+
\input texpr.tex
\input fs.tex
\input tevent.tex
+\input texcept.tex
\input tstyles.tex
\input tdelwin.tex
\input tdialog.tex
you can't find the sample you showing the control you are interested in by
name. Most of wxWindows classes, occur in at least one of the samples.
+
\subsection{Minimal sample}\label{sampleminimal}
The minimal sample is what most people will know under the term Hello World,
needed to write a program that will display a "hello" dialog. This is usually
a good starting point for learning how to use wxWindows.
+
\subsection{Art provider sample}\label{sampleartprovider}
The {\tt artprov} sample shows how you can customize the look of standard
It also shows how you can use wxArtProvider to
get stock bitmaps for use in your application.
+
\subsection{Calendar sample}\label{samplecalendar}
This font shows the \helpref{calendar control}{wxcalendarctrl} in action. It
shows how to configure the control (see the different options in the calendar
menu) and also how to process the notifications from it.
+
\subsection{Checklist sample}\label{samplechecklist}
This sample demonstrates the use of the \helpref{wxCheckListBox}{wxchecklistbox}
as well). The layout of the dialog is created using a \helpref{wxBoxSizer}{wxboxsizer}
demonstrating a simple dynamic layout.
+
\subsection{Config sample}\label{sampleconfig}
This sample demonstrates the \helpref{wxConfig}{wxconfigbase} classes in a platform
See \helpref{wxConfig overview}{wxconfigoverview} for the descriptions of all
features of this class.
+
\subsection{Controls sample}\label{samplecontrols}
The controls sample is the main test program for most simple controls used in
\twocolitem{\helpref{wxSlider}{wxslider}}{A slider that can be dragged by the user}
\end{twocollist}
+
\subsection{Database sample}\label{sampledb}
The database sample is a small test program showing how to use the ODBC
classes written by Remstar Intl. Obviously, this sample requires a
database with ODBC support to be correctly installed on your system.
+
\subsection{Dialogs sample}\label{sampledialogs}
This sample shows how to use the common dialogs available from wxWindows. These
dialogs are described in details in the \helpref{Common dialogs overview}{commondialogsoverview}.
+
\subsection{Dialup sample}\label{sampledialup}
This sample shows \helpref{wxDialUpManager}{wxdialupmanager}
modem attached and (this only makes sense for Windows) list the available
connections.
+
\subsection{DnD sample}\label{samplednd}
This sample shows both clipboard and drag and drop in action. It is quite non
Take a look at DnDShapeDataObject class to see how you may use
\helpref{wxDataObject}{wxdataobject} to achieve this.
+
\subsection{Dynamic sample}\label{sampledynamic}
This sample is a very small sample that demonstrates the use of the
See also the \helpref{event sample}{sampleevent}
+
\subsection{Event sample}\label{sampleevent}
The event sample demonstrates various features of the wxWindows events. It
It replaces the old dynamic sample.
+
+\subsection{Except(ions) sample}\label{sampleexcept}
+
+This very simple sample shows how to use C++ exceptions in wxWindows programs,
+i.e. where to catch the exception which may be thrown by the program code. It
+doesn't do anything very exciting by itself, you need to study its code to
+understand what goes on.
+
+You need to build the library with \texttt{wxUSE\_EXCEPTIONS} being set to $1$
+and compile your code with the C++ exceptions support to be able to build this
+sample.
+
+
\subsection{Exec sample}\label{sampleexec}
The exec sample demonstrates the \helpref{wxExecute}{wxexecute} and
\helpref{wxProcess::Kill}{wxprocesskill} and test for their existence with
\helpref{wxProcess::Exists}{wxprocessexists}.
+
\subsection{Font sample}\label{samplefont}
The font sample demonstrates \helpref{wxFont}{wxfont},
available (to wxWindows) on the computer and shows all characters of the
chosen font as well.
+
\subsection{Grid sample}\label{samplegrid}
TODO.
+
\subsection{HTML samples}\label{samplehtml}
Eight HTML samples (you can find them in directory {\tt samples/html})
while {\it Helpview} is simple tool that only pops up help window and
displays help books given at command line.
+
\subsection{Image sample}\label{sampleimage}
The image sample demonstrates the use of the \helpref{wxImage}{wximage} class
bitmap is then converted to a wxImage and the foreground colour (black) is
replaced with red using \helpref{wxImage::Replace}{wximagereplace}.
+
\subsection{Internat(ionalization) sample}\label{sampleinternat}
The not very clearly named internat sample demonstrates the wxWindows
More information about this sample can be found in the {\tt readme.txt} file in
its directory. Please see also \helpref{i18n overview}{internationalization}.
+
\subsection{Layout sample}\label{samplelayout}
The layout sample demonstrates the two different layout systems offered
class. See also \helpref{wxNotebookSizer}{wxnotebooksizer} and
\helpref{wxSizer}{wxsizer}.
+
\subsection{Listctrl sample}\label{samplelistctrl}
This sample shows \helpref{wxListCtrl}{wxlistctrl} control. Different modes
(several thousands) items into the control.
+
\subsection{Notebook sample}\label{samplenotebook}
This samples shows two controls at once: although initially it was written to
file \texttt{notebook.h} and rebuild the sample.
+
\subsection{Render sample}\label{samplerender}
This sample shows how to replace the default wxWindows
(DLL) implementing a renderer and load and unload it during the run-time.
+
\subsection{Rotate sample}\label{samplerotate}
This is a simple example which demonstrates how to rotate an image with
or with interpolation (right mouse button) which is slower but gives
better results.
+
\subsection{Scroll subwindow sample}\label{samplescrollsub}
This sample demonstrates the use of the \helpref{wxScrolledWindow}{wxscrolledwindow}
the aim to prevent unnecessary drawing in the window and thus reducing or removing
flicker on screen.
+
\subsection{Sockets sample}\label{samplesockets}
The sockets sample demonstrates how to use the communication facilities
\item New samples which actually do something useful (suggestions accepted).
\end{itemize}
+
\subsection{Statbar sample}\label{samplestatbar}
This sample shows how to create and use wxStatusBar. Although most of the
of fields) and how to use it to show icons/bitmaps and/or put arbitrary
controls into it.
+
\subsection{Text sample}\label{sampletext}
This sample demonstrates four features: firstly the use and many variants of
Last not least: some of the text controls have tooltips and the sample also shows
how tooltips can be centrally disabled and their latency controlled.
+
\subsection{Thread sample}\label{samplethread}
This sample demonstrates the use of threads in connection with GUI programs.
See also \helpref{Multithreading overview}{wxthreadoverview} and \helpref{wxThread}{wxthread}.
+
\subsection{Toolbar sample}\label{sampletoolbar}
The toolbar sample shows the \helpref{wxToolBar}{wxtoolbar} class in action.
group, that is checking any of them automatically unchecks the previously
checked one.
+
\subsection{Treectrl sample}\label{sampletreectrl}
This sample demonstrates using \helpref{wxTreeCtrl}{wxtreectrl} class. Here
sorting (in default alphabetical order as well as in custom one) is
demonstrated here as well - try the corresponding menu entries.
+
\subsection{Wizard sample}\label{samplewizard}
This sample shows so-called wizard dialog (implemented using