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

Search Toolkit Book for CWorkbench

CWorkbench - default implementation of IWorkbench. More...

#include <gui/framework/workbench_impl.hpp>

+ Inheritance diagram for CWorkbench:
+ Collaboration diagram for CWorkbench:

Public Member Functions

 CWorkbench (IWorkbenchAdvisor *advisor)
 TODO. More...
 
virtual ~CWorkbench ()
 
IWorkbench implementation
virtual void Init ()
 
virtual bool CanShutDown ()
 
virtual void ShutDown ()
 
virtual IEventLogServiceGetEventLogService ()
 
virtual IStatusBarServiceGetStatusBarService ()
 
virtual IWindowManagerServiceGetWindowManagerService ()
 
virtual IMenuServiceGetMenuService ()
 
virtual IToolBarServiceGetToolBarService ()
 
virtual CAppTaskServiceGetAppTaskService ()
 
virtual IViewManagerServiceGetViewManagerService ()
 
virtual wxFileArtProviderGetFileArtProvider ()
 
virtual IServiceLocatorGetServiceLocator ()
 get a Service Locator associated with the Workspace More...
 
virtual void RegisterService (const string &class_name, IService *service)
 register extra i.e. More...
 
virtual void UnRegisterService (const string &class_name)
 remove application-specific service More...
 
virtual wxFrame * GetMainWindow ()
 returns a pointer to the main application frame window More...
 
virtual CUICommandRegistryGetUICommandRegistry ()
 returns an instance of Command Registry associated with the Workbench More...
 
virtual string GetRegistrySectionPath (ERegistrySection section)
 returns a path to CGuiRegistry section where resources of the specified type shall be located More...
 
IServiceLocator interface implementation
virtual bool HasService (const string &name)
 returns true if the service exists within the scope of the locator More...
 
virtual CIRef< IServiceGetService (const string &name)
 retrieves the service More...
 
CWorkbenchFrame::IHintListener interface implementation
virtual void ShowCommandHint (const string &text)
 
virtual void HideCommandHint ()
 
IRegSettings interface implementation
virtual void SetRegistryPath (const string &path)
 
virtual void LoadSettings ()
 
virtual void SaveSettings () const
 
Event Handling
bool ProcessEvent (wxEvent &event)
 filter events; forward command events to Window Manager in order to deliver commands to active windows More...
 
void OnCloseWindow (wxCloseEvent &event)
 
- 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...
 
- Public Member Functions inherited from IServiceLocator
virtual ~IServiceLocator ()
 
template<class T >
CIRef< TGetServiceByType ()
 retrieves a typed reference to a service, the name of C++ type is used as the name of the service. More...
 
- Public Member Functions inherited from IRegSettings
virtual ~IRegSettings ()
 

Protected Types

typedef map< string, CIRef< IService > > TNameToService
 

Protected Member Functions

virtual void x_CreateFileArtProvider ()
 
virtual void x_InitMainFrame ()
 create application Main Frame More...
 
virtual void x_DestroyMainFrame ()
 destroy application Main Frame More...
 
virtual CWorkbenchFramex_CreateMainFrame (const string &title)
 
virtual void x_ShutDownServices ()
 free resources associated with Extra Service Locator More...
 
- 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

string m_RegPath
 
IWorkbenchAdvisorm_Advisor
 path to th Workbench section in the Registry More...
 
wxFileArtProviderm_FileArtProvider
 
CWorkbenchFramem_MainFrame
 pointers to the Standard Services More...
 
CEventLogServicem_EventLogService
 
CMenuServicem_MenuService
 
CStatusBarServicem_StatusBarService
 
CWindowManagerServicem_WindowManagerService
 
CAppTaskServicem_AppTaskService
 
CViewManagerServicem_ViewManagerService
 
TNameToService m_NameToExtraService
 a Map of Additional Services : Name -> Service More...
 
- Protected Attributes inherited from CEventHandler
TPools m_Pools
 

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) ()
 
- Public Types inherited from IWorkbench
enum  ERegistrySection { eServices , eDialogs , eTools }
 enumerates major Registry sections More...
 
- Static Public Member Functions inherited from CEventHandler
static bool HandlePostRequest ()
 
static void ClearPostQueue ()
 erases all events from the queue More...
 
static void DestroyPostQueue ()
 
- Static Protected Attributes inherited from CEventHandler
static const SEvtMap sm_EvtMap
 

Detailed Description

CWorkbench - default implementation of IWorkbench.

CWorkbench implements IWorkbench::GetExtraServiceLocator() function and provides additional functions that allow application components to register supplementary application-specific services.

Definition at line 73 of file workbench_impl.hpp.


The documentation for this class was generated from the following files:
Modified on Wed Jun 12 11:14:28 2024 by modify_doxy.py rev. 669887