]> git.saurik.com Git - wxWidgets.git/blame - include/wx/module.h
Added wxPoem sample; fixed some Dialog Editor problems; wxStaticBitmap and wxBitmapButton
[wxWidgets.git] / include / wx / module.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: module.h
3// Purpose: Modules handling
4// Author: Wolfram Gloger/adapted by Guilhem Lavaux
5// Modified by:
6// Created: 04/11/98
7// RCS-ID: $Id$
8// Copyright: (c) Wolfram Gloger and Guilhem Lavaux
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
34138703
JS
12#ifndef _WX_MODULEH__
13#define _WX_MODULEH__
c801d85f
KB
14
15#ifdef __GNUG__
16#pragma interface "module.h"
17#endif
18
19#include "wx/object.h"
20#include "wx/list.h"
21#include "wx/setup.h"
22
23class WXDLLEXPORT wxModule: public wxObject
24{
25public:
26 wxModule(void) {}
27 ~wxModule(void) {}
28
29 // If returns FALSE, quits the application immediately.
30 bool Init(void) { return OnInit(); }
31 void Exit(void) { OnExit(); }
32
33 // Override both of these
34 virtual bool OnInit(void) = 0;
35 virtual void OnExit(void) = 0;
36
37 static void RegisterModule(wxModule* module);
38 static bool RegisterModules(void);
39 static bool InitializeModules(void);
40 static void CleanUpModules(void);
41
42protected:
43 static wxList m_modules;
44
45DECLARE_CLASS(wxModule)
46};
47
48#endif
49