KiCad PCB EDA Suite
id.h File Reference

Go to the source code of this file.

Macros

#define ROOM_FOR_KICADMANAGER   50
 Common command IDs shared by more than one of the KiCad applications. More...
 
#define ROOM_FOR_3D_VIEWER   100
 
#define ROOM_FOR_PANEL_PREV_MODEL   50
 

Enumerations

enum  main_id {
  ID_RUN_PCB = wxID_HIGHEST, ID_RUN_PCB_MODULE_EDITOR, ID_RUN_CVPCB, ID_RUN_LIBRARY,
  ID_LOAD_PROJECT, ID_APPEND_PROJECT, ID_NEW_PROJECT, ID_NEW_PROJECT_FROM_TEMPLATE,
  ID_SAVE_PROJECT, ID_SAVE_PROJECT_AS, ID_LOAD_FILE, ID_APPEND_FILE,
  ID_NEW_BOARD, ID_SAVE_BOARD, ID_SAVE_BOARD_AS, ID_AUTO_SAVE_TIMER,
  ID_CONFIG_REQ, ID_CONFIG_SAVE, ID_CONFIG_READ, ID_MENU_CANVAS_LEGACY,
  ID_MENU_CANVAS_OPENGL, ID_MENU_CANVAS_CAIRO, ID_PREFERENCES_HOTKEY_START, ID_PREFERENCES_HOTKEY_EXPORT_CONFIG,
  ID_PREFERENCES_HOTKEY_IMPORT_CONFIG, ID_PREFERENCES_HOTKEY_SHOW_EDITOR, ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST, ID_PREFERENCES_HOTKEY_END,
  ID_PREFERENCES_CONFIGURE_PATHS, ID_GEN_PLOT, ID_GEN_PLOT_PS, ID_GEN_PLOT_HPGL,
  ID_GEN_PLOT_GERBER, ID_GEN_PLOT_SVG, ID_GEN_PLOT_DXF, ID_GEN_PLOT_PDF,
  ID_GEN_COPY_SHEET_TO_CLIPBOARD, ID_GEN_COPY_BLOCK_TO_CLIPBOARD, ID_GEN_EXPORT_FILE, ID_GEN_IMPORT_FILE,
  ID_EXIT, ID_OPTIONS_SETUP, ID_H_TOOLBAR, ID_V_TOOLBAR,
  ID_OPT_TOOLBAR, ID_AUX_TOOLBAR, ID_EDIT, ID_NO_TOOL_SELECTED,
  ID_ZOOM_SELECTION, ID_MENU_ZOOM_SELECTION, ID_SEL_BG_COLOR, ID_REPEAT_BUTT,
  ID_LANGUAGE_CHOICE, ID_LANGUAGE_DEFAULT, ID_LANGUAGE_ENGLISH, ID_LANGUAGE_FRENCH,
  ID_LANGUAGE_FINNISH, ID_LANGUAGE_SPANISH, ID_LANGUAGE_GERMAN, ID_LANGUAGE_GREEK,
  ID_LANGUAGE_RUSSIAN, ID_LANGUAGE_PORTUGUESE, ID_LANGUAGE_ITALIAN, ID_LANGUAGE_SLOVENIAN,
  ID_LANGUAGE_SLOVAK, ID_LANGUAGE_HUNGARIAN, ID_LANGUAGE_POLISH, ID_LANGUAGE_CZECH,
  ID_LANGUAGE_KOREAN, ID_LANGUAGE_CATALAN, ID_LANGUAGE_CHINESE_SIMPLIFIED, ID_LANGUAGE_DUTCH,
  ID_LANGUAGE_JAPANESE, ID_LANGUAGE_BULGARIAN, ID_LANGUAGE_LITHUANIAN, ID_LANGUAGE_CHOICE_END,
  ID_KICAD_SELECT_ICONS_OPTIONS, ID_KICAD_SELECT_ICONS_IN_MENUS, ID_KICAD_SELECT_ICON_OPTIONS_END, ID_SET_REPEAT_OPTION,
  ID_POPUP_GENERAL_START_RANGE, ID_POPUP_CANCEL_CURRENT_COMMAND, ID_POPUP_CLOSE_CURRENT_TOOL, ID_POPUP_MOVE_BLOCK,
  ID_POPUP_MOVE_BLOCK_EXACT, ID_POPUP_DRAG_BLOCK, ID_POPUP_COPY_BLOCK, ID_POPUP_CUT_BLOCK,
  ID_POPUP_DUPLICATE_BLOCK, ID_POPUP_ROTATE_BLOCK, ID_POPUP_DELETE_BLOCK, ID_POPUP_FLIP_BLOCK,
  ID_POPUP_PLACE_BLOCK, ID_POPUP_ZOOM_BLOCK, ID_POPUP_SELECT_ITEMS_BLOCK, ID_POPUP_MIRROR_X_BLOCK,
  ID_POPUP_MIRROR_Y_BLOCK, ID_POPUP_OTHER_COMMANDS, ID_POPUP_GENERAL_END_RANGE, ID_POPUP_ENTER_MENU,
  ID_ON_ZOOM_SELECT, ID_POPUP_ZOOM_START_RANGE, ID_POPUP_CANCEL, ID_POPUP_ZOOM_IN,
  ID_POPUP_ZOOM_OUT, ID_POPUP_ZOOM_SELECT, ID_POPUP_ZOOM_CENTER, ID_POPUP_ZOOM_PAGE,
  ID_POPUP_ZOOM_REDRAW, ID_KEY_ZOOM_IN, ID_KEY_ZOOM_OUT, ID_POPUP_ZOOM_LEVEL_START,
  ID_POPUP_ZOOM_LEVEL_END = ID_POPUP_ZOOM_LEVEL_START + 32, ID_POPUP_ZOOM_END_RANGE, ID_ON_GRID_SELECT, ID_POPUP_GRID_PLUS,
  ID_POPUP_GRID_MOINS, ID_POPUP_GRID_SELECT, ID_POPUP_GRID_LEVEL_1000, ID_POPUP_GRID_LEVEL_500,
  ID_POPUP_GRID_LEVEL_250, ID_POPUP_GRID_LEVEL_200, ID_POPUP_GRID_LEVEL_100, ID_POPUP_GRID_LEVEL_50,
  ID_POPUP_GRID_LEVEL_25, ID_POPUP_GRID_LEVEL_20, ID_POPUP_GRID_LEVEL_10, ID_POPUP_GRID_LEVEL_5,
  ID_POPUP_GRID_LEVEL_2, ID_POPUP_GRID_LEVEL_1, ID_POPUP_GRID_LEVEL_5MM, ID_POPUP_GRID_LEVEL_2_5MM,
  ID_POPUP_GRID_LEVEL_1MM, ID_POPUP_GRID_LEVEL_0_5MM, ID_POPUP_GRID_LEVEL_0_25MM, ID_POPUP_GRID_LEVEL_0_2MM,
  ID_POPUP_GRID_LEVEL_0_1MM, ID_POPUP_GRID_LEVEL_0_0_5MM, ID_POPUP_GRID_LEVEL_0_0_25MM, ID_POPUP_GRID_LEVEL_0_0_1MM,
  ID_POPUP_GRID_USER, ID_SHEET_SET, ID_COMPONENT_BUTT, ID_ZOOM_BEGIN,
  ID_ZOOM_IN = ID_ZOOM_BEGIN, ID_ZOOM_OUT, ID_ZOOM_PAGE, ID_ZOOM_REDRAW,
  ID_VIEWER_ZOOM_IN, ID_VIEWER_ZOOM_OUT, ID_VIEWER_ZOOM_PAGE, ID_VIEWER_ZOOM_REDRAW,
  ID_OFFCENTER_ZOOM_IN, ID_OFFCENTER_ZOOM_OUT, ID_ZOOM_END, ID_PAN_UP,
  ID_PAN_DOWN, ID_PAN_LEFT, ID_PAN_RIGHT, ID_MOUSE_DOUBLECLICK,
  ID_GET_NETLIST, ID_OPEN_CMP_TABLE, ID_GET_TOOLS, ID_FIND_ITEMS,
  ID_EDA_SOCKET_EVENT_SERV, ID_EDA_SOCKET_EVENT, ID_TB_OPTIONS_SELECT_UNIT_MM, ID_TB_OPTIONS_SELECT_UNIT_INCH,
  ID_TB_OPTIONS_SELECT_CURSOR, ID_TB_OPTIONS_SHOW_POLAR_COORD, ID_TB_OPTIONS_SHOW_GRID, ID_HELP_GET_INVOLVED,
  ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH, ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH, ID_TB_OPTIONS_SHOW_GRAPHIC_SKETCH, ID_TB_OPTIONS_SHOW_PADS_SKETCH,
  ID_DIALOG_ERC, ID_KICAD_MANAGER_START, ID_KICAD_MANAGER_END = ID_KICAD_MANAGER_START + ROOM_FOR_KICADMANAGER, ID_KICAD_3D_VIEWER_START,
  ID_KICAD_3D_VIEWER_END = ID_KICAD_3D_VIEWER_START + ROOM_FOR_3D_VIEWER, ID_KICAD_PANEL_PREV_MODEL_START, ID_KICAD_PANEL_PREV_MODEL_END = ID_KICAD_PANEL_PREV_MODEL_START + ROOM_FOR_PANEL_PREV_MODEL, ID_END_LIST
}
 

