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 CONNECTION_GRAPH;
38 class TRANSFORM;
39 class SCH_SHEET;
40 class SCH_SHEET_PATH;
41 
42 #define EESCHEMA_VERSION 5
43 #define SCHEMATIC_HEAD_STRING "Schematic File Version"
44 
45 #define DANGLING_SYMBOL_SIZE 12
46 
47 
48 #define DEFAULT_REPEAT_OFFSET_X 0
49 #define DEFAULT_REPEAT_OFFSET_Y 100
50 #define REPEAT_OFFSET_MAX 1000
51 #define DEFAULT_REPEAT_LABEL_INC 1
52 #define DEFAULT_REPEAT_OFFSET_PIN 100
53 
55 #define DEFAULTBUSTHICKNESS 12
58 
61 #define DEFAULTDRAWLINETHICKNESS 6
62 
64 #define DEFAULTPINLENGTH 100
65 
67 #define DEFAULTPINNUMSIZE 50
68 
70 #define DEFAULTPINNAMESIZE 50
71 
73 #define DEFAULTLIBWIDTH 250
74 
76 #define DEFAULTSELECTIONTHICKNESS 3
77 
78 /* Rotation, mirror of graphic items in components bodies are handled by a
79  * transform matrix. The default matrix is useful to draw lib entries with
80  * using this default matrix ( no rotation, no mirror but Y axis is bottom to top, and
81  * Y draw axis is to to bottom so we must have a default matrix that reverses
82  * the Y coordinate and keeps the X coordiate
83  */
85 
86 /* First and main (root) screen */
87 extern SCH_SHEET* g_RootSheet;
88 
95 
100 
106 void SetDefaultLineThickness( int aThickness );
107 
111 int GetDefaultTextSize();
112 void SetDefaultTextSize( int aSize );
113 
118 void SetDefaultBusThickness( int aThickness );
119 
124 void SetDefaultWireThickness( int aThickness );
125 
129 bool GetSelectionTextAsBox();
130 void SetSelectionTextAsBox( bool aBool );
131 
136 void SetSelectionDrawChildItems( bool aBool );
137 
142 void SetSelectionFillShapes( bool aBool );
143 
148 void SetSelectionThickness( int aThickness );
149 
151 void SetLayerColor( COLOR4D aColor, SCH_LAYER_ID aLayer );
152 
153 // Color to draw selected items
155 
156 // Color to draw items flagged invisible, in libedit (they are invisible in Eeschema
158 
159 #endif // _GENERAL_H_
void SetDefaultWireThickness(int aThickness)
Calculates the connectivity of a schematic and generates netlists.
int GetDefaultTextSize()
Default size for text in general.
int GetSelectionThickness()
Selection highlight thickness.
COLOR4D GetItemSelectedColor()
void SetSelectionThickness(int aThickness)
bool GetSelectionTextAsBox()
Draw selected text items as box.
SCH_SHEET * g_RootSheet
int GetDefaultLineThickness()
Default line thickness used to draw/plot items having a default thickness line value (i....
bool GetSelectionFillShapes()
Draw selected shapes as filled or not.
CONNECTION_GRAPH * g_ConnectionGraph
This also wants to live in the eventual SCHEMATIC object.
void SetLayerColor(COLOR4D aColor, SCH_LAYER_ID aLayer)
for transforming drawing coordinates for a wxDC device context.
Definition: transform.h:45
void SetDefaultBusThickness(int aThickness)
void SetSelectionFillShapes(bool aBool)
SCH_SHEET_PATH * g_CurrentSheet
With the new connectivity algorithm, many more places than before want to know what the current sheet...
TRANSFORM DefaultTransform
bool GetSelectionDrawChildItems()
Draw selected child items or not.
SCH_LAYER_ID
Eeschema drawing layers.
SCH_SHEET_PATH.
COLOR4D GetInvisibleItemColor()
COLOR4D GetLayerColor(SCH_LAYER_ID aLayer)
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition: sch_sheet.h:206
void SetSelectionDrawChildItems(bool aBool)
Board layer functions and definitions.
void SetDefaultTextSize(int aSize)
int GetDefaultWireThickness()
Default line thickness used to draw/plot wires.
void SetSelectionTextAsBox(bool aBool)
int GetDefaultBusThickness()
Default line thickness used to draw/plot busses.
void SetDefaultLineThickness(int aThickness)
COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39