X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a660d684eda27638bca0384b2058911a31c8e845..395a82b13fa5f316d2d0dead17701e9bc23337d3:/docs/latex/wx/module.tex?ds=sidebyside diff --git a/docs/latex/wx/module.tex b/docs/latex/wx/module.tex index 3bd382e920..7d5e62dad0 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. @@ -67,7 +92,7 @@ Provide this function with appropriate cleanup for your module. \func{virtual bool}{OnInit}{\void} Provide this function with appropriate initialization for your module. If the function -returns FALSE, wxWindows will exit immediately. +returns false, wxWindows will exit immediately. \membersection{wxModule::RegisterModule}\label{wxmoduleregistermodule}