#include <ax_resource/ax_module.h>
Public Member Functions | |
AxModule () | |
Constructor. | |
~AxModule () | |
Destructor. | |
virtual bool | OnInit ()=0 |
Called on IDE startup, before the main window has been created. | |
virtual bool | OnInitUI ()=0 |
Called on application startup, after the main window has been created. | |
virtual void | OnExit ()=0 |
Called just before program termination, but only if OnInit(). | |
virtual bool | LoadConfig (wxConfigBase &WXUNUSED(config)) |
Read config settings. | |
virtual bool | SaveConfig (wxConfigBase &WXUNUSED(config)) |
Write config settings. | |
virtual bool | OnCloseMainWindow () |
virtual bool | OnSearch (const wxString &WXUNUSED(searchString), int WXUNUSED(flags), AxResourceLibrary *WXUNUSED(library)) |
virtual bool | IsFileSupported (const wxString &WXUNUSED(filename)) |
Is this file supported? | |
virtual AxResource * | LoadResource (const wxString &WXUNUSED(filename)) |
Load the file into a new AxResource. | |
virtual bool | AggregateFiles (AxResourceLibrary *WXUNUSED(library), wxArrayString &WXUNUSED(files), bool WXUNUSED(checkIfFileLoaded)) |
Aggregate any files that belong together and add to resources. | |
virtual AxActivator * | CreateActivator (AxResourceLibrary *WXUNUSED(library), AxResource *WXUNUSED(resource)) |
Create an activator for the resource, for creating views and further menu items. | |
bool | Init (AxResourceLibrary *library) |
void | Exit () |
void | SetPriority (int priority) |
Set the priority: 0 is lowest, 100 is highest. | |
int | GetPriority () |
AxResourceLibrary * | GetLibrary () const |
void | SetLibrary (AxResourceLibrary *library) |
Static Public Member Functions | |
static AxModule * | FindModule (wxClassInfo *info) |
TODO: priorities for e.g. initialisation. | |
static void | RegisterModule (AxModule *module) |
static void | RegisterModules () |
static bool | InitializeModules (AxResourceLibrary *library) |
static void | CleanUpModules () |
static void | UnregisterModule (AxModule *module) |
static AxModuleList & | GetModules () |
Protected Attributes | |
int | m_priority |
AxResourceLibrary * | m_library |
Static Protected Attributes | |
static AxModuleList | m_modules |
Command events unprocessed by the currently focused control are sent to each module in turn, stopping when the command has been processed.
AxModule::AxModule | ( | ) |
Constructor.
AxModule::~AxModule | ( | ) | [inline] |
Destructor.
virtual bool AxModule::AggregateFiles | ( | AxResourceLibrary * | WXUNUSEDlibrary, | |
wxArrayString & | WXUNUSEDfiles, | |||
bool | WXUNUSEDcheckIfFileLoaded | |||
) | [inline, virtual] |
Aggregate any files that belong together and add to resources.
Return false if you don't aggregate any files.
void AxModule::CleanUpModules | ( | ) | [static] |
virtual AxActivator* AxModule::CreateActivator | ( | AxResourceLibrary * | WXUNUSEDlibrary, | |
AxResource * | WXUNUSEDresource | |||
) | [inline, virtual] |
Create an activator for the resource, for creating views and further menu items.
void AxModule::Exit | ( | ) | [inline] |
AxModule * AxModule::FindModule | ( | wxClassInfo * | info | ) | [static] |
TODO: priorities for e.g. initialisation.
Finds the module with the given wxClassInfo.
Finds the module with the given wxClassInfo
AxResourceLibrary* AxModule::GetLibrary | ( | ) | const [inline] |
static AxModuleList& AxModule::GetModules | ( | ) | [inline, static] |
int AxModule::GetPriority | ( | ) | [inline] |
bool AxModule::Init | ( | AxResourceLibrary * | library | ) | [inline] |
bool AxModule::InitializeModules | ( | AxResourceLibrary * | library | ) | [static] |
virtual bool AxModule::IsFileSupported | ( | const wxString & | WXUNUSEDfilename | ) | [inline, virtual] |
Is this file supported?
virtual bool AxModule::LoadConfig | ( | wxConfigBase & | WXUNUSEDconfig | ) | [inline, virtual] |
Read config settings.
virtual AxResource* AxModule::LoadResource | ( | const wxString & | WXUNUSEDfilename | ) | [inline, virtual] |
Load the file into a new AxResource.
virtual bool AxModule::OnCloseMainWindow | ( | ) | [inline, virtual] |
Reimplemented in AxFallbackModule, AxAudioModule, and AxBookModule.
virtual void AxModule::OnExit | ( | ) | [pure virtual] |
Called just before program termination, but only if OnInit().
succeeded.
Implemented in AxFallbackModule, AxAudioModule, and AxBookModule.
virtual bool AxModule::OnInit | ( | ) | [pure virtual] |
Called on IDE startup, before the main window has been created.
Implemented in AxFallbackModule, AxAudioModule, and AxBookModule.
virtual bool AxModule::OnInitUI | ( | ) | [pure virtual] |
Called on application startup, after the main window has been created.
Implemented in AxFallbackModule, AxAudioModule, and AxBookModule.
virtual bool AxModule::OnSearch | ( | const wxString & | WXUNUSEDsearchString, | |
int | WXUNUSEDflags, | |||
AxResourceLibrary * | WXUNUSEDlibrary | |||
) | [inline, virtual] |
Reimplemented in AxFallbackModule, AxAudioModule, and AxBookModule.
void AxModule::RegisterModule | ( | AxModule * | module | ) | [static] |
void AxModule::RegisterModules | ( | ) | [static] |
virtual bool AxModule::SaveConfig | ( | wxConfigBase & | WXUNUSEDconfig | ) | [inline, virtual] |
Write config settings.
void AxModule::SetLibrary | ( | AxResourceLibrary * | library | ) | [inline] |
void AxModule::SetPriority | ( | int | priority | ) | [inline] |
Set the priority: 0 is lowest, 100 is highest.
void AxModule::UnregisterModule | ( | AxModule * | module | ) | [static] |
AxResourceLibrary* AxModule::m_library [protected] |
AxModuleList AxModule::m_modules [static, protected] |
int AxModule::m_priority [protected] |