Macro Definition Documentation

#define ROOM_FOR_3D_VIEWER   100

Definition at line 61 of file id.h.

#define ROOM_FOR_KICADMANAGER   50

Common command IDs shared by more than one of the KiCad applications.

Only place command IDs used in base window class event tables or shared across multple applications such as the zoom, grid, and language IDs. Application specific IDs should be defined in the appropriate header file to prevent the entire project from being rebuilt.

However, we must avoid duplicate IDs in menus and toolbar items, when wxUpdateUIEvent are associated to menuitems and/or toolbar items The reason is the fact wxWidgets try to send a wxUpdateUIEvent event to a given window and, if a wxUpdateUIEvent event function is not defined for a menuitem, wxWidgets propagates this event ID to parents of the given window. Therefore duplicate IDs could create strange behavior in menus and subtle bugs, depending on the code inside the wxUpdateUIEvent event functions called in parent frames. I did not seen this propagation to child frames, only to parent frames

Issues exist only if 2 menus have the same ID, and only one menu is associated to a wxUpdateUIEvent event, and this one is defined in a parent Window. The probability it happens is low, but not null.

Therefore we reserve room in ID list for each sub application. Please, change these values if needed

Definition at line 60 of file id.h.

#define ROOM_FOR_PANEL_PREV_MODEL   50

