* misc. NOTES: bootstrap is a special service is, the one which is * always availabe, even if the workplace is not opened. It also * takes over menu-merging functionality, since it is needed * from the very start. Currently, the menu-merging alg. does not make * use of wxMenu::Delete method, because (AFAIK) wxMenu/wxMenubar does not * allow removing of top-level menus, and with it's API i cannot *insert* a * single item at particular position a in top-level or -submenu. Instead, * the alg. mirrors the entire tree of menus as in-memory structures, * and uses them to recreate menu-bar whenever any changes or merges (even small * ones) occure. TODO:: ask wx-developers...
Derived from
wxEvtHandler
wxPMService
Data structures
Members
wxPMBootstrapService::wxPMBootstrapService
wxPMBootstrapService::~wxPMBootstrapService
wxPMBootstrapService::ActivateRelatedPanes
wxPMBootstrapService::AddListener
wxPMBootstrapService::AddService
wxPMBootstrapService::AssociateData
wxPMBootstrapService::CleanUp
wxPMBootstrapService::CreateTreePath
wxPMBootstrapService::DetachService
wxPMBootstrapService::DoFindItemByName
wxPMBootstrapService::DoMergeChain
wxPMBootstrapService::DoRegenerateCommandIds
wxPMBootstrapService::DoRemoveChain
wxPMBootstrapService::DoTranslateEvent
wxPMBootstrapService::FindItemByName
wxPMBootstrapService::FindServiceByClass
wxPMBootstrapService::FindServicesByClass
wxPMBootstrapService::FindUniqueServiceInstance
wxPMBootstrapService::GetActiveProject
wxPMBootstrapService::GetAppTitle
wxPMBootstrapService::GetAssociatedData
wxPMBootstrapService::GetDocManager
wxPMBootstrapService::GetKeyBinder
wxPMBootstrapService::GetMainWindow
wxPMBootstrapService::GetMergableMenuChain
wxPMBootstrapService::GetPathItem
wxPMBootstrapService::GetStartupDir
wxPMBootstrapService::GetWorkplace
wxPMBootstrapService::GetWxObject
wxPMBootstrapService::HasWorkplace
wxPMBootstrapService::HidePane
wxPMBootstrapService::MergeMenuChains
wxPMBootstrapService::MutateCommandToGroup
wxPMBootstrapService::OnAbout
wxPMBootstrapService::OnButtonEvent
wxPMBootstrapService::OnDummy
wxPMBootstrapService::OnExit
wxPMBootstrapService::OnIdle
wxPMBootstrapService::OnMenuEvent
wxPMBootstrapService::OnOptionsChangeCWD
wxPMBootstrapService::OnOptionsDirectories
wxPMBootstrapService::OnOptionsEditorPrefs
wxPMBootstrapService::OnOptionsKeyBindings
wxPMBootstrapService::OnUpdateUIEvent
wxPMBootstrapService::RegenerateCommandIds
wxPMBootstrapService::RegisterUniqueServiceInstance
wxPMBootstrapService::RemoveAllServices
wxPMBootstrapService::RemoveItemByPath
wxPMBootstrapService::RemoveListener
wxPMBootstrapService::RemoveMenuChains
wxPMBootstrapService::RemoveService
wxPMBootstrapService::RemoveServicesByClass
wxPMBootstrapService::SetAppTitle
wxPMBootstrapService::SetStatusText
wxPMBootstrapService::SetWorkplace
wxPMBootstrapService::ShowPane
wxPMBootstrapService::Start
wxPMBootstrapService::StartService
wxPMBootstrapService::StartServicesByClass
wxPMBootstrapService::Stop
wxPMBootstrapService::StopAllServices
wxPMBootstrapService::StopService
wxPMBootstrapService::StripLastPathItem
wxPMBootstrapService::TranslateKeyEvent
wxPMBootstrapService::UnregisterUniqueServiceInstance
wxPMBootstrapService(wxDocMDIParentFrame* pMainWnd, wxPMDocManager* pDocMgr)
~wxPMBootstrapService()
void ActivateRelatedPanes(wxPMDocument* pDoc, bool activate)
called by wxPMDocManager
void AddListener(wxPMBootstrapServiceListener* pListener)
void AddService(wxPMService* pSvc)
service activation/disposal
bool AssociateData(wxPMService& fromSerice, wxPMService& toService, wxObject* pData)
associating custom data with particular service, invoked from wxPMService::AssociateData(..)
bool CleanUp()
closes all documents, removes related objects and releases itself returns FALSE, if the any of the closure was veto'ed
wxCommandInfoListT* CreateTreePath(const wxString& path, wxCommandInfo *& pParent)
void DetachService(wxPMService* pSvc)
wxCommandInfo* DoFindItemByName(const char* path, wxCommandInfoListT& lst)
void DoMergeChain(wxPMMergableMenuChain* pChain, wxEvtHandler* pReceiver)
void DoRegenerateCommandIds(wxCommandInfoListT& commands, int& nextId)
void DoRemoveChain(wxPMMergableMenuChain* pChain)
void DoTranslateEvent(wxEvent& event)
wxCommandInfo* FindItemByName(const wxString& path)
wxPMService* FindServiceByClass(wxClassInfo* pExactSvcClass)
void FindServicesByClass(wxClassInfo* pSvcClass, PMServiceListT& toLst, bool machSubclasses)
wxPMService* FindUniqueServiceInstance(const wxString& byInterfaceName)
wxPMProject* GetActiveProject()
wxString& GetAppTitle()
wxObject* GetAssociatedData(wxPMService& fromService, wxPMService& toService)
wxPMDocManager* GetDocManager()
wxKeyBinder& GetKeyBinder()
wxDocMDIParentFrame* GetMainWindow()
wxPMMergableMenuChain* GetMergableMenuChain()
wxString GetPathItem(const wxString& treePath, size_t i)
const wxString& GetStartupDir()
wxPMWorkplace* GetWorkplace()
wxObject* GetWxObject()
bool HasWorkplace()
void HidePane(wxPMPane* pPane)
void MergeMenuChains(wxPMMergableMenuChain* pChains, wxEvtHandler* pOwner)
void MutateCommandToGroup(wxCommandInfoListT& lst, size_t cmdIdx)
void OnAbout(wxCommandEvent& event)
void OnButtonEvent(wxEvent& event)
of "requested" by event-owners -/-
void OnDummy(wxCommandEvent& event)
void OnExit(wxCommandEvent& event)
command-event handlers **
void OnIdle(wxIdleEvent& event)
event handlers used for updating menu-bar (batches multiple
void OnMenuEvent(wxEvent& event)
menu-merges/removes into one to reduce flicker) used for translation of event-ids to those
void OnOptionsChangeCWD(wxCommandEvent& event)
void OnOptionsDirectories(wxCommandEvent& event)
void OnOptionsEditorPrefs(wxCommandEvent& event)
void OnOptionsKeyBindings(wxCommandEvent& event)
void OnUpdateUIEvent(wxEvent& event)
-/-
void RegenerateCommandIds()
bool RegisterUniqueServiceInstance(wxPMService* pSvc, const wxString& interfaceName)
registering instances which implement certain interface, but can exist only as single object at run-time, so that others services can find this distinct service. Interface name should correspond to the real interface class name which the service supports in it's QueryInterface(..)
void RemoveAllServices()
void RemoveItemByPath(const wxString& treePath)
void RemoveListener(wxPMBootstrapServiceListener* pListener)
void RemoveMenuChains(wxPMMergableMenuChain* pChains)
merging of menus into menubar of main window
void RemoveService(wxPMService* pSvc)
int RemoveServicesByClass(wxClassInfo* pSvcClass)
returns number of services actually removed
void SetAppTitle(const wxString& appTitle)
void SetStatusText(const wxString& message)
void SetWorkplace(wxPMWorkplace* wp)
sets currently opened workplace
void ShowPane(wxPMPane* pPane)
displaying/hiding of panes
bool Start()
overriden methods of wxPMService ///
bool StartService(wxPMService* pSvc)
bool StartServicesByClass(wxClassInfo* pSvcClass)
bool Stop()
void StopAllServices()
void StopService(wxPMService* pSvc)
wxString StripLastPathItem(const wxString& treePath)
void TranslateKeyEvent(wxKeyEvent& event)
bool UnregisterUniqueServiceInstance(wxPMService* pSvc, const wxString& interfaceName)