KiCad PCB EDA Suite
menubar_pcb_editor.cpp File Reference

board editor menubars More...

#include <menus_helpers.h>
#include <kiface_i.h>
#include <pgm_base.h>
#include <pcb_edit_frame.h>
#include "help_common_strings.h"
#include "hotkeys.h"
#include "pcbnew.h"
#include "pcbnew_id.h"

Go to the source code of this file.

Functions

static void prepareFilesMenu (wxMenu *aParentMenu, bool aIsOutsideProject)
 
static void prepareExportMenu (wxMenu *aParentMenu)
 
static void prepareEditMenu (wxMenu *aParentMenu, bool aUseGal)
 
static void prepareViewMenu (wxMenu *aParentMenu, bool aUseGal)
 
static void preparePlaceMenu (wxMenu *aParentMenu)
 
static void prepareRouteMenu (wxMenu *aParentMenu)
 
static void prepareInspectMenu (wxMenu *aParentMenu)
 
static void prepareLibraryMenu (wxMenu *aParentMenu)
 
static void preparePreferencesMenu (PCB_EDIT_FRAME *aFrame, wxMenu *aParentMenu)
 
static void prepareToolsMenu (wxMenu *aParentMenu)
 
static void prepareHelpMenu (wxMenu *aParentMenu)
 

Detailed Description

board editor menubars

Definition in file menubar_pcb_editor.cpp.

Function Documentation

void prepareEditMenu ( wxMenu *  aParentMenu,
bool  aUseGal 
)
static

Definition at line 447 of file menubar_pcb_editor.cpp.

References AddHotkeyName(), AddMenuItem(), g_Board_Editor_Hotkeys_Descr, HELP_FIND, HELP_REDO, HELP_UNDO, HK_EDIT_COPY, HK_EDIT_CUT, HK_EDIT_PASTE, HK_FIND_ITEM, HK_REDO, HK_UNDO, HK_ZONE_FILL_OR_REFILL, HK_ZONE_REMOVE_FILLED, ID_EDIT_COPY, ID_EDIT_CUT, ID_EDIT_PASTE, ID_FIND_ITEMS, ID_MENU_PCB_CLEAN, ID_MENU_PCB_EDIT_TEXT_AND_GRAPHICS, ID_MENU_PCB_EXCHANGE_FOOTPRINTS, ID_MENU_PCB_SWAP_LAYERS, ID_PCB_DELETE_ITEM_BUTT, ID_PCB_EDIT_TRACKS_AND_VIAS, ID_PCB_GLOBAL_DELETE, ID_POPUP_PCB_FILL_ALL_ZONES, ID_POPUP_PCB_REMOVE_FILLED_AREAS_IN_ALL_ZONES, and KiBitmap().

Referenced by PCB_EDIT_FRAME::ReCreateMenuBar().

448 {
449  wxString text;
450 
451  text = AddHotkeyName( _( "&Undo" ), g_Board_Editor_Hotkeys_Descr, HK_UNDO );
452  AddMenuItem( aParentMenu, wxID_UNDO, text, HELP_UNDO, KiBitmap( undo_xpm ) );
453 
454  text = AddHotkeyName( _( "&Redo" ), g_Board_Editor_Hotkeys_Descr, HK_REDO );
455  AddMenuItem( aParentMenu, wxID_REDO, text, HELP_REDO, KiBitmap( redo_xpm ) );
456 
457  aParentMenu->AppendSeparator();
458 
459  if( aUseGal )
460  {
462  AddMenuItem( aParentMenu, ID_EDIT_CUT, text,
463  _( "Cuts the selected item(s) to the Clipboard" ),
464  KiBitmap( cut_xpm ) );
465 
467  AddMenuItem( aParentMenu, ID_EDIT_COPY, text,
468  _( "Copies the selected item(s) to the Clipboard" ),
469  KiBitmap( copy_xpm ) );
470 
471  text = AddHotkeyName( _( "&Paste" ), g_Board_Editor_Hotkeys_Descr, HK_EDIT_PASTE );
472  AddMenuItem( aParentMenu, ID_EDIT_PASTE, text,
473  _( "Pastes item(s) from the Clipboard" ),
474  KiBitmap( paste_xpm ) );
475  }
476 
477  AddMenuItem( aParentMenu, ID_PCB_DELETE_ITEM_BUTT,
478  _( "&Delete" ), _( "Delete items" ),
479  KiBitmap( delete_xpm ) );
480 
481  aParentMenu->AppendSeparator();
482 
483  text = AddHotkeyName( _( "&Find..." ), g_Board_Editor_Hotkeys_Descr, HK_FIND_ITEM );
484  AddMenuItem( aParentMenu, ID_FIND_ITEMS, text, HELP_FIND , KiBitmap( find_xpm ) );
485 
486  aParentMenu->AppendSeparator();
488  _( "Edit &Track && Via Properties..." ), KiBitmap( width_track_via_xpm ) );
489 
491  _( "Edit Text && &Graphic Properties..." ), KiBitmap( reset_text_xpm ) );
492 
494  _( "Change &Footprints..." ),
495  _( "Assign different footprints from the library" ),
496  KiBitmap( exchange_xpm ) );
497 
498  AddMenuItem( aParentMenu, ID_MENU_PCB_SWAP_LAYERS,
499  _( "&Swap Layers..." ),
500  _( "Move tracks or drawings from a layer to another layer" ),
501  KiBitmap( swap_layer_xpm ) );
502 
503  aParentMenu->AppendSeparator();
504 
505  text = AddHotkeyName( _( "Fill &All Zones" ), g_Board_Editor_Hotkeys_Descr,
508  text, _( "Fill all zones on the board" ),
509  KiBitmap( fill_zone_xpm ) );
510 
511  text = AddHotkeyName( _( "&Unfill All Zones" ), g_Board_Editor_Hotkeys_Descr,
514  text, _( "Remove fill from all zones on the board" ),
515  KiBitmap( zone_unfill_xpm ) );
516 
517  aParentMenu->AppendSeparator();
518 
519  AddMenuItem( aParentMenu, ID_PCB_GLOBAL_DELETE,
520  _( "&Global Deletions..." ),
521  _( "Delete tracks, footprints and graphic items from board" ),
522  KiBitmap( general_deletions_xpm ) );
523 
524  AddMenuItem( aParentMenu, ID_MENU_PCB_CLEAN,
525  _( "&Cleanup Tracks and Vias..." ),
526  _( "Clean stubs, vias, delete break points or unconnected tracks" ),
527  KiBitmap( delete_xpm ) );
528 }
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
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Construct a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:79
struct EDA_HOTKEY_CONFIG g_Board_Editor_Hotkeys_Descr[]
#define HELP_REDO
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) ...
#define HELP_UNDO
These strings are used in menus and tools, that do the same command But they are internationalized, and therefore must be created at run time, on the fly.
#define HELP_FIND
void prepareExportMenu ( wxMenu *  aParentMenu)
static

