NCBI C++ ToolKit
|
Search Toolkit Book for CwxNCBIApp
CwxNCBIApp - this class should be used in NCBI applications instead of wxApp it provides polling support for CEventHandler and CAppJobDispatcher. More...
#include <gui/widgets/wx/wx_app.hpp>
Public Member Functions | |
CwxNCBIApp (bool use_job_disp=true) | |
CwxNCBIApp. More... | |
virtual | ~CwxNCBIApp () |
virtual bool | OnInit () |
Initialises the application. More... | |
virtual int | OnExit () |
Called on exit. More... | |
void | OnIdle (wxIdleEvent &event) |
Protected Member Functions | |
virtual void | x_InitAppJobDispatcher () |
override this function to configure / register engines More... | |
virtual bool | x_TestNcbiConnection () |
override this to test/configure NCBI connection before access to NCBI network services More... | |
virtual bool | x_CreateGUI () |
create main application window and initialize associated objects return true if successful More... | |
virtual void | x_DestroyGUI () |
destroy application GUI objects More... | |
virtual void | x_LoadGuiRegistry () |
virtual void | x_SaveGuiRegistry () |
virtual wxString | x_GetGuiRegistryPath () |
virtual void | x_RegisterImageHandlers () |
register wxWidgets image handlers More... | |
virtual bool | x_OnIdle () |
called from OnIdle() and can be overridden in derived classes returns true if something was done More... | |
Protected Attributes | |
bool | m_UseJobDisp |
int | m_MaxThreads |
int | m_MaxJobs |
bool | m_RegistryLoaded |
CwxNCBIApp - this class should be used in NCBI applications instead of wxApp it provides polling support for CEventHandler and CAppJobDispatcher.
Definition at line 79 of file wx_app.hpp.
|
virtual |
Definition at line 184 of file wx_app.cpp.
|
virtual |
Called on exit.
Definition at line 210 of file wx_app.cpp.
References CAppJobDispatcher::GetInstance(), m_UseJobDisp, CAppJobDispatcher::ReleaseInstance(), CAppJobDispatcher::ShutDown(), x_DestroyGUI(), and x_SaveGuiRegistry().
void CwxNCBIApp::OnIdle | ( | wxIdleEvent & | event | ) |
Definition at line 312 of file wx_app.cpp.
References CAsyncCall::InsideAsyncCall(), CJobHandler::Instance(), NCBI_CATCH, Process(), and x_OnIdle().
|
virtual |
Initialises the application.
Definition at line 188 of file wx_app.cpp.
References m_UseJobDisp, ok, wxT, x_CreateGUI(), x_InitAppJobDispatcher(), x_LoadGuiRegistry(), x_RegisterImageHandlers(), and x_TestNcbiConnection().
|
protectedvirtual |
create main application window and initialize associated objects return true if successful
Reimplemented in CDemoApp, CDemoApp, CDemoApp, CDemoApp, CTestTreeApp, CSeqTextDemoApp, CSeqGraphicDemoApp, CDemoApp, CDemoApp, CDemoApp, CPhyloTreeDemoApp, CDemoFeatTableApp, CHitMatrixDemoApp, CDemoApp, CDemoApp, CDemoAlignScorePropsApp, CDemoAlignTableApp, CAlignMultipleDemoApp, CCrossAlnDemoApp, and CFrameworkDemoApp.
Definition at line 236 of file wx_app.cpp.
References _ASSERT.
Referenced by OnInit().
|
protectedvirtual |
destroy application GUI objects
Reimplemented in CFrameworkDemoApp.
Definition at line 244 of file wx_app.cpp.
Referenced by OnExit().
|
protectedvirtual |
Reimplemented in CDemoApp, CAlignMultipleDemoApp, and CFrameworkDemoApp.
Definition at line 291 of file wx_app.cpp.
Referenced by x_LoadGuiRegistry(), and x_SaveGuiRegistry().
|
protectedvirtual |
override this function to configure / register engines
Reimplemented in CDemoApp, CDemoApp, CDemoFeatTableApp, CDemoAlignTableApp, and CFrameworkDemoApp.
Definition at line 226 of file wx_app.cpp.
References CAppJobDispatcher::GetInstance(), m_MaxJobs, m_MaxThreads, and CAppJobDispatcher::RegisterEngine().
Referenced by OnInit(), CFrameworkDemoApp::x_InitAppJobDispatcher(), CDemoAlignTableApp::x_InitAppJobDispatcher(), CDemoFeatTableApp::x_InitAppJobDispatcher(), and CDemoApp::x_InitAppJobDispatcher().
|
protectedvirtual |
Definition at line 250 of file wx_app.cpp.
References Error(), CGuiRegistry::GetInstance(), Info(), LOG_POST, m_RegistryLoaded, CGuiRegistry::SetLocal(), and x_GetGuiRegistryPath().
Referenced by OnInit().
|
protectedvirtual |
called from OnIdle() and can be overridden in derived classes returns true if something was done
Reimplemented in CFrameworkDemoApp.
Definition at line 341 of file wx_app.cpp.
References CAppJobDispatcher::GetInstance(), CEventHandler::HandlePostRequest(), i, CAppJobDispatcher::IdleCallback(), and m_UseJobDisp.
Referenced by OnIdle(), and CFrameworkDemoApp::x_OnIdle().
|
protectedvirtual |
register wxWidgets image handlers
Definition at line 296 of file wx_app.cpp.
Referenced by OnInit().
|
protectedvirtual |
Definition at line 279 of file wx_app.cpp.
References CGuiRegistry::GetInstance(), Info(), LOG_POST, CGuiRegistry::Write(), and x_GetGuiRegistryPath().
Referenced by OnExit().
|
inlineprotectedvirtual |
override this to test/configure NCBI connection before access to NCBI network services
Definition at line 101 of file wx_app.hpp.
Referenced by OnInit().
|
protected |
Definition at line 126 of file wx_app.hpp.
Referenced by x_InitAppJobDispatcher().
|
protected |
Definition at line 125 of file wx_app.hpp.
Referenced by x_InitAppJobDispatcher().
|
protected |
Definition at line 128 of file wx_app.hpp.
Referenced by x_LoadGuiRegistry().
|
protected |
Definition at line 123 of file wx_app.hpp.
Referenced by OnExit(), OnInit(), and x_OnIdle().