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
0415674d
Commit
0415674d
authored
Nov 27, 2007
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MARKER and DRC rework, continued
parent
aef4b6e8
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
392 additions
and
219 deletions
+392
-219
change_log.txt
change_log.txt
+20
-0
delete.cpp
eeschema/delete.cpp
+1
-1
base_struct.h
include/base_struct.h
+13
-6
pcbstruct.h
include/pcbstruct.h
+40
-1
class_board.cpp
pcbnew/class_board.cpp
+70
-8
class_board_item.cpp
pcbnew/class_board_item.cpp
+3
-3
class_marker.cpp
pcbnew/class_marker.cpp
+12
-26
class_marker.h
pcbnew/class_marker.h
+22
-4
collectors.cpp
pcbnew/collectors.cpp
+3
-3
dialog_drc.cpp
pcbnew/dialog_drc.cpp
+10
-21
dialog_drc.h
pcbnew/dialog_drc.h
+6
-4
drc.cpp
pcbnew/drc.cpp
+20
-38
drc_stuff.h
pcbnew/drc_stuff.h
+144
-55
edit.cpp
pcbnew/edit.cpp
+4
-6
files.cpp
pcbnew/files.cpp
+1
-1
find.cpp
pcbnew/find.cpp
+7
-18
gendrill.cpp
pcbnew/gendrill.cpp
+1
-1
initpcb.cpp
pcbnew/initpcb.cpp
+2
-10
lay2plot.cpp
pcbnew/lay2plot.cpp
+1
-1
modedit_onclick.cpp
pcbnew/modedit_onclick.cpp
+1
-1
onrightclick.cpp
pcbnew/onrightclick.cpp
+1
-1
plot_rtn.cpp
pcbnew/plot_rtn.cpp
+1
-1
plotgerb.cpp
pcbnew/plotgerb.cpp
+1
-1
plothpgl.cpp
pcbnew/plothpgl.cpp
+1
-1
plotps.cpp
pcbnew/plotps.cpp
+1
-1
tracepcb.cpp
pcbnew/tracepcb.cpp
+6
-6
No files found.
change_log.txt
View file @
0415674d
...
...
@@ -4,6 +4,26 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
email address.
2007-Nov-26 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
+pcbnew
* changed class MARQUEUR to class MARKER name only.
* Moved BOARD's MARKERs from m_Drawings to vector<MARKER*> m_markers so
they can be easily deleted and navigated to from the drc dialog.
* deprecated the MARKER::Unlink() function.
* Added
BOARD::Add( BOARD_ITEM*, int )
BOARD::GetMARKER(int)
BOARD::Delete( BOARD_ITEM* )
BOARD::DeleteMARKERs();
* Changed BOARD::~BOARD() to use DeleteMARKERs().
* Revised screen drawing routine to know about BOARD::m_markers.
* Revised BOARD::Visit() to know about BOARD::m_markers.
* Revised pcbnew/find.cpp to know about BOARD::m_markers.
* removed wxYield() from drc.cpp
2007-Nov-26 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
+pcbnew
...
...
eeschema/delete.cpp
View file @
0415674d
...
...
@@ -254,7 +254,7 @@ bool LocateAndDeleteItem(WinEDA_SchematicFrame * frame, wxDC * DC)
/*****************************************************************/
/* Locate and delete the item found under the mouse cousor
If more than one item found: the priority order is:
1 : MAR
QUEU
R
1 : MAR
KE
R
2 : JUNCTION
2 : NOCONNECT
3 : WIRE ou BUS
...
...
include/base_struct.h
View file @
0415674d
...
...
@@ -35,7 +35,7 @@ enum KICAD_T {
TYPETRACK
,
TYPEZONE
,
TYPEVIA
,
TYPEMAR
QUEU
R
,
TYPEMAR
KE
R
,
TYPECOTATION
,
TYPEMIRE
,
TYPESCREEN
,
...
...
@@ -178,7 +178,7 @@ private:
public
:
EDA_BaseStruct
(
EDA_BaseStruct
*
parent
,
KICAD_T
idType
);
EDA_BaseStruct
(
KICAD_T
struct_t
ype
);
EDA_BaseStruct
(
KICAD_T
idT
ype
);
virtual
~
EDA_BaseStruct
()
{
};
/**
...
...
@@ -219,10 +219,6 @@ public:
m_Status
=
new_status
;
}
/* addition d'une nouvelle struct a la liste chain� */
void
AddToChain
(
EDA_BaseStruct
*
laststruct
);
/* fonction de placement */
virtual
void
Place
(
WinEDA_DrawFrame
*
frame
,
wxDC
*
DC
);
...
...
@@ -316,6 +312,16 @@ public:
void
DeleteStructList
();
/**
* Function AddToChain
* adds this item just after laststruct in a linked list established
* by the Prev and Back pointers of my base EDA_BaseStruct.
* @deprecated
* @param laststruct The item to add after
*/
void
AddToChain
(
EDA_BaseStruct
*
laststruct
);
#if defined (DEBUG)
/**
...
...
@@ -450,6 +456,7 @@ public:
BOARD_ITEM
*
Back
()
const
{
return
(
BOARD_ITEM
*
)
Pback
;
}
BOARD_ITEM
*
GetParent
()
const
{
return
(
BOARD_ITEM
*
)
m_Parent
;
}
/**
* Function GetLayer
* returns the layer this item is on.
...
...
include/pcbstruct.h
View file @
0415674d
...
...
@@ -133,7 +133,7 @@ enum Track_Shapes {
/* Forward declaration */
class
MODULE
;
class
EQUIPOT
;
class
MAR
QUEU
R
;
class
MAR
KE
R
;
class
TRACK
;
class
D_PAD
;
struct
CHEVELU
;
...
...
@@ -198,6 +198,10 @@ enum DisplayViaMode {
class
BOARD
:
public
BOARD_ITEM
{
friend
class
WinEDA_PcbFrame
;
private
:
std
::
vector
<
MARKER
*>
m_markers
;
///< MARKERs which we own by pointer
public
:
WinEDA_BasePcbFrame
*
m_PcbFrame
;
// Window de visualisation
EDA_Rect
m_BoundaryBox
;
// Limites d'encadrement du PCB
...
...
@@ -232,6 +236,41 @@ public:
/* supprime du chainage la structure Struct */
void
UnLink
();
/**
* Function Add
* adds the given item to this BOARD and takes ownership of its memory.
* @param aBoardItem The item to add to this board.
* @param aControl An int which can vary how the item is added.
*/
void
Add
(
BOARD_ITEM
*
aBoardItem
,
int
aControl
=
0
);
/**
* Function Delete
* deletes the given single item from this BOARD and deletes its memory. If you
* need the object after deletion, first copy it.
* @param aBoardItem The item to remove from this board and delete
*/
void
Delete
(
BOARD_ITEM
*
aBoardItem
);
/**
* Function DeleteMARKERs
* deletes ALL MARKERS from the board.
*/
void
DeleteMARKERs
();
/**
* Function GetMARKER
* returns the MARKER at a given index.
* @param index The array type index into a collection of MARKERS.
* @return MARKER* - a pointer to the MARKER or NULL if index out of range.
*/
MARKER
*
GetMARKER
(
int
index
)
const
{
if
(
(
unsigned
)
index
<
m_markers
.
size
()
)
return
m_markers
[
index
];
return
NULL
;
}
/* Routines de calcul des nombres de segments pistes et zones */
int
GetNumSegmTrack
();
int
GetNumSegmZone
();
...
...
pcbnew/class_board.cpp
View file @
0415674d
...
...
@@ -74,6 +74,8 @@ BOARD::~BOARD()
MyFree
(
m_LocalRatsnest
);
m_LocalRatsnest
=
0
;
DeleteMARKERs
();
}
...
...
@@ -100,13 +102,65 @@ void BOARD::UnLink()
}
void
BOARD
::
Add
(
BOARD_ITEM
*
aBoardItem
,
int
aControl
)
{
switch
(
aBoardItem
->
Type
()
)
{
// this one uses a vector
case
TYPEMARKER
:
m_markers
.
push_back
(
(
MARKER
*
)
aBoardItem
);
break
;
// other types may use linked list
default
:
wxFAIL_MSG
(
wxT
(
"BOARD::Add() needs work"
)
);
}
}
void
BOARD
::
Delete
(
BOARD_ITEM
*
aBoardItem
)
{
switch
(
aBoardItem
->
Type
()
)
{
// this one uses a vector
case
TYPEMARKER
:
// find the item in the vector, then delete then erase it.
for
(
unsigned
i
=
0
;
i
<
m_markers
.
size
();
++
i
)
{
if
(
m_markers
[
i
]
==
(
MARKER
*
)
aBoardItem
)
{
delete
m_markers
[
i
];
m_markers
.
erase
(
m_markers
.
begin
()
+
i
);
break
;
}
}
break
;
// other types may use linked list
default
:
wxFAIL_MSG
(
wxT
(
"BOARD::Delete() needs work"
)
);
}
}
void
BOARD
::
DeleteMARKERs
()
{
// the vector does not know how to delete the MARKER, it holds pointers
for
(
unsigned
i
=
0
;
i
<
m_markers
.
size
();
++
i
)
delete
m_markers
[
i
];
m_markers
.
clear
();
}
/* Routines de calcul des nombres de segments pistes et zones */
int
BOARD
::
GetNumSegmTrack
()
{
TRACK
*
CurTrack
=
m_Track
;
int
ii
=
0
;
for
(
;
CurTrack
!=
NULL
;
CurTrack
=
(
TRACK
*
)
CurTrack
->
Pnext
)
for
(
;
CurTrack
!=
NULL
;
CurTrack
=
CurTrack
->
Next
()
)
ii
++
;
m_NbSegmTrack
=
ii
;
...
...
@@ -119,7 +173,7 @@ int BOARD::GetNumSegmZone()
TRACK
*
CurTrack
=
m_Zone
;
int
ii
=
0
;
for
(
;
CurTrack
!=
NULL
;
CurTrack
=
(
TRACK
*
)
CurTrack
->
Pnext
)
for
(
;
CurTrack
!=
NULL
;
CurTrack
=
CurTrack
->
Next
()
)
ii
++
;
m_NbSegmZone
=
ii
;
...
...
@@ -385,7 +439,6 @@ SEARCH_RESULT BOARD::Visit( INSPECTOR* inspector, const void* testData,
case
TYPEDRAWSEGMENT
:
case
TYPETEXTE
:
case
TYPEMARQUEUR
:
case
TYPECOTATION
:
case
TYPEMIRE
:
result
=
IterateForward
(
m_Drawings
,
inspector
,
testData
,
p
);
...
...
@@ -396,7 +449,6 @@ SEARCH_RESULT BOARD::Visit( INSPECTOR* inspector, const void* testData,
{
case
TYPEDRAWSEGMENT
:
case
TYPETEXTE
:
case
TYPEMARQUEUR
:
case
TYPECOTATION
:
case
TYPEMIRE
:
continue
;
...
...
@@ -447,7 +499,18 @@ SEARCH_RESULT BOARD::Visit( INSPECTOR* inspector, const void* testData,
++
p
;
break
;
#endif
case
TYPEMARKER
:
// MARKERS are in the m_markers std::vector
for
(
unsigned
i
=
0
;
i
<
m_markers
.
size
();
++
i
)
{
result
=
m_markers
[
i
]
->
Visit
(
inspector
,
testData
,
p
);
if
(
result
==
SEARCH_QUIT
)
break
;
}
++
p
;
break
;
case
PCB_EQUIPOT_STRUCT_TYPE
:
result
=
IterateForward
(
m_Equipots
,
inspector
,
testData
,
p
);
++
p
;
...
...
@@ -604,9 +667,6 @@ bool BOARD::Save( FILE* aFile ) const
goto
out
;
break
;
case
TYPEMARQUEUR
:
// do not save MARKERs, they can be regenerated easily
break
;
default
:
// future: throw exception here
#if defined(DEBUG)
...
...
@@ -615,6 +675,8 @@ bool BOARD::Save( FILE* aFile ) const
break
;
}
}
// do not save MARKERs, they can be regenerated easily
// save the tracks & vias
fprintf
(
aFile
,
"$TRACK
\n
"
);
...
...
pcbnew/class_board_item.cpp
View file @
0415674d
...
...
@@ -194,8 +194,8 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
}
break
;
case
TYPEMAR
QUEU
R
:
text
<<
_
(
"Marker"
)
<<
wxT
(
" @("
)
<<
((
MAR
QUEUR
*
)
item
)
->
m_Pos
.
x
<<
wxT
(
","
)
<<
((
MARQUEU
R
*
)
item
)
->
m_Pos
.
y
<<
wxT
(
")"
);
case
TYPEMAR
KE
R
:
text
<<
_
(
"Marker"
)
<<
wxT
(
" @("
)
<<
((
MAR
KER
*
)
item
)
->
m_Pos
.
x
<<
wxT
(
","
)
<<
((
MARKE
R
*
)
item
)
->
m_Pos
.
y
<<
wxT
(
")"
);
break
;
case
TYPECOTATION
:
...
...
@@ -275,7 +275,7 @@ const char** BOARD_ITEM::MenuIcon() const
xpm
=
pad_sketch_xpm
;
break
;
case
TYPEMAR
QUEU
R
:
case
TYPEMAR
KE
R
:
xpm
=
pad_xpm
;
// @todo: create and use marker xpm
break
;
...
...
pcbnew/class_marker.cpp
View file @
0415674d
...
...
@@ -35,11 +35,11 @@ static char Default_MarkerBitmap[] =
/*******************/
/* Classe MAR
QUEU
R */
/* Classe MAR
KE
R */
/*******************/
MAR
QUEUR
::
MARQUEU
R
(
BOARD_ITEM
*
StructFather
)
:
BOARD_ITEM
(
StructFather
,
TYPEMAR
QUEU
R
)
MAR
KER
::
MARKE
R
(
BOARD_ITEM
*
StructFather
)
:
BOARD_ITEM
(
StructFather
,
TYPEMAR
KE
R
)
{
m_Bitmap
=
NULL
;
m_Type
=
0
;
...
...
@@ -51,38 +51,24 @@ MARQUEUR::MARQUEUR( BOARD_ITEM* StructFather ) :
/* Effacement memoire de la structure */
MAR
QUEUR
::
~
MARQUEU
R
()
MAR
KER
::~
MARKE
R
()
{
#if defined(DEBUG)
printf
(
"MARKER %p deleted
\n
"
,
this
);
#endif
}
/* supprime du chainage la structure Struct
* les structures arrieres et avant sont chainees directement
*/
void
MAR
QUEU
R
::
UnLink
()
void
MAR
KE
R
::
UnLink
()
{
/* Modification du chainage arriere */
if
(
Pback
)
{
if
(
Pback
->
Type
()
!=
TYPEPCB
)
{
Pback
->
Pnext
=
Pnext
;
}
else
/* Le chainage arriere pointe sur la structure "Pere" */
{
(
(
BOARD
*
)
Pback
)
->
m_Drawings
=
(
BOARD_ITEM
*
)
Pnext
;
}
}
/* Modification du chainage avant */
if
(
Pnext
)
Pnext
->
Pback
=
Pback
;
Pnext
=
Pback
=
NULL
;
wxFAIL_MSG
(
wxT
(
"MARKER::UnLink is deprecated"
)
);
}
void
MAR
QUEU
R
::
Display_Infos
(
WinEDA_DrawFrame
*
frame
)
void
MAR
KE
R
::
Display_Infos
(
WinEDA_DrawFrame
*
frame
)
{
int
text_pos
;
...
...
@@ -97,7 +83,7 @@ void MARQUEUR::Display_Infos( WinEDA_DrawFrame* frame )
/**********************************************/
bool
MAR
QUEU
R
::
HitTest
(
const
wxPoint
&
refPos
)
bool
MAR
KE
R
::
HitTest
(
const
wxPoint
&
refPos
)
/**********************************************/
{
// the MARKER is 12 pixels by 12 pixels, but is not resized with zoom, so
...
...
@@ -125,7 +111,7 @@ bool MARQUEUR::HitTest( const wxPoint& refPos )
/**********************************************************************/
void
MAR
QUEU
R
::
Draw
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
int
DrawMode
)
void
MAR
KE
R
::
Draw
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
int
DrawMode
)
/**********************************************************************/
/*
...
...
pcbnew/class_marker.h
View file @
0415674d
...
...
@@ -8,21 +8,39 @@
#include "base_struct.h"
class
MAR
QUEU
R
:
public
BOARD_ITEM
class
MAR
KE
R
:
public
BOARD_ITEM
{
private
:
wxString
m_Diag
;
/* Associated text (comment) */
public
:
wxPoint
m_Pos
;
char
*
m_Bitmap
;
/* Shape (bitmap) */
int
m_Type
;
int
m_Color
;
/* color */
wxString
m_Diag
;
/* Associated text (comment) */
wxSize
m_Size
;
/* Size of the graphic symbol */
public
:
MARQUEUR
(
BOARD_ITEM
*
StructFather
);
~
MARQUEUR
();
MARKER
(
BOARD_ITEM
*
StructFather
);
~
MARKER
();
void
UnLink
();
void
Draw
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
int
DrawMode
);
/**
* Function GetMessage
* @return const wxString& - the diagnostic message
*/
const
wxString
&
GetMessage
()
{
return
m_Diag
;
}
void
SetMessage
(
const
wxString
&
aMsg
)
{
m_Diag
=
aMsg
;
}
/**
* Function Display_Infos
...
...
pcbnew/collectors.cpp
View file @
0415674d
...
...
@@ -38,7 +38,7 @@ const KICAD_T GENERAL_COLLECTOR::AllBoardItems[] = {
// all items in m_Drawings for instance should be contiguous.
TYPETEXTE
,
TYPEDRAWSEGMENT
,
TYPEMAR
QUEU
R
,
TYPEMAR
KE
R
,
TYPECOTATION
,
TYPEMIRE
,
TYPEVIA
,
...
...
@@ -55,7 +55,7 @@ const KICAD_T GENERAL_COLLECTOR::AllBoardItems[] = {
const KICAD_T GENERAL_COLLECTOR::PrimaryItems[] = {
TYPETEXTE,
TYPEDRAWSEGMENT,
TYPEMAR
QUEU
R,
TYPEMAR
KE
R,
TYPECOTATION,
TYPEVIA,
TYPETRACK,
...
...
@@ -68,7 +68,7 @@ const KICAD_T GENERAL_COLLECTOR::PrimaryItems[] = {
const
KICAD_T
GENERAL_COLLECTOR
::
AllButZones
[]
=
{
TYPETEXTE
,
TYPEDRAWSEGMENT
,
TYPEMAR
QUEU
R
,
TYPEMAR
KE
R
,
TYPECOTATION
,
TYPEMIRE
,
TYPEVIA
,
...
...
pcbnew/dialog_drc.cpp
View file @
0415674d
...
...
@@ -39,19 +39,14 @@
////@end XPM images
DRC_LIST
gList
;
// gets moved into DRC_TESTER later.
/**
* Class DRCLISTBOX
* is used to display a DRC_LIST, which contains DRC_ITEMs.
* is used to display a DRC_LIST, which contains DRC_ITEM
_OWNER
s.
*/
class
DRCLISTBOX
:
public
wxHtmlListBox
{
private
:
DRC_LIST
*
m_List
;
///< wx
Widgets
does not own the list items, we do
DRC_LIST
*
m_List
;
///< wx
HtmlListBox
does not own the list items, we do
public
:
DRCLISTBOX
(
wxWindow
*
parent
,
wxWindowID
id
=
wxID_ANY
,
...
...
@@ -86,7 +81,7 @@ public:
wxString
OnGetItem
(
size_t
n
)
const
{
if
(
m_List
)
return
(
*
m_List
)[
n
]
.
ShowHtml
();
return
(
*
m_List
)[
n
]
->
ShowHtml
();
else
return
wxString
();
}
...
...
@@ -101,7 +96,7 @@ public:
wxString
OnGetItemMarkup
(
size_t
n
)
const
{
if
(
m_List
)
return
(
*
m_List
)[
n
]
.
ShowHtml
();
return
(
*
m_List
)[
n
]
->
ShowHtml
();
else
return
wxString
();
}
...
...
@@ -173,13 +168,15 @@ WinEDA_DrcFrame::WinEDA_DrcFrame( )
{
}
WinEDA_DrcFrame
::
WinEDA_DrcFrame
(
WinEDA_PcbFrame
*
parent
,
wxDC
*
panelDC
,
WinEDA_DrcFrame
::
WinEDA_DrcFrame
(
DRC_TESTER
*
aDrc_tester
,
WinEDA_PcbFrame
*
parent
,
wxDC
*
panelDC
,
wxWindowID
id
,
const
wxString
&
caption
,
const
wxPoint
&
pos
,
const
wxSize
&
size
,
long
style
)
{
m_Tester
=
aDrc_tester
;
m_Parent
=
parent
;
m_DC
=
panelDC
;
AbortDrc
=
FALSE
;
...
...
@@ -227,16 +224,8 @@ bool WinEDA_DrcFrame::Create( wxWindow* parent, wxWindowID id, const wxString& c
////@end WinEDA_DrcFrame creation
DRC_ITEM
a
(
2
,
wxString
(
wxT
(
"A item"
)
),
wxString
(
wxT
(
"B item"
)
),
wxPoint
(
12000
,
3000
),
wxPoint
(
13000
,
3000
));
gList
.
push_back
(
a
);
gList
.
push_back
(
a
);
gList
.
push_back
(
a
);
gList
.
push_back
(
a
);
m_ClearanceListBox
->
SetList
(
&
gList
);
m_UnconnectedListBox
->
SetList
(
&
gList
);
// m_ClearanceListBox->SetList( &gList );
// m_UnconnectedListBox->SetList( &gList );
return
true
;
}
...
...
@@ -250,7 +239,7 @@ void WinEDA_DrcFrame::CreateControls()
SetFont
(
*
g_DialogFont
);
////@begin WinEDA_DrcFrame content construction
// Generated by DialogBlocks,
Mon 26 Nov 2007 19:22:5
6 CST (unregistered)
// Generated by DialogBlocks,
Tue 27 Nov 2007 00:10:1
6 CST (unregistered)
WinEDA_DrcFrame
*
itemDialog1
=
this
;
...
...
pcbnew/dialog_drc.h
View file @
0415674d
...
...
@@ -88,7 +88,7 @@ class WinEDA_DrcFrame: public wxDialog
public
:
/// Constructors
WinEDA_DrcFrame
(
);
WinEDA_DrcFrame
(
WinEDA_PcbFrame
*
parent
,
wxDC
*
panelDC
,
WinEDA_DrcFrame
(
DRC_TESTER
*
aDrc_tester
,
WinEDA_PcbFrame
*
parent
,
wxDC
*
panelDC
,
wxWindowID
id
=
SYMBOL_WINEDA_DRCFRAME_IDNAME
,
const
wxString
&
caption
=
SYMBOL_WINEDA_DRCFRAME_TITLE
,
const
wxPoint
&
pos
=
SYMBOL_WINEDA_DRCFRAME_POSITION
,
...
...
@@ -177,9 +177,11 @@ public:
wxStdDialogButtonSizer
*
StdDialogButtonSizer
;
////@end WinEDA_DrcFrame member variables
WinEDA_PcbFrame
*
m_Parent
;
wxDC
*
m_DC
;
int
m_UnconnectedCount
;
DRC_TESTER
*
m_Tester
;
WinEDA_PcbFrame
*
m_Parent
;
wxDC
*
m_DC
;
int
m_UnconnectedCount
;
};
#endif // _DIALOG_DRC_H_
...
...
pcbnew/drc.cpp
View file @
0415674d
...
...
@@ -21,6 +21,10 @@ class WinEDA_DrcFrame;
WinEDA_DrcFrame
*
DrcFrame
;
//#define WXYIELD() wxYield()
#define WXYIELD() do { } while(0) // nothing
/* saving drc options */
static
bool
s_Pad2PadTestOpt
=
true
;
static
bool
s_UnconnectedTestOpt
=
true
;
...
...
@@ -30,7 +34,7 @@ static FILE* s_RptFile = NULL;
static
wxString
s_RptFilename
;
static
int
ErrorsDRC_Count
;
static
MAR
QUEU
R
*
current_marqueur
;
/* Pour gestion des marqueurs sur pcb */
static
MAR
KE
R
*
current_marqueur
;
/* Pour gestion des marqueurs sur pcb */
static
bool
AbortDrc
,
DrcInProgress
=
FALSE
;
static
int
spot_cX
,
spot_cY
;
/* position d'elements a tester */
...
...
@@ -261,7 +265,7 @@ void WinEDA_PcbFrame::Install_Test_DRC_Frame( wxDC* DC )
*/
{
AbortDrc
=
FALSE
;
DrcFrame
=
new
WinEDA_DrcFrame
(
this
,
DC
);
DrcFrame
=
new
WinEDA_DrcFrame
(
NULL
,
this
,
DC
);
// @todo
DrcFrame
->
ShowModal
();
DrcFrame
->
Destroy
();
DrcFrame
=
NULL
;
...
...
@@ -281,8 +285,7 @@ int WinEDA_PcbFrame::Test_DRC( wxDC* DC, bool TestPad2Pad, bool TestZone )
int
flag_err_Drc
;
TRACK
*
pt_segm
;
D_PAD
*
pad
;
MARQUEUR
*
Marqueur
;
EDA_BaseStruct
*
PtStruct
;
MARKER
*
Marqueur
;
wxString
Line
;
#define PRINT_NB_PAD_POS 42
...
...
@@ -344,13 +347,8 @@ int WinEDA_PcbFrame::Test_DRC( wxDC* DC, bool TestPad2Pad, bool TestZone )
}
Line
.
Printf
(
wxT
(
"%d"
),
ErrorsDRC_Count
);
Affiche_1_Parametre
(
this
,
PRINT_PAD_ERR_POS
,
wxEmptyString
,
Line
,
LIGHTRED
);
Marqueur
->
Pnext
=
m_Pcb
->
m_Drawings
;
Marqueur
->
Pback
=
m_Pcb
;
PtStruct
=
m_Pcb
->
m_Drawings
;
if
(
PtStruct
)
PtStruct
->
Pback
=
Marqueur
;
m_Pcb
->
m_Drawings
=
Marqueur
;
m_Pcb
->
Add
(
Marqueur
);
}
}
...
...
@@ -375,7 +373,7 @@ int WinEDA_PcbFrame::Test_DRC( wxDC* DC, bool TestPad2Pad, bool TestZone )
if
(
jj
==
0
)
{
jj
=
10
;
wxYield
();
WXYIELD
();
if
(
AbortDrc
)
{
AbortDrc
=
FALSE
;
break
;
...
...
@@ -409,13 +407,8 @@ int WinEDA_PcbFrame::Test_DRC( wxDC* DC, bool TestPad2Pad, bool TestZone )
DisplayError
(
this
,
wxT
(
"Test_Drc(): internal err"
)
);
return
ErrorsDRC_Count
;
}
Marqueur
->
Pnext
=
m_Pcb
->
m_Drawings
;
Marqueur
->
Pback
=
m_Pcb
;
PtStruct
=
m_Pcb
->
m_Drawings
;
if
(
PtStruct
)
PtStruct
->
Pback
=
Marqueur
;
m_Pcb
->
m_Drawings
=
Marqueur
;
m_Pcb
->
Add
(
Marqueur
);
GRSetDrawMode
(
DC
,
GR_OR
);
pt_segm
->
Draw
(
DrawPanel
,
DC
,
RED
^
LIGHTRED
);
...
...
@@ -449,7 +442,7 @@ int WinEDA_PcbFrame::Test_DRC( wxDC* DC, bool TestPad2Pad, bool TestZone )
if
(
jj
==
0
)
{
jj
=
100
;
wxYield
();
WXYIELD
();
if
(
AbortDrc
)
{
AbortDrc
=
FALSE
;
...
...
@@ -487,13 +480,8 @@ int WinEDA_PcbFrame::Test_DRC( wxDC* DC, bool TestPad2Pad, bool TestZone )
DisplayError
(
this
,
wxT
(
"Test_Drc(): internal err"
)
);
return
ErrorsDRC_Count
;
}
Marqueur
->
Pnext
=
m_Pcb
->
m_Drawings
;
Marqueur
->
Pback
=
m_Pcb
;
PtStruct
=
m_Pcb
->
m_Drawings
;
if
(
PtStruct
)
PtStruct
->
Pback
=
Marqueur
;
m_Pcb
->
m_Drawings
=
Marqueur
;
m_Pcb
->
Add
(
Marqueur
);
GRSetDrawMode
(
DC
,
GR_OR
);
pt_segm
->
Draw
(
DrawPanel
,
DC
,
RED
^
LIGHTRED
);
...
...
@@ -517,14 +505,8 @@ int WinEDA_PcbFrame::Test_DRC( wxDC* DC, bool TestPad2Pad, bool TestZone )
DisplayError
(
this
,
wxT
(
"Test_Drc(): internal err"
)
);
return
ErrorsDRC_Count
;
}
Marqueur
->
Pnext
=
m_Pcb
->
m_Drawings
;
Marqueur
->
Pback
=
m_Pcb
;
PtStruct
=
m_Pcb
->
m_Drawings
;
if
(
PtStruct
)
PtStruct
->
Pback
=
Marqueur
;
m_Pcb
->
m_Drawings
=
Marqueur
;
m_Pcb
->
Add
(
Marqueur
);
GRSetDrawMode
(
DC
,
GR_OR
);
pt_segm
->
Draw
(
DrawPanel
,
DC
,
RED
^
LIGHTRED
);
...
...
@@ -1469,11 +1451,11 @@ static void Affiche_Erreur_DRC( WinEDA_DrawPanel* panel, wxDC* DC, BOARD* Pcb,
fprintf
(
s_RptFile
,
"%s"
,
CONV_TO_UTF8
(
msg
)
);
if
(
current_marqueur
==
NULL
)
current_marqueur
=
new
MAR
QUEU
R
(
Pcb
);
current_marqueur
=
new
MAR
KE
R
(
Pcb
);
current_marqueur
->
m_Pos
=
wxPoint
(
erc_pos
.
x
,
erc_pos
.
y
);
current_marqueur
->
m_Color
=
WHITE
;
current_marqueur
->
m_Diag
=
msg
;
current_marqueur
->
SetMessage
(
msg
)
;
current_marqueur
->
Draw
(
panel
,
DC
,
GR_OR
);
}
...
...
@@ -1527,11 +1509,11 @@ static void Affiche_Erreur_DRC( WinEDA_DrawPanel* panel, wxDC* DC, BOARD* Pcb,
fprintf
(
s_RptFile
,
"%s"
,
CONV_TO_UTF8
(
msg
)
);
if
(
current_marqueur
==
NULL
)
current_marqueur
=
new
MAR
QUEU
R
(
Pcb
);
current_marqueur
=
new
MAR
KE
R
(
Pcb
);
current_marqueur
->
m_Pos
=
pad1
->
m_Pos
;
current_marqueur
->
m_Color
=
WHITE
;
current_marqueur
->
m_Diag
=
msg
;
current_marqueur
->
SetMessage
(
msg
)
;
current_marqueur
->
Draw
(
panel
,
DC
,
GR_OR
);
}
...
...
pcbnew/drc_stuff.h
View file @
0415674d
...
...
@@ -34,20 +34,58 @@
/**
* Class REPORT_ISSUE
* is an abstract interface used by DRCLISTBOX. It has functions to return
* either html text or disk file report text on this item. It also can
* return the drawing coordinate of the report item.
*/
class
REPORT_ISSUE
{
public
:
/**
* Function ShowHtml
* translates this object into a fragment of HTML suitable for the
* wxWidget's wxHtmlListBox class.
* @return wxString - the html text.
*/
virtual
wxString
ShowHtml
()
const
=
0
;
/**
* Function ShowText
* translates this object into a text string suitable for saving
* to disk in a report.
* @return wxString - the simple non-html text.
*/
virtual
wxString
ShowText
()
const
=
0
;
/**
* Function GetPosition
* @return const wxPoint& - the position of this report item within
* the drawing.
*/
virtual
const
wxPoint
&
GetPosition
()
const
=
0
;
};
/**
* Class DRC_ITEM
* is a holder for a DRC error item. It is generated when two objects are
* too close. There are holders for information on two items. The
* information held is the board coordinate and the MenuText for each item.
* Also held is the type of error by number and the location of the MAR
QUEU
R.
* Also held is the type of error by number and the location of the MAR
KE
R.
* A function is provided to translate that number into text.
*/
class
DRC_ITEM
class
DRC_ITEM
:
public
REPORT_ISSUE
{
protected
:
int
m_ErrorCode
;
///< the error code's numeric value
wxPoint
m_
MarkerPos
;
///< position of the MARKER
wxPoint
m_
Pos
;
///< position of the issue
wxString
m_AText
;
///< text for the first BOARD_ITEM
wxString
m_BText
;
///< text for the second BOARD_ITEM
wxPoint
m_APos
;
///< the location of the first BOARD_ITEM
...
...
@@ -56,16 +94,19 @@ protected:
public
:
DRC_ITEM
(
int
aErrorCode
,
const
wxString
&
aText
,
const
wxString
&
bText
,
const
wxPoint
&
aPos
,
const
wxPoint
&
bPos
)
DRC_ITEM
(
int
aErrorCode
,
const
wxPoint
&
aIssuePos
,
const
wxString
&
aText
,
const
wxString
&
bText
,
const
wxPoint
&
aPos
,
const
wxPoint
&
bPos
)
{
m_ErrorCode
=
aErrorCode
;
m_Pos
=
aIssuePos
;
m_AText
=
aText
;
m_BText
=
bText
;
m_APos
=
aPos
;
m_BPos
=
bPos
;
}
//-----<Interface REPORT_ISSUE>---------------------------------------
/**
* Function ShowHtml
...
...
@@ -77,7 +118,7 @@ public:
{
wxString
ret
;
ret
.
Printf
(
wxT
(
"<b>%s</b>
<ul><li> %s: %s </li> <li> %s: %s </li>
</ul>"
),
ret
.
Printf
(
wxT
(
"<b>%s</b>
<ul><li> %s: %s </li><li> %s: %s </li>
</ul>"
),
GetErrorText
().
GetData
(),
ShowCoord
(
m_APos
).
GetData
(),
m_AText
.
GetData
(),
ShowCoord
(
m_BPos
).
GetData
(),
m_BText
.
GetData
()
);
...
...
@@ -85,7 +126,6 @@ public:
return
ret
;
}
/**
* Function ShowText
* translates this object into a text string suitable for saving
...
...
@@ -104,7 +144,19 @@ public:
return
ret
;
}
/**
* Function GetPosition
* @return const wxPoint& - the position of this report item within
* the drawing.
*/
const
wxPoint
&
GetPosition
()
const
{
return
m_Pos
;
}
//-----</Interface REPORT_ISSUE>---------------------------------------
/**
* Function GetErrorText
* returns the string form of a drc error code.
...
...
@@ -119,15 +171,17 @@ public:
* @return wxString - The formated string
*/
static
wxString
ShowCoord
(
const
wxPoint
&
aPos
);
};
class
WinEDA_DrawPanel
;
class
MAR
QUEU
R
;
class
MAR
KE
R
;
typedef
std
::
vector
<
DRC_ITEM
>
DRC_LIST
;
/// A smart pointer to a DRC_ITEM
//typedef OWNER<DRC_ITEM> DRC_ITEM_OWNER;
/// A list of DRC_ITEM_PTRs
typedef
std
::
vector
<
DRC_ITEM
*>
DRC_LIST
;
/**
...
...
@@ -139,45 +193,83 @@ typedef std::vector<DRC_ITEM> DRC_LIST;
class
DRC_TESTER
{
protected
:
bool
doPad2PadTest
;
bool
doUnconnectedTest
;
bool
doZonesTest
;
bool
doCreateRptFile
;
FILE
*
rptFile
;
wxString
rptFilename
;
int
errorCount
;
MARQUEUR
*
currentMarker
;
bool
abortDrc
;
bool
drcInProgress
;
int
spot_cX
;
int
spot_cY
;
int
finx
;
int
finy
;
// coord relatives de l'extremite du segm de reference
int
segmAngle
;
// angle d'inclinaison du segment de reference en 0,1 degre
int
segmLong
;
// longueur du segment de reference
int
xcliplo
;
int
ycliplo
;
int
xcliphi
;
int
ycliphi
;
// coord de la surface de securite du segment a comparer
DRC_LIST
drcList
;
WinEDA_DrawPanel
*
drawPanel
;
bool
m_doPad2PadTest
;
bool
m_doUnconnectedTest
;
bool
m_doZonesTest
;
bool
m_doCreateRptFile
;
FILE
*
m_rptFile
;
wxString
m_rptFilename
;
int
m_errorCount
;
MARKER
*
m_currentMarker
;
bool
m_aboartDRC
;
bool
m_drcInProgress
;
int
m_spotcx
;
int
m_spotcy
;
int
m_finx
;
int
m_finy
;
// coord relatives de l'extremite du segm de reference
int
m_segmAngle
;
// angle d'inclinaison du segment de reference en 0,1 degre
int
m_segmLong
;
// longueur du segment de reference
int
m_xcliplo
;
int
m_ycliplo
;
int
m_xcliphi
;
int
m_ycliphi
;
// coord de la surface de securite du segment a comparer
int
m_unconnectedCount
;
DRC_LIST
*
m_drcList
;
WinEDA_DrawPanel
*
m_drawPanel
;
public
:
DRC_TESTER
()
{
doPad2PadTest
=
true
;
doUnconnectedTest
=
true
;
doZonesTest
=
false
;
doCreateRptFile
=
false
;
m_doPad2PadTest
=
true
;
m_doUnconnectedTest
=
true
;
m_doZonesTest
=
false
;
m_doCreateRptFile
=
false
;
m_rptFile
=
0
;
m_errorCount
=
0
;
m_currentMarker
=
0
;
m_aboartDRC
=
false
;
m_drcInProgress
=
false
;
m_spotcx
=
0
;
m_spotcy
=
0
;
m_finx
=
0
;
m_finy
=
0
;
// coord relatives de l'extremite du segm de reference
m_segmAngle
=
0
;
// angle d'inclinaison du segment de reference en 0,1 degre
m_segmLong
=
0
;
// longueur du segment de reference
m_xcliplo
=
0
;
m_ycliplo
=
0
;
m_xcliphi
=
0
;
m_ycliphi
=
0
;
// coord de la surface de securite du segment a comparer
m_unconnectedCount
=
0
;
m_drcList
=
new
DRC_LIST
();
m_drawPanel
=
0
;
for
(
int
i
=
0
;
i
<
12
;
++
i
)
{
DRC_ITEM
*
ditem
=
new
DRC_ITEM
(
2
,
wxPoint
(
12000
,
3000
),
wxString
(
wxT
(
"A item"
)
),
wxString
(
wxT
(
"B item"
)
),
wxPoint
(
12000
,
3000
),
wxPoint
(
13000
,
3000
));
m_drcList
->
push_back
(
ditem
);
}
}
...
...
@@ -192,19 +284,16 @@ public:
*/
void
SetTests
(
bool
aPad2PadTest
,
bool
aUnconnectedTest
,
bool
aZonesTest
,
const
wxString
&
aRptFilename
)
{
doPad2PadTest
=
aPad2PadTest
;
doUnconnectedTest
=
aUnconnectedTest
;
doZonesTest
=
aZonesTest
;
m_
doPad2PadTest
=
aPad2PadTest
;
m_
doUnconnectedTest
=
aUnconnectedTest
;
m_
doZonesTest
=
aZonesTest
;
rptFilename
=
aRptFilename
;
if
(
rptFilename
.
IsEmpty
()
)
doCreateRptFile
=
false
;
m_
rptFilename
=
aRptFilename
;
if
(
m_
rptFilename
.
IsEmpty
()
)
m_
doCreateRptFile
=
false
;
else
doCreateRptFile
=
true
;
m_
doCreateRptFile
=
true
;
}
};
...
...
pcbnew/edit.cpp
View file @
0415674d
...
...
@@ -962,15 +962,13 @@ void WinEDA_PcbFrame::RemoveStruct( BOARD_ITEM* Item, wxDC* DC )
Delete_Zone
(
DC
,
(
SEGZONE
*
)
Item
);
break
;
case
TYPEMAR
QUEU
R
:
case
TYPEMAR
KE
R
:
if
(
Item
==
GetCurItem
()
)
SetCurItem
(
NULL
);
(
(
MAR
QUEU
R
*
)
Item
)
->
Draw
(
DrawPanel
,
DC
,
GR_XOR
);
(
(
MAR
KE
R
*
)
Item
)
->
Draw
(
DrawPanel
,
DC
,
GR_XOR
);
/* unlikf item an free the memory
* (not put in undelete stack, because this seems unnecessary)
*/
Item
->
DeleteStructure
();
// delete the marker, and free memory. Don't use undelete stack.
m_Pcb
->
Delete
(
Item
);
break
;
case
TYPEPAD
:
...
...
pcbnew/files.cpp
View file @
0415674d
...
...
@@ -234,7 +234,7 @@ int WinEDA_PcbFrame::LoadOnePcbFile( const wxString& FullFileName, wxDC * DC, bo
g_SaveTime
=
time
(
NULL
);
#if
1
&& defined(DEBUG)
#if
0
&& defined(DEBUG)
// note this freezes up pcbnew when run under the kicad project
// manager. runs fine from command prompt. This is because the kicad
// project manager redirects stdout of the child pcbnew process to itself,
...
...
pcbnew/find.cpp
View file @
0415674d
...
...
@@ -48,7 +48,6 @@ void WinEDA_PcbFindFrame::FindItem( wxCommandEvent& event )
wxPoint
locate_pos
;
wxString
msg
;
bool
FindMarker
=
FALSE
;
int
StartCount
;
BOARD_ITEM
*
foundItem
=
0
;
switch
(
event
.
GetId
()
)
...
...
@@ -69,32 +68,22 @@ void WinEDA_PcbFindFrame::FindItem( wxCommandEvent& event )
s_OldStringFound
=
m_NewText
->
GetValue
();
m_Parent
->
DrawPanel
->
GetViewStart
(
&
screen
->
m_StartVisu
.
x
,
&
screen
->
m_StartVisu
.
y
);
StartCount
=
0
;
if
(
FindMarker
)
{
MAR
QUEUR
*
marker
=
(
MARQUEUR
*
)
m_Parent
->
m_Pcb
->
m_Drawings
;
for
(
;
marker
;
marker
=
(
MARQUEUR
*
)
marker
->
Next
()
)
MAR
KER
*
marker
=
m_Parent
->
m_Pcb
->
GetMARKER
(
s_MarkerCount
++
)
;
if
(
marker
)
{
if
(
marker
->
Type
()
!=
TYPEMARQUEUR
)
continue
;
StartCount
++
;
if
(
StartCount
>
s_MarkerCount
)
{
foundItem
=
marker
;
locate_pos
=
marker
->
m_Pos
;
s_MarkerCount
++
;
break
;
}
foundItem
=
marker
;
locate_pos
=
marker
->
m_Pos
;
}
}
else
{
for
(
MODULE
*
module
=
m_Parent
->
m_Pcb
->
m_Modules
;
module
;
module
=
(
MODULE
*
)
module
->
Next
()
)
int
StartCount
=
0
;
for
(
MODULE
*
module
=
m_Parent
->
m_Pcb
->
m_Modules
;
module
;
module
=
module
->
Next
()
)
{
if
(
WildCompareString
(
s_OldStringFound
,
module
->
GetReference
().
GetData
(),
FALSE
)
)
if
(
WildCompareString
(
s_OldStringFound
,
module
->
GetReference
().
GetData
(),
FALSE
)
)
{
StartCount
++
;
if
(
StartCount
>
s_ItemCount
)
...
...
pcbnew/gendrill.cpp
View file @
0415674d
...
...
@@ -1079,7 +1079,7 @@ void WinEDA_DrillFrame::GenDrillMap( int format )
PlotMirePcb
(
(
MIREPCB
*
)
PtStruct
,
format
,
EDGE_LAYER
);
break
;
case
TYPEMAR
QUEU
R
:
// do not draw
case
TYPEMAR
KE
R
:
// do not draw
break
;
default
:
...
...
pcbnew/initpcb.cpp
View file @
0415674d
...
...
@@ -349,15 +349,7 @@ void WinEDA_PcbFrame::Erase_Textes_Pcb( wxDC* DC, bool query )
void
WinEDA_PcbFrame
::
Erase_Marqueurs
()
/*******************************************/
{
BOARD_ITEM
*
PtStruct
,
*
PtNext
;
PtStruct
=
m_Pcb
->
m_Drawings
;
for
(
;
PtStruct
!=
NULL
;
PtStruct
=
PtNext
)
{
PtNext
=
PtStruct
->
Next
();
if
(
PtStruct
->
Type
()
==
TYPEMARQUEUR
)
PtStruct
->
DeleteStructure
();
}
m_Pcb
->
DeleteMARKERs
();
GetScreen
()
->
SetModify
();
}
pcbnew/lay2plot.cpp
View file @
0415674d
...
...
@@ -86,7 +86,7 @@ void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref, int printmaskl
(
(
MIREPCB
*
)
PtStruct
)
->
Draw
(
this
,
DC
,
wxPoint
(
0
,
0
),
drawmode
);
break
;
case
TYPEMAR
QUEU
R
:
/* Trace des marqueurs */
case
TYPEMAR
KE
R
:
/* Trace des marqueurs */
break
;
default
:
...
...
pcbnew/modedit_onclick.cpp
View file @
0415674d
...
...
@@ -334,7 +334,7 @@ bool WinEDA_ModuleEditFrame::OnRightClick( const wxPoint& MousePos,
case
TYPEVIA
:
case
TYPETRACK
:
case
TYPEZONE
:
case
TYPEMAR
QUEU
R
:
case
TYPEMAR
KE
R
:
case
TYPECOTATION
:
case
TYPEMIRE
:
break
;
...
...
pcbnew/onrightclick.cpp
View file @
0415674d
...
...
@@ -292,7 +292,7 @@ bool WinEDA_PcbFrame::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
_
(
"Delete Zone"
),
delete_xpm
);
break
;
case
TYPEMAR
QUEU
R
:
case
TYPEMAR
KE
R
:
ADD_MENUITEM
(
aPopMenu
,
ID_POPUP_PCB_DELETE_MARKER
,
_
(
"Delete Marker"
),
delete_xpm
);
break
;
...
...
pcbnew/plot_rtn.cpp
View file @
0415674d
...
...
@@ -67,7 +67,7 @@ wxString msg;
// EDGE_LAYER | masque_layer );
break
;
case
TYPEMAR
QUEU
R
:
case
TYPEMAR
KE
R
:
break
;
default
:
...
...
pcbnew/plotgerb.cpp
View file @
0415674d
...
...
@@ -183,7 +183,7 @@ wxString msg;
masque_layer
);
break
;
case
TYPEMAR
QUEU
R
:
case
TYPEMAR
KE
R
:
break
;
default
:
...
...
pcbnew/plothpgl.cpp
View file @
0415674d
...
...
@@ -235,7 +235,7 @@ void WinEDA_BasePcbFrame::Plot_Layer_HPGL( FILE* File, int masque_layer,
masque_layer
);
break
;
case
TYPEMAR
QUEU
R
:
case
TYPEMAR
KE
R
:
break
;
default
:
...
...
pcbnew/plotps.cpp
View file @
0415674d
...
...
@@ -273,7 +273,7 @@ void WinEDA_BasePcbFrame::Plot_Layer_PS( FILE* File, int masque_layer,
masque_layer
);
break
;
case
TYPEMAR
QUEU
R
:
case
TYPEMAR
KE
R
:
break
;
default
:
...
...
pcbnew/tracepcb.cpp
View file @
0415674d
...
...
@@ -101,7 +101,6 @@ void WinEDA_PcbFrame::Trace_Pcb( wxDC* DC, int mode )
/****************************************************/
/* Redraw the BOARD items but not cursors, axis or grid */
{
MARQUEUR
*
Marqueur
;
MODULE
*
Module
;
EDA_BaseStruct
*
PtStruct
;
...
...
@@ -158,11 +157,6 @@ void WinEDA_PcbFrame::Trace_Pcb( wxDC* DC, int mode )
(
(
MIREPCB
*
)
PtStruct
)
->
Draw
(
DrawPanel
,
DC
,
wxPoint
(
0
,
0
),
mode
);
break
;
case
TYPEMARQUEUR
:
/* Trace des marqueurs */
Marqueur
=
(
MARQUEUR
*
)
PtStruct
;
Marqueur
->
Draw
(
DrawPanel
,
DC
,
mode
);
break
;
case
TYPEDRAWSEGMENT
:
Trace_DrawSegmentPcb
(
DrawPanel
,
DC
,
(
DRAWSEGMENT
*
)
PtStruct
,
mode
);
break
;
...
...
@@ -172,6 +166,12 @@ void WinEDA_PcbFrame::Trace_Pcb( wxDC* DC, int mode )
}
}
// draw the BOARD's markers.
for
(
unsigned
i
=
0
;
i
<
m_Pcb
->
m_markers
.
size
();
++
i
)
{
m_Pcb
->
m_markers
[
i
]
->
Draw
(
DrawPanel
,
DC
,
mode
);
}
Trace_Pistes
(
DrawPanel
,
m_Pcb
,
DC
,
mode
);
if
(
g_HightLigt_Status
)
DrawHightLight
(
DC
,
g_HightLigth_NetCode
);
...
...
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