2008-12-08 15:27:13 +00:00
|
|
|
/***************************************/
|
2009-04-21 17:56:27 +00:00
|
|
|
/* menucfg : buils the cvpcb main menu */
|
2008-12-08 15:27:13 +00:00
|
|
|
/***************************************/
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
#include "fctsys.h"
|
2009-02-04 15:25:03 +00:00
|
|
|
#include "appl_wxstruct.h"
|
2007-06-05 12:10:51 +00:00
|
|
|
#include "common.h"
|
2009-02-04 15:25:03 +00:00
|
|
|
#include "confirm.h"
|
|
|
|
#include "gestfich.h"
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
#include "cvpcb.h"
|
2009-02-04 15:25:03 +00:00
|
|
|
#include "cvstruct.h"
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-04-21 17:56:27 +00:00
|
|
|
#include "bitmaps.h"
|
2008-12-08 15:27:13 +00:00
|
|
|
|
2009-04-21 17:56:27 +00:00
|
|
|
#include "id.h"
|
2008-12-08 15:27:13 +00:00
|
|
|
|
|
|
|
|
2009-04-21 17:56:27 +00:00
|
|
|
/*******************************************/
|
|
|
|
void WinEDA_CvpcbFrame::ReCreateMenuBar()
|
|
|
|
/*******************************************/
|
2008-12-08 15:27:13 +00:00
|
|
|
|
2009-04-21 17:56:27 +00:00
|
|
|
/* Creation des menus de la fenetre principale
|
|
|
|
*/
|
2007-06-05 12:10:51 +00:00
|
|
|
{
|
2009-04-21 17:56:27 +00:00
|
|
|
wxMenuItem* item;
|
2009-05-21 17:42:42 +00:00
|
|
|
wxMenuBar* menuBar;
|
|
|
|
|
2009-04-21 17:56:27 +00:00
|
|
|
/* Destroy the existing menu bar so it can be rebuilt. This allows
|
|
|
|
* language changes of the menu text on the fly. */
|
2009-05-21 17:42:42 +00:00
|
|
|
// if( menuBar )
|
|
|
|
// SetMenuBar( NULL );
|
2009-04-21 17:56:27 +00:00
|
|
|
|
|
|
|
menuBar = new wxMenuBar();
|
|
|
|
|
|
|
|
wxMenu* filesMenu = new wxMenu;
|
|
|
|
item = new wxMenuItem( filesMenu, ID_LOAD_PROJECT,
|
|
|
|
_( "&Open" ),
|
|
|
|
_( "Open a NetList file" ) );
|
|
|
|
item->SetBitmap( open_xpm );
|
|
|
|
filesMenu->Append( item );
|
|
|
|
|
|
|
|
filesMenu->AppendSeparator();
|
|
|
|
item = new wxMenuItem( filesMenu, ID_SAVE_PROJECT,
|
|
|
|
_( "&Save As..." ),
|
|
|
|
_( "Save New NetList and Footprints List files" ) );
|
|
|
|
item->SetBitmap( save_xpm );
|
|
|
|
filesMenu->Append( item );
|
|
|
|
|
|
|
|
filesMenu->AppendSeparator();
|
|
|
|
item = new wxMenuItem( filesMenu, ID_CVPCB_QUIT, _( "E&xit" ),
|
|
|
|
_( "Quit Cvpcb" ) );
|
|
|
|
item->SetBitmap( exit_xpm );
|
|
|
|
filesMenu->Append( item );
|
|
|
|
|
|
|
|
// Creation des selections des anciens fichiers
|
|
|
|
wxGetApp().m_fileHistory.AddFilesToMenu( filesMenu );
|
|
|
|
|
|
|
|
// Menu Configuration:
|
|
|
|
wxMenu* configmenu = new wxMenu;
|
|
|
|
item = new wxMenuItem( configmenu, ID_CONFIG_REQ, _( "&Configuration" ),
|
|
|
|
_( "Setting Libraries, Directories and others..." ) );
|
|
|
|
item->SetBitmap( config_xpm );
|
|
|
|
configmenu->Append( item );
|
|
|
|
|
|
|
|
wxGetApp().AddMenuLanguageList( configmenu );
|
|
|
|
|
2009-04-23 15:02:18 +00:00
|
|
|
item = new wxMenuItem( configmenu, ID_CVPCB_CONFIG_KEEP_OPEN_ON_SAVE,
|
|
|
|
_( "Keep Open On Save" ),
|
2009-05-21 17:42:42 +00:00
|
|
|
_( "Prevent CVPcb from exiting after saving netlist file" ),
|
2009-04-23 15:02:18 +00:00
|
|
|
wxITEM_CHECK );
|
|
|
|
configmenu->Append( item );
|
2009-04-21 17:56:27 +00:00
|
|
|
configmenu->AppendSeparator();
|
|
|
|
item = new wxMenuItem( configmenu, ID_CONFIG_SAVE,
|
2009-04-23 15:02:18 +00:00
|
|
|
_( "&Save Project File" ),
|
|
|
|
_( "Save changes to the project file" ) );
|
2009-04-21 17:56:27 +00:00
|
|
|
item->SetBitmap( save_setup_xpm );
|
|
|
|
configmenu->Append( item );
|
|
|
|
|
|
|
|
// Menu Help:
|
|
|
|
wxMenu* helpMenu = new wxMenu;
|
|
|
|
item = new wxMenuItem( helpMenu, ID_CVPCB_DISPLAY_HELP, _( "&Contents" ),
|
|
|
|
_( "Open the cvpcb manual" ) );
|
|
|
|
item->SetBitmap( help_xpm );
|
|
|
|
helpMenu->Append( item );
|
|
|
|
item = new wxMenuItem( helpMenu, ID_CVPCB_DISPLAY_LICENCE,
|
|
|
|
_( "&About cvpcb" ),
|
|
|
|
_( "About cvpcb schematic to pcb converter" ) );
|
|
|
|
item->SetBitmap( info_xpm );
|
|
|
|
helpMenu->Append( item );
|
|
|
|
|
|
|
|
menuBar->Append( filesMenu, _( "&File" ) );
|
|
|
|
menuBar->Append( configmenu, _( "&Preferences" ) );
|
|
|
|
menuBar->Append( helpMenu, _( "&Help" ) );
|
|
|
|
|
|
|
|
// Associate the menu bar with the frame
|
|
|
|
SetMenuBar( menuBar );
|
2007-06-05 12:10:51 +00:00
|
|
|
}
|