2011-10-18 15:59:19 -04:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
2017-11-20 17:14:25 +01:00
|
|
|
* Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
2017-08-31 11:15:20 -04:00
|
|
|
* Copyright (C) 2009 Wayne Stambaugh <stambaughw@verizon.net>
|
2019-06-09 14:12:44 +01:00
|
|
|
* Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.txt for contributors.
|
2011-10-18 15:59:19 -04: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
|
|
|
|
*/
|
|
|
|
|
2016-02-24 16:36:52 -05:00
|
|
|
#include <bitmaps.h>
|
2015-03-02 18:29:18 +01:00
|
|
|
#include <hotkeys_basic.h>
|
2016-02-24 16:36:52 -05:00
|
|
|
#include <menus_helpers.h>
|
2019-06-09 14:12:44 +01:00
|
|
|
#include <tool/tool_manager.h>
|
|
|
|
#include <tools/kicad_manager_control.h>
|
|
|
|
#include <tools/kicad_manager_actions.h>
|
2019-06-09 11:10:19 +01:00
|
|
|
#include "kicad_manager_frame.h"
|
2016-02-24 16:36:52 -05:00
|
|
|
#include "pgm_kicad.h"
|
2019-05-25 21:39:42 +02:00
|
|
|
#include "kicad_id.h"
|
2016-02-24 16:36:52 -05:00
|
|
|
|
2011-09-01 08:54:34 -04:00
|
|
|
|
Modular-Kicad milestone B), major portions:
*) Rework the set language support, simplify it by using KIWAY. Now any major
frame with a "change language" menu can change the language for all KIWAY_PLAYERs
in the whole KIWAY. Multiple KIWAYs are not supported yet.
*) Simplify "modal wxFrame" support, and add that support exclusively to
KIWAY_PLAYER where it is inherited by all derivatives. The function
KIWAY_PLAYER::ShowModal() is in the vtable and so is cross module capable.
*) Remove the requirements and assumptions that the wxFrame hierarchy always
had PCB_EDIT_FRAME and SCH_EDIT_FRAME as immediate parents of their viewers
and editors. This is no longer the case, nor required.
*) Use KIWAY::Player() everywhere to make KIWAY_PLAYERs, this registers the
KIWAY_PLAYER within the KIWAY and makes it very easy to find an open frame
quickly. It also gives control to the KIWAY as to frame hierarchical
relationships.
*) Change single_top to use the KIWAY for loading a KIFACE and instantiating
the single KIWAY_PLAYER, see bullet immediately above.
*) Add KIWAY::OnKiwayEnd() and call it from PGM_BASE at program termination, this
gives the KIFACEs a chance to save their final configuration dope to disk.
*) Add dedicated FRAME_T's for the modal frames, so m_Ident can be tested and
these modal frames are distinctly different than their non-modal equivalents.
KIWAY_PLAYER::IsModal() is !not! a valid test during the wxFrame's constructor,
so this is another important reason for having a dedicated FRAME_T for each
modal wxFrame.
On balance, more lines were deleted than were added to achieve all this.
2014-05-03 12:40:19 -05:00
|
|
|
// Menubar and toolbar event table
|
2011-04-17 15:54:17 +02:00
|
|
|
BEGIN_EVENT_TABLE( KICAD_MANAGER_FRAME, EDA_BASE_FRAME )
|
Modular-Kicad milestone B), major portions:
*) Rework the set language support, simplify it by using KIWAY. Now any major
frame with a "change language" menu can change the language for all KIWAY_PLAYERs
in the whole KIWAY. Multiple KIWAYs are not supported yet.
*) Simplify "modal wxFrame" support, and add that support exclusively to
KIWAY_PLAYER where it is inherited by all derivatives. The function
KIWAY_PLAYER::ShowModal() is in the vtable and so is cross module capable.
*) Remove the requirements and assumptions that the wxFrame hierarchy always
had PCB_EDIT_FRAME and SCH_EDIT_FRAME as immediate parents of their viewers
and editors. This is no longer the case, nor required.
*) Use KIWAY::Player() everywhere to make KIWAY_PLAYERs, this registers the
KIWAY_PLAYER within the KIWAY and makes it very easy to find an open frame
quickly. It also gives control to the KIWAY as to frame hierarchical
relationships.
*) Change single_top to use the KIWAY for loading a KIFACE and instantiating
the single KIWAY_PLAYER, see bullet immediately above.
*) Add KIWAY::OnKiwayEnd() and call it from PGM_BASE at program termination, this
gives the KIFACEs a chance to save their final configuration dope to disk.
*) Add dedicated FRAME_T's for the modal frames, so m_Ident can be tested and
these modal frames are distinctly different than their non-modal equivalents.
KIWAY_PLAYER::IsModal() is !not! a valid test during the wxFrame's constructor,
so this is another important reason for having a dedicated FRAME_T for each
modal wxFrame.
On balance, more lines were deleted than were added to achieve all this.
2014-05-03 12:40:19 -05:00
|
|
|
// Window events
|
2011-04-17 15:54:17 +02:00
|
|
|
EVT_SIZE( KICAD_MANAGER_FRAME::OnSize )
|
|
|
|
EVT_CLOSE( KICAD_MANAGER_FRAME::OnCloseWindow )
|
2011-04-13 15:30:27 -04:00
|
|
|
|
Modular-Kicad milestone B), major portions:
*) Rework the set language support, simplify it by using KIWAY. Now any major
frame with a "change language" menu can change the language for all KIWAY_PLAYERs
in the whole KIWAY. Multiple KIWAYs are not supported yet.
*) Simplify "modal wxFrame" support, and add that support exclusively to
KIWAY_PLAYER where it is inherited by all derivatives. The function
KIWAY_PLAYER::ShowModal() is in the vtable and so is cross module capable.
*) Remove the requirements and assumptions that the wxFrame hierarchy always
had PCB_EDIT_FRAME and SCH_EDIT_FRAME as immediate parents of their viewers
and editors. This is no longer the case, nor required.
*) Use KIWAY::Player() everywhere to make KIWAY_PLAYERs, this registers the
KIWAY_PLAYER within the KIWAY and makes it very easy to find an open frame
quickly. It also gives control to the KIWAY as to frame hierarchical
relationships.
*) Change single_top to use the KIWAY for loading a KIFACE and instantiating
the single KIWAY_PLAYER, see bullet immediately above.
*) Add KIWAY::OnKiwayEnd() and call it from PGM_BASE at program termination, this
gives the KIFACEs a chance to save their final configuration dope to disk.
*) Add dedicated FRAME_T's for the modal frames, so m_Ident can be tested and
these modal frames are distinctly different than their non-modal equivalents.
KIWAY_PLAYER::IsModal() is !not! a valid test during the wxFrame's constructor,
so this is another important reason for having a dedicated FRAME_T for each
modal wxFrame.
On balance, more lines were deleted than were added to achieve all this.
2014-05-03 12:40:19 -05:00
|
|
|
// Menu events
|
2011-04-17 15:54:17 +02:00
|
|
|
EVT_MENU( wxID_EXIT, KICAD_MANAGER_FRAME::OnExit )
|
Modular KiCad Blueprint Milestone B), major portions:
*) When kicad.exe closes a project, close any open KIFACEs so that they cannot
get disassociated from their true PROJECT.
*) Allow loading eeschema library editor from kicad.exe
*) Allow loading pcbnew library editor from kicad.exe
*) Rename LIB_COMPONENT to LIB_PART.
*) Add class PART_LIBS, and PART_LIB.
*) Make PART_LIBS non-global, i.e. PROJECT specific.
*) Implement "data on demand" for PART_LIBS
*) Implement "data on demand" for schematic SEARCH_STACK.
*) Use RSTRINGs to retain eeschema editor's notion of last library and part being edited.
*) Get rid of library search on every SCH_COMPONENT::Draw() call, instead use
a weak pointer.
*) Remove all chdir() calls so projects don't need to be CWD.
*) Romove APPEND support from OpenProjectFiles().
*) Make OpenProjectFiles() robust, even for creating new projects.
*) Load EESCHEMA colors in the KIWAY::OnKiwayStart() rather in window open,
and save them in the .eeschema config file, not in the project file.
*) Fix bug with wxDir() while accessing protected dirs in kicad.exe
*) Consolidate template copying into PROJECT class, not in kicad.exe source.
*) Generally untangle eeschema, making its libraries not global but rather
held in the PROJECT.
2014-08-13 15:28:54 -05:00
|
|
|
EVT_MENU( ID_TO_TEXT_EDITOR, KICAD_MANAGER_FRAME::OnOpenTextEditor )
|
2011-04-17 15:54:17 +02:00
|
|
|
EVT_MENU( ID_BROWSE_AN_SELECT_FILE, KICAD_MANAGER_FRAME::OnOpenFileInTextEditor )
|
2018-06-11 12:10:00 +02:00
|
|
|
EVT_MENU( ID_BROWSE_IN_FILE_EXPLORER, KICAD_MANAGER_FRAME::OnBrowseInFileExplorer )
|
2015-03-29 17:22:53 -04:00
|
|
|
EVT_MENU( ID_PREFERENCES_CONFIGURE_PATHS, KICAD_MANAGER_FRAME::OnConfigurePaths )
|
2018-07-19 20:15:40 +01:00
|
|
|
EVT_MENU( ID_EDIT_SYMBOL_LIBRARY_TABLE, KICAD_MANAGER_FRAME::OnEditSymLibTable )
|
|
|
|
EVT_MENU( ID_EDIT_FOOTPRINT_LIBRARY_TABLE, KICAD_MANAGER_FRAME::OnEditFpLibTable )
|
2018-05-14 18:34:18 +01:00
|
|
|
EVT_MENU( wxID_PREFERENCES, KICAD_MANAGER_FRAME::OnPreferences )
|
2011-04-17 15:54:17 +02:00
|
|
|
EVT_MENU( ID_SAVE_AND_ZIP_FILES, KICAD_MANAGER_FRAME::OnArchiveFiles )
|
|
|
|
EVT_MENU( ID_READ_ZIP_ARCHIVE, KICAD_MANAGER_FRAME::OnUnarchiveFiles )
|
2017-08-25 01:56:15 +10:00
|
|
|
EVT_MENU( ID_IMPORT_EAGLE_PROJECT, KICAD_MANAGER_FRAME::OnImportEagleFiles )
|
2011-04-13 15:30:27 -04:00
|
|
|
|
Modular-Kicad milestone B), major portions:
*) Rework the set language support, simplify it by using KIWAY. Now any major
frame with a "change language" menu can change the language for all KIWAY_PLAYERs
in the whole KIWAY. Multiple KIWAYs are not supported yet.
*) Simplify "modal wxFrame" support, and add that support exclusively to
KIWAY_PLAYER where it is inherited by all derivatives. The function
KIWAY_PLAYER::ShowModal() is in the vtable and so is cross module capable.
*) Remove the requirements and assumptions that the wxFrame hierarchy always
had PCB_EDIT_FRAME and SCH_EDIT_FRAME as immediate parents of their viewers
and editors. This is no longer the case, nor required.
*) Use KIWAY::Player() everywhere to make KIWAY_PLAYERs, this registers the
KIWAY_PLAYER within the KIWAY and makes it very easy to find an open frame
quickly. It also gives control to the KIWAY as to frame hierarchical
relationships.
*) Change single_top to use the KIWAY for loading a KIFACE and instantiating
the single KIWAY_PLAYER, see bullet immediately above.
*) Add KIWAY::OnKiwayEnd() and call it from PGM_BASE at program termination, this
gives the KIFACEs a chance to save their final configuration dope to disk.
*) Add dedicated FRAME_T's for the modal frames, so m_Ident can be tested and
these modal frames are distinctly different than their non-modal equivalents.
KIWAY_PLAYER::IsModal() is !not! a valid test during the wxFrame's constructor,
so this is another important reason for having a dedicated FRAME_T for each
modal wxFrame.
On balance, more lines were deleted than were added to achieve all this.
2014-05-03 12:40:19 -05:00
|
|
|
// Range menu events
|
2017-08-31 11:15:20 -04:00
|
|
|
EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END,
|
|
|
|
KICAD_MANAGER_FRAME::language_change )
|
Modular-Kicad milestone B), major portions:
*) Rework the set language support, simplify it by using KIWAY. Now any major
frame with a "change language" menu can change the language for all KIWAY_PLAYERs
in the whole KIWAY. Multiple KIWAYs are not supported yet.
*) Simplify "modal wxFrame" support, and add that support exclusively to
KIWAY_PLAYER where it is inherited by all derivatives. The function
KIWAY_PLAYER::ShowModal() is in the vtable and so is cross module capable.
*) Remove the requirements and assumptions that the wxFrame hierarchy always
had PCB_EDIT_FRAME and SCH_EDIT_FRAME as immediate parents of their viewers
and editors. This is no longer the case, nor required.
*) Use KIWAY::Player() everywhere to make KIWAY_PLAYERs, this registers the
KIWAY_PLAYER within the KIWAY and makes it very easy to find an open frame
quickly. It also gives control to the KIWAY as to frame hierarchical
relationships.
*) Change single_top to use the KIWAY for loading a KIFACE and instantiating
the single KIWAY_PLAYER, see bullet immediately above.
*) Add KIWAY::OnKiwayEnd() and call it from PGM_BASE at program termination, this
gives the KIFACEs a chance to save their final configuration dope to disk.
*) Add dedicated FRAME_T's for the modal frames, so m_Ident can be tested and
these modal frames are distinctly different than their non-modal equivalents.
KIWAY_PLAYER::IsModal() is !not! a valid test during the wxFrame's constructor,
so this is another important reason for having a dedicated FRAME_T for each
modal wxFrame.
On balance, more lines were deleted than were added to achieve all this.
2014-05-03 12:40:19 -05:00
|
|
|
|
2018-08-20 14:46:38 +01:00
|
|
|
EVT_MENU_RANGE( ID_FILE1, ID_FILEMAX, KICAD_MANAGER_FRAME::OnFileHistory )
|
2011-04-13 15:30:27 -04:00
|
|
|
|
2018-05-14 18:34:18 +01:00
|
|
|
// Show hotkeys
|
2018-07-19 20:15:40 +01:00
|
|
|
EVT_MENU( ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST, KICAD_MANAGER_FRAME::OnShowHotkeys )
|
2015-03-02 18:29:18 +01:00
|
|
|
|
|
|
|
|
2013-01-01 15:06:49 +01:00
|
|
|
// Special functions
|
|
|
|
EVT_MENU( ID_INIT_WATCHED_PATHS, KICAD_MANAGER_FRAME::OnChangeWatchedPaths )
|
|
|
|
|
2015-03-02 18:29:18 +01:00
|
|
|
// Button events (in command frame), and menu events equivalent to buttons
|
Modular KiCad Blueprint Milestone B), major portions:
*) When kicad.exe closes a project, close any open KIFACEs so that they cannot
get disassociated from their true PROJECT.
*) Allow loading eeschema library editor from kicad.exe
*) Allow loading pcbnew library editor from kicad.exe
*) Rename LIB_COMPONENT to LIB_PART.
*) Add class PART_LIBS, and PART_LIB.
*) Make PART_LIBS non-global, i.e. PROJECT specific.
*) Implement "data on demand" for PART_LIBS
*) Implement "data on demand" for schematic SEARCH_STACK.
*) Use RSTRINGs to retain eeschema editor's notion of last library and part being edited.
*) Get rid of library search on every SCH_COMPONENT::Draw() call, instead use
a weak pointer.
*) Remove all chdir() calls so projects don't need to be CWD.
*) Romove APPEND support from OpenProjectFiles().
*) Make OpenProjectFiles() robust, even for creating new projects.
*) Load EESCHEMA colors in the KIWAY::OnKiwayStart() rather in window open,
and save them in the .eeschema config file, not in the project file.
*) Fix bug with wxDir() while accessing protected dirs in kicad.exe
*) Consolidate template copying into PROJECT class, not in kicad.exe source.
*) Generally untangle eeschema, making its libraries not global but rather
held in the PROJECT.
2014-08-13 15:28:54 -05:00
|
|
|
EVT_BUTTON( ID_TO_SCH, KICAD_MANAGER_FRAME::OnRunEeschema )
|
2015-03-02 18:29:18 +01:00
|
|
|
EVT_MENU( ID_TO_SCH, KICAD_MANAGER_FRAME::OnRunEeschema )
|
|
|
|
|
Modular KiCad Blueprint Milestone B), major portions:
*) When kicad.exe closes a project, close any open KIFACEs so that they cannot
get disassociated from their true PROJECT.
*) Allow loading eeschema library editor from kicad.exe
*) Allow loading pcbnew library editor from kicad.exe
*) Rename LIB_COMPONENT to LIB_PART.
*) Add class PART_LIBS, and PART_LIB.
*) Make PART_LIBS non-global, i.e. PROJECT specific.
*) Implement "data on demand" for PART_LIBS
*) Implement "data on demand" for schematic SEARCH_STACK.
*) Use RSTRINGs to retain eeschema editor's notion of last library and part being edited.
*) Get rid of library search on every SCH_COMPONENT::Draw() call, instead use
a weak pointer.
*) Remove all chdir() calls so projects don't need to be CWD.
*) Romove APPEND support from OpenProjectFiles().
*) Make OpenProjectFiles() robust, even for creating new projects.
*) Load EESCHEMA colors in the KIWAY::OnKiwayStart() rather in window open,
and save them in the .eeschema config file, not in the project file.
*) Fix bug with wxDir() while accessing protected dirs in kicad.exe
*) Consolidate template copying into PROJECT class, not in kicad.exe source.
*) Generally untangle eeschema, making its libraries not global but rather
held in the PROJECT.
2014-08-13 15:28:54 -05:00
|
|
|
EVT_BUTTON( ID_TO_SCH_LIB_EDITOR, KICAD_MANAGER_FRAME::OnRunSchLibEditor )
|
2015-03-02 18:29:18 +01:00
|
|
|
EVT_MENU( ID_TO_SCH_LIB_EDITOR, KICAD_MANAGER_FRAME::OnRunSchLibEditor )
|
Modular KiCad Blueprint Milestone B), major portions:
*) When kicad.exe closes a project, close any open KIFACEs so that they cannot
get disassociated from their true PROJECT.
*) Allow loading eeschema library editor from kicad.exe
*) Allow loading pcbnew library editor from kicad.exe
*) Rename LIB_COMPONENT to LIB_PART.
*) Add class PART_LIBS, and PART_LIB.
*) Make PART_LIBS non-global, i.e. PROJECT specific.
*) Implement "data on demand" for PART_LIBS
*) Implement "data on demand" for schematic SEARCH_STACK.
*) Use RSTRINGs to retain eeschema editor's notion of last library and part being edited.
*) Get rid of library search on every SCH_COMPONENT::Draw() call, instead use
a weak pointer.
*) Remove all chdir() calls so projects don't need to be CWD.
*) Romove APPEND support from OpenProjectFiles().
*) Make OpenProjectFiles() robust, even for creating new projects.
*) Load EESCHEMA colors in the KIWAY::OnKiwayStart() rather in window open,
and save them in the .eeschema config file, not in the project file.
*) Fix bug with wxDir() while accessing protected dirs in kicad.exe
*) Consolidate template copying into PROJECT class, not in kicad.exe source.
*) Generally untangle eeschema, making its libraries not global but rather
held in the PROJECT.
2014-08-13 15:28:54 -05:00
|
|
|
|
|
|
|
EVT_BUTTON( ID_TO_PCB, KICAD_MANAGER_FRAME::OnRunPcbNew )
|
2015-03-02 18:29:18 +01:00
|
|
|
EVT_MENU( ID_TO_PCB, KICAD_MANAGER_FRAME::OnRunPcbNew )
|
|
|
|
|
Modular KiCad Blueprint Milestone B), major portions:
*) When kicad.exe closes a project, close any open KIFACEs so that they cannot
get disassociated from their true PROJECT.
*) Allow loading eeschema library editor from kicad.exe
*) Allow loading pcbnew library editor from kicad.exe
*) Rename LIB_COMPONENT to LIB_PART.
*) Add class PART_LIBS, and PART_LIB.
*) Make PART_LIBS non-global, i.e. PROJECT specific.
*) Implement "data on demand" for PART_LIBS
*) Implement "data on demand" for schematic SEARCH_STACK.
*) Use RSTRINGs to retain eeschema editor's notion of last library and part being edited.
*) Get rid of library search on every SCH_COMPONENT::Draw() call, instead use
a weak pointer.
*) Remove all chdir() calls so projects don't need to be CWD.
*) Romove APPEND support from OpenProjectFiles().
*) Make OpenProjectFiles() robust, even for creating new projects.
*) Load EESCHEMA colors in the KIWAY::OnKiwayStart() rather in window open,
and save them in the .eeschema config file, not in the project file.
*) Fix bug with wxDir() while accessing protected dirs in kicad.exe
*) Consolidate template copying into PROJECT class, not in kicad.exe source.
*) Generally untangle eeschema, making its libraries not global but rather
held in the PROJECT.
2014-08-13 15:28:54 -05:00
|
|
|
EVT_BUTTON( ID_TO_PCB_FP_EDITOR, KICAD_MANAGER_FRAME::OnRunPcbFpEditor )
|
2015-03-02 18:29:18 +01:00
|
|
|
EVT_MENU( ID_TO_PCB_FP_EDITOR, KICAD_MANAGER_FRAME::OnRunPcbFpEditor )
|
Modular KiCad Blueprint Milestone B), major portions:
*) When kicad.exe closes a project, close any open KIFACEs so that they cannot
get disassociated from their true PROJECT.
*) Allow loading eeschema library editor from kicad.exe
*) Allow loading pcbnew library editor from kicad.exe
*) Rename LIB_COMPONENT to LIB_PART.
*) Add class PART_LIBS, and PART_LIB.
*) Make PART_LIBS non-global, i.e. PROJECT specific.
*) Implement "data on demand" for PART_LIBS
*) Implement "data on demand" for schematic SEARCH_STACK.
*) Use RSTRINGs to retain eeschema editor's notion of last library and part being edited.
*) Get rid of library search on every SCH_COMPONENT::Draw() call, instead use
a weak pointer.
*) Remove all chdir() calls so projects don't need to be CWD.
*) Romove APPEND support from OpenProjectFiles().
*) Make OpenProjectFiles() robust, even for creating new projects.
*) Load EESCHEMA colors in the KIWAY::OnKiwayStart() rather in window open,
and save them in the .eeschema config file, not in the project file.
*) Fix bug with wxDir() while accessing protected dirs in kicad.exe
*) Consolidate template copying into PROJECT class, not in kicad.exe source.
*) Generally untangle eeschema, making its libraries not global but rather
held in the PROJECT.
2014-08-13 15:28:54 -05:00
|
|
|
|
2011-04-17 15:54:17 +02:00
|
|
|
EVT_BUTTON( ID_TO_GERBVIEW, KICAD_MANAGER_FRAME::OnRunGerbview )
|
2015-03-02 18:29:18 +01:00
|
|
|
EVT_MENU( ID_TO_GERBVIEW, KICAD_MANAGER_FRAME::OnRunGerbview )
|
|
|
|
|
2011-04-17 15:54:17 +02:00
|
|
|
EVT_BUTTON( ID_TO_BITMAP_CONVERTER, KICAD_MANAGER_FRAME::OnRunBitmapConverter )
|
2015-03-02 18:29:18 +01:00
|
|
|
EVT_MENU( ID_TO_BITMAP_CONVERTER, KICAD_MANAGER_FRAME::OnRunBitmapConverter )
|
|
|
|
|
2011-08-05 21:53:42 +02:00
|
|
|
EVT_BUTTON( ID_TO_PCB_CALCULATOR, KICAD_MANAGER_FRAME::OnRunPcbCalculator )
|
2015-03-02 18:29:18 +01:00
|
|
|
EVT_MENU( ID_TO_PCB_CALCULATOR, KICAD_MANAGER_FRAME::OnRunPcbCalculator )
|
|
|
|
|
2013-07-19 20:27:22 +02:00
|
|
|
EVT_BUTTON( ID_TO_PL_EDITOR, KICAD_MANAGER_FRAME::OnRunPageLayoutEditor )
|
2015-03-02 18:29:18 +01:00
|
|
|
EVT_MENU( ID_TO_PL_EDITOR, KICAD_MANAGER_FRAME::OnRunPageLayoutEditor )
|
2011-04-13 15:30:27 -04:00
|
|
|
|
2008-11-02 22:53:38 +00:00
|
|
|
END_EVENT_TABLE()
|
2007-05-28 18:09:49 +00:00
|
|
|
|
2019-04-29 11:40:44 +01:00
|
|
|
enum hotkey_id_command
|
2015-03-02 18:29:18 +01:00
|
|
|
{
|
|
|
|
HK_RUN_EESCHEMA = HK_COMMON_END,
|
|
|
|
HK_NEW_PRJ_TEMPLATE,
|
2017-09-06 15:54:15 +01:00
|
|
|
HK_REFRESH,
|
2015-03-02 18:29:18 +01:00
|
|
|
HK_RUN_LIBEDIT,
|
|
|
|
HK_RUN_PCBNEW,
|
|
|
|
HK_RUN_FPEDITOR,
|
|
|
|
HK_RUN_GERBVIEW,
|
|
|
|
HK_RUN_BM2COMPONENT,
|
|
|
|
HK_RUN_PCBCALCULATOR,
|
|
|
|
HK_RUN_PLEDITOR
|
|
|
|
};
|
|
|
|
|
|
|
|
///////////// Hotkeys management ///////////////////////////////////////
|
2015-03-22 15:04:09 +01:00
|
|
|
|
|
|
|
// Remark: the hotkey message info is used as keyword in hotkey config files and
|
|
|
|
// as comments in help windows, therefore translated only when displayed
|
|
|
|
// they are marked _HKI to be extracted by translation tools
|
|
|
|
// See hotkeys_basic.h for more info
|
|
|
|
|
2015-03-02 18:29:18 +01:00
|
|
|
// hotkeys command:
|
2017-09-06 15:54:15 +01:00
|
|
|
static EDA_HOTKEY HkNewProjectFromTemplate( _HKI( "New Project From Template" ),
|
2015-03-02 18:29:18 +01:00
|
|
|
HK_NEW_PRJ_TEMPLATE, 'T' + GR_KB_CTRL );
|
2017-09-06 15:54:15 +01:00
|
|
|
static EDA_HOTKEY HkRefresh( _HKI( "Refresh Project Tree" ), HK_REFRESH, GR_KB_CTRL + 'R' );
|
2015-03-25 14:07:05 +01:00
|
|
|
static EDA_HOTKEY HkRunEeschema( _HKI( "Run Eeschema" ), HK_RUN_EESCHEMA, 'E' + GR_KB_CTRL, 0 );
|
|
|
|
static EDA_HOTKEY HkRunLibedit( _HKI( "Run LibEdit" ), HK_RUN_LIBEDIT, 'L' + GR_KB_CTRL, 0 );
|
|
|
|
static EDA_HOTKEY HkRunPcbnew( _HKI( "Run Pcbnew" ), HK_RUN_PCBNEW, 'P' + GR_KB_CTRL, 0 );
|
|
|
|
static EDA_HOTKEY HkRunModedit( _HKI( "Run FpEditor" ), HK_RUN_FPEDITOR, 'F' + GR_KB_CTRL, 0 );
|
|
|
|
static EDA_HOTKEY HkRunGerbview( _HKI( "Run Gerbview" ), HK_RUN_GERBVIEW, 'G' + GR_KB_CTRL, 0 );
|
|
|
|
static EDA_HOTKEY HkRunBm2Cmp( _HKI( "Run Bitmap2Component" ),
|
|
|
|
HK_RUN_BM2COMPONENT, 'B' + GR_KB_CTRL, 0 );
|
|
|
|
static EDA_HOTKEY HkRunPcbCalc( _HKI( "Run PcbCalculator" ),
|
2016-01-21 15:36:46 +01:00
|
|
|
HK_RUN_PCBCALCULATOR, 'A' + GR_KB_CTRL, 0 );
|
2015-03-25 14:07:05 +01:00
|
|
|
static EDA_HOTKEY HkRunPleditor( _HKI( "Run PlEditor" ), HK_RUN_PLEDITOR, 'Y' + GR_KB_CTRL, 0 );
|
2015-03-02 18:29:18 +01:00
|
|
|
|
2017-09-06 15:54:15 +01:00
|
|
|
// Common: hotkeys_basic.h
|
|
|
|
static EDA_HOTKEY HkNewProject( _HKI( "New Project" ), HK_NEW, GR_KB_CTRL + 'N' );
|
|
|
|
static EDA_HOTKEY HkOpenProject( _HKI( "Open Project" ), HK_OPEN, GR_KB_CTRL + 'O' );
|
|
|
|
static EDA_HOTKEY HkSaveProject( _HKI( "Save Project" ), HK_SAVE, GR_KB_CTRL + 'S' );
|
2019-01-01 22:12:52 -07:00
|
|
|
static EDA_HOTKEY HkHelp( _HKI( "List Hotkeys" ), HK_HELP, GR_KB_CTRL + WXK_F1 );
|
2019-04-01 18:18:29 +01:00
|
|
|
static EDA_HOTKEY HkPreferences( _HKI( "Preferences" ),
|
|
|
|
HK_PREFERENCES, GR_KB_CTRL + ',', (int) wxID_PREFERENCES );
|
2017-09-06 15:54:15 +01:00
|
|
|
|
2015-03-02 18:29:18 +01:00
|
|
|
// List of hotkey descriptors
|
|
|
|
EDA_HOTKEY* common_Hotkey_List[] =
|
|
|
|
{
|
2017-09-06 15:54:15 +01:00
|
|
|
&HkNewProject, &HkNewProjectFromTemplate, &HkOpenProject,
|
|
|
|
// Currently there is nothing to save
|
|
|
|
// (Kicad manager does not save any info in .pro file)
|
|
|
|
#if 0
|
|
|
|
&HkSaveProject,
|
|
|
|
#endif
|
2019-04-01 18:18:29 +01:00
|
|
|
&HkRefresh, &HkHelp, &HkPreferences,
|
2015-03-02 18:29:18 +01:00
|
|
|
&HkRunEeschema, &HkRunLibedit,
|
|
|
|
&HkRunPcbnew, &HkRunModedit, &HkRunGerbview,
|
|
|
|
&HkRunBm2Cmp, &HkRunPcbCalc, &HkRunPleditor,
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
|
|
|
// list of sections and corresponding hotkey list for Kicad
|
|
|
|
// (used to create an hotkey config file, and edit hotkeys )
|
|
|
|
// here we have only one section.
|
2015-04-16 17:26:51 +02:00
|
|
|
static wxString sectionTitle( _HKI( "Kicad Manager Hotkeys" ) );
|
2015-04-14 19:44:19 +02:00
|
|
|
|
2019-04-01 18:14:16 +01:00
|
|
|
struct EDA_HOTKEY_CONFIG kicad_Manager_Hotkeys_Descr[] = {
|
2015-04-14 19:44:19 +02:00
|
|
|
{ &g_CommonSectionTag, common_Hotkey_List, §ionTitle },
|
|
|
|
{ NULL, NULL, NULL }
|
2015-03-02 18:29:18 +01:00
|
|
|
};
|
|
|
|
///////////// End hotkeys management ///////////////////////////////////////
|
|
|
|
|
2007-05-28 18:09:49 +00:00
|
|
|
|
2008-11-02 22:53:38 +00:00
|
|
|
/**
|
2010-02-14 14:59:43 +00:00
|
|
|
* @brief (Re)Create the menubar
|
2008-11-02 22:53:38 +00:00
|
|
|
*/
|
2011-04-17 15:54:17 +02:00
|
|
|
void KICAD_MANAGER_FRAME::ReCreateMenuBar()
|
2008-11-02 22:53:38 +00:00
|
|
|
{
|
2019-06-09 14:12:44 +01:00
|
|
|
KICAD_MANAGER_CONTROL* controlTool = m_toolManager->GetTool<KICAD_MANAGER_CONTROL>();
|
2018-04-07 14:13:38 +01: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-09-01 08:54:34 -04:00
|
|
|
|
2019-06-09 14:12:44 +01:00
|
|
|
m_manager_Hotkeys_Descr = kicad_Manager_Hotkeys_Descr;
|
|
|
|
|
|
|
|
//-- File menu -----------------------------------------------------------
|
|
|
|
//
|
|
|
|
CONDITIONAL_MENU* fileMenu = new CONDITIONAL_MENU( false, controlTool );
|
|
|
|
static ACTION_MENU* openRecentMenu;
|
|
|
|
|
2012-10-18 21:31:40 +02:00
|
|
|
// Before deleting, remove the menus managed by m_fileHistory
|
|
|
|
// (the file history will be updated when adding/removing files in history)
|
|
|
|
if( openRecentMenu )
|
2016-05-28 12:57:29 -04:00
|
|
|
PgmTop().GetFileHistory().RemoveMenu( openRecentMenu );
|
2012-10-18 21:31:40 +02:00
|
|
|
|
2019-06-09 14:12:44 +01:00
|
|
|
openRecentMenu = new ACTION_MENU();
|
|
|
|
openRecentMenu->SetTool( controlTool );
|
|
|
|
openRecentMenu->SetTitle( _( "Open Recent" ) );
|
|
|
|
openRecentMenu->SetIcon( recent_xpm );
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2019-06-09 14:12:44 +01:00
|
|
|
PgmTop().GetFileHistory().UseMenu( openRecentMenu );
|
|
|
|
PgmTop().GetFileHistory().AddFilesToMenu( openRecentMenu );
|
|
|
|
|
|
|
|
fileMenu->AddItem( KICAD_MANAGER_ACTIONS::newProject, SELECTION_CONDITIONS::ShowAlways );
|
|
|
|
fileMenu->AddItem( KICAD_MANAGER_ACTIONS::newFromTemplate, SELECTION_CONDITIONS::ShowAlways );
|
|
|
|
fileMenu->AddItem( KICAD_MANAGER_ACTIONS::openProject, SELECTION_CONDITIONS::ShowAlways );
|
|
|
|
fileMenu->AddMenu( openRecentMenu, SELECTION_CONDITIONS::ShowAlways );
|
|
|
|
|
|
|
|
fileMenu->AddSeparator();
|
|
|
|
fileMenu->AddItem( ID_IMPORT_EAGLE_PROJECT,
|
|
|
|
_( "Import EAGLE Project..." ),
|
|
|
|
_( "Import EAGLE CAD XML schematic and board" ),
|
|
|
|
import_project_xpm, SELECTION_CONDITIONS::ShowAlways );
|
|
|
|
|
|
|
|
fileMenu->AddSeparator();
|
|
|
|
fileMenu->AddItem( ID_SAVE_AND_ZIP_FILES,
|
|
|
|
_( "&Archive Project..." ),
|
|
|
|
_( "Archive all needed project files into zip archive" ),
|
|
|
|
zip_xpm, SELECTION_CONDITIONS::ShowAlways );
|
|
|
|
|
|
|
|
fileMenu->AddItem( ID_READ_ZIP_ARCHIVE,
|
|
|
|
_( "&Unarchive Project..." ),
|
|
|
|
_( "Unarchive project files from zip archive" ),
|
|
|
|
unzip_xpm, SELECTION_CONDITIONS::ShowAlways );
|
|
|
|
|
|
|
|
fileMenu->AddSeparator();
|
|
|
|
// Don't use ACTIONS::quit; wxWidgets moves this on OSX and expects to find it via wxID_EXIT
|
|
|
|
fileMenu->AddItem( wxID_EXIT, _( "Quit" ), "", exit_xpm, SELECTION_CONDITIONS::ShowAlways );
|
|
|
|
|
|
|
|
fileMenu->Resolve();
|
|
|
|
|
|
|
|
//-- View menu -----------------------------------------------------------
|
|
|
|
//
|
|
|
|
CONDITIONAL_MENU* viewMenu = new CONDITIONAL_MENU( false, controlTool );
|
|
|
|
viewMenu->AddItem( ACTIONS::zoomRedraw, SELECTION_CONDITIONS::ShowAlways );
|
|
|
|
|
|
|
|
viewMenu->AddSeparator();
|
|
|
|
viewMenu->AddItem( ID_TO_TEXT_EDITOR,
|
|
|
|
_( "Open Text Editor" ), _( "Launch preferred text editor" ),
|
|
|
|
editor_xpm, SELECTION_CONDITIONS::ShowAlways );
|
|
|
|
|
|
|
|
viewMenu->AddItem( ID_BROWSE_AN_SELECT_FILE,
|
|
|
|
_( "Open Local File..." ), _( "Edit local file" ),
|
|
|
|
browse_files_xpm, SELECTION_CONDITIONS::ShowAlways );
|
|
|
|
|
|
|
|
viewMenu->AddItem( ID_BROWSE_IN_FILE_EXPLORER,
|
|
|
|
_( "Browse Project Files" ), _( "Open project directory in file browser" ),
|
|
|
|
directory_browser_xpm, SELECTION_CONDITIONS::ShowAlways );
|
2017-09-06 15:54:15 +01:00
|
|
|
|
2018-02-22 17:50:32 +00:00
|
|
|
#ifdef __APPLE__
|
2019-06-09 14:12:44 +01:00
|
|
|
viewMenu->AddSeparator();
|
2018-02-22 17:50:32 +00:00
|
|
|
#endif
|
|
|
|
|
2019-06-09 14:12:44 +01:00
|
|
|
viewMenu->Resolve();
|
2015-03-02 18:29:18 +01:00
|
|
|
|
2019-06-09 14:12:44 +01:00
|
|
|
//-- Tools menu -----------------------------------------------
|
|
|
|
//
|
|
|
|
wxMenu* toolsMenu = new wxMenu;
|
|
|
|
wxString msg;
|
2019-04-01 18:14:16 +01:00
|
|
|
msg = AddHotkeyName( _( "Edit Schematic" ), kicad_Manager_Hotkeys_Descr, HK_RUN_EESCHEMA );
|
2015-08-03 16:56:37 -04:00
|
|
|
AddMenuItem( toolsMenu, ID_TO_SCH, msg, KiBitmap( eeschema_xpm ) );
|
2015-03-02 18:29:18 +01:00
|
|
|
|
2017-11-19 10:42:52 +01:00
|
|
|
msg = AddHotkeyName( _( "Edit Schematic Symbols" ),
|
2019-04-01 18:14:16 +01:00
|
|
|
kicad_Manager_Hotkeys_Descr, HK_RUN_LIBEDIT );
|
2015-08-03 16:56:37 -04:00
|
|
|
AddMenuItem( toolsMenu, ID_TO_SCH_LIB_EDITOR, msg, KiBitmap( libedit_xpm ) );
|
2015-03-02 18:29:18 +01:00
|
|
|
|
2018-09-30 17:46:12 +01:00
|
|
|
msg = AddHotkeyName( _( "Edit PCB" ),
|
2019-04-01 18:14:16 +01:00
|
|
|
kicad_Manager_Hotkeys_Descr, HK_RUN_PCBNEW );
|
2015-08-03 16:56:37 -04:00
|
|
|
AddMenuItem( toolsMenu, ID_TO_PCB, msg, KiBitmap( pcbnew_xpm ) );
|
2015-03-02 18:29:18 +01:00
|
|
|
|
2017-11-20 17:14:25 +01:00
|
|
|
msg = AddHotkeyName( _( "Edit PCB Footprints" ),
|
2019-04-01 18:14:16 +01:00
|
|
|
kicad_Manager_Hotkeys_Descr, HK_RUN_FPEDITOR );
|
2015-08-03 16:56:37 -04:00
|
|
|
AddMenuItem( toolsMenu, ID_TO_PCB_FP_EDITOR, msg, KiBitmap( module_editor_xpm ) );
|
2015-03-02 18:29:18 +01:00
|
|
|
|
2017-08-17 16:39:11 +02:00
|
|
|
msg = AddHotkeyName( _( "View Gerber Files" ),
|
2019-04-01 18:14:16 +01:00
|
|
|
kicad_Manager_Hotkeys_Descr, HK_RUN_GERBVIEW );
|
2015-08-03 16:56:37 -04:00
|
|
|
AddMenuItem( toolsMenu, ID_TO_GERBVIEW, msg, KiBitmap( icon_gerbview_small_xpm ) );
|
2015-03-02 18:29:18 +01:00
|
|
|
|
2017-08-17 16:39:11 +02:00
|
|
|
msg = AddHotkeyName( _( "Convert Image" ),
|
2019-04-01 18:14:16 +01:00
|
|
|
kicad_Manager_Hotkeys_Descr, HK_RUN_BM2COMPONENT );
|
2015-03-02 18:29:18 +01:00
|
|
|
AddMenuItem( toolsMenu, ID_TO_BITMAP_CONVERTER, msg,
|
2018-11-18 14:40:36 +01:00
|
|
|
_( "Convert bitmap images to schematic or PCB components." ),
|
2018-01-11 17:18:30 +11:00
|
|
|
KiBitmap( bitmap2component_xpm ) );
|
2015-03-02 18:29:18 +01:00
|
|
|
|
2019-04-01 18:14:16 +01:00
|
|
|
msg = AddHotkeyName( _( "Calculator Tools" ), kicad_Manager_Hotkeys_Descr, HK_RUN_PCBCALCULATOR );
|
2015-03-02 18:29:18 +01:00
|
|
|
AddMenuItem( toolsMenu, ID_TO_PCB_CALCULATOR, msg,
|
2018-09-30 17:46:12 +01:00
|
|
|
_( "Run component calculations, track width calculations, etc." ),
|
2018-01-11 17:18:30 +11:00
|
|
|
KiBitmap( calculator_xpm ) );
|
2015-03-02 18:29:18 +01:00
|
|
|
|
2019-04-01 18:14:16 +01:00
|
|
|
msg = AddHotkeyName( _( "Edit Worksheet" ), kicad_Manager_Hotkeys_Descr, HK_RUN_PLEDITOR );
|
2015-03-02 18:29:18 +01:00
|
|
|
AddMenuItem( toolsMenu, ID_TO_PL_EDITOR, msg,
|
2018-09-30 17:46:12 +01:00
|
|
|
_( "Edit worksheet graphics and text" ),
|
2015-03-02 18:29:18 +01:00
|
|
|
KiBitmap( pagelayout_load_xpm ) );
|
|
|
|
|
2019-06-09 14:12:44 +01:00
|
|
|
//-- Preferences menu -----------------------------------------------
|
|
|
|
//
|
|
|
|
CONDITIONAL_MENU* prefsMenu = new CONDITIONAL_MENU( false, controlTool );
|
|
|
|
|
|
|
|
prefsMenu->AddItem( ACTIONS::configurePaths, SELECTION_CONDITIONS::ShowAlways );
|
|
|
|
prefsMenu->AddItem( ACTIONS::showSymbolLibTable, SELECTION_CONDITIONS::ShowAlways );
|
|
|
|
prefsMenu->AddItem( ACTIONS::showFootprintLibTable, SELECTION_CONDITIONS::ShowAlways );
|
|
|
|
prefsMenu->AddItem( wxID_PREFERENCES,
|
|
|
|
AddHotkeyName( _( "Preferences..." ), kicad_Manager_Hotkeys_Descr, HK_PREFERENCES ),
|
|
|
|
_( "Show preferences for all open tools" ),
|
|
|
|
preference_xpm, SELECTION_CONDITIONS::ShowAlways );
|
|
|
|
|
|
|
|
prefsMenu->AddSeparator();
|
|
|
|
Pgm().AddMenuLanguageList( prefsMenu );
|
|
|
|
|
|
|
|
//-- Menubar -------------------------------------------------------------
|
|
|
|
//
|
2011-04-06 15:52:47 +02:00
|
|
|
menuBar->Append( fileMenu, _( "&File" ) );
|
2017-09-06 15:54:15 +01:00
|
|
|
menuBar->Append( viewMenu, _( "&View" ) );
|
|
|
|
menuBar->Append( toolsMenu, _( "&Tools" ) );
|
2019-06-09 14:12:44 +01:00
|
|
|
menuBar->Append( prefsMenu, _( "&Preferences" ) );
|
2019-05-18 11:27:36 +01:00
|
|
|
AddStandardHelpMenu( menuBar );
|
2009-01-17 20:31:19 +00:00
|
|
|
|
2018-04-07 14:13:38 +01:00
|
|
|
SetMenuBar( menuBar );
|
|
|
|
delete oldMenuBar;
|
2015-03-02 18:29:18 +01:00
|
|
|
|
|
|
|
// Add the hotkey to the "show hotkey list" menu, because we do not have
|
|
|
|
// a management of the keyboard keys in Kicad.
|
|
|
|
// So all hotheys should be added to the menubar
|
|
|
|
// Note Use wxMenuBar::SetLabel only after the menubar
|
|
|
|
// has been associated with a frame. (see wxWidgets doc)
|
|
|
|
msg = AddHotkeyName( menuBar->GetLabel( ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST ),
|
2019-04-01 18:14:16 +01:00
|
|
|
kicad_Manager_Hotkeys_Descr, HK_HELP );
|
2015-03-02 18:29:18 +01:00
|
|
|
menuBar->SetLabel( ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST, msg );
|
2007-05-28 18:09:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-11-02 22:53:38 +00:00
|
|
|
/**
|
2010-02-14 14:59:43 +00:00
|
|
|
* @brief (Re)Create the horizontal toolbar
|
2008-11-02 22:53:38 +00:00
|
|
|
*/
|
2011-04-17 15:54:17 +02:00
|
|
|
void KICAD_MANAGER_FRAME::RecreateBaseHToolbar()
|
2007-05-28 18:09:49 +00:00
|
|
|
{
|
2018-01-07 21:05:03 -07:00
|
|
|
if( m_mainToolBar )
|
|
|
|
m_mainToolBar->Clear();
|
|
|
|
else
|
2019-06-09 14:12:44 +01:00
|
|
|
m_mainToolBar = new ACTION_TOOLBAR( this, ID_H_TOOLBAR, wxDefaultPosition, wxDefaultSize,
|
|
|
|
KICAD_AUI_TB_STYLE | wxAUI_TB_HORZ_LAYOUT );
|
2010-02-08 18:15:42 +00:00
|
|
|
|
2011-04-06 15:52:47 +02:00
|
|
|
// New
|
2019-06-09 14:12:44 +01:00
|
|
|
m_mainToolBar->Add( KICAD_MANAGER_ACTIONS::newProject );
|
|
|
|
m_mainToolBar->Add( KICAD_MANAGER_ACTIONS::newFromTemplate );
|
|
|
|
m_mainToolBar->Add( KICAD_MANAGER_ACTIONS::openProject );
|
2008-11-02 22:53:38 +00:00
|
|
|
|
2018-01-07 21:05:03 -07:00
|
|
|
KiScaledSeparator( m_mainToolBar, this );
|
2011-12-16 08:32:23 -05:00
|
|
|
m_mainToolBar->AddTool( ID_SAVE_AND_ZIP_FILES, wxEmptyString,
|
2018-01-07 21:05:03 -07:00
|
|
|
KiScaledBitmap( zip_xpm, this ),
|
2011-12-16 08:32:23 -05:00
|
|
|
_( "Archive all project files" ) );
|
2008-11-02 22:53:38 +00:00
|
|
|
|
2017-09-06 15:54:15 +01:00
|
|
|
m_mainToolBar->AddTool( ID_READ_ZIP_ARCHIVE, wxEmptyString,
|
2018-01-07 21:05:03 -07:00
|
|
|
KiScaledBitmap( unzip_xpm, this ),
|
2017-09-06 15:54:15 +01:00
|
|
|
_( "Unarchive project files from zip archive" ) );
|
|
|
|
|
2018-01-07 21:05:03 -07:00
|
|
|
KiScaledSeparator( m_mainToolBar, this );
|
2019-06-09 14:12:44 +01:00
|
|
|
m_mainToolBar->Add( ACTIONS::zoomRedraw );
|
2008-11-02 22:53:38 +00:00
|
|
|
|
2018-11-02 13:51:13 +01:00
|
|
|
KiScaledSeparator( m_mainToolBar, this );
|
|
|
|
m_mainToolBar->AddTool( ID_BROWSE_IN_FILE_EXPLORER, wxEmptyString,
|
|
|
|
KiScaledBitmap( directory_browser_xpm, this ),
|
|
|
|
_( "Open project directory in file explorer" ) );
|
|
|
|
|
2011-12-16 08:32:23 -05:00
|
|
|
// Create m_mainToolBar
|
|
|
|
m_mainToolBar->Realize();
|
2008-11-02 22:53:38 +00:00
|
|
|
}
|
2019-06-09 14:12:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
void KICAD_MANAGER_FRAME::SyncMenusAndToolbars()
|
|
|
|
{
|
|
|
|
m_mainToolBar->ToggleTool( ID_TO_SCH, m_active_project );
|
|
|
|
m_mainToolBar->ToggleTool( ID_TO_SCH_LIB_EDITOR, m_active_project );
|
|
|
|
m_mainToolBar->ToggleTool( ID_TO_PCB, m_active_project );
|
|
|
|
m_mainToolBar->ToggleTool( ID_TO_PCB_FP_EDITOR, m_active_project );
|
|
|
|
m_mainToolBar->Refresh();
|
|
|
|
}
|
|
|
|
|
|
|
|
|