KiCad PCB EDA Suite
id.h
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
5  * Copyright (C) 2009-2016 Wayne Stambaugh <stambaughw@verizon.net>
6  * Copyright (C) 1992-2017 KiCad Developers, see AUTHORS.txt for contributors.
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, you may find one here:
20  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21  * or you may search the http://www.gnu.org website for the version 2 license,
22  * or you may write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24  */
25 
31 #ifndef ID_H_
32 #define ID_H_
33 
34 #include <wx/defs.h>
35 
61 // Define room for IDs, for each sub application
62 #define ROOM_FOR_KICADMANAGER 50
63 #define ROOM_FOR_3D_VIEWER 100
64 #define ROOM_FOR_PANEL_PREV_MODEL 50
65 
66 
69 #define DEFAULT_FILE_HISTORY_SIZE 9
70 #define MAX_FILE_HISTORY_SIZE 99
71 
72 enum main_id
73 {
74  ID_RUN_PCB = wxID_HIGHEST,
75 
85 
86  // ID for menuitems used in our file history management,
87  // when we do not use wxFILE_ID (restricted to 9 items)
91 
94 
99 
107 
110 
112 
113  // id for toolbars
118 
123 
149 
153 
154  // Popup Menu (mouse Right button) (id consecutifs)
155 
157  ID_POPUP_ZOOM_START_RANGE, // first zoom id
165 
168 
169  /* Reserve IDs for popup menu zoom levels. If you need more
170  * levels of zoom, change ID_POPUP_ZOOM_LEVEL_END. Note that more
171  * than 15 entries in a context submenu may get too large to display
172  * cleanly. Add any additional popup zoom IDs above here or the
173  * zoom event handler will not work properly.
174  * currently room is provided for 32 levels (this is a very large value).
175  * Pcbnew use 18 values. For schematic 15 is enought
176  */
179  ID_POPUP_ZOOM_END_RANGE, // last zoom id
180 
184  ID_POPUP_GRID_LEVEL_1000 = ID_POPUP_GRID_FIRST, // These must be in same order as menu
209 
211 
213 
223  // zoom commands for non center zooming
227 
228  // Panning command event IDs.
233 
236 
238 
241 
242  // Common to all
244 
245  // Common to Pcbnew and CvPcb
250 
252 
253  // IDs specifics to a sub-application (Eeschema, Kicad manager....) start here
254  //
255  // We reserve here Ids for each sub-application, to avoid duplicate IDs
256  // between them.
257  // mainly we experienced issues related to wxUpdateUIEvent calls when 2 (or more) wxFrames
258  // share the same ID in menus, mainly in menubars/toolbars
259  // The reason is the fact wxWidgets propagates the wxUpdateUIEvent to all parent windows
260  // to find wxUpdateUIEvent event functions matching the menuitem IDs found when activate a
261  // menu in the first frame.
262 
263  // Reserve ROOM_FOR_KICADMANAGER IDs, for Kicad manager
264  // Change it if this count is too small.
267 
268  // Reserve ROOM_FOR_KICADMANAGER IDs, for Kicad manager
269  // Change it if this count is too small.
272 
275 
276  // Reseve ID for popup menus, when we need to know a menu item is inside a popup menu
279 
281 };
282 
283 #endif // ID_H_
#define ROOM_FOR_PANEL_PREV_MODEL
Definition: id.h:64
#define ROOM_FOR_3D_VIEWER
Definition: id.h:63
Definition: id.h:90
Definition: id.h:215
Definition: id.h:74
#define ROOM_FOR_KICADMANAGER
Common command IDs shared by more than one of the KiCad applications.
Definition: id.h:62
Definition: id.h:88
main_id
Definition: id.h:72
eeschema ERC modeless dialog ID
Definition: id.h:251
#define MAX_FILE_HISTORY_SIZE
Definition: id.h:70
Definition: id.h:229
Definition: id.h:89