void DoxyBlocks::BuildMenu(wxMenuBar *menuBar)
{
//The application is offering its menubar for your plugin,
//to add any menu items you want...
//Append any items you need in the menu...
//NOTE: Be careful in here... The application's menubar is at your disposal.
// NotImplemented(wxT("DoxyBlocks::BuildMenu()"));
int idx = menuBar->FindMenu(_("P&lugins"));
if(idx != wxNOT_FOUND){
wxMenu *submenu = new wxMenu;
wxString sDataFolder(ConfigManager::GetDataFolder());
wxString prefix = sDataFolder + wxT("/images/DoxyBlocks/16x16/");
wxMenuItem *MenuItemDoxywizard = new wxMenuItem(submenu, ID_MENU_DOXYWIZARD, _("&Doxywizard...\tCtrl-Alt-D"), _("Run doxywizard."));
MenuItemDoxywizard->SetBitmap(wxBitmap(prefix + wxT("doxywizard.png"), wxBITMAP_TYPE_PNG));
submenu->Append(MenuItemDoxywizard);
wxMenuItem *MenuItemExtract = new wxMenuItem(submenu, ID_MENU_EXTRACTPROJECT, _("&Extract documentation\tCtrl-Alt-E"), _("Extract documentation for the current project."));
MenuItemExtract->SetBitmap(wxBitmap(prefix + wxT("extract.png"), wxBITMAP_TYPE_PNG));
submenu->Append(MenuItemExtract);
submenu->AppendSeparator();
wxMenuItem *MenuItemBlockComment = new wxMenuItem(submenu, ID_MENU_BLOCKCOMMENT, _("&Block comment\tCtrl-Alt-B"), _("Insert a comment block at the current line."));
MenuItemBlockComment->SetBitmap(wxBitmap(prefix + wxT("comment_block.png"), wxBITMAP_TYPE_PNG));
submenu->Append(MenuItemBlockComment);
wxMenuItem *MenuItemLineComment = new wxMenuItem(submenu, ID_MENU_LINECOMMENT, _("&Line comment\tCtrl-Alt-L"), _("Insert a line comment at the current cursor position."));
MenuItemLineComment->SetBitmap(wxBitmap(prefix + wxT("comment_line.png"), wxBITMAP_TYPE_PNG));
submenu->Append(MenuItemLineComment);
submenu->AppendSeparator();
wxMenuItem *MenuItemRunHTML = new wxMenuItem(submenu, ID_MENU_RUNHTML, _("Run &HTML\tCtrl-Alt-H"), _("Run HTML documentation."));
MenuItemRunHTML->SetBitmap(wxBitmap(prefix + wxT("html.png"), wxBITMAP_TYPE_PNG));
submenu->Append(MenuItemRunHTML);
wxMenuItem *MenuItemRunCHM = new wxMenuItem(submenu, ID_MENU_RUNCHM, _("Run &CHM\tCtrl-Alt-C"), _("Insert a comment block at the current line."));
MenuItemRunCHM->SetBitmap(wxBitmap(prefix + wxT("chm.png"), wxBITMAP_TYPE_PNG));
submenu->Append(MenuItemRunCHM);
submenu->AppendSeparator();
wxMenuItem *MenuItemConfig = new wxMenuItem(submenu, ID_MENU_CONFIG, _("Open &preferences...\tCtrl-Alt-P"), _("Open DoxyBlocks' preferences."));
MenuItemConfig->SetBitmap(wxBitmap(prefix + wxT("configure.png"), wxBITMAP_TYPE_PNG));
submenu->Append(MenuItemConfig);
submenu->AppendSeparator();
wxMenuItem *MenuItemLoadTemplate = new wxMenuItem(submenu, ID_MENU_LOAD_TEMPLATE, _("L&oad settings template"), _("Load saved settings template."));
MenuItemLoadTemplate->SetBitmap(wxBitmap(sDataFolder + wxT("/images/16x16/fileopen.png"), wxBITMAP_TYPE_PNG));
submenu->Append(MenuItemLoadTemplate);
wxMenuItem *MenuItemSaveTemplate = new wxMenuItem(submenu, ID_MENU_SAVE_TEMPLATE, _("&Save settings template"), _("Save current settings for future use."));
MenuItemSaveTemplate->SetBitmap(wxBitmap(sDataFolder + wxT("/images/16x16/filesave.png"), wxBITMAP_TYPE_PNG));
submenu->Append(MenuItemSaveTemplate);
Connect(ID_MENU_DOXYWIZARD, wxEVT_COMMAND_TOOL_CLICKED, (wxObjectEventFunction)&DoxyBlocks::RunDoxywizard);
Connect(ID_MENU_EXTRACTPROJECT, wxEVT_COMMAND_TOOL_CLICKED, (wxObjectEventFunction)&DoxyBlocks::ExtractProject);
Connect(ID_MENU_BLOCKCOMMENT, wxEVT_COMMAND_TOOL_CLICKED, (wxObjectEventFunction)&DoxyBlocks::BlockComment);
Connect(ID_MENU_LINECOMMENT, wxEVT_COMMAND_TOOL_CLICKED, (wxObjectEventFunction)&DoxyBlocks::LineComment);
Connect(ID_MENU_RUNHTML, wxEVT_COMMAND_TOOL_CLICKED, (wxObjectEventFunction)&DoxyBlocks::RunHTML);
Connect(ID_MENU_RUNCHM, wxEVT_COMMAND_TOOL_CLICKED, (wxObjectEventFunction)&DoxyBlocks::RunCHM);
Connect(ID_MENU_CONFIG, wxEVT_COMMAND_TOOL_CLICKED, (wxObjectEventFunction)&DoxyBlocks::Configure);
Connect(ID_MENU_LOAD_TEMPLATE, wxEVT_COMMAND_TOOL_CLICKED, (wxObjectEventFunction)&DoxyBlocks::ReadPrefsTemplate);
Connect(ID_MENU_SAVE_TEMPLATE, wxEVT_COMMAND_TOOL_CLICKED, (wxObjectEventFunction)&DoxyBlocks::WritePrefsTemplate);
menuBar->Insert(idx + 1, submenu, wxT("Do&xyBlocks"));
}
}
allow icons).