#include "menuBar.h"

using namespace std;
using namespace gui;
//--------------------------------------------------------------
MenuBar::MenuBar(wxFrame *parent)
{
  // Initialization
  parent->SetMenuBar(this);

  // Creating menus
  createMenus();
}
//--------------------------------------------------------------
/* Create menus */
void MenuBar::createMenus()
{
  // File menu
  const auto fileMenu = new wxMenu();
  fileMenu->Append(static_cast<int>(IDs::ID_MENU_FILE_NEW), _("New\tCTRL+N"), _("Create a new project"));
  fileMenu->Append(static_cast<int>(IDs::ID_MENU_FILE_OPEN), _("Open...\tCTRL+O"), _("Open a project file"));
  fileMenu->Append(static_cast<int>(IDs::ID_MENU_FILE_SAVE), _("Save\tCTRL+S"), _("Save the project file"));
  fileMenu->Append(static_cast<int>(IDs::ID_MENU_FILE_SAVE_AS), _("Save as...\tCTRL+SHIFT+S"), _("Save the project to a new file"));
  fileMenu->Append(static_cast<int>(IDs::ID_MENU_FILE_CLOSE), _("Close\tCTRL+F4"), _("Close the project"));
  fileMenu->AppendSeparator();
  fileMenu->Append(static_cast<int>(IDs::ID_MENU_FILE_QUIT), _("Quit\tALT+F4"), _("Quit the application"));
  Append(fileMenu, _("File"));

  // Requirements menu
  const auto reqMenu = new wxMenu();
  reqMenu->Append(static_cast<int>(IDs::ID_MENU_REQ_CREATE), _("Create Requirements\tCTRL+R"), _("Create a new requirement"));
  Append(reqMenu, _("Requirements"));

  // Help menu
  const auto helpMenu = new wxMenu();
  helpMenu->Append(static_cast<int>(IDs::ID_MENU_HELP_ABOUT), _("About\tF1"), _("Show info about the application"));
  Append(helpMenu, _("Help"));
}
//--------------------------------------------------------------