Definition at line 62 of file id.h.

Enumeration Type Documentation

enum main_id
Enumerator
ID_RUN_PCB 
ID_RUN_PCB_MODULE_EDITOR 
ID_RUN_CVPCB 
ID_RUN_LIBRARY 
ID_LOAD_PROJECT 
ID_APPEND_PROJECT 
ID_NEW_PROJECT 
ID_NEW_PROJECT_FROM_TEMPLATE 
ID_SAVE_PROJECT 
ID_SAVE_PROJECT_AS 
ID_LOAD_FILE 
ID_APPEND_FILE 
ID_NEW_BOARD 
ID_SAVE_BOARD 
ID_SAVE_BOARD_AS 
ID_AUTO_SAVE_TIMER 
ID_CONFIG_REQ 
ID_CONFIG_SAVE 
ID_CONFIG_READ 
ID_MENU_CANVAS_LEGACY 
ID_MENU_CANVAS_OPENGL 
ID_MENU_CANVAS_CAIRO 
ID_PREFERENCES_HOTKEY_START 
ID_PREFERENCES_HOTKEY_EXPORT_CONFIG 
ID_PREFERENCES_HOTKEY_IMPORT_CONFIG 
ID_PREFERENCES_HOTKEY_SHOW_EDITOR 
ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST 
ID_PREFERENCES_HOTKEY_END 
ID_PREFERENCES_CONFIGURE_PATHS 
ID_GEN_PLOT 
ID_GEN_PLOT_PS 
ID_GEN_PLOT_HPGL 
ID_GEN_PLOT_GERBER 
ID_GEN_PLOT_SVG 
ID_GEN_PLOT_DXF 
ID_GEN_PLOT_PDF 
ID_GEN_COPY_SHEET_TO_CLIPBOARD 
ID_GEN_COPY_BLOCK_TO_CLIPBOARD 
ID_GEN_EXPORT_FILE 
ID_GEN_IMPORT_FILE 
ID_EXIT 
ID_OPTIONS_SETUP 
ID_H_TOOLBAR 
ID_V_TOOLBAR 
ID_OPT_TOOLBAR 
ID_AUX_TOOLBAR 
ID_EDIT 
ID_NO_TOOL_SELECTED 
ID_ZOOM_SELECTION 
ID_MENU_ZOOM_SELECTION 
ID_SEL_BG_COLOR 
ID_REPEAT_BUTT 
ID_LANGUAGE_CHOICE 
ID_LANGUAGE_DEFAULT 
ID_LANGUAGE_ENGLISH 
ID_LANGUAGE_FRENCH 
ID_LANGUAGE_FINNISH 
ID_LANGUAGE_SPANISH 
ID_LANGUAGE_GERMAN 
ID_LANGUAGE_GREEK 
ID_LANGUAGE_RUSSIAN 
ID_LANGUAGE_PORTUGUESE 
ID_LANGUAGE_ITALIAN 
ID_LANGUAGE_SLOVENIAN 
ID_LANGUAGE_SLOVAK 
ID_LANGUAGE_HUNGARIAN 
ID_LANGUAGE_POLISH 
ID_LANGUAGE_CZECH 
ID_LANGUAGE_KOREAN 
ID_LANGUAGE_CATALAN 
ID_LANGUAGE_CHINESE_SIMPLIFIED 
ID_LANGUAGE_DUTCH 
ID_LANGUAGE_JAPANESE 
ID_LANGUAGE_BULGARIAN 
ID_LANGUAGE_LITHUANIAN 
ID_LANGUAGE_CHOICE_END 
ID_KICAD_SELECT_ICONS_OPTIONS 
ID_KICAD_SELECT_ICONS_IN_MENUS 
ID_KICAD_SELECT_ICON_OPTIONS_END 
ID_SET_REPEAT_OPTION 
ID_POPUP_GENERAL_START_RANGE 
ID_POPUP_CANCEL_CURRENT_COMMAND 
ID_POPUP_CLOSE_CURRENT_TOOL 
ID_POPUP_MOVE_BLOCK 
ID_POPUP_MOVE_BLOCK_EXACT 
ID_POPUP_DRAG_BLOCK 
ID_POPUP_COPY_BLOCK 
ID_POPUP_CUT_BLOCK 
ID_POPUP_DUPLICATE_BLOCK 
ID_POPUP_ROTATE_BLOCK 
ID_POPUP_DELETE_BLOCK 
ID_POPUP_FLIP_BLOCK 
ID_POPUP_PLACE_BLOCK 
ID_POPUP_ZOOM_BLOCK 
ID_POPUP_SELECT_ITEMS_BLOCK 
ID_POPUP_MIRROR_X_BLOCK 
ID_POPUP_MIRROR_Y_BLOCK 
ID_POPUP_OTHER_COMMANDS 
ID_POPUP_GENERAL_END_RANGE 
ID_POPUP_ENTER_MENU 
ID_ON_ZOOM_SELECT 
ID_POPUP_ZOOM_START_RANGE 
ID_POPUP_CANCEL 
ID_POPUP_ZOOM_IN 
ID_POPUP_ZOOM_OUT 
ID_POPUP_ZOOM_SELECT 
ID_POPUP_ZOOM_CENTER 
ID_POPUP_ZOOM_PAGE 
ID_POPUP_ZOOM_REDRAW 
ID_KEY_ZOOM_IN 
ID_KEY_ZOOM_OUT 
ID_POPUP_ZOOM_LEVEL_START 
ID_POPUP_ZOOM_LEVEL_END 
ID_POPUP_ZOOM_END_RANGE 
ID_ON_GRID_SELECT 
ID_POPUP_GRID_PLUS 
ID_POPUP_GRID_MOINS 
ID_POPUP_GRID_SELECT 
ID_POPUP_GRID_LEVEL_1000 
ID_POPUP_GRID_LEVEL_500 
ID_POPUP_GRID_LEVEL_250 
ID_POPUP_GRID_LEVEL_200 
ID_POPUP_GRID_LEVEL_100 
ID_POPUP_GRID_LEVEL_50 
ID_POPUP_GRID_LEVEL_25 
ID_POPUP_GRID_LEVEL_20 
ID_POPUP_GRID_LEVEL_10 
ID_POPUP_GRID_LEVEL_5 
ID_POPUP_GRID_LEVEL_2 
ID_POPUP_GRID_LEVEL_1 
ID_POPUP_GRID_LEVEL_5MM 
ID_POPUP_GRID_LEVEL_2_5MM 
ID_POPUP_GRID_LEVEL_1MM 
ID_POPUP_GRID_LEVEL_0_5MM 
ID_POPUP_GRID_LEVEL_0_25MM 
ID_POPUP_GRID_LEVEL_0_2MM 
ID_POPUP_GRID_LEVEL_0_1MM 
ID_POPUP_GRID_LEVEL_0_0_5MM 
ID_POPUP_GRID_LEVEL_0_0_25MM 
ID_POPUP_GRID_LEVEL_0_0_1MM 
ID_POPUP_GRID_USER 
ID_SHEET_SET 
ID_COMPONENT_BUTT 
ID_ZOOM_BEGIN 
ID_ZOOM_IN 
ID_ZOOM_OUT 
ID_ZOOM_PAGE 
ID_ZOOM_REDRAW 
ID_VIEWER_ZOOM_IN 
ID_VIEWER_ZOOM_OUT 
ID_VIEWER_ZOOM_PAGE 
ID_VIEWER_ZOOM_REDRAW 
ID_OFFCENTER_ZOOM_IN 
ID_OFFCENTER_ZOOM_OUT 
ID_ZOOM_END 
ID_PAN_UP 
ID_PAN_DOWN 
ID_PAN_LEFT 
ID_PAN_RIGHT 
ID_MOUSE_DOUBLECLICK 
ID_GET_NETLIST 
ID_OPEN_CMP_TABLE 
ID_GET_TOOLS 
ID_FIND_ITEMS 
ID_EDA_SOCKET_EVENT_SERV 
ID_EDA_SOCKET_EVENT 
ID_TB_OPTIONS_SELECT_UNIT_MM 
ID_TB_OPTIONS_SELECT_UNIT_INCH 
ID_TB_OPTIONS_SELECT_CURSOR 
ID_TB_OPTIONS_SHOW_POLAR_COORD 
ID_TB_OPTIONS_SHOW_GRID 
ID_HELP_GET_INVOLVED 
ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH 
ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH 
ID_TB_OPTIONS_SHOW_GRAPHIC_SKETCH 
ID_TB_OPTIONS_SHOW_PADS_SKETCH 
ID_DIALOG_ERC 

