KiCad PCB EDA Suite
menubar_pcb_editor.cpp File Reference

board editor menubars More...

#include <pcb_edit_frame.h>
#include <advanced_config.h>
#include <kiface_i.h>
#include <menus_helpers.h>
#include <pgm_base.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 449 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().

450 {
451  wxString text;
452 
453  text = AddHotkeyName( _( "&Undo" ), g_Board_Editor_Hotkeys_Descr, HK_UNDO );
454  AddMenuItem( aParentMenu, wxID_UNDO, text, HELP_UNDO, KiBitmap( undo_xpm ) );
455 
456  text = AddHotkeyName( _( "&Redo" ), g_Board_Editor_Hotkeys_Descr, HK_REDO );
457  AddMenuItem( aParentMenu, wxID_REDO, text, HELP_REDO, KiBitmap( redo_xpm ) );
458 
459  aParentMenu->AppendSeparator();
460 
461  if( aUseGal )
462  {
464  AddMenuItem( aParentMenu, ID_EDIT_CUT, text,
465  _( "Cuts the selected item(s) to the Clipboard" ),
466  KiBitmap( cut_xpm ) );
467 
469  AddMenuItem( aParentMenu, ID_EDIT_COPY, text,
470  _( "Copies the selected item(s) to the Clipboard" ),
471  KiBitmap( copy_xpm ) );
472 
473  text = AddHotkeyName( _( "&Paste" ), g_Board_Editor_Hotkeys_Descr, HK_EDIT_PASTE );
474  AddMenuItem( aParentMenu, ID_EDIT_PASTE, text,
475  _( "Pastes item(s) from the Clipboard" ),
476  KiBitmap( paste_xpm ) );
477  }
478 
479  AddMenuItem( aParentMenu, ID_PCB_DELETE_ITEM_BUTT,
480  _( "&Delete" ), _( "Delete items" ),
481  KiBitmap( delete_xpm ) );
482 
483  aParentMenu->AppendSeparator();
484 
485  text = AddHotkeyName( _( "&Find..." ), g_Board_Editor_Hotkeys_Descr, HK_FIND_ITEM );
486  AddMenuItem( aParentMenu, ID_FIND_ITEMS, text, HELP_FIND , KiBitmap( find_xpm ) );
487 
488  aParentMenu->AppendSeparator();
490  _( "Edit &Track && Via Properties..." ), KiBitmap( width_track_via_xpm ) );
491 
493  _( "Edit Text && &Graphic Properties..." ), KiBitmap( reset_text_xpm ) );
494 
496  _( "Change &Footprints..." ),
497  _( "Assign different footprints from the library" ),
498  KiBitmap( exchange_xpm ) );
499 
500  AddMenuItem( aParentMenu, ID_MENU_PCB_SWAP_LAYERS,
501  _( "&Swap Layers..." ),
502  _( "Move tracks or drawings from a layer to another layer" ),
503  KiBitmap( swap_layer_xpm ) );
504 
505  aParentMenu->AppendSeparator();
506 
507  text = AddHotkeyName( _( "Fill &All Zones" ), g_Board_Editor_Hotkeys_Descr,
510  text, _( "Fill all zones on the board" ),
511  KiBitmap( fill_zone_xpm ) );
512 
513  text = AddHotkeyName( _( "&Unfill All Zones" ), g_Board_Editor_Hotkeys_Descr,
516  text, _( "Remove fill from all zones on the board" ),
517  KiBitmap( zone_unfill_xpm ) );
518 
519  aParentMenu->AppendSeparator();
520 
521  AddMenuItem( aParentMenu, ID_PCB_GLOBAL_DELETE,
522  _( "&Global Deletions..." ),
523  _( "Delete tracks, footprints and graphic items from board" ),
524  KiBitmap( general_deletions_xpm ) );
525 
526  AddMenuItem( aParentMenu, ID_MENU_PCB_CLEAN,
527  _( "&Cleanup Tracks and Vias..." ),
528  _( "Clean stubs, vias, delete break points or unconnected tracks" ),
529  KiBitmap( delete_xpm ) );
530 }
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 939 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().