Definition at line 937 of file menubar_pcb_editor.cpp.

References AddMenuItem(), ID_GEN_EXPORT_FILE_GENCADFORMAT, ID_GEN_EXPORT_FILE_IDF3, ID_GEN_EXPORT_FILE_STEP, ID_GEN_EXPORT_FILE_VRML, ID_GEN_EXPORT_SPECCTRA, ID_GEN_PLOT_SVG, ID_PCB_GEN_CMP_FILE, and KiBitmap().

Referenced by prepareFilesMenu().

938 {
939  AddMenuItem( aParentMenu, ID_GEN_EXPORT_SPECCTRA,
940  _( "S&pecctra DSN..." ),
941  _( "Export current board to \"Specctra DSN\" file" ),
942  KiBitmap( export_dsn_xpm ) );
943 
945  _( "&GenCAD..." ), _( "Export GenCAD format" ),
946  KiBitmap( export_xpm ) );
947 
948  AddMenuItem( aParentMenu, ID_GEN_EXPORT_FILE_VRML,
949  _( "&VRML..." ),
950  _( "Export VRML board representation" ),
951  KiBitmap( export3d_xpm ) );
952 
953  AddMenuItem( aParentMenu, ID_GEN_EXPORT_FILE_IDF3,
954  _( "I&DFv3..." ), _( "IDFv3 board and symbol export" ),
955  KiBitmap( export_idf_xpm ) );
956 
957  AddMenuItem( aParentMenu, ID_GEN_EXPORT_FILE_STEP,
958  _( "S&TEP..." ), _( "STEP export" ),
959  KiBitmap( export_step_xpm ) );
960 
961  AddMenuItem( aParentMenu, ID_GEN_PLOT_SVG,
962  _( "&SVG..." ),
963  _( "Export board file in Scalable Vector Graphics format" ),
964  KiBitmap( plot_svg_xpm ) );
965 
966  AddMenuItem( aParentMenu, ID_PCB_GEN_CMP_FILE,
967  _( "&Footprint Association (.cmp) File..." ),
968  _( "Export footprint association file (*.cmp) for schematic back annotation" ),
969  KiBitmap( create_cmp_file_xpm ) );
970 }
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
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Construct a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:79
void prepareFilesMenu ( wxMenu *  aParentMenu,
bool  aIsOutsideProject 
)
static

Definition at line 729 of file menubar_pcb_editor.cpp.

References AddHotkeyName(), AddMenuItem(), g_Board_Editor_Hotkeys_Descr, KIFACE_I::GetFileHistory(), HK_NEW, HK_OPEN, HK_PRINT, HK_SAVE, HK_SAVEAS, ID_APPEND_FILE, ID_BOARD_SETUP_DIALOG, ID_COPY_BOARD_AS, ID_GEN_EXPORT_FILE, ID_GEN_EXPORT_FILE_MODULE_REPORT, ID_GEN_IMPORT_DXF_FILE, ID_GEN_IMPORT_FILE, ID_GEN_IMPORT_SPECCTRA_SESSION, ID_GEN_PLOT, ID_IMPORT_NON_KICAD_BOARD, ID_LOAD_FILE, ID_MENU_ARCHIVE_MODULES, ID_MENU_ARCHIVE_MODULES_IN_LIBRARY, ID_MENU_CREATE_LIBRARY_AND_ARCHIVE_MODULES, ID_MENU_READ_BOARD_BACKUP_FILE, ID_MENU_RECOVER_BOARD_AUTOSAVE, ID_NEW_BOARD, ID_PCB_GEN_BOM_FILE_FROM_BOARD, ID_PCB_GEN_D356_FILE, ID_PCB_GEN_DRILL_FILE, ID_PCB_GEN_POS_MODULES_FILE, ID_SAVE_BOARD, ID_SAVE_BOARD_AS, ID_SHEET_SET, KiBitmap(), Kiface(), and prepareExportMenu().

Referenced by PCB_EDIT_FRAME::ReCreateMenuBar().

