wxWindow *GetOCPNCanvasWindow() { wxWindow *pret = NULL; if(s_ppim) { MyFrame *pFrame = s_ppim->GetParentFrame(); pret = (wxWindow *)pFrame->GetCanvasWindow(); } return pret; }
PlugInManager::PlugInManager(MyFrame *parent) { pParent = parent; s_ppim = this; MyFrame *pFrame = GetParentFrame(); if(pFrame) { m_plugin_menu_item_id_next = pFrame->GetCanvasWindow()->GetNextContextMenuId(); m_plugin_tool_id_next = pFrame->GetNextToolbarToolId(); } }