eeschema ERC modeless dialog ID

ID_KICAD_MANAGER_START 
ID_KICAD_MANAGER_END 
ID_KICAD_3D_VIEWER_START 
ID_KICAD_3D_VIEWER_END 
ID_KICAD_PANEL_PREV_MODEL_START 
ID_KICAD_PANEL_PREV_MODEL_END 
ID_END_LIST 

Definition at line 64 of file id.h.

65 {
66  ID_RUN_PCB = wxID_HIGHEST,
69  ID_RUN_LIBRARY, // pcbnew & eeschema each use this internally to load their respective lib editors
70 
83 
87 
91 
99 
100  ID_GEN_PLOT,
109 
112 
113  ID_EXIT,
115 
116  // id for toolbars
117  ID_H_TOOLBAR,
118  ID_V_TOOLBAR,
121 
122  ID_EDIT,
125  ID_MENU_ZOOM_SELECTION, // similar to ID_ZOOM_SELECTION, used in main memubar
127 
129 
154 
158 
160 
161  // Popup Menu (mouse Right button) (id consecutifs)
162 
163  ID_POPUP_GENERAL_START_RANGE, // first number
181  ID_POPUP_GENERAL_END_RANGE, // last number
182 
184 
186  ID_POPUP_ZOOM_START_RANGE, // first zoom id
194 
197 
198  /* Reserve IDs for popup menu zoom levels. If you need more
199  * levels of zoom, change ID_POPUP_ZOOM_LEVEL_END. Note that more
200  * than 15 entries in a context submenu may get too large to display
201  * cleanly. Add any additional popup zoom IDs above here or the
202  * zoom event handler will not work properly.
203  * currently room is provided for 32 levels (this is a very large value).
204  * Pcbnew use 18 values. For schematic 15 is enought
205  */
207  ID_POPUP_ZOOM_LEVEL_END = ID_POPUP_ZOOM_LEVEL_START + 32,
208  ID_POPUP_ZOOM_END_RANGE, // last zoom id
209 
214  ID_POPUP_GRID_LEVEL_1000, // id for first predefined grid in inches (1000 * 0.0001 inch)
225  ID_POPUP_GRID_LEVEL_1, // id for last predefined grid in inches ( 0.0001 inch)
228  ID_POPUP_GRID_LEVEL_1MM, // id for first predefined grid in mm (1mm)
237 
238  ID_SHEET_SET,
240 
243  ID_ZOOM_OUT,
244  ID_ZOOM_PAGE,
250  // zoom commands for non center zooming
253  ID_ZOOM_END,
254 
255  // Panning command event IDs.
256  ID_PAN_UP,
257  ID_PAN_DOWN,
258  ID_PAN_LEFT,
259  ID_PAN_RIGHT,
260 
262 
265  ID_GET_TOOLS,
267 
270 
271  // Common to all
278 
279  // Common to Pcbnew and CvPcb
284 
285  ID_DIALOG_ERC,
286 
287  // IDs specifics to a sub-application (Eeschema, Kicad manager....) start here
288  //
289  // We reserve here Ids for each sub-application, to avoid duplicate IDs
290  // between them.
291  // mainly we experienced issues related to wxUpdateUIEvent calls when 2 (or more) wxFrames
292  // share the same ID in menus, mainly in menubars/toolbars
293  // The reason is the fact wxWidgets propagates the wxUpdateUIEvent to all parent windows
294  // to find wxUpdateUIEvent event functions matching the menuitem IDs found when activate a
295  // menu in the first frame.
296 
297  // Reserve ROOM_FOR_KICADMANAGER IDs, for Kicad manager
298  // Change it if this count is too small.
300  ID_KICAD_MANAGER_END = ID_KICAD_MANAGER_START + ROOM_FOR_KICADMANAGER,
301 
302  // Reserve ROOM_FOR_KICADMANAGER IDs, for Kicad manager
303  // Change it if this count is too small.
305  ID_KICAD_3D_VIEWER_END = ID_KICAD_3D_VIEWER_START + ROOM_FOR_3D_VIEWER,
306 
308  ID_KICAD_PANEL_PREV_MODEL_END = ID_KICAD_PANEL_PREV_MODEL_START + ROOM_FOR_PANEL_PREV_MODEL,
309 
311 };
#define ROOM_FOR_PANEL_PREV_MODEL
Definition: id.h:62
#define ROOM_FOR_3D_VIEWER
Definition: id.h:61
Definition: id.h:242
Definition: id.h:66
#define ROOM_FOR_KICADMANAGER
Common command IDs shared by more than one of the KiCad applications.
Definition: id.h:60
Definition: id.h:113
Definition: id.h:122
eeschema ERC modeless dialog ID
Definition: id.h:285
Definition: id.h:256