730 {
731  wxString text;
732 
733  // Some commands are available only if Pcbnew is run outside a project (run alone).
734  // aIsOutsideProject is false when Pcbnew is run from Kicad manager.
735 
736  FILE_HISTORY& fhist = Kiface().GetFileHistory();
737 
738  // Load Recent submenu
739  static wxMenu* openRecentMenu;
740 
741  // Add this menu to list menu managed by m_fileHistory
742  // (the file history will be updated when adding/removing files in history
743  if( openRecentMenu )
744  fhist.RemoveMenu( openRecentMenu );
745 
746  openRecentMenu = new wxMenu();
747 
748  fhist.UseMenu( openRecentMenu );
749  fhist.AddFilesToMenu();
750 
751  if( aIsOutsideProject )
752  {
753  text = AddHotkeyName( _( "&New" ), g_Board_Editor_Hotkeys_Descr, HK_NEW );
754  AddMenuItem( aParentMenu, ID_NEW_BOARD,
755  text, _( "Create new board" ),
756  KiBitmap( new_board_xpm ) );
757 
758  text = AddHotkeyName( _( "&Open..." ), g_Board_Editor_Hotkeys_Descr, HK_OPEN );
759  AddMenuItem( aParentMenu, ID_LOAD_FILE, text,
760  _( "Open existing board" ),
761  KiBitmap( open_brd_file_xpm ) );
762 
763  AddMenuItem( aParentMenu, openRecentMenu,
764  -1, _( "Open &Recent" ),
765  _( "Open recently opened board" ),
766  KiBitmap( recent_xpm ) );
767 
768  aParentMenu->AppendSeparator();
769  }
770 
771  text = AddHotkeyName( _( "&Save" ), g_Board_Editor_Hotkeys_Descr, HK_SAVE );
772  AddMenuItem( aParentMenu, ID_SAVE_BOARD, text,
773  _( "Save current board" ),
774  KiBitmap( save_xpm ) );
775 
776  // Save as menu:
777  // under a project mgr we do not want to modify the board filename
778  // to keep consistency with the project mgr which expects files names same as prj name
779  // for main files
780  // when not under a project mgr, we are free to change filenames, cwd ...
781  if( Kiface().IsSingle() ) // not when under a project mgr (pcbnew is run as stand alone)
782  {
783  text = AddHotkeyName( _( "Sa&ve As..." ), g_Board_Editor_Hotkeys_Descr, HK_SAVEAS );
784  AddMenuItem( aParentMenu, ID_SAVE_BOARD_AS, text,
785  _( "Save current board with new name" ),
786  KiBitmap( save_as_xpm ) );
787  }
788  // under a project mgr, we can save a copy of the board,
789  // but do not change the current board file name
790  else
791  {
792  text = AddHotkeyName( _( "Sa&ve Copy As..." ), g_Board_Editor_Hotkeys_Descr, HK_SAVEAS );
793  AddMenuItem( aParentMenu, ID_COPY_BOARD_AS, text,
794  _( "Save copy of the current board" ),
795  KiBitmap( save_as_xpm ) );
796  }
797 
798  aParentMenu->AppendSeparator();
799 
801  _( "Resc&ue" ),
802  _( "Clear board and get last rescue file automatically saved by Pcbnew" ),
803  KiBitmap( rescue_xpm ) );
804 
805  if( aIsOutsideProject )
806  {
807  AddMenuItem( aParentMenu, ID_APPEND_FILE,
808  _( "&Append Board..." ),
809  _( "Append another board to currently loaded board" ),
810  KiBitmap( add_board_xpm ) );
811 
813  _( "Import Non-KiCad Board File..." ),
814  _( "Import board file from other applications" ),
815  KiBitmap( import_brd_file_xpm ) );
816  }
817 
819  _( "Revert to Las&t Backup" ),
820  _( "Clear board and get previous backup version of board" ),
821  KiBitmap( undo_xpm ) );
822 
823  aParentMenu->AppendSeparator();
824 
825  //----- Import submenu ------------------------------------------------------
826  wxMenu* submenuImport = new wxMenu();
827 
829  _( "&Specctra Session..." ),
830  _( "Import routed \"Specctra Session\" (*.ses) file" ),
831  KiBitmap( import_xpm ) );
832 
833  AddMenuItem( submenuImport, ID_GEN_IMPORT_DXF_FILE,
834  _( "&DXF File..." ),
835  _( "Import 2D Drawing DXF file to Pcbnew on Drawings layer" ),
836  KiBitmap( import_xpm ) );
837 
838  AddMenuItem( aParentMenu, submenuImport,
839  ID_GEN_IMPORT_FILE, _( "&Import" ),
840  _( "Import files" ), KiBitmap( import_xpm ) );
841 
842 
843  //----- Export submenu ------------------------------------------------------
844  wxMenu* submenuexport = new wxMenu();
845  prepareExportMenu( submenuexport );
846 
847  AddMenuItem( aParentMenu, submenuexport,
848  ID_GEN_EXPORT_FILE, _( "E&xport" ),
849  _( "Export board" ), KiBitmap( export_xpm ) );
850 
851 
852  //----- Fabrication Outputs submenu -----------------------------------------
853  wxMenu* fabricationOutputsMenu = new wxMenu;
854  AddMenuItem( fabricationOutputsMenu, ID_PCB_GEN_POS_MODULES_FILE,
855  _( "Footprint &Position (.pos) File..." ),
856  _( "Generate footprint position file for pick and place" ),
857  KiBitmap( post_compo_xpm ) );
858 
859  AddMenuItem( fabricationOutputsMenu, ID_PCB_GEN_DRILL_FILE,
860  _( "&Drill (.drl) File..." ),
861  _( "Generate excellon2 drill file" ),
862  KiBitmap( post_drill_xpm ) );
863 
864  AddMenuItem( fabricationOutputsMenu, ID_GEN_EXPORT_FILE_MODULE_REPORT,
865  _( "&Footprint (.rpt) Report..." ),
866  _( "Create report of all footprints from current board" ),
867  KiBitmap( tools_xpm ) );
868 
869  AddMenuItem( fabricationOutputsMenu, ID_PCB_GEN_D356_FILE,
870  _( "IPC-D-356 Netlist File..." ),
871  _( "Generate IPC-D-356 netlist file" ),
872  KiBitmap( netlist_xpm ) );
873 
874  AddMenuItem( fabricationOutputsMenu, ID_PCB_GEN_BOM_FILE_FROM_BOARD,
875  _( "&BOM File..." ),
876  _( "Create bill of materials from current schematic" ),
877  KiBitmap( bom_xpm ) );
878 
879  AddMenuItem( aParentMenu, fabricationOutputsMenu,
880  -1, _( "&Fabrication Outputs" ),
881  _( "Generate files for fabrication" ),
882  KiBitmap( fabrication_xpm ) );
883 
884  aParentMenu->AppendSeparator();
885 
886  AddMenuItem( aParentMenu, ID_BOARD_SETUP_DIALOG,
887  _( "&Board Setup..." ),
888  _( "Edit board setup including layers, design rules and various defaults" ),
889  KiBitmap( options_board_xpm ) );
890 
891  aParentMenu->AppendSeparator();
892 
893  AddMenuItem( aParentMenu, ID_SHEET_SET,
894  _( "Page S&ettings..." ),
895  _( "Settings for sheet size and frame references" ),
896  KiBitmap( sheetset_xpm ) );
897 
898  text = AddHotkeyName( _( "&Print..." ), g_Board_Editor_Hotkeys_Descr, HK_PRINT );
899  AddMenuItem( aParentMenu, wxID_PRINT, text,
900  _( "Print board" ),
901  KiBitmap( print_button_xpm ) );
902 
903  AddMenuItem( aParentMenu, ID_GEN_PLOT,
904  _( "P&lot..." ),
905  _( "Plot board in HPGL, PostScript or Gerber RS-274X format)" ),
906  KiBitmap( plot_xpm ) );
907 
908  aParentMenu->AppendSeparator();
909 
910  //----- archive submenu -----------------------------------------------------
911  wxMenu* submenuarchive = new wxMenu();
912 
914  _( "&Archive Footprints in Existing Library..." ),
915  _( "Archive all footprints to existing library in footprint Lib table"
916  "(does not remove other footprints in this library)" ),
917  KiBitmap( library_archive_xpm ) );
918 
920  _( "&Create New Library and Archive Footprints..." ),
921  _( "Archive all footprints to a new library\n"
922  "(if the library already exists it will be replaced)" ),
923  KiBitmap( library_archive_as_xpm ) );
924 
925  AddMenuItem( aParentMenu, submenuarchive,
927  _( "Arc&hive Footprints" ),
928  _( "Archive or add all footprints in library file" ),
929  KiBitmap( library_archive_xpm ) );
930 
931  aParentMenu->AppendSeparator();
932  AddMenuItem( aParentMenu, wxID_EXIT, _( "&Exit" ), _( "Close Pcbnew" ), KiBitmap( exit_xpm ) );
933 }
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
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.
Definition: kicad.cpp:52
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Construct a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:79
struct EDA_HOTKEY_CONFIG g_Board_Editor_Hotkeys_Descr[]
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) ...
FILE_HISTORY & GetFileHistory()
Definition: kiface_i.h:123
Definition: id.h:97
void prepareHelpMenu ( wxMenu *  aParentMenu)
static

