KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcad2kicad_common.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, 2008 Lubo Racko <[email protected]>
5 * Copyright (C) 2008, 2012 Alexander Lunev <[email protected]>
6 * Copyright (C) 2012-2021 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
30#ifndef PCAD2KICAD_COMMON_H_
31#define PCAD2KICAD_COMMON_H_
32
33#include <eda_text.h>
34
35class wxString;
36class XNODE;
37
38namespace PCAD2KICAD
39{
40
41#define PCAD2KICAD_SCALE_SCH_TO_INCH_GRID
42
44{
53 Right
54};
55
57{
58 wxString text;
65 bool isBold;
68};
69
70extern wxString GetWord( wxString* aStr );
71extern XNODE* FindPinMap( XNODE* aNode );
72extern int StrToIntUnits( const wxString& aStr, char aAxe,
73 const wxString& aActualConversion );
74extern wxString GetAndCutWordWithMeasureUnits( wxString* aStr,
75 const wxString& aDefaultMeasurementUnit );
76extern int StrToInt1Units( const wxString& aStr );
77extern wxString ValidateName( const wxString& aName );
78extern wxString ValidateReference( const wxString& aRef );
79extern void SetWidth( const wxString& aStr,
80 const wxString& aDefaultMeasurementUnit,
81 int* aWidth,
82 const wxString& aActualConversion );
83extern void SetPosition( const wxString& aStr,
84 const wxString& aDefaultMeasurementUnit,
85 int* aX,
86 int* aY,
87 const wxString& aActualConversion );
88extern void SetDoublePrecisionPosition( const wxString& aStr,
89 const wxString& aDefaultMeasurementUnit,
90 double* aX,
91 double* aY,
92 const wxString& aActualConversion );
93extern TTEXT_JUSTIFY GetJustifyIdentificator( const wxString& aJustify );
94extern void SetTextParameters( XNODE* aNode,
95 TTEXTVALUE* aTextValue,
96 const wxString& aDefaultMeasurementUnit,
97 const wxString& aActualConversion );
98extern void SetFontProperty( XNODE* aNode,
99 TTEXTVALUE* aTextValue,
100 const wxString& aDefaultMeasurementUnit,
101 const wxString& aActualConversion );
102extern void SetTextJustify( EDA_TEXT* aText, TTEXT_JUSTIFY aJustify );
103extern int CalculateTextLengthSize( TTEXTVALUE* aText );
104extern void CorrectTextPosition( TTEXTVALUE* aValue );
105extern void SetTextSizeFromStrokeFontHeight( EDA_TEXT* aText, int aTextHeight );
106extern void SetTextSizeFromTrueTypeFontHeight( EDA_TEXT* aText, int aTextHeight );
107extern XNODE* FindNode( XNODE* aChild, const wxString& aTag );
108extern wxString FindNodeGetContent( XNODE* aChild, const wxString& aTag );
109extern void InitTTextValue( TTEXTVALUE* aTextValue );
110
111} // namespace PCAD2KICAD
112
113#endif // PCAD2KICAD_COMMON_H_
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
Definition: eda_text.h:79
Hold an XML or S-expression element.
Definition: xnode.h:43
wxString ValidateName(const wxString &aName)
wxString GetWord(wxString *aStr)
int StrToIntUnits(const wxString &aStr, char aAxe, const wxString &aActualConversion)
int StrToInt1Units(const wxString &aStr)
void SetWidth(const wxString &aStr, const wxString &aDefaultMeasurementUnit, int *aWidth, const wxString &aActualConversion)
XNODE * FindNode(XNODE *aChild, const wxString &aTag)
wxString ValidateReference(const wxString &aRef)
void SetTextSizeFromStrokeFontHeight(EDA_TEXT *aText, int aTextHeight)
void SetPosition(const wxString &aStr, const wxString &aDefaultMeasurementUnit, int *aX, int *aY, const wxString &aActualConversion)
void SetDoublePrecisionPosition(const wxString &aStr, const wxString &aDefaultMeasurementUnit, double *aX, double *aY, const wxString &aActualConversion)
TTEXT_JUSTIFY GetJustifyIdentificator(const wxString &aJustify)
void SetTextJustify(EDA_TEXT *aText, TTEXT_JUSTIFY aJustify)
int CalculateTextLengthSize(TTEXTVALUE *aText)
XNODE * FindPinMap(XNODE *aNode)
void CorrectTextPosition(TTEXTVALUE *aValue)
void SetFontProperty(XNODE *aNode, TTEXTVALUE *aTextValue, const wxString &aDefaultMeasurementUnit, const wxString &aActualConversion)
wxString FindNodeGetContent(XNODE *aChild, const wxString &aTag)
void SetTextParameters(XNODE *aNode, TTEXTVALUE *aTextValue, const wxString &aDefaultMeasurementUnit, const wxString &aActualConversion)
wxString GetAndCutWordWithMeasureUnits(wxString *aStr, const wxString &aDefaultMeasurementUnit)
void InitTTextValue(TTEXTVALUE *aTextValue)
void SetTextSizeFromTrueTypeFontHeight(EDA_TEXT *aText, int aTextHeight)