940 {
941  AddMenuItem( aParentMenu, ID_GEN_EXPORT_SPECCTRA,
942  _( "S&pecctra DSN..." ),
943  _( "Export current board to \"Specctra DSN\" file" ),
944  KiBitmap( export_dsn_xpm ) );
945 
947  _( "&GenCAD..." ), _( "Export GenCAD format" ),
948  KiBitmap( export_xpm ) );
949 
950  AddMenuItem( aParentMenu, ID_GEN_EXPORT_FILE_VRML,
951  _( "&VRML..." ),
952  _( "Export VRML board representation" ),
953  KiBitmap( export3d_xpm ) );
954 
955  AddMenuItem( aParentMenu, ID_GEN_EXPORT_FILE_IDF3,
956  _( "I&DFv3..." ), _( "IDFv3 board and symbol export" ),
957  KiBitmap( export_idf_xpm ) );
958 
959  AddMenuItem( aParentMenu, ID_GEN_EXPORT_FILE_STEP,
960  _( "S&TEP..." ), _( "STEP export" ),
961  KiBitmap( export_step_xpm ) );
962 
963  AddMenuItem( aParentMenu, ID_GEN_PLOT_SVG,
964  _( "&SVG..." ),
965  _( "Export board file in Scalable Vector Graphics format" ),
966  KiBitmap( plot_svg_xpm ) );
967 
968  AddMenuItem( aParentMenu, ID_PCB_GEN_CMP_FILE,
969  _( "&Footprint Association (.cmp) File..." ),
970  _( "Export footprint association file (*.cmp) for schematic back annotation" ),
971  KiBitmap( create_cmp_file_xpm ) );
972 }
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 731 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_FILE, ID_GEN_IMPORT_GRAPHICS_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().

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

417 {
418 
419  AddMenuItem( aParentMenu, wxID_HELP,
420  _( "Pcbnew &Manual" ),
421  _( "Open Pcbnew Manual" ),
422  KiBitmap( online_help_xpm ) );
423 
424  AddMenuItem( aParentMenu, wxID_INDEX,
425  _( "&Getting Started in KiCad" ),
426  _( "Open \"Getting Started in KiCad\" guide for beginners" ),
427  KiBitmap( help_xpm ) );
428 
429  wxString text = AddHotkeyName( _( "&List Hotkeys..." ), g_Board_Editor_Hotkeys_Descr, HK_HELP );
431  text,
432  _( "Display current hotkeys list and corresponding commands" ),
433  KiBitmap( hotkeys_xpm ) );
434 
435  aParentMenu->AppendSeparator();
436 
437  AddMenuItem( aParentMenu, ID_HELP_GET_INVOLVED,
438  _( "Get &Involved" ),
439  _( "Contribute to KiCad (opens a web browser)" ),
440  KiBitmap( info_xpm ) );
441 
442  aParentMenu->AppendSeparator();
443 
444  AddMenuItem( aParentMenu, wxID_ABOUT, _( "&About KiCad" ), KiBitmap( about_xpm ) );
445 }
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 235 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().

236 {
237  wxString text;
238 
239  AddMenuItem( aParentMenu, ID_MENU_LIST_NETS,
240  _( "&List Nets" ),
241  _( "View list of nets with names and IDs" ),
242  KiBitmap( list_nets_xpm ) );
243 
244  text = AddHotkeyName( _( "&Measure" ), g_Board_Editor_Hotkeys_Descr, HK_MEASURE_TOOL );
245  AddMenuItem( aParentMenu, ID_PCB_MEASUREMENT_TOOL, text,
246  _( "Measure distance" ),
247  KiBitmap( measurement_xpm ) );
248 
249  aParentMenu->AppendSeparator();
250 
251  AddMenuItem( aParentMenu, ID_DRC_CONTROL,
252  _( "&Design Rules Checker" ),
253  _( "Perform design rules check" ),
254  KiBitmap( erc_xpm ) );
255 }
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 259 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().

260 {
261  AddMenuItem( aParentMenu,
263  _( "&Configure Paths..." ),
264  _( "Edit path configuration environment variables" ),
265  KiBitmap( path_xpm ) );
266 
267  AddMenuItem( aParentMenu, ID_PCB_LIB_TABLE_EDIT,
268  _( "Manage &Footprint Libraries..." ),
269  _( "Edit the global and project footprint library lists" ),
270  KiBitmap( library_table_xpm ) );
271 
272 #ifdef BUILD_GITHUB_PLUGIN
274  _( "Add &3D Shapes Libraries Wizard..." ),
275  _( "Download 3D shape libraries from GitHub" ),
276  KiBitmap( import3d_xpm ) );
277 #endif
278 }
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 282 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().

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