Definition at line 414 of file menubar_pcb_editor.cpp.

References AddHotkeyName(), AddMenuItem(), g_Board_Editor_Hotkeys_Descr, HK_HELP, ID_HELP_GET_INVOLVED, ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST, and KiBitmap().

Referenced by PCB_EDIT_FRAME::ReCreateMenuBar().

415 {
416 
417  AddMenuItem( aParentMenu, wxID_HELP,
418  _( "Pcbnew &Manual" ),
419  _( "Open Pcbnew Manual" ),
420  KiBitmap( online_help_xpm ) );
421 
422  AddMenuItem( aParentMenu, wxID_INDEX,
423  _( "&Getting Started in KiCad" ),
424  _( "Open \"Getting Started in KiCad\" guide for beginners" ),
425  KiBitmap( help_xpm ) );
426 
427  wxString text = AddHotkeyName( _( "&List Hotkeys..." ), g_Board_Editor_Hotkeys_Descr, HK_HELP );
429  text,
430  _( "Display current hotkeys list and corresponding commands" ),
431  KiBitmap( hotkeys_xpm ) );
432 
433  aParentMenu->AppendSeparator();
434 
435  AddMenuItem( aParentMenu, ID_HELP_GET_INVOLVED,
436  _( "Get &Involved" ),
437  _( "Contribute to KiCad (opens a web browser)" ),
438  KiBitmap( info_xpm ) );
439 
440  aParentMenu->AppendSeparator();
441 
442  AddMenuItem( aParentMenu, wxID_ABOUT, _( "&About KiCad" ), KiBitmap( about_xpm ) );
443 }
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
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Construct a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:79
struct EDA_HOTKEY_CONFIG g_Board_Editor_Hotkeys_Descr[]
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) ...
void prepareInspectMenu ( wxMenu *  aParentMenu)
static

Definition at line 233 of file menubar_pcb_editor.cpp.

References AddHotkeyName(), AddMenuItem(), g_Board_Editor_Hotkeys_Descr, HK_MEASURE_TOOL, ID_DRC_CONTROL, ID_MENU_LIST_NETS, ID_PCB_MEASUREMENT_TOOL, and KiBitmap().

Referenced by PCB_EDIT_FRAME::ReCreateMenuBar().

234 {
235  wxString text;
236 
237  AddMenuItem( aParentMenu, ID_MENU_LIST_NETS,
238  _( "&List Nets" ),
239  _( "View list of nets with names and IDs" ),
240  KiBitmap( list_nets_xpm ) );
241 
242  text = AddHotkeyName( _( "&Measure" ), g_Board_Editor_Hotkeys_Descr, HK_MEASURE_TOOL );
243  AddMenuItem( aParentMenu, ID_PCB_MEASUREMENT_TOOL, text,
244  _( "Measure distance" ),
245  KiBitmap( measurement_xpm ) );
246 
247  aParentMenu->AppendSeparator();
248 
249  AddMenuItem( aParentMenu, ID_DRC_CONTROL,
250  _( "&Design Rules Checker" ),
251  _( "Perform design rules check" ),
252  KiBitmap( erc_xpm ) );
253 }
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
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Construct a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:79
struct EDA_HOTKEY_CONFIG g_Board_Editor_Hotkeys_Descr[]
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) ...
void prepareLibraryMenu ( wxMenu *  aParentMenu)
static

Definition at line 257 of file menubar_pcb_editor.cpp.

References AddMenuItem(), ID_PCB_3DSHAPELIB_WIZARD, ID_PCB_LIB_TABLE_EDIT, ID_PREFERENCES_CONFIGURE_PATHS, and KiBitmap().

Referenced by PCB_EDIT_FRAME::ReCreateMenuBar().

258 {
259  AddMenuItem( aParentMenu,
261  _( "&Configure Paths..." ),
262  _( "Edit path configuration environment variables" ),
263  KiBitmap( path_xpm ) );
264 
265  AddMenuItem( aParentMenu, ID_PCB_LIB_TABLE_EDIT,
266  _( "Manage &Footprint Libraries..." ),
267  _( "Edit the global and project footprint library lists" ),
268  KiBitmap( library_table_xpm ) );
269 
270 #ifdef BUILD_GITHUB_PLUGIN
272  _( "Add &3D Shapes Libraries Wizard..." ),
273  _( "Download 3D shape libraries from GitHub" ),
274  KiBitmap( import3d_xpm ) );
275 #endif
276 }
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
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Construct a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:79
void preparePlaceMenu ( wxMenu *  aParentMenu)
static

Definition at line 280 of file menubar_pcb_editor.cpp.

References AddHotkeyName(), AddMenuItem(), g_Board_Editor_Hotkeys_Descr, HK_ADD_ARC, HK_ADD_CIRCLE, HK_ADD_DIMENSION, HK_ADD_FREE_VIA, HK_ADD_KEEPOUT, HK_ADD_LINE, HK_ADD_MODULE, HK_ADD_POLYGON, HK_ADD_TEXT, HK_ADD_ZONE, ID_PCB_ADD_LINE_BUTT, ID_PCB_ADD_POLYGON_BUTT, ID_PCB_ADD_TEXT_BUTT, ID_PCB_ARC_BUTT, ID_PCB_CIRCLE_BUTT, ID_PCB_DIMENSION_BUTT, ID_PCB_DRAW_VIA_BUTT, ID_PCB_KEEPOUT_AREA_BUTT, ID_PCB_MODULE_BUTT, ID_PCB_PLACE_GRID_COORD_BUTT, ID_PCB_PLACE_OFFSET_COORD_BUTT, ID_PCB_TARGET_BUTT, ID_PCB_ZONES_BUTT, ID_POPUP_PCB_AUTOPLACE_OFF_BOARD_MODULES, ID_POPUP_PCB_AUTOPLACE_SELECTED_MODULES, KiBitmap(), and text_xpm.

