2011-10-18 19:59:19 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
2018-04-01 19:09:52 +00:00
|
|
|
* Copyright (C) 2018 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
2017-10-22 00:48:25 +00:00
|
|
|
* Copyright (C) 2009 Wayne Stambaugh <stambaughw@gmail.com>
|
2019-04-02 12:31:28 +00:00
|
|
|
* Copyright (C) 1992-2019 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
|
|
|
|
*/
|
|
|
|
|
2010-01-18 19:33:45 +00:00
|
|
|
/**
|
2010-12-14 15:56:30 +00:00
|
|
|
* @file eeschema/menubar.cpp
|
2011-04-06 13:52:47 +00:00
|
|
|
* @brief (Re)Create the main menubar for the schematic frame
|
2011-04-12 12:41:13 +00:00
|
|
|
*/
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-09-25 18:49:04 +00:00
|
|
|
|
2016-03-11 16:40:24 +00:00
|
|
|
#include <kiface_i.h>
|
2012-04-09 09:16:47 +00:00
|
|
|
#include <menus_helpers.h>
|
2016-03-11 16:40:24 +00:00
|
|
|
#include <pgm_base.h>
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2016-03-11 16:40:24 +00:00
|
|
|
#include "eeschema_id.h"
|
|
|
|
#include "general.h"
|
|
|
|
#include "help_common_strings.h"
|
|
|
|
#include "hotkeys.h"
|
2018-01-30 10:49:51 +00:00
|
|
|
#include "sch_edit_frame.h"
|
2015-06-21 20:30:33 +00:00
|
|
|
|
2016-11-20 11:57:16 +00:00
|
|
|
// helper functions that build specific submenus:
|
|
|
|
|
|
|
|
// Build the place submenu
|
|
|
|
static void preparePlaceMenu( wxMenu* aParentMenu );
|
|
|
|
|
|
|
|
// Build the files menu. Because some commands are available only if
|
|
|
|
// Eeschemat is run outside a project (run alone), aIsOutsideProject is false
|
|
|
|
// when Eeschema is run from Kicad manager, and true is run as stand alone app.
|
|
|
|
static void prepareFilesMenu( wxMenu* aParentMenu, bool aIsOutsideProject );
|
|
|
|
|
2018-02-22 19:05:10 +00:00
|
|
|
// Build the inspect menu
|
|
|
|
static void prepareInspectMenu( wxMenu* aParentMenu );
|
|
|
|
|
2016-11-20 11:57:16 +00:00
|
|
|
// Build the tools menu
|
|
|
|
static void prepareToolsMenu( wxMenu* aParentMenu );
|
|
|
|
|
|
|
|
// Build the help menu
|
|
|
|
static void prepareHelpMenu( wxMenu* aParentMenu );
|
|
|
|
|
|
|
|
// Build the edit menu
|
|
|
|
static void prepareEditMenu( wxMenu* aParentMenu );
|
|
|
|
|
|
|
|
// Build the view menu
|
|
|
|
static void prepareViewMenu( wxMenu* aParentMenu );
|
|
|
|
|
2017-02-07 21:16:26 +00:00
|
|
|
// Build the preferences menu
|
2017-03-03 13:18:07 +00:00
|
|
|
static void preparePreferencesMenu( SCH_EDIT_FRAME* aFrame, wxMenu* aParentMenu );
|
2017-02-07 21:16:26 +00:00
|
|
|
|
2016-11-20 11:57:16 +00:00
|
|
|
|
2010-12-08 20:12:46 +00:00
|
|
|
void SCH_EDIT_FRAME::ReCreateMenuBar()
|
2007-06-05 12:10:51 +00:00
|
|
|
{
|
2018-04-07 13:13:38 +00:00
|
|
|
// wxWidgets handles the Mac Application menu behind the scenes, but that means
|
|
|
|
// we always have to start from scratch with a new wxMenuBar.
|
|
|
|
wxMenuBar* oldMenuBar = GetMenuBar();
|
|
|
|
wxMenuBar* menuBar = new wxMenuBar();
|
2011-05-16 19:32:57 +00:00
|
|
|
wxString text;
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2010-12-17 20:34:29 +00:00
|
|
|
// Recreate all menus:
|
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
// Menu File:
|
|
|
|
wxMenu* fileMenu = new wxMenu;
|
2016-11-20 11:57:16 +00:00
|
|
|
prepareFilesMenu( fileMenu, Kiface().IsSingle() );
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2016-11-20 11:57:16 +00:00
|
|
|
// Menu Edit:
|
|
|
|
wxMenu* editMenu = new wxMenu;
|
|
|
|
prepareEditMenu( editMenu );
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2016-11-20 11:57:16 +00:00
|
|
|
// Menu View:
|
|
|
|
wxMenu* viewMenu = new wxMenu;
|
|
|
|
prepareViewMenu( viewMenu );
|
2009-06-30 10:43:20 +00:00
|
|
|
|
2016-11-20 11:57:16 +00:00
|
|
|
// Menu place:
|
|
|
|
wxMenu* placeMenu = new wxMenu;
|
|
|
|
preparePlaceMenu( placeMenu );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2018-02-22 19:05:10 +00:00
|
|
|
// Menu Inspect:
|
|
|
|
wxMenu* inspectMenu = new wxMenu;
|
|
|
|
prepareInspectMenu( inspectMenu );
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2016-11-20 11:57:16 +00:00
|
|
|
// Menu Tools:
|
|
|
|
wxMenu* toolsMenu = new wxMenu;
|
|
|
|
prepareToolsMenu( toolsMenu );
|
2010-01-18 19:33:45 +00:00
|
|
|
|
2018-02-22 19:05:10 +00:00
|
|
|
// Menu Preferences:
|
|
|
|
wxMenu* preferencesMenu = new wxMenu;
|
|
|
|
preparePreferencesMenu( this, preferencesMenu );
|
|
|
|
|
2016-11-20 11:57:16 +00:00
|
|
|
// Help Menu:
|
|
|
|
wxMenu* helpMenu = new wxMenu;
|
|
|
|
prepareHelpMenu( helpMenu );
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2016-11-20 11:57:16 +00:00
|
|
|
// Create the menubar and append all submenus
|
|
|
|
menuBar->Append( fileMenu, _( "&File" ) );
|
|
|
|
menuBar->Append( editMenu, _( "&Edit" ) );
|
|
|
|
menuBar->Append( viewMenu, _( "&View" ) );
|
|
|
|
menuBar->Append( placeMenu, _( "&Place" ) );
|
2018-02-22 19:05:10 +00:00
|
|
|
menuBar->Append( inspectMenu, _( "&Inspect" ) );
|
2016-11-20 11:57:16 +00:00
|
|
|
menuBar->Append( toolsMenu, _( "&Tools" ) );
|
2018-02-22 19:05:10 +00:00
|
|
|
menuBar->Append( preferencesMenu, _( "P&references" ) );
|
2016-11-20 11:57:16 +00:00
|
|
|
menuBar->Append( helpMenu, _( "&Help" ) );
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2018-04-07 13:13:38 +00:00
|
|
|
SetMenuBar( menuBar );
|
|
|
|
delete oldMenuBar;
|
2016-11-20 11:57:16 +00:00
|
|
|
}
|
2011-12-01 16:49:28 +00:00
|
|
|
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2016-11-20 11:57:16 +00:00
|
|
|
void prepareViewMenu( wxMenu* aParentMenu )
|
|
|
|
{
|
|
|
|
wxString text;
|
2010-01-18 19:33:45 +00:00
|
|
|
|
2018-02-22 19:05:10 +00:00
|
|
|
AddMenuItem( aParentMenu,
|
|
|
|
ID_TO_LIBVIEW,
|
2019-01-30 19:51:49 +00:00
|
|
|
_( "Symbol Library &Browser" ), HELP_RUN_LIB_VIEWER,
|
2018-02-22 19:05:10 +00:00
|
|
|
KiBitmap( library_browse_xpm ) );
|
|
|
|
|
|
|
|
AddMenuItem( aParentMenu,
|
|
|
|
ID_HIERARCHY,
|
|
|
|
_( "Show &Hierarchical Navigator" ),
|
2018-03-09 05:09:40 +00:00
|
|
|
_( "Navigate schematic hierarchy" ),
|
2018-02-22 19:05:10 +00:00
|
|
|
KiBitmap( hierarchy_nav_xpm ) );
|
|
|
|
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "&Leave Sheet" ), g_Schematic_Hotkeys_Descr, HK_LEAVE_SHEET );
|
2018-02-22 19:05:10 +00:00
|
|
|
AddMenuItem( aParentMenu,
|
|
|
|
ID_POPUP_SCH_LEAVE_SHEET, text,
|
2018-08-16 10:32:31 +00:00
|
|
|
_( "Return to parent schematic sheet" ),
|
2018-02-22 19:05:10 +00:00
|
|
|
KiBitmap( leave_sheet_xpm ) );
|
|
|
|
|
|
|
|
aParentMenu->AppendSeparator();
|
|
|
|
|
2011-04-06 13:52:47 +00:00
|
|
|
/**
|
|
|
|
* Important Note for ZOOM IN and ZOOM OUT commands from menubar:
|
2010-07-27 09:01:26 +00:00
|
|
|
* we cannot add hotkey shortcut here, because the hotkey HK_ZOOM_IN and HK_ZOOM_OUT
|
2010-02-13 18:38:26 +00:00
|
|
|
* 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
|
2010-08-24 17:26:51 +00:00
|
|
|
* 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)
|
2010-02-13 18:38:26 +00:00
|
|
|
*
|
|
|
|
* in others words HK_ZOOM_IN and HK_ZOOM_OUT *are NOT* accelerators
|
|
|
|
* for Zoom in and Zoom out sub menus
|
2010-07-27 09:01:26 +00:00
|
|
|
* SO WE ADD THE NAME OF THE CORRESPONDING HOTKEY AS A COMMENT, NOT AS A SHORTCUT
|
|
|
|
* using in AddHotkeyName call the option "false" (not a shortcut)
|
2010-02-13 18:38:26 +00:00
|
|
|
*/
|
2011-04-06 13:52:47 +00:00
|
|
|
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "Zoom &In" ), g_Schematic_Hotkeys_Descr,
|
2011-09-23 20:00:30 +00:00
|
|
|
HK_ZOOM_IN, IS_ACCELERATOR ); // add an accelerator, not a shortcut
|
2016-11-20 11:57:16 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_ZOOM_IN, text, HELP_ZOOM_IN, KiBitmap( zoom_in_xpm ) );
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "Zoom &Out" ), g_Schematic_Hotkeys_Descr,
|
2011-09-23 20:00:30 +00:00
|
|
|
HK_ZOOM_OUT, IS_ACCELERATOR ); // add accelerator, not a shortcut
|
2016-11-20 11:57:16 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_ZOOM_OUT, text, HELP_ZOOM_OUT, KiBitmap( zoom_out_xpm ) );
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "&Zoom to Fit" ), g_Schematic_Hotkeys_Descr, HK_ZOOM_AUTO );
|
2011-04-06 13:52:47 +00:00
|
|
|
|
2018-02-22 19:05:10 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_ZOOM_PAGE, text,
|
|
|
|
HELP_ZOOM_FIT, KiBitmap( zoom_fit_in_page_xpm ) );
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "Zoom to Selection" ), g_Eeschema_Hotkeys_Descr, HK_ZOOM_SELECTION );
|
2018-03-25 15:02:53 +00:00
|
|
|
|
2019-04-17 20:35:23 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_ZOOM_SELECTION, text, KiBitmap( zoom_area_xpm ) );
|
2018-03-25 15:02:53 +00:00
|
|
|
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "&Redraw" ), g_Schematic_Hotkeys_Descr, HK_ZOOM_REDRAW );
|
2015-06-11 17:27:36 +00:00
|
|
|
|
2018-02-22 19:05:10 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_ZOOM_REDRAW, text,
|
|
|
|
HELP_ZOOM_REDRAW, KiBitmap( zoom_redraw_xpm ) );
|
2015-06-11 17:27:36 +00:00
|
|
|
|
2016-11-20 11:57:16 +00:00
|
|
|
aParentMenu->AppendSeparator();
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2018-02-22 19:05:10 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_TB_OPTIONS_SHOW_GRID,
|
|
|
|
_( "Show &Grid" ), wxEmptyString,
|
|
|
|
KiBitmap( grid_xpm ), wxITEM_CHECK );
|
2011-07-02 12:48:45 +00:00
|
|
|
|
2018-09-04 00:00:17 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_GRID_SETTINGS,
|
|
|
|
_( "Grid Settings..." ), wxEmptyString,
|
|
|
|
KiBitmap( grid_xpm ) );
|
|
|
|
|
2018-02-22 19:05:10 +00:00
|
|
|
// Units submenu
|
|
|
|
wxMenu* unitsSubMenu = new wxMenu;
|
|
|
|
AddMenuItem( unitsSubMenu, ID_TB_OPTIONS_SELECT_UNIT_INCH,
|
|
|
|
_( "&Imperial" ), _( "Use imperial units" ),
|
|
|
|
KiBitmap( unit_inch_xpm ), wxITEM_RADIO );
|
2015-06-12 21:31:44 +00:00
|
|
|
|
2018-02-22 19:05:10 +00:00
|
|
|
AddMenuItem( unitsSubMenu, ID_TB_OPTIONS_SELECT_UNIT_MM,
|
|
|
|
_( "&Metric" ), _( "Use metric units" ),
|
|
|
|
KiBitmap( unit_mm_xpm ), wxITEM_RADIO );
|
|
|
|
|
|
|
|
AddMenuItem( aParentMenu, unitsSubMenu,
|
|
|
|
-1, _( "&Units" ),
|
|
|
|
_( "Select which units are displayed" ),
|
|
|
|
KiBitmap( unit_mm_xpm ) );
|
|
|
|
|
|
|
|
AddMenuItem( aParentMenu, ID_TB_OPTIONS_SELECT_CURSOR,
|
2018-05-03 14:49:44 +00:00
|
|
|
_( "Full &Window Crosshair" ),
|
2018-02-22 19:05:10 +00:00
|
|
|
_( "Change cursor shape" ),
|
|
|
|
KiBitmap( cursor_shape_xpm ), wxITEM_CHECK );
|
|
|
|
|
|
|
|
aParentMenu->AppendSeparator();
|
|
|
|
|
|
|
|
AddMenuItem( aParentMenu, ID_TB_OPTIONS_HIDDEN_PINS,
|
2018-05-03 14:49:44 +00:00
|
|
|
_( "Show Hidden &Pins" ),
|
2018-02-22 19:05:10 +00:00
|
|
|
wxEmptyString,
|
|
|
|
KiBitmap( hidden_pin_xpm ), wxITEM_CHECK );
|
|
|
|
|
|
|
|
#ifdef __APPLE__
|
|
|
|
aParentMenu->AppendSeparator();
|
|
|
|
#endif
|
2016-11-20 11:57:16 +00:00
|
|
|
}
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2016-11-20 11:57:16 +00:00
|
|
|
|
|
|
|
void preparePlaceMenu( wxMenu* aParentMenu )
|
|
|
|
{
|
|
|
|
wxString text;
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "&Symbol" ), g_Schematic_Hotkeys_Descr,
|
2011-09-23 20:00:30 +00:00
|
|
|
HK_ADD_NEW_COMPONENT, IS_ACCELERATOR ); // add an accelerator, not a shortcut
|
2018-04-01 18:58:27 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_MENU_PLACE_COMPONENT, text,
|
2011-10-18 19:59:19 +00:00
|
|
|
HELP_PLACE_COMPONENTS,
|
|
|
|
KiBitmap( add_component_xpm ) );
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "&Power Port" ), g_Schematic_Hotkeys_Descr,
|
2011-09-23 20:00:30 +00:00
|
|
|
HK_ADD_NEW_POWER, IS_ACCELERATOR ); // add an accelerator, not a shortcut
|
2018-04-01 18:58:27 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_MENU_PLACE_POWER_BUTT, text,
|
2011-10-18 19:59:19 +00:00
|
|
|
HELP_PLACE_POWERPORT,
|
|
|
|
KiBitmap( add_power_xpm ) );
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "&Wire" ), g_Schematic_Hotkeys_Descr,
|
2011-09-23 20:00:30 +00:00
|
|
|
HK_BEGIN_WIRE, IS_ACCELERATOR ); // add an accelerator, not a shortcut
|
2018-04-01 18:58:27 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_MENU_WIRE_BUTT, text,
|
2011-10-18 19:59:19 +00:00
|
|
|
HELP_PLACE_WIRE,
|
|
|
|
KiBitmap( add_line_xpm ) );
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "&Bus" ), g_Schematic_Hotkeys_Descr,
|
2011-09-23 20:00:30 +00:00
|
|
|
HK_BEGIN_BUS, IS_ACCELERATOR ); // add an accelerator, not a shortcut
|
2018-04-01 18:58:27 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_MENU_BUS_BUTT, text,
|
2011-10-18 19:59:19 +00:00
|
|
|
HELP_PLACE_BUS,
|
|
|
|
KiBitmap( add_bus_xpm ) );
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "Wire to Bus &Entry" ), g_Schematic_Hotkeys_Descr,
|
2011-12-18 17:57:05 +00:00
|
|
|
HK_ADD_WIRE_ENTRY, IS_ACCELERATOR ); // add an accelerator, not a shortcut
|
2018-04-01 18:58:27 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_MENU_WIRETOBUS_ENTRY_BUTT, text,
|
2011-10-18 19:59:19 +00:00
|
|
|
HELP_PLACE_WIRE2BUS_ENTRY,
|
|
|
|
KiBitmap( add_line2bus_xpm ) );
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "Bus &to Bus Entry" ), g_Schematic_Hotkeys_Descr,
|
2011-09-23 20:00:30 +00:00
|
|
|
HK_ADD_BUS_ENTRY, IS_ACCELERATOR ); // add an accelerator, not a shortcut
|
2018-04-01 18:58:27 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_MENU_BUSTOBUS_ENTRY_BUTT, text,
|
2011-10-18 19:59:19 +00:00
|
|
|
HELP_PLACE_BUS2BUS_ENTRY,
|
|
|
|
KiBitmap( add_bus2bus_xpm ) );
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "&No Connect Flag" ), g_Schematic_Hotkeys_Descr,
|
2011-09-23 20:00:30 +00:00
|
|
|
HK_ADD_NOCONN_FLAG, IS_ACCELERATOR ); // add an accelerator, not a shortcut
|
2018-04-01 18:58:27 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_MENU_NOCONN_BUTT, text, HELP_PLACE_NC_FLAG, KiBitmap( noconn_xpm ) );
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "&Junction" ), g_Schematic_Hotkeys_Descr,
|
2014-09-22 07:51:06 +00:00
|
|
|
HK_ADD_JUNCTION, IS_ACCELERATOR ); // add an accelerator, not a shortcut
|
2018-04-01 18:58:27 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_MENU_JUNCTION_BUTT, text,
|
2014-09-22 07:51:06 +00:00
|
|
|
HELP_PLACE_JUNCTION,
|
|
|
|
KiBitmap( add_junction_xpm ) );
|
|
|
|
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "&Label" ), g_Schematic_Hotkeys_Descr,
|
2011-09-23 20:00:30 +00:00
|
|
|
HK_ADD_LABEL, IS_ACCELERATOR ); // add an accelerator, not a shortcut
|
2018-04-01 18:58:27 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_MENU_LABEL_BUTT, text,
|
2011-10-18 19:59:19 +00:00
|
|
|
HELP_PLACE_NETLABEL,
|
|
|
|
KiBitmap( add_line_label_xpm ) );
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "Gl&obal Label" ), g_Schematic_Hotkeys_Descr,
|
2011-09-23 20:00:30 +00:00
|
|
|
HK_ADD_GLABEL, IS_ACCELERATOR ); // add an accelerator, not a shortcut
|
2018-04-01 18:58:27 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_MENU_GLABEL_BUTT, text,
|
2011-10-18 19:59:19 +00:00
|
|
|
HELP_PLACE_GLOBALLABEL,
|
|
|
|
KiBitmap( add_glabel_xpm ) );
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2016-11-20 11:57:16 +00:00
|
|
|
aParentMenu->AppendSeparator();
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "&Hierarchical Label" ), g_Schematic_Hotkeys_Descr,
|
2011-09-23 20:00:30 +00:00
|
|
|
HK_ADD_HLABEL, IS_ACCELERATOR ); // add an accelerator, not a shortcut
|
2018-04-01 18:58:27 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_MENU_HIERLABEL_BUTT,
|
2011-10-18 19:59:19 +00:00
|
|
|
text, HELP_PLACE_HIER_LABEL,
|
|
|
|
KiBitmap( add_hierarchical_label_xpm ) );
|
2011-04-12 12:41:13 +00:00
|
|
|
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "Hierar&chical Sheet" ), g_Schematic_Hotkeys_Descr,
|
2011-09-23 20:00:30 +00:00
|
|
|
HK_ADD_HIER_SHEET, IS_ACCELERATOR ); // add an accelerator, not a shortcut
|
2018-04-01 18:58:27 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_MENU_SHEET_SYMBOL_BUTT, text,
|
2011-10-18 19:59:19 +00:00
|
|
|
HELP_PLACE_SHEET,
|
|
|
|
KiBitmap( add_hierarchical_subsheet_xpm ) );
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2016-11-20 11:57:16 +00:00
|
|
|
AddMenuItem( aParentMenu,
|
2018-04-01 18:58:27 +00:00
|
|
|
ID_MENU_IMPORT_HLABEL_BUTT,
|
2011-10-18 19:59:19 +00:00
|
|
|
_( "I&mport Hierarchical Label" ),
|
|
|
|
HELP_IMPORT_SHEETPIN,
|
|
|
|
KiBitmap( import_hierarchical_label_xpm ) );
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2016-11-20 11:57:16 +00:00
|
|
|
AddMenuItem( aParentMenu,
|
2018-04-01 18:58:27 +00:00
|
|
|
ID_MENU_SHEET_PIN_BUTT,
|
2011-10-18 19:59:19 +00:00
|
|
|
_( "Hierarchical Pi&n to Sheet" ),
|
|
|
|
HELP_PLACE_SHEETPIN,
|
|
|
|
KiBitmap( add_hierar_pin_xpm ) );
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2016-11-20 11:57:16 +00:00
|
|
|
aParentMenu->AppendSeparator();
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "Graphic Pol&yline" ), g_Schematic_Hotkeys_Descr,
|
2011-09-23 20:00:30 +00:00
|
|
|
HK_ADD_GRAPHIC_POLYLINE, IS_ACCELERATOR ); // add an accelerator, not a shortcut
|
2018-04-01 18:58:27 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_MENU_LINE_COMMENT_BUTT, text,
|
2011-10-18 19:59:19 +00:00
|
|
|
HELP_PLACE_GRAPHICLINES,
|
|
|
|
KiBitmap( add_dashed_line_xpm ) );
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "&Graphic Text" ), g_Schematic_Hotkeys_Descr,
|
2011-09-23 20:00:30 +00:00
|
|
|
HK_ADD_GRAPHIC_TEXT, IS_ACCELERATOR ); // add an accelerator, not a shortcut
|
2018-04-01 18:58:27 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_MENU_TEXT_COMMENT_BUTT, text,
|
2011-10-18 19:59:19 +00:00
|
|
|
HELP_PLACE_GRAPHICTEXTS,
|
2017-06-02 09:51:11 +00:00
|
|
|
KiBitmap( text_xpm ) );
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2016-11-20 11:57:16 +00:00
|
|
|
// Add graphic image
|
2018-04-01 18:58:27 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_MENU_ADD_IMAGE_BUTT, _( "&Image" ),
|
2011-10-18 19:59:19 +00:00
|
|
|
HELP_PLACE_GRAPHICIMAGES,
|
|
|
|
KiBitmap( image_xpm ) );
|
2016-11-20 11:57:16 +00:00
|
|
|
}
|
2010-01-18 19:33:45 +00:00
|
|
|
|
|
|
|
|
2016-11-20 11:57:16 +00:00
|
|
|
void prepareFilesMenu( wxMenu* aParentMenu, bool aIsOutsideProject )
|
|
|
|
{
|
|
|
|
wxString text;
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2016-11-20 11:57:16 +00:00
|
|
|
// @todo: static probably not OK in multiple open projects.
|
|
|
|
// Open Recent submenu
|
|
|
|
static wxMenu* openRecentMenu;
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2016-11-20 11:57:16 +00:00
|
|
|
// Add this menu to list menu managed by m_fileHistory
|
|
|
|
// (the file history will be updated when adding/removing files in history
|
|
|
|
if( openRecentMenu )
|
|
|
|
Kiface().GetFileHistory().RemoveMenu( openRecentMenu );
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2016-11-20 11:57:16 +00:00
|
|
|
openRecentMenu = new wxMenu();
|
2016-01-16 02:06:41 +00:00
|
|
|
|
2016-11-20 11:57:16 +00:00
|
|
|
Kiface().GetFileHistory().UseMenu( openRecentMenu );
|
|
|
|
Kiface().GetFileHistory().AddFilesToMenu( openRecentMenu );
|
2016-01-16 02:06:41 +00:00
|
|
|
|
2018-02-22 19:05:10 +00:00
|
|
|
if( aIsOutsideProject ) // not when under a project mgr
|
2016-11-20 11:57:16 +00:00
|
|
|
{
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "&New..." ), g_Schematic_Hotkeys_Descr, HK_NEW );
|
2018-02-22 19:05:10 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_NEW_PROJECT, text,
|
2018-08-19 20:44:35 +00:00
|
|
|
_( "Start new schematic root sheet" ),
|
2018-02-22 19:05:10 +00:00
|
|
|
KiBitmap( new_document_xpm ) );
|
|
|
|
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "&Open..." ), g_Schematic_Hotkeys_Descr, HK_OPEN );
|
2018-02-22 19:05:10 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_LOAD_PROJECT, text,
|
|
|
|
_( "Open existing schematic" ),
|
|
|
|
KiBitmap( open_document_xpm ) );
|
|
|
|
|
2018-08-19 20:44:35 +00:00
|
|
|
AddMenuItem( aParentMenu, openRecentMenu, -1, _( "Open &Recent" ),
|
2018-01-16 11:19:22 +00:00
|
|
|
_( "Open recently opened schematic" ),
|
|
|
|
KiBitmap( recent_xpm ) );
|
2017-09-20 14:20:38 +00:00
|
|
|
|
2018-02-22 19:05:10 +00:00
|
|
|
aParentMenu->AppendSeparator();
|
|
|
|
}
|
2016-01-16 02:06:41 +00:00
|
|
|
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "&Save" ), g_Schematic_Hotkeys_Descr, HK_SAVE );
|
2018-08-19 20:44:35 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_SAVE_PROJECT, text,
|
|
|
|
_( "Save changes" ),
|
2018-01-16 11:19:22 +00:00
|
|
|
KiBitmap( save_xpm ) );
|
2016-01-16 02:06:41 +00:00
|
|
|
|
2018-08-19 20:44:35 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_UPDATE_ONE_SHEET, _( "Save &Current Sheet" ),
|
|
|
|
_( "Save only the current sheet" ),
|
2016-11-20 11:57:16 +00:00
|
|
|
KiBitmap( save_xpm ) );
|
|
|
|
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "Save C&urrent Sheet As..." ), g_Schematic_Hotkeys_Descr, HK_SAVEAS );
|
2018-08-19 20:44:35 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_SAVE_ONE_SHEET_UNDER_NEW_NAME, text,
|
|
|
|
_( "Save a copy of the current sheet" ),
|
|
|
|
KiBitmap( save_as_xpm ) );
|
2016-11-20 11:57:16 +00:00
|
|
|
|
|
|
|
aParentMenu->AppendSeparator();
|
|
|
|
|
2018-08-19 20:44:35 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_APPEND_PROJECT, _( "App&end Schematic Sheet Content..." ),
|
|
|
|
_( "Append schematic sheet content from another project to the current sheet" ),
|
2018-02-22 19:05:10 +00:00
|
|
|
KiBitmap( add_document_xpm ) );
|
|
|
|
|
2018-08-19 20:44:35 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_IMPORT_NON_KICAD_SCH, _( "&Import Non KiCad Schematic..." ),
|
|
|
|
_( "Replace current schematic sheet with one imported from another application" ),
|
2018-02-22 19:05:10 +00:00
|
|
|
KiBitmap( import_document_xpm ) ); // TODO needs a different icon
|
|
|
|
|
|
|
|
aParentMenu->AppendSeparator();
|
|
|
|
|
|
|
|
// Import submenu
|
|
|
|
wxMenu* submenuImport = new wxMenu();
|
|
|
|
|
2018-08-19 20:44:35 +00:00
|
|
|
AddMenuItem( submenuImport, ID_BACKANNO_ITEMS, _( "&Footprint Association File..." ),
|
2018-02-22 19:05:10 +00:00
|
|
|
HELP_IMPORT_FOOTPRINTS,
|
|
|
|
KiBitmap( import_footprint_names_xpm ) );
|
|
|
|
|
2018-08-19 20:44:35 +00:00
|
|
|
AddMenuItem( aParentMenu, submenuImport, ID_GEN_IMPORT_FILE, _( "&Import" ),
|
2018-02-22 19:05:10 +00:00
|
|
|
_( "Import files" ),
|
|
|
|
KiBitmap( import_xpm ) );
|
|
|
|
|
|
|
|
|
|
|
|
// Export submenu
|
|
|
|
wxMenu* submenuExport = new wxMenu();
|
|
|
|
|
2018-08-19 20:44:35 +00:00
|
|
|
AddMenuItem( submenuExport, ID_GEN_COPY_SHEET_TO_CLIPBOARD, _( "Drawing to C&lipboard" ),
|
2018-02-22 19:05:10 +00:00
|
|
|
_( "Export drawings to clipboard" ),
|
|
|
|
KiBitmap( copy_xpm ) );
|
|
|
|
|
2019-03-07 13:59:32 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_GET_NETLIST, _( "Export &Netlist..." ),
|
|
|
|
_( "Export netlist file" ),
|
|
|
|
KiBitmap( netlist_xpm ) );
|
|
|
|
|
2018-08-19 20:44:35 +00:00
|
|
|
AddMenuItem( aParentMenu, submenuExport, ID_GEN_EXPORT_FILE, _( "E&xport" ),
|
2018-02-22 19:05:10 +00:00
|
|
|
_( "Export files" ),
|
|
|
|
KiBitmap( export_xpm ) );
|
|
|
|
|
|
|
|
aParentMenu->AppendSeparator();
|
|
|
|
|
2017-01-04 20:24:45 +00:00
|
|
|
// Edit page layout:
|
2018-08-19 20:44:35 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_SHEET_SET, _( "Page S&ettings..." ),
|
2017-01-04 20:24:45 +00:00
|
|
|
_( "Settings for sheet size and frame references" ),
|
|
|
|
KiBitmap( sheetset_xpm ) );
|
|
|
|
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "&Print..." ), g_Schematic_Hotkeys_Descr, HK_PRINT );
|
2018-02-22 19:05:10 +00:00
|
|
|
AddMenuItem( aParentMenu, wxID_PRINT, text,
|
2016-11-20 11:57:16 +00:00
|
|
|
_( "Print schematic sheet" ),
|
|
|
|
KiBitmap( print_button_xpm ) );
|
|
|
|
|
2018-02-22 19:05:10 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_GEN_PLOT_SCHEMATIC, _( "P&lot..." ),
|
2016-11-20 11:57:16 +00:00
|
|
|
_( "Plot schematic sheet in PostScript, PDF, SVG, DXF or HPGL format" ),
|
|
|
|
KiBitmap( plot_xpm ) );
|
|
|
|
|
2018-02-22 19:05:10 +00:00
|
|
|
aParentMenu->AppendSeparator();
|
2016-11-20 11:57:16 +00:00
|
|
|
|
|
|
|
// Quit
|
2018-08-19 20:44:35 +00:00
|
|
|
AddMenuItem( aParentMenu, wxID_EXIT, _( "&Exit" ),
|
|
|
|
_( "Close Eeschema" ),
|
2016-11-20 11:57:16 +00:00
|
|
|
KiBitmap( exit_xpm ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void prepareEditMenu( wxMenu* aParentMenu )
|
|
|
|
{
|
|
|
|
wxString text;
|
|
|
|
|
|
|
|
// Undo
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "&Undo" ), g_Schematic_Hotkeys_Descr, HK_UNDO );
|
2016-11-20 11:57:16 +00:00
|
|
|
|
|
|
|
AddMenuItem( aParentMenu, wxID_UNDO, text, HELP_UNDO, KiBitmap( undo_xpm ) );
|
|
|
|
|
|
|
|
// Redo
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "&Redo" ), g_Schematic_Hotkeys_Descr, HK_REDO );
|
2016-11-20 11:57:16 +00:00
|
|
|
|
|
|
|
AddMenuItem( aParentMenu, wxID_REDO, text, HELP_REDO, KiBitmap( redo_xpm ) );
|
|
|
|
|
|
|
|
aParentMenu->AppendSeparator();
|
2018-02-22 19:05:10 +00:00
|
|
|
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "&Cut" ), g_Schematic_Hotkeys_Descr, HK_EDIT_CUT );
|
2018-02-22 19:05:10 +00:00
|
|
|
AddMenuItem( aParentMenu, wxID_CUT, text,
|
|
|
|
_( "Cuts the selected item(s) to the Clipboard" ),
|
|
|
|
KiBitmap( cut_xpm ) );
|
|
|
|
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "&Copy" ), g_Schematic_Hotkeys_Descr, HK_EDIT_COPY );
|
2018-02-22 19:05:10 +00:00
|
|
|
AddMenuItem( aParentMenu, wxID_COPY, text,
|
|
|
|
_( "Copies the selected item(s) to the Clipboard" ),
|
|
|
|
KiBitmap( copy_xpm ) );
|
|
|
|
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "&Paste" ), g_Schematic_Hotkeys_Descr, HK_EDIT_PASTE );
|
2018-02-22 19:05:10 +00:00
|
|
|
AddMenuItem( aParentMenu, wxID_PASTE, text,
|
|
|
|
_( "Pastes item(s) from the Clipboard" ),
|
|
|
|
KiBitmap( paste_xpm ) );
|
|
|
|
|
|
|
|
// Delete
|
2018-04-01 19:09:52 +00:00
|
|
|
aParentMenu->AppendSeparator();
|
2018-04-01 18:58:27 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_MENU_DELETE_ITEM_BUTT,
|
2016-11-20 11:57:16 +00:00
|
|
|
_( "&Delete" ), HELP_DELETE_ITEMS,
|
|
|
|
KiBitmap( delete_xpm ) );
|
|
|
|
|
|
|
|
// Find
|
|
|
|
aParentMenu->AppendSeparator();
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "&Find..." ), g_Schematic_Hotkeys_Descr, HK_FIND_ITEM );
|
2016-11-20 11:57:16 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_FIND_ITEMS, text, HELP_FIND, KiBitmap( find_xpm ) );
|
|
|
|
|
|
|
|
// Find/Replace
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "Find and Re&place..." ), g_Schematic_Hotkeys_Descr,
|
2016-11-20 11:57:16 +00:00
|
|
|
HK_FIND_REPLACE );
|
|
|
|
AddMenuItem( aParentMenu, wxID_REPLACE, text, HELP_REPLACE,
|
|
|
|
KiBitmap( find_replace_xpm ) );
|
|
|
|
|
|
|
|
aParentMenu->AppendSeparator();
|
2017-08-25 13:27:06 +00:00
|
|
|
|
|
|
|
// Update field values
|
|
|
|
AddMenuItem( aParentMenu, ID_UPDATE_FIELDS,
|
2018-06-26 17:50:58 +00:00
|
|
|
_( "Update Fields from Library..." ),
|
2017-12-24 15:04:02 +00:00
|
|
|
_( "Sets symbol fields to original library values" ),
|
2017-08-25 13:27:06 +00:00
|
|
|
KiBitmap( update_fields_xpm ) );
|
2018-02-22 19:05:10 +00:00
|
|
|
}
|
2017-11-20 16:14:25 +00:00
|
|
|
|
2018-02-22 19:05:10 +00:00
|
|
|
|
|
|
|
void prepareInspectMenu( wxMenu* aParentMenu )
|
|
|
|
{
|
|
|
|
AddMenuItem( aParentMenu, ID_GET_ERC,
|
|
|
|
_( "Electrical Rules &Checker" ),
|
|
|
|
_( "Perform electrical rules check" ),
|
|
|
|
KiBitmap( erc_xpm ) );
|
2016-11-20 11:57:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void prepareToolsMenu( wxMenu* aParentMenu )
|
|
|
|
{
|
|
|
|
wxString text;
|
2011-07-02 12:48:45 +00:00
|
|
|
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "Update PCB from Schematic..." ), g_Schematic_Hotkeys_Descr,
|
2017-12-24 15:04:02 +00:00
|
|
|
HK_UPDATE_PCB_FROM_SCH );
|
2016-01-29 10:24:39 +00:00
|
|
|
|
2016-11-20 11:57:16 +00:00
|
|
|
AddMenuItem( aParentMenu,
|
2016-01-29 10:24:39 +00:00
|
|
|
ID_UPDATE_PCB_FROM_SCH,
|
2019-03-07 13:59:32 +00:00
|
|
|
text, _( "Update PCB design with current schematic." ),
|
2018-07-25 22:44:57 +00:00
|
|
|
KiBitmap( update_pcb_from_sch_xpm ) );
|
2016-01-29 10:24:39 +00:00
|
|
|
|
2016-01-29 14:43:40 +00:00
|
|
|
// Run Pcbnew
|
2018-05-14 17:34:18 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_RUN_PCB, _( "&Open PCB Editor" ),
|
2016-01-29 14:43:40 +00:00
|
|
|
_( "Run Pcbnew" ),
|
|
|
|
KiBitmap( pcbnew_xpm ) );
|
2016-01-29 10:24:39 +00:00
|
|
|
|
2016-11-20 11:57:16 +00:00
|
|
|
aParentMenu->AppendSeparator();
|
2016-01-29 10:24:39 +00:00
|
|
|
|
2018-05-14 17:34:18 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_RUN_LIBRARY, _( "Symbol Library &Editor" ),
|
|
|
|
HELP_RUN_LIB_EDITOR,
|
2011-10-18 19:59:19 +00:00
|
|
|
KiBitmap( libedit_xpm ) );
|
2011-07-02 12:48:45 +00:00
|
|
|
|
2018-05-14 17:34:18 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_RESCUE_CACHED, _( "&Rescue Symbols..." ),
|
2017-10-22 00:48:25 +00:00
|
|
|
_( "Find old symbols in project and rename/rescue them" ),
|
|
|
|
KiBitmap( rescue_xpm ) );
|
|
|
|
|
2019-04-02 12:31:28 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_REMAP_SYMBOLS, _( "Remap S&ymbols..." ),
|
2017-10-22 00:48:25 +00:00
|
|
|
_( "Remap legacy library symbols to symbol library table" ),
|
2017-06-02 09:51:11 +00:00
|
|
|
KiBitmap( rescue_xpm ) );
|
2015-04-25 22:26:51 +00:00
|
|
|
|
2016-11-20 11:57:16 +00:00
|
|
|
aParentMenu->AppendSeparator();
|
2011-07-02 12:48:45 +00:00
|
|
|
|
2018-05-14 17:34:18 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_OPEN_CMP_TABLE, _( "Edit Symbol Field&s..." ),
|
2018-02-22 19:05:10 +00:00
|
|
|
KiBitmap( spreadsheet_xpm ) );
|
2018-03-16 12:38:36 +00:00
|
|
|
|
2018-05-14 17:34:18 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_EDIT_COMPONENTS_TO_SYMBOLS_LIB_ID,
|
2019-04-02 12:31:28 +00:00
|
|
|
_( "Edit Symbol &Library References..." ),
|
2018-04-20 14:31:45 +00:00
|
|
|
_( "Edit links between schematic symbols and library symbols" ),
|
|
|
|
KiBitmap( edit_cmp_symb_links_xpm ) );
|
|
|
|
|
|
|
|
aParentMenu->AppendSeparator();
|
|
|
|
|
2018-05-14 17:34:18 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_GET_ANNOTATE, _( "&Annotate Schematic..." ),
|
|
|
|
HELP_ANNOTATE,
|
2011-10-18 19:59:19 +00:00
|
|
|
KiBitmap( annotate_xpm ) );
|
2011-07-02 12:48:45 +00:00
|
|
|
|
2019-03-07 13:59:32 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_BUS_MANAGER, _( "Bus &Definitions..." ),
|
2019-03-11 21:32:05 +00:00
|
|
|
HELP_BUS_MANAGER,
|
2019-04-02 12:31:28 +00:00
|
|
|
KiBitmap( bus_definition_tool_xpm ) );
|
2019-03-11 21:32:05 +00:00
|
|
|
|
2016-11-20 11:57:16 +00:00
|
|
|
aParentMenu->AppendSeparator();
|
2011-08-29 20:45:22 +00:00
|
|
|
|
2015-09-08 18:45:11 +00:00
|
|
|
// Run CvPcb
|
2018-05-14 17:34:18 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_RUN_CVPCB, _( "A&ssign Footprints..." ),
|
2018-04-04 18:22:28 +00:00
|
|
|
_( "Assign PCB footprints to schematic symbols" ),
|
2015-09-08 18:45:11 +00:00
|
|
|
KiBitmap( cvpcb_xpm ) );
|
2011-09-01 12:54:34 +00:00
|
|
|
|
2019-03-07 13:59:32 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_GET_TOOLS, _( "Generate Bill of &Materials..." ),
|
|
|
|
HELP_GENERATE_BOM,
|
|
|
|
KiBitmap( bom_xpm ) );
|
|
|
|
|
2016-11-20 11:57:16 +00:00
|
|
|
aParentMenu->AppendSeparator();
|
2016-08-11 12:41:16 +00:00
|
|
|
|
2016-08-11 12:42:13 +00:00
|
|
|
#ifdef KICAD_SPICE
|
2016-08-11 12:41:16 +00:00
|
|
|
// Simulator
|
2018-05-14 17:34:18 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_SIM_SHOW, _("Simula&tor"),
|
|
|
|
_( "Simulate circuit" ),
|
2016-08-29 09:39:54 +00:00
|
|
|
KiBitmap( simulator_xpm ) );
|
2016-08-11 12:42:13 +00:00
|
|
|
#endif /* KICAD_SPICE */
|
2016-08-11 12:41:16 +00:00
|
|
|
|
2016-11-20 11:57:16 +00:00
|
|
|
}
|
2010-08-24 17:26:51 +00:00
|
|
|
|
2016-11-20 11:57:16 +00:00
|
|
|
|
|
|
|
void prepareHelpMenu( wxMenu* aParentMenu )
|
|
|
|
{
|
2018-05-14 17:34:18 +00:00
|
|
|
AddMenuItem( aParentMenu, wxID_HELP, _( "Eeschema &Manual" ),
|
2015-09-23 18:29:21 +00:00
|
|
|
_( "Open Eeschema Manual" ),
|
2011-10-18 19:59:19 +00:00
|
|
|
KiBitmap( online_help_xpm ) );
|
|
|
|
|
2018-05-14 17:34:18 +00:00
|
|
|
AddMenuItem( aParentMenu, wxID_INDEX, _( "&Getting Started in KiCad" ),
|
2014-02-21 07:54:13 +00:00
|
|
|
_( "Open \"Getting Started in KiCad\" guide for beginners" ),
|
2011-10-18 19:59:19 +00:00
|
|
|
KiBitmap( help_xpm ) );
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2019-04-01 17:14:16 +00:00
|
|
|
wxString text = AddHotkeyName( _( "&List Hotkeys..." ), g_Eeschema_Hotkeys_Descr, HK_HELP );
|
2018-05-14 17:34:18 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST, text,
|
2018-03-08 05:34:02 +00:00
|
|
|
_( "Displays current hotkeys table and corresponding commands" ),
|
2016-06-12 01:22:13 +00:00
|
|
|
KiBitmap( hotkeys_xpm ) );
|
|
|
|
|
2016-11-20 11:57:16 +00:00
|
|
|
aParentMenu->AppendSeparator();
|
2018-05-14 17:34:18 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_HELP_GET_INVOLVED, _( "Get &Involved" ),
|
2018-03-08 05:16:54 +00:00
|
|
|
_( "Contribute to KiCad (opens a web browser)" ),
|
2016-09-24 00:44:52 +00:00
|
|
|
KiBitmap( info_xpm ) );
|
|
|
|
|
2016-11-20 11:57:16 +00:00
|
|
|
aParentMenu->AppendSeparator();
|
2018-05-14 17:34:18 +00:00
|
|
|
AddMenuItem( aParentMenu, wxID_ABOUT, _( "&About KiCad" ), KiBitmap( about_xpm ) );
|
2016-11-20 11:57:16 +00:00
|
|
|
}
|
2009-01-17 20:31:19 +00:00
|
|
|
|
|
|
|
|
2017-03-03 13:18:07 +00:00
|
|
|
static void preparePreferencesMenu( SCH_EDIT_FRAME* aFrame, wxMenu* aParentMenu )
|
2017-02-07 21:16:26 +00:00
|
|
|
{
|
2017-12-24 23:22:46 +00:00
|
|
|
// Path configuration edit dialog.
|
2018-05-14 17:34:18 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_PREFERENCES_CONFIGURE_PATHS, _( "Configure Pa&ths..." ),
|
2017-12-24 23:22:46 +00:00
|
|
|
_( "Edit path configuration environment variables" ),
|
|
|
|
KiBitmap( path_xpm ) );
|
|
|
|
|
2018-04-20 14:31:45 +00:00
|
|
|
// Library
|
2018-05-14 17:34:18 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_EDIT_SYM_LIB_TABLE, _( "Manage Symbol Libraries..." ),
|
2018-04-20 14:31:45 +00:00
|
|
|
_( "Edit the global and project symbol library lists" ),
|
|
|
|
KiBitmap( library_table_xpm ) );
|
|
|
|
|
2017-02-07 21:16:26 +00:00
|
|
|
// Options (Preferences on WXMAC)
|
2019-04-01 17:18:29 +00:00
|
|
|
wxString text = AddHotkeyName( _( "&Preferences..." ), g_Eeschema_Hotkeys_Descr, HK_PREFERENCES );
|
|
|
|
AddMenuItem( aParentMenu, wxID_PREFERENCES, text,
|
2018-05-14 17:34:18 +00:00
|
|
|
_( "Show preferences for all open tools" ),
|
2017-02-07 21:16:26 +00:00
|
|
|
KiBitmap( preference_xpm ) );
|
2017-03-02 13:46:18 +00:00
|
|
|
|
|
|
|
aParentMenu->AppendSeparator();
|
2018-02-22 19:05:10 +00:00
|
|
|
|
|
|
|
// Language submenu
|
|
|
|
Pgm().AddMenuLanguageList( aParentMenu );
|
|
|
|
|
|
|
|
aParentMenu->AppendSeparator();
|
|
|
|
|
2019-04-01 17:18:29 +00:00
|
|
|
text = AddHotkeyName( _( "Modern Toolset (&Accelerated)" ), g_Eeschema_Hotkeys_Descr,
|
2018-09-10 13:37:28 +00:00
|
|
|
HK_CANVAS_OPENGL );
|
|
|
|
AddMenuItem( aParentMenu, ID_MENU_CANVAS_OPENGL, text,
|
|
|
|
_( "Use Modern Toolset with hardware-accelerated graphics (recommended)" ),
|
|
|
|
KiBitmap( tools_xpm ), wxITEM_RADIO );
|
|
|
|
|
2019-04-01 17:14:16 +00:00
|
|
|
text = AddHotkeyName( _( "Modern Toolset (Fallba&ck)" ), g_Eeschema_Hotkeys_Descr,
|
2018-09-10 13:37:28 +00:00
|
|
|
HK_CANVAS_CAIRO );
|
|
|
|
AddMenuItem( aParentMenu, ID_MENU_CANVAS_CAIRO, text,
|
|
|
|
_( "Use Modern Toolset with software graphics (fall-back)" ),
|
|
|
|
KiBitmap( tools_xpm ), wxITEM_RADIO );
|
|
|
|
|
|
|
|
aParentMenu->AppendSeparator();
|
|
|
|
|
2018-02-22 19:05:10 +00:00
|
|
|
// Import/export
|
2018-05-14 17:34:18 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_CONFIG_SAVE, _( "&Save Project File..." ),
|
2018-03-21 02:20:51 +00:00
|
|
|
_( "Save project preferences into a project file" ),
|
2017-02-07 21:16:26 +00:00
|
|
|
KiBitmap( save_setup_xpm ) );
|
2018-02-09 16:28:33 +00:00
|
|
|
|
2018-05-14 17:34:18 +00:00
|
|
|
AddMenuItem( aParentMenu, ID_CONFIG_READ, _( "Load P&roject File..." ),
|
2018-03-24 08:56:30 +00:00
|
|
|
_( "Load project preferences from a project file" ),
|
2018-02-09 16:28:33 +00:00
|
|
|
KiBitmap( import_setup_xpm ) );
|
2017-02-07 21:16:26 +00:00
|
|
|
}
|