References AddHotkeyName(), AddMenuItem(), PGM_BASE::AddMenuLanguageList(), g_Board_Editor_Hotkeys_Descr, ADVANCED_CFG::GetCfg(), 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().

152 {
153 
154  wxString text;
155 
156  AddMenuItem( aParentMenu, wxID_PREFERENCES,
157  _( "&Preferences..." ), _( "Show preferences for all open tools" ),
158  KiBitmap( preference_xpm ) );
159 
160  if( ADVANCED_CFG::GetCfg().AllowLegacyCanvas() )
161  {
162  text = AddHotkeyName(
163  _( "Legacy Tool&set" ), g_Board_Editor_Hotkeys_Descr, HK_CANVAS_LEGACY );
164  AddMenuItem( aParentMenu, ID_MENU_CANVAS_LEGACY, text,
165  _( "Use Legacy Toolset (not all features will be available)" ),
166  KiBitmap( tools_xpm ), wxITEM_RADIO );
167  }
168 
169  text = AddHotkeyName( _( "Modern Toolset (&Accelerated)" ), g_Board_Editor_Hotkeys_Descr,
171  AddMenuItem( aParentMenu, ID_MENU_CANVAS_OPENGL, text,
172  _( "Use Modern Toolset with hardware-accelerated graphics (recommended)" ),
173  KiBitmap( tools_xpm ), wxITEM_RADIO );
174 
175  text = AddHotkeyName( _( "Modern Toolset (Fallba&ck)" ), g_Board_Editor_Hotkeys_Descr,
176  HK_CANVAS_CAIRO );
177  AddMenuItem( aParentMenu, ID_MENU_CANVAS_CAIRO, text,
178  _( "Use Modern Toolset with software graphics (fall-back)" ),
179  KiBitmap( tools_xpm ), wxITEM_RADIO );
180 
181  aParentMenu->AppendSeparator();
182 
183  // Language submenu
184  Pgm().AddMenuLanguageList( aParentMenu );
185 }
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) ...
static const ADVANCED_CFG & GetCfg()
Get the singleton instance&#39;s config, which is shared by all consumers of advanced config...
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:807
void prepareRouteMenu ( wxMenu *  aParentMenu)
static

Definition at line 189 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().

190 {
191  wxString text;
192 
193  text = AddHotkeyName( _( "&Single Track" ), g_Board_Editor_Hotkeys_Descr,
195  AddMenuItem( aParentMenu, ID_TRACK_BUTT, text,
196  _( "Interactively route single track" ),
197  KiBitmap( add_tracks_xpm ) );
198 
199  text = AddHotkeyName( _( "&Differential Pair" ), g_Board_Editor_Hotkeys_Descr,
201  AddMenuItem( aParentMenu, ID_DIFF_PAIR_BUTT, text,
202  _( "Interactively route differential pair" ),
203  KiBitmap( ps_diff_pair_xpm ) );
204 
205  aParentMenu->AppendSeparator();
206 
207  text = AddHotkeyName( _( "&Tune Track Length" ), g_Board_Editor_Hotkeys_Descr,
209  AddMenuItem( aParentMenu, ID_TUNE_SINGLE_TRACK_LEN_BUTT, text,
210  _( "Tune length of single track" ),
211  KiBitmap( ps_tune_length_xpm ) );
212 
213  text = AddHotkeyName( _( "Tune Differential Pair &Length" ), g_Board_Editor_Hotkeys_Descr,
215  AddMenuItem( aParentMenu, ID_TUNE_DIFF_PAIR_LEN_BUTT, text,
216  _( "Tune length of differential pair" ),
217  KiBitmap( ps_diff_pair_tune_length_xpm ) );
218 
219  text = AddHotkeyName( _( "Tune Differential Pair &Skew/Phase" ), g_Board_Editor_Hotkeys_Descr,
221  AddMenuItem( aParentMenu, ID_TUNE_DIFF_PAIR_SKEW_BUTT, text,
222  _( "Tune skew/phase of a differential pair" ),
223  KiBitmap( ps_diff_pair_tune_phase_xpm ) );
224 
225  aParentMenu->AppendSeparator();
226 
228  _( "&Interactive Router Settings..." ),
229  _( "Configure interactive router" ),
230  KiBitmap( tools_xpm ) );
231 }
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 362 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().

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

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