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) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
5  * Copyright (C) 2009-2015 Wayne Stambaugh <stambaughw@verizon.net>
6  * Copyright (C) 1992-2017 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 )
44  EVT_CLOSE( KICAD_MANAGER_FRAME::OnCloseWindow )
45 
46  // Toolbar events
48  EVT_TOOL( ID_NEW_PROJECT_FROM_TEMPLATE, KICAD_MANAGER_FRAME::OnCreateProjectFromTemplate )
50 
51  // Menu events
53  EVT_MENU( wxID_EXIT, KICAD_MANAGER_FRAME::OnExit )
54  EVT_MENU( ID_TO_TEXT_EDITOR, KICAD_MANAGER_FRAME::OnOpenTextEditor )
55  EVT_MENU( ID_BROWSE_AN_SELECT_FILE, KICAD_MANAGER_FRAME::OnOpenFileInTextEditor )
57  EVT_MENU( ID_SELECT_PREFERED_EDITOR, EDA_BASE_FRAME::OnSelectPreferredEditor )
58  EVT_MENU( ID_SELECT_DEFAULT_PDF_BROWSER, KICAD_MANAGER_FRAME::OnSelectDefaultPdfBrowser )
59  EVT_MENU( ID_SELECT_PREFERED_PDF_BROWSER, KICAD_MANAGER_FRAME::OnSelectPreferredPdfBrowser )
61  KICAD_MANAGER_FRAME::OnSelectPreferredPdfBrowser )
65  EVT_MENU( wxID_HELP, KICAD_MANAGER_FRAME::GetKicadHelp )
66  EVT_MENU( wxID_INDEX, KICAD_MANAGER_FRAME::GetKicadHelp )
67  EVT_MENU( ID_HELP_GET_INVOLVED, KICAD_MANAGER_FRAME::GetKicadContribute )
68  EVT_MENU( wxID_ABOUT, KICAD_MANAGER_FRAME::GetKicadAbout )
69 
70  // Range menu events
72 
73  EVT_MENU_RANGE( wxID_FILE1, wxID_FILE9, KICAD_MANAGER_FRAME::OnFileHistory )
74 
75  // Hotkey management (show list, edit ...) events
77  KICAD_MANAGER_FRAME::Process_Config )
78 
79 
80  // Special functions
81  EVT_MENU( ID_INIT_WATCHED_PATHS, KICAD_MANAGER_FRAME::OnChangeWatchedPaths )
82 
83  // Button events (in command frame), and menu events equivalent to buttons
84  EVT_BUTTON( ID_TO_SCH, KICAD_MANAGER_FRAME::OnRunEeschema )
85  EVT_MENU( ID_TO_SCH, KICAD_MANAGER_FRAME::OnRunEeschema )
86 
87  EVT_BUTTON( ID_TO_SCH_LIB_EDITOR, KICAD_MANAGER_FRAME::OnRunSchLibEditor )
88  EVT_MENU( ID_TO_SCH_LIB_EDITOR, KICAD_MANAGER_FRAME::OnRunSchLibEditor )
89 
90  EVT_BUTTON( ID_TO_PCB, KICAD_MANAGER_FRAME::OnRunPcbNew )
91  EVT_MENU( ID_TO_PCB, KICAD_MANAGER_FRAME::OnRunPcbNew )
92 
93  EVT_BUTTON( ID_TO_PCB_FP_EDITOR, KICAD_MANAGER_FRAME::OnRunPcbFpEditor )
94  EVT_MENU( ID_TO_PCB_FP_EDITOR, KICAD_MANAGER_FRAME::OnRunPcbFpEditor )
95 
96  EVT_BUTTON( ID_TO_GERBVIEW, KICAD_MANAGER_FRAME::OnRunGerbview )
97  EVT_MENU( ID_TO_GERBVIEW, KICAD_MANAGER_FRAME::OnRunGerbview )
98 
99  EVT_BUTTON( ID_TO_BITMAP_CONVERTER, KICAD_MANAGER_FRAME::OnRunBitmapConverter )
100  EVT_MENU( ID_TO_BITMAP_CONVERTER, KICAD_MANAGER_FRAME::OnRunBitmapConverter )
101 
102  EVT_BUTTON( ID_TO_PCB_CALCULATOR, KICAD_MANAGER_FRAME::OnRunPcbCalculator )
103  EVT_MENU( ID_TO_PCB_CALCULATOR, KICAD_MANAGER_FRAME::OnRunPcbCalculator )
104 
105  EVT_BUTTON( ID_TO_PL_EDITOR, KICAD_MANAGER_FRAME::OnRunPageLayoutEditor )
106  EVT_MENU( ID_TO_PL_EDITOR, KICAD_MANAGER_FRAME::OnRunPageLayoutEditor )
107 
109  KICAD_MANAGER_FRAME::OnChangeIconsOptions )
110 
111  EVT_UPDATE_UI( ID_SELECT_DEFAULT_PDF_BROWSER, KICAD_MANAGER_FRAME::OnUpdateDefaultPdfBrowser )
112  EVT_UPDATE_UI( ID_SELECT_PREFERED_PDF_BROWSER,
113  KICAD_MANAGER_FRAME::OnUpdatePreferredPdfBrowser )
114  EVT_UPDATE_UI_RANGE( ID_TO_SCH, ID_TO_PCB_FP_EDITOR,
115  KICAD_MANAGER_FRAME::OnUpdateRequiresProject )
116 
117 END_EVENT_TABLE()
118 
120 {
121  HK_RUN_EESCHEMA = HK_COMMON_END,
122  HK_LOAD_PROJECT,
123  HK_SAVE_PROJECT,
124  HK_NEW_PRJ,
125  HK_NEW_PRJ_TEMPLATE,
126  HK_RUN_LIBEDIT,
127  HK_RUN_PCBNEW,
128  HK_RUN_FPEDITOR,
129  HK_RUN_GERBVIEW,
130  HK_RUN_BM2COMPONENT,
131  HK_RUN_PCBCALCULATOR,
132  HK_RUN_PLEDITOR
133 };
134 
136 
137 // Remark: the hotkey message info is used as keyword in hotkey config files and
138 // as comments in help windows, therefore translated only when displayed
139 // they are marked _HKI to be extracted by translation tools
140 // See hotkeys_basic.h for more info
141 
142 // hotkeys command:
143 static EDA_HOTKEY HkHelp( _HKI( "Help (this window)" ), HK_HELP, '?' );
144 static EDA_HOTKEY HkLoadPrj( _HKI( "Load project" ), HK_LOAD_PROJECT, 'O' + GR_KB_CTRL );
145 static EDA_HOTKEY HkSavePrj( _HKI( "Save project" ), HK_SAVE_PROJECT, 'S' + GR_KB_CTRL );
146 static EDA_HOTKEY HkNewProject( _HKI( "New Project" ), HK_NEW_PRJ, 'N' + GR_KB_CTRL );
147 static EDA_HOTKEY HkNewPrjFromTemplate( _HKI( "New Prj From Template" ),
148  HK_NEW_PRJ_TEMPLATE, 'T' + GR_KB_CTRL );
149 
150 static EDA_HOTKEY HkRunEeschema( _HKI( "Run Eeschema" ), HK_RUN_EESCHEMA, 'E' + GR_KB_CTRL, 0 );
151 static EDA_HOTKEY HkRunLibedit( _HKI( "Run LibEdit" ), HK_RUN_LIBEDIT, 'L' + GR_KB_CTRL, 0 );
152 static EDA_HOTKEY HkRunPcbnew( _HKI( "Run Pcbnew" ), HK_RUN_PCBNEW, 'P' + GR_KB_CTRL, 0 );
153 static EDA_HOTKEY HkRunModedit( _HKI( "Run FpEditor" ), HK_RUN_FPEDITOR, 'F' + GR_KB_CTRL, 0 );
154 static EDA_HOTKEY HkRunGerbview( _HKI( "Run Gerbview" ), HK_RUN_GERBVIEW, 'G' + GR_KB_CTRL, 0 );
155 static EDA_HOTKEY HkRunBm2Cmp( _HKI( "Run Bitmap2Component" ),
156  HK_RUN_BM2COMPONENT, 'B' + GR_KB_CTRL, 0 );
157 static EDA_HOTKEY HkRunPcbCalc( _HKI( "Run PcbCalculator" ),
158  HK_RUN_PCBCALCULATOR, 'A' + GR_KB_CTRL, 0 );
159 static EDA_HOTKEY HkRunPleditor( _HKI( "Run PlEditor" ), HK_RUN_PLEDITOR, 'Y' + GR_KB_CTRL, 0 );
160 
161 // List of hotkey descriptors
163 {
164  &HkHelp,
169  NULL
170 };
171 
172 // list of sections and corresponding hotkey list for Kicad
173 // (used to create an hotkey config file, and edit hotkeys )
174 // here we have only one section.
175 static wxString sectionTitle( _HKI( "Kicad Manager Hotkeys" ) );
176 
179  { NULL, NULL, NULL }
180 };
182 
183 
188 {
189  wxString msg;
190  static wxMenu* openRecentMenu; // Open Recent submenu,
191  // static to remember this menu
192 
194 
195  // Create and try to get the current menubar
196  wxMenuBar* menuBar = GetMenuBar();
197 
198  if( !menuBar )
199  menuBar = new wxMenuBar();
200 
201  // Delete all existing menus so they can be rebuilt.
202  // This allows language changes of the menu text on the fly.
203  menuBar->Freeze();
204 
205  // Before deleting, remove the menus managed by m_fileHistory
206  // (the file history will be updated when adding/removing files in history)
207  if( openRecentMenu )
208  PgmTop().GetFileHistory().RemoveMenu( openRecentMenu );
209 
210  // Delete all existing menus
211  while( menuBar->GetMenuCount() )
212  delete menuBar->Remove( 0 );
213 
214  // Recreate all menus:
215 
216  // Menu File:
217  wxMenu* fileMenu = new wxMenu;
218 
219  // Open
220  msg = AddHotkeyName( _( "&Open Project" ), kicad_Manager_Hokeys_Descr, HK_LOAD_PROJECT );
221  AddMenuItem( fileMenu, ID_LOAD_PROJECT, msg,
222  _( "Open existing project" ),
223  KiBitmap( open_project_xpm ) );
224 
225  // File history
226  openRecentMenu = new wxMenu();
227  PgmTop().GetFileHistory().UseMenu( openRecentMenu );
228  PgmTop().GetFileHistory().AddFilesToMenu( );
229  AddMenuItem( fileMenu, openRecentMenu,
230  wxID_ANY,
231  _( "Open &Recent" ),
232  _( "Open recent schematic project" ),
233  KiBitmap( recent_xpm ) );
234 
235  // New project creation
236  wxMenu* newprjSubMenu = new wxMenu();
237 
238  msg = AddHotkeyName( _( "&New Project" ), kicad_Manager_Hokeys_Descr, HK_NEW_PRJ );
239  AddMenuItem( newprjSubMenu, ID_NEW_PROJECT, msg,
240  _( "Create new blank project" ),
241  KiBitmap( new_project_xpm ) );
242 
243  msg = AddHotkeyName( _( "New Project from &Template" ),
244  kicad_Manager_Hokeys_Descr, HK_NEW_PRJ_TEMPLATE );
245  AddMenuItem( newprjSubMenu, ID_NEW_PROJECT_FROM_TEMPLATE, msg,
246  _( "Create new project from template" ),
247  KiBitmap( new_project_with_template_xpm ) );
248 
249  AddMenuItem( fileMenu, newprjSubMenu,
250  wxID_ANY,
251  _( "New Project" ),
252  _( "Create new project" ),
253  KiBitmap( new_project_xpm ) );
254 
255  // Currently there is nothing to save
256  // (Kicad manager does not save any info in .pro file)
257 #if 0
258  // Save
259  msg = AddHotkeyName( _( "&Save" ), kicad_Manager_Hokeys_Descr, HK_SAVE_PROJECT );
260  AddMenuItem( fileMenu, ID_SAVE_PROJECT, msg,
261  _( "Save current project" ),
262  KiBitmap( save_project_xpm ) );
263 #endif
264 
265  // Archive
266  fileMenu->AppendSeparator();
267  AddMenuItem( fileMenu,
269  _( "&Archive Current Project" ),
270  _( "Archive all needed project files into zip archive" ),
271  KiBitmap( zip_xpm ) );
272 
273  // Unarchive
274  AddMenuItem( fileMenu,
276  _( "&Unarchive Project" ),
277  _( "Unarchive project files from zip archive" ),
278  KiBitmap( unzip_xpm ) );
279 
280  // Separator
281  fileMenu->AppendSeparator();
282 
283  // Quit
284  AddMenuItem( fileMenu,
285  wxID_EXIT,
286  _( "&Close" ),
287  _( "Close KiCad" ),
288  KiBitmap( exit_xpm ) );
289 
290  // Menu Browse:
291  wxMenu* browseMenu = new wxMenu();
292 
293  // Text editor
294  AddMenuItem( browseMenu,
296  _( "Open Text E&ditor" ),
297  _( "Launch preferred text editor" ),
298  KiBitmap( editor_xpm ) );
299 
300  // View file
301  AddMenuItem( browseMenu,
303  _( "&Open Local File" ),
304  _( "Edit local file" ),
305  KiBitmap( browse_files_xpm ) );
306 
307  // Menu Preferences:
308  wxMenu* preferencesMenu = new wxMenu;
309 
310  // Path configuration edit dialog.
311  AddMenuItem( preferencesMenu,
313  _( "Configure Pa&ths" ),
314  _( "Edit path configuration environment variables" ),
315  KiBitmap( path_xpm ) );
316 
317  // Text editor
318  AddMenuItem( preferencesMenu,
320  _( "&Set Text Editor" ),
321  _( "Set your preferred text editor" ),
322  KiBitmap( editor_xpm ) );
323 
324  // PDF Viewer submenu:System browser or user defined checkbox
325  wxMenu* SubMenuPdfBrowserChoice = new wxMenu;
326 
327  // Default
328  AddMenuItem( SubMenuPdfBrowserChoice, ID_SELECT_DEFAULT_PDF_BROWSER,
329  _( "System &Default PDF Viewer" ),
330  _( "Use system default PDF viewer" ),
331  KiBitmap( datasheet_xpm ),
332  wxITEM_CHECK );
333  SubMenuPdfBrowserChoice->Check( ID_SELECT_DEFAULT_PDF_BROWSER,
334  Pgm().UseSystemPdfBrowser() );
335 
336  // Favourite
337  AddMenuItem( SubMenuPdfBrowserChoice, ID_SELECT_PREFERED_PDF_BROWSER,
338  _( "&Favourite PDF Viewer" ),
339  _( "Use favourite PDF viewer" ),
340  KiBitmap( datasheet_xpm ),
341  wxITEM_CHECK );
342  SubMenuPdfBrowserChoice->Check( ID_SELECT_PREFERED_PDF_BROWSER,
343  !Pgm().UseSystemPdfBrowser() );
344 
345  SubMenuPdfBrowserChoice->AppendSeparator();
346  // Append PDF Viewer submenu to preferences
347  AddMenuItem( SubMenuPdfBrowserChoice,
349  _( "Set &PDF Viewer" ),
350  _( "Set favourite PDF viewer" ),
351  KiBitmap( datasheet_xpm ) );
352 
353  // PDF viewer submenu
354  AddMenuItem( preferencesMenu, SubMenuPdfBrowserChoice, -1,
355  _( "&PDF Viewer" ),
356  _( "PDF viewer preferences" ),
357  KiBitmap( datasheet_xpm ) );
358 
359  // Hotkey submenu
360  preferencesMenu->AppendSeparator();
361  AddHotkeyConfigMenu( preferencesMenu );
362 
363  // Language submenu
364  preferencesMenu->AppendSeparator();
365  Pgm().AddMenuLanguageList( preferencesMenu );
366 
367  // Icons options submenu
368  preferencesMenu->AppendSeparator();
369  AddMenuIconsOptions( preferencesMenu );
370 
371  // Menu Tools:
372  wxMenu* toolsMenu = new wxMenu;
373 
374  msg = AddHotkeyName( _( "Run Eeschema" ), kicad_Manager_Hokeys_Descr, HK_RUN_EESCHEMA );
375  AddMenuItem( toolsMenu, ID_TO_SCH, msg, KiBitmap( eeschema_xpm ) );
376 
377  msg = AddHotkeyName( _( "Run Library Editor" ),
378  kicad_Manager_Hokeys_Descr, HK_RUN_LIBEDIT );
379  AddMenuItem( toolsMenu, ID_TO_SCH_LIB_EDITOR, msg, KiBitmap( libedit_xpm ) );
380 
381  msg = AddHotkeyName( _( "Run Pcbnew" ),
382  kicad_Manager_Hokeys_Descr, HK_RUN_PCBNEW );
383  AddMenuItem( toolsMenu, ID_TO_PCB, msg, KiBitmap( pcbnew_xpm ) );
384 
385  msg = AddHotkeyName( _( "Run Footprint Editor" ),
386  kicad_Manager_Hokeys_Descr, HK_RUN_FPEDITOR );
387  AddMenuItem( toolsMenu, ID_TO_PCB_FP_EDITOR, msg, KiBitmap( module_editor_xpm ) );
388 
389  msg = AddHotkeyName( _( "Run Gerbview" ),
390  kicad_Manager_Hokeys_Descr, HK_RUN_GERBVIEW );
391  AddMenuItem( toolsMenu, ID_TO_GERBVIEW, msg, KiBitmap( icon_gerbview_small_xpm ) );
392 
393  msg = AddHotkeyName( _( "Run Bitmap2Component" ),
394  kicad_Manager_Hokeys_Descr, HK_RUN_BM2COMPONENT );
395  AddMenuItem( toolsMenu, ID_TO_BITMAP_CONVERTER, msg,
396  _( "Bitmap2Component - Convert bitmap images to Eeschema\n"
397  "or Pcbnew elements" ),
398  KiBitmap( image_xpm ) );
399 
400  msg = AddHotkeyName( _( "Run Pcb Calculator" ), kicad_Manager_Hokeys_Descr, HK_RUN_PCBCALCULATOR );
401  AddMenuItem( toolsMenu, ID_TO_PCB_CALCULATOR, msg,
402  _( "Pcb calculator - Calculator for components, track width, etc." ),
403  KiBitmap( pcbcalculator_xpm ) );
404 
405  msg = AddHotkeyName( _( "Run Page Layout Editor" ), kicad_Manager_Hokeys_Descr, HK_RUN_PLEDITOR );
406  AddMenuItem( toolsMenu, ID_TO_PL_EDITOR, msg,
407  _( "Pl editor - Worksheet layout editor" ),
408  KiBitmap( pagelayout_load_xpm ) );
409 
410  // Menu Help:
411  wxMenu* helpMenu = new wxMenu;
412 
413  // Contents
414  AddMenuItem( helpMenu, wxID_HELP,
415  _( "KiCad &Manual" ),
416  _( "Open KiCad user manual" ),
417  KiBitmap( online_help_xpm ) );
418 
419  AddMenuItem( helpMenu, wxID_INDEX,
420  _( "&Getting Started in KiCad" ),
421  _( "Open \"Getting Started in KiCad\" guide for beginners" ),
422  KiBitmap( help_xpm ) );
423 
424  AddMenuItem( helpMenu,
426  _( "&List Hotkeys" ),
427  _( "Displays the current hotkeys list and corresponding commands" ),
428  KiBitmap( hotkeys_xpm ) );
429 
430  // Separator
431  helpMenu->AppendSeparator();
432 
433  // Get involved with KiCad
435  _( "Get &Involved" ),
436  _( "Contribute to KiCad (opens a web browser)" ),
437  KiBitmap( info_xpm ) );
438 
439  helpMenu->AppendSeparator();
440 
441  // About
442  AddMenuItem( helpMenu, wxID_ABOUT,
443  _( "&About KiCad" ),
444  _( "About KiCad" ),
445  KiBitmap( about_xpm ) );
446 
447  // Create the menubar and append all submenus
448  menuBar->Append( fileMenu, _( "&File" ) );
449  menuBar->Append( browseMenu, _( "&Browse" ) );
450  menuBar->Append( preferencesMenu, _( "&Preferences" ) );
451  menuBar->Append( toolsMenu, _( "&Tools" ) );
452  menuBar->Append( helpMenu, _( "&Help" ) );
453 
454  menuBar->Thaw();
455 
456  // Associate the menu bar with the frame, if no previous menubar
457  if( GetMenuBar() == NULL )
458  SetMenuBar( menuBar );
459  else
460  menuBar->Refresh();
461 
462  // Add the hotkey to the "show hotkey list" menu, because we do not have
463  // a management of the keyboard keys in Kicad.
464  // So all hotheys should be added to the menubar
465  // Note Use wxMenuBar::SetLabel only after the menubar
466  // has been associated with a frame. (see wxWidgets doc)
467  msg = AddHotkeyName( menuBar->GetLabel( ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST ),
469  menuBar->SetLabel( ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST, msg );
470 }
471 
472 
477 {
478  // Check if toolbar is not already created
479  if( m_mainToolBar != NULL )
480  return;
481 
482  // Allocate memory for m_mainToolBar
483  m_mainToolBar = new wxAuiToolBar( this, ID_H_TOOLBAR, wxDefaultPosition, wxDefaultSize,
484  wxAUI_TB_DEFAULT_STYLE | wxAUI_TB_HORZ_LAYOUT );
485 
486  // New
487  m_mainToolBar->AddTool( ID_NEW_PROJECT, wxEmptyString,
488  KiBitmap( new_project_xpm ),
489  _( "Create new project" ) );
490 
491  m_mainToolBar->AddTool( ID_NEW_PROJECT_FROM_TEMPLATE, wxEmptyString,
492  KiBitmap( new_project_with_template_xpm ),
493  _( "Create new project from template" ) );
494 
495  // Load
496  m_mainToolBar->AddTool( ID_LOAD_PROJECT, wxEmptyString,
497  KiBitmap( open_project_xpm ),
498  _( "Open existing project" ) );
499 
500  // Save
501  m_mainToolBar->AddTool( ID_SAVE_PROJECT, wxEmptyString,
502  KiBitmap( save_project_xpm ),
503  _( "Save current project" ) );
504 
505  // Separator
506  m_mainToolBar->AddSeparator();
507 
508  // Archive
509  m_mainToolBar->AddTool( ID_SAVE_AND_ZIP_FILES, wxEmptyString,
510  KiBitmap( zip_xpm ),
511  _( "Archive all project files" ) );
512 
513  // Separator
514  m_mainToolBar->AddSeparator();
515 
516  // Refresh project tree
517  m_mainToolBar->AddTool( ID_PROJECT_TREE_REFRESH, wxEmptyString,
518  KiBitmap( reload_xpm ),
519  _( "Refresh project tree" ) );
520 
521  // Create m_mainToolBar
522  m_mainToolBar->Realize();
523 }
KICAD_MANAGER_FRAME::Process_Config KICAD_MANAGER_FRAME::OnUpdatePreferredPdfBrowser EVT_UPDATE_UI_RANGE(ID_TO_SCH, ID_TO_PCB_FP_EDITOR, KICAD_MANAGER_FRAME::OnUpdateRequiresProject) enum hotkey_id_commnand
Structure EDA_HOTKEY_CONFIG contains the information required to save hot key information to a config...
Definition: hotkeys_basic.h:87
KICAD_MANAGER_FRAME::Process_Config EVT_MENU_RANGE(ID_KICAD_SELECT_ICONS_OPTIONS, ID_KICAD_SELECT_ICON_OPTIONS_END, KICAD_MANAGER_FRAME::OnChangeIconsOptions) EVT_UPDATE_UI(ID_SELECT_PREFERED_PDF_BROWSER
static EDA_HOTKEY HkRunPcbnew(_HKI("Run Pcbnew"), HK_RUN_PCBNEW, 'P'+GR_KB_CTRL, 0)
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:55
static EDA_HOTKEY HkHelp(_HKI("Help (this window)"), HK_HELP, '?')
static EDA_HOTKEY HkRunGerbview(_HKI("Run Gerbview"), HK_RUN_GERBVIEW, 'G'+GR_KB_CTRL, 0)
static EDA_HOTKEY HkNewPrjFromTemplate(_HKI("New Prj From Template"), HK_NEW_PRJ_TEMPLATE, 'T'+GR_KB_CTRL)
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:65
static EDA_HOTKEY HkRunEeschema(_HKI("Run Eeschema"), HK_RUN_EESCHEMA, 'E'+GR_KB_CTRL, 0)
static EDA_HOTKEY HkRunBm2Cmp(_HKI("Run Bitmap2Component"), HK_RUN_BM2COMPONENT, 'B'+GR_KB_CTRL, 0)
struct EDA_HOTKEY_CONFIG kicad_Manager_Hokeys_Descr[]
static EDA_HOTKEY HkLoadPrj(_HKI("Load project"), HK_LOAD_PROJECT, 'O'+GR_KB_CTRL)
EVT_MENU(ID_SELECT_PREFERED_PDF_BROWSER_NAME, KICAD_MANAGER_FRAME::OnSelectPreferredPdfBrowser) EVT_MENU_RANGE(ID_PREFERENCES_HOTKEY_START
FOOTPRINT_EDIT_FRAME::Process_Special_Functions FOOTPRINT_EDIT_FRAME::ProcessPreferences FOOTPRINT_EDIT_FRAME::ProcessPreferences FOOTPRINT_EDIT_FRAME::ProcessPreferences FOOTPRINT_EDIT_FRAME::ProcessPreferences FOOTPRINT_EDIT_FRAME::Process_Special_Functions FOOTPRINT_EDIT_FRAME::Process_Special_Functions FOOTPRINT_EDIT_FRAME::Process_Special_Functions EVT_UPDATE_UI(ID_MODEDIT_CREATE_NEW_LIB_AND_SAVE_CURRENT_PART, FOOTPRINT_EDIT_FRAME::OnUpdateModuleSelected) EVT_UPDATE_UI(ID_MODEDIT_LOAD_MODULE_FROM_BOARD
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Function KiBitmap constructs a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:36
hotkey_id_commnand
KICAD_MANAGER_FRAME is the KiCad main frame.
EDA_HOTKEY_CONFIG * m_manager_Hokeys_Descr
Definition: kicad.h:300
EDA_HOTKEY * common_Hotkey_List[]
ID_PREFERENCES_HOTKEY_END
static EDA_HOTKEY HkRunLibedit(_HKI("Run LibEdit"), HK_RUN_LIBEDIT, 'L'+GR_KB_CTRL, 0)
static EDA_HOTKEY HkSavePrj(_HKI("Save project"), HK_SAVE_PROJECT, 'S'+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
EVT_TOOL(ID_FOOTPRINT_WIZARD_SELECT_WIZARD, FOOTPRINT_WIZARD_FRAME::SelectCurrentWizard) EVT_TOOL(ID_FOOTPRINT_WIZARD_RESET_TO_DEFAULT
static EDA_HOTKEY HkRunPleditor(_HKI("Run PlEditor"), HK_RUN_PLEDITOR, 'Y'+GR_KB_CTRL, 0)
wxAuiToolBar * m_mainToolBar
Standard horizontal Toolbar.
Definition: wxstruct.h:136
PGM_KICAD & PgmTop()
Definition: kicad.cpp:71
static wxString sectionTitle(_HKI("Kicad Manager Hotkeys"))
void AddHotkeyConfigMenu(wxMenu *aMenu)
void AddMenuIconsOptions(wxMenu *MasterMenu)
Function AddMenuIconsOptions creates a menu list for icons in menu and icon sizes choice...
Definition: basicframe.cpp:671
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:57
void ReCreateMenuBar() override
(Re)Create the menubar
Class EDA_BASE_FRAME is the base frame for deriving all KiCad main window classes.
Definition: wxstruct.h:113
static EDA_HOTKEY HkNewProject(_HKI("New Project"), HK_NEW_PRJ, 'N'+GR_KB_CTRL)
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:816
Some functions to handle hotkeys in KiCad.
wxString g_CommonSectionTag
wxFileHistory & GetFileHistory()
Definition: pgm_kicad.h:57
#define GR_KB_CTRL
Definition: common.h:64
#define _HKI(x)
Class KICAD_MANAGER_FRAME is the main KiCad project manager frame.
Definition: kicad.h:137