NCBI C++ ToolKit
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
CwxMainFrame Class Reference

Search Toolkit Book for CwxMainFrame

#include <gui/wx_demo/wx_main_frame.hpp>

+ Inheritance diagram for CwxMainFrame:
+ Collaboration diagram for CwxMainFrame:

Public Member Functions

 CwxMainFrame ()
 Constructors. More...
 
 CwxMainFrame (wxWindow *parent, wxWindowID id=10000, const wxString &caption=_("wx Demo App"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(800, 600), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|0x1000)
 
bool Create (wxWindow *parent, wxWindowID id=10000, const wxString &caption=_("wx Demo App"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(800, 600), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|0x1000)
 
 ~CwxMainFrame ()
 Destructor. More...
 
void Init ()
 Initialises member variables. More...
 
void CreateControls ()
 Creates the controls and sizers. More...
 
void OnCloseWindow (wxCloseEvent &event)
 wxEVT_CLOSE_WINDOW event handler for ID_CWXMAINFRAME More...
 
void OnEXITClick (wxCommandEvent &event)
 wxEVT_COMMAND_MENU_SELECTED event handler for wxID_EXIT More...
 
void OnTestMsgBoxesClick (wxCommandEvent &event)
 wxEVT_COMMAND_MENU_SELECTED event handler for ID_TEST_MSG_BOXES More...
 
void OnPostEventsClick (wxCommandEvent &event)
 wxEVT_COMMAND_MENU_SELECTED event handler for ID_POST_EVENTS More...
 
void OnGoToSequence (wxCommandEvent &event)
 wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENUITEM1 More...
 
void OnTestDiagPanelClick (wxCommandEvent &event)
 wxEVT_COMMAND_MENU_SELECTED event handler for ID_TEST_DIAG_PANEL More...
 
void OnTestDiagPanelUpdate (wxUpdateUIEvent &event)
 wxEVT_UPDATE_UI event handler for ID_TEST_DIAG_PANEL More...
 
void OnCreateMapControlClick (wxCommandEvent &event)
 wxEVT_COMMAND_MENU_SELECTED event handler for ID_CREATE_MAP_CONTROL More...
 
void OnCreateGroupMapWidgetClick (wxCommandEvent &event)
 wxEVT_COMMAND_MENU_SELECTED event handler for ID_CREATE_GROUP_MAP_WIDGET More...
 
void OnCreateTableControlClick (wxCommandEvent &event)
 wxEVT_COMMAND_MENU_SELECTED event handler for ID_CREATE_TABLE_CONTROL More...
 
void OnABOUTClick (wxCommandEvent &event)
 wxEVT_COMMAND_MENU_SELECTED event handler for wxID_ABOUT More...
 
int GetCreateMode () const
 
void SetCreateMode (int value)
 
bool GetDiagnosticsTesting () const
 
void SetDiagnosticsTesting (bool value)
 
wxBitmap GetBitmapResource (const wxString &name)
 Retrieves bitmap resources. More...
 
wxIcon GetIconResource (const wxString &name)
 Retrieves icon resources. More...
 
void OnTestEvent (CEvent *evt)
 
void OnLaunchJobs (wxCommandEvent &event)
 
void OnCancelJobs (wxCommandEvent &event)
 
void OnCheckJobsStatus (wxCommandEvent &event)
 
void OnCheckJobsProgress (wxCommandEvent &event)
 
void OnSeqGoto (CSequenceGotoEvent &event)
 
void OnSeqGotoClose (CSequenceGotoEvent &event)
 
void OnCreateMapControlItems ()
 
void OnCreateTableControlItems ()
 
- Public Member Functions inherited from CEventHandler
 CEventHandler ()
 CEventHandler. More...
 
virtual ~CEventHandler ()
 
virtual void AddListener (CEventHandler *listener, int pool_name=ePool_Default)
 Add a listener. More...
 
virtual void RemoveListener (CEventHandler *listener)
 Remove a listener. More...
 
virtual void RemoveAllListeners (void)
 
virtual bool HasListener (CEventHandler *listener, int pool_name=ePool_Default) const
 returns "true" if the given listener belongs to the specified pool More...
 
virtual const TListenersGetListeners (int pool_name=ePool_Default) const
 returns a set of listeners fro the specified pool More...
 
virtual bool OnEvent (CEvent *evt)
 Processes en event. Returns "true" if event has been processed. More...
 
virtual bool Dispatch (CEvent *evt, EDispatch disp_how=eDispatch_Default, int pool_name=ePool_Default)
 Dispatches an event to the listeners (but does not handle it). More...
 
virtual bool Send (CEvent *evt, EDispatch disp_how=eDispatch_Default, int pool_name=ePool_Default)
 Sends an event synchronously. More...
 
virtual bool Send (CEvent *evt, int pool_name)
 
void Post (CRef< CEvent > evt, EDispatch disp_how=eDispatch_Default, int pool_name=ePool_Default)
 Handles an event asynchronously (process and/or dispatch). More...
 

Static Public Member Functions

static bool ShowToolTips ()
 Should we show tooltips? More...
 
- Static Public Member Functions inherited from CEventHandler
static bool HandlePostRequest ()
 
static void ClearPostQueue ()
 erases all events from the queue More...
 
static void DestroyPostQueue ()
 

Protected Member Functions

void x_SetupStatusBar ()
 
void x_RegisterAliases ()
 
void x_CreateNextItem ()
 
- Protected Member Functions inherited from CEventHandler
virtual const SEvtMapGetEventMap () const
 
void x_DeclareDead ()
 Removes itself unavailable for async event delivery. More...
 
void x_AddListenerToPool (CEventHandler *listener, int pool_name)
 

Protected Attributes

unique_ptr< CPrimeNumberClientm_PrimeClient
 
CSequenceGotoData m_SequenceGotoData
 
CSequenceGotoDlgm_SequenceGotoDlg
 
int m_CreateMode
 
CGroupMapWidgetm_GroupMapWidget
 
CMapControlm_MapControl
 
CwxTableListCtrlm_TableControl
 
wxNotebook * m_Notebook
 
int m_ItemsCounter
 
- Protected Attributes inherited from CEventHandler
TPools m_Pools
 

Private Types

typedef wxFrame TParent
 

Private Member Functions

 DECLARE_EVENT_MAP ()
 

Private Attributes

bool m_DiagnosticsTesting
 

Additional Inherited Members

- Public Types inherited from CEventHandler
enum  EDispatch { eDispatch_SelfOnly , eDispatch_AllHandlers , eDispatch_FirstHandler , eDispatch_Default = eDispatch_AllHandlers }
 enum controlling dispatching strategies More...
 
enum  EPoolName {
  ePool_Default = 0 , ePool_Parent , ePool_Child , ePool_Sibling ,
  ePool_NextAvailable
}
 Identifiers for standard pools. More...
 
typedef vector< CEventHandler * > TListeners
 
typedef map< int, TListenersTPools
 
typedef list< AutoPtr< SPostRequest > > TPostRequests
 
typedef std::map< CEventHandler *, intTHandlerToCount
 
typedef void(* FOnPostCallback) ()
 
- Static Protected Attributes inherited from CEventHandler
static const SEvtMap sm_EvtMap
 

Detailed Description

CwxMainFrame class declaration

Definition at line 104 of file wx_main_frame.hpp.

Member Typedef Documentation

◆ TParent

typedef wxFrame CwxMainFrame::TParent
private

Definition at line 112 of file wx_main_frame.hpp.

Constructor & Destructor Documentation

◆ CwxMainFrame() [1/2]

CwxMainFrame::CwxMainFrame ( )

Constructors.

Definition at line 123 of file wx_main_frame.cpp.

References Init().

◆ CwxMainFrame() [2/2]

CwxMainFrame::CwxMainFrame ( wxWindow *  parent,
wxWindowID  id = 10000,
const wxString &  caption = _("wx Demo App"),
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxSize(800, 600),
long  style = wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxMINIMIZE_BOX|wxMAXIMIZE_BOX| 0x1000 
)

Definition at line 130 of file wx_main_frame.cpp.

References Create(), Init(), and ncbi::grid::netcache::search::fields::size.

◆ ~CwxMainFrame()

CwxMainFrame::~CwxMainFrame ( )

Destructor.

Definition at line 148 of file wx_main_frame.cpp.

Member Function Documentation

◆ Create()

bool CwxMainFrame::Create ( wxWindow *  parent,
wxWindowID  id = 10000,
const wxString &  caption = _("wx Demo App"),
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxSize(800, 600),
long  style = wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxMINIMIZE_BOX|wxMAXIMIZE_BOX| 0x1000 
)

Definition at line 138 of file wx_main_frame.cpp.

References CreateControls(), and ncbi::grid::netcache::search::fields::size.

Referenced by CwxMainFrame().

◆ CreateControls()

void CwxMainFrame::CreateControls ( )

◆ DECLARE_EVENT_MAP()

CwxMainFrame::DECLARE_EVENT_MAP ( )
private

◆ GetBitmapResource()

wxBitmap CwxMainFrame::GetBitmapResource ( const wxString &  name)

Retrieves bitmap resources.

Definition at line 305 of file wx_main_frame.cpp.

Referenced by CreateControls(), and x_CreateNextItem().

◆ GetCreateMode()

int CwxMainFrame::GetCreateMode ( ) const
inline

Definition at line 179 of file wx_main_frame.hpp.

References m_CreateMode.

◆ GetDiagnosticsTesting()

bool CwxMainFrame::GetDiagnosticsTesting ( ) const
inline

Definition at line 182 of file wx_main_frame.hpp.

References m_DiagnosticsTesting.

◆ GetIconResource()

wxIcon CwxMainFrame::GetIconResource ( const wxString &  name)

Retrieves icon resources.

Definition at line 310 of file wx_main_frame.cpp.

◆ Init()

void CwxMainFrame::Init ( void  )

Initialises member variables.

Definition at line 155 of file wx_main_frame.cpp.

References CAppJobDispatcher::GetInstance(), m_DiagnosticsTesting, m_GroupMapWidget, m_ItemsCounter, m_MapControl, m_PrimeClient, m_TableControl, and NULL.

Referenced by CwxMainFrame().

◆ OnABOUTClick()

void CwxMainFrame::OnABOUTClick ( wxCommandEvent &  event)

wxEVT_COMMAND_MENU_SELECTED event handler for wxID_ABOUT

Definition at line 320 of file wx_main_frame.cpp.

◆ OnCancelJobs()

void CwxMainFrame::OnCancelJobs ( wxCommandEvent &  event)

Definition at line 371 of file wx_main_frame.cpp.

References m_PrimeClient.

◆ OnCheckJobsProgress()

void CwxMainFrame::OnCheckJobsProgress ( wxCommandEvent &  event)

Definition at line 383 of file wx_main_frame.cpp.

References m_PrimeClient.

◆ OnCheckJobsStatus()

void CwxMainFrame::OnCheckJobsStatus ( wxCommandEvent &  event)

Definition at line 377 of file wx_main_frame.cpp.

References m_PrimeClient.

◆ OnCloseWindow()

void CwxMainFrame::OnCloseWindow ( wxCloseEvent &  event)

wxEVT_CLOSE_WINDOW event handler for ID_CWXMAINFRAME

Definition at line 418 of file wx_main_frame.cpp.

References CGuiRegistry::GetInstance(), CGuiRegistry::GetWriteView(), m_TableControl, and CwxTableListCtrl::SaveTableSettings().

◆ OnCreateGroupMapWidgetClick()

void CwxMainFrame::OnCreateGroupMapWidgetClick ( wxCommandEvent &  event)

wxEVT_COMMAND_MENU_SELECTED event handler for ID_CREATE_GROUP_MAP_WIDGET

Definition at line 470 of file wx_main_frame.cpp.

References _, _ASSERT, CGroupMapWidget::AddGroup(), CGroupMapWidget::AddItem(), m_GroupMapWidget, m_Notebook, NcbiEmptyString, and wxID_ANY.

◆ OnCreateMapControlClick()

void CwxMainFrame::OnCreateMapControlClick ( wxCommandEvent &  event)

wxEVT_COMMAND_MENU_SELECTED event handler for ID_CREATE_MAP_CONTROL

Definition at line 443 of file wx_main_frame.cpp.

References _, _ASSERT, CMapControl::GetProperties(), m_MapControl, m_Notebook, CMapControl::SProperties::m_SingleColumn, and OnCreateMapControlItems().

◆ OnCreateMapControlItems()

void CwxMainFrame::OnCreateMapControlItems ( )

◆ OnCreateTableControlClick()

void CwxMainFrame::OnCreateTableControlClick ( wxCommandEvent &  event)

wxEVT_COMMAND_MENU_SELECTED event handler for ID_CREATE_TABLE_CONTROL

Definition at line 498 of file wx_main_frame.cpp.

References _, _ASSERT, m_Notebook, m_TableControl, and OnCreateTableControlItems().

◆ OnCreateTableControlItems()

void CwxMainFrame::OnCreateTableControlItems ( )

◆ OnEXITClick()

void CwxMainFrame::OnEXITClick ( wxCommandEvent &  event)

wxEVT_COMMAND_MENU_SELECTED event handler for wxID_EXIT

Definition at line 327 of file wx_main_frame.cpp.

◆ OnGoToSequence()

void CwxMainFrame::OnGoToSequence ( wxCommandEvent &  event)

wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENUITEM1

Definition at line 391 of file wx_main_frame.cpp.

References m_SequenceGotoData, m_SequenceGotoDlg, and CSequenceGotoDlg::Show().

◆ OnLaunchJobs()

void CwxMainFrame::OnLaunchJobs ( wxCommandEvent &  event)

Definition at line 365 of file wx_main_frame.cpp.

References m_PrimeClient.

◆ OnPostEventsClick()

void CwxMainFrame::OnPostEventsClick ( wxCommandEvent &  event)

wxEVT_COMMAND_MENU_SELECTED event handler for ID_POST_EVENTS

Definition at line 344 of file wx_main_frame.cpp.

References i, NStr::IntToString(), LOG_POST, n, and CEventHandler::Post().

◆ OnSeqGoto()

void CwxMainFrame::OnSeqGoto ( CSequenceGotoEvent event)

Definition at line 400 of file wx_main_frame.cpp.

References _, CSequenceGotoData::GetRange(), and m_SequenceGotoData.

◆ OnSeqGotoClose()

void CwxMainFrame::OnSeqGotoClose ( CSequenceGotoEvent event)

Definition at line 411 of file wx_main_frame.cpp.

References m_SequenceGotoDlg, and NULL.

◆ OnTestDiagPanelClick()

void CwxMainFrame::OnTestDiagPanelClick ( wxCommandEvent &  event)

wxEVT_COMMAND_MENU_SELECTED event handler for ID_TEST_DIAG_PANEL

Definition at line 431 of file wx_main_frame.cpp.

◆ OnTestDiagPanelUpdate()

void CwxMainFrame::OnTestDiagPanelUpdate ( wxUpdateUIEvent &  event)

wxEVT_UPDATE_UI event handler for ID_TEST_DIAG_PANEL

Definition at line 437 of file wx_main_frame.cpp.

◆ OnTestEvent()

void CwxMainFrame::OnTestEvent ( CEvent evt)

Definition at line 358 of file wx_main_frame.cpp.

References LOG_POST, and CTestEvent::m_Str.

◆ OnTestMsgBoxesClick()

void CwxMainFrame::OnTestMsgBoxesClick ( wxCommandEvent &  event)

wxEVT_COMMAND_MENU_SELECTED event handler for ID_TEST_MSG_BOXES

Definition at line 332 of file wx_main_frame.cpp.

References _, and NULL.

◆ SetCreateMode()

void CwxMainFrame::SetCreateMode ( int  value)
inline

Definition at line 180 of file wx_main_frame.hpp.

References m_CreateMode, and rapidjson::value.

◆ SetDiagnosticsTesting()

void CwxMainFrame::SetDiagnosticsTesting ( bool  value)
inline

Definition at line 183 of file wx_main_frame.hpp.

References m_DiagnosticsTesting, and rapidjson::value.

◆ ShowToolTips()

bool CwxMainFrame::ShowToolTips ( )
static

Should we show tooltips?

Definition at line 300 of file wx_main_frame.cpp.

◆ x_CreateNextItem()

void CwxMainFrame::x_CreateNextItem ( )
protected

◆ x_RegisterAliases()

void CwxMainFrame::x_RegisterAliases ( )
protected

◆ x_SetupStatusBar()

void CwxMainFrame::x_SetupStatusBar ( )
protected

Member Data Documentation

◆ m_CreateMode

int CwxMainFrame::m_CreateMode
protected

Definition at line 223 of file wx_main_frame.hpp.

Referenced by GetCreateMode(), and SetCreateMode().

◆ m_DiagnosticsTesting

bool CwxMainFrame::m_DiagnosticsTesting
private

Definition at line 221 of file wx_main_frame.hpp.

Referenced by GetDiagnosticsTesting(), Init(), and SetDiagnosticsTesting().

◆ m_GroupMapWidget

CGroupMapWidget* CwxMainFrame::m_GroupMapWidget
protected

Definition at line 224 of file wx_main_frame.hpp.

Referenced by Init(), and OnCreateGroupMapWidgetClick().

◆ m_ItemsCounter

int CwxMainFrame::m_ItemsCounter
protected

Definition at line 231 of file wx_main_frame.hpp.

Referenced by Init(), OnCreateMapControlItems(), and x_CreateNextItem().

◆ m_MapControl

CMapControl* CwxMainFrame::m_MapControl
protected

◆ m_Notebook

wxNotebook* CwxMainFrame::m_Notebook
protected

◆ m_PrimeClient

unique_ptr<CPrimeNumberClient> CwxMainFrame::m_PrimeClient
protected

◆ m_SequenceGotoData

CSequenceGotoData CwxMainFrame::m_SequenceGotoData
protected

Definition at line 216 of file wx_main_frame.hpp.

Referenced by OnGoToSequence(), and OnSeqGoto().

◆ m_SequenceGotoDlg

CSequenceGotoDlg* CwxMainFrame::m_SequenceGotoDlg
protected

Definition at line 217 of file wx_main_frame.hpp.

Referenced by OnGoToSequence(), and OnSeqGotoClose().

◆ m_TableControl

CwxTableListCtrl* CwxMainFrame::m_TableControl
protected

The documentation for this class was generated from the following files:
Modified on Sat May 25 14:19:18 2024 by modify_doxy.py rev. 669887