KiCad PCB EDA Suite
pcbnew.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) 2007-2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
5  * Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
29 #ifndef PCBNEW_H
30 #define PCBNEW_H
31 
32 
33 #include <fctsys.h> // wxWidgets include.
34 #include <base_struct.h> // IS_DRAGGED and IN_EDIT definitions.
35 #include <dlist.h>
36 #include <convert_to_biu.h> // to define Mils2iu() conversion function
38 
39 // Arcs are approximated by segments: define the number of segments per 360 deg (KiCad uses 0.1
40 // deg approximation). Be aware 3600 / ARC_APPROX_SEGMENTS_COUNT_LOW_DEF is an integer.
41 #define ARC_APPROX_SEGMENTS_COUNT_LOW_DEF 16
42 #define ARC_APPROX_SEGMENTS_COUNT_HIGHT_DEF 32
43 
44 /* Flag used in locate functions. The locate ref point is the on grid cursor or the off
45  * grid mouse cursor. */
46 #define CURSEUR_ON_GRILLE (0 << 0)
47 #define CURSEUR_OFF_GRILLE (1 << 0)
48 
49 #define IGNORE_LOCKED (1 << 1)
50 #define MATCH_LAYER (1 << 2)
51 #define VISIBLE_ONLY (1 << 3)
52 
53 enum ENDPOINT_T {
57 };
58 
59 #define DIM_ANCRE_MODULE 3 // Anchor size (footprint center)
60 
61 
62 #define TEXTS_MIN_SIZE Mils2iu( 5 )
63 #define TEXTS_MAX_SIZE Mils2iu( 1000 )
64 #define TEXTS_MAX_WIDTH Mils2iu( 500 )
65 
66 
67 // Flag to force the SKETCH mode to display items (.m_Flags member)
68 #define FORCE_SKETCH ( IS_DRAGGED | IN_EDIT )
69 
70 /* Name of the document footprint list
71  * usually located in share/modules/footprints_doc
72  * this is of the responsibility to users to create this file
73  * if they want to have a list of footprints
74  * default is "footprints_doc/footprints.pdf"
75  */
76 extern wxString g_DocModulesFileName;
77 
78 // variables
79 extern bool g_Raccord_45_Auto;
80 extern bool g_Alternate_Track_Posture;
81 // Layer pair for auto routing and switch layers by hotkey
84 
85 extern bool g_TwoSegmentTrackBuild;
86 
87 extern int g_MagneticPadOption;
88 extern int g_MagneticTrackOption;
89 
90 extern wxPoint g_Offset_Module; // Offset trace when moving footprint.
91 
93 class TRACK;
95 #define g_CurrentTrackSegment g_CurrentTrackList.GetLast()
96 #define g_FirstTrackSegment g_CurrentTrackList.GetFirst()
97 
98 
99 
108 
109 
110 #endif // PCBNEW_H
wxPoint g_Offset_Module
Definition: pcbnew.cpp:73
int g_MagneticPadOption
bool g_TwoSegmentTrackBuild
ENDPOINT_T
Flag used in locate routines (from which endpoint work)
Definition: pcbnew.h:54
wxString g_DocModulesFileName
Definition: pcbnew.cpp:80
PCB_LAYER_ID
A quick note on layer IDs:
DLIST< TRACK > g_CurrentTrackList
Definition: pcbnew.cpp:88
void PythonPluginsReloadBase()
Helper function PythonPluginsReloadBase Reload Python plugins if they are newer than the already load...
Definition: pcbnew.cpp:289
int g_MagneticTrackOption
bool g_Alternate_Track_Posture
Definition: pcbnew.cpp:70
Board layer functions and definitions.
bool g_Raccord_45_Auto
Definition: pcbnew.cpp:71
Basic classes for most KiCad items.
PCB_LAYER_ID g_Route_Layer_BOTTOM
Definition: pcbnew.cpp:69
PCB_LAYER_ID g_Route_Layer_TOP
Definition: pcbnew.cpp:68