KiCad PCB EDA Suite
kicad/menubar.cpp
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
5  * Copyright (C) 2009 Wayne Stambaugh <stambaughw@verizon.net>
6  * Copyright (C) 1992-2018 KiCad Developers, see AUTHORS.txt for contributors.
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, you may find one here:
20  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21  * or you may search the http://www.gnu.org website for the version 2 license,
22  * or you may write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24  */
25 
32 #include <bitmaps.h>
33 #include <hotkeys_basic.h>
34 #include <menus_helpers.h>
35 
36 #include "kicad.h"
37 #include "pgm_kicad.h"
38 
39 
40 // Menubar and toolbar event table
41 BEGIN_EVENT_TABLE( KICAD_MANAGER_FRAME, EDA_BASE_FRAME )
42  // Window events
43  EVT_SIZE( KICAD_MANAGER_FRAME::OnSize )
45 
46  // Toolbar events
50 
51  // Menu events
60  EVT_MENU( wxID_PREFERENCES, KICAD_MANAGER_FRAME::OnPreferences )
69 
70  // Range menu events
73 
75 
76  // Show hotkeys
78 
79 
80  // Special functions
82 
83  // Button events (in command frame), and menu events equivalent to buttons
86 
89 
92 
95 
98 
101 
104 
107 
109  KICAD_MANAGER_FRAME::OnUpdateRequiresProject )
110 
111 END_EVENT_TABLE()
112 
114 {
125 };
126 
128 
129 // Remark: the hotkey message info is used as keyword in hotkey config files and
130 // as comments in help windows, therefore translated only when displayed
131 // they are marked _HKI to be extracted by translation tools
132 // See hotkeys_basic.h for more info
133 
134 // hotkeys command:
135 static EDA_HOTKEY HkNewProjectFromTemplate( _HKI( "New Project From Template" ),
137 static EDA_HOTKEY HkRefresh( _HKI( "Refresh Project Tree" ), HK_REFRESH, GR_KB_CTRL + 'R' );
138 static EDA_HOTKEY HkRunEeschema( _HKI( "Run Eeschema" ), HK_RUN_EESCHEMA, 'E' + GR_KB_CTRL, 0 );
139 static EDA_HOTKEY HkRunLibedit( _HKI( "Run LibEdit" ), HK_RUN_LIBEDIT, 'L' + GR_KB_CTRL, 0 );
140 static EDA_HOTKEY HkRunPcbnew( _HKI( "Run Pcbnew" ), HK_RUN_PCBNEW, 'P' + GR_KB_CTRL, 0 );
141 static EDA_HOTKEY HkRunModedit( _HKI( "Run FpEditor" ), HK_RUN_FPEDITOR, 'F' + GR_KB_CTRL, 0 );
142 static EDA_HOTKEY HkRunGerbview( _HKI( "Run Gerbview" ), HK_RUN_GERBVIEW, 'G' + GR_KB_CTRL, 0 );
143 static EDA_HOTKEY HkRunBm2Cmp( _HKI( "Run Bitmap2Component" ),
144  HK_RUN_BM2COMPONENT, 'B' + GR_KB_CTRL, 0 );
145 static EDA_HOTKEY HkRunPcbCalc( _HKI( "Run PcbCalculator" ),
146  HK_RUN_PCBCALCULATOR, 'A' + GR_KB_CTRL, 0 );
147 static EDA_HOTKEY HkRunPleditor( _HKI( "Run PlEditor" ), HK_RUN_PLEDITOR, 'Y' + GR_KB_CTRL, 0 );
148 
149 // Common: hotkeys_basic.h
150 static EDA_HOTKEY HkNewProject( _HKI( "New Project" ), HK_NEW, GR_KB_CTRL + 'N' );
151 static EDA_HOTKEY HkOpenProject( _HKI( "Open Project" ), HK_OPEN, GR_KB_CTRL + 'O' );
152 static EDA_HOTKEY HkSaveProject( _HKI( "Save Project" ), HK_SAVE, GR_KB_CTRL + 'S' );
153 static EDA_HOTKEY HkHelp( _HKI( "List Hotkeys" ), HK_HELP, GR_KB_CTRL + WXK_F1 );
154 static EDA_HOTKEY HkPreferences( _HKI( "Preferences" ),
155  HK_PREFERENCES, GR_KB_CTRL + ',', (int) wxID_PREFERENCES );
156 
157 // List of hotkey descriptors
159 {
161  // Currently there is nothing to save
162  // (Kicad manager does not save any info in .pro file)
163 #if 0
164  &HkSaveProject,
165 #endif
170  NULL
171 };
172 
173 // list of sections and corresponding hotkey list for Kicad
174 // (used to create an hotkey config file, and edit hotkeys )
175 // here we have only one section.
176 static wxString sectionTitle( _HKI( "Kicad Manager Hotkeys" ) );
177 
180  { NULL, NULL, NULL }
181 };
183 
184 
189 {
190  wxString msg;
191  static wxMenu* openRecentMenu; // Open Recent submenu,
192  // static to remember this menu
193 
195 
196  // wxWidgets handles the Mac Application menu behind the scenes, but that means
197  // we always have to start from scratch with a new wxMenuBar.
198  wxMenuBar* oldMenuBar = GetMenuBar();
199  wxMenuBar* menuBar = new wxMenuBar();
200 
201  // Before deleting, remove the menus managed by m_fileHistory
202  // (the file history will be updated when adding/removing files in history)
203  if( openRecentMenu )
204  PgmTop().GetFileHistory().RemoveMenu( openRecentMenu );
205 
206  // Recreate all menus:
207 
208  // Menu File:
209  wxMenu* fileMenu = new wxMenu;
210 
211  // New project creation
212  wxMenu* newprjSubMenu = new wxMenu();
213  msg = AddHotkeyName( _( "&Project..." ), kicad_Manager_Hotkeys_Descr, HK_NEW );
214  AddMenuItem( newprjSubMenu, ID_NEW_PROJECT, msg,
215  _( "Create new blank project" ),
216  KiBitmap( new_project_xpm ) );
217  msg = AddHotkeyName( _( "Project from &Template..." ),
219  AddMenuItem( newprjSubMenu, ID_NEW_PROJECT_FROM_TEMPLATE, msg,
220  _( "Create new project from template" ),
221  KiBitmap( new_project_with_template_xpm ) );
222  AddMenuItem( fileMenu, newprjSubMenu,
223  wxID_ANY,
224  _( "&New" ),
225  _( "Create new project" ),
226  KiBitmap( new_project_xpm ) );
227 
228  // Open
229  msg = AddHotkeyName( _( "&Open Project..." ), kicad_Manager_Hotkeys_Descr, HK_OPEN );
230  AddMenuItem( fileMenu, ID_LOAD_PROJECT, msg,
231  _( "Open an existing project" ),
232  KiBitmap( open_project_xpm ) );
233 
234  // File history
235  openRecentMenu = new wxMenu();
236  PgmTop().GetFileHistory().UseMenu( openRecentMenu );
237  PgmTop().GetFileHistory().AddFilesToMenu( );
238  AddMenuItem( fileMenu, openRecentMenu,
239  wxID_ANY,
240  _( "Open &Recent" ),
241  _( "Open a recent project" ),
242  KiBitmap( recent_xpm ) );
243 
244  // Currently there is nothing to save
245  // (Kicad manager does not save any info in .pro file)
246 #if 0
247  // Save
248  msg = AddHotkeyName( _( "&Save" ), kicad_Manager_Hotkeys_Descr, HK_SAVE );
249  AddMenuItem( fileMenu, ID_SAVE_PROJECT, msg,
250  _( "Save current project" ),
251  KiBitmap( save_project_xpm ) );
252 #endif
253 
254  fileMenu->AppendSeparator();
255  wxMenu* importprjSubMenu = new wxMenu();
256 
257  AddMenuItem( importprjSubMenu, ID_IMPORT_EAGLE_PROJECT, _( "EAGLE CAD..." ),
258  _( "Import EAGLE CAD XML schematic and board" ),
259  KiBitmap( import_project_xpm ) );
260 
261 
262  AddMenuItem( fileMenu, importprjSubMenu,
263  wxID_ANY,
264  _( "Import Project" ),
265  _( "Import project files from other software" ),
266  KiBitmap( import_project_xpm ) );
267 
268 
269  fileMenu->AppendSeparator();
270 
271  // Archive
272  AddMenuItem( fileMenu,
274  _( "&Archive Project..." ),
275  _( "Archive all needed project files into zip archive" ),
276  KiBitmap( zip_xpm ) );
277 
278  // Unarchive
279  AddMenuItem( fileMenu,
281  _( "&Unarchive Project..." ),
282  _( "Unarchive project files from zip archive" ),
283  KiBitmap( unzip_xpm ) );
284 
285  // Separator
286  fileMenu->AppendSeparator();
287 
288  // Quit
289  AddMenuItem( fileMenu,
290  wxID_EXIT,
291  _( "&Exit" ),
292  _( "Close KiCad" ),
293  KiBitmap( exit_xpm ) );
294 
295  // View Menu:
296  wxMenu* viewMenu = new wxMenu();
297 
298  // Refresh project tree
299  msg = AddHotkeyName( _( "&Refresh" ), kicad_Manager_Hotkeys_Descr, HK_REFRESH );
300  AddMenuItem( viewMenu, ID_PROJECT_TREE_REFRESH, msg,
301  _( "Refresh project tree" ),
302  KiBitmap( reload_xpm ) );
303 
304 #ifdef __APPLE__
305  viewMenu->AppendSeparator();
306 #endif
307 
308  // Menu Browse:
309  wxMenu* browseMenu = new wxMenu();
310 
311  // Text editor
312  AddMenuItem( browseMenu,
314  _( "Open Text E&ditor" ),
315  _( "Launch preferred text editor" ),
316  KiBitmap( editor_xpm ) );
317 
318  // View file
319  AddMenuItem( browseMenu,
321  _( "&Open Local File..." ),
322  _( "Edit local file" ),
323  KiBitmap( browse_files_xpm ) );
324 
325  // Browse in file explorer
326  browseMenu->AppendSeparator();
327  AddMenuItem( browseMenu,
329  _( "&Browse Project Files" ),
330  _( "Open project directory in file explorer" ),
331  KiBitmap( directory_browser_xpm ) );
332 
333  // Menu Preferences:
334  wxMenu* preferencesMenu = new wxMenu;
335 
336  // Path configuration edit dialog.
337  AddMenuItem( preferencesMenu,
339  _( "&Configure Paths..." ),
340  _( "Edit path configuration environment variables" ),
341  KiBitmap( path_xpm ) );
342 
343  AddMenuItem( preferencesMenu,
345  _( "Manage &Symbol Libraries..." ),
346  _( "Edit the global and project symbol library tables" ),
347  KiBitmap( library_table_xpm ) );
348 
349  AddMenuItem( preferencesMenu,
351  _( "Manage &Footprint Libraries..." ),
352  _( "Configure footprint library table" ),
353  KiBitmap( library_table_xpm ) );
354 
355  msg = AddHotkeyName( _( "&Preferences..." ), kicad_Manager_Hotkeys_Descr, HK_PREFERENCES );
356  AddMenuItem( preferencesMenu, wxID_PREFERENCES, msg,
357  _( "Show preferences for all open tools" ),
358  KiBitmap( preference_xpm ) );
359 
360  preferencesMenu->AppendSeparator();
361 
362  // Language submenu
363  Pgm().AddMenuLanguageList( preferencesMenu );
364 
365  // Menu Tools:
366  wxMenu* toolsMenu = new wxMenu;
367 
368  msg = AddHotkeyName( _( "Edit Schematic" ), kicad_Manager_Hotkeys_Descr, HK_RUN_EESCHEMA );
369  AddMenuItem( toolsMenu, ID_TO_SCH, msg, KiBitmap( eeschema_xpm ) );
370 
371  msg = AddHotkeyName( _( "Edit Schematic Symbols" ),
373  AddMenuItem( toolsMenu, ID_TO_SCH_LIB_EDITOR, msg, KiBitmap( libedit_xpm ) );
374 
375  msg = AddHotkeyName( _( "Edit PCB" ),
377  AddMenuItem( toolsMenu, ID_TO_PCB, msg, KiBitmap( pcbnew_xpm ) );
378 
379  msg = AddHotkeyName( _( "Edit PCB Footprints" ),
381  AddMenuItem( toolsMenu, ID_TO_PCB_FP_EDITOR, msg, KiBitmap( module_editor_xpm ) );
382 
383  msg = AddHotkeyName( _( "View Gerber Files" ),
385  AddMenuItem( toolsMenu, ID_TO_GERBVIEW, msg, KiBitmap( icon_gerbview_small_xpm ) );
386 
387  msg = AddHotkeyName( _( "Convert Image" ),
389  AddMenuItem( toolsMenu, ID_TO_BITMAP_CONVERTER, msg,
390  _( "Convert bitmap images to schematic or PCB components." ),
391  KiBitmap( bitmap2component_xpm ) );
392 
393  msg = AddHotkeyName( _( "Calculator Tools" ), kicad_Manager_Hotkeys_Descr, HK_RUN_PCBCALCULATOR );
394  AddMenuItem( toolsMenu, ID_TO_PCB_CALCULATOR, msg,
395  _( "Run component calculations, track width calculations, etc." ),
396  KiBitmap( calculator_xpm ) );
397 
398  msg = AddHotkeyName( _( "Edit Worksheet" ), kicad_Manager_Hotkeys_Descr, HK_RUN_PLEDITOR );
399  AddMenuItem( toolsMenu, ID_TO_PL_EDITOR, msg,
400  _( "Edit worksheet graphics and text" ),
401  KiBitmap( pagelayout_load_xpm ) );
402 
403  // Menu Help:
404  wxMenu* helpMenu = new wxMenu;
405 
406  // Contents
407  AddMenuItem( helpMenu, wxID_HELP,
408  _( "KiCad &Manual" ),
409  _( "Open KiCad user manual" ),
410  KiBitmap( online_help_xpm ) );
411 
412  AddMenuItem( helpMenu, wxID_INDEX,
413  _( "&Getting Started in KiCad" ),
414  _( "Open \"Getting Started in KiCad\" guide for beginners" ),
415  KiBitmap( help_xpm ) );
416 
417  AddMenuItem( helpMenu,
419  _( "&List Hotkeys" ),
420  _( "Displays the current hotkeys list and corresponding commands" ),
421  KiBitmap( hotkeys_xpm ) );
422 
423  // Separator
424  helpMenu->AppendSeparator();
425 
426  // Get involved with KiCad
428  _( "Get &Involved" ),
429  _( "Contribute to KiCad (opens a web browser)" ),
430  KiBitmap( info_xpm ) );
431 
432  helpMenu->AppendSeparator();
433 
434  // About
435  AddMenuItem( helpMenu, wxID_ABOUT, _( "&About KiCad" ), KiBitmap( about_xpm ) );
436 
437  // Create the menubar and append all submenus
438  menuBar->Append( fileMenu, _( "&File" ) );
439  menuBar->Append( viewMenu, _( "&View" ) );
440  menuBar->Append( toolsMenu, _( "&Tools" ) );
441  menuBar->Append( browseMenu, _( "&Browse" ) );
442  menuBar->Append( preferencesMenu, _( "&Preferences" ) );
443  menuBar->Append( helpMenu, _( "&Help" ) );
444 
445  SetMenuBar( menuBar );
446  delete oldMenuBar;
447 
448  // Add the hotkey to the "show hotkey list" menu, because we do not have
449  // a management of the keyboard keys in Kicad.
450  // So all hotheys should be added to the menubar
451  // Note Use wxMenuBar::SetLabel only after the menubar
452  // has been associated with a frame. (see wxWidgets doc)
453  msg = AddHotkeyName( menuBar->GetLabel( ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST ),
455  menuBar->SetLabel( ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST, msg );
456 }
457 
458 
463 {
464  if( m_mainToolBar )
465  m_mainToolBar->Clear();
466  else
467  m_mainToolBar = new wxAuiToolBar( this, ID_H_TOOLBAR, wxDefaultPosition, wxDefaultSize,
468  KICAD_AUI_TB_STYLE | wxAUI_TB_HORZ_LAYOUT );
469 
470  // New
471  m_mainToolBar->AddTool( ID_NEW_PROJECT, wxEmptyString,
472  KiScaledBitmap( new_project_xpm, this ),
473  _( "Create new project" ) );
474 
475  m_mainToolBar->AddTool( ID_NEW_PROJECT_FROM_TEMPLATE, wxEmptyString,
476  KiScaledBitmap( new_project_with_template_xpm, this ),
477  _( "Create new project from template" ) );
478 
479  // Load
480  m_mainToolBar->AddTool( ID_LOAD_PROJECT, wxEmptyString,
481  KiScaledBitmap( open_project_xpm, this ),
482  _( "Open existing project" ) );
483 
484  // Currently there is nothing to save
485  // (Kicad manager does not save any info in .pro file)
486 #if 0
487  // Save
488  m_mainToolBar->AddTool( ID_SAVE_PROJECT, wxEmptyString,
489  KiScaledBitmap( save_project_xpm, this ),
490  _( "Save current project" ) );
491 #endif
492 
494 
495  // Archive
496  m_mainToolBar->AddTool( ID_SAVE_AND_ZIP_FILES, wxEmptyString,
497  KiScaledBitmap( zip_xpm, this ),
498  _( "Archive all project files" ) );
499 
500  // Unarchive
501  m_mainToolBar->AddTool( ID_READ_ZIP_ARCHIVE, wxEmptyString,
502  KiScaledBitmap( unzip_xpm, this ),
503  _( "Unarchive project files from zip archive" ) );
504 
506 
507  // Refresh project tree
508  m_mainToolBar->AddTool( ID_PROJECT_TREE_REFRESH, wxEmptyString,
509  KiScaledBitmap( reload_xpm, this ),
510  _( "Refresh project tree" ) );
511 
512  // Acces to the system file manager
514  m_mainToolBar->AddTool( ID_BROWSE_IN_FILE_EXPLORER, wxEmptyString,
515  KiScaledBitmap( directory_browser_xpm, this ),
516  _( "Open project directory in file explorer" ) );
517 
518  // Create m_mainToolBar
519  m_mainToolBar->Realize();
520 }
void OnRunPcbCalculator(wxCommandEvent &event)
Definition: mainframe.cpp:442
void OnBrowseInFileExplorer(wxCommandEvent &event)
Definition: mainframe.cpp:493
void OnEditFpLibTable(wxCommandEvent &aEvent)
Definition: mainframe.cpp:583
void OnNewProject(wxCommandEvent &aEvent)
Definition: prjconfig.cpp:219
FILE_HISTORY & GetFileHistory()
Definition: pgm_kicad.h:57
void OnRunPageLayoutEditor(wxCommandEvent &event)
Definition: mainframe.cpp:448
Structure EDA_HOTKEY_CONFIG contains the information required to save hot key information to a config...
Definition: hotkeys_basic.h:94
hotkey_id_command
void language_change(wxCommandEvent &event)
Definition: mainframe.cpp:520
struct EDA_HOTKEY_CONFIG kicad_Manager_Hotkeys_Descr[]
void OnRefresh(wxCommandEvent &event)
Definition: mainframe.cpp:514
void OnRunPcbFpEditor(wxCommandEvent &event)
Definition: mainframe.cpp:410
static EDA_HOTKEY HkRunPcbnew(_HKI("Run Pcbnew"), HK_RUN_PCBNEW, 'P'+GR_KB_CTRL, 0)
void OnRunEeschema(wxCommandEvent &event)
Definition: mainframe.cpp:333
wxMenuItem * AddMenuItem(wxMenu *aMenu, int aId, const wxString &aText, const wxBitmap &aImage, wxItemKind aType=wxITEM_NORMAL)
Function AddMenuItem is an inline helper function to create and insert a menu item with an icon into ...
Definition: bitmap.cpp:251
EVT_TOOL(ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR_MICROWAVE, PCB_EDIT_FRAME::OnSelectOptionToolbar) EVT_TOOL_RANGE(ID_TB_OPTIONS_SHOW_ZONES
void OnImportEagleFiles(wxCommandEvent &event)
Open dialog to import Eagle schematic and board files.
static EDA_HOTKEY HkRunGerbview(_HKI("Run Gerbview"), HK_RUN_GERBVIEW, 'G'+GR_KB_CTRL, 0)
void OnOpenFileInTextEditor(wxCommandEvent &event)
Definition: mainframe.cpp:473
EVT_MENU_RANGE(ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, KICAD_MANAGER_FRAME::language_change) EVT_UPDATE_UI_RANGE(ID_TO_SCH
#define GR_KB_CTRL
void OnRunSchLibEditor(wxCommandEvent &event)
Definition: mainframe.cpp:341
static EDA_HOTKEY HkRunPcbCalc(_HKI("Run PcbCalculator"), HK_RUN_PCBCALCULATOR, 'A'+GR_KB_CTRL, 0)
PGM_BASE & Pgm()
The global Program "get" accessor.
Definition: kicad.cpp:66
void OnEditSymLibTable(wxCommandEvent &aEvent)
Definition: mainframe.cpp:576
void OnConfigurePaths(wxCommandEvent &aEvent)
Definition: mainframe.cpp:569
void OnLoadProject(wxCommandEvent &event)
Load an exiting project (.pro) file.
Definition: prjconfig.cpp:165
wxBitmap KiScaledBitmap(BITMAP_DEF aBitmap, EDA_BASE_FRAME *aWindow)
Construct a wxBitmap from a memory record, scaling it if device DPI demands it.
Definition: bitmap.cpp:116
static EDA_HOTKEY HkRunEeschema(_HKI("Run Eeschema"), HK_RUN_EESCHEMA, 'E'+GR_KB_CTRL, 0)
void OnRunBitmapConverter(wxCommandEvent &event)
Definition: mainframe.cpp:436
static EDA_HOTKEY HkRunBm2Cmp(_HKI("Run Bitmap2Component"), HK_RUN_BM2COMPONENT, 'B'+GR_KB_CTRL, 0)
void OnOpenTextEditor(wxCommandEvent &event)
Definition: mainframe.cpp:464
wxAuiToolBar * m_mainToolBar
Definition: kicad.h:299
void GetKicadHelp(wxCommandEvent &event)
EDA_HOTKEY_CONFIG * m_manager_Hotkeys_Descr
Definition: kicad.h:302
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Construct a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:79
void OnFileHistory(wxCommandEvent &event)
KICAD_MANAGER_FRAME is the KiCad main frame.
FOOTPRINT_EDIT_FRAME::OnVerticalToolbar FOOTPRINT_EDIT_FRAME::ProcessPreferences FOOTPRINT_EDIT_FRAME::Process_Special_Functions FOOTPRINT_EDIT_FRAME::Process_Special_Functions FOOTPRINT_EDIT_FRAME::Process_Special_Functions FOOTPRINT_EDIT_FRAME::OnUpdateInsertModuleInBoard EVT_UPDATE_UI_RANGE(ID_MODEDIT_PAD_TOOL, ID_MODEDIT_MEASUREMENT_TOOL, FOOTPRINT_EDIT_FRAME::OnUpdateVerticalToolbar) EVT_UPDATE_UI(ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE
static EDA_HOTKEY HkPreferences(_HKI("Preferences"), HK_PREFERENCES, GR_KB_CTRL+',',(int) wxID_PREFERENCES)
EDA_HOTKEY * common_Hotkey_List[]
void GetKicadAbout(wxCommandEvent &event)
void OnChangeWatchedPaths(wxCommandEvent &aEvent)
Called by sending a event with id = ID_INIT_WATCHED_PATHS rebuild the list of wahtched paths.
static EDA_HOTKEY HkRunLibedit(_HKI("Run LibEdit"), HK_RUN_LIBEDIT, 'L'+GR_KB_CTRL, 0)
void OnCreateProjectFromTemplate(wxCommandEvent &event)
Creates a new project folder, copy a template into this new folder.
Definition: prjconfig.cpp:278
static EDA_HOTKEY HkNewProjectFromTemplate(_HKI("New Project From Template"), HK_NEW_PRJ_TEMPLATE, 'T'+GR_KB_CTRL)
static EDA_HOTKEY HkRunModedit(_HKI("Run FpEditor"), HK_RUN_FPEDITOR, 'F'+GR_KB_CTRL, 0)
void RecreateBaseHToolbar()
(Re)Create the horizontal toolbar
static EDA_HOTKEY HkRunPleditor(_HKI("Run PlEditor"), HK_RUN_PLEDITOR, 'Y'+GR_KB_CTRL, 0)
void OnShowHotkeys(wxCommandEvent &event)
Definition: mainframe.cpp:563
void OnRunGerbview(wxCommandEvent &event)
Definition: mainframe.cpp:455
void OnArchiveFiles(wxCommandEvent &event)
PGM_KICAD & PgmTop()
Definition: kicad.cpp:72
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')
FOOTPRINT_EDIT_FRAME::OnVerticalToolbar EVT_MENU(ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST, FOOTPRINT_EDIT_FRAME::ProcessPreferences) EVT_MENU(ID_PCB_LIB_TABLE_EDIT
static wxString sectionTitle(_HKI("Kicad Manager Hotkeys"))
void OnCloseWindow(wxCloseEvent &Event)
Definition: mainframe.cpp:211
void OnRunPcbNew(wxCommandEvent &event)
Definition: mainframe.cpp:398
wxString AddHotkeyName(const wxString &aText, EDA_HOTKEY **aList, int aCommandId, HOTKEY_ACTION_TYPE aShortCutType)
Function AddHotkeyName Add the key name from the Command id value ( m_Idcommand member value)
class EDA_HOTKEY is a class to handle hot key commands.
Definition: hotkeys_basic.h:59
void ReCreateMenuBar() override
(Re)Create the menubar
static EDA_HOTKEY HkRefresh(_HKI("Refresh Project Tree"), HK_REFRESH, GR_KB_CTRL+ 'R')
void GetKicadContribute(wxCommandEvent &event)
void OnSize(wxSizeEvent &event)
Definition: mainframe.cpp:202
void OnPreferences(wxCommandEvent &aEvent)
Definition: mainframe.cpp:590
The base frame for deriving all KiCad main window classes.
static EDA_HOTKEY HkNewProject(_HKI("New Project"), HK_NEW, GR_KB_CTRL+ 'N')
void KiScaledSeparator(wxAuiToolBar *aToolbar, EDA_BASE_FRAME *aWindow)
Add a separator to the given toolbar scaled the same way as KiScaledBitmap.
Definition: bitmap.cpp:167
static constexpr int KICAD_AUI_TB_STYLE
Default style flags used for wxAUI toolbars
VTBL_ENTRY void AddMenuLanguageList(wxMenu *MasterMenu)
Function AddMenuLanguageList creates a menu list for language choice, and add it as submenu to Master...
Definition: pgm_base.cpp:815
Some functions to handle hotkeys in KiCad.
void OnUnarchiveFiles(wxCommandEvent &event)
wxString g_CommonSectionTag
void OnExit(wxCommandEvent &event)
Definition: mainframe.cpp:240
#define _HKI(x)
The main KiCad project manager frame.
Definition: kicad.h:137
ID_TO_PCB_FP_EDITOR
static EDA_HOTKEY HkHelp(_HKI("List Hotkeys"), HK_HELP, GR_KB_CTRL+WXK_F1)
void OnSaveProject(wxCommandEvent &event)
Save the project (.pro) file containing the top level configuration parameters.
Definition: prjconfig.cpp:430