Referenced by PCB_EDIT_FRAME::ReCreateMenuBar().

281 {
282  wxString text;
283 
284  text = AddHotkeyName( _( "&Footprint" ), g_Board_Editor_Hotkeys_Descr, HK_ADD_MODULE );
285  AddMenuItem( aParentMenu, ID_PCB_MODULE_BUTT, text, _( "Add footprint" ),
286  KiBitmap( module_xpm ) );
287 
289  AddMenuItem( aParentMenu, ID_PCB_DRAW_VIA_BUTT, text, _( "Add via" ),
290  KiBitmap( add_via_xpm ) );
291 
292  text = AddHotkeyName( _( "&Zone" ), g_Board_Editor_Hotkeys_Descr, HK_ADD_ZONE );
293  AddMenuItem( aParentMenu, ID_PCB_ZONES_BUTT, text, _( "Add filled zone" ),
294  KiBitmap( add_zone_xpm ) );
295 
296  text = AddHotkeyName( _( "&Keepout Area" ), g_Board_Editor_Hotkeys_Descr, HK_ADD_KEEPOUT );
297  AddMenuItem( aParentMenu, ID_PCB_KEEPOUT_AREA_BUTT, text, _( "Add keepout area" ),
298  KiBitmap( add_keepout_area_xpm ) );
299 
300  text = AddHotkeyName( _( "Te&xt" ), g_Board_Editor_Hotkeys_Descr, HK_ADD_TEXT );
301  AddMenuItem( aParentMenu, ID_PCB_ADD_TEXT_BUTT, text,
302  _( "Add text on copper layers or graphic text" ), KiBitmap( text_xpm ) );
303 
304  text = AddHotkeyName( _( "&Arc" ), g_Board_Editor_Hotkeys_Descr, HK_ADD_ARC );
305  AddMenuItem( aParentMenu, ID_PCB_ARC_BUTT, text, _( "Add graphic arc" ),
306  KiBitmap( add_arc_xpm ) );
307 
308  text = AddHotkeyName( _( "&Circle" ), g_Board_Editor_Hotkeys_Descr, HK_ADD_CIRCLE );
309  AddMenuItem( aParentMenu, ID_PCB_CIRCLE_BUTT, text, _( "Add graphic circle" ),
310  KiBitmap( add_circle_xpm ) );
311 
312  text = AddHotkeyName( _( "&Line" ), g_Board_Editor_Hotkeys_Descr, HK_ADD_LINE );
313  AddMenuItem( aParentMenu, ID_PCB_ADD_LINE_BUTT, text, _( "Add graphic line" ),
314  KiBitmap( add_graphical_segments_xpm ) );
315 
316  text = AddHotkeyName( _( "&Polygon" ), g_Board_Editor_Hotkeys_Descr, HK_ADD_POLYGON );
317  AddMenuItem( aParentMenu, ID_PCB_ADD_POLYGON_BUTT, text, _( "Add graphic polygon" ),
318  KiBitmap( add_graphical_polygon_xpm ) );
319 
320  aParentMenu->AppendSeparator();
321 
322  text = AddHotkeyName( _( "&Dimension" ), g_Board_Editor_Hotkeys_Descr, HK_ADD_DIMENSION );
323  AddMenuItem( aParentMenu, ID_PCB_DIMENSION_BUTT, text, _( "Add dimension" ),
324  KiBitmap( add_dimension_xpm ) );
325 
326  AddMenuItem( aParentMenu, ID_PCB_TARGET_BUTT, _( "La&yer Alignment Target" ),
327  _( "Add layer alignment target" ), KiBitmap( add_pcb_target_xpm ) );
328 
329  aParentMenu->AppendSeparator();
330 
332  _( "Drill and &Place Offset" ),
333  _( "Place origin point for drill and place files" ),
334  KiBitmap( pcb_offset_xpm ) );
335 
337  _( "&Grid Origin" ),
338  _( "Set grid origin point" ),
339  KiBitmap( grid_select_axis_xpm ) );
340 
341  aParentMenu->AppendSeparator();
342 
343  wxMenu* autoplaceSubmenu = new wxMenu;
345  _( "&Autoplace off-board components" ), "", KiBitmap( grid_select_axis_xpm ) // fixme: icons
346  );
347 
349  _( "&Autoplace selected components" ), "", KiBitmap( grid_select_axis_xpm ) // fixme: icons
350  );
351 
352  AddMenuItem( aParentMenu, autoplaceSubmenu,
353  -1, _( "&Auto-place" ),
354  _( "Automatic component placement" ), KiBitmap( grid_select_axis_xpm ) // fixme: icons
355  );
356 }
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
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Construct a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:79
struct EDA_HOTKEY_CONFIG g_Board_Editor_Hotkeys_Descr[]
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) ...
static const char * text_xpm[]
void preparePreferencesMenu ( PCB_EDIT_FRAME aFrame,
wxMenu *  aParentMenu 
)
static

Definition at line 152 of file menubar_pcb_editor.cpp.

References AddHotkeyName(), AddMenuItem(), PGM_BASE::AddMenuLanguageList(), g_Board_Editor_Hotkeys_Descr, HK_CANVAS_CAIRO, HK_CANVAS_LEGACY, HK_CANVAS_OPENGL, ID_MENU_CANVAS_CAIRO, ID_MENU_CANVAS_LEGACY, ID_MENU_CANVAS_OPENGL, KiBitmap(), and Pgm().

Referenced by PCB_EDIT_FRAME::ReCreateMenuBar().

