2012-12-28 20:52:12 +00:00
|
|
|
|
2011-10-18 19:59:19 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
2012-06-08 09:56:42 +00:00
|
|
|
* Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
|
|
|
|
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
|
|
|
|
* Copyright (C) 2012 Wayne Stambaugh <stambaughw@verizon.net>
|
|
|
|
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
|
|
|
|
*
|
2011-10-18 19:59:19 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, you may find one here:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
/**
|
|
|
|
* @file pcbnew/menubar_modedit.cpp
|
|
|
|
* @brief (Re)Create the main menubar for the module editor
|
|
|
|
*/
|
2012-01-23 04:33:36 +00:00
|
|
|
#include <fctsys.h>
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2012-01-23 04:33:36 +00:00
|
|
|
#include <pcbnew.h>
|
|
|
|
#include <wxPcbStruct.h>
|
|
|
|
#include <module_editor_frame.h>
|
2012-04-09 09:16:47 +00:00
|
|
|
#include <menus_helpers.h>
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2012-01-23 04:33:36 +00:00
|
|
|
#include <pcbnew_id.h>
|
2012-09-12 11:11:30 +00:00
|
|
|
#include <hotkeys.h>
|
2014-10-15 11:40:38 +00:00
|
|
|
#include <help_common_strings.h>
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2011-08-26 17:01:17 +00:00
|
|
|
|
|
|
|
void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
|
2007-06-05 12:10:51 +00:00
|
|
|
{
|
2011-04-06 13:52:47 +00:00
|
|
|
// Create and try to get the current menubar
|
2011-10-18 17:28:49 +00:00
|
|
|
wxMenuBar* menuBar = GetMenuBar();
|
2009-11-18 12:52:19 +00:00
|
|
|
|
2011-10-18 17:28:49 +00:00
|
|
|
if( !menuBar )
|
2010-12-17 20:34:29 +00:00
|
|
|
menuBar = new wxMenuBar();
|
2010-07-29 20:00:24 +00:00
|
|
|
|
2010-12-17 20:34:29 +00:00
|
|
|
// Delete all existing menus so they can be rebuilt.
|
|
|
|
// This allows language changes of the menu text on the fly.
|
|
|
|
menuBar->Freeze();
|
2011-08-26 17:01:17 +00:00
|
|
|
|
2010-12-17 20:34:29 +00:00
|
|
|
while( menuBar->GetMenuCount() )
|
2011-10-18 17:28:49 +00:00
|
|
|
delete menuBar->Remove( 0 );
|
2010-12-17 20:34:29 +00:00
|
|
|
|
|
|
|
// Recreate all menus:
|
2012-09-12 09:53:11 +00:00
|
|
|
wxString text;
|
2010-08-24 17:26:51 +00:00
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// Menu File:
|
2010-08-24 17:26:51 +00:00
|
|
|
wxMenu* fileMenu = new wxMenu;
|
|
|
|
|
2012-08-31 19:19:48 +00:00
|
|
|
// Active library selection
|
2014-02-28 17:31:00 +00:00
|
|
|
AddMenuItem( fileMenu, ID_MODEDIT_SELECT_CURRENT_LIB, _("Set Active Library"),
|
2012-08-31 19:19:48 +00:00
|
|
|
_( "Select active library" ),
|
|
|
|
KiBitmap( open_library_xpm ) );
|
|
|
|
fileMenu->AppendSeparator();
|
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// New module
|
2011-10-18 17:28:49 +00:00
|
|
|
AddMenuItem( fileMenu, ID_MODEDIT_NEW_MODULE,
|
2014-10-08 05:50:56 +00:00
|
|
|
_( "&New Footprint" ), _( "Create new footprint" ),
|
2011-10-18 17:28:49 +00:00
|
|
|
KiBitmap( new_footprint_xpm ) );
|
2010-08-24 17:26:51 +00:00
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// Open submenu
|
2010-08-24 17:26:51 +00:00
|
|
|
wxMenu* openSubmenu = new wxMenu;
|
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// from File
|
2011-10-18 17:28:49 +00:00
|
|
|
AddMenuItem( openSubmenu, ID_MODEDIT_IMPORT_PART,
|
2014-10-08 05:50:56 +00:00
|
|
|
_( "&Import Footprint From File" ),
|
2014-02-28 17:31:00 +00:00
|
|
|
_( "Import footprint from an existing file" ),
|
2011-10-18 19:59:19 +00:00
|
|
|
KiBitmap( import_module_xpm ) );
|
2010-08-24 17:26:51 +00:00
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// from Library
|
2011-10-18 17:28:49 +00:00
|
|
|
AddMenuItem( openSubmenu, ID_MODEDIT_LOAD_MODULE,
|
2014-10-08 05:50:56 +00:00
|
|
|
_( "Load Footprint From Current Li&brary" ),
|
|
|
|
_( "Open a footprint from library" ),
|
2011-10-18 19:59:19 +00:00
|
|
|
KiBitmap( module_xpm ) );
|
2010-08-24 17:26:51 +00:00
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// from current Board
|
2011-10-18 17:28:49 +00:00
|
|
|
AddMenuItem( openSubmenu, ID_MODEDIT_LOAD_MODULE_FROM_BOARD,
|
2014-10-08 05:50:56 +00:00
|
|
|
_( "Load Footprint From &Current Board" ),
|
|
|
|
_( "Load a footprint from the current board" ),
|
2011-10-18 19:59:19 +00:00
|
|
|
KiBitmap( load_module_board_xpm ) );
|
2010-08-24 17:26:51 +00:00
|
|
|
|
|
|
|
/* Append openSubmenu to fileMenu */
|
2011-09-01 12:54:34 +00:00
|
|
|
AddMenuItem( fileMenu, openSubmenu, -1,
|
2014-10-08 05:50:56 +00:00
|
|
|
_( "&Load Footprint" ),
|
|
|
|
_( "Load footprint" ),
|
2011-10-18 19:59:19 +00:00
|
|
|
KiBitmap( open_document_xpm ) );
|
2012-08-31 19:19:48 +00:00
|
|
|
fileMenu->AppendSeparator();
|
2010-08-24 17:26:51 +00:00
|
|
|
|
2012-10-07 15:37:25 +00:00
|
|
|
// Save the currently loaded legacy library as an s-expression library.
|
2012-11-19 16:19:38 +00:00
|
|
|
AddMenuItem( fileMenu, ID_MODEDIT_SAVE_LIBRARY_AS,
|
2014-02-28 17:31:00 +00:00
|
|
|
_( "Save Current Library As..." ),
|
2013-04-05 07:38:00 +00:00
|
|
|
_( "Save entire current library under a new name." ),
|
2014-04-04 18:35:07 +00:00
|
|
|
KiBitmap( copy_library_xpm ) );
|
2012-10-07 15:37:25 +00:00
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// Save module
|
2014-10-08 05:50:56 +00:00
|
|
|
text = AddHotkeyName( _( "&Save Footprint in Active Library" ),
|
2012-09-12 11:11:30 +00:00
|
|
|
g_Module_Editor_Hokeys_Descr, HK_SAVE_MODULE );
|
2012-11-19 16:19:38 +00:00
|
|
|
|
2012-09-12 09:53:11 +00:00
|
|
|
AddMenuItem( fileMenu, ID_MODEDIT_SAVE_LIBMODULE, text,
|
2014-10-08 05:50:56 +00:00
|
|
|
_( "Save footprint in active library" ),
|
2011-10-18 19:59:19 +00:00
|
|
|
KiBitmap( save_library_xpm ) );
|
2010-08-24 17:26:51 +00:00
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// Save module in new lib
|
2011-10-18 17:28:49 +00:00
|
|
|
AddMenuItem( fileMenu, ID_MODEDIT_CREATE_NEW_LIB_AND_SAVE_CURRENT_PART,
|
2014-10-08 05:50:56 +00:00
|
|
|
_( "S&ave Footprint in New Library" ),
|
2012-11-19 16:19:38 +00:00
|
|
|
_( "Create a new library and save current module into it" ),
|
2011-10-18 19:59:19 +00:00
|
|
|
KiBitmap( new_library_xpm ) );
|
2010-08-24 17:26:51 +00:00
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// Export module
|
2011-10-18 17:28:49 +00:00
|
|
|
AddMenuItem( fileMenu, ID_MODEDIT_EXPORT_PART,
|
2014-10-08 05:50:56 +00:00
|
|
|
_( "&Export Footprint" ),
|
|
|
|
_( "Save currently loaded footprint into file" ),
|
2011-10-18 19:59:19 +00:00
|
|
|
KiBitmap( export_module_xpm ) );
|
2014-07-09 13:02:56 +00:00
|
|
|
|
|
|
|
// Import DXF File
|
|
|
|
AddMenuItem( fileMenu, ID_GEN_IMPORT_DXF_FILE,
|
|
|
|
_( "&Import DXF File" ),
|
|
|
|
_( "Import a 2D Drawing DXF file to Pcbnew on the Drawings layer" ),
|
|
|
|
KiBitmap( import_xpm ) );
|
|
|
|
|
2010-08-24 17:26:51 +00:00
|
|
|
fileMenu->AppendSeparator();
|
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// Print
|
2011-10-18 17:28:49 +00:00
|
|
|
AddMenuItem( fileMenu, wxID_PRINT,
|
2011-10-18 19:59:19 +00:00
|
|
|
_( "&Print" ),
|
2014-10-08 05:50:56 +00:00
|
|
|
_( "Print current footprint" ),
|
2011-10-18 19:59:19 +00:00
|
|
|
KiBitmap( plot_xpm ) );
|
2010-08-24 17:26:51 +00:00
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// Separator
|
2010-08-24 17:26:51 +00:00
|
|
|
fileMenu->AppendSeparator();
|
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// Close editor
|
2011-10-18 17:28:49 +00:00
|
|
|
AddMenuItem( fileMenu, wxID_EXIT,
|
2011-10-18 19:59:19 +00:00
|
|
|
_( "Cl&ose" ),
|
2014-02-28 17:31:00 +00:00
|
|
|
_( "Close footprint editor" ),
|
2011-10-18 19:59:19 +00:00
|
|
|
KiBitmap( exit_xpm ) );
|
2010-08-24 17:26:51 +00:00
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// Menu Edit:
|
2010-08-24 17:26:51 +00:00
|
|
|
wxMenu* editMenu = new wxMenu;
|
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// Undo
|
2012-09-12 11:11:30 +00:00
|
|
|
text = AddHotkeyName( _( "&Undo" ), g_Module_Editor_Hokeys_Descr, HK_UNDO );
|
2011-10-18 17:28:49 +00:00
|
|
|
AddMenuItem( editMenu, wxID_UNDO,
|
2014-02-28 17:31:00 +00:00
|
|
|
text, _( "Undo last action" ),
|
2011-10-18 19:59:19 +00:00
|
|
|
KiBitmap( undo_xpm ) );
|
2010-08-24 17:26:51 +00:00
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// Redo
|
2012-09-12 11:11:30 +00:00
|
|
|
text = AddHotkeyName( _( "&Redo" ), g_Module_Editor_Hokeys_Descr, HK_REDO );
|
2011-10-18 17:28:49 +00:00
|
|
|
AddMenuItem( editMenu, wxID_REDO,
|
2014-02-28 17:31:00 +00:00
|
|
|
text, _( "Redo last action" ),
|
2011-10-18 19:59:19 +00:00
|
|
|
KiBitmap( redo_xpm ) );
|
2010-08-24 17:26:51 +00:00
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// Delete items
|
2011-10-18 17:28:49 +00:00
|
|
|
AddMenuItem( editMenu, ID_MODEDIT_DELETE_TOOL,
|
2014-02-28 17:31:00 +00:00
|
|
|
_( "&Delete" ), _( "Delete objects with eraser" ),
|
2012-03-20 14:17:58 +00:00
|
|
|
KiBitmap( delete_xpm ) );
|
2010-08-24 17:26:51 +00:00
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// Separator
|
2010-08-24 17:26:51 +00:00
|
|
|
editMenu->AppendSeparator();
|
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// Properties
|
2011-10-18 17:28:49 +00:00
|
|
|
AddMenuItem( editMenu, ID_MODEDIT_EDIT_MODULE_PROPERTIES,
|
2014-02-28 17:31:00 +00:00
|
|
|
_( "Edit &Properties" ),
|
2014-10-08 05:50:56 +00:00
|
|
|
_( "Edit footprint properties" ),
|
2011-10-18 19:59:19 +00:00
|
|
|
KiBitmap( module_options_xpm ) );
|
2010-08-24 17:26:51 +00:00
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// Dimensions submenu
|
2010-08-24 17:26:51 +00:00
|
|
|
wxMenu* dimensions_Submenu = new wxMenu;
|
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// Sizes and Widths
|
2011-10-18 17:28:49 +00:00
|
|
|
AddMenuItem( dimensions_Submenu, ID_PCB_DRAWINGS_WIDTHS_SETUP,
|
2014-02-28 17:31:00 +00:00
|
|
|
_( "&Size and Width" ),
|
2011-10-18 19:59:19 +00:00
|
|
|
_( "Adjust width for texts and drawings" ),
|
|
|
|
KiBitmap( options_text_xpm ) );
|
2010-08-24 17:26:51 +00:00
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// Pad settings
|
2011-10-18 17:28:49 +00:00
|
|
|
AddMenuItem( dimensions_Submenu, ID_MODEDIT_PAD_SETTINGS,
|
2014-02-28 17:31:00 +00:00
|
|
|
_( "&Pad Setting" ), _( "Edit settings for new pads" ),
|
2012-11-05 20:20:34 +00:00
|
|
|
KiBitmap( pad_dimensions_xpm ) );
|
2010-08-24 17:26:51 +00:00
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// User grid size
|
2011-10-18 17:28:49 +00:00
|
|
|
AddMenuItem( dimensions_Submenu, ID_PCB_USER_GRID_SETUP,
|
2011-10-18 19:59:19 +00:00
|
|
|
_( "&User Grid Size" ), _( "Adjust user grid" ),
|
|
|
|
KiBitmap( grid_xpm ) );
|
2010-08-24 17:26:51 +00:00
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// View menu
|
2010-08-24 17:26:51 +00:00
|
|
|
wxMenu* viewMenu = new wxMenu;
|
|
|
|
|
2014-10-15 11:40:38 +00:00
|
|
|
/* Important Note for ZOOM IN and ZOOM OUT commands from menubar:
|
|
|
|
* we cannot add hotkey info here, because the hotkey HK_ZOOM_IN and HK_ZOOM_OUT
|
|
|
|
* events(default = WXK_F1 and WXK_F2) are *NOT* equivalent to this menu command:
|
|
|
|
* zoom in and out from hotkeys are equivalent to the pop up menu zoom
|
|
|
|
* From here, zooming is made around the screen center
|
|
|
|
* From hotkeys, zooming is made around the mouse cursor position
|
|
|
|
* (obviously not possible from the toolbar or menubar command)
|
|
|
|
*
|
|
|
|
* in other words HK_ZOOM_IN and HK_ZOOM_OUT *are NOT* accelerators
|
|
|
|
* for Zoom in and Zoom out sub menus
|
|
|
|
*/
|
|
|
|
text = AddHotkeyName( _( "Zoom &In" ), g_Module_Editor_Hokeys_Descr,
|
|
|
|
HK_ZOOM_IN, IS_ACCELERATOR );
|
|
|
|
AddMenuItem( viewMenu, ID_ZOOM_IN, text, HELP_ZOOM_IN, KiBitmap( zoom_in_xpm ) );
|
|
|
|
|
|
|
|
text = AddHotkeyName( _( "Zoom &Out" ), g_Module_Editor_Hokeys_Descr,
|
|
|
|
HK_ZOOM_OUT, IS_ACCELERATOR );
|
|
|
|
AddMenuItem( viewMenu, ID_ZOOM_OUT, text, HELP_ZOOM_OUT, KiBitmap( zoom_out_xpm ) );
|
|
|
|
|
|
|
|
text = AddHotkeyName( _( "&Fit on Screen" ), g_Module_Editor_Hokeys_Descr,
|
|
|
|
HK_ZOOM_AUTO );
|
|
|
|
AddMenuItem( viewMenu, ID_ZOOM_PAGE, text, HELP_ZOOM_FIT,
|
2011-10-18 19:59:19 +00:00
|
|
|
KiBitmap( zoom_fit_in_page_xpm ) );
|
2010-08-24 17:26:51 +00:00
|
|
|
|
2014-10-15 11:40:38 +00:00
|
|
|
text = AddHotkeyName( _( "&Redraw" ), g_Module_Editor_Hokeys_Descr, HK_ZOOM_REDRAW );
|
|
|
|
AddMenuItem( viewMenu, ID_ZOOM_REDRAW, text,
|
|
|
|
HELP_ZOOM_REDRAW, KiBitmap( zoom_redraw_xpm ) );
|
2010-08-24 17:26:51 +00:00
|
|
|
|
2014-10-15 11:40:38 +00:00
|
|
|
viewMenu->AppendSeparator();
|
2010-08-24 17:26:51 +00:00
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// 3D view
|
2011-10-18 17:28:49 +00:00
|
|
|
AddMenuItem( viewMenu, ID_MENU_PCB_SHOW_3D_FRAME,
|
2011-10-18 19:59:19 +00:00
|
|
|
_( "3&D View" ),
|
|
|
|
_( "Show board in 3D viewer" ),
|
|
|
|
KiBitmap( three_d_xpm ) );
|
2010-08-24 17:26:51 +00:00
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// Menu Place:
|
2010-08-24 17:26:51 +00:00
|
|
|
wxMenu* placeMenu = new wxMenu;
|
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// Pad
|
2011-10-18 17:28:49 +00:00
|
|
|
AddMenuItem( placeMenu, ID_MODEDIT_PAD_TOOL,
|
2011-10-18 19:59:19 +00:00
|
|
|
_( "&Pad" ), _( "Add pad" ),
|
|
|
|
KiBitmap( pad_xpm ) );
|
2010-08-24 17:26:51 +00:00
|
|
|
|
|
|
|
placeMenu->AppendSeparator();
|
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// Circle
|
2011-10-18 17:28:49 +00:00
|
|
|
AddMenuItem( placeMenu, ID_MODEDIT_CIRCLE_TOOL,
|
2011-10-18 19:59:19 +00:00
|
|
|
_( "&Circle" ), _( "Add graphic circle" ),
|
|
|
|
KiBitmap( add_circle_xpm ) );
|
2010-08-24 17:26:51 +00:00
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// Line or Polygon
|
2011-10-18 17:28:49 +00:00
|
|
|
AddMenuItem( placeMenu, ID_MODEDIT_LINE_TOOL,
|
2011-10-18 19:59:19 +00:00
|
|
|
_( "&Line or Polygon" ),
|
|
|
|
_( "Add graphic line or polygon" ),
|
|
|
|
KiBitmap( add_polygon_xpm ) );
|
2010-08-24 17:26:51 +00:00
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// Arc
|
2011-10-18 17:28:49 +00:00
|
|
|
AddMenuItem( placeMenu, ID_MODEDIT_ARC_TOOL,
|
2011-10-18 19:59:19 +00:00
|
|
|
_( "&Arc" ), _( "Add graphic arc" ),
|
|
|
|
KiBitmap( add_arc_xpm ) );
|
2010-08-24 17:26:51 +00:00
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// Text
|
2011-10-18 17:28:49 +00:00
|
|
|
AddMenuItem( placeMenu, ID_MODEDIT_TEXT_TOOL,
|
2011-10-18 19:59:19 +00:00
|
|
|
_( "&Text" ), _( "Add graphic text" ),
|
|
|
|
KiBitmap( add_text_xpm ) );
|
2010-08-24 17:26:51 +00:00
|
|
|
|
|
|
|
placeMenu->AppendSeparator();
|
2011-10-18 19:59:19 +00:00
|
|
|
|
|
|
|
// Anchor
|
2011-10-18 17:28:49 +00:00
|
|
|
AddMenuItem( placeMenu, ID_MODEDIT_ANCHOR_TOOL,
|
2011-10-18 19:59:19 +00:00
|
|
|
_( "A&nchor" ),
|
2014-02-28 17:31:00 +00:00
|
|
|
_( "Place footprint module reference anchor" ),
|
2011-10-18 19:59:19 +00:00
|
|
|
KiBitmap( anchor_xpm ) );
|
2010-08-24 17:26:51 +00:00
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// Menu Help:
|
2010-08-24 17:26:51 +00:00
|
|
|
wxMenu* helpMenu = new wxMenu;
|
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// Version info
|
2010-08-24 17:26:51 +00:00
|
|
|
AddHelpVersionInfoMenuEntry( helpMenu );
|
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// Contents
|
2011-10-18 17:28:49 +00:00
|
|
|
AddMenuItem( helpMenu, wxID_HELP,
|
2014-02-28 17:31:00 +00:00
|
|
|
_( "P&cbnew Manual" ),
|
|
|
|
_( "Open the Pcbnew manual" ),
|
2011-10-18 19:59:19 +00:00
|
|
|
KiBitmap( online_help_xpm ) );
|
|
|
|
|
2011-10-18 17:28:49 +00:00
|
|
|
AddMenuItem( helpMenu, wxID_INDEX,
|
2011-10-18 19:59:19 +00:00
|
|
|
_( "&Getting Started in KiCad" ),
|
|
|
|
_( "Open the \"Getting Started in KiCad\" guide for beginners" ),
|
|
|
|
KiBitmap( help_xpm ) );
|
2010-08-24 17:26:51 +00:00
|
|
|
|
2011-09-30 18:15:37 +00:00
|
|
|
// About Pcbnew
|
2011-08-04 18:03:26 +00:00
|
|
|
helpMenu->AppendSeparator();
|
2011-09-01 12:54:34 +00:00
|
|
|
AddMenuItem( helpMenu, wxID_ABOUT,
|
2011-10-18 19:59:19 +00:00
|
|
|
_( "&About Pcbnew" ),
|
|
|
|
_( "About Pcbnew PCB designer" ),
|
|
|
|
KiBitmap( info_xpm ) );
|
2010-08-24 17:26:51 +00:00
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// Append menus to the menubar
|
2011-10-18 17:28:49 +00:00
|
|
|
menuBar->Append( fileMenu, _( "&File" ) );
|
|
|
|
menuBar->Append( editMenu, _( "&Edit" ) );
|
2012-11-05 20:20:34 +00:00
|
|
|
menuBar->Append( dimensions_Submenu, _( "Di&mensions" ) );
|
|
|
|
|
2011-10-18 17:28:49 +00:00
|
|
|
menuBar->Append( viewMenu, _( "&View" ) );
|
2010-08-24 17:26:51 +00:00
|
|
|
menuBar->Append( placeMenu, _( "&Place" ) );
|
2011-10-18 17:28:49 +00:00
|
|
|
menuBar->Append( helpMenu, _( "&Help" ) );
|
2010-08-24 17:26:51 +00:00
|
|
|
|
2010-12-17 20:34:29 +00:00
|
|
|
menuBar->Thaw();
|
|
|
|
|
|
|
|
// Associate the menu bar with the frame, if no previous menubar
|
|
|
|
if( GetMenuBar() == NULL )
|
|
|
|
SetMenuBar( menuBar );
|
|
|
|
else
|
|
|
|
menuBar->Refresh();
|
2007-06-05 12:10:51 +00:00
|
|
|
}
|