dfad059924
in all ports. Added Motif wxFileDialog. Added wxPostScriptModule and removed PostScript init in app.cpp. Also removed wxMessageBox function from generic implementation. Windows release .exes are now smaller (< 300K for minimal.exe). Some OGL updates. __try -> try in MSW main.cpp. BC++ 5 fixes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@797 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
86 lines
2.7 KiB
TeX
86 lines
2.7 KiB
TeX
\section{\class{wxModule}}\label{wxmodule}
|
|
|
|
The module system is a very simple mechanism to allow applications (and parts of wxWindows itself) to
|
|
define initialization and cleanup functions that are automatically called on wxWindows
|
|
startup and exit.
|
|
|
|
To define a new kind of module, derive a class from wxModule, override the OnInit and OnExit functions,
|
|
and add the DECLARE\_DYNAMIC\_CLASS and IMPLEMENT\_DYNAMIC\_CLASS to header and implementation files
|
|
(which can be the same file). On initialization, wxWindows will find all classes derived from wxModule,
|
|
create an instance of each, and call each OnInit function. On exit, wxWindows will call the OnExit
|
|
function for each module instance.
|
|
|
|
\wxheading{Derived from}
|
|
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
\membersection{wxModule::wxModule}\label{wxmoduleconstr}
|
|
|
|
\func{}{wxModule}{\void}
|
|
|
|
Constructs a wxModule object.
|
|
|
|
\membersection{wxModule::\destruct{wxModule}}
|
|
|
|
\func{}{\destruct{wxModule}}{\void}
|
|
|
|
Destructor.
|
|
|
|
\membersection{wxModule::CleanupModules}\label{wxmodulecleanupmodules}
|
|
|
|
\func{static void}{CleanupModules}{\void}
|
|
|
|
Calls Exit for each module instance. Called by wxWindows on exit, so there is no
|
|
need for an application to call it.
|
|
|
|
\membersection{wxModule::Exit}\label{wxmoduleexit}
|
|
|
|
\func{void}{Exit}{\void}
|
|
|
|
Calls OnExit. This function is called by wxWindows and should not need to be called
|
|
by an application.
|
|
|
|
\membersection{wxModule::Init}\label{wxmoduleinit}
|
|
|
|
\func{bool}{Init}{\void}
|
|
|
|
Calls OnInit. This function is called by wxWindows and should not need to be called
|
|
by an application.
|
|
|
|
\membersection{wxModule::InitializeModules}\label{wxmoduleinitializemodules}
|
|
|
|
\func{static bool}{InitializeModules}{\void}
|
|
|
|
Calls Init for each module instance. Called by wxWindows on startup, so there is no
|
|
need for an application to call it.
|
|
|
|
\membersection{wxModule::OnExit}\label{wxmoduleonexit}
|
|
|
|
\func{virtual void}{OnExit}{\void}
|
|
|
|
Provide this function with appropriate cleanup for your module.
|
|
|
|
\membersection{wxModule::OnInit}\label{wxmoduleoninit}
|
|
|
|
\func{virtual bool}{OnInit}{\void}
|
|
|
|
Provide this function with appropriate initialization for your module. If the function
|
|
returns FALSE, wxWindows will exit immediately.
|
|
|
|
\membersection{wxModule::RegisterModule}\label{wxmoduleregistermodule}
|
|
|
|
\func{static void}{RegisterModule}{\param{wxModule*}{ module}}
|
|
|
|
Registers this module with wxWindows. Called by wxWindows on startup, so there is no
|
|
need for an application to call it.
|
|
|
|
\membersection{wxModule::RegisterModules}\label{wxmoduleregistermodules}
|
|
|
|
\func{static bool}{RegisterModules}{\void}
|
|
|
|
Creates instances of and registers all modules. Called by wxWindows on startup, so there is no
|
|
need for an application to call it.
|
|
|