153 {
154 
155  wxString text;
156 
157  AddMenuItem( aParentMenu, wxID_PREFERENCES,
158  _( "&Preferences..." ), _( "Show preferences for all open tools" ),
159  KiBitmap( preference_xpm ) );
160 
161  text = AddHotkeyName( _( "Legacy Tool&set" ), g_Board_Editor_Hotkeys_Descr,
163  AddMenuItem( aParentMenu, ID_MENU_CANVAS_LEGACY, text,
164  _( "Use Legacy Toolset (not all features will be available)" ),
165  KiBitmap( tools_xpm ), wxITEM_RADIO );
166 
167  text = AddHotkeyName( _( "Modern Toolset (&Accelerated)" ), g_Board_Editor_Hotkeys_Descr,
169  AddMenuItem( aParentMenu, ID_MENU_CANVAS_OPENGL, text,
170  _( "Use Modern Toolset with hardware-accelerated graphics (recommended)" ),
171  KiBitmap( tools_xpm ), wxITEM_RADIO );
172 
173  text = AddHotkeyName( _( "Modern Toolset (Fallba&ck)" ), g_Board_Editor_Hotkeys_Descr,
174  HK_CANVAS_CAIRO );
175  AddMenuItem( aParentMenu, ID_MENU_CANVAS_CAIRO, text,
176  _( "Use Modern Toolset with software graphics (fall-back)" ),
177  KiBitmap( tools_xpm ), wxITEM_RADIO );
178 
179  aParentMenu->AppendSeparator();
180 
181  // Language submenu
182  Pgm().AddMenuLanguageList( aParentMenu );
183 }
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
PGM_BASE & Pgm()
The global Program "get" accessor.
Definition: kicad.cpp:66
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Construct a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:79
struct EDA_HOTKEY_CONFIG g_Board_Editor_Hotkeys_Descr[]
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) ...
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
void prepareRouteMenu ( wxMenu *  aParentMenu)
static

Definition at line 187 of file menubar_pcb_editor.cpp.

References AddHotkeyName(), AddMenuItem(), g_Board_Editor_Hotkeys_Descr, HK_ADD_NEW_TRACK, HK_ROUTE_DIFF_PAIR, HK_ROUTE_TUNE_DIFF_PAIR, HK_ROUTE_TUNE_SINGLE, HK_ROUTE_TUNE_SKEW, ID_DIFF_PAIR_BUTT, ID_MENU_INTERACTIVE_ROUTER_SETTINGS, ID_TRACK_BUTT, ID_TUNE_DIFF_PAIR_LEN_BUTT, ID_TUNE_DIFF_PAIR_SKEW_BUTT, ID_TUNE_SINGLE_TRACK_LEN_BUTT, IS_ACCELERATOR, and KiBitmap().

Referenced by PCB_EDIT_FRAME::ReCreateMenuBar().

188 {
189  wxString text;
190 
191  text = AddHotkeyName( _( "&Single Track" ), g_Board_Editor_Hotkeys_Descr,
193  AddMenuItem( aParentMenu, ID_TRACK_BUTT, text,
194  _( "Interactively route single track" ),
195  KiBitmap( add_tracks_xpm ) );
196 
197  text = AddHotkeyName( _( "&Differential Pair" ), g_Board_Editor_Hotkeys_Descr,
199  AddMenuItem( aParentMenu, ID_DIFF_PAIR_BUTT, text,
200  _( "Interactively route differential pair" ),
201  KiBitmap( ps_diff_pair_xpm ) );
202 
203  aParentMenu->AppendSeparator();
204 
205  text = AddHotkeyName( _( "&Tune Track Length" ), g_Board_Editor_Hotkeys_Descr,
207  AddMenuItem( aParentMenu, ID_TUNE_SINGLE_TRACK_LEN_BUTT, text,
208  _( "Tune length of single track" ),
209  KiBitmap( ps_tune_length_xpm ) );
210 
211  text = AddHotkeyName( _( "Tune Differential Pair &Length" ), g_Board_Editor_Hotkeys_Descr,
213  AddMenuItem( aParentMenu, ID_TUNE_DIFF_PAIR_LEN_BUTT, text,
214  _( "Tune length of differential pair" ),
215  KiBitmap( ps_diff_pair_tune_length_xpm ) );
216 
217  text = AddHotkeyName( _( "Tune Differential Pair &Skew/Phase" ), g_Board_Editor_Hotkeys_Descr,
219  AddMenuItem( aParentMenu, ID_TUNE_DIFF_PAIR_SKEW_BUTT, text,
220  _( "Tune skew/phase of a differential pair" ),
221  KiBitmap( ps_diff_pair_tune_phase_xpm ) );
222 
223  aParentMenu->AppendSeparator();
224 
226  _( "&Interactive Router Settings..." ),
227  _( "Configure interactive router" ),
228  KiBitmap( tools_xpm ) );
229 }
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
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Construct a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:79
struct EDA_HOTKEY_CONFIG g_Board_Editor_Hotkeys_Descr[]
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) ...
void prepareToolsMenu ( wxMenu *  aParentMenu)
static

Definition at line 360 of file menubar_pcb_editor.cpp.

References AddMenuItem(), ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR, ID_GET_NETLIST, ID_MENU_PCB_UPDATE_FOOTPRINTS, ID_TOOLBARH_PCB_ACTION_PLUGIN, ID_TOOLBARH_PCB_ACTION_PLUGIN_REFRESH, ID_TOOLBARH_PCB_SCRIPTING_CONSOLE, ID_UPDATE_PCB_FROM_SCH, and KiBitmap().

Referenced by PCB_EDIT_FRAME::ReCreateMenuBar().

361 {
362  AddMenuItem( aParentMenu, ID_GET_NETLIST,
363  _( "Load &Netlist..." ),
364  _( "Read netlist and update board connectivity" ),
365  KiBitmap( netlist_xpm ) );
366 
367  AddMenuItem( aParentMenu,
369  _( "Update PCB from Schematic..." ),
370  _( "Update PCB design with current schematic (forward annotation)" ),
371  KiBitmap( update_pcb_from_sch_xpm ) );
372 
373  aParentMenu->AppendSeparator();
374 
376  _( "Update Footprints from Library..." ),
377  _( "Update footprints to include any changes from the library" ),
378  KiBitmap( reload_xpm ) );
379 
380  aParentMenu->AppendSeparator();
381 
383  _( "Set &Layer Pair..." ), _( "Change active layer pair" ),
384  KiBitmap( select_layer_pair_xpm ) );
385 
386 #if defined(KICAD_SCRIPTING_WXPYTHON)
388  _( "&Scripting Console" ),
389  _( "Show/Hide the Python scripting console" ),
390  KiBitmap( py_script_xpm ) );
391 #endif
392 
393 #if defined(KICAD_SCRIPTING) && defined(KICAD_SCRIPTING_ACTION_MENU)
394  aParentMenu->AppendSeparator( );
395 
396  wxMenu* submenuActionPluginsMenu = new wxMenu();
397 
398  AddMenuItem( aParentMenu, submenuActionPluginsMenu, ID_TOOLBARH_PCB_ACTION_PLUGIN,
399  _( "&External Plugins..." ),
400  _( "Execute or reload python action plugins" ),
401  KiBitmap( hammer_xpm ) );
402 
403  AddMenuItem( submenuActionPluginsMenu, ID_TOOLBARH_PCB_ACTION_PLUGIN_REFRESH,
404  _( "&Refresh Plugins" ),
405  _( "Reload all python plugins and refresh plugin menus" ),
406  KiBitmap( reload_xpm ) );
407 
408  submenuActionPluginsMenu->AppendSeparator();
409 #endif
410 }
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
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Construct a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:79
void prepareViewMenu ( wxMenu *  aParentMenu,
bool  aUseGal 
)
static

Definition at line 532 of file menubar_pcb_editor.cpp.

References AddHotkeyName(), AddMenuItem(), g_Board_Editor_Hotkeys_Descr, HELP_SHOW_HIDE_LAYERMANAGER, HELP_SHOW_HIDE_MICROWAVE_TOOLS, HELP_ZOOM_FIT, HELP_ZOOM_IN, HELP_ZOOM_OUT, HELP_ZOOM_REDRAW, HK_3D_VIEWER, HK_DEC_LAYER_ALPHA, HK_INC_LAYER_ALPHA, HK_SWITCH_HIGHCONTRAST_MODE, HK_SWITCH_TRACK_DISPLAY_MODE, HK_ZOOM_AUTO, HK_ZOOM_IN, HK_ZOOM_OUT, HK_ZOOM_REDRAW, HK_ZOOM_SELECTION, ID_DEC_LAYER_ALPHA, ID_INC_LAYER_ALPHA, ID_MENU_PCB_FLIP_VIEW, ID_MENU_PCB_SHOW_3D_FRAME, ID_OPEN_MODULE_VIEWER, ID_PCB_USER_GRID_SETUP, ID_TB_OPTIONS_SELECT_CURSOR, ID_TB_OPTIONS_SELECT_UNIT_INCH, ID_TB_OPTIONS_SELECT_UNIT_MM, ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR_MICROWAVE, ID_TB_OPTIONS_SHOW_GRAPHIC_SKETCH, ID_TB_OPTIONS_SHOW_GRID, ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE, ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR, ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH, ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH, ID_TB_OPTIONS_SHOW_PADS_SKETCH, ID_TB_OPTIONS_SHOW_POLAR_COORD, ID_TB_OPTIONS_SHOW_RATSNEST, ID_TB_OPTIONS_SHOW_TRACKS_SKETCH, ID_TB_OPTIONS_SHOW_VIAS_SKETCH, ID_TB_OPTIONS_SHOW_ZONES, ID_TB_OPTIONS_SHOW_ZONES_DISABLE, ID_TB_OPTIONS_SHOW_ZONES_OUTLINES_ONLY, ID_ZOOM_IN, ID_ZOOM_OUT, ID_ZOOM_PAGE, ID_ZOOM_REDRAW, ID_ZOOM_SELECTION, IS_ACCELERATOR, and KiBitmap().

Referenced by PCB_EDIT_FRAME::ReCreateMenuBar().

533 {
534  wxString text;
535 
537  _( "Show La&yers Manager" ),
539  KiBitmap( layers_manager_xpm ), wxITEM_CHECK );
540 
542  _( "Show Microwa&ve Toolbar" ),
544  KiBitmap( mw_toolbar_xpm ), wxITEM_CHECK );
545 
546  AddMenuItem( aParentMenu, ID_OPEN_MODULE_VIEWER,
547  _( "&Library Browser" ),
548  _( "Open the Library Browser" ),
549  KiBitmap( modview_icon_xpm ) );
550 
551  text = AddHotkeyName( _( "&3D Viewer" ), g_Board_Editor_Hotkeys_Descr, HK_3D_VIEWER );
553  text, _( "Show board in 3D viewer" ),
554  KiBitmap( three_d_xpm ) );
555 
556  aParentMenu->AppendSeparator();
557 
558  /* Important Note for ZOOM IN and ZOOM OUT commands from menubar:
559  * we cannot add hotkey info here, because the hotkey HK_ZOOM_IN and HK_ZOOM_OUT
560  * events(default = WXK_F1 and WXK_F2) are *NOT* equivalent to this menu command:
561  * zoom in and out from hotkeys are equivalent to the pop up menu zoom
562  * From here, zooming is made around the screen center
563  * From hotkeys, zooming is made around the mouse cursor position
564  * (obviously not possible from the toolbar or menubar command)
565  *
566  * in other words HK_ZOOM_IN and HK_ZOOM_OUT *are NOT* accelerators
567  * for Zoom in and Zoom out sub menus
568  */
569  text = AddHotkeyName( _( "Zoom &In" ), g_Board_Editor_Hotkeys_Descr,
571  AddMenuItem( aParentMenu, ID_ZOOM_IN, text, HELP_ZOOM_IN, KiBitmap( zoom_in_xpm ) );
572 
573  text = AddHotkeyName( _( "Zoom &Out" ), g_Board_Editor_Hotkeys_Descr,
575  AddMenuItem( aParentMenu, ID_ZOOM_OUT, text, HELP_ZOOM_OUT, KiBitmap( zoom_out_xpm ) );
576 
577  text = AddHotkeyName( _( "Zoom to &Fit" ), g_Board_Editor_Hotkeys_Descr,
578  HK_ZOOM_AUTO );
579  AddMenuItem( aParentMenu, ID_ZOOM_PAGE, text, HELP_ZOOM_FIT,
580  KiBitmap( zoom_fit_in_page_xpm ) );
581 
582  text = AddHotkeyName( _( "Zoom to Selection" ), g_Board_Editor_Hotkeys_Descr,
584  AddMenuItem( aParentMenu, ID_ZOOM_SELECTION, text, KiBitmap( zoom_area_xpm ), wxITEM_CHECK );
585 
586  text = AddHotkeyName( _( "&Redraw" ), g_Board_Editor_Hotkeys_Descr, HK_ZOOM_REDRAW );
587  AddMenuItem( aParentMenu, ID_ZOOM_REDRAW, text,
588  HELP_ZOOM_REDRAW, KiBitmap( zoom_redraw_xpm ) );
589 
590  aParentMenu->AppendSeparator();
591 
592  AddMenuItem( aParentMenu, ID_TB_OPTIONS_SHOW_GRID,
593  _( "Show &Grid" ), wxEmptyString,
594  KiBitmap( grid_xpm ), wxITEM_CHECK );
595 
596  AddMenuItem( aParentMenu, ID_PCB_USER_GRID_SETUP,
597  _( "Grid &Settings..." ),_( "Adjust custom user-defined grid dimensions" ),
598  KiBitmap( grid_xpm ) );
599 
601  _( "Display &Polar Coordinates" ), wxEmptyString,
602  KiBitmap( polar_coord_xpm ), wxITEM_CHECK );
603 
604  // Units submenu
605  wxMenu* unitsSubMenu = new wxMenu;
607  _( "&Imperial" ), _( "Use imperial units" ),
608  KiBitmap( unit_inch_xpm ), wxITEM_RADIO );
609 
611  _( "&Metric" ), _( "Use metric units" ),
612  KiBitmap( unit_mm_xpm ), wxITEM_RADIO );
613 
614  AddMenuItem( aParentMenu, unitsSubMenu,
615  -1, _( "&Units" ),
616  _( "Select which units are displayed" ),
617  KiBitmap( unit_mm_xpm ) );
618 
619 
620 #ifndef __APPLE__
622  _( "Full Window Crosshair" ),
623  _( "Change cursor shape" ),
624  KiBitmap( cursor_shape_xpm ), wxITEM_CHECK );
625 #else
627  _( "Full Window Crosshair" ),
628  _( "Change cursor shape (not supported in Legacy Toolset)" ),
629  KiBitmap( cursor_shape_xpm ), wxITEM_CHECK );
630 #endif
631 
632  aParentMenu->AppendSeparator();
633 
635  _( "Show Ratsnest" ),
636  _( "Show board ratsnest" ),
637  KiBitmap( general_ratsnest_xpm ), wxITEM_CHECK );
638 
639  aParentMenu->AppendSeparator();
640 
641  // Drawing Mode Submenu
642  wxMenu* drawingModeSubMenu = new wxMenu;
643 
644  AddMenuItem( drawingModeSubMenu, ID_TB_OPTIONS_SHOW_ZONES,
645  _( "&Fill Zones" ), _( "Show filled areas in zones" ),
646  KiBitmap( show_zone_xpm ), wxITEM_RADIO );
647 
648  AddMenuItem( drawingModeSubMenu, ID_TB_OPTIONS_SHOW_ZONES_DISABLE,
649  _( "&Wireframe Zones" ), _( "Show outlines of filled areas only in zones" ),
650  KiBitmap( show_zone_disable_xpm ), wxITEM_RADIO );
651 
653  _( "&Sketch Zones" ), _( "Do not show filled areas in zones" ),
654  KiBitmap( show_zone_outline_only_xpm ), wxITEM_RADIO );
655 
656  drawingModeSubMenu->AppendSeparator();
657 
658  AddMenuItem( drawingModeSubMenu, ID_TB_OPTIONS_SHOW_PADS_SKETCH,
659  _( "Sketch &Pads" ), _( "Show pads in outline mode" ),
660  KiBitmap( pad_sketch_xpm ), wxITEM_CHECK );
661 
662  AddMenuItem( drawingModeSubMenu, ID_TB_OPTIONS_SHOW_VIAS_SKETCH,
663  _( "Sketch &Vias" ), _( "Show vias in outline mode" ),
664  KiBitmap( via_sketch_xpm ), wxITEM_CHECK );
665 
666  text = AddHotkeyName( _( "Sketch &Tracks" ), g_Board_Editor_Hotkeys_Descr,
668  AddMenuItem( drawingModeSubMenu, ID_TB_OPTIONS_SHOW_TRACKS_SKETCH, text,
669  _( "Show tracks in outline mode" ),
670  KiBitmap( showtrack_xpm ), wxITEM_CHECK );
671 
672  AddMenuItem( drawingModeSubMenu, ID_TB_OPTIONS_SHOW_GRAPHIC_SKETCH,
673  _( "Sketch &Graphic Items" ), _( "Show graphic items in outline mode" ),
674  KiBitmap( text_sketch_xpm ), wxITEM_CHECK );
675 
677  _( "Sketch Footprint &Edges" ), _( "Show footprint edges in outline mode" ),
678  KiBitmap( show_mod_edge_xpm ), wxITEM_CHECK );
679 
681  _( "Sketch Footprint Te&xt" ), _( "Show footprint text in outline mode" ),
682  KiBitmap( text_sketch_xpm ), wxITEM_CHECK );
683 
684  AddMenuItem( aParentMenu, drawingModeSubMenu,
685  -1, _( "&Drawing Mode" ),
686  _( "Select how items are displayed" ),
687  KiBitmap( add_zone_xpm ) );
688 
689  // Contrast Mode Submenu
690  wxMenu* contrastModeSubMenu = new wxMenu;
691 
692  text = AddHotkeyName( _( "&High Contrast Mode" ), g_Board_Editor_Hotkeys_Descr,
695  text, _( "Use high contrast display mode" ),
696  KiBitmap( contrast_mode_xpm ), wxITEM_CHECK );
697 
698  contrastModeSubMenu->AppendSeparator();
699 
700  text = AddHotkeyName( _( "&Decrease Layer Opacity" ), g_Board_Editor_Hotkeys_Descr,
702  AddMenuItem( contrastModeSubMenu, ID_DEC_LAYER_ALPHA,
703  text, _( "Make the current layer more transparent" ),
704  KiBitmap( contrast_mode_xpm ) );
705 
706  text = AddHotkeyName( _( "&Increase Layer Opacity" ), g_Board_Editor_Hotkeys_Descr,
708  AddMenuItem( contrastModeSubMenu, ID_INC_LAYER_ALPHA,
709  text, _( "Make the current layer less transparent" ),
710  KiBitmap( contrast_mode_xpm ) );
711 
712  AddMenuItem( aParentMenu, contrastModeSubMenu,
713  -1, _( "&Contrast Mode" ),
714  _( "Select how items are displayed" ),
715  KiBitmap( contrast_mode_xpm ) );
716 
717  AddMenuItem( aParentMenu, ID_MENU_PCB_FLIP_VIEW,
718  _( "Flip &Board View" ),
719  _( "Flip (mirror) the board view" ),
720  KiBitmap( flip_board_xpm ), wxITEM_CHECK );
721 
722 #ifdef __APPLE__
723  aParentMenu->AppendSeparator();
724 #endif
725 }
#define HELP_SHOW_HIDE_MICROWAVE_TOOLS
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
#define HELP_ZOOM_FIT
Definition: id.h:241
#define HELP_ZOOM_OUT
#define HELP_ZOOM_REDRAW
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Construct a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:79
EDA_DRAW_FRAME::OnSelectGrid ID_TB_OPTIONS_SELECT_UNIT_INCH
struct EDA_HOTKEY_CONFIG g_Board_Editor_Hotkeys_Descr[]
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) ...
#define HELP_ZOOM_IN
#define HELP_SHOW_HIDE_LAYERMANAGER