KiCad PCB EDA Suite
general.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 Jean-Pierre Charras, jp.charras at wanadoo.fr
5  * Copyright (C) 2016 KiCad Developers, see CHANGELOG.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 _GENERAL_H_
30 #define _GENERAL_H_
31 
32 #include <gal/color4d.h>
34 
35 using KIGFX::COLOR4D;
36 
37 class TRANSFORM;
38 class SCH_SHEET;
39 
40 #define EESCHEMA_VERSION 2
41 #define SCHEMATIC_HEAD_STRING "Schematic File Version"
42 
43 #define DANGLING_SYMBOL_SIZE 12
44 
45 
46 #define DEFAULT_REPEAT_OFFSET_X 0
47 #define DEFAULT_REPEAT_OFFSET_Y 100
48 #define REPEAT_OFFSET_MAX 1000
49 #define DEFAULT_REPEAT_LABEL_INC 1
50 #define DEFAULT_REPEAT_OFFSET_PIN 100
51 
53 #define DEFAULTBUSTHICKNESS 12
56 
59 #define DEFAULTDRAWLINETHICKNESS 6
60 
62 #define DEFAULTPINLENGTH 100
63 
65 #define DEFAULTPINNUMSIZE 50
66 
68 #define DEFAULTPINNAMESIZE 50
69 
70 #define GR_DEFAULT_DRAWMODE GR_COPY
71 
72 /* Rotation, mirror of graphic items in components bodies are handled by a
73  * transform matrix. The default matrix is useful to draw lib entries with
74  * using this default matrix ( no rotation, no mirror but Y axis is bottom to top, and
75  * Y draw axis is to to bottom so we must have a default matrix that reverses
76  * the Y coordinate and keeps the X coordiate
77  */
79 
80 /* First and main (root) screen */
81 extern SCH_SHEET* g_RootSheet;
82 
88 void SetDefaultLineThickness( int aThickness );
89 
93 int GetDefaultTextSize();
94 void SetDefaultTextSize( int aSize );
95 
100 void SetDefaultBusThickness( int aThickness );
101 
103 void SetLayerColor( COLOR4D aColor, SCH_LAYER_ID aLayer );
104 
105 // Color to draw selected items
107 
108 // Color to draw items flagged invisible, in libedit (they are invisible in Eeschema
110 
111 #endif // _GENERAL_H_
int GetDefaultTextSize()
Default size for text in general.
COLOR4D GetItemSelectedColor()
SCH_SHEET * g_RootSheet
Definition: eeschema.cpp:54
int GetDefaultLineThickness()
Default line thickness used to draw/plot items having a default thickness line value (i...
void SetLayerColor(COLOR4D aColor, SCH_LAYER_ID aLayer)
Definition: eeschema.cpp:173
Class for tranforming drawing coordinates for a wxDC device context.
Definition: transform.h:45
void SetDefaultBusThickness(int aThickness)
TRANSFORM DefaultTransform
Definition: eeschema.cpp:57
SCH_LAYER_ID
Eeschema drawing layers.
COLOR4D GetInvisibleItemColor()
COLOR4D GetLayerColor(SCH_LAYER_ID aLayer)
Definition: eeschema.cpp:166
Class SCH_SHEET is the sheet symbol placed in a schematic, and is the entry point for a sub schematic...
Definition: sch_sheet.h:216
Board layer functions and definitions.
void SetDefaultTextSize(int aSize)
int GetDefaultBusThickness()
Default line thickness used to draw/plot busses.
void SetDefaultLineThickness(int aThickness)
Class COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39