Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
7cb34aec
Commit
7cb34aec
authored
Dec 14, 2010
by
Wayne Stambaugh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Schematic component object encapsulation and Doxygen comment warning fixes.
parent
cbd4ee88
Changes
95
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
95 changed files
with
506 additions
and
642 deletions
+506
-642
Doxyfile
Doxyfile
+0
-1
base_screen.cpp
common/base_screen.cpp
+3
-3
bezier_curves.cpp
common/bezier_curves.cpp
+0
-12
common_plotGERBER_functions.cpp
common/common_plotGERBER_functions.cpp
+3
-3
common_plotHPGL_functions.cpp
common/common_plotHPGL_functions.cpp
+3
-4
AboutDialog_main.cpp
common/dialog_about/AboutDialog_main.cpp
+3
-2
drawframe.cpp
common/drawframe.cpp
+2
-3
drawtxt.cpp
common/drawtxt.cpp
+0
-3
gestfich.cpp
common/gestfich.cpp
+2
-2
hotkeys_basic.cpp
common/hotkeys_basic.cpp
+1
-1
menucfg.cpp
cvpcb/menucfg.cpp
+1
-1
annotate.cpp
eeschema/annotate.cpp
+6
-8
backanno.cpp
eeschema/backanno.cpp
+5
-21
block.cpp
eeschema/block.cpp
+3
-3
class_libentry.cpp
eeschema/class_libentry.cpp
+1
-11
class_libentry.h
eeschema/class_libentry.h
+5
-4
class_library.h
eeschema/class_library.h
+4
-4
dangling_ends.cpp
eeschema/dangling_ends.cpp
+1
-0
dialog_build_BOM.cpp
eeschema/dialogs/dialog_build_BOM.cpp
+4
-3
dialog_edit_component_in_schematic.cpp
eeschema/dialogs/dialog_edit_component_in_schematic.cpp
+6
-6
edit_component_in_schematic.cpp
eeschema/edit_component_in_schematic.cpp
+7
-7
getpart.cpp
eeschema/getpart.cpp
+10
-10
help_common_strings.h
eeschema/help_common_strings.h
+1
-1
lib_arc.cpp
eeschema/lib_arc.cpp
+3
-16
lib_arc.h
eeschema/lib_arc.h
+5
-5
lib_bezier.cpp
eeschema/lib_bezier.cpp
+1
-1
lib_circle.cpp
eeschema/lib_circle.cpp
+2
-3
lib_draw_item.h
eeschema/lib_draw_item.h
+3
-4
lib_field.cpp
eeschema/lib_field.cpp
+17
-35
lib_field.h
eeschema/lib_field.h
+8
-8
lib_pin.cpp
eeschema/lib_pin.cpp
+4
-23
lib_pin.h
eeschema/lib_pin.h
+12
-6
lib_polyline.cpp
eeschema/lib_polyline.cpp
+4
-17
lib_polyline.h
eeschema/lib_polyline.h
+5
-5
lib_rectangle.cpp
eeschema/lib_rectangle.cpp
+7
-21
lib_rectangle.h
eeschema/lib_rectangle.h
+2
-2
lib_text.cpp
eeschema/lib_text.cpp
+5
-17
lib_text.h
eeschema/lib_text.h
+5
-5
libarch.cpp
eeschema/libarch.cpp
+2
-2
libeditframe.h
eeschema/libeditframe.h
+1
-1
locate.cpp
eeschema/locate.cpp
+1
-0
menubar.cpp
eeschema/menubar.cpp
+1
-1
netform.cpp
eeschema/netform.cpp
+11
-11
netlist.cpp
eeschema/netlist.cpp
+2
-2
netlist.h
eeschema/netlist.h
+1
-1
netlist_control.cpp
eeschema/netlist_control.cpp
+18
-23
onrightclick.cpp
eeschema/onrightclick.cpp
+1
-1
plot.cpp
eeschema/plot.cpp
+4
-3
sch_component.cpp
eeschema/sch_component.cpp
+94
-57
sch_component.h
eeschema/sch_component.h
+29
-32
sch_field.cpp
eeschema/sch_field.cpp
+2
-2
sch_items.h
eeschema/sch_items.h
+4
-2
sch_sheet.h
eeschema/sch_sheet.h
+7
-18
sch_sheet_path.cpp
eeschema/sch_sheet_path.cpp
+2
-6
sch_sheet_path.h
eeschema/sch_sheet_path.h
+4
-4
sch_sheet_pin.cpp
eeschema/sch_sheet_pin.cpp
+2
-6
sch_text.h
eeschema/sch_text.h
+4
-0
schedit.cpp
eeschema/schedit.cpp
+1
-1
schframe.cpp
eeschema/schframe.cpp
+2
-2
class_gerber_draw_item.h
gerbview/class_gerber_draw_item.h
+1
-1
dcode.h
gerbview/dcode.h
+1
-1
wxGerberFrame.h
gerbview/wxGerberFrame.h
+2
-2
bezier_curves.h
include/bezier_curves.h
+10
-14
class_base_screen.h
include/class_base_screen.h
+2
-1
class_board_item.h
include/class_board_item.h
+1
-1
class_sch_screen.h
include/class_sch_screen.h
+5
-2
class_undoredo_container.h
include/class_undoredo_container.h
+1
-1
common.h
include/common.h
+3
-3
gr_basic.h
include/gr_basic.h
+9
-13
hotkeys_basic.h
include/hotkeys_basic.h
+5
-7
macros.h
include/macros.h
+3
-2
sch_item_struct.h
include/sch_item_struct.h
+6
-5
wxBasePcbFrame.h
include/wxBasePcbFrame.h
+2
-2
wxEeschemaStruct.h
include/wxEeschemaStruct.h
+12
-4
wxPcbStruct.h
include/wxPcbStruct.h
+23
-46
wxstruct.h
include/wxstruct.h
+7
-10
menubar.cpp
kicad/menubar.cpp
+1
-1
tree_project_frame.cpp
kicad/tree_project_frame.cpp
+1
-1
board_undo_redo.cpp
pcbnew/board_undo_redo.cpp
+4
-6
class_board_item.cpp
pcbnew/class_board_item.cpp
+8
-8
class_zone.cpp
pcbnew/class_zone.cpp
+14
-21
class_zone.h
pcbnew/class_zone.h
+5
-6
clean.cpp
pcbnew/clean.cpp
+0
-1
dialog_display_options.h
pcbnew/dialogs/dialog_display_options.h
+1
-1
gendrill.cpp
pcbnew/gendrill.cpp
+1
-1
help_common_strings.h
pcbnew/help_common_strings.h
+1
-1
hotkeys.h
pcbnew/hotkeys.h
+1
-1
loadcmp.cpp
pcbnew/loadcmp.cpp
+12
-11
menubar_pcbframe.cpp
pcbnew/menubar_pcbframe.cpp
+1
-1
netlist.cpp
pcbnew/netlist.cpp
+5
-0
ratsnest.cpp
pcbnew/ratsnest.cpp
+3
-2
specctra.h
pcbnew/specctra.h
+4
-3
specctra_export.cpp
pcbnew/specctra_export.cpp
+1
-0
specctra_import.cpp
pcbnew/specctra_import.cpp
+1
-0
zone_filling_algorithm.cpp
pcbnew/zone_filling_algorithm.cpp
+2
-6
No files found.
Doxyfile
View file @
7cb34aec
...
@@ -83,7 +83,6 @@ INPUT = kicad \
...
@@ -83,7 +83,6 @@ INPUT = kicad \
3d-viewer \
3d-viewer \
common \
common \
gerbview \
gerbview \
share \
include \
include \
polygon \
polygon \
potrace
potrace
...
...
common/base_screen.cpp
View file @
7cb34aec
...
@@ -121,9 +121,9 @@ wxPoint BASE_SCREEN::CursorRealPosition( const wxPoint& ScreenPos )
...
@@ -121,9 +121,9 @@ wxPoint BASE_SCREEN::CursorRealPosition( const wxPoint& ScreenPos )
/**
/**
* Function SetScalingFactor
* Function SetScalingFactor
* calculates the .m_Zoom member to have a given scaling factor
* calculates the .m_Zoom member to have a given scaling factor
* @param the the current scale used to draw items on screen
* @param
aScale -
the the current scale used to draw items on screen
* draw coordinates are user coordinates * GetScalingFactor(
)
* draw coordinates are user coordinates * GetScalingFactor()
*/
*/
void
BASE_SCREEN
::
SetScalingFactor
(
double
aScale
)
void
BASE_SCREEN
::
SetScalingFactor
(
double
aScale
)
{
{
int
zoom
=
static_cast
<
int
>
(
ceil
(
aScale
*
m_ZoomScalar
)
);
int
zoom
=
static_cast
<
int
>
(
ceil
(
aScale
*
m_ZoomScalar
)
);
...
...
common/bezier_curves.cpp
View file @
7cb34aec
...
@@ -36,24 +36,12 @@ static void recursive_bezier( int x1,
...
@@ -36,24 +36,12 @@ static void recursive_bezier( int x1,
/***********************************************************************************/
/***********************************************************************************/
/**
* Function Bezier2Poly
* convert a Bezier curve to a polyline
* @return a std::vector<wxPoint> containing the points of the polyline
* @param C1, c2, c3, c4 = wxPoints of the Bezier curve
*/
std
::
vector
<
wxPoint
>
Bezier2Poly
(
wxPoint
c1
,
wxPoint
c2
,
wxPoint
c3
,
wxPoint
c4
)
std
::
vector
<
wxPoint
>
Bezier2Poly
(
wxPoint
c1
,
wxPoint
c2
,
wxPoint
c3
,
wxPoint
c4
)
{
{
return
Bezier2Poly
(
c1
.
x
,
c1
.
y
,
c2
.
x
,
c2
.
y
,
c3
.
x
,
c3
.
y
,
c4
.
x
,
c4
.
y
);
return
Bezier2Poly
(
c1
.
x
,
c1
.
y
,
c2
.
x
,
c2
.
y
,
c3
.
x
,
c3
.
y
,
c4
.
x
,
c4
.
y
);
}
}
/**
* Function Bezier2Poly
* convert a Bezier curve to a polyline
* @return a std::vector<wxPoint> containing the points of the polyline
* @param C1, c2, c3 = wxPoints of the Bezier curve
*/
std
::
vector
<
wxPoint
>
Bezier2Poly
(
wxPoint
c1
,
wxPoint
c2
,
wxPoint
c3
)
std
::
vector
<
wxPoint
>
Bezier2Poly
(
wxPoint
c1
,
wxPoint
c2
,
wxPoint
c3
)
{
{
return
Bezier2Poly
(
c1
.
x
,
c1
.
y
,
c2
.
x
,
c2
.
y
,
c3
.
x
,
c3
.
y
);
return
Bezier2Poly
(
c1
.
x
,
c1
.
y
,
c2
.
x
,
c2
.
y
,
c3
.
x
,
c3
.
y
);
...
...
common/common_plotGERBER_functions.cpp
View file @
7cb34aec
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
* Set the plot offset for the current plotting
* Set the plot offset for the current plotting
* @param aOffset = plot offset
* @param aOffset = plot offset
* @param aScale = coordinate scale (scale coefficient for coordinates)
* @param aScale = coordinate scale (scale coefficient for coordinates)
* @param aMirror - Mirror plot if true.
*/
*/
void
GERBER_PLOTTER
::
set_viewport
(
wxPoint
aOffset
,
double
aScale
,
bool
aMirror
)
void
GERBER_PLOTTER
::
set_viewport
(
wxPoint
aOffset
,
double
aScale
,
bool
aMirror
)
{
{
...
@@ -298,10 +299,9 @@ void GERBER_PLOTTER::circle( wxPoint aCentre, int aDiameter, FILL_T fill,
...
@@ -298,10 +299,9 @@ void GERBER_PLOTTER::circle( wxPoint aCentre, int aDiameter, FILL_T fill,
* @param aCornersCount = number of corners
* @param aCornersCount = number of corners
* @param aCoord = buffer of corners coordinates
* @param aCoord = buffer of corners coordinates
* @param aFill = plot option (NO_FILL, FILLED_SHAPE, FILLED_WITH_BG_BODYCOLOR)
* @param aFill = plot option (NO_FILL, FILLED_SHAPE, FILLED_WITH_BG_BODYCOLOR)
* @param a
Coord = buffer of corners coordinates
* @param a
Width = Width of the line to plot.
*/
*/
void
GERBER_PLOTTER
::
poly
(
int
aCornersCount
,
int
*
aCoord
,
FILL_T
aFill
,
void
GERBER_PLOTTER
::
poly
(
int
aCornersCount
,
int
*
aCoord
,
FILL_T
aFill
,
int
aWidth
)
int
aWidth
)
{
{
wxASSERT
(
output_file
);
wxASSERT
(
output_file
);
wxPoint
pos
,
startpos
;
wxPoint
pos
,
startpos
;
...
...
common/common_plotHPGL_functions.cpp
View file @
7cb34aec
...
@@ -170,11 +170,10 @@ void HPGL_PLOTTER::set_dash( bool dashed )
...
@@ -170,11 +170,10 @@ void HPGL_PLOTTER::set_dash( bool dashed )
* Function Plot a filled segment (track)
* Function Plot a filled segment (track)
* @param start = starting point
* @param start = starting point
* @param end = ending point
* @param end = ending point
* @param
aW
idth = segment width (thickness)
* @param
w
idth = segment width (thickness)
* @param
aPlotM
ode = FILLED, SKETCH ..
* @param
tracem
ode = FILLED, SKETCH ..
*/
*/
void
HPGL_PLOTTER
::
thick_segment
(
wxPoint
start
,
wxPoint
end
,
int
width
,
void
HPGL_PLOTTER
::
thick_segment
(
wxPoint
start
,
wxPoint
end
,
int
width
,
GRTraceMode
tracemode
)
GRTraceMode
tracemode
)
{
{
wxASSERT
(
output_file
);
wxASSERT
(
output_file
);
wxPoint
center
;
wxPoint
center
;
...
...
common/dialog_about/AboutDialog_main.cpp
View file @
7cb34aec
...
@@ -36,7 +36,7 @@ static wxString HtmlNewline( const unsigned int amount = 1 );
...
@@ -36,7 +36,7 @@ static wxString HtmlNewline( const unsigned int amount = 1 );
/**
/**
* Initializes the <code>AboutAppInfo</code> object with applicaion specific information.
* Initializes the <code>AboutAppInfo</code> object with applicaion specific information.
*
*
*
@info
is the object which holds all information about the application
*
Th
is the object which holds all information about the application
*/
*/
static
void
InitKiCadAboutNew
(
AboutAppInfo
&
info
)
static
void
InitKiCadAboutNew
(
AboutAppInfo
&
info
)
{
{
...
@@ -309,7 +309,8 @@ static wxString HtmlHyperlink( const wxString& url, const wxString& description
...
@@ -309,7 +309,8 @@ static wxString HtmlHyperlink( const wxString& url, const wxString& description
/**
/**
* Creates a HTML newline character sequence.
* Creates a HTML newline character sequence.
*
*
* @amount the amount of HTML newline tags to concatenate, default is to return just one <br> tag
* @param amount - the amount of HTML newline tags to concatenate, default is to return just
* one <br> tag
* @return the concatenated amount of HTML newline tag(s) <br>
* @return the concatenated amount of HTML newline tag(s) <br>
*/
*/
static
wxString
HtmlNewline
(
const
unsigned
int
amount
)
static
wxString
HtmlNewline
(
const
unsigned
int
amount
)
...
...
common/drawframe.cpp
View file @
7cb34aec
...
@@ -370,7 +370,7 @@ void WinEDA_DrawFrame::OnSize( wxSizeEvent& SizeEv )
...
@@ -370,7 +370,7 @@ void WinEDA_DrawFrame::OnSize( wxSizeEvent& SizeEv )
* (Or tool ID_NO_SELECT_BUTT default if no new selection)
* (Or tool ID_NO_SELECT_BUTT default if no new selection)
* @param aId = new m_ID_current_state value (if aId >= 0)
* @param aId = new m_ID_current_state value (if aId >= 0)
* @param aCursor = the new cursor shape (0 = default cursor)
* @param aCursor = the new cursor shape (0 = default cursor)
* @param aT
itle
= tool message in status bar
* @param aT
oolMsg
= tool message in status bar
* if (aId >= 0)
* if (aId >= 0)
* Updates all variables related:
* Updates all variables related:
* m_ID_current_state, cursor shape and message in status bar
* m_ID_current_state, cursor shape and message in status bar
...
@@ -378,8 +378,7 @@ void WinEDA_DrawFrame::OnSize( wxSizeEvent& SizeEv )
...
@@ -378,8 +378,7 @@ void WinEDA_DrawFrame::OnSize( wxSizeEvent& SizeEv )
* Only updates the cursor shape and message in status bar
* Only updates the cursor shape and message in status bar
* (does not the current m_ID_current_state value
* (does not the current m_ID_current_state value
*/
*/
void
WinEDA_DrawFrame
::
SetToolID
(
int
aId
,
int
aCursor
,
void
WinEDA_DrawFrame
::
SetToolID
(
int
aId
,
int
aCursor
,
const
wxString
&
aToolMsg
)
const
wxString
&
aToolMsg
)
{
{
// Keep default cursor in toolbars
// Keep default cursor in toolbars
SetCursor
(
wxNullCursor
);
SetCursor
(
wxNullCursor
);
...
...
common/drawtxt.cpp
View file @
7cb34aec
...
@@ -500,7 +500,6 @@ void DrawGraphicText( WinEDA_DrawPanel* aPanel,
...
@@ -500,7 +500,6 @@ void DrawGraphicText( WinEDA_DrawPanel* aPanel,
/**
/**
* Function PlotGraphicText
* Function PlotGraphicText
* same as DrawGraphicText, but plot graphic text insteed of draw it
* same as DrawGraphicText, but plot graphic text insteed of draw it
* @param aFormat_plot = plot format (PLOT_FORMAT_POST, PLOT_FORMAT_HPGL, PLOT_FORMAT_GERBER)
* @param aPos = text position (according to aH_justify, aV_justify)
* @param aPos = text position (according to aH_justify, aV_justify)
* @param aColor (enum EDA_Colors) = text color
* @param aColor (enum EDA_Colors) = text color
* @param aText = text to draw
* @param aText = text to draw
...
@@ -514,7 +513,6 @@ void DrawGraphicText( WinEDA_DrawPanel* aPanel,
...
@@ -514,7 +513,6 @@ void DrawGraphicText( WinEDA_DrawPanel* aPanel,
* @param aItalic = true to simulate an italic font
* @param aItalic = true to simulate an italic font
* @param aBold = true to use a bold font Useful only with default width value (aWidth = 0)
* @param aBold = true to use a bold font Useful only with default width value (aWidth = 0)
*/
*/
/******************************************************************************************/
void
PLOTTER
::
text
(
const
wxPoint
&
aPos
,
void
PLOTTER
::
text
(
const
wxPoint
&
aPos
,
enum
EDA_Colors
aColor
,
enum
EDA_Colors
aColor
,
const
wxString
&
aText
,
const
wxString
&
aText
,
...
@@ -525,7 +523,6 @@ void PLOTTER::text( const wxPoint& aPos,
...
@@ -525,7 +523,6 @@ void PLOTTER::text( const wxPoint& aPos,
int
aWidth
,
int
aWidth
,
bool
aItalic
,
bool
aItalic
,
bool
aBold
)
bool
aBold
)
/******************************************************************************************/
{
{
if
(
aWidth
==
0
&&
aBold
)
// Use default values if aWidth == 0
if
(
aWidth
==
0
&&
aBold
)
// Use default values if aWidth == 0
aWidth
=
GetPenSizeForBold
(
MIN
(
aSize
.
x
,
aSize
.
y
)
);
aWidth
=
GetPenSizeForBold
(
MIN
(
aSize
.
x
,
aSize
.
y
)
);
...
...
common/gestfich.cpp
View file @
7cb34aec
...
@@ -291,12 +291,12 @@ wxString EDA_FileSelector( const wxString& Title,
...
@@ -291,12 +291,12 @@ wxString EDA_FileSelector( const wxString& Title,
/**
/**
* Function FindKicadHelpPath
* Function FindKicadHelpPath
* Find an absolute path for KiCad "help" (or "help/
<language>
")
* Find an absolute path for KiCad "help" (or "help/
<language>
")
* Find path kicad/doc/help/xx/ or kicad/doc/help/:
* Find path kicad/doc/help/xx/ or kicad/doc/help/:
* from BinDir
* from BinDir
* else from environment variable KICAD
* else from environment variable KICAD
* else from one of s_HelpPathList
* else from one of s_HelpPathList
* typically c:
\kicad\doc\
help or /usr/share/kicad/help
* typically c:
/kicad/doc/
help or /usr/share/kicad/help
* or /usr/local/share/kicad/help
* or /usr/local/share/kicad/help
* (must have kicad in path name)
* (must have kicad in path name)
*
*
...
...
common/hotkeys_basic.cpp
View file @
7cb34aec
...
@@ -447,7 +447,7 @@ int WinEDA_BasicFrame::WriteHotkeyConfig( struct Ki_HotkeyInfoSectionDescriptor*
...
@@ -447,7 +447,7 @@ int WinEDA_BasicFrame::WriteHotkeyConfig( struct Ki_HotkeyInfoSectionDescriptor*
/**
/**
* Function ReadHotkeyConfigFile
* Function ReadHotkeyConfigFile
* Read an old configuration file (
<file>
.key) and fill the current hotkey list
* Read an old configuration file (
<file>
.key) and fill the current hotkey list
* with hotkeys
* with hotkeys
* @param aFilename = file name to read.
* @param aFilename = file name to read.
* @param aDescList = current hotkey list descr. to initialise.
* @param aDescList = current hotkey list descr. to initialise.
...
...
cvpcb/menucfg.cpp
View file @
7cb34aec
/**
/**
* @file
menubar
.cpp
* @file
./menucfg
.cpp
* (Re)Create the CvPCB main MenuBar
* (Re)Create the CvPCB main MenuBar
*/
*/
#include "fctsys.h"
#include "fctsys.h"
...
...
eeschema/annotate.cpp
View file @
7cb34aec
...
@@ -78,13 +78,13 @@ void ReAnnotatePowerSymbolsOnly( void )
...
@@ -78,13 +78,13 @@ void ReAnnotatePowerSymbolsOnly( void )
SCH_COMPONENT
*
DrawLibItem
=
(
SCH_COMPONENT
*
)
DrawList
;
SCH_COMPONENT
*
DrawLibItem
=
(
SCH_COMPONENT
*
)
DrawList
;
LIB_COMPONENT
*
Entry
=
LIB_COMPONENT
*
Entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
DrawLibItem
->
m_ChipName
);
CMP_LIBRARY
::
FindLibraryComponent
(
DrawLibItem
->
GetLibName
()
);
if
(
(
Entry
==
NULL
)
||
!
Entry
->
IsPower
()
)
if
(
(
Entry
==
NULL
)
||
!
Entry
->
IsPower
()
)
continue
;
continue
;
//DrawLibItem->ClearAnnotation(sheet); this clears all annotation :(
//DrawLibItem->ClearAnnotation(sheet); this clears all annotation :(
wxString
refstr
=
DrawLibItem
->
m_PrefixString
;
wxString
refstr
=
DrawLibItem
->
GetPrefix
()
;
//str will be "C?" or so after the ClearAnnotation call.
//str will be "C?" or so after the ClearAnnotation call.
while
(
refstr
.
Last
()
==
'?'
)
while
(
refstr
.
Last
()
==
'?'
)
...
@@ -356,7 +356,7 @@ void AnnotateComponents( SCH_EDIT_FRAME* parent,
...
@@ -356,7 +356,7 @@ void AnnotateComponents( SCH_EDIT_FRAME* parent,
* Add a OBJ_CMP_TO_LIST object in aComponentsList for each component found
* Add a OBJ_CMP_TO_LIST object in aComponentsList for each component found
* in sheet
* in sheet
* @param aComponentsList = a std::vector list to fill
* @param aComponentsList = a std::vector list to fill
* @param
t
he SCH_SHEET_PATH sheet to analyze
* @param
aSheet - T
he SCH_SHEET_PATH sheet to analyze
*/
*/
int
AddComponentsInSheetToList
(
std
::
vector
<
OBJ_CMP_TO_LIST
>&
aComponentsList
,
int
AddComponentsInSheetToList
(
std
::
vector
<
OBJ_CMP_TO_LIST
>&
aComponentsList
,
SCH_SHEET_PATH
*
aSheet
)
SCH_SHEET_PATH
*
aSheet
)
...
@@ -371,7 +371,7 @@ int AddComponentsInSheetToList( std::vector <OBJ_CMP_TO_LIST>& aComponentsList,
...
@@ -371,7 +371,7 @@ int AddComponentsInSheetToList( std::vector <OBJ_CMP_TO_LIST>& aComponentsList,
if
(
DrawList
->
Type
()
==
SCH_COMPONENT_T
)
if
(
DrawList
->
Type
()
==
SCH_COMPONENT_T
)
{
{
DrawLibItem
=
(
SCH_COMPONENT
*
)
DrawList
;
DrawLibItem
=
(
SCH_COMPONENT
*
)
DrawList
;
Entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
DrawLibItem
->
m_ChipName
);
Entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
DrawLibItem
->
GetLibName
()
);
if
(
Entry
==
NULL
)
if
(
Entry
==
NULL
)
continue
;
continue
;
...
@@ -424,8 +424,7 @@ static void ReAnnotateComponents( std::vector <OBJ_CMP_TO_LIST>& aComponentsList
...
@@ -424,8 +424,7 @@ static void ReAnnotateComponents( std::vector <OBJ_CMP_TO_LIST>& aComponentsList
else
else
sprintf( Text + strlen( Text ), "%d", aComponentsList[ii].m_NumRef );
sprintf( Text + strlen( Text ), "%d", aComponentsList[ii].m_NumRef );
component->SetRef( &(aComponentsList[ii].m_SheetPath),
component->SetRef( &(aComponentsList[ii].m_SheetPath), CONV_FROM_UTF8( Text ) );
CONV_FROM_UTF8( Text ) );
#else
#else
wxString
ref
=
aComponentsList
[
ii
].
GetRef
();
wxString
ref
=
aComponentsList
[
ii
].
GetRef
();
...
@@ -441,7 +440,7 @@ static void ReAnnotateComponents( std::vector <OBJ_CMP_TO_LIST>& aComponentsList
...
@@ -441,7 +440,7 @@ static void ReAnnotateComponents( std::vector <OBJ_CMP_TO_LIST>& aComponentsList
component
->
SetRef
(
&
aComponentsList
[
ii
].
m_SheetPath
,
ref
);
component
->
SetRef
(
&
aComponentsList
[
ii
].
m_SheetPath
,
ref
);
#endif
#endif
component
->
m_Multi
=
aComponentsList
[
ii
].
m_Unit
;
component
->
SetUnit
(
aComponentsList
[
ii
].
m_Unit
)
;
component
->
SetUnitSelection
(
&
aComponentsList
[
ii
].
m_SheetPath
,
component
->
SetUnitSelection
(
&
aComponentsList
[
ii
].
m_SheetPath
,
aComponentsList
[
ii
].
m_Unit
);
aComponentsList
[
ii
].
m_Unit
);
}
}
...
@@ -455,7 +454,6 @@ static void ReAnnotateComponents( std::vector <OBJ_CMP_TO_LIST>& aComponentsList
...
@@ -455,7 +454,6 @@ static void ReAnnotateComponents( std::vector <OBJ_CMP_TO_LIST>& aComponentsList
* to a max value (0x7FFFFFFF).
* to a max value (0x7FFFFFFF).
*
*
* @param aComponentsList = list of component
* @param aComponentsList = list of component
* @param NbOfCmp = item count in the list
*/
*/
void
BreakReference
(
std
::
vector
<
OBJ_CMP_TO_LIST
>&
aComponentsList
)
void
BreakReference
(
std
::
vector
<
OBJ_CMP_TO_LIST
>&
aComponentsList
)
{
{
...
...
eeschema/backanno.cpp
View file @
7cb34aec
...
@@ -85,27 +85,12 @@ bool SCH_EDIT_FRAME::FillFootprintFieldForAllInstancesofComponent( const wxStrin
...
@@ -85,27 +85,12 @@ bool SCH_EDIT_FRAME::FillFootprintFieldForAllInstancesofComponent( const wxStrin
}
}
/**
bool
SCH_EDIT_FRAME
::
ProcessStuffFile
(
FILE
*
aFilename
,
bool
aSetFieldAttributeToVisible
)
* Function ProcessStuffFile
* Read a "stuff" file created by cvpcb.
* That file has lines like:
* comp = "C1" module = "CP6"
* comp = "C2" module = "C1"
* comp = "C3" module = "C1"
* "comp =" gives the component reference
* "module =" gives the footprint name
*
* @param aStuffFile = file (*.stf) to Read.
* @param aSetFielsAttributeToVisible = true to set the footprint field flag to
* visible
* @return true if OK.
*/
bool
SCH_EDIT_FRAME
::
ProcessStuffFile
(
FILE
*
aStuffFile
,
bool
aSetFielsAttributeToVisible
)
{
{
int
LineNum
=
0
;
int
LineNum
=
0
;
char
*
cp
,
Ref
[
256
],
FootPrint
[
256
],
Line
[
1024
];
char
*
cp
,
Ref
[
256
],
FootPrint
[
256
],
Line
[
1024
];
while
(
GetLine
(
a
StuffFil
e
,
Line
,
&
LineNum
,
sizeof
(
Line
)
)
)
while
(
GetLine
(
a
Filenam
e
,
Line
,
&
LineNum
,
sizeof
(
Line
)
)
)
{
{
if
(
sscanf
(
Line
,
"comp =
\"
%s module =
\"
%s"
,
Ref
,
FootPrint
)
==
2
)
if
(
sscanf
(
Line
,
"comp =
\"
%s module =
\"
%s"
,
Ref
,
FootPrint
)
==
2
)
{
{
...
@@ -119,10 +104,9 @@ bool SCH_EDIT_FRAME::ProcessStuffFile( FILE* aStuffFile, bool aSetFielsAttribute
...
@@ -119,10 +104,9 @@ bool SCH_EDIT_FRAME::ProcessStuffFile( FILE* aStuffFile, bool aSetFielsAttribute
wxString
reference
=
CONV_FROM_UTF8
(
Ref
);
wxString
reference
=
CONV_FROM_UTF8
(
Ref
);
wxString
Footprint
=
CONV_FROM_UTF8
(
FootPrint
);
wxString
Footprint
=
CONV_FROM_UTF8
(
FootPrint
);
FillFootprintFieldForAllInstancesofComponent
(
FillFootprintFieldForAllInstancesofComponent
(
reference
,
reference
,
Footprint
,
Footprint
,
aSetFieldAttributeToVisible
);
aSetFielsAttributeToVisible
);
}
}
}
}
...
...
eeschema/block.cpp
View file @
7cb34aec
...
@@ -874,14 +874,14 @@ static LIB_PIN* GetNextPinPosition( SCH_COMPONENT* aDrawLibItem,
...
@@ -874,14 +874,14 @@ static LIB_PIN* GetNextPinPosition( SCH_COMPONENT* aDrawLibItem,
if
(
aSearchFirst
)
if
(
aSearchFirst
)
{
{
Entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
aDrawLibItem
->
m_ChipName
);
Entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
aDrawLibItem
->
GetLibName
()
);
if
(
Entry
==
NULL
)
if
(
Entry
==
NULL
)
return
NULL
;
return
NULL
;
Pin
=
Entry
->
GetNextPin
();
Pin
=
Entry
->
GetNextPin
();
Multi
=
aDrawLibItem
->
m_Multi
;
Multi
=
aDrawLibItem
->
GetUnit
()
;
convert
=
aDrawLibItem
->
m_Convert
;
convert
=
aDrawLibItem
->
GetConvert
()
;
CmpPosition
=
aDrawLibItem
->
m_Pos
;
CmpPosition
=
aDrawLibItem
->
m_Pos
;
transform
=
aDrawLibItem
->
m_Transform
;
transform
=
aDrawLibItem
->
m_Transform
;
}
}
...
...
eeschema/class_libentry.cpp
View file @
7cb34aec
...
@@ -1351,17 +1351,7 @@ LIB_DRAW_ITEM* LIB_COMPONENT::LocateDrawItem( int aUnit, int aConvert,
...
@@ -1351,17 +1351,7 @@ LIB_DRAW_ITEM* LIB_COMPONENT::LocateDrawItem( int aUnit, int aConvert,
return
NULL
;
return
NULL
;
}
}
/**
* Function HitTest (overlaid)
* @return true if the point aPosRef is near this object
* @param aPosRef = a wxPoint to test
* @param aThreshold = max distance to this object (usually the half
* thickness of a line)
* @param aTransform = the transform matrix
*
* @return LIB_DRAW_ITEM - Pointer the the draw object if found.
* Otherwise NULL.
*/
LIB_DRAW_ITEM
*
LIB_COMPONENT
::
LocateDrawItem
(
int
aUnit
,
int
aConvert
,
KICAD_T
aType
,
LIB_DRAW_ITEM
*
LIB_COMPONENT
::
LocateDrawItem
(
int
aUnit
,
int
aConvert
,
KICAD_T
aType
,
const
wxPoint
&
aPoint
,
const
TRANSFORM
&
aTransform
)
const
wxPoint
&
aPoint
,
const
TRANSFORM
&
aTransform
)
{
{
...
...
eeschema/class_libentry.h
View file @
7cb34aec
...
@@ -321,7 +321,7 @@ public:
...
@@ -321,7 +321,7 @@ public:
* @param aConvert - Component conversion (DeMorgan) if available.
* @param aConvert - Component conversion (DeMorgan) if available.
* @param aDrawMode - Device context drawing mode, see wxDC.
* @param aDrawMode - Device context drawing mode, see wxDC.
* @param aColor - Color to draw component.
* @param aColor - Color to draw component.
* @param aTransform
Matrix
- Coordinate adjustment settings.
* @param aTransform - Coordinate adjustment settings.
* @param aShowPinText - Show pin text if true.
* @param aShowPinText - Show pin text if true.
* @param aDrawFields - Draw field text if true otherwise just draw
* @param aDrawFields - Draw field text if true otherwise just draw
* body items (useful to draw a body in schematic,
* body items (useful to draw a body in schematic,
...
@@ -342,6 +342,7 @@ public:
...
@@ -342,6 +342,7 @@ public:
* @param aPlotter - Plotter object to plot to.
* @param aPlotter - Plotter object to plot to.
* @param aUnit - Component part to plot.
* @param aUnit - Component part to plot.
* @param aConvert - Component alternate body style to plot.
* @param aConvert - Component alternate body style to plot.
* @param aOffset - Distance to shift the plot coordinates.
* @param aTransform - Component plot transform matrix.
* @param aTransform - Component plot transform matrix.
*/
*/
void
Plot
(
PLOTTER
*
aPlotter
,
int
aUnit
,
int
aConvert
,
const
wxPoint
&
aOffset
,
void
Plot
(
PLOTTER
*
aPlotter
,
int
aUnit
,
int
aConvert
,
const
wxPoint
&
aOffset
,
...
@@ -350,7 +351,7 @@ public:
...
@@ -350,7 +351,7 @@ public:
/**
/**
* Add a new draw \a aItem to the draw object list.
* Add a new draw \a aItem to the draw object list.
*
*
* @param
i
tem - New draw object to add to component.
* @param
aI
tem - New draw object to add to component.
*/
*/
void
AddDrawItem
(
LIB_DRAW_ITEM
*
aItem
);
void
AddDrawItem
(
LIB_DRAW_ITEM
*
aItem
);
...
@@ -379,8 +380,8 @@ public:
...
@@ -379,8 +380,8 @@ public:
*
*
* This is just a pin object specific version of GetNextDrawItem().
* This is just a pin object specific version of GetNextDrawItem().
*
*
* @param
i
tem - Pointer to the previous pin item, or NULL to get the
* @param
aI
tem - Pointer to the previous pin item, or NULL to get the
* first pin in the draw object list.
*
first pin in the draw object list.
* @return - The next pin object in the list if found, otherwise NULL.
* @return - The next pin object in the list if found, otherwise NULL.
*/
*/
LIB_PIN
*
GetNextPin
(
LIB_PIN
*
aItem
=
NULL
)
LIB_PIN
*
GetNextPin
(
LIB_PIN
*
aItem
=
NULL
)
...
...
eeschema/class_library.h
View file @
7cb34aec
...
@@ -209,7 +209,7 @@ public:
...
@@ -209,7 +209,7 @@ public:
* Checks \a aComponent for name conflict in the library.
* Checks \a aComponent for name conflict in the library.
*
*
* @param aComponent - The component to check.
* @param aComponent - The component to check.
* @
er
turn True if a conflict exists. Otherwise false.
* @
re
turn True if a conflict exists. Otherwise false.
*/
*/
bool
Conflicts
(
LIB_COMPONENT
*
aComponent
);
bool
Conflicts
(
LIB_COMPONENT
*
aComponent
);
...
@@ -413,8 +413,8 @@ public:
...
@@ -413,8 +413,8 @@ public:
* inserts a component library into the library list.
* inserts a component library into the library list.
*
*
* @param aFileName - File name object of component library.
* @param aFileName - File name object of component library.
* @param aErr
e
rMsg - Error message if the component library failed to load.
* @param aErr
o
rMsg - Error message if the component library failed to load.
* @param aIterat
i
r - Iterator to insert library in front of.
* @param aIterat
o
r - Iterator to insert library in front of.
* @return True if library loaded properly otherwise false.
* @return True if library loaded properly otherwise false.
*/
*/
static
bool
AddLibrary
(
const
wxFileName
&
aFileName
,
wxString
&
aErrorMsg
,
static
bool
AddLibrary
(
const
wxFileName
&
aFileName
,
wxString
&
aErrorMsg
,
...
@@ -456,7 +456,7 @@ public:
...
@@ -456,7 +456,7 @@ public:
* A component object will always be returned. If the entry found
* A component object will always be returned. If the entry found
* is an alias. The root component will be found and returned.
* is an alias. The root component will be found and returned.
*
*
* @param aCompoentName - Name of component to search for.
* @param aCompo
n
entName - Name of component to search for.
* @param aLibraryName - Name of the library to search for component.
* @param aLibraryName - Name of the library to search for component.
* @return The component object if found, otherwise NULL.
* @return The component object if found, otherwise NULL.
*/
*/
...
...
eeschema/dangling_ends.cpp
View file @
7cb34aec
...
@@ -55,6 +55,7 @@ void SCH_EDIT_FRAME::TestDanglingEnds( SCH_ITEM* aDrawList, wxDC* aDC )
...
@@ -55,6 +55,7 @@ void SCH_EDIT_FRAME::TestDanglingEnds( SCH_ITEM* aDrawList, wxDC* aDC )
* Test if point pos is on a pin end.
* Test if point pos is on a pin end.
*
*
* @param DrawList = List of SCH_ITEMs to check.
* @param DrawList = List of SCH_ITEMs to check.
* @param pos - Position of pin end to locate.
* @return a LIB_PIN pointer to the located pin or NULL if no pin was found.
* @return a LIB_PIN pointer to the located pin or NULL if no pin was found.
*/
*/
LIB_PIN
*
SCH_EDIT_FRAME
::
LocatePinEnd
(
SCH_ITEM
*
DrawList
,
const
wxPoint
&
pos
)
LIB_PIN
*
SCH_EDIT_FRAME
::
LocatePinEnd
(
SCH_ITEM
*
DrawList
,
const
wxPoint
&
pos
)
...
...
eeschema/dialogs/dialog_build_BOM.cpp
View file @
7cb34aec
...
@@ -635,7 +635,7 @@ int DIALOG_BUILD_BOM::PrintComponentsListByRef(
...
@@ -635,7 +635,7 @@ int DIALOG_BUILD_BOM::PrintComponentsListByRef(
bool
isMulti
=
false
;
bool
isMulti
=
false
;
LIB_COMPONENT
*
entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
comp
->
m_ChipName
);
LIB_COMPONENT
*
entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
comp
->
GetLibName
()
);
if
(
entry
)
if
(
entry
)
isMulti
=
entry
->
IsMulti
();
isMulti
=
entry
->
IsMulti
();
...
@@ -772,7 +772,7 @@ int DIALOG_BUILD_BOM::PrintComponentsListByPart(
...
@@ -772,7 +772,7 @@ int DIALOG_BUILD_BOM::PrintComponentsListByPart(
if
(
aIncludeSubComponents
)
if
(
aIncludeSubComponents
)
{
{
LIB_COMPONENT
*
entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
currCmp
->
m_ChipName
);
LIB_COMPONENT
*
entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
currCmp
->
GetLibName
()
);
if
(
entry
)
if
(
entry
)
multi
=
entry
->
GetPartCount
();
multi
=
entry
->
GetPartCount
();
...
@@ -888,7 +888,8 @@ int DIALOG_BUILD_BOM::PrintComponentsListByVal(
...
@@ -888,7 +888,8 @@ int DIALOG_BUILD_BOM::PrintComponentsListByVal(
DrawLibItem
=
(
SCH_COMPONENT
*
)
schItem
;
DrawLibItem
=
(
SCH_COMPONENT
*
)
schItem
;
bool
isMulti
=
false
;
bool
isMulti
=
false
;
entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
DrawLibItem
->
m_ChipName
);
entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
DrawLibItem
->
GetLibName
()
);
if
(
entry
)
if
(
entry
)
isMulti
=
entry
->
IsMulti
();
isMulti
=
entry
->
IsMulti
();
...
...
eeschema/dialogs/dialog_edit_component_in_schematic.cpp
View file @
7cb34aec
...
@@ -175,15 +175,15 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToOptions()
...
@@ -175,15 +175,15 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToOptions()
// selected shape:
// selected shape:
if
(
convertCheckBox
->
IsEnabled
()
)
if
(
convertCheckBox
->
IsEnabled
()
)
{
{
m_Cmp
->
m_Convert
=
convertCheckBox
->
GetValue
()
?
2
:
1
;
m_Cmp
->
SetConvert
(
convertCheckBox
->
GetValue
()
?
2
:
1
)
;
}
}
//Set the part selection in multiple part per pakcage
//Set the part selection in multiple part per pakcage
if
(
m_Cmp
->
m_Multi
)
if
(
m_Cmp
->
GetUnit
()
)
{
{
int
unit_selection
=
unitChoice
->
GetCurrentSelection
()
+
1
;
int
unit_selection
=
unitChoice
->
GetCurrentSelection
()
+
1
;
m_Cmp
->
SetUnitSelection
(
m_Parent
->
GetSheet
(),
unit_selection
);
m_Cmp
->
SetUnitSelection
(
m_Parent
->
GetSheet
(),
unit_selection
);
m_Cmp
->
m_Multi
=
unit_selection
;
m_Cmp
->
SetUnit
(
unit_selection
)
;
}
}
switch
(
orientationRadioBox
->
GetSelection
()
)
switch
(
orientationRadioBox
->
GetSelection
()
)
...
@@ -715,8 +715,8 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyOptionsToPanel()
...
@@ -715,8 +715,8 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyOptionsToPanel()
// For components with multiple parts per package, set the unit selection
// For components with multiple parts per package, set the unit selection
choiceCount
=
unitChoice
->
GetCount
();
choiceCount
=
unitChoice
->
GetCount
();
if
(
m_Cmp
->
m_Multi
<=
choiceCount
)
if
(
m_Cmp
->
GetUnit
()
<=
choiceCount
)
unitChoice
->
SetSelection
(
m_Cmp
->
m_Multi
-
1
);
unitChoice
->
SetSelection
(
m_Cmp
->
GetUnit
()
-
1
);
// Disable unit selection if only one unit exists:
// Disable unit selection if only one unit exists:
if
(
choiceCount
<=
1
)
if
(
choiceCount
<=
1
)
...
@@ -751,7 +751,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyOptionsToPanel()
...
@@ -751,7 +751,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyOptionsToPanel()
// Activate/Desactivate the normal/convert option ? (activated only if
// Activate/Desactivate the normal/convert option ? (activated only if
// the component has more than one shape)
// the component has more than one shape)
if
(
m_Cmp
->
m_Convert
>
1
)
if
(
m_Cmp
->
GetConvert
()
>
1
)
{
{
convertCheckBox
->
SetValue
(
true
);
convertCheckBox
->
SetValue
(
true
);
}
}
...
...
eeschema/edit_component_in_schematic.cpp
View file @
7cb34aec
...
@@ -66,7 +66,7 @@ void SCH_EDIT_FRAME::StartMoveCmpField( SCH_FIELD* aField, wxDC* DC )
...
@@ -66,7 +66,7 @@ void SCH_EDIT_FRAME::StartMoveCmpField( SCH_FIELD* aField, wxDC* DC )
m_Multiflag
=
0
;
m_Multiflag
=
0
;
if
(
aField
->
m_FieldId
==
REFERENCE
)
if
(
aField
->
m_FieldId
==
REFERENCE
)
{
{
Entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
comp
->
m_ChipName
);
Entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
comp
->
GetLibName
()
);
if
(
Entry
!=
NULL
)
if
(
Entry
!=
NULL
)
{
{
...
@@ -103,7 +103,7 @@ void SCH_EDIT_FRAME::EditCmpFieldText( SCH_FIELD* Field, wxDC* DC )
...
@@ -103,7 +103,7 @@ void SCH_EDIT_FRAME::EditCmpFieldText( SCH_FIELD* Field, wxDC* DC )
if
(
fieldNdx
==
VALUE
)
if
(
fieldNdx
==
VALUE
)
{
{
Entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
Cmp
->
m_ChipName
);
Entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
Cmp
->
GetLibName
()
);
if
(
Entry
&&
Entry
->
IsPower
()
)
if
(
Entry
&&
Entry
->
IsPower
()
)
{
{
...
@@ -116,7 +116,7 @@ modified!\nYou must create a new power" ) );
...
@@ -116,7 +116,7 @@ modified!\nYou must create a new power" ) );
flag
=
0
;
flag
=
0
;
if
(
fieldNdx
==
REFERENCE
)
if
(
fieldNdx
==
REFERENCE
)
{
{
Entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
Cmp
->
m_ChipName
);
Entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
Cmp
->
GetLibName
()
);
if
(
Entry
!=
NULL
)
if
(
Entry
!=
NULL
)
{
{
...
@@ -255,7 +255,7 @@ void SCH_EDIT_FRAME::RotateCmpField( SCH_FIELD* Field, wxDC* DC )
...
@@ -255,7 +255,7 @@ void SCH_EDIT_FRAME::RotateCmpField( SCH_FIELD* Field, wxDC* DC )
if
(
fieldNdx
==
REFERENCE
)
if
(
fieldNdx
==
REFERENCE
)
{
{
Entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
Entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
(
(
SCH_COMPONENT
*
)
Field
->
GetParent
()
)
->
m_ChipName
);
(
(
SCH_COMPONENT
*
)
Field
->
GetParent
()
)
->
GetLibName
()
);
if
(
Entry
!=
NULL
)
if
(
Entry
!=
NULL
)
{
{
...
@@ -292,7 +292,7 @@ void SCH_EDIT_FRAME::EditComponentReference( SCH_COMPONENT* Cmp, wxDC* DC )
...
@@ -292,7 +292,7 @@ void SCH_EDIT_FRAME::EditComponentReference( SCH_COMPONENT* Cmp, wxDC* DC )
if
(
Cmp
==
NULL
)
if
(
Cmp
==
NULL
)
return
;
return
;
Entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
Cmp
->
m_ChipName
);
Entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
Cmp
->
GetLibName
()
);
if
(
Entry
==
NULL
)
if
(
Entry
==
NULL
)
return
;
return
;
...
@@ -339,7 +339,7 @@ void SCH_EDIT_FRAME::EditComponentValue( SCH_COMPONENT* Cmp, wxDC* DC )
...
@@ -339,7 +339,7 @@ void SCH_EDIT_FRAME::EditComponentValue( SCH_COMPONENT* Cmp, wxDC* DC )
if
(
Cmp
==
NULL
)
if
(
Cmp
==
NULL
)
return
;
return
;
Entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
Cmp
->
m_ChipName
);
Entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
Cmp
->
GetLibName
()
);
if
(
Entry
==
NULL
)
if
(
Entry
==
NULL
)
return
;
return
;
...
@@ -381,7 +381,7 @@ void SCH_EDIT_FRAME::EditComponentFootprint( SCH_COMPONENT* Cmp, wxDC* DC )
...
@@ -381,7 +381,7 @@ void SCH_EDIT_FRAME::EditComponentFootprint( SCH_COMPONENT* Cmp, wxDC* DC )
if
(
Cmp
==
NULL
)
if
(
Cmp
==
NULL
)
return
;
return
;
Entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
Cmp
->
m_ChipName
);
Entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
Cmp
->
GetLibName
()
);
if
(
Entry
==
NULL
)
if
(
Entry
==
NULL
)
return
;
return
;
...
...
eeschema/getpart.cpp
View file @
7cb34aec
...
@@ -207,7 +207,7 @@ SCH_COMPONENT* SCH_EDIT_FRAME::Load_Component( wxDC* DC,
...
@@ -207,7 +207,7 @@ SCH_COMPONENT* SCH_EDIT_FRAME::Load_Component( wxDC* DC,
// Set the m_ChipName value, from component name in lib, for aliases
// Set the m_ChipName value, from component name in lib, for aliases
// Note if Entry is found, and if Name is an alias of a component,
// Note if Entry is found, and if Name is an alias of a component,
// alias exists because its root component was found
// alias exists because its root component was found
Component
->
m_ChipName
=
Name
;
Component
->
SetLibName
(
Name
)
;
// Set the component value that can differ from component name in lib, for aliases
// Set the component value that can differ from component name in lib, for aliases
Component
->
GetField
(
VALUE
)
->
m_Text
=
Name
;
Component
->
GetField
(
VALUE
)
->
m_Text
=
Name
;
...
@@ -322,7 +322,7 @@ void SCH_EDIT_FRAME::SelPartUnit( SCH_COMPONENT* DrawComponent, int unit, wxDC*
...
@@ -322,7 +322,7 @@ void SCH_EDIT_FRAME::SelPartUnit( SCH_COMPONENT* DrawComponent, int unit, wxDC*
if
(
DrawComponent
==
NULL
)
if
(
DrawComponent
==
NULL
)
return
;
return
;
LibEntry
=
CMP_LIBRARY
::
FindLibraryComponent
(
DrawComponent
->
m_ChipName
);
LibEntry
=
CMP_LIBRARY
::
FindLibraryComponent
(
DrawComponent
->
GetLibName
()
);
if
(
LibEntry
==
NULL
)
if
(
LibEntry
==
NULL
)
return
;
return
;
...
@@ -332,7 +332,7 @@ void SCH_EDIT_FRAME::SelPartUnit( SCH_COMPONENT* DrawComponent, int unit, wxDC*
...
@@ -332,7 +332,7 @@ void SCH_EDIT_FRAME::SelPartUnit( SCH_COMPONENT* DrawComponent, int unit, wxDC*
if
(
m_UnitCount
<=
1
)
if
(
m_UnitCount
<=
1
)
return
;
return
;
if
(
DrawComponent
->
m_Multi
==
unit
)
if
(
DrawComponent
->
GetUnit
()
==
unit
)
return
;
return
;
if
(
unit
<
1
)
if
(
unit
<
1
)
...
@@ -348,7 +348,7 @@ void SCH_EDIT_FRAME::SelPartUnit( SCH_COMPONENT* DrawComponent, int unit, wxDC*
...
@@ -348,7 +348,7 @@ void SCH_EDIT_FRAME::SelPartUnit( SCH_COMPONENT* DrawComponent, int unit, wxDC*
/* Update the unit number. */
/* Update the unit number. */
DrawComponent
->
SetUnitSelection
(
GetSheet
(),
unit
);
DrawComponent
->
SetUnitSelection
(
GetSheet
(),
unit
);
DrawComponent
->
m_Multi
=
unit
;
DrawComponent
->
SetUnit
(
unit
)
;
/* Redraw the component in the new position. */
/* Redraw the component in the new position. */
if
(
DrawComponent
->
m_Flags
)
if
(
DrawComponent
->
m_Flags
)
...
@@ -368,7 +368,7 @@ void SCH_EDIT_FRAME::ConvertPart( SCH_COMPONENT* DrawComponent, wxDC* DC )
...
@@ -368,7 +368,7 @@ void SCH_EDIT_FRAME::ConvertPart( SCH_COMPONENT* DrawComponent, wxDC* DC )
if
(
DrawComponent
==
NULL
)
if
(
DrawComponent
==
NULL
)
return
;
return
;
LibEntry
=
CMP_LIBRARY
::
FindLibraryComponent
(
DrawComponent
->
m_ChipName
);
LibEntry
=
CMP_LIBRARY
::
FindLibraryComponent
(
DrawComponent
->
GetLibName
()
);
if
(
LibEntry
==
NULL
)
if
(
LibEntry
==
NULL
)
return
;
return
;
...
@@ -384,22 +384,22 @@ void SCH_EDIT_FRAME::ConvertPart( SCH_COMPONENT* DrawComponent, wxDC* DC )
...
@@ -384,22 +384,22 @@ void SCH_EDIT_FRAME::ConvertPart( SCH_COMPONENT* DrawComponent, wxDC* DC )
else
else
DrawComponent
->
Draw
(
DrawPanel
,
DC
,
wxPoint
(
0
,
0
),
g_XorMode
);
DrawComponent
->
Draw
(
DrawPanel
,
DC
,
wxPoint
(
0
,
0
),
g_XorMode
);
DrawComponent
->
m_Convert
++
;
DrawComponent
->
SetConvert
(
DrawComponent
->
GetConvert
()
+
1
);
// ensure m_Convert = 0, 1 or 2
// ensure m_Convert = 0, 1 or 2
// 0 and 1 = shape 1 = not converted
// 0 and 1 = shape 1 = not converted
// 2 = shape 2 = first converted shape
// 2 = shape 2 = first converted shape
// > 2 is not used but could be used for more shapes
// > 2 is not used but could be used for more shapes
// like multiple shapes for a programmable component
// like multiple shapes for a programmable component
// When m_Convert = val max, return to the first shape
// When m_Convert = val max, return to the first shape
if
(
DrawComponent
->
m_Convert
>
2
)
if
(
DrawComponent
->
GetConvert
()
>
2
)
DrawComponent
->
m_Convert
=
1
;
DrawComponent
->
SetConvert
(
1
)
;
/* Redraw the component in the new position. */
/* Redraw the component in the new position. */
if
(
DrawComponent
->
m_Flags
&
IS_MOVED
)
if
(
DrawComponent
->
m_Flags
&
IS_MOVED
)
DrawStructsInGhost
(
DrawPanel
,
DC
,
DrawComponent
,
wxPoint
(
0
,
0
)
);
DrawStructsInGhost
(
DrawPanel
,
DC
,
DrawComponent
,
wxPoint
(
0
,
0
)
);
else
else
DrawComponent
->
Draw
(
DrawPanel
,
DC
,
wxPoint
(
0
,
0
),
DrawComponent
->
Draw
(
DrawPanel
,
DC
,
wxPoint
(
0
,
0
),
GR_DEFAULT_DRAWMODE
);
GR_DEFAULT_DRAWMODE
);
TestDanglingEnds
(
GetScreen
()
->
GetDrawItems
(),
DC
);
TestDanglingEnds
(
GetScreen
()
->
GetDrawItems
(),
DC
);
OnModify
(
);
OnModify
(
);
...
...
eeschema/help_common_strings.h
View file @
7cb34aec
/**
/**
* @file help_common_strings.h
* @file
eeschema/
help_common_strings.h
* strings common to toolbars and menubar
* strings common to toolbars and menubar
*/
*/
...
...
eeschema/lib_arc.cpp
View file @
7cb34aec
...
@@ -157,12 +157,6 @@ bool LIB_ARC::Load( char* aLine, wxString& aErrorMsg )
...
@@ -157,12 +157,6 @@ bool LIB_ARC::Load( char* aLine, wxString& aErrorMsg )
}
}
/**
* Function HitTest
* tests if the given wxPoint is within the bounds of this object.
* @param aRefPoint A wxPoint to test in eeschema space
* @return bool - true if a hit, else false
*/
bool
LIB_ARC
::
HitTest
(
const
wxPoint
&
aRefPoint
)
bool
LIB_ARC
::
HitTest
(
const
wxPoint
&
aRefPoint
)
{
{
int
mindist
=
m_Width
?
m_Width
/
2
:
g_DrawDefaultLineThickness
/
2
;
int
mindist
=
m_Width
?
m_Width
/
2
:
g_DrawDefaultLineThickness
/
2
;
...
@@ -174,19 +168,12 @@ bool LIB_ARC::HitTest( const wxPoint& aRefPoint )
...
@@ -174,19 +168,12 @@ bool LIB_ARC::HitTest( const wxPoint& aRefPoint )
return
HitTest
(
aRefPoint
,
mindist
,
DefaultTransform
);
return
HitTest
(
aRefPoint
,
mindist
,
DefaultTransform
);
}
}
/**
* Function HitTest
bool
LIB_ARC
::
HitTest
(
wxPoint
aPosition
,
int
aThreshold
,
const
TRANSFORM
&
aTransform
)
* @return true if the point aPosRef is near this object
* @param aRefPoint = a wxPoint to test
* @param aThreshold = max distance to this object (usually the half thickness
* of a line)
* @param aTransMat = the transform matrix
*/
bool
LIB_ARC
::
HitTest
(
wxPoint
aReferencePoint
,
int
aThreshold
,
const
TRANSFORM
&
aTransform
)
{
{
// TODO: use aTransMat to calculates parameters
// TODO: use aTransMat to calculates parameters
wxPoint
relativePosition
=
a
ReferencePoint
;
wxPoint
relativePosition
=
a
Position
;
NEGATE
(
relativePosition
.
y
);
// reverse Y axis
NEGATE
(
relativePosition
.
y
);
// reverse Y axis
...
...
eeschema/lib_arc.h
View file @
7cb34aec
...
@@ -82,19 +82,19 @@ public:
...
@@ -82,19 +82,19 @@ public:
/**
/**
* Tests if the given wxPoint is within the bounds of this object.
* Tests if the given wxPoint is within the bounds of this object.
*
*
* @param a
RefPos
- Coordinates to test
* @param a
Position
- Coordinates to test
* @return - True if a hit, else false
* @return - True if a hit, else false
*/
*/
virtual
bool
HitTest
(
const
wxPoint
&
a
RefPos
);
virtual
bool
HitTest
(
const
wxPoint
&
a
Position
);
/**
/**
* @param aPos
Ref
- a wxPoint to test
* @param aPos
ition
- a wxPoint to test
* @param aThreshold - max distance to this object (usually the half
* @param aThreshold - max distance to this object (usually the half
* thickness of a line)
* thickness of a line)
* @param aTransform - the transform matrix
* @param aTransform - the transform matrix
* @return - True if the point
aPosRef
is near this object
* @return - True if the point
\a aPosition
is near this object
*/
*/
virtual
bool
HitTest
(
wxPoint
aPos
Ref
,
int
aThreshold
,
const
TRANSFORM
&
aTransform
);
virtual
bool
HitTest
(
wxPoint
aPos
ition
,
int
aThreshold
,
const
TRANSFORM
&
aTransform
);
virtual
EDA_Rect
GetBoundingBox
()
const
;
virtual
EDA_Rect
GetBoundingBox
()
const
;
virtual
void
DisplayInfo
(
WinEDA_DrawFrame
*
frame
);
virtual
void
DisplayInfo
(
WinEDA_DrawFrame
*
frame
);
...
...
eeschema/lib_bezier.cpp
View file @
7cb34aec
...
@@ -317,7 +317,7 @@ bool LIB_BEZIER::HitTest( const wxPoint& aRefPos )
...
@@ -317,7 +317,7 @@ bool LIB_BEZIER::HitTest( const wxPoint& aRefPos )
* @return if the point aPosRef is near a segment
* @return if the point aPosRef is near a segment
* @param aPosRef = a wxPoint to test
* @param aPosRef = a wxPoint to test
* @param aThreshold = max distance to a segment
* @param aThreshold = max distance to a segment
* @param aTrans
Mat
= the transform matrix
* @param aTrans
form
= the transform matrix
*/
*/
bool
LIB_BEZIER
::
HitTest
(
wxPoint
aPosRef
,
int
aThreshold
,
const
TRANSFORM
&
aTransform
)
bool
LIB_BEZIER
::
HitTest
(
wxPoint
aPosRef
,
int
aThreshold
,
const
TRANSFORM
&
aTransform
)
{
{
...
...
eeschema/lib_circle.cpp
View file @
7cb34aec
...
@@ -89,9 +89,8 @@ bool LIB_CIRCLE::HitTest( const wxPoint& aPosRef )
...
@@ -89,9 +89,8 @@ bool LIB_CIRCLE::HitTest( const wxPoint& aPosRef )
* Function HitTest
* Function HitTest
* @return true if the point aPosRef is near this object
* @return true if the point aPosRef is near this object
* @param aPosRef = a wxPoint to test
* @param aPosRef = a wxPoint to test
* @param aThreshold = max distance to this object (usually the half
* @param aThreshold = max distance to this object (usually the half thickness of a line)
* thickness of a line)
* @param aTransform = the transform matrix
* @param aTransMat = the transform matrix
*/
*/
bool
LIB_CIRCLE
::
HitTest
(
wxPoint
aPosRef
,
int
aThreshold
,
const
TRANSFORM
&
aTransform
)
bool
LIB_CIRCLE
::
HitTest
(
wxPoint
aPosRef
,
int
aThreshold
,
const
TRANSFORM
&
aTransform
)
{
{
...
...
eeschema/lib_draw_item.h
View file @
7cb34aec
...
@@ -191,7 +191,6 @@ public:
...
@@ -191,7 +191,6 @@ public:
* Write draw item object to \a aFile in "*.lib" format.
* Write draw item object to \a aFile in "*.lib" format.
*
*
* @param aFile - The file to write to.
* @param aFile - The file to write to.
* @param aErrorMsg - Error message if write fails.
* @return - true if success writing else false.
* @return - true if success writing else false.
*/
*/
virtual
bool
Save
(
FILE
*
aFile
)
=
0
;
virtual
bool
Save
(
FILE
*
aFile
)
=
0
;
...
@@ -216,13 +215,13 @@ public:
...
@@ -216,13 +215,13 @@ public:
}
}
/**
/**
* @param aPos
Ref
- a wxPoint to test
* @param aPos
ition
- a wxPoint to test
* @param aThreshold - max distance to this object (usually the half
* @param aThreshold - max distance to this object (usually the half
* thickness of a line)
* thickness of a line)
* @param aTransform - the transform matrix
* @param aTransform - the transform matrix
* @return - true if the point
aPosRef
is near this object
* @return - true if the point
\a aPosition
is near this object
*/
*/
virtual
bool
HitTest
(
wxPoint
aPos
Ref
,
int
aThreshold
,
const
TRANSFORM
&
aTransform
)
=
0
;
virtual
bool
HitTest
(
wxPoint
aPos
ition
,
int
aThreshold
,
const
TRANSFORM
&
aTransform
)
=
0
;
/**
/**
* @return the boundary box for this, in library coordinates
* @return the boundary box for this, in library coordinates
...
...
eeschema/lib_field.cpp
View file @
7cb34aec
...
@@ -348,26 +348,13 @@ void LIB_FIELD::drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint&
...
@@ -348,26 +348,13 @@ void LIB_FIELD::drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint&
}
}
/**
bool
LIB_FIELD
::
HitTest
(
const
wxPoint
&
aPosition
)
* Function HitTest
* tests if the given wxPoint is within the bounds of this object.
* @param refPos A wxPoint to test, in Field coordinate system
* @return bool - true if a hit, else false
*/
bool
LIB_FIELD
::
HitTest
(
const
wxPoint
&
refPos
)
{
{
return
HitTest
(
refPos
,
0
,
DefaultTransform
);
return
HitTest
(
aPosition
,
0
,
DefaultTransform
);
}
}
/**
bool
LIB_FIELD
::
HitTest
(
wxPoint
aPosition
,
int
aThreshold
,
const
TRANSFORM
&
aTransform
)
* Function HitTest
* @return true if the point aPosRef is near this object
* @param aPosRef = a wxPoint to test
* @param aThreshold = unused here (TextHitTest calculates its threshold )
* @param aTransMat = the transform matrix
*/
bool
LIB_FIELD
::
HitTest
(
wxPoint
aPosRef
,
int
aThreshold
,
const
TRANSFORM
&
aTransform
)
{
{
int
extraCharCount
=
0
;
int
extraCharCount
=
0
;
...
@@ -398,7 +385,7 @@ bool LIB_FIELD::HitTest( wxPoint aPosRef, int aThreshold, const TRANSFORM& aTran
...
@@ -398,7 +385,7 @@ bool LIB_FIELD::HitTest( wxPoint aPosRef, int aThreshold, const TRANSFORM& aTran
int
orient
=
t1
?
TEXT_ORIENT_HORIZ
:
TEXT_ORIENT_VERT
;
int
orient
=
t1
?
TEXT_ORIENT_HORIZ
:
TEXT_ORIENT_VERT
;
EXCHG
(
m_Orient
,
orient
);
EXCHG
(
m_Orient
,
orient
);
bool
hit
=
TextHitTest
(
aPosRef
);
bool
hit
=
TextHitTest
(
aPosition
);
EXCHG
(
m_Orient
,
orient
);
EXCHG
(
m_Orient
,
orient
);
m_Pos
=
tmp
;
m_Pos
=
tmp
;
...
@@ -420,25 +407,20 @@ LIB_DRAW_ITEM* LIB_FIELD::DoGenCopy()
...
@@ -420,25 +407,20 @@ LIB_DRAW_ITEM* LIB_FIELD::DoGenCopy()
}
}
/**
void
LIB_FIELD
::
Copy
(
LIB_FIELD
*
aTarget
)
const
* Function Copy
* copy parameters of this to Target. Pointers are not copied
* @param Target = the LIB_FIELD to set with "this" values
*/
void
LIB_FIELD
::
Copy
(
LIB_FIELD
*
Target
)
const
{
{
Target
->
SetParent
(
m_Parent
);
a
Target
->
SetParent
(
m_Parent
);
Target
->
m_Pos
=
m_Pos
;
a
Target
->
m_Pos
=
m_Pos
;
Target
->
m_Size
=
m_Size
;
a
Target
->
m_Size
=
m_Size
;
Target
->
m_Thickness
=
m_Thickness
;
aTarget
->
m_Thickness
=
m_Thickness
;
Target
->
m_Orient
=
m_Orient
;
a
Target
->
m_Orient
=
m_Orient
;
Target
->
m_Attributs
=
m_Attributs
;
a
Target
->
m_Attributs
=
m_Attributs
;
Target
->
m_Text
=
m_Text
;
a
Target
->
m_Text
=
m_Text
;
Target
->
m_name
=
m_name
;
a
Target
->
m_name
=
m_name
;
Target
->
m_HJustify
=
m_HJustify
;
a
Target
->
m_HJustify
=
m_HJustify
;
Target
->
m_VJustify
=
m_VJustify
;
a
Target
->
m_VJustify
=
m_VJustify
;
Target
->
m_Italic
=
m_Italic
;
a
Target
->
m_Italic
=
m_Italic
;
Target
->
m_Bold
=
m_Bold
;
a
Target
->
m_Bold
=
m_Bold
;
}
}
...
...
eeschema/lib_field.h
View file @
7cb34aec
/*************************************************************
*
/
/*************************************************************/
/*
Lib component definitions (libentry) definition of fields */
/* Lib component definitions (libentry) definition of fields */
/*************************************************************
*
/
/*************************************************************/
#ifndef CLASS_LIBENTRY_FIELDS_H
#ifndef CLASS_LIBENTRY_FIELDS_H
#define CLASS_LIBENTRY_FIELDS_H
#define CLASS_LIBENTRY_FIELDS_H
...
@@ -131,19 +131,19 @@ public:
...
@@ -131,19 +131,19 @@ public:
/**
/**
* Test if the given point is within the bounds of this object.
* Test if the given point is within the bounds of this object.
*
*
* @param
refPos
A point to test in field coordinate system
* @param
aPoition
A point to test in field coordinate system
* @return True if a hit, else false
* @return True if a hit, else false
*/
*/
bool
HitTest
(
const
wxPoint
&
refPos
);
bool
HitTest
(
const
wxPoint
&
aPosition
);
/**
/**
* @param aPos
Ref
= a wxPoint to test
* @param aPos
ition
= a wxPoint to test
* @param aThreshold = max distance to this object (usually the half
* @param aThreshold = max distance to this object (usually the half
* thickness of a line)
* thickness of a line)
* @param aTransform = the transform matrix
* @param aTransform = the transform matrix
* @return True if the point
aPosRef
is near this object
* @return True if the point
\a aPosition
is near this object
*/
*/
virtual
bool
HitTest
(
wxPoint
aPos
Ref
,
int
aThreshold
,
const
TRANSFORM
&
aTransform
);
virtual
bool
HitTest
(
wxPoint
aPos
ition
,
int
aThreshold
,
const
TRANSFORM
&
aTransform
);
void
operator
=
(
const
LIB_FIELD
&
field
)
void
operator
=
(
const
LIB_FIELD
&
field
)
{
{
...
...
eeschema/lib_pin.cpp
View file @
7cb34aec
...
@@ -517,13 +517,7 @@ void LIB_PIN::EnableEditMode( bool enable, bool editPinByPin )
...
@@ -517,13 +517,7 @@ void LIB_PIN::EnableEditMode( bool enable, bool editPinByPin )
}
}
/**
bool
LIB_PIN
::
HitTest
(
const
wxPoint
&
aPosition
)
* Function HitTest
* tests if the given wxPoint is within the bounds of this object.
* @param aRefPos A wxPoint to test
* @return bool - true if a hit, else false
*/
bool
LIB_PIN
::
HitTest
(
const
wxPoint
&
aRefPos
)
{
{
int
mindist
=
m_width
?
m_width
/
2
:
g_DrawDefaultLineThickness
/
2
;
int
mindist
=
m_width
?
m_width
/
2
:
g_DrawDefaultLineThickness
/
2
;
...
@@ -531,23 +525,16 @@ bool LIB_PIN::HitTest( const wxPoint& aRefPos )
...
@@ -531,23 +525,16 @@ bool LIB_PIN::HitTest( const wxPoint& aRefPos )
if
(
mindist
<
3
)
if
(
mindist
<
3
)
mindist
=
3
;
// = 3 mils
mindist
=
3
;
// = 3 mils
return
HitTest
(
a
RefPos
,
mindist
,
DefaultTransform
);
return
HitTest
(
a
Position
,
mindist
,
DefaultTransform
);
}
}
/**
bool
LIB_PIN
::
HitTest
(
wxPoint
aPosition
,
int
aThreshold
,
const
TRANSFORM
&
aTransform
)
* Function HitTest
* @return true if the point aPosRef is near a pin
* @param aRefPos = a wxPoint to test
* @param aThreshold = max distance to a segment
* @param aTransMat = the transform matrix
*/
bool
LIB_PIN
::
HitTest
(
wxPoint
aRefPos
,
int
aThreshold
,
const
TRANSFORM
&
aTransform
)
{
{
wxPoint
pinPos
=
aTransform
.
TransformCoordinate
(
m_position
);
wxPoint
pinPos
=
aTransform
.
TransformCoordinate
(
m_position
);
wxPoint
pinEnd
=
aTransform
.
TransformCoordinate
(
ReturnPinEndPoint
()
);
wxPoint
pinEnd
=
aTransform
.
TransformCoordinate
(
ReturnPinEndPoint
()
);
return
TestSegmentHit
(
a
RefPos
,
pinPos
,
pinEnd
,
aThreshold
);
return
TestSegmentHit
(
a
Position
,
pinPos
,
pinEnd
,
aThreshold
);
}
}
...
@@ -1502,12 +1489,6 @@ wxPoint LIB_PIN::ReturnPinEndPoint() const
...
@@ -1502,12 +1489,6 @@ wxPoint LIB_PIN::ReturnPinEndPoint() const
}
}
/**
* Function ReturnPinDrawOrient
* Return the pin real orientation (PIN_UP, PIN_DOWN, PIN_RIGHT, PIN_LEFT),
* according to its orientation and the matrix transform (rot, mirror) TransMat
* @param TransMat = transform matrix
*/
int
LIB_PIN
::
ReturnPinDrawOrient
(
const
TRANSFORM
&
aTransform
)
int
LIB_PIN
::
ReturnPinDrawOrient
(
const
TRANSFORM
&
aTransform
)
{
{
int
orient
;
int
orient
;
...
...
eeschema/lib_pin.h
View file @
7cb34aec
...
@@ -158,6 +158,12 @@ public:
...
@@ -158,6 +158,12 @@ public:
wxPoint
ReturnPinEndPoint
()
const
;
wxPoint
ReturnPinEndPoint
()
const
;
/**
* Function ReturnPinDrawOrient
* Return the pin real orientation (PIN_UP, PIN_DOWN, PIN_RIGHT, PIN_LEFT),
* according to its orientation and the matrix transform (rot, mirror) \a aTransform
* @param aTransform = transform matrix
*/
int
ReturnPinDrawOrient
(
const
TRANSFORM
&
aTransform
);
int
ReturnPinDrawOrient
(
const
TRANSFORM
&
aTransform
);
/**
/**
...
@@ -192,7 +198,7 @@ public:
...
@@ -192,7 +198,7 @@ public:
*
*
* This will also all of the pin names marked by EnableEditMode().
* This will also all of the pin names marked by EnableEditMode().
*
*
* @param
n
ame - New pin name.
* @param
aN
ame - New pin name.
*/
*/
void
SetName
(
const
wxString
&
aName
);
void
SetName
(
const
wxString
&
aName
);
...
@@ -288,8 +294,8 @@ public:
...
@@ -288,8 +294,8 @@ public:
* If the pin is changed from not common to common to all body styles, any
* If the pin is changed from not common to common to all body styles, any
* linked pins will be removed from the parent component.
* linked pins will be removed from the parent component.
*
*
* @param
c
onversion - Body style of the pin. Set to zero to make pin
* @param
aC
onversion - Body style of the pin. Set to zero to make pin
* common to all body styles.
*
common to all body styles.
*/
*/
void
SetConversion
(
int
aConversion
);
void
SetConversion
(
int
aConversion
);
...
@@ -314,9 +320,9 @@ public:
...
@@ -314,9 +320,9 @@ public:
* parts or body styles in the component. See SetCommonToAllParts()
* parts or body styles in the component. See SetCommonToAllParts()
* and SetCommonToAllBodyStyles() for more information.
* and SetCommonToAllBodyStyles() for more information.
*
*
* @param
s
aEnable - True marks all common pins for editing mode. False
* @param aEnable - True marks all common pins for editing mode. False
*
clears the editing mode.
* clears the editing mode.
* @param
s aEditp
inByPin - Enables the edit pin by pin mode.
* @param
aEditP
inByPin - Enables the edit pin by pin mode.
*/
*/
void
EnableEditMode
(
bool
aEnable
,
bool
aEditPinByPin
=
false
);
void
EnableEditMode
(
bool
aEnable
,
bool
aEditPinByPin
=
false
);
...
...
eeschema/lib_polyline.cpp
View file @
7cb34aec
...
@@ -313,31 +313,18 @@ void LIB_POLYLINE::drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoi
...
@@ -313,31 +313,18 @@ void LIB_POLYLINE::drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoi
}
}
/**
bool
LIB_POLYLINE
::
HitTest
(
const
wxPoint
&
aPosition
)
* Function HitTest
* tests if the given wxPoint is within the bounds of this object.
* @param aRefPos A wxPoint to test
* @return true if a hit, else false
*/
bool
LIB_POLYLINE
::
HitTest
(
const
wxPoint
&
aRefPos
)
{
{
int
mindist
=
m_Width
?
m_Width
/
2
:
g_DrawDefaultLineThickness
/
2
;
int
mindist
=
m_Width
?
m_Width
/
2
:
g_DrawDefaultLineThickness
/
2
;
// Have a minimal tolerance for hit test
// Have a minimal tolerance for hit test
if
(
mindist
<
MINIMUM_SELECTION_DISTANCE
)
if
(
mindist
<
MINIMUM_SELECTION_DISTANCE
)
mindist
=
MINIMUM_SELECTION_DISTANCE
;
mindist
=
MINIMUM_SELECTION_DISTANCE
;
return
HitTest
(
a
RefPos
,
mindist
,
DefaultTransform
);
return
HitTest
(
a
Position
,
mindist
,
DefaultTransform
);
}
}
/**
bool
LIB_POLYLINE
::
HitTest
(
wxPoint
aPosition
,
int
aThreshold
,
const
TRANSFORM
&
aTransform
)
* Function HitTest
* @return true if the point aPosRef is near a segment
* @param aPosRef = a wxPoint to test
* @param aThreshold = max distance to a segment
* @param aTransMat = the transform matrix
*/
bool
LIB_POLYLINE
::
HitTest
(
wxPoint
aPosRef
,
int
aThreshold
,
const
TRANSFORM
&
aTransform
)
{
{
wxPoint
ref
,
start
,
end
;
wxPoint
ref
,
start
,
end
;
...
@@ -346,7 +333,7 @@ bool LIB_POLYLINE::HitTest( wxPoint aPosRef, int aThreshold, const TRANSFORM& aT
...
@@ -346,7 +333,7 @@ bool LIB_POLYLINE::HitTest( wxPoint aPosRef, int aThreshold, const TRANSFORM& aT
start
=
aTransform
.
TransformCoordinate
(
m_PolyPoints
[
ii
-
1
]
);
start
=
aTransform
.
TransformCoordinate
(
m_PolyPoints
[
ii
-
1
]
);
end
=
aTransform
.
TransformCoordinate
(
m_PolyPoints
[
ii
]
);
end
=
aTransform
.
TransformCoordinate
(
m_PolyPoints
[
ii
]
);
if
(
TestSegmentHit
(
aPos
Ref
,
start
,
end
,
aThreshold
)
)
if
(
TestSegmentHit
(
aPos
ition
,
start
,
end
,
aThreshold
)
)
return
true
;
return
true
;
}
}
...
...
eeschema/lib_polyline.h
View file @
7cb34aec
...
@@ -65,18 +65,18 @@ public:
...
@@ -65,18 +65,18 @@ public:
/**
/**
* Test if the given point is within the bounds of this object.
* Test if the given point is within the bounds of this object.
*
*
* @param a
RefPos
- A wxPoint to test
* @param a
Position
- A wxPoint to test
* @return - true if a hit, else false
* @return - true if a hit, else false
*/
*/
virtual
bool
HitTest
(
const
wxPoint
&
a
RefPos
);
virtual
bool
HitTest
(
const
wxPoint
&
a
Position
);
/**
/**
* @param aPos
Ref
= a wxPoint to test
* @param aPos
ition
= a wxPoint to test
* @param aThreshold = max distance to a segment
* @param aThreshold = max distance to a segment
* @param aTransform = the transform matrix
* @param aTransform = the transform matrix
* @return true if the point
aPosRef
is near a segment
* @return true if the point
\a aPosition
is near a segment
*/
*/
virtual
bool
HitTest
(
wxPoint
aPos
Ref
,
int
aThreshold
,
const
TRANSFORM
&
aTransform
);
virtual
bool
HitTest
(
wxPoint
aPos
ition
,
int
aThreshold
,
const
TRANSFORM
&
aTransform
);
/**
/**
* @return the boundary box for this, in library coordinates
* @return the boundary box for this, in library coordinates
...
...
eeschema/lib_rectangle.cpp
View file @
7cb34aec
...
@@ -240,13 +240,7 @@ EDA_Rect LIB_RECTANGLE::GetBoundingBox() const
...
@@ -240,13 +240,7 @@ EDA_Rect LIB_RECTANGLE::GetBoundingBox() const
}
}
/**
bool
LIB_RECTANGLE
::
HitTest
(
const
wxPoint
&
aPosition
)
* Function HitTest
* tests if the given wxPoint is within the bounds of this object.
* @param aRefPoint A wxPoint to test in eeschema space
* @return true if a hit, else false
*/
bool
LIB_RECTANGLE
::
HitTest
(
const
wxPoint
&
aRefPoint
)
{
{
int
mindist
=
(
m_Width
?
m_Width
/
2
:
g_DrawDefaultLineThickness
/
2
)
+
1
;
int
mindist
=
(
m_Width
?
m_Width
/
2
:
g_DrawDefaultLineThickness
/
2
)
+
1
;
...
@@ -254,19 +248,11 @@ bool LIB_RECTANGLE::HitTest( const wxPoint& aRefPoint )
...
@@ -254,19 +248,11 @@ bool LIB_RECTANGLE::HitTest( const wxPoint& aRefPoint )
if
(
mindist
<
MINIMUM_SELECTION_DISTANCE
)
if
(
mindist
<
MINIMUM_SELECTION_DISTANCE
)
mindist
=
MINIMUM_SELECTION_DISTANCE
;
mindist
=
MINIMUM_SELECTION_DISTANCE
;
return
HitTest
(
a
RefPoint
,
mindist
,
DefaultTransform
);
return
HitTest
(
a
Position
,
mindist
,
DefaultTransform
);
}
}
/**
bool
LIB_RECTANGLE
::
HitTest
(
wxPoint
aPosition
,
int
aThreshold
,
const
TRANSFORM
&
aTransform
)
* Function HitTest
* @return true if the point aPosRef is near this object
* @param aRefPoint = a wxPoint to test
* @param aThreshold = max distance to this object (usually the half thickness
* of a line)
* @param aTransMat = the transform matrix
*/
bool
LIB_RECTANGLE
::
HitTest
(
wxPoint
aRefPoint
,
int
aThreshold
,
const
TRANSFORM
&
aTransform
)
{
{
wxPoint
actualStart
=
aTransform
.
TransformCoordinate
(
m_Pos
);
wxPoint
actualStart
=
aTransform
.
TransformCoordinate
(
m_Pos
);
wxPoint
actualEnd
=
aTransform
.
TransformCoordinate
(
m_End
);
wxPoint
actualEnd
=
aTransform
.
TransformCoordinate
(
m_End
);
...
@@ -277,26 +263,26 @@ bool LIB_RECTANGLE::HitTest( wxPoint aRefPoint, int aThreshold, const TRANSFORM&
...
@@ -277,26 +263,26 @@ bool LIB_RECTANGLE::HitTest( wxPoint aRefPoint, int aThreshold, const TRANSFORM&
start
=
actualStart
;
start
=
actualStart
;
end
.
x
=
actualEnd
.
x
;
end
.
x
=
actualEnd
.
x
;
end
.
y
=
actualStart
.
y
;
end
.
y
=
actualStart
.
y
;
if
(
TestSegmentHit
(
a
RefPoint
,
start
,
end
,
aThreshold
)
)
if
(
TestSegmentHit
(
a
Position
,
start
,
end
,
aThreshold
)
)
return
true
;
return
true
;
// locate right segment
// locate right segment
start
.
x
=
actualEnd
.
x
;
start
.
x
=
actualEnd
.
x
;
end
.
y
=
actualEnd
.
y
;
end
.
y
=
actualEnd
.
y
;
if
(
TestSegmentHit
(
a
RefPoint
,
start
,
end
,
aThreshold
)
)
if
(
TestSegmentHit
(
a
Position
,
start
,
end
,
aThreshold
)
)
return
true
;
return
true
;
// locate upper segment
// locate upper segment
start
.
y
=
actualEnd
.
y
;
start
.
y
=
actualEnd
.
y
;
end
.
x
=
actualStart
.
x
;
end
.
x
=
actualStart
.
x
;
if
(
TestSegmentHit
(
a
RefPoint
,
start
,
end
,
aThreshold
)
)
if
(
TestSegmentHit
(
a
Position
,
start
,
end
,
aThreshold
)
)
return
true
;
return
true
;
// locate left segment
// locate left segment
start
=
actualStart
;
start
=
actualStart
;
end
.
x
=
actualStart
.
x
;
end
.
x
=
actualStart
.
x
;
end
.
y
=
actualEnd
.
y
;
end
.
y
=
actualEnd
.
y
;
if
(
TestSegmentHit
(
a
RefPoint
,
start
,
end
,
aThreshold
)
)
if
(
TestSegmentHit
(
a
Position
,
start
,
end
,
aThreshold
)
)
return
true
;
return
true
;
return
false
;
return
false
;
...
...
eeschema/lib_rectangle.h
View file @
7cb34aec
...
@@ -55,10 +55,10 @@ public:
...
@@ -55,10 +55,10 @@ public:
/**
/**
* Test if the given point is within the bounds of this object.
* Test if the given point is within the bounds of this object.
*
*
* @param a
RefPos
- A wxPoint to test
* @param a
Position
- A wxPoint to test
* @return - true if a hit, else false
* @return - true if a hit, else false
*/
*/
virtual
bool
HitTest
(
const
wxPoint
&
a
RefPos
);
virtual
bool
HitTest
(
const
wxPoint
&
a
Position
);
/**
/**
* @param aPosRef - a wxPoint to test
* @param aPosRef - a wxPoint to test
...
...
eeschema/lib_text.cpp
View file @
7cb34aec
...
@@ -136,26 +136,14 @@ bool LIB_TEXT::Load( char* line, wxString& errorMsg )
...
@@ -136,26 +136,14 @@ bool LIB_TEXT::Load( char* line, wxString& errorMsg )
return
true
;
return
true
;
}
}
/**
* Function HitTest
bool
LIB_TEXT
::
HitTest
(
const
wxPoint
&
aPosition
)
* tests if the given wxPoint is within the bounds of this object.
* @param refPos A wxPoint to test
* @return bool - true if a hit, else false
*/
bool
LIB_TEXT
::
HitTest
(
const
wxPoint
&
refPos
)
{
{
return
HitTest
(
refPos
,
0
,
DefaultTransform
);
return
HitTest
(
aPosition
,
0
,
DefaultTransform
);
}
}
/**
bool
LIB_TEXT
::
HitTest
(
wxPoint
aPosition
,
int
aThreshold
,
const
TRANSFORM
&
aTransform
)
* Function HitTest
* @return true if the point aPosRef is near this item
* @param aPosRef = a wxPoint to test, in eeschema space
* @param aThreshold = unused here (TextHitTest calculates its threshold )
* @param aTransMat = the transform matrix
*/
bool
LIB_TEXT
::
HitTest
(
wxPoint
aPosRef
,
int
aThreshold
,
const
TRANSFORM
&
aTransform
)
{
{
wxPoint
physicalpos
=
aTransform
.
TransformCoordinate
(
m_Pos
);
wxPoint
physicalpos
=
aTransform
.
TransformCoordinate
(
m_Pos
);
wxPoint
tmp
=
m_Pos
;
wxPoint
tmp
=
m_Pos
;
...
@@ -168,7 +156,7 @@ bool LIB_TEXT::HitTest( wxPoint aPosRef, int aThreshold, const TRANSFORM& aTrans
...
@@ -168,7 +156,7 @@ bool LIB_TEXT::HitTest( wxPoint aPosRef, int aThreshold, const TRANSFORM& aTrans
int
t1
=
(
aTransform
.
x1
!=
0
)
^
(
m_Orient
!=
0
);
int
t1
=
(
aTransform
.
x1
!=
0
)
^
(
m_Orient
!=
0
);
int
orient
=
t1
?
TEXT_ORIENT_HORIZ
:
TEXT_ORIENT_VERT
;
int
orient
=
t1
?
TEXT_ORIENT_HORIZ
:
TEXT_ORIENT_VERT
;
EXCHG
(
m_Orient
,
orient
);
EXCHG
(
m_Orient
,
orient
);
bool
hit
=
TextHitTest
(
aPos
Ref
);
bool
hit
=
TextHitTest
(
aPos
ition
);
EXCHG
(
m_Orient
,
orient
);
EXCHG
(
m_Orient
,
orient
);
m_Pos
=
tmp
;
m_Pos
=
tmp
;
return
hit
;
return
hit
;
...
...
eeschema/lib_text.h
View file @
7cb34aec
...
@@ -65,18 +65,18 @@ public:
...
@@ -65,18 +65,18 @@ public:
/**
/**
* Test if the given point is within the bounds of this object.
* Test if the given point is within the bounds of this object.
*
*
* @param
refPos
- A wxPoint to test
* @param
aPosition
- A wxPoint to test
* @return - true if a hit, else false
* @return - true if a hit, else false
*/
*/
virtual
bool
HitTest
(
const
wxPoint
&
refPos
);
virtual
bool
HitTest
(
const
wxPoint
&
aPosition
);
/**
/**
* @param aPos
Ref
= a wxPoint to test, in eeschema coordinates
* @param aPos
ition
= a wxPoint to test, in eeschema coordinates
* @param aThreshold = max distance to a segment
* @param aThreshold = max distance to a segment
* @param aTransform = the transform matrix
* @param aTransform = the transform matrix
* @return true if the point
aPosRef
is near a segment
* @return true if the point
\a aPosition
is near a segment
*/
*/
virtual
bool
HitTest
(
wxPoint
aPos
Ref
,
int
aThreshold
,
const
TRANSFORM
&
aTransform
);
virtual
bool
HitTest
(
wxPoint
aPos
ition
,
int
aThreshold
,
const
TRANSFORM
&
aTransform
);
/**
/**
* Test if the given rectangle intersects this object.
* Test if the given rectangle intersects this object.
...
...
eeschema/libarch.cpp
View file @
7cb34aec
...
@@ -45,9 +45,9 @@ bool LibArchive( wxWindow* frame, const wxString& ArchFullFileName )
...
@@ -45,9 +45,9 @@ bool LibArchive( wxWindow* frame, const wxString& ArchFullFileName )
SCH_COMPONENT
*
component
=
(
SCH_COMPONENT
*
)
SchItem
;
SCH_COMPONENT
*
component
=
(
SCH_COMPONENT
*
)
SchItem
;
// If not already saved in the new cache, put it:
// If not already saved in the new cache, put it:
if
(
libCache
->
FindEntry
(
component
->
m_ChipName
)
==
NULL
)
if
(
libCache
->
FindEntry
(
component
->
GetLibName
()
)
==
NULL
)
{
{
Entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
component
->
m_ChipName
);
Entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
component
->
GetLibName
()
);
if
(
Entry
)
// if NULL : component not found, cannot be stored
if
(
Entry
)
// if NULL : component not found, cannot be stored
libCache
->
AddComponent
(
Entry
);
libCache
->
AddComponent
(
Entry
);
...
...
eeschema/libeditframe.h
View file @
7cb34aec
...
@@ -252,7 +252,7 @@ private:
...
@@ -252,7 +252,7 @@ private:
public
:
public
:
/* Block commands: */
/* Block commands: */
virtual
int
ReturnBlockCommand
(
int
k
ey
);
virtual
int
ReturnBlockCommand
(
int
aK
ey
);
virtual
void
HandleBlockPlace
(
wxDC
*
DC
);
virtual
void
HandleBlockPlace
(
wxDC
*
DC
);
virtual
bool
HandleBlockEnd
(
wxDC
*
DC
);
virtual
bool
HandleBlockEnd
(
wxDC
*
DC
);
...
...
eeschema/locate.cpp
View file @
7cb34aec
...
@@ -119,6 +119,7 @@ SCH_ITEM* PickStruct( const wxPoint& refpos, SCH_SCREEN* screen, int SearchMask
...
@@ -119,6 +119,7 @@ SCH_ITEM* PickStruct( const wxPoint& refpos, SCH_SCREEN* screen, int SearchMask
* Search items in a block
* Search items in a block
* @return items count
* @return items count
* @param aBlock a BLOCK_SELECTOR that gives the search area boundary
* @param aBlock a BLOCK_SELECTOR that gives the search area boundary
* @param aScreen - The screen to pick items from.
* list of items is stored in aBlock
* list of items is stored in aBlock
*/
*/
int
PickItemsInBlock
(
BLOCK_SELECTOR
&
aBlock
,
SCH_SCREEN
*
aScreen
)
int
PickItemsInBlock
(
BLOCK_SELECTOR
&
aBlock
,
SCH_SCREEN
*
aScreen
)
...
...
eeschema/menubar.cpp
View file @
7cb34aec
/**
/**
* @file menubar.cpp
* @file
eeschema/
menubar.cpp
* @brief Create the main menubar for the schematic frame
* @brief Create the main menubar for the schematic frame
*/
*/
#ifdef __GNUG__
#ifdef __GNUG__
...
...
eeschema/netform.cpp
View file @
7cb34aec
...
@@ -512,7 +512,7 @@ SCH_COMPONENT* EXPORT_HELP::findNextComponent( EDA_ITEM* aItem, SCH_SHEET_PATH*
...
@@ -512,7 +512,7 @@ SCH_COMPONENT* EXPORT_HELP::findNextComponent( EDA_ITEM* aItem, SCH_SHEET_PATH*
// (several sheets pointing to 1 screen), this will be erroneously be
// (several sheets pointing to 1 screen), this will be erroneously be
// toggled.
// toggled.
LIB_COMPONENT
*
entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
comp
->
m_ChipName
);
LIB_COMPONENT
*
entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
comp
->
GetLibName
()
);
if
(
!
entry
)
if
(
!
entry
)
continue
;
continue
;
...
@@ -563,7 +563,7 @@ SCH_COMPONENT* EXPORT_HELP::findNextComponentAndCreatPinList( EDA_ITEM* aI
...
@@ -563,7 +563,7 @@ SCH_COMPONENT* EXPORT_HELP::findNextComponentAndCreatPinList( EDA_ITEM* aI
// (several sheets pointing to 1 screen), this will be erroneously be
// (several sheets pointing to 1 screen), this will be erroneously be
// toggled.
// toggled.
LIB_COMPONENT
*
entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
comp
->
m_ChipName
);
LIB_COMPONENT
*
entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
comp
->
GetLibName
()
);
if
(
!
entry
)
if
(
!
entry
)
continue
;
continue
;
...
@@ -585,7 +585,7 @@ SCH_COMPONENT* EXPORT_HELP::findNextComponentAndCreatPinList( EDA_ITEM* aI
...
@@ -585,7 +585,7 @@ SCH_COMPONENT* EXPORT_HELP::findNextComponentAndCreatPinList( EDA_ITEM* aI
{
{
LIB_PIN_LIST
pins
;
// constructed once here
LIB_PIN_LIST
pins
;
// constructed once here
entry
->
GetPins
(
pins
,
comp
->
GetUnitSelection
(
aSheetPath
),
comp
->
m_Convert
);
entry
->
GetPins
(
pins
,
comp
->
GetUnitSelection
(
aSheetPath
),
comp
->
GetConvert
()
);
for
(
size_t
i
=
0
;
i
<
pins
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
pins
.
size
();
i
++
)
{
{
...
@@ -617,7 +617,7 @@ SCH_COMPONENT* EXPORT_HELP::findNextComponentAndCreatPinList( EDA_ITEM* aI
...
@@ -617,7 +617,7 @@ SCH_COMPONENT* EXPORT_HELP::findNextComponentAndCreatPinList( EDA_ITEM* aI
* It also provides some insulation from a possible change in XML library.
* It also provides some insulation from a possible change in XML library.
*
*
* @param aName is the name to associate with a new node of type wxXML_ELEMENT_NODE.
* @param aName is the name to associate with a new node of type wxXML_ELEMENT_NODE.
* @param aContent is optional, and if given is the text to include in a child
* @param a
Textual
Content is optional, and if given is the text to include in a child
* of the returned node, and has type wxXML_TEXT_NODE.
* of the returned node, and has type wxXML_TEXT_NODE.
*/
*/
static
XNODE
*
node
(
const
wxString
&
aName
,
const
wxString
&
aTextualContent
=
wxEmptyString
)
static
XNODE
*
node
(
const
wxString
&
aName
,
const
wxString
&
aTextualContent
=
wxEmptyString
)
...
@@ -996,10 +996,10 @@ XNODE* EXPORT_HELP::makeGenericComponents()
...
@@ -996,10 +996,10 @@ XNODE* EXPORT_HELP::makeGenericComponents()
// "logical" library name, which is in anticipation of a better search
// "logical" library name, which is in anticipation of a better search
// algorithm for parts based on "logical_lib.part" and where logical_lib
// algorithm for parts based on "logical_lib.part" and where logical_lib
// is merely the library name minus path and extension.
// is merely the library name minus path and extension.
LIB_COMPONENT
*
entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
comp
->
m_ChipName
);
LIB_COMPONENT
*
entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
comp
->
GetLibName
()
);
if
(
entry
)
if
(
entry
)
xlibsource
->
AddAttribute
(
sLib
,
entry
->
GetLibrary
()
->
GetLogicalName
()
);
xlibsource
->
AddAttribute
(
sLib
,
entry
->
GetLibrary
()
->
GetLogicalName
()
);
xlibsource
->
AddAttribute
(
sPart
,
comp
->
m_ChipName
);
xlibsource
->
AddAttribute
(
sPart
,
comp
->
GetLibName
()
);
XNODE
*
xsheetpath
;
XNODE
*
xsheetpath
;
xcomp
->
AddChild
(
xsheetpath
=
node
(
sSheetPath
)
);
xcomp
->
AddChild
(
xsheetpath
=
node
(
sSheetPath
)
);
...
@@ -1133,7 +1133,7 @@ bool EXPORT_HELP::WriteGENERICNetList( SCH_EDIT_FRAME* frame, const wxString& aO
...
@@ -1133,7 +1133,7 @@ bool EXPORT_HELP::WriteGENERICNetList( SCH_EDIT_FRAME* frame, const wxString& aO
field
.
Replace
(
wxT
(
" "
),
wxT
(
"_"
)
);
field
.
Replace
(
wxT
(
" "
),
wxT
(
"_"
)
);
ret
|=
fprintf
(
out
,
"Value=%s
\n
"
,
CONV_TO_UTF8
(
field
)
);
ret
|=
fprintf
(
out
,
"Value=%s
\n
"
,
CONV_TO_UTF8
(
field
)
);
field
=
comp
->
m_ChipName
;
field
=
comp
->
GetLibName
()
;
field
.
Replace
(
wxT
(
" "
),
wxT
(
"_"
)
);
field
.
Replace
(
wxT
(
" "
),
wxT
(
"_"
)
);
ret
|=
fprintf
(
out
,
"Libref=%s
\n
"
,
CONV_TO_UTF8
(
field
)
);
ret
|=
fprintf
(
out
,
"Libref=%s
\n
"
,
CONV_TO_UTF8
(
field
)
);
...
@@ -1363,7 +1363,7 @@ bool EXPORT_HELP::WriteNetListPCBNEW( SCH_EDIT_FRAME* frame, FILE* f, bool with_
...
@@ -1363,7 +1363,7 @@ bool EXPORT_HELP::WriteNetListPCBNEW( SCH_EDIT_FRAME* frame, FILE* f, bool with_
// Get the Component FootprintFilter and put the component in
// Get the Component FootprintFilter and put the component in
// cmpList if filter is present
// cmpList if filter is present
LIB_COMPONENT
*
entry
=
LIB_COMPONENT
*
entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
comp
->
m_ChipName
);
CMP_LIBRARY
::
FindLibraryComponent
(
comp
->
GetLibName
()
);
if
(
entry
)
if
(
entry
)
{
{
...
@@ -1398,7 +1398,7 @@ bool EXPORT_HELP::WriteNetListPCBNEW( SCH_EDIT_FRAME* frame, FILE* f, bool with_
...
@@ -1398,7 +1398,7 @@ bool EXPORT_HELP::WriteNetListPCBNEW( SCH_EDIT_FRAME* frame, FILE* f, bool with_
if
(
with_pcbnew
)
// Add the lib name for this component
if
(
with_pcbnew
)
// Add the lib name for this component
{
{
field
=
comp
->
m_ChipName
;
field
=
comp
->
GetLibName
()
;
field
.
Replace
(
wxT
(
" "
),
wxT
(
"_"
)
);
field
.
Replace
(
wxT
(
" "
),
wxT
(
"_"
)
);
ret
|=
fprintf
(
f
,
" {Lib=%s}"
,
CONV_TO_UTF8
(
field
)
);
ret
|=
fprintf
(
f
,
" {Lib=%s}"
,
CONV_TO_UTF8
(
field
)
);
}
}
...
@@ -1439,7 +1439,7 @@ bool EXPORT_HELP::WriteNetListPCBNEW( SCH_EDIT_FRAME* frame, FILE* f, bool with_
...
@@ -1439,7 +1439,7 @@ bool EXPORT_HELP::WriteNetListPCBNEW( SCH_EDIT_FRAME* frame, FILE* f, bool with_
{
{
SCH_COMPONENT
*
comp
=
cmpList
[
ii
].
m_RootCmp
;
SCH_COMPONENT
*
comp
=
cmpList
[
ii
].
m_RootCmp
;
LIB_COMPONENT
*
entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
comp
->
m_ChipName
);
LIB_COMPONENT
*
entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
comp
->
GetLibName
()
);
ref
=
cmpList
[
ii
].
GetRef
();
ref
=
cmpList
[
ii
].
GetRef
();
...
@@ -1588,7 +1588,7 @@ void EXPORT_HELP::findAllInstancesOfComponent( SCH_COMPONENT* aComponent,
...
@@ -1588,7 +1588,7 @@ void EXPORT_HELP::findAllInstancesOfComponent( SCH_COMPONENT* aComponent,
if
(
pin
->
GetUnit
()
&&
pin
->
GetUnit
()
!=
unit2
)
if
(
pin
->
GetUnit
()
&&
pin
->
GetUnit
()
!=
unit2
)
continue
;
continue
;
if
(
pin
->
GetConvert
()
&&
pin
->
GetConvert
()
!=
comp2
->
m_Convert
)
if
(
pin
->
GetConvert
()
&&
pin
->
GetConvert
()
!=
comp2
->
GetConvert
()
)
continue
;
continue
;
// A suitable pin is found: add it to the current list
// A suitable pin is found: add it to the current list
...
...
eeschema/netlist.cpp
View file @
7cb34aec
...
@@ -626,7 +626,7 @@ static void AddConnectedObjects( SCH_SHEET_PATH* sheetlist,
...
@@ -626,7 +626,7 @@ static void AddConnectedObjects( SCH_SHEET_PATH* sheetlist,
case
SCH_COMPONENT_T
:
case
SCH_COMPONENT_T
:
DrawLibItem
=
(
SCH_COMPONENT
*
)
DrawList
;
DrawLibItem
=
(
SCH_COMPONENT
*
)
DrawList
;
Entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
DrawLibItem
->
m_ChipName
);
Entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
DrawLibItem
->
GetLibName
()
);
if
(
Entry
==
NULL
)
if
(
Entry
==
NULL
)
break
;
break
;
...
@@ -638,7 +638,7 @@ static void AddConnectedObjects( SCH_SHEET_PATH* sheetlist,
...
@@ -638,7 +638,7 @@ static void AddConnectedObjects( SCH_SHEET_PATH* sheetlist,
(
pin
->
GetUnit
()
!=
DrawLibItem
->
GetUnitSelection
(
sheetlist
)
)
)
(
pin
->
GetUnit
()
!=
DrawLibItem
->
GetUnitSelection
(
sheetlist
)
)
)
continue
;
continue
;
if
(
pin
->
GetConvert
()
&&
(
pin
->
GetConvert
()
!=
DrawLibItem
->
m_Convert
)
)
if
(
pin
->
GetConvert
()
&&
(
pin
->
GetConvert
()
!=
DrawLibItem
->
GetConvert
()
)
)
continue
;
continue
;
wxPoint
pos2
=
DrawLibItem
->
m_Transform
.
TransformCoordinate
(
pin
->
GetPosition
()
)
+
wxPoint
pos2
=
DrawLibItem
->
m_Transform
.
TransformCoordinate
(
pin
->
GetPosition
()
)
+
...
...
eeschema/netlist.h
View file @
7cb34aec
...
@@ -143,7 +143,7 @@ void FreeNetObjectsList( std::vector <NETLIST_OBJECT*>& aNetObjectslist );
...
@@ -143,7 +143,7 @@ void FreeNetObjectsList( std::vector <NETLIST_OBJECT*>& aNetObjectslist );
/**
/**
* Function ReturnUserNetlistTypeName
* Function ReturnUserNetlistTypeName
* to retrieve user netlist type names
* to retrieve user netlist type names
* @param first = true: return first name of the list, false = return next
* @param first
_item
= true: return first name of the list, false = return next
* @return a wxString : name of the type netlist or empty string
* @return a wxString : name of the type netlist or empty string
* this function must be called first with "first_item" = true
* this function must be called first with "first_item" = true
* and after with "first_item" = false to get all the other existing netlist
* and after with "first_item" = false to get all the other existing netlist
...
...
eeschema/netlist_control.cpp
View file @
7cb34aec
...
@@ -35,18 +35,16 @@ int TestDuplicateSheetNames( bool aCreateMarker );
...
@@ -35,18 +35,16 @@ int TestDuplicateSheetNames( bool aCreateMarker );
#define CUSTOM_NETLIST_TITLE wxT( "CustomNetlistTitle" )
#define CUSTOM_NETLIST_TITLE wxT( "CustomNetlistTitle" )
#define CUSTOM_NETLIST_COMMAND wxT( "CustomNetlistCommand" )
#define CUSTOM_NETLIST_COMMAND wxT( "CustomNetlistCommand" )
/****************************************************/
wxString
ReturnUserNetlistTypeName
(
bool
first_item
)
/****************************************************/
/**
/**
* Function ReturnUserNetlistTypeName
* Function ReturnUserNetlistTypeName
* to retrieve user netlist type names
* to retrieve user netlist type names
* @param first = true: return first name of the list, false = return next
* @param first
_item
= true: return first name of the list, false = return next
* @return a wxString : name of the type netlist or empty string
* @return a wxString : name of the type netlist or empty string
* this function must be called first with "first_item" = true
* this function must be called first with "first_item" = true
* and after with "first_item" = false to get all the other existing netlist names
* and after with "first_item" = false to get all the other existing netlist names
*/
*/
wxString
ReturnUserNetlistTypeName
(
bool
first_item
)
{
{
static
int
index
;
static
int
index
;
wxString
name
,
msg
;
wxString
name
,
msg
;
...
@@ -67,14 +65,14 @@ wxString ReturnUserNetlistTypeName( bool first_item )
...
@@ -67,14 +65,14 @@ wxString ReturnUserNetlistTypeName( bool first_item )
BEGIN_EVENT_TABLE
(
WinEDA_NetlistFrame
,
wxDialog
)
BEGIN_EVENT_TABLE
(
WinEDA_NetlistFrame
,
wxDialog
)
EVT_BUTTON
(
wxID_CANCEL
,
WinEDA_NetlistFrame
::
OnCancelClick
)
EVT_BUTTON
(
wxID_CANCEL
,
WinEDA_NetlistFrame
::
OnCancelClick
)
EVT_BUTTON
(
ID_CREATE_NETLIST
,
WinEDA_NetlistFrame
::
GenNetlist
)
EVT_BUTTON
(
ID_CREATE_NETLIST
,
WinEDA_NetlistFrame
::
GenNetlist
)
EVT_BUTTON
(
ID_SETUP_PLUGIN
,
WinEDA_NetlistFrame
::
SetupPluginData
)
EVT_BUTTON
(
ID_SETUP_PLUGIN
,
WinEDA_NetlistFrame
::
SetupPluginData
)
EVT_BUTTON
(
ID_DELETE_PLUGIN
,
WinEDA_NetlistFrame
::
DeletePluginPanel
)
EVT_BUTTON
(
ID_DELETE_PLUGIN
,
WinEDA_NetlistFrame
::
DeletePluginPanel
)
EVT_BUTTON
(
ID_VALIDATE_PLUGIN
,
WinEDA_NetlistFrame
::
ValidatePluginPanel
)
EVT_BUTTON
(
ID_VALIDATE_PLUGIN
,
WinEDA_NetlistFrame
::
ValidatePluginPanel
)
EVT_CHECKBOX
(
ID_CURRENT_FORMAT_IS_DEFAULT
,
EVT_CHECKBOX
(
ID_CURRENT_FORMAT_IS_DEFAULT
,
WinEDA_NetlistFrame
::
SelectNetlistType
)
WinEDA_NetlistFrame
::
SelectNetlistType
)
EVT_BUTTON
(
ID_RUN_SIMULATOR
,
WinEDA_NetlistFrame
::
RunSimulator
)
EVT_BUTTON
(
ID_RUN_SIMULATOR
,
WinEDA_NetlistFrame
::
RunSimulator
)
END_EVENT_TABLE
()
END_EVENT_TABLE
()
...
@@ -83,17 +81,6 @@ END_EVENT_TABLE()
...
@@ -83,17 +81,6 @@ END_EVENT_TABLE()
/*******************************/
/*******************************/
/*****************************************************************************/
EDA_NoteBookPage
::
EDA_NoteBookPage
(
wxNotebook
*
parent
,
const
wxString
&
title
,
int
id_NetType
,
int
idCheckBox
,
int
idCreateFile
,
bool
selected
)
:
wxPanel
(
parent
,
-
1
,
wxDefaultPosition
,
wxDefaultSize
,
wxTAB_TRAVERSAL
|
wxBORDER_SUNKEN
)
/*****************************************************************************/
/** Contructor to create a setup page for one netlist format.
/** Contructor to create a setup page for one netlist format.
* Used in Netlist format Dialog box creation
* Used in Netlist format Dialog box creation
* @param parent = wxNotebook * parent
* @param parent = wxNotebook * parent
...
@@ -101,7 +88,15 @@ EDA_NoteBookPage::EDA_NoteBookPage( wxNotebook* parent,
...
@@ -101,7 +88,15 @@ EDA_NoteBookPage::EDA_NoteBookPage( wxNotebook* parent,
* @param id_NetType = netlist type id
* @param id_NetType = netlist type id
* @param idCheckBox = event ID attached to the "format is default" check box
* @param idCheckBox = event ID attached to the "format is default" check box
* @param idCreateFile = event ID attached to the "create netlist" button
* @param idCreateFile = event ID attached to the "create netlist" button
* @param selected - Please document me.
*/
*/
EDA_NoteBookPage
::
EDA_NoteBookPage
(
wxNotebook
*
parent
,
const
wxString
&
title
,
int
id_NetType
,
int
idCheckBox
,
int
idCreateFile
,
bool
selected
)
:
wxPanel
(
parent
,
-
1
,
wxDefaultPosition
,
wxDefaultSize
,
wxTAB_TRAVERSAL
|
wxBORDER_SUNKEN
)
{
{
m_IdNetType
=
id_NetType
;
m_IdNetType
=
id_NetType
;
m_CommandStringCtrl
=
NULL
;
m_CommandStringCtrl
=
NULL
;
...
...
eeschema/onrightclick.cpp
View file @
7cb34aec
...
@@ -253,7 +253,7 @@ void AddMenusForComponent( wxMenu* PopMenu, SCH_COMPONENT* Component )
...
@@ -253,7 +253,7 @@ void AddMenusForComponent( wxMenu* PopMenu, SCH_COMPONENT* Component )
LIB_ALIAS
*
libEntry
;
LIB_ALIAS
*
libEntry
;
LIB_COMPONENT
*
libComponent
=
NULL
;
LIB_COMPONENT
*
libComponent
=
NULL
;
libEntry
=
CMP_LIBRARY
::
FindLibraryEntry
(
Component
->
m_ChipName
);
libEntry
=
CMP_LIBRARY
::
FindLibraryEntry
(
Component
->
GetLibName
()
);
if
(
libEntry
)
if
(
libEntry
)
libComponent
=
libEntry
->
GetComponent
();
libComponent
=
libEntry
->
GetComponent
();
...
...
eeschema/plot.cpp
View file @
7cb34aec
...
@@ -46,14 +46,15 @@ static void PlotLibPart( PLOTTER* plotter, SCH_COMPONENT* DrawLibItem )
...
@@ -46,14 +46,15 @@ static void PlotLibPart( PLOTTER* plotter, SCH_COMPONENT* DrawLibItem )
LIB_COMPONENT
*
Entry
;
LIB_COMPONENT
*
Entry
;
TRANSFORM
temp
=
TRANSFORM
();
TRANSFORM
temp
=
TRANSFORM
();
Entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
DrawLibItem
->
m_ChipName
);
Entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
DrawLibItem
->
GetLibName
()
);
if
(
Entry
==
NULL
)
if
(
Entry
==
NULL
)
return
;;
return
;;
temp
=
DrawLibItem
->
m_Transform
;
temp
=
DrawLibItem
->
m_Transform
;
Entry
->
Plot
(
plotter
,
DrawLibItem
->
m_Multi
,
DrawLibItem
->
m_Convert
,
DrawLibItem
->
m_Pos
,
temp
);
Entry
->
Plot
(
plotter
,
DrawLibItem
->
GetUnit
(),
DrawLibItem
->
GetConvert
(),
DrawLibItem
->
m_Pos
,
temp
);
bool
isMulti
=
Entry
->
GetPartCount
()
>
1
;
bool
isMulti
=
Entry
->
GetPartCount
()
>
1
;
for
(
int
fieldId
=
0
;
fieldId
<
DrawLibItem
->
GetFieldCount
();
fieldId
++
)
for
(
int
fieldId
=
0
;
fieldId
<
DrawLibItem
->
GetFieldCount
();
fieldId
++
)
...
@@ -127,7 +128,7 @@ static void PlotTextField( PLOTTER* plotter, SCH_COMPONENT* DrawLibItem,
...
@@ -127,7 +128,7 @@ static void PlotTextField( PLOTTER* plotter, SCH_COMPONENT* DrawLibItem,
{
{
/* Adding A, B ... to the reference */
/* Adding A, B ... to the reference */
wxString
Text
;
wxString
Text
;
Text
=
field
->
m_Text
+
LIB_COMPONENT
::
ReturnSubReference
(
DrawLibItem
->
m_Multi
);
Text
=
field
->
m_Text
+
LIB_COMPONENT
::
ReturnSubReference
(
DrawLibItem
->
GetUnit
()
);
plotter
->
text
(
textpos
,
color
,
Text
,
plotter
->
text
(
textpos
,
color
,
Text
,
orient
,
orient
,
field
->
m_Size
,
hjustify
,
vjustify
,
field
->
m_Size
,
hjustify
,
vjustify
,
...
...
eeschema/sch_component.cpp
View file @
7cb34aec
This diff is collapsed.
Click to expand it.
eeschema/sch_component.h
View file @
7cb34aec
...
@@ -48,24 +48,19 @@ class SCH_COMPONENT : public SCH_ITEM
...
@@ -48,24 +48,19 @@ class SCH_COMPONENT : public SCH_ITEM
{
{
friend
class
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC
;
friend
class
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC
;
public
:
wxString
m_ChipName
;
///< Name to look for in the library, i.e. "74LS00".
int
m_Multi
;
// In multi unit chip - which unit to draw.
int
m_unit
;
///< The unit for multiple part per package components.
int
m_convert
;
///< The alternate body style for components that have more than
///< one body style defined. Primarily used for components that
///< have a De Morgan conversion.
wxString
m_prefix
;
///< C, R, U, Q etc - the first character which typically indicates
///< what the component is. Determined, upon placement, from the
///< library component. Created upon file load, by the first
///< non-digits in the reference fields.
public
:
wxPoint
m_Pos
;
wxPoint
m_Pos
;
wxString
m_ChipName
;
/* Key to look for in the library,
* i.e. "74LS00". */
wxString
m_PrefixString
;
/* C, R, U, Q etc - the first character
* which typically indicates what the
* component is. Determined, upon
* placement, from the library component.
* determined, upon file load, by the
* first non-digits in the reference
* fields. */
int
m_Convert
;
/* Handle multiple shape (for instance
* De Morgan conversion) */
TRANSFORM
m_Transform
;
/* The rotation/mirror transformation
TRANSFORM
m_Transform
;
/* The rotation/mirror transformation
* matrix. */
* matrix. */
...
@@ -126,6 +121,20 @@ public:
...
@@ -126,6 +121,20 @@ public:
return
wxT
(
"SCH_COMPONENT"
);
return
wxT
(
"SCH_COMPONENT"
);
}
}
wxString
GetLibName
()
const
{
return
m_ChipName
;
}
void
SetLibName
(
const
wxString
&
aName
);
int
GetUnit
()
const
{
return
m_unit
;
}
void
SetUnit
(
int
aUnit
);
int
GetConvert
()
const
{
return
m_convert
;
}
void
SetConvert
(
int
aConvert
);
wxString
GetPrefix
()
const
{
return
m_prefix
;
}
TRANSFORM
&
GetTransform
()
const
{
return
const_cast
<
TRANSFORM
&
>
(
m_Transform
);
}
TRANSFORM
&
GetTransform
()
const
{
return
const_cast
<
TRANSFORM
&
>
(
m_Transform
);
}
/**
/**
...
@@ -146,16 +155,6 @@ public:
...
@@ -146,16 +155,6 @@ public:
*/
*/
virtual
bool
Load
(
LINE_READER
&
aLine
,
wxString
&
aErrorMsg
);
virtual
bool
Load
(
LINE_READER
&
aLine
,
wxString
&
aErrorMsg
);
/**
* Function Load
* reads a component in from a file. The file stream must be positioned at
* the first field of the file, not at the component tag.
* @param aFile The FILE to read from.
* @throw Error containing the error message text if there is a file format
* error or if the disk read has failed.
* void Load( FILE* aFile ) throw( Error );
*/
/**
/**
* Function GenCopy
* Function GenCopy
* returns a copy of this object but with the linked list pointers
* returns a copy of this object but with the linked list pointers
...
@@ -226,8 +225,7 @@ public:
...
@@ -226,8 +225,7 @@ public:
/**
/**
* Function ReturnFieldName
* Function ReturnFieldName
* returns the Field name given a field index like (REFERENCE, VALUE ..)
* returns the Field name given a field index like (REFERENCE, VALUE ..)
* @reeturn wxString - the field name or wxEmptyString if invalid field
* @return wxString - the field name or wxEmptyString if invalid field index.
* index.
*/
*/
wxString
ReturnFieldName
(
int
aFieldNdx
)
const
;
wxString
ReturnFieldName
(
int
aFieldNdx
)
const
;
...
@@ -311,11 +309,10 @@ public:
...
@@ -311,11 +309,10 @@ public:
/**
/**
* Function AddHierarchicalReference
* Function AddHierarchicalReference
* adds a full hierarchical reference (path + local reference)
* adds a full hierarchical reference (path + local reference)
* @param aPath = hierarchical path (/<sheet timestamp>/component
* @param aPath Hierarchical path (/<sheet timestamp>/<component
* timestamp> like /05678E50/A23EF560)
* timestamp> like /05678E50/A23EF560)
* @param aRef = local reference like C45, R56
* @param aRef :ocal reference like C45, R56
* @param aMulti = part selection, used in multi part per package (0 or 1
* @param aMulti Part selection, used in multi part per package (0 or 1 for non multi)
* for non multi)
*/
*/
void
AddHierarchicalReference
(
const
wxString
&
aPath
,
void
AddHierarchicalReference
(
const
wxString
&
aPath
,
const
wxString
&
aRef
,
const
wxString
&
aRef
,
...
...
eeschema/sch_field.cpp
View file @
7cb34aec
...
@@ -146,7 +146,7 @@ void SCH_FIELD::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
...
@@ -146,7 +146,7 @@ void SCH_FIELD::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
/* For more than one part per package, we must add the part selection
/* For more than one part per package, we must add the part selection
* A, B, ... or 1, 2, .. to the reference. */
* A, B, ... or 1, 2, .. to the reference. */
wxString
fulltext
=
m_Text
;
wxString
fulltext
=
m_Text
;
fulltext
<<
LIB_COMPONENT
::
ReturnSubReference
(
parentComponent
->
m_Multi
);
fulltext
<<
LIB_COMPONENT
::
ReturnSubReference
(
parentComponent
->
GetUnit
()
);
DrawGraphicText
(
panel
,
DC
,
textpos
,
color
,
fulltext
,
DrawGraphicText
(
panel
,
DC
,
textpos
,
color
,
fulltext
,
orient
,
orient
,
...
@@ -395,7 +395,7 @@ void SCH_FIELD::Place( SCH_EDIT_FRAME* frame, wxDC* DC )
...
@@ -395,7 +395,7 @@ void SCH_FIELD::Place( SCH_EDIT_FRAME* frame, wxDC* DC )
if
(
fieldNdx
==
REFERENCE
)
if
(
fieldNdx
==
REFERENCE
)
{
{
Entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
component
->
m_ChipName
);
Entry
=
CMP_LIBRARY
::
FindLibraryComponent
(
component
->
GetLibName
()
);
if
(
Entry
!=
NULL
)
if
(
Entry
!=
NULL
)
{
{
...
...
eeschema/sch_items.h
View file @
7cb34aec
...
@@ -96,12 +96,14 @@ public:
...
@@ -96,12 +96,14 @@ public:
*/
*/
virtual
void
Move
(
const
wxPoint
&
aMoveVector
);
virtual
void
Move
(
const
wxPoint
&
aMoveVector
);
virtual
void
Mirror_X
(
int
aXaxis_position
);
/** virtual function Mirror_Y
/** virtual function Mirror_Y
* mirror item relative to an Y axis
* mirror item relative to an Y axis
* @param aYaxis_position = the y axis position
* @param aYaxis_position = the y axis position
*/
*/
virtual
void
Mirror_X
(
int
aXaxis_position
);
virtual
void
Mirror_Y
(
int
aYaxis_position
);
virtual
void
Mirror_Y
(
int
aYaxis_position
);
virtual
void
Rotate
(
wxPoint
rotationPoint
);
virtual
void
Rotate
(
wxPoint
rotationPoint
);
/**
/**
...
@@ -112,7 +114,7 @@ public:
...
@@ -112,7 +114,7 @@ public:
* line.
* line.
*
*
* @param aLine - Line to compare.
* @param aLine - Line to compare.
* @retu
e
n True if lines overlap and the line was merged with \a aLine.
* @retu
r
n True if lines overlap and the line was merged with \a aLine.
*/
*/
bool
MergeOverlap
(
SCH_LINE
*
aLine
);
bool
MergeOverlap
(
SCH_LINE
*
aLine
);
...
...
eeschema/sch_sheet.h
View file @
7cb34aec
...
@@ -74,10 +74,11 @@ public:
...
@@ -74,10 +74,11 @@ public:
* Function CreateGraphicShape (virual)
* Function CreateGraphicShape (virual)
* Calculates the graphic shape (a polygon) associated to the text
* Calculates the graphic shape (a polygon) associated to the text
* @param aCorner_list = a buffer to fill with polygon corners coordinates
* @param aCorner_list = a buffer to fill with polygon corners coordinates
* @param Pos = Position of the shape
* @param
a
Pos = Position of the shape
*/
*/
virtual
void
CreateGraphicShape
(
std
::
vector
<
wxPoint
>&
aCorner_list
,
virtual
void
CreateGraphicShape
(
std
::
vector
<
wxPoint
>&
aCorner_list
,
const
wxPoint
&
Pos
);
const
wxPoint
&
aPos
);
SCH_SHEET_PIN
*
Next
()
SCH_SHEET_PIN
*
Next
()
{
{
return
(
SCH_SHEET_PIN
*
)
Pnext
;
return
(
SCH_SHEET_PIN
*
)
Pnext
;
...
@@ -112,10 +113,6 @@ public:
...
@@ -112,10 +113,6 @@ public:
void
Place
(
SCH_EDIT_FRAME
*
frame
,
wxDC
*
DC
);
void
Place
(
SCH_EDIT_FRAME
*
frame
,
wxDC
*
DC
);
/*the functions Draw, CreateGraphicShape and Plot are no removed as
* as this shape is already handled as HIERLABEL ...
*/
/**
/**
* Function Save
* Function Save
* writes the data structures for this object out to a FILE in "*.sch"
* writes the data structures for this object out to a FILE in "*.sch"
...
@@ -148,13 +145,6 @@ public:
...
@@ -148,13 +145,6 @@ public:
*/
*/
virtual
int
GetPenSize
()
const
;
virtual
int
GetPenSize
()
const
;
/**
* Function CreateGraphicShape
* Calculates the graphic shape (a polygon) associated to the text
* @param aCorner_list = list to fill with polygon corners coordinates
* @param Pos = Position of the shape
*/
// Geometric transforms (used in block operations):
// Geometric transforms (used in block operations):
/** virtual function Move
/** virtual function Move
...
@@ -166,16 +156,15 @@ public:
...
@@ -166,16 +156,15 @@ public:
m_Pos
+=
aMoveVector
;
m_Pos
+=
aMoveVector
;
}
}
/** virtual function Mirror_Y
/** virtual function Mirror_Y
* mirror item relative to an Y axis
* mirror item relative to an Y axis
* @param aYaxis_position = the y axis position
* @param aYaxis_position = the y axis position
*/
*/
virtual
void
Mirror_Y
(
int
aYaxis_position
);
virtual
void
Mirror_Y
(
int
aYaxis_position
);
virtual
void
Rotate
(
wxPoint
rotationPoint
);
virtual
void
Rotate
(
wxPoint
rotationPoint
);
virtual
void
Mirror_X
(
int
aXaxis_position
);
virtual
void
Mirror_X
(
int
aXaxis_position
);
/**
/**
* Function Matches
* Function Matches
...
@@ -340,7 +329,7 @@ public:
...
@@ -340,7 +329,7 @@ public:
* Function Draw
* Function Draw
* Draw the hierarchical sheet shape
* Draw the hierarchical sheet shape
* @param aPanel = the current DrawPanel
* @param aPanel = the current DrawPanel
* @param aD
c
= the current Device Context
* @param aD
C
= the current Device Context
* @param aOffset = draw offset (usually wxPoint(0,0))
* @param aOffset = draw offset (usually wxPoint(0,0))
* @param aDrawMode = draw mode
* @param aDrawMode = draw mode
* @param aColor = color used to draw sheet. Usually -1 to use the normal
* @param aColor = color used to draw sheet. Usually -1 to use the normal
...
@@ -383,7 +372,7 @@ public:
...
@@ -383,7 +372,7 @@ public:
* Function SearchHierarchy
* Function SearchHierarchy
* search the existing hierarchy for an instance of screen "FileName".
* search the existing hierarchy for an instance of screen "FileName".
* @param aFilename = the filename to find
* @param aFilename = the filename to find
* @param a
Filename
= a location to return a pointer to the screen (if found)
* @param a
Screen
= a location to return a pointer to the screen (if found)
* @return bool if found, and a pointer to the screen
* @return bool if found, and a pointer to the screen
*/
*/
bool
SearchHierarchy
(
wxString
aFilename
,
SCH_SCREEN
**
aScreen
);
bool
SearchHierarchy
(
wxString
aFilename
,
SCH_SCREEN
**
aScreen
);
...
...
eeschema/sch_sheet_path.cpp
View file @
7cb34aec
...
@@ -167,11 +167,6 @@ SCH_ITEM* SCH_SHEET_PATH::FirstDrawList()
...
@@ -167,11 +167,6 @@ SCH_ITEM* SCH_SHEET_PATH::FirstDrawList()
}
}
/**
* Function Push
* store (push) aSheet in list
* @param aSheet = pointer to the SCH_SHEET to store in list
*/
void
SCH_SHEET_PATH
::
Push
(
SCH_SHEET
*
aSheet
)
void
SCH_SHEET_PATH
::
Push
(
SCH_SHEET
*
aSheet
)
{
{
if
(
m_numSheets
>
DSLSZ
)
if
(
m_numSheets
>
DSLSZ
)
...
@@ -263,8 +258,9 @@ void SCH_SHEET_PATH::UpdateAllScreenReferences()
...
@@ -263,8 +258,9 @@ void SCH_SHEET_PATH::UpdateAllScreenReferences()
{
{
SCH_COMPONENT
*
component
=
(
SCH_COMPONENT
*
)
t
;
SCH_COMPONENT
*
component
=
(
SCH_COMPONENT
*
)
t
;
component
->
GetField
(
REFERENCE
)
->
m_Text
=
component
->
GetRef
(
this
);
component
->
GetField
(
REFERENCE
)
->
m_Text
=
component
->
GetRef
(
this
);
component
->
m_Multi
=
component
->
GetUnitSelection
(
this
);
component
->
SetUnit
(
component
->
GetUnitSelection
(
this
)
);
}
}
t
=
t
->
Next
();
t
=
t
->
Next
();
}
}
}
}
...
...
eeschema/sch_sheet_path.h
View file @
7cb34aec
...
@@ -134,7 +134,7 @@ public:
...
@@ -134,7 +134,7 @@ public:
* store (push) aSheet in list
* store (push) aSheet in list
* @param aSheet = pointer to the SCH_SHEET to store in list
* @param aSheet = pointer to the SCH_SHEET to store in list
* Push is used when entered a sheet to select or analyze it
* Push is used when entered a sheet to select or analyze it
* This is like cd
<directory>
in directories navigation
* This is like cd
<directory>
in directories navigation
*/
*/
void
Push
(
SCH_SHEET
*
aSheet
);
void
Push
(
SCH_SHEET
*
aSheet
);
...
@@ -166,9 +166,9 @@ public:
...
@@ -166,9 +166,9 @@ public:
/**
/**
* Function BuildSheetPathInfoFromSheetPathValue
* Function BuildSheetPathInfoFromSheetPathValue
* Fill this with data to access to the hierarchical sheet known by its
* Fill this with data to access to the hierarchical sheet known by its path \a aPath
* path aPath
* @param aPath = path of the sheet to reach (in non human readable format)
* @param aPath = path of the sheet to reach (in non human readable format)
* @param aFound - Please document me.
* @return true if success else false
* @return true if success else false
*/
*/
bool
BuildSheetPathInfoFromSheetPathValue
(
const
wxString
&
aPath
,
bool
BuildSheetPathInfoFromSheetPathValue
(
const
wxString
&
aPath
,
...
@@ -200,7 +200,7 @@ public:
...
@@ -200,7 +200,7 @@ public:
/**
/**
* Find the previous schematic item in this sheet path object.
* Find the previous schematic item in this sheet path object.
*
*
* @param a
Item
Type - The type of schematic item object to search for.
* @param aType - The type of schematic item object to search for.
* @param aLastItem - Start search from aLastItem. If no aLastItem, search from
* @param aLastItem - Start search from aLastItem. If no aLastItem, search from
* the end of the list.
* the end of the list.
* @param aWrap - Wrap around the beginning of the list to find the next item if aLastItem
* @param aWrap - Wrap around the beginning of the list to find the next item if aLastItem
...
...
eeschema/sch_sheet_pin.cpp
View file @
7cb34aec
...
@@ -413,12 +413,6 @@ void SCH_SHEET_PIN::Rotate( wxPoint rotationPoint )
...
@@ -413,12 +413,6 @@ void SCH_SHEET_PIN::Rotate( wxPoint rotationPoint )
}
}
/**
* Function CreateGraphicShape (virtual)
* calculates the graphic shape (a polygon) associated to the text
* @param aCorner_list = a buffer to fill with polygon corners coordinates
* @param aPos = Position of the shape
*/
void
SCH_SHEET_PIN
::
CreateGraphicShape
(
std
::
vector
<
wxPoint
>&
aCorner_list
,
void
SCH_SHEET_PIN
::
CreateGraphicShape
(
std
::
vector
<
wxPoint
>&
aCorner_list
,
const
wxPoint
&
aPos
)
const
wxPoint
&
aPos
)
{
{
...
@@ -428,6 +422,7 @@ void SCH_SHEET_PIN::CreateGraphicShape( std::vector <wxPoint>& aCorner_list,
...
@@ -428,6 +422,7 @@ void SCH_SHEET_PIN::CreateGraphicShape( std::vector <wxPoint>& aCorner_list,
* for OUTPUT type the icon is the INPUT shape of SCH_HIERLABEL
* for OUTPUT type the icon is the INPUT shape of SCH_HIERLABEL
*/
*/
int
tmp
=
m_Shape
;
int
tmp
=
m_Shape
;
switch
(
m_Shape
)
switch
(
m_Shape
)
{
{
case
NET_INPUT
:
case
NET_INPUT
:
...
@@ -441,6 +436,7 @@ void SCH_SHEET_PIN::CreateGraphicShape( std::vector <wxPoint>& aCorner_list,
...
@@ -441,6 +436,7 @@ void SCH_SHEET_PIN::CreateGraphicShape( std::vector <wxPoint>& aCorner_list,
default
:
default
:
break
;
break
;
}
}
SCH_HIERLABEL
::
CreateGraphicShape
(
aCorner_list
,
aPos
);
SCH_HIERLABEL
::
CreateGraphicShape
(
aCorner_list
,
aPos
);
m_Shape
=
tmp
;
m_Shape
=
tmp
;
}
}
...
...
eeschema/sch_text.h
View file @
7cb34aec
...
@@ -364,7 +364,9 @@ public:
...
@@ -364,7 +364,9 @@ public:
* @param aYaxis_position = the y axis position
* @param aYaxis_position = the y axis position
*/
*/
virtual
void
Mirror_Y
(
int
aYaxis_position
);
virtual
void
Mirror_Y
(
int
aYaxis_position
);
virtual
void
Mirror_X
(
int
aXaxis_position
);
virtual
void
Mirror_X
(
int
aXaxis_position
);
virtual
void
Rotate
(
wxPoint
rotationPoint
);
virtual
void
Rotate
(
wxPoint
rotationPoint
);
private
:
private
:
...
@@ -459,7 +461,9 @@ public:
...
@@ -459,7 +461,9 @@ public:
* @param aYaxis_position = the y axis position
* @param aYaxis_position = the y axis position
*/
*/
virtual
void
Mirror_Y
(
int
aYaxis_position
);
virtual
void
Mirror_Y
(
int
aYaxis_position
);
virtual
void
Mirror_X
(
int
aXaxis_position
);
virtual
void
Mirror_X
(
int
aXaxis_position
);
virtual
void
Rotate
(
wxPoint
rotationPoint
);
virtual
void
Rotate
(
wxPoint
rotationPoint
);
private
:
private
:
...
...
eeschema/schedit.cpp
View file @
7cb34aec
...
@@ -650,7 +650,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
...
@@ -650,7 +650,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
{
{
LIB_ALIAS
*
LibEntry
;
LIB_ALIAS
*
LibEntry
;
LibEntry
=
CMP_LIBRARY
::
FindLibraryEntry
(
LibEntry
=
CMP_LIBRARY
::
FindLibraryEntry
(
(
(
SCH_COMPONENT
*
)
screen
->
GetCurItem
()
)
->
m_ChipName
);
(
(
SCH_COMPONENT
*
)
screen
->
GetCurItem
()
)
->
GetLibName
()
);
if
(
LibEntry
&&
LibEntry
->
GetDocFileName
()
!=
wxEmptyString
)
if
(
LibEntry
&&
LibEntry
->
GetDocFileName
()
!=
wxEmptyString
)
{
{
...
...
eeschema/schframe.cpp
View file @
7cb34aec
...
@@ -432,9 +432,9 @@ int SCH_EDIT_FRAME::BestZoom()
...
@@ -432,9 +432,9 @@ int SCH_EDIT_FRAME::BestZoom()
* heierarchy.
* heierarchy.
* because in complex hierarchies a sheet and a SCH_SCREEN is used more than
* because in complex hierarchies a sheet and a SCH_SCREEN is used more than
* once
* once
* Name is
<root sheet filename>-<sheet path>
* Name is
<root sheet filename>-<sheet path>
* and has no extension.
* and has no extension.
* However if filename is too long name is
<sheet filename>-<sheet number>
* However if filename is too long name is
<sheet filename>-<sheet number>
*/
*/
wxString
SCH_EDIT_FRAME
::
GetUniqueFilenameForCurrentSheet
()
wxString
SCH_EDIT_FRAME
::
GetUniqueFilenameForCurrentSheet
()
{
{
...
...
gerbview/class_gerber_draw_item.h
View file @
7cb34aec
...
@@ -205,7 +205,7 @@ public:
...
@@ -205,7 +205,7 @@ public:
/**
/**
* Function DrawGbrPoly
* Function DrawGbrPoly
* a helper function used
id ::Draw
to draw the polygon stored in m_PolyCorners
* a helper function used to draw the polygon stored in m_PolyCorners
*/
*/
void
DrawGbrPoly
(
EDA_Rect
*
aClipBox
,
void
DrawGbrPoly
(
EDA_Rect
*
aClipBox
,
wxDC
*
aDC
,
int
aColor
,
wxDC
*
aDC
,
int
aColor
,
...
...
gerbview/dcode.h
View file @
7cb34aec
...
@@ -173,7 +173,7 @@ public:
...
@@ -173,7 +173,7 @@ public:
/**
/**
* Function DrawFlashedPolygon
* Function DrawFlashedPolygon
* a helper function used
id ::Draw
to draw the polygon stored ion m_PolyCorners
* a helper function used to draw the polygon stored ion m_PolyCorners
* Draw some Apertures shapes when they are defined as filled polygons.
* Draw some Apertures shapes when they are defined as filled polygons.
* APT_POLYGON is always a polygon, but some complex shapes are also converted to
* APT_POLYGON is always a polygon, but some complex shapes are also converted to
* polygons (shapes with holes, some rotated shapes)
* polygons (shapes with holes, some rotated shapes)
...
...
gerbview/wxGerberFrame.h
View file @
7cb34aec
...
@@ -189,8 +189,8 @@ public:
...
@@ -189,8 +189,8 @@ public:
* displays the short filename (if exists) of the selected layer
* displays the short filename (if exists) of the selected layer
* on the caption of the main gerbview window
* on the caption of the main gerbview window
* and some other parameters
* and some other parameters
* Name of the layer (found in the gerber file: LN
<name>
command) in the status bar
* Name of the layer (found in the gerber file: LN
<name>
command) in the status bar
* Name of the Image (found in the gerber file: IN
<name>
command) in the status bar
* Name of the Image (found in the gerber file: IN
<name>
command) in the status bar
* and other data in toolbar
* and other data in toolbar
*/
*/
void
UpdateTitleAndInfo
();
void
UpdateTitleAndInfo
();
...
...
include/bezier_curves.h
View file @
7cb34aec
...
@@ -9,31 +9,27 @@
...
@@ -9,31 +9,27 @@
/**
/**
* Function Bezier2Poly
* Function Bezier2Poly
* convert a Bezier curve to a polyline
* convert a Bezier curve to a polyline
* @param c1 - First point to convert.
* @param c2 - Second point to convert.
* @param c3 - Third point to convert.
* @return a std::vector<wxPoint> containing the points of the polyline
* @return a std::vector<wxPoint> containing the points of the polyline
* @param C1, c2, c3 = wxPoints of the Bezier curve
*/
*/
std
::
vector
<
wxPoint
>
Bezier2Poly
(
wxPoint
c1
,
wxPoint
c2
,
wxPoint
c3
);
std
::
vector
<
wxPoint
>
Bezier2Poly
(
wxPoint
c1
,
wxPoint
c2
,
wxPoint
c3
);
/**
* Function Bezier2Poly
* convert a Bezier curve to a polyline
* @return a std::vector<wxPoint> containing the points of the polyline
* @param int x1, int y1, int x2, int y2, int x3, int y3 = points of the Bezier curve
*/
std
::
vector
<
wxPoint
>
Bezier2Poly
(
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
x3
,
int
y3
);
std
::
vector
<
wxPoint
>
Bezier2Poly
(
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
x3
,
int
y3
);
/**
/**
* Function Bezier2Poly
* Function Bezier2Poly
* convert a Bezier curve to a polyline
* convert a Bezier curve to a polyline
* @return a std::vector<wxPoint> containing the points of the polyline
* @return a std::vector<wxPoint> containing the points of the polyline
* @param C1, c2, c3, c4 = wxPoints of the Bezier curve
* @param c1 - First point to convert.
*/
* @param c2 - Second point to convert.
std
::
vector
<
wxPoint
>
Bezier2Poly
(
wxPoint
c1
,
wxPoint
c2
,
wxPoint
c3
,
wxPoint
c4
);
* @param c3 - Third point to convert.
/**
* @param c4 - Fourth point to convert.
* Function Bezier2Poly
* convert a Bezier curve to a polyline
* @return a std::vector<wxPoint> containing the points of the polyline
* @return a std::vector<wxPoint> containing the points of the polyline
* @param int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4 = points of the Bezier curve
*/
*/
std
::
vector
<
wxPoint
>
Bezier2Poly
(
wxPoint
c1
,
wxPoint
c2
,
wxPoint
c3
,
wxPoint
c4
);
std
::
vector
<
wxPoint
>
Bezier2Poly
(
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
x3
,
int
y3
,
int
x4
,
int
y4
);
std
::
vector
<
wxPoint
>
Bezier2Poly
(
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
x3
,
int
y3
,
int
x4
,
int
y4
);
...
...
include/class_base_screen.h
View file @
7cb34aec
...
@@ -297,6 +297,7 @@ public:
...
@@ -297,6 +297,7 @@ public:
/**
/**
* Function SetZoom
* Function SetZoom
* adjusts the current zoom factor
* adjusts the current zoom factor
* @param coeff - Zoom coefficient.
*/
*/
bool
SetZoom
(
int
coeff
);
bool
SetZoom
(
int
coeff
);
...
@@ -305,7 +306,7 @@ public:
...
@@ -305,7 +306,7 @@ public:
* sets the list of zoom factors.
* sets the list of zoom factors.
* @param aZoomList An array of zoom factors in ascending order, zero terminated
* @param aZoomList An array of zoom factors in ascending order, zero terminated
*/
*/
void
SetZoomList
(
const
wxArrayInt
&
zooml
ist
);
void
SetZoomList
(
const
wxArrayInt
&
aZoomL
ist
);
int
Scale
(
int
coord
);
int
Scale
(
int
coord
);
double
Scale
(
double
coord
);
double
Scale
(
double
coord
);
...
...
include/class_board_item.h
View file @
7cb34aec
...
@@ -190,7 +190,7 @@ public:
...
@@ -190,7 +190,7 @@ public:
/**
/**
* Function Move
* Function Move
* move this object.
* move this object.
* @param
const wxPoint&
aMoveVector - the move vector for this object.
* @param aMoveVector - the move vector for this object.
*/
*/
virtual
void
Move
(
const
wxPoint
&
aMoveVector
)
virtual
void
Move
(
const
wxPoint
&
aMoveVector
)
{
{
...
...
include/class_sch_screen.h
View file @
7cb34aec
...
@@ -46,7 +46,7 @@ public:
...
@@ -46,7 +46,7 @@ public:
/**
/**
* Function SetCurItem
* Function SetCurItem
* sets the currently selected object, m_CurrentItem.
* sets the currently selected object, m_CurrentItem.
* @param
current
Any object derived from SCH_ITEM
* @param
aItem
Any object derived from SCH_ITEM
*/
*/
void
SetCurItem
(
SCH_ITEM
*
aItem
)
void
SetCurItem
(
SCH_ITEM
*
aItem
)
{
{
...
@@ -73,11 +73,14 @@ public:
...
@@ -73,11 +73,14 @@ public:
*
*
* @param aItem - Item to be removed from schematic.
* @param aItem - Item to be removed from schematic.
*/
*/
void
RemoveFromDrawList
(
SCH_ITEM
*
DrawStruct
);
void
RemoveFromDrawList
(
SCH_ITEM
*
aItem
);
bool
CheckIfOnDrawList
(
SCH_ITEM
*
st
);
bool
CheckIfOnDrawList
(
SCH_ITEM
*
st
);
void
AddToDrawList
(
SCH_ITEM
*
st
);
void
AddToDrawList
(
SCH_ITEM
*
st
);
bool
SchematicCleanUp
(
wxDC
*
DC
=
NULL
);
bool
SchematicCleanUp
(
wxDC
*
DC
=
NULL
);
SCH_ITEM
*
ExtractWires
(
bool
CreateCopy
);
SCH_ITEM
*
ExtractWires
(
bool
CreateCopy
);
/* full undo redo management : */
/* full undo redo management : */
...
...
include/class_undoredo_container.h
View file @
7cb34aec
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
#include "base_struct.h"
#include "base_struct.h"
/**
/**
*
@info
Undo Redo considerations:
* Undo Redo considerations:
* Basically we have 3 cases
* Basically we have 3 cases
* New item
* New item
* Deleted item
* Deleted item
...
...
include/common.h
View file @
7cb34aec
...
@@ -315,8 +315,8 @@ const wxString& valeur_param( int valeur, wxString& buf_texte );
...
@@ -315,8 +315,8 @@ const wxString& valeur_param( int valeur, wxString& buf_texte );
* the format string must contain the %s format specifier.
* the format string must contain the %s format specifier.
* @return The formatted units symbol.
* @return The formatted units symbol.
*/
*/
wxString
ReturnUnitSymbol
(
UserUnitType
aUnit
=
g_UserUnit
,
wxString
ReturnUnitSymbol
(
UserUnitType
aUnit
s
=
g_UserUnit
,
const
wxString
&
aFormatString
=
_
(
" (%s):"
)
);
const
wxString
&
aFormatString
=
_
(
" (%s):"
)
);
/**
/**
* Get a human readable units string.
* Get a human readable units string.
...
@@ -327,7 +327,7 @@ wxString ReturnUnitSymbol( UserUnitType aUnit = g_UserUnit,
...
@@ -327,7 +327,7 @@ wxString ReturnUnitSymbol( UserUnitType aUnit = g_UserUnit,
* @param aUnits - The units text to return.
* @param aUnits - The units text to return.
* @return The human readable units string.
* @return The human readable units string.
*/
*/
wxString
GetUnitsLabel
(
UserUnitType
aUnit
);
wxString
GetUnitsLabel
(
UserUnitType
aUnit
s
);
wxString
GetAbbreviatedUnitsLabel
(
UserUnitType
aUnit
=
g_UserUnit
);
wxString
GetAbbreviatedUnitsLabel
(
UserUnitType
aUnit
=
g_UserUnit
);
int
ReturnValueFromString
(
UserUnitType
aUnit
,
const
wxString
&
TextValue
,
int
ReturnValueFromString
(
UserUnitType
aUnit
,
const
wxString
&
TextValue
,
...
...
include/gr_basic.h
View file @
7cb34aec
...
@@ -92,13 +92,12 @@ void GRBezier( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
...
@@ -92,13 +92,12 @@ void GRBezier( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
* Function GRClosedPoly
* Function GRClosedPoly
* draws a closed polygon onto the drawing context \a aDC and optionally fills
* draws a closed polygon onto the drawing context \a aDC and optionally fills
* and/or draws a border around it.
* and/or draws a border around it.
* @param ClipBox defines a rectangular boundary outside of which no drawing
* @param ClipBox defines a rectangular boundary outside of which no drawing will occur.
* will occur.
* @param aDC the device context into which drawing should occur.
* @param aDC the device context into which drawing should occur.
* @param aPointCount the number of points in the array \a aPointArray.
* @param aPointCount the number of points in the array \a aPoints.
* @param aPoints The points to draw.
* @param aPointArray an array holding the wxPoints in the polygon.
* @param aPointArray an array holding the wxPoints in the polygon.
* @param doFill true if polygon is to be filled, else false and only the
* @param doFill true if polygon is to be filled, else false and only the boundary is drawn.
* boundary is drawn.
* @param aPenColor the color index of the border.
* @param aPenColor the color index of the border.
* @param aFillColor the fill color of the polygon's interior.
* @param aFillColor the fill color of the polygon's interior.
*/
*/
...
@@ -117,15 +116,13 @@ void GRClosedPoly( EDA_Rect* ClipBox,
...
@@ -117,15 +116,13 @@ void GRClosedPoly( EDA_Rect* ClipBox,
* Function GRClosedPoly
* Function GRClosedPoly
* draws a closed polygon onto the drawing context \a aDC and optionally fills
* draws a closed polygon onto the drawing context \a aDC and optionally fills
* and/or draws a border around it.
* and/or draws a border around it.
* @param ClipBox defines a rectangular boundary outside of which no drawing
* @param ClipBox defines a rectangular boundary outside of which no drawing will occur.
* will occur.
* @param aDC the device context into which drawing should occur.
* @param aDC the device context into which drawing should occur.
* @param aPointCount the number of points in the array \a aPointArray.
* @param aPointCount the number of points in the array \a aPointArray.
* @param aPoints the points to draw.
* @param aPointArray an array holding the wxPoints in the polygon.
* @param aPointArray an array holding the wxPoints in the polygon.
* @param doFill true if polygon is to be filled, else false and only the
* @param doFill true if polygon is to be filled, else false and only the boundary is drawn.
* boundary is drawn.
* @param aPenWidth is the width of the pen to use on the perimeter, can be zero.
* @param aPenWidth is the width of the pen to use on the perimeter, can be
* zero.
* @param aPenColor the color index of the border.
* @param aPenColor the color index of the border.
* @param aFillColor the fill color of the polygon's interior.
* @param aFillColor the fill color of the polygon's interior.
*/
*/
...
@@ -144,8 +141,7 @@ void GRClosedPoly( EDA_Rect* ClipBox,
...
@@ -144,8 +141,7 @@ void GRClosedPoly( EDA_Rect* ClipBox,
* draws a circle onto the drawing context \a aDC centered at the user
* draws a circle onto the drawing context \a aDC centered at the user
* coordinates (x,y)
* coordinates (x,y)
*
*
* @param ClipBox defines a rectangular boundary outside of which no drawing
* @param ClipBox defines a rectangular boundary outside of which no drawing will occur.
* will occur.
* @param aDC the device context into which drawing should occur.
* @param aDC the device context into which drawing should occur.
* @param x The x coordinate in user space of the center of the circle.
* @param x The x coordinate in user space of the center of the circle.
* @param x The y coordinate in user space of the center of the circle.
* @param x The y coordinate in user space of the center of the circle.
...
...
include/hotkeys_basic.h
View file @
7cb34aec
...
@@ -96,8 +96,8 @@ int ReturnKeyCodeFromKeyName( const wxString& keyname );
...
@@ -96,8 +96,8 @@ int ReturnKeyCodeFromKeyName( const wxString& keyname );
* @param aText = a wxString. returns aText + key name
* @param aText = a wxString. returns aText + key name
* @param aList = pointer to a Ki_HotkeyInfo list of commands
* @param aList = pointer to a Ki_HotkeyInfo list of commands
* @param aCommandId = Command Id value
* @param aCommandId = Command Id value
* @param aIsShortCut = true to add
<tab><keyname>
(active shortcuts in menus)
* @param aIsShortCut = true to add
<tab><keyname>
(active shortcuts in menus)
* = false to add
<spaces><(keyname)>
* = false to add
<spaces><(keyname)>
* @return a wxString (aTest + key name) if key found or aText without modification
* @return a wxString (aTest + key name) if key found or aText without modification
*/
*/
wxString
AddHotkeyName
(
const
wxString
&
aText
,
Ki_HotkeyInfo
**
aList
,
wxString
AddHotkeyName
(
const
wxString
&
aText
,
Ki_HotkeyInfo
**
aList
,
...
@@ -110,8 +110,8 @@ wxString AddHotkeyName( const wxString& aText, Ki_HotkeyInfo** aList,
...
@@ -110,8 +110,8 @@ wxString AddHotkeyName( const wxString& aText, Ki_HotkeyInfo** aList,
* @param aText = a wxString. returns aText + key name
* @param aText = a wxString. returns aText + key name
* @param aList = pointer to a Ki_HotkeyInfoSectionDescriptor DescrList of commands
* @param aList = pointer to a Ki_HotkeyInfoSectionDescriptor DescrList of commands
* @param aCommandId = Command Id value
* @param aCommandId = Command Id value
* @param aIsShortCut = true to add
<tab><keyname>
(active shortcuts in menus)
* @param aIsShortCut = true to add
<tab><keyname>
(active shortcuts in menus)
* = false to add
<spaces><(keyname)>
* = false to add
<spaces><(keyname)>
* @return a wxString (aTest + key name) if key found or aText without modification
* @return a wxString (aTest + key name) if key found or aText without modification
*/
*/
wxString
AddHotkeyName
(
const
wxString
&
aText
,
wxString
AddHotkeyName
(
const
wxString
&
aText
,
...
@@ -123,9 +123,7 @@ wxString AddHotkeyName( const wxString& aText,
...
@@ -123,9 +123,7 @@ wxString AddHotkeyName( const wxString& aText,
* Function DisplayHotkeyList
* Function DisplayHotkeyList
* Displays the current hotkey list
* Displays the current hotkey list
* @param aFrame = current active frame
* @param aFrame = current active frame
* @param aList = pointer to a Ki_HotkeyInfoSectionDescriptor list
* @param aList = pointer to a Ki_HotkeyInfoSectionDescriptor list (Null terminated)
*(Null terminated)
* @return none
*/
*/
void
DisplayHotkeyList
(
WinEDA_DrawFrame
*
aFrame
,
void
DisplayHotkeyList
(
WinEDA_DrawFrame
*
aFrame
,
struct
Ki_HotkeyInfoSectionDescriptor
*
aList
);
struct
Ki_HotkeyInfoSectionDescriptor
*
aList
);
...
...
include/macros.h
View file @
7cb34aec
...
@@ -22,10 +22,11 @@
...
@@ -22,10 +22,11 @@
* returns a wxChar* to the actual character data within a wxString, and is
* returns a wxChar* to the actual character data within a wxString, and is
* helpful for passing strings to wxString::Printf(wxT("%s"), GetChars(wxString) )
* helpful for passing strings to wxString::Printf(wxT("%s"), GetChars(wxString) )
* <p>
* <p>
* wxChar is defined to be <ul>
* wxChar is defined to be
* <ul>
* <li> standard C style char when wxUSE_UNICODE==0 </li>
* <li> standard C style char when wxUSE_UNICODE==0 </li>
* <li> wchar_t when wxUSE_UNICODE==1 (the default). </li>
* <li> wchar_t when wxUSE_UNICODE==1 (the default). </li>
* <ul>
* <
/
ul>
* i.e. it depends on how the wxWidgets library was compiled. There was a period
* i.e. it depends on how the wxWidgets library was compiled. There was a period
* during the development of wxWidgets 2.9 when GetData() was missing, so this
* during the development of wxWidgets 2.9 when GetData() was missing, so this
* function was used to provide insulation from that design change. It may
* function was used to provide insulation from that design change. It may
...
...
include/sch_item_struct.h
View file @
7cb34aec
...
@@ -34,6 +34,7 @@ enum SCH_FILTER_T {
...
@@ -34,6 +34,7 @@ enum SCH_FILTER_T {
FIELD_T
=
0x1000
,
FIELD_T
=
0x1000
,
EXCLUDE_ENDPOINTS_T
=
0x2000
,
EXCLUDE_ENDPOINTS_T
=
0x2000
,
ENDPOINTS_ONLY_T
=
0x4000
,
ENDPOINTS_ONLY_T
=
0x4000
,
PIN_T
=
0x8000
,
NO_FILTER_T
=
0xFFFF
NO_FILTER_T
=
0xFFFF
};
};
...
@@ -246,10 +247,10 @@ public:
...
@@ -246,10 +247,10 @@ public:
/**
/**
* Function IsConnected().
* Function IsConnected().
* Test \a aPo
sition
to see if it is connected to this schematic object.
* Test \a aPo
int
to see if it is connected to this schematic object.
*
*
* @param aPo
sition
- Position to test for connection.
* @param aPo
int
- Position to test for connection.
* @return True if connection to \a aPo
sition
exists.
* @return True if connection to \a aPo
int
exists.
*/
*/
bool
IsConnected
(
const
wxPoint
&
aPoint
)
const
;
bool
IsConnected
(
const
wxPoint
&
aPoint
)
const
;
...
@@ -260,7 +261,7 @@ public:
...
@@ -260,7 +261,7 @@ public:
* @param aPoint - Point to test.
* @param aPoint - Point to test.
* @param aAccuracy - Increase the item bounding box by this amount.
* @param aAccuracy - Increase the item bounding box by this amount.
* @param aFilter - Mask to provide more granular hit testing. See enum SCH_FILTER_T.
* @param aFilter - Mask to provide more granular hit testing. See enum SCH_FILTER_T.
* @return True if \aPoint is within the item and meets the filter criteria.
* @return True if \a
a
Point is within the item and meets the filter criteria.
*/
*/
bool
HitTest
(
const
wxPoint
&
aPoint
,
int
aAccuracy
=
0
,
bool
HitTest
(
const
wxPoint
&
aPoint
,
int
aAccuracy
=
0
,
SCH_FILTER_T
aFilter
=
NO_FILTER_T
)
const
SCH_FILTER_T
aFilter
=
NO_FILTER_T
)
const
...
@@ -275,7 +276,7 @@ public:
...
@@ -275,7 +276,7 @@ public:
* @param aRect - Rectangle to test.
* @param aRect - Rectangle to test.
* @param aContained - Set to true to test for containment instead of an intersection.
* @param aContained - Set to true to test for containment instead of an intersection.
* @param aAccuracy - Increase the item bounding box by this amount.
* @param aAccuracy - Increase the item bounding box by this amount.
* @return True if \aRect contains or intersects the item bounding box.
* @return True if \a
a
Rect contains or intersects the item bounding box.
*/
*/
bool
HitTest
(
const
EDA_Rect
&
aRect
,
bool
aContained
=
false
,
int
aAccuracy
=
0
)
const
bool
HitTest
(
const
EDA_Rect
&
aRect
,
bool
aContained
=
false
,
int
aAccuracy
=
0
)
const
{
{
...
...
include/wxBasePcbFrame.h
View file @
7cb34aec
...
@@ -94,7 +94,7 @@ public:
...
@@ -94,7 +94,7 @@ public:
// General
// General
virtual
void
OnCloseWindow
(
wxCloseEvent
&
Event
)
=
0
;
virtual
void
OnCloseWindow
(
wxCloseEvent
&
Event
)
=
0
;
virtual
void
RedrawActiveWindow
(
wxDC
*
DC
,
bool
EraseBg
)
{
}
virtual
void
RedrawActiveWindow
(
wxDC
*
DC
,
bool
EraseBg
)
{
}
virtual
void
ReCreateHToolbar
()
=
0
;
virtual
void
ReCreateHToolbar
()
=
0
;
virtual
void
ReCreateVToolbar
()
=
0
;
virtual
void
ReCreateVToolbar
()
=
0
;
virtual
void
OnLeftClick
(
wxDC
*
DC
,
virtual
void
OnLeftClick
(
wxDC
*
DC
,
...
@@ -285,7 +285,7 @@ public:
...
@@ -285,7 +285,7 @@ public:
*
*
* Read active libraries or one library to find and load a given module
* Read active libraries or one library to find and load a given module
* If found the module is linked to the tail of linked list of modules
* If found the module is linked to the tail of linked list of modules
* @param aLibrary
:
the full filename of the library to read. If empty,
* @param aLibrary
FullFileName -
the full filename of the library to read. If empty,
* all active libraries are read
* all active libraries are read
* @param aModuleName = module name to load
* @param aModuleName = module name to load
* @param aDisplayMessageError = true to display an error message if any.
* @param aDisplayMessageError = true to display an error message if any.
...
...
include/wxEeschemaStruct.h
View file @
7cb34aec
...
@@ -362,13 +362,21 @@ public:
...
@@ -362,13 +362,21 @@ public:
/**
/**
* Function ProcessStuffFile
* Function ProcessStuffFile
* gets footprint info from each line in the Stuff File by Ref Desg
* gets footprint info from each line in the Stuff File by Ref Desg
*
* Read a "stuff" file created by cvpcb.
* That file has lines like:
* comp = "C1" module = "CP6"
* comp = "C2" module = "C1"
* comp = "C3" module = "C1"
* "comp =" gives the component reference
* "module =" gives the footprint name
*
* @param aFilename The file to read from.
* @param aFilename The file to read from.
* @param aSetFielsAttributeToVisible = true to set the footprint field
* @param aSetFieldsAttributeToVisible = true to set the footprint field flag to visible
* flag to visible
* @return bool - true if success, else true.
* @return bool - true if success, else true.
*/
*/
bool
ProcessStuffFile
(
FILE
*
aFilename
,
bool
ProcessStuffFile
(
FILE
*
aFilename
,
bool
aSetFielsAttributeToVisible
);
bool
aSetFiel
d
sAttributeToVisible
);
bool
SaveEEFile
(
SCH_SCREEN
*
screen
,
int
FileSave
);
bool
SaveEEFile
(
SCH_SCREEN
*
screen
,
int
FileSave
);
...
@@ -591,7 +599,7 @@ public:
...
@@ -591,7 +599,7 @@ public:
* @param aKey = the key modifiers (Alt, Shift ...)
* @param aKey = the key modifiers (Alt, Shift ...)
* @return the block command id (BLOCK_MOVE, BLOCK_COPY...)
* @return the block command id (BLOCK_MOVE, BLOCK_COPY...)
*/
*/
virtual
int
ReturnBlockCommand
(
int
k
ey
);
virtual
int
ReturnBlockCommand
(
int
aK
ey
);
/**
/**
* Function HandleBlockPlace( )
* Function HandleBlockPlace( )
...
...
include/wxPcbStruct.h
View file @
7cb34aec
...
@@ -41,7 +41,7 @@ class PCB_LAYER_WIDGET;
...
@@ -41,7 +41,7 @@ class PCB_LAYER_WIDGET;
/**
/**
*
@info see also class WinEDA_BasePcbFrame
: Basic class for pcbnew and gerbview.
*
See also class WinEDA_BasePcbFrame()
: Basic class for pcbnew and gerbview.
*/
*/
...
@@ -184,7 +184,7 @@ public:
...
@@ -184,7 +184,7 @@ public:
* if you want to store/retrieve the grid visibility in configuration.
* if you want to store/retrieve the grid visibility in configuration.
* @param aVisible = true if the grid must be shown
* @param aVisible = true if the grid must be shown
*/
*/
virtual
void
SetGridVisibility
(
bool
aVisible
);
virtual
void
SetGridVisibility
(
bool
aVisible
);
/**
/**
* Function GetGridColor() , virtual
* Function GetGridColor() , virtual
...
@@ -419,9 +419,8 @@ public:
...
@@ -419,9 +419,8 @@ public:
*commands like move
*commands like move
*/
*/
virtual
void
SaveCopyInUndoList
(
BOARD_ITEM
*
aItemToCopy
,
virtual
void
SaveCopyInUndoList
(
BOARD_ITEM
*
aItemToCopy
,
UndoRedoOpType
aTypeCommand
,
UndoRedoOpType
aTypeCommand
,
const
wxPoint
&
aTransformPoint
=
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
);
wxPoint
(
0
,
0
)
);
/**
/**
* Function SaveCopyInUndoList (overloaded).
* Function SaveCopyInUndoList (overloaded).
...
@@ -433,9 +432,8 @@ public:
...
@@ -433,9 +432,8 @@ public:
*commands like move
*commands like move
*/
*/
virtual
void
SaveCopyInUndoList
(
PICKED_ITEMS_LIST
&
aItemsList
,
virtual
void
SaveCopyInUndoList
(
PICKED_ITEMS_LIST
&
aItemsList
,
UndoRedoOpType
aTypeCommand
,
UndoRedoOpType
aTypeCommand
,
const
wxPoint
&
aTransformPoint
=
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
);
wxPoint
(
0
,
0
)
);
/**
/**
* Function PutDataInPreviousState
* Function PutDataInPreviousState
...
@@ -510,14 +508,12 @@ public:
...
@@ -510,14 +508,12 @@ public:
* Uses GetScreen()->m_BlockLocate
* Uses GetScreen()->m_BlockLocate
* select items within the selected block.
* select items within the selected block.
* selected items are put in the pick list
* selected items are put in the pick list
* @param none
*/
*/
void
Block_SelectItems
();
void
Block_SelectItems
();
/**
/**
* Function Block_Delete
* Function Block_Delete
* deletes all items within the selected block.
* deletes all items within the selected block.
* @param none
*/
*/
void
Block_Delete
();
void
Block_Delete
();
...
@@ -525,7 +521,6 @@ public:
...
@@ -525,7 +521,6 @@ public:
* Function Block_Rotate
* Function Block_Rotate
* Rotate all items within the selected block.
* Rotate all items within the selected block.
* The rotation center is the center of the block
* The rotation center is the center of the block
* @param none
*/
*/
void
Block_Rotate
();
void
Block_Rotate
();
...
@@ -533,7 +528,6 @@ public:
...
@@ -533,7 +528,6 @@ public:
* Function Block_Flip
* Function Block_Flip
* Flip items within the selected block.
* Flip items within the selected block.
* The flip center is the center of the block
* The flip center is the center of the block
* @param none
*/
*/
void
Block_Flip
();
void
Block_Flip
();
...
@@ -541,15 +535,13 @@ public:
...
@@ -541,15 +535,13 @@ public:
* Function Block_Move
* Function Block_Move
* move all items within the selected block.
* move all items within the selected block.
* New location is determined by the current offset from the selected
* New location is determined by the current offset from the selected
*block's original location.
* block's original location.
* @param none
*/
*/
void
Block_Move
();
void
Block_Move
();
/**
/**
* Function Block_Mirror_X
* Function Block_Mirror_X
* mirrors all items within the currently selected block in the X axis.
* mirrors all items within the currently selected block in the X axis.
* @param none
*/
*/
void
Block_Mirror_X
();
void
Block_Mirror_X
();
...
@@ -558,7 +550,6 @@ public:
...
@@ -558,7 +550,6 @@ public:
* Duplicate all items within the selected block.
* Duplicate all items within the selected block.
* New location is determined by the current offset from the selected
* New location is determined by the current offset from the selected
* block's original location.
* block's original location.
* @param none
*/
*/
void
Block_Duplicate
();
void
Block_Duplicate
();
...
@@ -595,10 +586,10 @@ public:
...
@@ -595,10 +586,10 @@ public:
bool
LoadOnePcbFile
(
const
wxString
&
aFileName
,
bool
aAppend
=
false
,
bool
LoadOnePcbFile
(
const
wxString
&
aFileName
,
bool
aAppend
=
false
,
bool
aForceFileDialog
=
false
);
bool
aForceFileDialog
=
false
);
/**
/**
* Function ReadPcbFile
* Function ReadPcbFile
* reads a board file <file>.brd
* reads a board file <file>.brd
* @param File - The file to read from.
* @param Append if 0: a previously loaded board is deleted before loading
* @param Append if 0: a previously loaded board is deleted before loading
* the file else all items of the board file are added to the
* the file else all items of the board file are added to the
* existing board
* existing board
...
@@ -659,7 +650,7 @@ public:
...
@@ -659,7 +650,7 @@ public:
* @return true if Ok.
* @return true if Ok.
*/
*/
bool
ExportVRML_File
(
const
wxString
&
aFullFileName
,
double
aScale
,
bool
ExportVRML_File
(
const
wxString
&
aFullFileName
,
double
aScale
,
bool
aExport3DFiles
,
const
wxString
&
a3D_Subdir
);
bool
aExport3DFiles
,
const
wxString
&
a3D_Subdir
);
/**
/**
* Function ExporttoSPECCTRA
* Function ExporttoSPECCTRA
...
@@ -717,15 +708,12 @@ public:
...
@@ -717,15 +708,12 @@ public:
// Graphic Segments type DRAWSEGMENT
// Graphic Segments type DRAWSEGMENT
void
Start_Move_DrawItem
(
DRAWSEGMENT
*
drawitem
,
wxDC
*
DC
);
void
Start_Move_DrawItem
(
DRAWSEGMENT
*
drawitem
,
wxDC
*
DC
);
void
Place_DrawItem
(
DRAWSEGMENT
*
drawitem
,
wxDC
*
DC
);
void
Place_DrawItem
(
DRAWSEGMENT
*
drawitem
,
wxDC
*
DC
);
void
InstallGraphicItemPropertiesDialog
(
DRAWSEGMENT
*
aItem
,
void
InstallGraphicItemPropertiesDialog
(
DRAWSEGMENT
*
aItem
,
wxDC
*
aDC
);
wxDC
*
aDC
);
// Footprint edition (see also WinEDA_BasePcbFrame)
// Footprint edition (see also WinEDA_BasePcbFrame)
void
InstallModuleOptionsFrame
(
MODULE
*
Module
,
wxDC
*
DC
);
void
InstallModuleOptionsFrame
(
MODULE
*
Module
,
wxDC
*
DC
);
void
StartMove_Module
(
MODULE
*
module
,
wxDC
*
DC
);
void
StartMove_Module
(
MODULE
*
module
,
wxDC
*
DC
);
bool
Delete_Module
(
MODULE
*
module
,
bool
Delete_Module
(
MODULE
*
module
,
wxDC
*
DC
,
bool
aAskBeforeDeleting
);
wxDC
*
DC
,
bool
aAskBeforeDeleting
);
void
Change_Side_Module
(
MODULE
*
Module
,
wxDC
*
DC
);
void
Change_Side_Module
(
MODULE
*
Module
,
wxDC
*
DC
);
void
InstallExchangeModuleFrame
(
MODULE
*
ExchangeModuleModule
);
void
InstallExchangeModuleFrame
(
MODULE
*
ExchangeModuleModule
);
...
@@ -800,8 +788,7 @@ public:
...
@@ -800,8 +788,7 @@ public:
* @param aTrack : bool true to modify tracks
* @param aTrack : bool true to modify tracks
* @param aVia : bool true to modify vias
* @param aVia : bool true to modify vias
*/
*/
bool
Reset_All_Tracks_And_Vias_To_Netclass_Values
(
bool
aTrack
,
bool
Reset_All_Tracks_And_Vias_To_Netclass_Values
(
bool
aTrack
,
bool
aVia
);
bool
aVia
);
/**
/**
* Function Change_Net_Tracks_And_Vias_Sizes
* Function Change_Net_Tracks_And_Vias_Sizes
...
@@ -811,8 +798,7 @@ public:
...
@@ -811,8 +798,7 @@ public:
* @param aUseNetclassValue : bool. True to use netclass values, false to
* @param aUseNetclassValue : bool. True to use netclass values, false to
* use current values
* use current values
*/
*/
bool
Change_Net_Tracks_And_Vias_Sizes
(
int
aNetcode
,
bool
Change_Net_Tracks_And_Vias_Sizes
(
int
aNetcode
,
bool
aUseNetclassValue
);
bool
aUseNetclassValue
);
/**
/**
* Function Edit_Track_Width
* Function Edit_Track_Width
...
@@ -976,11 +962,9 @@ public:
...
@@ -976,11 +962,9 @@ public:
* Function Start_Move_Zone_Corner
* Function Start_Move_Zone_Corner
* Prepares a drag edge in an existing zone outline,
* Prepares a drag edge in an existing zone outline,
*/
*/
void
Start_Move_Zone_Drag_Outline_Edge
(
void
Start_Move_Zone_Drag_Outline_Edge
(
wxDC
*
DC
,
wxDC
*
DC
,
ZONE_CONTAINER
*
zone_container
,
ZONE_CONTAINER
*
int
corner_id
);
zone_container
,
int
corner_id
);
/**
/**
* Function End_Move_Zone_Corner_Or_Outlines
* Function End_Move_Zone_Corner_Or_Outlines
...
@@ -988,10 +972,7 @@ public:
...
@@ -988,10 +972,7 @@ public:
* @param DC = current Device Context (can be NULL)
* @param DC = current Device Context (can be NULL)
* @param zone_container: the given zone
* @param zone_container: the given zone
*/
*/
void
End_Move_Zone_Corner_Or_Outlines
(
void
End_Move_Zone_Corner_Or_Outlines
(
wxDC
*
DC
,
ZONE_CONTAINER
*
zone_container
);
wxDC
*
DC
,
ZONE_CONTAINER
*
zone_container
);
/**
/**
* Function End_Move_Zone_Corner_Or_Outlines
* Function End_Move_Zone_Corner_Or_Outlines
...
@@ -1019,16 +1000,14 @@ public:
...
@@ -1019,16 +1000,14 @@ public:
* @param DC = current Device Context (can be NULL)
* @param DC = current Device Context (can be NULL)
* @param zone_container: the given zone to move
* @param zone_container: the given zone to move
*/
*/
void
Start_Move_Zone_Outlines
(
wxDC
*
DC
,
void
Start_Move_Zone_Outlines
(
wxDC
*
DC
,
ZONE_CONTAINER
*
zone_container
);
ZONE_CONTAINER
*
zone_container
);
// Target handling
// Target handling
MIREPCB
*
Create_Mire
(
wxDC
*
DC
);
MIREPCB
*
Create_Mire
(
wxDC
*
DC
);
void
Delete_Mire
(
MIREPCB
*
MirePcb
,
wxDC
*
DC
);
void
Delete_Mire
(
MIREPCB
*
MirePcb
,
wxDC
*
DC
);
void
StartMove_Mire
(
MIREPCB
*
MirePcb
,
wxDC
*
DC
);
void
StartMove_Mire
(
MIREPCB
*
MirePcb
,
wxDC
*
DC
);
void
Place_Mire
(
MIREPCB
*
MirePcb
,
wxDC
*
DC
);
void
Place_Mire
(
MIREPCB
*
MirePcb
,
wxDC
*
DC
);
void
InstallMireOptionsFrame
(
MIREPCB
*
MirePcb
,
void
InstallMireOptionsFrame
(
MIREPCB
*
MirePcb
,
wxDC
*
DC
);
wxDC
*
DC
);
// Graphic segments type DRAWSEGMENT handling:
// Graphic segments type DRAWSEGMENT handling:
DRAWSEGMENT
*
Begin_DrawSegment
(
DRAWSEGMENT
*
Segment
,
int
shape
,
wxDC
*
DC
);
DRAWSEGMENT
*
Begin_DrawSegment
(
DRAWSEGMENT
*
Segment
,
int
shape
,
wxDC
*
DC
);
...
@@ -1037,9 +1016,8 @@ public:
...
@@ -1037,9 +1016,8 @@ public:
void
Delete_Drawings_All_Layer
(
int
aLayer
);
void
Delete_Drawings_All_Layer
(
int
aLayer
);
// Dimension handling:
// Dimension handling:
void
Install_Edit_Dimension
(
DIMENSION
*
Dimension
,
void
Install_Edit_Dimension
(
DIMENSION
*
Dimension
,
wxDC
*
DC
);
wxDC
*
DC
);
DIMENSION
*
Begin_Dimension
(
DIMENSION
*
Dimension
,
wxDC
*
DC
);
DIMENSION
*
Begin_Dimension
(
DIMENSION
*
Dimension
,
wxDC
*
DC
);
void
Delete_Dimension
(
DIMENSION
*
Dimension
,
wxDC
*
DC
);
void
Delete_Dimension
(
DIMENSION
*
Dimension
,
wxDC
*
DC
);
...
@@ -1071,8 +1049,7 @@ public:
...
@@ -1071,8 +1049,7 @@ public:
* }
* }
* #End
* #End
*/
*/
bool
ReadPcbNetlist
(
bool
ReadPcbNetlist
(
const
wxString
&
aNetlistFullFilename
,
const
wxString
&
aNetlistFullFilename
,
const
wxString
&
aCmpFullFileName
,
const
wxString
&
aCmpFullFileName
,
wxTextCtrl
*
aMessageWindow
,
wxTextCtrl
*
aMessageWindow
,
bool
aChangeFootprint
,
bool
aChangeFootprint
,
...
...
include/wxstruct.h
View file @
7cb34aec
...
@@ -152,7 +152,7 @@ public:
...
@@ -152,7 +152,7 @@ public:
/**
/**
* Function ReadHotkeyConfigFile
* Function ReadHotkeyConfigFile
* Read an old configuration file (
<file>
.key) and fill the current hotkey list
* Read an old configuration file (
<file>
.key) and fill the current hotkey list
* with hotkeys
* with hotkeys
* @param aFilename = file name to read.
* @param aFilename = file name to read.
* @param aDescList = current hotkey list descr. to initialise.
* @param aDescList = current hotkey list descr. to initialise.
...
@@ -328,7 +328,7 @@ public:
...
@@ -328,7 +328,7 @@ public:
* It may be overloaded by derived classes
* It may be overloaded by derived classes
* @param aVisible = true if the grid must be shown
* @param aVisible = true if the grid must be shown
*/
*/
virtual
void
SetGridVisibility
(
bool
aVisible
)
virtual
void
SetGridVisibility
(
bool
aVisible
)
{
{
m_DrawGrid
=
aVisible
;
m_DrawGrid
=
aVisible
;
}
}
...
@@ -346,7 +346,7 @@ public:
...
@@ -346,7 +346,7 @@ public:
* Function SetGridColor() , virtual
* Function SetGridColor() , virtual
* @param aColor = the new color of the grid
* @param aColor = the new color of the grid
*/
*/
virtual
void
SetGridColor
(
int
aColor
)
virtual
void
SetGridColor
(
int
aColor
)
{
{
m_GridColor
=
aColor
;
m_GridColor
=
aColor
;
}
}
...
@@ -402,8 +402,7 @@ public:
...
@@ -402,8 +402,7 @@ public:
* @return a wxString containing the message locator like A3 or B6
* @return a wxString containing the message locator like A3 or B6
* (or ?? if out of page limits)
* (or ?? if out of page limits)
*/
*/
wxString
GetXYSheetReferences
(
BASE_SCREEN
*
aScreen
,
wxString
GetXYSheetReferences
(
BASE_SCREEN
*
aScreen
,
const
wxPoint
&
aPosition
);
const
wxPoint
&
aPosition
);
void
DisplayToolMsg
(
const
wxString
&
msg
);
void
DisplayToolMsg
(
const
wxString
&
msg
);
void
Process_Zoom
(
wxCommandEvent
&
event
);
void
Process_Zoom
(
wxCommandEvent
&
event
);
...
@@ -411,8 +410,7 @@ public:
...
@@ -411,8 +410,7 @@ public:
virtual
void
RedrawActiveWindow
(
wxDC
*
DC
,
bool
EraseBg
)
=
0
;
virtual
void
RedrawActiveWindow
(
wxDC
*
DC
,
bool
EraseBg
)
=
0
;
virtual
void
OnLeftClick
(
wxDC
*
DC
,
const
wxPoint
&
MousePos
)
=
0
;
virtual
void
OnLeftClick
(
wxDC
*
DC
,
const
wxPoint
&
MousePos
)
=
0
;
virtual
void
OnLeftDClick
(
wxDC
*
DC
,
const
wxPoint
&
MousePos
);
virtual
void
OnLeftDClick
(
wxDC
*
DC
,
const
wxPoint
&
MousePos
);
virtual
bool
OnRightClick
(
const
wxPoint
&
MousePos
,
virtual
bool
OnRightClick
(
const
wxPoint
&
MousePos
,
wxMenu
*
PopMenu
)
=
0
;
wxMenu
*
PopMenu
)
=
0
;
virtual
void
ToolOnRightClick
(
wxCommandEvent
&
event
);
virtual
void
ToolOnRightClick
(
wxCommandEvent
&
event
);
void
AdjustScrollBars
();
void
AdjustScrollBars
();
...
@@ -453,7 +451,7 @@ public:
...
@@ -453,7 +451,7 @@ public:
* @param aKey = the key modifiers (Alt, Shift ...)
* @param aKey = the key modifiers (Alt, Shift ...)
* @return the block command id (BLOCK_MOVE, BLOCK_COPY...)
* @return the block command id (BLOCK_MOVE, BLOCK_COPY...)
*/
*/
virtual
int
ReturnBlockCommand
(
int
k
ey
);
virtual
int
ReturnBlockCommand
(
int
aK
ey
);
/**
/**
* Function HandleBlockPlace( )
* Function HandleBlockPlace( )
...
@@ -637,8 +635,7 @@ public:
...
@@ -637,8 +635,7 @@ public:
bool
m_Horizontal
;
// some auxiliary TB are horizontal, others vertical
bool
m_Horizontal
;
// some auxiliary TB are horizontal, others vertical
public
:
public
:
WinEDA_Toolbar
(
id_toolbar
type
,
wxWindow
*
parent
,
WinEDA_Toolbar
(
id_toolbar
type
,
wxWindow
*
parent
,
wxWindowID
id
,
bool
horizontal
);
wxWindowID
id
,
bool
horizontal
);
bool
GetToolState
(
int
toolId
)
{
return
GetToolToggled
(
toolId
);
};
bool
GetToolState
(
int
toolId
)
{
return
GetToolToggled
(
toolId
);
};
...
...
kicad/menubar.cpp
View file @
7cb34aec
/**
/**
* @file menubar.cpp
* @file
kicad/
menubar.cpp
* @brief Project manager menubars and toolbars
* @brief Project manager menubars and toolbars
*/
*/
#include "fctsys.h"
#include "fctsys.h"
...
...
kicad/tree_project_frame.cpp
View file @
7cb34aec
/**
/**
* @file tree
prj
_frame.cpp
* @file tree
_project
_frame.cpp
* @brief TODO
* @brief TODO
*/
*/
...
...
pcbnew/board_undo_redo.cpp
View file @
7cb34aec
...
@@ -326,12 +326,6 @@ BOARD_ITEM* DuplicateStruct( BOARD_ITEM* aItem )
...
@@ -326,12 +326,6 @@ BOARD_ITEM* DuplicateStruct( BOARD_ITEM* aItem )
}
}
/***********************************************************************/
void
WinEDA_PcbFrame
::
SaveCopyInUndoList
(
BOARD_ITEM
*
aItem
,
UndoRedoOpType
aCommandType
,
const
wxPoint
&
aTransformPoint
)
/***********************************************************************/
/**
/**
* Function SaveCopyInUndoList
* Function SaveCopyInUndoList
* Create a copy of the current schematic item, and put it in the undo list.
* Create a copy of the current schematic item, and put it in the undo list.
...
@@ -349,6 +343,9 @@ void WinEDA_PcbFrame::SaveCopyInUndoList( BOARD_ITEM* aItem,
...
@@ -349,6 +343,9 @@ void WinEDA_PcbFrame::SaveCopyInUndoList( BOARD_ITEM* aItem,
* If it is only a copy, the EEDrawList and the subhierarchy must NOT be deleted.
* If it is only a copy, the EEDrawList and the subhierarchy must NOT be deleted.
*
*
*/
*/
void
WinEDA_PcbFrame
::
SaveCopyInUndoList
(
BOARD_ITEM
*
aItem
,
UndoRedoOpType
aCommandType
,
const
wxPoint
&
aTransformPoint
)
{
{
if
(
aItem
==
NULL
)
// Nothing to save
if
(
aItem
==
NULL
)
// Nothing to save
return
;
return
;
...
@@ -404,6 +401,7 @@ void WinEDA_PcbFrame::SaveCopyInUndoList( BOARD_ITEM* aItem,
...
@@ -404,6 +401,7 @@ void WinEDA_PcbFrame::SaveCopyInUndoList( BOARD_ITEM* aItem,
* Function SaveCopyInUndoList
* Function SaveCopyInUndoList
* @param aItemsList = a PICKED_ITEMS_LIST of items to save
* @param aItemsList = a PICKED_ITEMS_LIST of items to save
* @param aTypeCommand = type of comand ( UR_CHANGED, UR_NEW, UR_DELETED ...
* @param aTypeCommand = type of comand ( UR_CHANGED, UR_NEW, UR_DELETED ...
* @param aTransformPoint - Transform items around this point.
*/
*/
void
WinEDA_PcbFrame
::
SaveCopyInUndoList
(
PICKED_ITEMS_LIST
&
aItemsList
,
void
WinEDA_PcbFrame
::
SaveCopyInUndoList
(
PICKED_ITEMS_LIST
&
aItemsList
,
UndoRedoOpType
aTypeCommand
,
UndoRedoOpType
aTypeCommand
,
...
...
pcbnew/class_board_item.cpp
View file @
7cb34aec
...
@@ -31,13 +31,11 @@ wxString BOARD_ITEM::ShowShape( Track_Shapes aShape )
...
@@ -31,13 +31,11 @@ wxString BOARD_ITEM::ShowShape( Track_Shapes aShape )
}
}
/********************************************************/
/**
wxString
BOARD_ITEM
::
MenuText
(
const
BOARD
*
aPcb
)
const
* return a specific comment for "this". Used in pop up menus
/********************************************************/
/** return a specific comment for "this". Used in pop up menus
* @param aPcb = the parent board
* @param aPcb = the parent board
*/
*/
wxString
BOARD_ITEM
::
MenuText
(
const
BOARD
*
aPcb
)
const
{
{
wxString
text
;
wxString
text
;
wxString
msg
;
wxString
msg
;
...
@@ -55,15 +53,17 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
...
@@ -55,15 +53,17 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
case
TYPE_PAD
:
case
TYPE_PAD
:
pad
=
(
D_PAD
*
)
this
;
pad
=
(
D_PAD
*
)
this
;
text
<<
_
(
"Pad"
)
<<
wxT
(
"
\"
"
)
<<
pad
->
ReturnStringPadName
()
text
<<
_
(
"Pad"
)
<<
wxT
(
"
\"
"
)
<<
pad
->
ReturnStringPadName
()
<<
wxT
(
"
\"
("
);
<<
wxT
(
"
\"
("
);
if
(
(
pad
->
m_Masque_Layer
&
ALL_CU_LAYERS
)
==
ALL_CU_LAYERS
)
if
(
(
pad
->
m_Masque_Layer
&
ALL_CU_LAYERS
)
==
ALL_CU_LAYERS
)
text
<<
_
(
"all copper layers"
);
text
<<
_
(
"all copper layers"
);
else
if
(
(
pad
->
m_Masque_Layer
&
LAYER_BACK
)
==
LAYER_BACK
)
else
if
(
(
pad
->
m_Masque_Layer
&
LAYER_BACK
)
==
LAYER_BACK
)
text
<<
aPcb
->
GetLayerName
(
LAYER_N_BACK
).
Trim
();
text
<<
aPcb
->
GetLayerName
(
LAYER_N_BACK
).
Trim
();
else
if
(
(
pad
->
m_Masque_Layer
&
LAYER_FRONT
)
==
LAYER_FRONT
)
else
if
(
(
pad
->
m_Masque_Layer
&
LAYER_FRONT
)
==
LAYER_FRONT
)
text
<<
aPcb
->
GetLayerName
(
LAYER_N_FRONT
);
text
<<
aPcb
->
GetLayerName
(
LAYER_N_FRONT
);
else
text
<<
_
(
"???"
);
else
text
<<
_
(
"???"
);
text
<<
_
(
") of "
)
<<
(
(
MODULE
*
)
GetParent
()
)
->
GetReference
();
text
<<
_
(
") of "
)
<<
(
(
MODULE
*
)
GetParent
()
)
->
GetReference
();
break
;
break
;
...
...
pcbnew/class_zone.cpp
View file @
7cb34aec
...
@@ -430,17 +430,7 @@ int ZONE_CONTAINER::ReadDescr( FILE* aFile, int* aLineNum )
...
@@ -430,17 +430,7 @@ int ZONE_CONTAINER::ReadDescr( FILE* aFile, int* aLineNum )
}
}
/****************************************************************************************************/
void
ZONE_CONTAINER
::
Draw
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
int
aDrawMode
,
const
wxPoint
&
offset
)
void
ZONE_CONTAINER
::
Draw
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
int
draw_mode
,
const
wxPoint
&
offset
)
/****************************************************************************************************/
/**
* Function Draw
* @param panel = current Draw Panel
* @param DC = current Device Context
* @param offset = Draw offset (usually wxPoint(0,0))
* @param draw_mode = draw mode: OR, XOR ..
*/
{
{
if
(
DC
==
NULL
)
if
(
DC
==
NULL
)
return
;
return
;
...
@@ -455,7 +445,7 @@ void ZONE_CONTAINER::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, con
...
@@ -455,7 +445,7 @@ void ZONE_CONTAINER::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, con
(
color
&
HIGHLIGHT_FLAG
)
!=
HIGHLIGHT_FLAG
)
(
color
&
HIGHLIGHT_FLAG
)
!=
HIGHLIGHT_FLAG
)
return
;
return
;
GRSetDrawMode
(
DC
,
draw_m
ode
);
GRSetDrawMode
(
DC
,
aDrawM
ode
);
if
(
DisplayOpt
.
ContrastModeDisplay
)
if
(
DisplayOpt
.
ContrastModeDisplay
)
{
{
...
@@ -466,9 +456,9 @@ void ZONE_CONTAINER::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, con
...
@@ -466,9 +456,9 @@ void ZONE_CONTAINER::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, con
}
}
}
}
if
(
draw_m
ode
&
GR_SURBRILL
)
if
(
aDrawM
ode
&
GR_SURBRILL
)
{
{
if
(
draw_m
ode
&
GR_AND
)
if
(
aDrawM
ode
&
GR_AND
)
color
&=
~
HIGHLIGHT_FLAG
;
color
&=
~
HIGHLIGHT_FLAG
;
else
else
color
|=
HIGHLIGHT_FLAG
;
color
|=
HIGHLIGHT_FLAG
;
...
@@ -481,10 +471,12 @@ void ZONE_CONTAINER::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, con
...
@@ -481,10 +471,12 @@ void ZONE_CONTAINER::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, con
// draw the lines
// draw the lines
int
i_start_contour
=
0
;
int
i_start_contour
=
0
;
std
::
vector
<
wxPoint
>
lines
;
std
::
vector
<
wxPoint
>
lines
;
lines
.
reserve
(
(
GetNumCorners
()
*
2
)
+
2
);
lines
.
reserve
(
(
GetNumCorners
()
*
2
)
+
2
);
for
(
int
ic
=
0
;
ic
<
GetNumCorners
();
ic
++
)
for
(
int
ic
=
0
;
ic
<
GetNumCorners
();
ic
++
)
{
{
seg_start
=
GetCornerPosition
(
ic
)
+
offset
;
seg_start
=
GetCornerPosition
(
ic
)
+
offset
;
if
(
m_Poly
->
corner
[
ic
].
end_contour
==
FALSE
&&
ic
<
GetNumCorners
()
-
1
)
if
(
m_Poly
->
corner
[
ic
].
end_contour
==
FALSE
&&
ic
<
GetNumCorners
()
-
1
)
{
{
seg_end
=
GetCornerPosition
(
ic
+
1
)
+
offset
;
seg_end
=
GetCornerPosition
(
ic
+
1
)
+
offset
;
...
@@ -497,11 +489,12 @@ void ZONE_CONTAINER::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, con
...
@@ -497,11 +489,12 @@ void ZONE_CONTAINER::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, con
lines
.
push_back
(
seg_start
);
lines
.
push_back
(
seg_start
);
lines
.
push_back
(
seg_end
);
lines
.
push_back
(
seg_end
);
}
}
GRLineArray
(
&
panel
->
m_ClipBox
,
DC
,
lines
,
0
,
color
);
GRLineArray
(
&
panel
->
m_ClipBox
,
DC
,
lines
,
0
,
color
);
// draw hatches
// draw hatches
lines
.
clear
();
lines
.
clear
();
lines
.
reserve
(
(
m_Poly
->
m_HatchLines
.
size
()
*
2
)
+
2
);
lines
.
reserve
(
(
m_Poly
->
m_HatchLines
.
size
()
*
2
)
+
2
);
for
(
unsigned
ic
=
0
;
ic
<
m_Poly
->
m_HatchLines
.
size
();
ic
++
)
for
(
unsigned
ic
=
0
;
ic
<
m_Poly
->
m_HatchLines
.
size
();
ic
++
)
{
{
seg_start
.
x
=
m_Poly
->
m_HatchLines
[
ic
].
xi
+
offset
.
x
;
seg_start
.
x
=
m_Poly
->
m_HatchLines
[
ic
].
xi
+
offset
.
x
;
...
@@ -511,7 +504,8 @@ void ZONE_CONTAINER::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, con
...
@@ -511,7 +504,8 @@ void ZONE_CONTAINER::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, con
lines
.
push_back
(
seg_start
);
lines
.
push_back
(
seg_start
);
lines
.
push_back
(
seg_end
);
lines
.
push_back
(
seg_end
);
}
}
GRLineArray
(
&
panel
->
m_ClipBox
,
DC
,
lines
,
0
,
color
);
GRLineArray
(
&
panel
->
m_ClipBox
,
DC
,
lines
,
0
,
color
);
}
}
...
@@ -776,7 +770,7 @@ bool ZONE_CONTAINER::HitTest( const wxPoint& refPos )
...
@@ -776,7 +770,7 @@ bool ZONE_CONTAINER::HitTest( const wxPoint& refPos )
* tests if the given wxPoint near a corner, or near the segment define by 2 corners.
* tests if the given wxPoint near a corner, or near the segment define by 2 corners.
* Choose the nearest corner
* Choose the nearest corner
* "near" means CORNER_MIN_DIST_IN_PIXELS pixels
* "near" means CORNER_MIN_DIST_IN_PIXELS pixels
* @return -1 if none, corner index in .corner
<vector>
* @return -1 if none, corner index in .corner
<vector>
* @param refPos : A wxPoint to test
* @param refPos : A wxPoint to test
*/
*/
int
ZONE_CONTAINER
::
HitTestForCorner
(
const
wxPoint
&
refPos
)
int
ZONE_CONTAINER
::
HitTestForCorner
(
const
wxPoint
&
refPos
)
...
@@ -811,7 +805,7 @@ int ZONE_CONTAINER::HitTestForCorner( const wxPoint& refPos )
...
@@ -811,7 +805,7 @@ int ZONE_CONTAINER::HitTestForCorner( const wxPoint& refPos )
* tests if the given wxPoint near a corner, or near the segment define by 2 corners.
* tests if the given wxPoint near a corner, or near the segment define by 2 corners.
* choose the nearest segment
* choose the nearest segment
* "near" means EDGE_MIN_DIST_IN_PIXELS pixels
* "near" means EDGE_MIN_DIST_IN_PIXELS pixels
* @return -1 if none, or index of the starting corner in .corner
<vector>
* @return -1 if none, or index of the starting corner in .corner
<vector>
* @param refPos : A wxPoint to test
* @param refPos : A wxPoint to test
*/
*/
int
ZONE_CONTAINER
::
HitTestForEdge
(
const
wxPoint
&
refPos
)
int
ZONE_CONTAINER
::
HitTestForEdge
(
const
wxPoint
&
refPos
)
...
@@ -1084,7 +1078,7 @@ void ZONE_CONTAINER::Rotate( const wxPoint& centre, int angle )
...
@@ -1084,7 +1078,7 @@ void ZONE_CONTAINER::Rotate( const wxPoint& centre, int angle )
* Function Flip
* Function Flip
* Flip this object, i.e. change the board side for this object
* Flip this object, i.e. change the board side for this object
* (like Mirror() but changes layer)
* (like Mirror() but changes layer)
* @param
const wxPoint&
aCentre - the rotation point.
* @param aCentre - the rotation point.
*/
*/
void
ZONE_CONTAINER
::
Flip
(
const
wxPoint
&
aCentre
)
void
ZONE_CONTAINER
::
Flip
(
const
wxPoint
&
aCentre
)
{
{
...
@@ -1159,7 +1153,6 @@ void ZONE_CONTAINER::Copy( ZONE_CONTAINER* src )
...
@@ -1159,7 +1153,6 @@ void ZONE_CONTAINER::Copy( ZONE_CONTAINER* src )
/**
/**
* Function SetNetNameFromNetCode
* Function SetNetNameFromNetCode
* Find the net name corresponding to the net code.
* Find the net name corresponding to the net code.
* @param aPcb: the current board
* @return bool - true if net found, else false
* @return bool - true if net found, else false
*/
*/
bool
ZONE_CONTAINER
::
SetNetNameFromNetCode
(
void
)
bool
ZONE_CONTAINER
::
SetNetNameFromNetCode
(
void
)
...
...
pcbnew/class_zone.h
View file @
7cb34aec
...
@@ -88,8 +88,8 @@ public:
...
@@ -88,8 +88,8 @@ public:
* Draws the zone outline.
* Draws the zone outline.
* @param panel = current Draw Panel
* @param panel = current Draw Panel
* @param DC = current Device Context
* @param DC = current Device Context
* @param offset = Draw offset (usually wxPoint(0,0))
* @param aDrawMode = GR_OR, GR_XOR, GR_COPY ..
* @param aDrawMode = GR_OR, GR_XOR, GR_COPY ..
* @param offset = Draw offset (usually wxPoint(0,0))
*/
*/
void
Draw
(
WinEDA_DrawPanel
*
panel
,
void
Draw
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
wxDC
*
DC
,
...
@@ -224,7 +224,7 @@ public:
...
@@ -224,7 +224,7 @@ public:
/**
/**
* Function HitTestForCorner
* Function HitTestForCorner
* tests if the given wxPoint near a corner, or near the segment define by 2 corners.
* tests if the given wxPoint near a corner, or near the segment define by 2 corners.
* @return -1 if none, corner index in .corner
<vector>
* @return -1 if none, corner index in .corner
<vector>
* @param refPos : A wxPoint to test
* @param refPos : A wxPoint to test
*/
*/
int
HitTestForCorner
(
const
wxPoint
&
refPos
);
int
HitTestForCorner
(
const
wxPoint
&
refPos
);
...
@@ -232,7 +232,7 @@ public:
...
@@ -232,7 +232,7 @@ public:
/**
/**
* Function HitTestForEdge
* Function HitTestForEdge
* tests if the given wxPoint near a corner, or near the segment define by 2 corners.
* tests if the given wxPoint near a corner, or near the segment define by 2 corners.
* @return -1 if none, or index of the starting corner in .corner
<vector>
* @return -1 if none, or index of the starting corner in .corner
<vector>
* @param refPos : A wxPoint to test
* @param refPos : A wxPoint to test
*/
*/
int
HitTestForEdge
(
const
wxPoint
&
refPos
);
int
HitTestForEdge
(
const
wxPoint
&
refPos
);
...
@@ -264,10 +264,9 @@ public:
...
@@ -264,10 +264,9 @@ public:
* A scan is made line per line, on the whole filled areas, with a step of m_ZoneMinThickness.
* A scan is made line per line, on the whole filled areas, with a step of m_ZoneMinThickness.
* all intersecting points with the horizontal infinite line and polygons to fill are calculated
* all intersecting points with the horizontal infinite line and polygons to fill are calculated
* a list of SEGZONE items is built, line per line
* a list of SEGZONE items is built, line per line
* @param aFrame = reference to the main frame
* @return number of segments created
* @return number of segments created
*/
*/
int
Fill_Zone_Areas_With_Segments
(
);
int
Fill_Zone_Areas_With_Segments
();
/* Geometric transformations: */
/* Geometric transformations: */
...
@@ -298,7 +297,7 @@ public:
...
@@ -298,7 +297,7 @@ public:
* Function Flip
* Function Flip
* Flip this object, i.e. change the board side for this object
* Flip this object, i.e. change the board side for this object
* (like Mirror() but changes layer)
* (like Mirror() but changes layer)
* @param
const wxPoint&
aCentre - the rotation point.
* @param aCentre - the rotation point.
*/
*/
virtual
void
Flip
(
const
wxPoint
&
aCentre
);
virtual
void
Flip
(
const
wxPoint
&
aCentre
);
...
...
pcbnew/clean.cpp
View file @
7cb34aec
...
@@ -629,7 +629,6 @@ static TRACK* AlignSegment( BOARD* Pcb, TRACK* pt_ref, TRACK* pt_segm, int extre
...
@@ -629,7 +629,6 @@ static TRACK* AlignSegment( BOARD* Pcb, TRACK* pt_ref, TRACK* pt_segm, int extre
* When such a bad segment is found, mark it as needing to be removed.
* When such a bad segment is found, mark it as needing to be removed.
* and remove all tracks having at least one flagged segment.
* and remove all tracks having at least one flagged segment.
* @param aDC = the current device context (can be NULL)
* @param aDC = the current device context (can be NULL)
* @param aDisplayActivity = true to display activity on the frame status bar and message panel
* @return true if any change is made
* @return true if any change is made
*/
*/
bool
WinEDA_PcbFrame
::
RemoveMisConnectedTracks
(
wxDC
*
aDC
)
bool
WinEDA_PcbFrame
::
RemoveMisConnectedTracks
(
wxDC
*
aDC
)
...
...
pcbnew/dialogs/dialog_display_options.h
View file @
7cb34aec
/**
/**
* @file dialog_display_options.h
* @file
pcbnew/
dialog_display_options.h
*/
*/
#include "dialog_display_options_base.h"
#include "dialog_display_options_base.h"
...
...
pcbnew/gendrill.cpp
View file @
7cb34aec
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
*/
*/
/**
/**
* @
info
for EXCELLON format, see:
* @
see
for EXCELLON format, see:
* http://www.excellon.com/manuals/program.htm
* http://www.excellon.com/manuals/program.htm
* and the CNC-7 manual.
* and the CNC-7 manual.
*/
*/
...
...
pcbnew/help_common_strings.h
View file @
7cb34aec
/**
/**
* @file help_common_strings.h
* @file
pcbnew/
help_common_strings.h
* strings common to toolbars and menubar
* strings common to toolbars and menubar
*/
*/
...
...
pcbnew/hotkeys.h
View file @
7cb34aec
/**
/**
* @file hotkeys.h
* @file
pcbnew/
hotkeys.h
* PCBNew hotkeys
* PCBNew hotkeys
*/
*/
#ifndef _PCBNEW_KOTKEYS_H
#ifndef _PCBNEW_KOTKEYS_H
...
...
pcbnew/loadcmp.cpp
View file @
7cb34aec
...
@@ -341,21 +341,22 @@ MODULE* WinEDA_BasePcbFrame::Get_Librairie_Module(
...
@@ -341,21 +341,22 @@ MODULE* WinEDA_BasePcbFrame::Get_Librairie_Module(
/**
/**
* Function Select_1_Module_From_List
* Function Select_1_Module_From_List
* Display a list of modules found in active libraries or a given library
* Display a list of modules found in active libraries or a given library
* @param aLibraryFullFilename = library to list (if aLibraryFullFilename ==
*
* @param aWindow - The active window.
* @param aLibraryFullFilename = library to list (if aLibraryFullFilename ==
* void, list all modules)
* void, list all modules)
* @param aMask = Display filter (wildcard)( Mask = wxEmptyString if not used
* @param aMask = Display filter (wildcard)( Mask = wxEmptyString if not used )
* )
* @param aKeyWord = keyword list, to display a filtered list of module having
* @param aKeyWord = keyword list, to display a filtered list of module having
* one (or more) of these keyworks in their keywork list
* one (or more) of these keyworks in their keywork list
* ( aKeyWord = wxEmptyString if not used )
* ( aKeyWord = wxEmptyString if not used )
*
*
* @return wxEmptyString if abort or fails, or the selected module name if Ok
* @return wxEmptyString if abort or fails, or the selected module name if Ok
*/
*/
wxString
WinEDA_BasePcbFrame
::
Select_1_Module_From_List
(
wxString
WinEDA_BasePcbFrame
::
Select_1_Module_From_List
(
WinEDA_DrawFrame
*
aWindow
,
WinEDA_DrawFrame
*
active_window
,
const
wxString
&
aLibraryFullFilename
,
const
wxString
&
aLibraryFullFilename
,
const
wxString
&
aMask
,
const
wxString
&
aMask
,
const
wxString
&
aKeyWord
)
const
wxString
&
aKeyWord
)
{
{
int
LineNum
;
int
LineNum
;
unsigned
ii
;
unsigned
ii
;
...
@@ -475,8 +476,8 @@ wxString WinEDA_BasePcbFrame::Select_1_Module_From_List(
...
@@ -475,8 +476,8 @@ wxString WinEDA_BasePcbFrame::Select_1_Module_From_List(
wxEndBusyCursor
();
wxEndBusyCursor
();
msg
.
Printf
(
_
(
"Modules [%d items]"
),
itemslist
.
GetCount
()
);
msg
.
Printf
(
_
(
"Modules [%d items]"
),
itemslist
.
GetCount
()
);
WinEDAListBox
dlg
(
a
ctive_w
indow
,
msg
,
itemslist
,
OldName
,
WinEDAListBox
dlg
(
a
W
indow
,
msg
,
itemslist
,
OldName
,
DisplayCmpDoc
,
GetComponentDialogPosition
()
);
DisplayCmpDoc
,
GetComponentDialogPosition
()
);
dlg
.
SortList
();
dlg
.
SortList
();
...
...
pcbnew/menubar_pcbframe.cpp
View file @
7cb34aec
/**
/**
* @file menubar
pcb
.cpp
* @file menubar
_pcbframe
.cpp
* PCBNew editor menu bar
* PCBNew editor menu bar
*/
*/
#include "fctsys.h"
#include "fctsys.h"
...
...
pcbnew/netlist.cpp
View file @
7cb34aec
...
@@ -134,6 +134,11 @@ FILE * OpenNetlistFile( const wxString& aFullFileName )
...
@@ -134,6 +134,11 @@ FILE * OpenNetlistFile( const wxString& aFullFileName )
* Update Reference, value and "TIME STAMP"
* Update Reference, value and "TIME STAMP"
* @param aNetlistFullFilename = netlist file name (*.net)
* @param aNetlistFullFilename = netlist file name (*.net)
* @param aCmpFullFileName = cmp/footprint list file name (*.cmp) if not found,
* @param aCmpFullFileName = cmp/footprint list file name (*.cmp) if not found,
* @param aMessageWindow - Please document me.
* @param aChangeFootprint - Please document me.
* @param aDeleteBadTracks - Please document me.
* @param aDeleteExtraFootprints - Please document me.
* @param aSelect_By_Timestamp - Please document me.
* @return true if Ok
* @return true if Ok
* only the netlist will be used
* only the netlist will be used
*
*
...
...
pcbnew/ratsnest.cpp
View file @
7cb34aec
...
@@ -742,8 +742,9 @@ void WinEDA_BasePcbFrame::Tst_Ratsnest( wxDC* DC, int ref_netcode )
...
@@ -742,8 +742,9 @@ void WinEDA_BasePcbFrame::Tst_Ratsnest( wxDC* DC, int ref_netcode )
/**
/**
* Function Test_1_Net_Ratsnest
* Function Test_1_Net_Ratsnest
* Compute the ratsnest relative to the net "net_code"
* Compute the ratsnest relative to the net "net_code"
* @param ref_netcode = netcode used to compute the ratsnest.
* @param DC - Device context to draw on.
* @param ref_netcode = netcode used to compute the ratsnest.
*/
*/
int
WinEDA_BasePcbFrame
::
Test_1_Net_Ratsnest
(
wxDC
*
DC
,
int
ref_netcode
)
int
WinEDA_BasePcbFrame
::
Test_1_Net_Ratsnest
(
wxDC
*
DC
,
int
ref_netcode
)
{
{
...
...
pcbnew/specctra.h
View file @
7cb34aec
...
@@ -52,14 +52,14 @@ class TYPE_COLLECTOR; // outside the DSN namespace
...
@@ -52,14 +52,14 @@ class TYPE_COLLECTOR; // outside the DSN namespace
Since there are so many classes in here, it may be helpful to generate
Since there are so many classes in here, it may be helpful to generate
the Doxygen directory:
the Doxygen directory:
$ cd
<kicadSourceRoot>
$ cd
<kicadSourceRoot>
$ doxygen
$ doxygen
Then you can view the html documentation in the
<kicadSourceRoot>
/doxygen
Then you can view the html documentation in the
<kicadSourceRoot>
/doxygen
directory. The main class in this file is SPECCTRA_DB and its main
directory. The main class in this file is SPECCTRA_DB and its main
functions are LoadPCB(), LoadSESSION(), and ExportPCB().
functions are LoadPCB(), LoadSESSION(), and ExportPCB().
Wide use is made of boost::ptr_vector
<> and std::vector<>
template classes.
Wide use is made of boost::ptr_vector
<> and std::vector<>
template classes.
If the contained object is small, then std::vector tends to be used.
If the contained object is small, then std::vector tends to be used.
If the contained object is large, variable size, or would require writing
If the contained object is large, variable size, or would require writing
an assignment operator() or copy constructore, then boost::ptr_vector
an assignment operator() or copy constructore, then boost::ptr_vector
...
@@ -1472,6 +1472,7 @@ public:
...
@@ -1472,6 +1472,7 @@ public:
/**
/**
* Constructor CLASS_CLASS
* Constructor CLASS_CLASS
* @param aParent - Parent element of the object.
* @param aType May be either T_class_class or T_region_class_class
* @param aType May be either T_class_class or T_region_class_class
*/
*/
CLASS_CLASS
(
ELEM
*
aParent
,
DSN_T
aType
)
:
CLASS_CLASS
(
ELEM
*
aParent
,
DSN_T
aType
)
:
...
...
pcbnew/specctra_export.cpp
View file @
7cb34aec
...
@@ -192,6 +192,7 @@ static POINT mapPt( const wxPoint& pt )
...
@@ -192,6 +192,7 @@ static POINT mapPt( const wxPoint& pt )
* searches for a DRAWSEGMENT with an end point or start point of aPoint, and
* searches for a DRAWSEGMENT with an end point or start point of aPoint, and
* if found, removes it from the TYPE_COLLECTOR and returns it, else returns NULL.
* if found, removes it from the TYPE_COLLECTOR and returns it, else returns NULL.
* @param aPoint The starting or ending point to search for.
* @param aPoint The starting or ending point to search for.
* @param items The list to remove from.
* @return DRAWSEGMENT* - The first DRAWSEGMENT that has a start or end point matching
* @return DRAWSEGMENT* - The first DRAWSEGMENT that has a start or end point matching
* aPoint, otherwise NULL if none.
* aPoint, otherwise NULL if none.
*/
*/
...
...
pcbnew/specctra_import.cpp
View file @
7cb34aec
...
@@ -182,6 +182,7 @@ static int scale( double distance, UNIT_RES* aResolution )
...
@@ -182,6 +182,7 @@ static int scale( double distance, UNIT_RES* aResolution )
* translates a point from the Specctra Session format coordinate system
* translates a point from the Specctra Session format coordinate system
* to the Kicad coordinate system.
* to the Kicad coordinate system.
* @param aPoint The session point to translate
* @param aPoint The session point to translate
* @param aResolution - The amount to scale the point.
* @return wxPoint - The Kicad coordinate system point.
* @return wxPoint - The Kicad coordinate system point.
*/
*/
static
wxPoint
mapPt
(
const
POINT
&
aPoint
,
UNIT_RES
*
aResolution
)
static
wxPoint
mapPt
(
const
POINT
&
aPoint
,
UNIT_RES
*
aResolution
)
...
...
pcbnew/zone_filling_algorithm.cpp
View file @
7cb34aec
...
@@ -84,19 +84,15 @@ static bool SortByXValues( const int& a, const int &b)
...
@@ -84,19 +84,15 @@ static bool SortByXValues( const int& a, const int &b)
return
a
<
b
;
return
a
<
b
;
}
}
/***********************************************************************************/
int
ZONE_CONTAINER
::
Fill_Zone_Areas_With_Segments
(
)
/***********************************************************************************/
/**
/**
* Function Fill_Zone_Areas_With_Segments
* Function Fill_Zone_Areas_With_Segments
*
Fill sub areas in a zone with segments with m_ZoneMinThickness width
* Fill sub areas in a zone with segments with m_ZoneMinThickness width
* A scan is made line per line, on the whole filled areas, with a step of m_ZoneMinThickness.
* A scan is made line per line, on the whole filled areas, with a step of m_ZoneMinThickness.
* all intersecting points with the horizontal infinite line and polygons to fill are calculated
* all intersecting points with the horizontal infinite line and polygons to fill are calculated
* a list of SEGZONE items is built, line per line
* a list of SEGZONE items is built, line per line
* @param aFrame = reference to the main frame
* @return number of segments created
* @return number of segments created
*/
*/
int
ZONE_CONTAINER
::
Fill_Zone_Areas_With_Segments
()
{
{
int
ics
,
ice
;
int
ics
,
ice
;
int
count
=
0
;
int
count
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment