X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a660d684eda27638bca0384b2058911a31c8e845..afbe906abdf9aa69a56571b8b20b095351dd8f34:/docs/latex/wx/module.tex diff --git a/docs/latex/wx/module.tex b/docs/latex/wx/module.tex index 3bd382e920..bb515828dc 100644 --- a/docs/latex/wx/module.tex +++ b/docs/latex/wx/module.tex @@ -10,10 +10,35 @@ and add the DECLARE\_DYNAMIC\_CLASS and IMPLEMENT\_DYNAMIC\_CLASS to header and create an instance of each, and call each OnInit function. On exit, wxWindows will call the OnExit function for each module instance. +Note that your module class does not have to be in a header file. + +For example: + +\begin{verbatim} + // A module to allow DDE initialization/cleanup + // without calling these functions from app.cpp or from + // the user's application. + + class wxDDEModule: public wxModule + { + DECLARE_DYNAMIC_CLASS(wxDDEModule) + public: + wxDDEModule() {} + bool OnInit() { wxDDEInitialize(); return TRUE; }; + void OnExit() { wxDDECleanUp(); }; + }; + + IMPLEMENT_DYNAMIC_CLASS(wxDDEModule, wxModule) +\end{verbatim} + \wxheading{Derived from} \helpref{wxObject}{wxobject} +\wxheading{Include files} + + + \latexignore{\rtfignore{\wxheading{Members}}} \membersection{wxModule::wxModule}\label{wxmoduleconstr} @@ -58,7 +83,7 @@ need for an application to call it. \membersection{wxModule::OnExit}\label{wxmoduleonexit} -\func{virtual bool}{OnExit}{\void} +\func{virtual void}{OnExit}{\void} Provide this function with appropriate cleanup for your module.