X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dfad0599246651d4994e348d868a3e65613c7379..a9249b2eb2a40d8c71f828669045c4ddaa8dc5ff:/docs/latex/wx/module.tex diff --git a/docs/latex/wx/module.tex b/docs/latex/wx/module.tex index 8eee76aadf..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}