NCBI C++ ToolKit
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CwxNCBIApp Class Reference

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>

+ Inheritance diagram for CwxNCBIApp:
+ Collaboration diagram for CwxNCBIApp:

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ CwxNCBIApp()

CwxNCBIApp::CwxNCBIApp ( bool  use_job_disp = true)

CwxNCBIApp.

IMPLEMENT_WX_THEME_SUPPORT

Definition at line 173 of file wx_app.cpp.

References wxT.

◆ ~CwxNCBIApp()

CwxNCBIApp::~CwxNCBIApp ( )
virtual

Definition at line 184 of file wx_app.cpp.

Member Function Documentation

◆ OnExit()

int CwxNCBIApp::OnExit ( void  )
virtual

◆ OnIdle()

void CwxNCBIApp::OnIdle ( wxIdleEvent &  event)

◆ OnInit()

bool CwxNCBIApp::OnInit ( )
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().

◆ x_CreateGUI()

bool CwxNCBIApp::x_CreateGUI ( )
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().

◆ x_DestroyGUI()

void CwxNCBIApp::x_DestroyGUI ( )
protectedvirtual

destroy application GUI objects

Reimplemented in CFrameworkDemoApp.

Definition at line 244 of file wx_app.cpp.

Referenced by OnExit().

◆ x_GetGuiRegistryPath()

wxString CwxNCBIApp::x_GetGuiRegistryPath ( )
protectedvirtual

Reimplemented in CDemoApp, CAlignMultipleDemoApp, and CFrameworkDemoApp.

Definition at line 291 of file wx_app.cpp.

Referenced by x_LoadGuiRegistry(), and x_SaveGuiRegistry().

◆ x_InitAppJobDispatcher()

void CwxNCBIApp::x_InitAppJobDispatcher ( )
protectedvirtual

◆ x_LoadGuiRegistry()

void CwxNCBIApp::x_LoadGuiRegistry ( )
protectedvirtual

◆ x_OnIdle()

bool CwxNCBIApp::x_OnIdle ( )
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().

◆ x_RegisterImageHandlers()

void CwxNCBIApp::x_RegisterImageHandlers ( )
protectedvirtual

register wxWidgets image handlers

Definition at line 296 of file wx_app.cpp.

Referenced by OnInit().

◆ x_SaveGuiRegistry()

void CwxNCBIApp::x_SaveGuiRegistry ( )
protectedvirtual

Definition at line 279 of file wx_app.cpp.

References CGuiRegistry::GetInstance(), Info(), LOG_POST, CGuiRegistry::Write(), and x_GetGuiRegistryPath().

Referenced by OnExit().

◆ x_TestNcbiConnection()

virtual bool CwxNCBIApp::x_TestNcbiConnection ( )
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().

Member Data Documentation

◆ m_MaxJobs

int CwxNCBIApp::m_MaxJobs
protected

Definition at line 126 of file wx_app.hpp.

Referenced by x_InitAppJobDispatcher().

◆ m_MaxThreads

int CwxNCBIApp::m_MaxThreads
protected

Definition at line 125 of file wx_app.hpp.

Referenced by x_InitAppJobDispatcher().

◆ m_RegistryLoaded

bool CwxNCBIApp::m_RegistryLoaded
protected

Definition at line 128 of file wx_app.hpp.

Referenced by x_LoadGuiRegistry().

◆ m_UseJobDisp

bool CwxNCBIApp::m_UseJobDisp
protected

Definition at line 123 of file wx_app.hpp.

Referenced by OnExit(), OnInit(), and x_OnIdle().


The documentation for this class was generated from the following files:
Modified on Fri Sep 20 14:57:10 2024 by modify_doxy.py rev. 669887