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 )
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 )
56  EVT_MENU( ID_BROWSE_IN_FILE_EXPLORER, KICAD_MANAGER_FRAME::OnBrowseInFileExplorer )
60  EVT_MENU( wxID_PREFERENCES, KICAD_MANAGER_FRAME::OnPreferences )
64  EVT_MENU( wxID_HELP, KICAD_MANAGER_FRAME::GetKicadHelp )
65  EVT_MENU( wxID_INDEX, KICAD_MANAGER_FRAME::GetKicadHelp )
66  EVT_MENU( ID_HELP_GET_INVOLVED, KICAD_MANAGER_FRAME::GetKicadContribute )
67  EVT_MENU( wxID_ABOUT, KICAD_MANAGER_FRAME::GetKicadAbout )
69 
70  // Range menu events
72  KICAD_MANAGER_FRAME::language_change )
73 
75 
76  // Show hotkeys
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 
108  EVT_UPDATE_UI_RANGE( ID_TO_SCH, ID_TO_PCB_FP_EDITOR,
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( "Help (this window)" ), HK_HELP, GR_KB_CTRL + WXK_F1 );
154 
155 // List of hotkey descriptors
157 {
159  // Currently there is nothing to save
160  // (Kicad manager does not save any info in .pro file)
161 #if 0
162  &HkSaveProject,
163 #endif
164  &HkRefresh, &HkHelp,
168  NULL
169 };
170 
171 // list of sections and corresponding hotkey list for Kicad
172 // (used to create an hotkey config file, and edit hotkeys )
173 // here we have only one section.
174 static wxString sectionTitle( _HKI( "Kicad Manager Hotkeys" ) );
175 
177  { &g_CommonSectionTag, common_Hotkey_List, &sectionTitle },
178  { NULL, NULL, NULL }
179 };
181 
182 
187 {
188  wxString msg;
189  static wxMenu* openRecentMenu; // Open Recent submenu,
190  // static to remember this menu
191 
193 
194  // wxWidgets handles the Mac Application menu behind the scenes, but that means
195  // we always have to start from scratch with a new wxMenuBar.
196  wxMenuBar* oldMenuBar = GetMenuBar();
197  wxMenuBar* menuBar = new wxMenuBar();
198 
199  // Before deleting, remove the menus managed by m_fileHistory
200  // (the file history will be updated when adding/removing files in history)
201  if( openRecentMenu )
202  PgmTop().GetFileHistory().RemoveMenu( openRecentMenu );
203 
204  // Recreate all menus:
205 
206  // Menu File:
207  wxMenu* fileMenu = new wxMenu;
208 
209  // New project creation
210  wxMenu* newprjSubMenu = new wxMenu();
211  msg = AddHotkeyName( _( "&Project..." ), kicad_Manager_Hokeys_Descr, HK_NEW );
212  AddMenuItem( newprjSubMenu, ID_NEW_PROJECT, msg,
213  _( "Create new blank project" ),
214  KiBitmap( new_project_xpm ) );
215  msg = AddHotkeyName( _( "Project from &Template..." ),
216  kicad_Manager_Hokeys_Descr, HK_NEW_PRJ_TEMPLATE );
217  AddMenuItem( newprjSubMenu, ID_NEW_PROJECT_FROM_TEMPLATE, msg,
218  _( "Create new project from template" ),
219  KiBitmap( new_project_with_template_xpm ) );
220  AddMenuItem( fileMenu, newprjSubMenu,
221  wxID_ANY,
222  _( "&New" ),
223  _( "Create new project" ),
224  KiBitmap( new_project_xpm ) );
225 
226  // Open
227  msg = AddHotkeyName( _( "&Open Project..." ), kicad_Manager_Hokeys_Descr, HK_OPEN );
228  AddMenuItem( fileMenu, ID_LOAD_PROJECT, msg,
229  _( "Open an existing project" ),
230  KiBitmap( open_project_xpm ) );
231 
232  // File history
233  openRecentMenu = new wxMenu();
234  PgmTop().GetFileHistory().UseMenu( openRecentMenu );
235  PgmTop().GetFileHistory().AddFilesToMenu( );
236  AddMenuItem( fileMenu, openRecentMenu,
237  wxID_ANY,
238  _( "Open &Recent" ),
239  _( "Open a recent project" ),
240  KiBitmap( recent_xpm ) );
241 
242  // Currently there is nothing to save
243  // (Kicad manager does not save any info in .pro file)
244 #if 0
245  // Save
246  msg = AddHotkeyName( _( "&Save" ), kicad_Manager_Hokeys_Descr, HK_SAVE );
247  AddMenuItem( fileMenu, ID_SAVE_PROJECT, msg,
248  _( "Save current project" ),
249  KiBitmap( save_project_xpm ) );
250 #endif
251 
252  fileMenu->AppendSeparator();
253  wxMenu* importprjSubMenu = new wxMenu();
254 
255  AddMenuItem( importprjSubMenu, ID_IMPORT_EAGLE_PROJECT, _( "EAGLE CAD..." ),
256  _( "Import EAGLE CAD XML schematic and board" ),
257  KiBitmap( import_project_xpm ) );
258 
259 
260  AddMenuItem( fileMenu, importprjSubMenu,
261  wxID_ANY,
262  _( "Import Project" ),
263  _( "Import project files from other software" ),
264  KiBitmap( import_project_xpm ) );
265 
266 
267  fileMenu->AppendSeparator();
268 
269  // Archive
270  AddMenuItem( fileMenu,
272  _( "&Archive Project..." ),
273  _( "Archive all needed project files into zip archive" ),
274  KiBitmap( zip_xpm ) );
275 
276  // Unarchive
277  AddMenuItem( fileMenu,
279  _( "&Unarchive Project..." ),
280  _( "Unarchive project files from zip archive" ),
281  KiBitmap( unzip_xpm ) );
282 
283  // Separator
284  fileMenu->AppendSeparator();
285 
286  // Quit
287  AddMenuItem( fileMenu,
288  wxID_EXIT,
289  _( "&Exit" ),
290  _( "Close KiCad" ),
291  KiBitmap( exit_xpm ) );
292 
293  // View Menu:
294  wxMenu* viewMenu = new wxMenu();
295 
296  // Refresh project tree
297  msg = AddHotkeyName( _( "&Refresh" ), kicad_Manager_Hokeys_Descr, HK_REFRESH );
298  AddMenuItem( viewMenu, ID_PROJECT_TREE_REFRESH, msg,
299  _( "Refresh project tree" ),
300  KiBitmap( reload_xpm ) );
301 
302 #ifdef __APPLE__
303  viewMenu->AppendSeparator();
304 #endif
305 
306  // Menu Browse:
307  wxMenu* browseMenu = new wxMenu();
308 
309  // Text editor
310  AddMenuItem( browseMenu,
312  _( "Open Text E&ditor" ),
313  _( "Launch preferred text editor" ),
314  KiBitmap( editor_xpm ) );
315 
316  // View file
317  AddMenuItem( browseMenu,
319  _( "&Open Local File..." ),
320  _( "Edit local file" ),
321  KiBitmap( browse_files_xpm ) );
322 
323  // Browse in file explorer
324  browseMenu->AppendSeparator();
325  AddMenuItem( browseMenu,
327  _( "&Browse Project Files" ),
328  _( "Open project directory in file explorer" ),
329  KiBitmap( directory_browser_xpm ) );
330 
331  // Menu Preferences:
332  wxMenu* preferencesMenu = new wxMenu;
333 
334  // Path configuration edit dialog.
335  AddMenuItem( preferencesMenu,
337  _( "&Configure Paths..." ),
338  _( "Edit path configuration environment variables" ),
339  KiBitmap( path_xpm ) );
340 
341  AddMenuItem( preferencesMenu,
343  _( "Manage &Symbol Libraries..." ),
344  _( "Edit the global and project symbol library tables" ),
345  KiBitmap( library_table_xpm ) );
346 
347  AddMenuItem( preferencesMenu,
349  _( "Manage &Footprint Libraries..." ),
350  _( "Configure footprint library table" ),
351  KiBitmap( library_table_xpm ) );
352 
353  AddMenuItem( preferencesMenu,
354  wxID_PREFERENCES,
355  _( "&Preferences..." ),
356  _( "Show preferences for all open tools" ),
357  KiBitmap( preference_xpm ) );
358 
359  preferencesMenu->AppendSeparator();
360 
361  // Language submenu
362  Pgm().AddMenuLanguageList( preferencesMenu );
363 
364  // Menu Tools:
365  wxMenu* toolsMenu = new wxMenu;
366 
367  msg = AddHotkeyName( _( "Edit Schematic" ), kicad_Manager_Hokeys_Descr, HK_RUN_EESCHEMA );
368  AddMenuItem( toolsMenu, ID_TO_SCH, msg, KiBitmap( eeschema_xpm ) );
369 
370  msg = AddHotkeyName( _( "Edit Schematic Symbols" ),
371  kicad_Manager_Hokeys_Descr, HK_RUN_LIBEDIT );
372  AddMenuItem( toolsMenu, ID_TO_SCH_LIB_EDITOR, msg, KiBitmap( libedit_xpm ) );
373 
374  msg = AddHotkeyName( _( "Edit PCB" ),
375  kicad_Manager_Hokeys_Descr, HK_RUN_PCBNEW );
376  AddMenuItem( toolsMenu, ID_TO_PCB, msg, KiBitmap( pcbnew_xpm ) );
377 
378  msg = AddHotkeyName( _( "Edit PCB Footprints" ),
379  kicad_Manager_Hokeys_Descr, HK_RUN_FPEDITOR );
380  AddMenuItem( toolsMenu, ID_TO_PCB_FP_EDITOR, msg, KiBitmap( module_editor_xpm ) );
381 
382  msg = AddHotkeyName( _( "View Gerber Files" ),
383  kicad_Manager_Hokeys_Descr, HK_RUN_GERBVIEW );
384  AddMenuItem( toolsMenu, ID_TO_GERBVIEW, msg, KiBitmap( icon_gerbview_small_xpm ) );
385 
386  msg = AddHotkeyName( _( "Convert Image" ),
387  kicad_Manager_Hokeys_Descr, HK_RUN_BM2COMPONENT );
388  AddMenuItem( toolsMenu, ID_TO_BITMAP_CONVERTER, msg,
389  _( "Convert bitmap images to schematic or PCB components." ),
390  KiBitmap( bitmap2component_xpm ) );
391 
392  msg = AddHotkeyName( _( "Calculator Tools" ), kicad_Manager_Hokeys_Descr, HK_RUN_PCBCALCULATOR );
393  AddMenuItem( toolsMenu, ID_TO_PCB_CALCULATOR, msg,
394  _( "Run component calculations, track width calculations, etc." ),
395  KiBitmap( calculator_xpm ) );
396 
397  msg = AddHotkeyName( _( "Edit Worksheet" ), kicad_Manager_Hokeys_Descr, HK_RUN_PLEDITOR );
398  AddMenuItem( toolsMenu, ID_TO_PL_EDITOR, msg,
399  _( "Edit worksheet graphics and text" ),
400  KiBitmap( pagelayout_load_xpm ) );
401 
402  // Menu Help:
403  wxMenu* helpMenu = new wxMenu;
404 
405  // Contents
406  AddMenuItem( helpMenu, wxID_HELP,
407  _( "KiCad &Manual" ),
408  _( "Open KiCad user manual" ),
409  KiBitmap( online_help_xpm ) );
410 
411  AddMenuItem( helpMenu, wxID_INDEX,
412  _( "&Getting Started in KiCad" ),
413  _( "Open \"Getting Started in KiCad\" guide for beginners" ),
414  KiBitmap( help_xpm ) );
415 
416  AddMenuItem( helpMenu,
418  _( "&List Hotkeys" ),
419  _( "Displays the current hotkeys list and corresponding commands" ),
420  KiBitmap( hotkeys_xpm ) );
421 
422  // Separator
423  helpMenu->AppendSeparator();
424 
425  // Get involved with KiCad
427  _( "Get &Involved" ),
428  _( "Contribute to KiCad (opens a web browser)" ),
429  KiBitmap( info_xpm ) );
430 
431  helpMenu->AppendSeparator();
432 
433  // About
434  AddMenuItem( helpMenu, wxID_ABOUT, _( "&About KiCad" ), KiBitmap( about_xpm ) );
435 
436  // Create the menubar and append all submenus
437  menuBar->Append( fileMenu, _( "&File" ) );
438  menuBar->Append( viewMenu, _( "&View" ) );
439  menuBar->Append( toolsMenu, _( "&Tools" ) );
440  menuBar->Append( browseMenu, _( "&Browse" ) );
441  menuBar->Append( preferencesMenu, _( "&Preferences" ) );
442  menuBar->Append( helpMenu, _( "&Help" ) );
443 
444  SetMenuBar( menuBar );
445  delete oldMenuBar;
446 
447  // Add the hotkey to the "show hotkey list" menu, because we do not have
448  // a management of the keyboard keys in Kicad.
449  // So all hotheys should be added to the menubar
450  // Note Use wxMenuBar::SetLabel only after the menubar
451  // has been associated with a frame. (see wxWidgets doc)
452  msg = AddHotkeyName( menuBar->GetLabel( ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST ),
454  menuBar->SetLabel( ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST, msg );
455 }
456 
457 
462 {
463  if( m_mainToolBar )
464  m_mainToolBar->Clear();
465  else
466  m_mainToolBar = new wxAuiToolBar( this, ID_H_TOOLBAR, wxDefaultPosition, wxDefaultSize,
467  KICAD_AUI_TB_STYLE | wxAUI_TB_HORZ_LAYOUT );
468 
469  // New
470  m_mainToolBar->AddTool( ID_NEW_PROJECT, wxEmptyString,
471  KiScaledBitmap( new_project_xpm, this ),
472  _( "Create new project" ) );
473 
474  m_mainToolBar->AddTool( ID_NEW_PROJECT_FROM_TEMPLATE, wxEmptyString,
475  KiScaledBitmap( new_project_with_template_xpm, this ),
476  _( "Create new project from template" ) );
477 
478  // Load
479  m_mainToolBar->AddTool( ID_LOAD_PROJECT, wxEmptyString,
480  KiScaledBitmap( open_project_xpm, this ),
481  _( "Open existing project" ) );
482 
483  // Currently there is nothing to save
484  // (Kicad manager does not save any info in .pro file)
485 #if 0
486  // Save
487  m_mainToolBar->AddTool( ID_SAVE_PROJECT, wxEmptyString,
488  KiScaledBitmap( save_project_xpm, this ),
489  _( "Save current project" ) );
490 #endif
491 
493 
494  // Archive
495  m_mainToolBar->AddTool( ID_SAVE_AND_ZIP_FILES, wxEmptyString,
496  KiScaledBitmap( zip_xpm, this ),
497  _( "Archive all project files" ) );
498 
499  // Unarchive
500  m_mainToolBar->AddTool( ID_READ_ZIP_ARCHIVE, wxEmptyString,
501  KiScaledBitmap( unzip_xpm, this ),
502  _( "Unarchive project files from zip archive" ) );
503 
505 
506  // Refresh project tree
507  m_mainToolBar->AddTool( ID_PROJECT_TREE_REFRESH, wxEmptyString,
508  KiScaledBitmap( reload_xpm, this ),
509  _( "Refresh project tree" ) );
510 
511  // Acces to the system file manager
513  m_mainToolBar->AddTool( ID_BROWSE_IN_FILE_EXPLORER, wxEmptyString,
514  KiScaledBitmap( directory_browser_xpm, this ),
515  _( "Open project directory in file explorer" ) );
516 
517  // Create m_mainToolBar
518  m_mainToolBar->Realize();
519 }
FILE_HISTORY & GetFileHistory()
Definition: pgm_kicad.h:57
Structure EDA_HOTKEY_CONFIG contains the information required to save hot key information to a config...
Definition: hotkeys_basic.h:94
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:223
static EDA_HOTKEY HkRunGerbview(_HKI("Run Gerbview"), HK_RUN_GERBVIEW, 'G'+GR_KB_CTRL, 0)
static EDA_HOTKEY HkSaveProject(_HKI("Save Project"), HK_SAVE, GR_KB_CTRL+ 'S')
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
static EDA_HOTKEY HkNewProject(_HKI("New Project"), HK_NEW, GR_KB_CTRL+ 'N')
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
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)
static EDA_HOTKEY HkRunBm2Cmp(_HKI("Run Bitmap2Component"), HK_RUN_BM2COMPONENT, 'B'+GR_KB_CTRL, 0)
static EDA_HOTKEY HkOpenProject(_HKI("Open Project"), HK_OPEN, GR_KB_CTRL+ 'O')
struct EDA_HOTKEY_CONFIG kicad_Manager_Hokeys_Descr[]
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Construct a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:79
hotkey_id_commnand
KICAD_MANAGER_FRAME is the KiCad main frame.
EDA_HOTKEY_CONFIG * m_manager_Hokeys_Descr
Definition: kicad.h:300
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
EDA_HOTKEY * common_Hotkey_List[]
static EDA_HOTKEY HkRunLibedit(_HKI("Run LibEdit"), HK_RUN_LIBEDIT, 'L'+GR_KB_CTRL, 0)
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
EVT_TOOL(ID_FOOTPRINT_WIZARD_SELECT_WIZARD, FOOTPRINT_WIZARD_FRAME::SelectCurrentWizard) EVT_TOOL(ID_FOOTPRINT_WIZARD_RESET_TO_DEFAULT
static EDA_HOTKEY HkHelp(_HKI("Help (this window)"), HK_HELP, GR_KB_CTRL+WXK_F1)
static EDA_HOTKEY HkRunPleditor(_HKI("Run PlEditor"), HK_RUN_PLEDITOR, 'Y'+GR_KB_CTRL, 0)
wxAuiToolBar * m_mainToolBar
Standard horizontal Toolbar.
PGM_KICAD & PgmTop()
Definition: kicad.cpp:72
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"))
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
Class EDA_BASE_FRAME is the base frame for deriving all KiCad main window classes.
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:800
Some functions to handle hotkeys in KiCad.
wxString g_CommonSectionTag
#define _HKI(x)
The main KiCad project manager frame.
Definition: kicad.h:135
ID_TO_PCB_FP_EDITOR
static EDA_HOTKEY HkRefresh(_HKI("Refresh Project Tree"), HK_REFRESH, GR_KB_CTRL+ 'R')