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
b979d1e0
Commit
b979d1e0
authored
Dec 12, 2011
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plugin work, accessors
parent
dc982a28
Changes
61
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
61 changed files
with
813 additions
and
629 deletions
+813
-629
base_struct.cpp
common/base_struct.cpp
+9
-2
readschematicnetlist.cpp
cvpcb/readschematicnetlist.cpp
+1
-1
block.cpp
eeschema/block.cpp
+1
-1
bus-wire-junction.cpp
eeschema/bus-wire-junction.cpp
+1
-1
component_references_lister.cpp
eeschema/component_references_lister.cpp
+1
-1
erc.cpp
eeschema/erc.cpp
+2
-2
events_called_functions_for_edit.cpp
eeschema/events_called_functions_for_edit.cpp
+1
-1
netform.cpp
eeschema/netform.cpp
+1
-1
operations_on_items_lists.cpp
eeschema/operations_on_items_lists.cpp
+3
-3
sch_component.cpp
eeschema/sch_component.cpp
+3
-3
sch_screen.cpp
eeschema/sch_screen.cpp
+3
-3
sch_sheet.cpp
eeschema/sch_sheet.cpp
+4
-4
sch_sheet_path.cpp
eeschema/sch_sheet_path.cpp
+3
-3
sheet.cpp
eeschema/sheet.cpp
+1
-1
class_gerber_draw_item.cpp
gerbview/class_gerber_draw_item.cpp
+1
-1
base_struct.h
include/base_struct.h
+23
-21
block.cpp
pcbnew/block.cpp
+2
-2
block_module_editor.cpp
pcbnew/block_module_editor.cpp
+41
-27
class_dimension.cpp
pcbnew/class_dimension.cpp
+1
-1
class_drawsegment.cpp
pcbnew/class_drawsegment.cpp
+1
-1
class_drawsegment.h
pcbnew/class_drawsegment.h
+5
-2
class_edge_mod.cpp
pcbnew/class_edge_mod.cpp
+1
-1
class_mire.cpp
pcbnew/class_mire.cpp
+1
-1
class_module.cpp
pcbnew/class_module.cpp
+1
-1
class_module.h
pcbnew/class_module.h
+69
-31
class_module_transform_functions.cpp
pcbnew/class_module_transform_functions.cpp
+1
-1
class_pad.cpp
pcbnew/class_pad.cpp
+18
-17
class_pad.h
pcbnew/class_pad.h
+43
-22
class_text_mod.h
pcbnew/class_text_mod.h
+20
-13
class_track.cpp
pcbnew/class_track.cpp
+1
-1
class_zone.cpp
pcbnew/class_zone.cpp
+1
-1
collectors.cpp
pcbnew/collectors.cpp
+1
-1
controle.cpp
pcbnew/controle.cpp
+2
-2
cross-probing.cpp
pcbnew/cross-probing.cpp
+3
-3
dialog_edit_module_for_BoardEditor.cpp
pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp
+2
-3
dialog_edit_module_text.cpp
pcbnew/dialogs/dialog_edit_module_text.cpp
+14
-12
dialog_pad_properties.cpp
pcbnew/dialogs/dialog_pad_properties.cpp
+2
-2
editmod.cpp
pcbnew/editmod.cpp
+3
-3
edtxtmod.cpp
pcbnew/edtxtmod.cpp
+3
-3
export_gencad.cpp
pcbnew/export_gencad.cpp
+2
-2
export_vrml.cpp
pcbnew/export_vrml.cpp
+1
-1
ioascii.cpp
pcbnew/ioascii.cpp
+1
-1
item_io.cpp
pcbnew/item_io.cpp
+1
-1
kicad_plugin.cpp
pcbnew/kicad_plugin.cpp
+434
-374
kicad_plugin.h
pcbnew/kicad_plugin.h
+28
-6
librairi.cpp
pcbnew/librairi.cpp
+2
-2
loadcmp.cpp
pcbnew/loadcmp.cpp
+2
-2
modedit.cpp
pcbnew/modedit.cpp
+10
-10
modedit_onclick.cpp
pcbnew/modedit_onclick.cpp
+1
-1
moduleframe.cpp
pcbnew/moduleframe.cpp
+2
-2
move-drag_pads.cpp
pcbnew/move-drag_pads.cpp
+1
-1
muonde.cpp
pcbnew/muonde.cpp
+16
-8
netlist.cpp
pcbnew/netlist.cpp
+2
-2
onrightclick.cpp
pcbnew/onrightclick.cpp
+1
-1
plot_rtn.cpp
pcbnew/plot_rtn.cpp
+3
-3
print_board_functions.cpp
pcbnew/print_board_functions.cpp
+2
-2
specctra_export.cpp
pcbnew/specctra_export.cpp
+1
-1
xchgmod.cpp
pcbnew/xchgmod.cpp
+2
-2
zones_by_polygon.cpp
pcbnew/zones_by_polygon.cpp
+2
-2
zones_by_polygon_fill_functions.cpp
pcbnew/zones_by_polygon_fill_functions.cpp
+2
-2
zones_test_and_combine_areas.cpp
pcbnew/zones_test_and_combine_areas.cpp
+3
-3
No files found.
common/base_struct.cpp
View file @
b979d1e0
...
@@ -68,7 +68,7 @@ EDA_ITEM::EDA_ITEM( const EDA_ITEM& base )
...
@@ -68,7 +68,7 @@ EDA_ITEM::EDA_ITEM( const EDA_ITEM& base )
m_Parent
=
base
.
m_Parent
;
m_Parent
=
base
.
m_Parent
;
m_Son
=
base
.
m_Son
;
m_Son
=
base
.
m_Son
;
m_Flags
=
base
.
m_Flags
;
m_Flags
=
base
.
m_Flags
;
m_TimeStamp
=
base
.
m_TimeStamp
;
SetTimeStamp
(
base
.
m_TimeStamp
)
;
m_Status
=
base
.
m_Status
;
m_Status
=
base
.
m_Status
;
m_Selected
=
base
.
m_Selected
;
m_Selected
=
base
.
m_Selected
;
}
}
...
@@ -84,7 +84,7 @@ void EDA_ITEM::InitVars()
...
@@ -84,7 +84,7 @@ void EDA_ITEM::InitVars()
m_List
=
NULL
;
// I am not on any list yet
m_List
=
NULL
;
// I am not on any list yet
m_Image
=
NULL
;
// Link to an image copy for undelete or abort command
m_Image
=
NULL
;
// Link to an image copy for undelete or abort command
m_Flags
=
0
;
// flags for editions and other
m_Flags
=
0
;
// flags for editions and other
m_TimeStamp
=
0
;
// Time stamp used for logical links
SetTimeStamp
(
0
)
;
// Time stamp used for logical links
m_Status
=
0
;
m_Status
=
0
;
m_Selected
=
0
;
// Used by block commands, and selective editing
m_Selected
=
0
;
// Used by block commands, and selective editing
}
}
...
@@ -107,6 +107,13 @@ EDA_ITEM* EDA_ITEM::doClone() const
...
@@ -107,6 +107,13 @@ EDA_ITEM* EDA_ITEM::doClone() const
}
}
EDA_ITEM
*
EDA_ITEM
::
Clone
()
const
{
// save about 6 bytes per call by hiding the virtual function in this non-inline function.
return
doClone
();
}
SEARCH_RESULT
EDA_ITEM
::
IterateForward
(
EDA_ITEM
*
listStart
,
SEARCH_RESULT
EDA_ITEM
::
IterateForward
(
EDA_ITEM
*
listStart
,
INSPECTOR
*
inspector
,
INSPECTOR
*
inspector
,
const
void
*
testData
,
const
void
*
testData
,
...
...
cvpcb/readschematicnetlist.cpp
View file @
b979d1e0
...
@@ -182,7 +182,7 @@ int CVPCB_MAINFRAME::ReadSchematicNetlist()
...
@@ -182,7 +182,7 @@ int CVPCB_MAINFRAME::ReadSchematicNetlist()
while
(
Line
[
idx
]
!=
' '
&&
Line
[
idx
]
)
while
(
Line
[
idx
]
!=
' '
&&
Line
[
idx
]
)
cbuffer
[
jj
++
]
=
Line
[
idx
++
];
cbuffer
[
jj
++
]
=
Line
[
idx
++
];
cbuffer
[
jj
]
=
0
;
cbuffer
[
jj
]
=
0
;
Cmp
->
m_TimeStamp
=
FROM_UTF8
(
cbuffer
);
Cmp
->
m_TimeStamp
=
FROM_UTF8
(
cbuffer
);
/* search val/ref.lib */
/* search val/ref.lib */
while
(
Line
[
idx
]
==
' '
)
while
(
Line
[
idx
]
==
' '
)
...
...
eeschema/block.cpp
View file @
b979d1e0
...
@@ -554,7 +554,7 @@ void SCH_EDIT_FRAME::PasteListOfItems( wxDC* DC )
...
@@ -554,7 +554,7 @@ void SCH_EDIT_FRAME::PasteListOfItems( wxDC* DC )
// Clear annotation and init new time stamp for the new components:
// Clear annotation and init new time stamp for the new components:
if
(
Struct
->
Type
()
==
SCH_COMPONENT_T
)
if
(
Struct
->
Type
()
==
SCH_COMPONENT_T
)
{
{
(
(
SCH_COMPONENT
*
)
Struct
)
->
m_TimeStamp
=
GetNewTimeStamp
(
);
(
(
SCH_COMPONENT
*
)
Struct
)
->
SetTimeStamp
(
GetNewTimeStamp
()
);
(
(
SCH_COMPONENT
*
)
Struct
)
->
ClearAnnotation
(
NULL
);
(
(
SCH_COMPONENT
*
)
Struct
)
->
ClearAnnotation
(
NULL
);
}
}
...
...
eeschema/bus-wire-junction.cpp
View file @
b979d1e0
...
@@ -526,7 +526,7 @@ void SCH_EDIT_FRAME::RepeatDrawItem( wxDC* DC )
...
@@ -526,7 +526,7 @@ void SCH_EDIT_FRAME::RepeatDrawItem( wxDC* DC )
wxPoint
pos
=
GetScreen
()
->
GetCrossHairPosition
()
-
wxPoint
pos
=
GetScreen
()
->
GetCrossHairPosition
()
-
(
(
SCH_COMPONENT
*
)
m_itemToRepeat
)
->
GetPosition
();
(
(
SCH_COMPONENT
*
)
m_itemToRepeat
)
->
GetPosition
();
m_itemToRepeat
->
SetFlags
(
IS_NEW
);
m_itemToRepeat
->
SetFlags
(
IS_NEW
);
(
(
SCH_COMPONENT
*
)
m_itemToRepeat
)
->
m_TimeStamp
=
GetNewTimeStamp
(
);
(
(
SCH_COMPONENT
*
)
m_itemToRepeat
)
->
SetTimeStamp
(
GetNewTimeStamp
()
);
m_itemToRepeat
->
Move
(
pos
);
m_itemToRepeat
->
Move
(
pos
);
m_itemToRepeat
->
Draw
(
DrawPanel
,
DC
,
wxPoint
(
0
,
0
),
g_XorMode
);
m_itemToRepeat
->
Draw
(
DrawPanel
,
DC
,
wxPoint
(
0
,
0
),
g_XorMode
);
MoveItem
(
m_itemToRepeat
,
DC
);
MoveItem
(
m_itemToRepeat
,
DC
);
...
...
eeschema/component_references_lister.cpp
View file @
b979d1e0
...
@@ -668,7 +668,7 @@ SCH_REFERENCE::SCH_REFERENCE( SCH_COMPONENT* aComponent, LIB_COMPONENT* aLibComp
...
@@ -668,7 +668,7 @@ SCH_REFERENCE::SCH_REFERENCE( SCH_COMPONENT* aComponent, LIB_COMPONENT* aLibComp
m_SheetPath
=
aSheetPath
;
m_SheetPath
=
aSheetPath
;
m_IsNew
=
false
;
m_IsNew
=
false
;
m_Flag
=
0
;
m_Flag
=
0
;
m_TimeStamp
=
aComponent
->
m_TimeStamp
;
m_TimeStamp
=
aComponent
->
GetTimeStamp
()
;
m_CmpPos
=
aComponent
->
GetPosition
();
m_CmpPos
=
aComponent
->
GetPosition
();
m_SheetNum
=
0
;
m_SheetNum
=
0
;
...
...
eeschema/erc.cpp
View file @
b979d1e0
...
@@ -204,7 +204,7 @@ int TestDuplicateSheetNames( bool aCreateMarker )
...
@@ -204,7 +204,7 @@ int TestDuplicateSheetNames( bool aCreateMarker )
{
{
/* Create a new marker type ERC error*/
/* Create a new marker type ERC error*/
SCH_MARKER
*
marker
=
new
SCH_MARKER
();
SCH_MARKER
*
marker
=
new
SCH_MARKER
();
marker
->
m_TimeStamp
=
GetNewTimeStamp
(
);
marker
->
SetTimeStamp
(
GetNewTimeStamp
()
);
marker
->
SetData
(
ERCE_DUPLICATE_SHEET_NAME
,
marker
->
SetData
(
ERCE_DUPLICATE_SHEET_NAME
,
(
(
SCH_SHEET
*
)
test_item
)
->
GetPosition
(),
(
(
SCH_SHEET
*
)
test_item
)
->
GetPosition
(),
_
(
"Duplicate sheet name"
),
_
(
"Duplicate sheet name"
),
...
@@ -237,7 +237,7 @@ void Diagnose( NETLIST_OBJECT* aNetItemRef, NETLIST_OBJECT* aNetItemTst,
...
@@ -237,7 +237,7 @@ void Diagnose( NETLIST_OBJECT* aNetItemRef, NETLIST_OBJECT* aNetItemTst,
/* Create new marker for ERC error. */
/* Create new marker for ERC error. */
marker
=
new
SCH_MARKER
();
marker
=
new
SCH_MARKER
();
marker
->
m_TimeStamp
=
GetNewTimeStamp
(
);
marker
->
SetTimeStamp
(
GetNewTimeStamp
()
);
marker
->
SetMarkerType
(
MARK_ERC
);
marker
->
SetMarkerType
(
MARK_ERC
);
marker
->
SetErrorLevel
(
WAR
);
marker
->
SetErrorLevel
(
WAR
);
...
...
eeschema/events_called_functions_for_edit.cpp
View file @
b979d1e0
...
@@ -29,7 +29,7 @@ void SCH_EDIT_FRAME::OnCopySchematicItemRequest( wxCommandEvent& event )
...
@@ -29,7 +29,7 @@ void SCH_EDIT_FRAME::OnCopySchematicItemRequest( wxCommandEvent& event )
{
{
SCH_COMPONENT
*
newitem
;
SCH_COMPONENT
*
newitem
;
newitem
=
new
SCH_COMPONENT
(
*
(
(
SCH_COMPONENT
*
)
curr_item
)
);
newitem
=
new
SCH_COMPONENT
(
*
(
(
SCH_COMPONENT
*
)
curr_item
)
);
newitem
->
m_TimeStamp
=
GetNewTimeStamp
(
);
newitem
->
SetTimeStamp
(
GetNewTimeStamp
()
);
newitem
->
ClearAnnotation
(
NULL
);
newitem
->
ClearAnnotation
(
NULL
);
newitem
->
m_Flags
=
IS_NEW
;
newitem
->
m_Flags
=
IS_NEW
;
MoveItem
(
(
SCH_ITEM
*
)
newitem
,
&
dc
);
MoveItem
(
(
SCH_ITEM
*
)
newitem
,
&
dc
);
...
...
eeschema/netform.cpp
View file @
b979d1e0
...
@@ -1035,7 +1035,7 @@ XNODE* EXPORT_HELP::makeGenericComponents()
...
@@ -1035,7 +1035,7 @@ XNODE* EXPORT_HELP::makeGenericComponents()
xsheetpath
->
AddAttribute
(
sNames
,
path
->
PathHumanReadable
()
);
xsheetpath
->
AddAttribute
(
sNames
,
path
->
PathHumanReadable
()
);
xsheetpath
->
AddAttribute
(
sTStamps
,
path
->
Path
()
);
xsheetpath
->
AddAttribute
(
sTStamps
,
path
->
Path
()
);
timeStamp
.
Printf
(
sTSFmt
,
comp
->
m_TimeStamp
);
timeStamp
.
Printf
(
sTSFmt
,
comp
->
GetTimeStamp
()
);
xcomp
->
AddChild
(
node
(
sTStamp
,
timeStamp
)
);
xcomp
->
AddChild
(
node
(
sTStamp
,
timeStamp
)
);
}
}
}
}
...
...
eeschema/operations_on_items_lists.cpp
View file @
b979d1e0
...
@@ -207,13 +207,13 @@ void DuplicateItemsInList( SCH_SCREEN* screen, PICKED_ITEMS_LIST& aItemsList,
...
@@ -207,13 +207,13 @@ void DuplicateItemsInList( SCH_SCREEN* screen, PICKED_ITEMS_LIST& aItemsList,
case
SCH_SHEET_T
:
case
SCH_SHEET_T
:
{
{
SCH_SHEET
*
sheet
=
(
SCH_SHEET
*
)
newitem
;
SCH_SHEET
*
sheet
=
(
SCH_SHEET
*
)
newitem
;
sheet
->
m_TimeStamp
=
GetNewTimeStamp
(
);
sheet
->
SetTimeStamp
(
GetNewTimeStamp
()
);
sheet
->
SetSon
(
NULL
);
sheet
->
SetSon
(
NULL
);
break
;
break
;
}
}
case
SCH_COMPONENT_T
:
case
SCH_COMPONENT_T
:
(
(
SCH_COMPONENT
*
)
newitem
)
->
m_TimeStamp
=
GetNewTimeStamp
(
);
(
(
SCH_COMPONENT
*
)
newitem
)
->
SetTimeStamp
(
GetNewTimeStamp
()
);
(
(
SCH_COMPONENT
*
)
newitem
)
->
ClearAnnotation
(
NULL
);
(
(
SCH_COMPONENT
*
)
newitem
)
->
ClearAnnotation
(
NULL
);
break
;
break
;
}
}
...
@@ -246,7 +246,7 @@ SCH_ITEM* DuplicateStruct( SCH_ITEM* aDrawStruct, bool aClone )
...
@@ -246,7 +246,7 @@ SCH_ITEM* DuplicateStruct( SCH_ITEM* aDrawStruct, bool aClone )
SCH_ITEM
*
NewDrawStruct
=
aDrawStruct
->
Clone
();
SCH_ITEM
*
NewDrawStruct
=
aDrawStruct
->
Clone
();
if
(
aClone
)
if
(
aClone
)
NewDrawStruct
->
m_TimeStamp
=
aDrawStruct
->
m_TimeStamp
;
NewDrawStruct
->
SetTimeStamp
(
aDrawStruct
->
GetTimeStamp
()
)
;
NewDrawStruct
->
m_Image
=
aDrawStruct
;
NewDrawStruct
->
m_Image
=
aDrawStruct
;
...
...
eeschema/sch_component.cpp
View file @
b979d1e0
...
@@ -130,7 +130,7 @@ SCH_COMPONENT::SCH_COMPONENT( LIB_COMPONENT& libComponent, SCH_SHEET_PATH* sheet
...
@@ -130,7 +130,7 @@ SCH_COMPONENT::SCH_COMPONENT( LIB_COMPONENT& libComponent, SCH_SHEET_PATH* sheet
m_unit
=
unit
;
m_unit
=
unit
;
m_convert
=
convert
;
m_convert
=
convert
;
m_ChipName
=
libComponent
.
GetName
();
m_ChipName
=
libComponent
.
GetName
();
m_TimeStamp
=
GetNewTimeStamp
(
);
SetTimeStamp
(
GetNewTimeStamp
()
);
if
(
setNewItemFlag
)
if
(
setNewItemFlag
)
m_Flags
=
IS_NEW
|
IS_MOVED
;
m_Flags
=
IS_NEW
|
IS_MOVED
;
...
@@ -189,7 +189,7 @@ SCH_COMPONENT::SCH_COMPONENT( const SCH_COMPONENT& aComponent ) :
...
@@ -189,7 +189,7 @@ SCH_COMPONENT::SCH_COMPONENT( const SCH_COMPONENT& aComponent ) :
m_unit
=
aComponent
.
m_unit
;
m_unit
=
aComponent
.
m_unit
;
m_convert
=
aComponent
.
m_convert
;
m_convert
=
aComponent
.
m_convert
;
m_ChipName
=
aComponent
.
m_ChipName
;
m_ChipName
=
aComponent
.
m_ChipName
;
m_TimeStamp
=
aComponent
.
m_TimeStamp
;
SetTimeStamp
(
aComponent
.
m_TimeStamp
)
;
m_transform
=
aComponent
.
m_transform
;
m_transform
=
aComponent
.
m_transform
;
m_prefix
=
aComponent
.
m_prefix
;
m_prefix
=
aComponent
.
m_prefix
;
m_PathsAndReferences
=
aComponent
.
m_PathsAndReferences
;
m_PathsAndReferences
=
aComponent
.
m_PathsAndReferences
;
...
@@ -524,7 +524,7 @@ void SCH_COMPONENT::SetTimeStamp( long aNewTimeStamp )
...
@@ -524,7 +524,7 @@ void SCH_COMPONENT::SetTimeStamp( long aNewTimeStamp )
string_timestamp
.
Printf
(
wxT
(
"%8.8X"
),
aNewTimeStamp
);
string_timestamp
.
Printf
(
wxT
(
"%8.8X"
),
aNewTimeStamp
);
string_oldtimestamp
.
Printf
(
wxT
(
"%8.8X"
),
m_TimeStamp
);
string_oldtimestamp
.
Printf
(
wxT
(
"%8.8X"
),
m_TimeStamp
);
m_TimeStamp
=
aNewTimeStamp
;
SetTimeStamp
(
aNewTimeStamp
)
;
for
(
unsigned
ii
=
0
;
ii
<
m_PathsAndReferences
.
GetCount
();
ii
++
)
for
(
unsigned
ii
=
0
;
ii
<
m_PathsAndReferences
.
GetCount
();
ii
++
)
{
{
...
...
eeschema/sch_screen.cpp
View file @
b979d1e0
...
@@ -1327,7 +1327,7 @@ int SCH_SCREEN::GetConnection( const wxPoint& aPosition, PICKED_ITEMS_LIST& aLis
...
@@ -1327,7 +1327,7 @@ int SCH_SCREEN::GetConnection( const wxPoint& aPosition, PICKED_ITEMS_LIST& aLis
*/
*/
static
bool
SortByTimeStamp
(
const
EDA_ITEM
*
item1
,
const
EDA_ITEM
*
item2
)
static
bool
SortByTimeStamp
(
const
EDA_ITEM
*
item1
,
const
EDA_ITEM
*
item2
)
{
{
int
ii
=
item1
->
m_TimeStamp
-
item2
->
m_TimeStamp
;
int
ii
=
item1
->
GetTimeStamp
()
-
item2
->
GetTimeStamp
()
;
/* If the time stamps are the same, compare type in order to have component objects
/* If the time stamps are the same, compare type in order to have component objects
* before sheet object. This is done because changing the sheet time stamp
* before sheet object. This is done because changing the sheet time stamp
...
@@ -1463,7 +1463,7 @@ int SCH_SCREENS::ReplaceDuplicateTimeStamps()
...
@@ -1463,7 +1463,7 @@ int SCH_SCREENS::ReplaceDuplicateTimeStamps()
SCH_ITEM
*
nextItem
=
(
SCH_ITEM
*
)
items
[
ii
+
1
];
SCH_ITEM
*
nextItem
=
(
SCH_ITEM
*
)
items
[
ii
+
1
];
if
(
item
->
m_TimeStamp
==
nextItem
->
m_TimeStamp
)
if
(
item
->
GetTimeStamp
()
==
nextItem
->
GetTimeStamp
()
)
{
{
count
++
;
count
++
;
...
@@ -1477,7 +1477,7 @@ int SCH_SCREENS::ReplaceDuplicateTimeStamps()
...
@@ -1477,7 +1477,7 @@ int SCH_SCREENS::ReplaceDuplicateTimeStamps()
// @todo: see how to change sheet paths for its cmp list (can
// @todo: see how to change sheet paths for its cmp list (can
// be possible in most cases)
// be possible in most cases)
else
else
item
->
m_TimeStamp
=
GetNewTimeStamp
(
);
item
->
SetTimeStamp
(
GetNewTimeStamp
()
);
}
}
}
}
...
...
eeschema/sch_sheet.cpp
View file @
b979d1e0
...
@@ -53,7 +53,7 @@ SCH_SHEET::SCH_SHEET( const wxPoint& pos ) :
...
@@ -53,7 +53,7 @@ SCH_SHEET::SCH_SHEET( const wxPoint& pos ) :
m_Layer
=
LAYER_SHEET
;
m_Layer
=
LAYER_SHEET
;
m_pos
=
pos
;
m_pos
=
pos
;
m_size
=
wxSize
(
MIN_SHEET_WIDTH
,
MIN_SHEET_HEIGHT
);
m_size
=
wxSize
(
MIN_SHEET_WIDTH
,
MIN_SHEET_HEIGHT
);
m_TimeStamp
=
GetNewTimeStamp
(
);
SetTimeStamp
(
GetNewTimeStamp
()
);
m_sheetNameSize
=
m_fileNameSize
=
60
;
m_sheetNameSize
=
m_fileNameSize
=
60
;
m_screen
=
NULL
;
m_screen
=
NULL
;
m_name
.
Printf
(
wxT
(
"Sheet%8.8lX"
),
m_TimeStamp
);
m_name
.
Printf
(
wxT
(
"Sheet%8.8lX"
),
m_TimeStamp
);
...
@@ -67,7 +67,7 @@ SCH_SHEET::SCH_SHEET( const SCH_SHEET& aSheet ) :
...
@@ -67,7 +67,7 @@ SCH_SHEET::SCH_SHEET( const SCH_SHEET& aSheet ) :
m_pos
=
aSheet
.
m_pos
;
m_pos
=
aSheet
.
m_pos
;
m_size
=
aSheet
.
m_size
;
m_size
=
aSheet
.
m_size
;
m_Layer
=
aSheet
.
m_Layer
;
m_Layer
=
aSheet
.
m_Layer
;
m_TimeStamp
=
aSheet
.
m_TimeStamp
;
SetTimeStamp
(
aSheet
.
m_TimeStamp
)
;
m_sheetNameSize
=
aSheet
.
m_sheetNameSize
;
m_sheetNameSize
=
aSheet
.
m_sheetNameSize
;
m_fileNameSize
=
aSheet
.
m_fileNameSize
;
m_fileNameSize
=
aSheet
.
m_fileNameSize
;
m_screen
=
aSheet
.
m_screen
;
m_screen
=
aSheet
.
m_screen
;
...
@@ -184,7 +184,7 @@ bool SCH_SHEET::Load( LINE_READER& aLine, wxString& aErrorMsg )
...
@@ -184,7 +184,7 @@ bool SCH_SHEET::Load( LINE_READER& aLine, wxString& aErrorMsg )
SCH_SHEET_PIN
*
sheetPin
;
SCH_SHEET_PIN
*
sheetPin
;
char
*
ptcar
;
char
*
ptcar
;
m_TimeStamp
=
GetNewTimeStamp
(
);
SetTimeStamp
(
GetNewTimeStamp
()
);
// sheets are added to the GetDrawItems() like other schematic components.
// sheets are added to the GetDrawItems() like other schematic components.
// however, in order to preserve the hierarchy (through m_Parent pointers),
// however, in order to preserve the hierarchy (through m_Parent pointers),
...
@@ -224,7 +224,7 @@ bool SCH_SHEET::Load( LINE_READER& aLine, wxString& aErrorMsg )
...
@@ -224,7 +224,7 @@ bool SCH_SHEET::Load( LINE_READER& aLine, wxString& aErrorMsg )
{
{
sscanf
(
((
char
*
)
aLine
)
+
1
,
"%lX"
,
&
m_TimeStamp
);
sscanf
(
((
char
*
)
aLine
)
+
1
,
"%lX"
,
&
m_TimeStamp
);
if
(
m_TimeStamp
==
0
)
// zero is not unique!
if
(
m_TimeStamp
==
0
)
// zero is not unique!
m_TimeStamp
=
GetNewTimeStamp
(
);
SetTimeStamp
(
GetNewTimeStamp
()
);
continue
;
continue
;
}
}
...
...
eeschema/sch_sheet_path.cpp
View file @
b979d1e0
...
@@ -101,10 +101,10 @@ int SCH_SHEET_PATH::Cmp( const SCH_SHEET_PATH& aSheetPathToTest ) const
...
@@ -101,10 +101,10 @@ int SCH_SHEET_PATH::Cmp( const SCH_SHEET_PATH& aSheetPathToTest ) const
//otherwise, same number of sheets.
//otherwise, same number of sheets.
for
(
unsigned
i
=
0
;
i
<
m_numSheets
;
i
++
)
for
(
unsigned
i
=
0
;
i
<
m_numSheets
;
i
++
)
{
{
if
(
m_sheets
[
i
]
->
m_TimeStamp
>
aSheetPathToTest
.
m_sheets
[
i
]
->
m_TimeStamp
)
if
(
m_sheets
[
i
]
->
GetTimeStamp
()
>
aSheetPathToTest
.
m_sheets
[
i
]
->
GetTimeStamp
()
)
return
1
;
return
1
;
if
(
m_sheets
[
i
]
->
m_TimeStamp
<
aSheetPathToTest
.
m_sheets
[
i
]
->
m_TimeStamp
)
if
(
m_sheets
[
i
]
->
GetTimeStamp
()
<
aSheetPathToTest
.
m_sheets
[
i
]
->
GetTimeStamp
()
)
return
-
1
;
return
-
1
;
}
}
...
@@ -200,7 +200,7 @@ wxString SCH_SHEET_PATH::Path() const
...
@@ -200,7 +200,7 @@ wxString SCH_SHEET_PATH::Path() const
// it's timestamp changes anyway.
// it's timestamp changes anyway.
for
(
unsigned
i
=
1
;
i
<
m_numSheets
;
i
++
)
for
(
unsigned
i
=
1
;
i
<
m_numSheets
;
i
++
)
{
{
t
.
Printf
(
_
(
"%8.8lX/"
),
m_sheets
[
i
]
->
m_TimeStamp
);
t
.
Printf
(
_
(
"%8.8lX/"
),
m_sheets
[
i
]
->
GetTimeStamp
()
);
s
=
s
+
t
;
s
=
s
+
t
;
}
}
...
...
eeschema/sheet.cpp
View file @
b979d1e0
...
@@ -312,7 +312,7 @@ SCH_SHEET* SCH_EDIT_FRAME::CreateSheet( wxDC* aDC )
...
@@ -312,7 +312,7 @@ SCH_SHEET* SCH_EDIT_FRAME::CreateSheet( wxDC* aDC )
SCH_SHEET
*
sheet
=
new
SCH_SHEET
(
GetScreen
()
->
GetCrossHairPosition
()
);
SCH_SHEET
*
sheet
=
new
SCH_SHEET
(
GetScreen
()
->
GetCrossHairPosition
()
);
sheet
->
SetFlags
(
IS_NEW
|
IS_RESIZED
);
sheet
->
SetFlags
(
IS_NEW
|
IS_RESIZED
);
sheet
->
m_TimeStamp
=
GetNewTimeStamp
(
);
sheet
->
SetTimeStamp
(
GetNewTimeStamp
()
);
sheet
->
SetParent
(
GetScreen
()
);
sheet
->
SetParent
(
GetScreen
()
);
sheet
->
SetScreen
(
NULL
);
sheet
->
SetScreen
(
NULL
);
...
...
gerbview/class_gerber_draw_item.cpp
View file @
b979d1e0
...
@@ -70,7 +70,7 @@ GERBER_DRAW_ITEM::GERBER_DRAW_ITEM( const GERBER_DRAW_ITEM& aSource ) :
...
@@ -70,7 +70,7 @@ GERBER_DRAW_ITEM::GERBER_DRAW_ITEM( const GERBER_DRAW_ITEM& aSource ) :
m_Shape
=
aSource
.
m_Shape
;
m_Shape
=
aSource
.
m_Shape
;
m_Flags
=
aSource
.
m_Flags
;
m_Flags
=
aSource
.
m_Flags
;
m_TimeStamp
=
aSource
.
m_TimeStamp
;
SetTimeStamp
(
aSource
.
m_TimeStamp
)
;
SetStatus
(
aSource
.
ReturnStatus
()
);
SetStatus
(
aSource
.
ReturnStatus
()
);
m_Start
=
aSource
.
m_Start
;
m_Start
=
aSource
.
m_Start
;
...
...
include/base_struct.h
View file @
b979d1e0
...
@@ -366,16 +366,17 @@ private:
...
@@ -366,16 +366,17 @@ private:
int
m_Status
;
int
m_Status
;
protected
:
protected
:
EDA_ITEM
*
Pnext
;
/* Linked list: Link (next struct) */
EDA_ITEM
*
Pnext
;
///< next in linked list
EDA_ITEM
*
Pback
;
/* Linked list: Link (previous struct) */
EDA_ITEM
*
Pback
;
///< previous in linked list
DHEAD
*
m_List
;
///< which DLIST I am on.
EDA_ITEM
*
m_Parent
;
/* Linked list: Link (parent struct) */
EDA_ITEM
*
m_Parent
;
/* Linked list: Link (parent struct) */
EDA_ITEM
*
m_Son
;
/* Linked list: Link (son struct) */
EDA_ITEM
*
m_Son
;
/* Linked list: Link (son struct) */
DHEAD
*
m_List
;
///< which DLIST I am on.
unsigned
long
m_TimeStamp
;
///< Time stamp used for logical links
public
:
public
:
int
m_Flags
;
// flags for editing and other uses.
int
m_Flags
;
// flags for editing and other uses.
unsigned
long
m_TimeStamp
;
// Time stamp used for logical links
int
m_Selected
;
/* Used by block commands, and selective editing */
int
m_Selected
;
/* Used by block commands, and selective editing */
// member used in undo/redo function
// member used in undo/redo function
...
@@ -385,7 +386,7 @@ private:
...
@@ -385,7 +386,7 @@ private:
void
InitVars
();
void
InitVars
();
/**
/**
*
@brief
Function doClone
* Function doClone
* is used by the derived class to actually implement the cloning.
* is used by the derived class to actually implement the cloning.
*
*
* The default version will return NULL in release builds and likely crash the
* The default version will return NULL in release builds and likely crash the
...
@@ -520,15 +521,17 @@ public:
...
@@ -520,15 +521,17 @@ public:
}
}
/**
/**
*
@brief
Function Clone
* Function Clone
* creates a duplicate of this item with linked list members set to NULL.
* creates a duplicate of this item with linked list members set to NULL.
*
*
* The Clone() function only calls the private virtual doClone() which actually
* The Clone() function only calls the private virtual doClone() which actually
* does the cloning for the derived object.
* does the cloning for the derived object.
*
*
* @todo: use this instead of Copy() everywhere, then kill Copy().
*
* @return A clone of the item.
* @return A clone of the item.
*/
*/
EDA_ITEM
*
Clone
()
const
{
return
doClone
();
}
EDA_ITEM
*
Clone
()
const
;
// should not be inline, to save the ~ 6 bytes per call site.
/**
/**
* Function IterateForward
* Function IterateForward
...
@@ -755,20 +758,19 @@ enum FILL_T {
...
@@ -755,20 +758,19 @@ enum FILL_T {
class
EDA_TEXT
class
EDA_TEXT
{
{
public
:
public
:
int
m_Thickness
;
/* pen size used to draw this text */
wxString
m_Text
;
int
m_Orient
;
/* Orient in 0.1 degrees */
int
m_Thickness
;
///< pen size used to draw this text
int
m_Orient
;
///< Orient in 0.1 degrees
wxString
m_Text
;
/* text! */
wxPoint
m_Pos
;
///< XY position of anchor text.
wxPoint
m_Pos
;
/* XY position of anchor text. */
wxSize
m_Size
;
///< XY size of text
wxSize
m_Size
;
/* XY size of text */
bool
m_Mirror
;
///< true iff mirrored
bool
m_Mirror
;
///< true iff mirrored
int
m_Attributs
;
/
* flags (visible...) */
int
m_Attributs
;
/
//< bit flags such as visible, etc.
bool
m_Italic
;
/
* true to simulate (or use if exists
)
bool
m_Italic
;
/
//< should be italic font (if available
)
* an italic font... */
bool
m_Bold
;
///< should be bold font (if available)
bool
m_Bold
;
/* true to simulate a bold font ... */
GRTextHorizJustifyType
m_HJustify
;
///< horizontal justification
GRText
HorizJustifyType
m_HJustify
;
/* Horiz justification */
GRText
VertJustifyType
m_VJustify
;
///< vertical justification
GRTextVertJustifyType
m_VJustify
;
/* Vertical justification */
bool
m_MultilineAllowed
;
/* true to use multiline option, false
bool
m_MultilineAllowed
;
/*
*<
true to use multiline option, false
* to use only single line text
* to use only single line text
* Single line is faster in
* Single line is faster in
* calculations than multiline */
* calculations than multiline */
...
@@ -798,7 +800,7 @@ public:
...
@@ -798,7 +800,7 @@ public:
void
SetItalic
(
bool
isItalic
)
{
m_Italic
=
isItalic
;
}
void
SetItalic
(
bool
isItalic
)
{
m_Italic
=
isItalic
;
}
bool
IsItalic
()
const
{
return
m_Italic
;
}
bool
IsItalic
()
const
{
return
m_Italic
;
}
void
SetMirrored
(
bool
doMirror
)
{
m_Mirror
=
doMirror
;
}
void
SetMirrored
(
bool
isMirrored
)
{
m_Mirror
=
isMirrored
;
}
bool
IsMirrored
()
const
{
return
m_Mirror
;
}
bool
IsMirrored
()
const
{
return
m_Mirror
;
}
/**
/**
...
...
pcbnew/block.cpp
View file @
b979d1e0
...
@@ -854,7 +854,7 @@ void PCB_EDIT_FRAME::Block_Duplicate()
...
@@ -854,7 +854,7 @@ void PCB_EDIT_FRAME::Block_Duplicate()
module
->
m_Flags
=
0
;
module
->
m_Flags
=
0
;
newitem
=
new_module
=
new
MODULE
(
m_Pcb
);
newitem
=
new_module
=
new
MODULE
(
m_Pcb
);
new_module
->
Copy
(
module
);
new_module
->
Copy
(
module
);
new_module
->
m_TimeStamp
=
GetNewTimeStamp
(
);
new_module
->
SetTimeStamp
(
GetNewTimeStamp
()
);
m_Pcb
->
m_Modules
.
PushFront
(
new_module
);
m_Pcb
->
m_Modules
.
PushFront
(
new_module
);
}
}
break
;
break
;
...
@@ -877,7 +877,7 @@ void PCB_EDIT_FRAME::Block_Duplicate()
...
@@ -877,7 +877,7 @@ void PCB_EDIT_FRAME::Block_Duplicate()
{
{
ZONE_CONTAINER
*
new_zone
=
new
ZONE_CONTAINER
(
(
BOARD
*
)
item
->
GetParent
()
);
ZONE_CONTAINER
*
new_zone
=
new
ZONE_CONTAINER
(
(
BOARD
*
)
item
->
GetParent
()
);
new_zone
->
Copy
(
(
ZONE_CONTAINER
*
)
item
);
new_zone
->
Copy
(
(
ZONE_CONTAINER
*
)
item
);
new_zone
->
m_TimeStamp
=
GetNewTimeStamp
(
);
new_zone
->
SetTimeStamp
(
GetNewTimeStamp
()
);
newitem
=
new_zone
;
newitem
=
new_zone
;
m_Pcb
->
Add
(
new_zone
);
m_Pcb
->
Add
(
new_zone
);
}
}
...
...
pcbnew/block_module_editor.cpp
View file @
b979d1e0
...
@@ -473,16 +473,21 @@ void MoveMarkedItems( MODULE* module, wxPoint offset )
...
@@ -473,16 +473,21 @@ void MoveMarkedItems( MODULE* module, wxPoint offset )
switch
(
item
->
Type
()
)
switch
(
item
->
Type
()
)
{
{
case
PCB_MODULE_TEXT_T
:
case
PCB_MODULE_TEXT_T
:
(
(
TEXTE_MODULE
*
)
item
)
->
m_Pos
+=
offset
;
{
(
(
TEXTE_MODULE
*
)
item
)
->
m_Pos0
+=
offset
;
TEXTE_MODULE
*
tm
=
(
TEXTE_MODULE
*
)
item
;
tm
->
m_Pos
+=
offset
;
tm
->
SetPos0
(
tm
->
GetPos0
()
+
offset
);
}
break
;
break
;
case
PCB_MODULE_EDGE_T
:
case
PCB_MODULE_EDGE_T
:
(
(
EDGE_MODULE
*
)
item
)
->
m_Start
+=
offset
;
{
(
(
EDGE_MODULE
*
)
item
)
->
m_End
+=
offset
;
EDGE_MODULE
*
em
=
(
EDGE_MODULE
*
)
item
;
em
->
m_Start
+=
offset
;
(
(
EDGE_MODULE
*
)
item
)
->
m_Start0
+=
offset
;
em
->
m_End
+=
offset
;
(
(
EDGE_MODULE
*
)
item
)
->
m_End0
+=
offset
;
em
->
m_Start0
+=
offset
;
em
->
m_End0
+=
offset
;
}
break
;
break
;
default
:
default
:
...
@@ -571,20 +576,25 @@ void MirrorMarkedItems( MODULE* module, wxPoint offset )
...
@@ -571,20 +576,25 @@ void MirrorMarkedItems( MODULE* module, wxPoint offset )
switch
(
item
->
Type
()
)
switch
(
item
->
Type
()
)
{
{
case
PCB_MODULE_EDGE_T
:
case
PCB_MODULE_EDGE_T
:
EDGE_MODULE
*
edge
;
{
edge
=
(
EDGE_MODULE
*
)
item
;
EDGE_MODULE
*
em
=
(
EDGE_MODULE
*
)
item
;
SETMIRROR
(
edge
->
m_Start
.
x
);
SETMIRROR
(
em
->
m_Start
.
x
);
edge
->
m_Start0
.
x
=
edge
->
m_Start
.
x
;
em
->
m_Start0
.
x
=
em
->
m_Start
.
x
;
SETMIRROR
(
edge
->
m_End
.
x
);
SETMIRROR
(
em
->
m_End
.
x
);
edge
->
m_End0
.
x
=
edge
->
m_End
.
x
;
em
->
m_End0
.
x
=
em
->
m_End
.
x
;
NEGATE
(
edge
->
m_Angle
);
NEGATE
(
em
->
m_Angle
);
}
break
;
break
;
case
PCB_MODULE_TEXT_T
:
case
PCB_MODULE_TEXT_T
:
tmp
=
(
(
TEXTE_MODULE
*
)
item
)
->
GetPosition
();
{
TEXTE_MODULE
*
tm
=
(
TEXTE_MODULE
*
)
item
;
tmp
=
tm
->
GetPosition
();
SETMIRROR
(
tmp
.
x
);
SETMIRROR
(
tmp
.
x
);
(
(
TEXTE_MODULE
*
)
item
)
->
SetPosition
(
tmp
);
tm
->
SetPosition
(
tmp
);
(
(
TEXTE_MODULE
*
)
item
)
->
m_Pos0
.
x
=
(
(
TEXTE_MODULE
*
)
item
)
->
GetPosition
().
x
;
tmp
.
y
=
tm
->
GetPos0
().
y
;
tm
->
SetPos0
(
tmp
);
}
break
;
break
;
default
:
default
:
...
@@ -633,20 +643,24 @@ void RotateMarkedItems( MODULE* module, wxPoint offset )
...
@@ -633,20 +643,24 @@ void RotateMarkedItems( MODULE* module, wxPoint offset )
switch
(
item
->
Type
()
)
switch
(
item
->
Type
()
)
{
{
case
PCB_MODULE_EDGE_T
:
case
PCB_MODULE_EDGE_T
:
ROTATE
(
(
(
EDGE_MODULE
*
)
item
)
->
m_Start
);
{
(
(
EDGE_MODULE
*
)
item
)
->
m_Start0
=
(
(
EDGE_MODULE
*
)
item
)
->
m_Start
;
EDGE_MODULE
*
em
=
(
EDGE_MODULE
*
)
item
;
ROTATE
(
(
(
EDGE_MODULE
*
)
item
)
->
m_End
);
ROTATE
(
em
->
m_Start
);
(
(
EDGE_MODULE
*
)
item
)
->
m_End0
=
(
(
EDGE_MODULE
*
)
item
)
->
m_End
;
em
->
m_Start0
=
em
->
m_Start
;
ROTATE
(
em
->
m_End
);
em
->
m_End0
=
em
->
m_End
;
}
break
;
break
;
case
PCB_MODULE_TEXT_T
:
case
PCB_MODULE_TEXT_T
:
{
{
wxPoint
pos
=
(
(
TEXTE_MODULE
*
)
item
)
->
GetPosition
();
TEXTE_MODULE
*
tm
=
(
TEXTE_MODULE
*
)
item
;
wxPoint
pos
=
tm
->
GetPosition
();
ROTATE
(
pos
);
ROTATE
(
pos
);
(
(
TEXTE_MODULE
*
)
item
)
->
SetPosition
(
pos
);
tm
->
SetPosition
(
pos
);
tm
->
SetPos0
(
tm
->
GetPosition
()
);
tm
->
SetOrientation
(
tm
->
GetOrientation
()
+
900
);
}
}
(
(
TEXTE_MODULE
*
)
item
)
->
m_Pos0
=
(
(
TEXTE_MODULE
*
)
item
)
->
GetPosition
();
(
(
TEXTE_MODULE
*
)
item
)
->
m_Orient
+=
900
;
break
;
break
;
default
:
default
:
...
...
pcbnew/class_dimension.cpp
View file @
b979d1e0
...
@@ -71,7 +71,7 @@ void DIMENSION::Copy( DIMENSION* source )
...
@@ -71,7 +71,7 @@ void DIMENSION::Copy( DIMENSION* source )
m_Pos
=
source
->
m_Pos
;
m_Pos
=
source
->
m_Pos
;
m_Shape
=
source
->
m_Shape
;
m_Shape
=
source
->
m_Shape
;
m_Unit
=
source
->
m_Unit
;
m_Unit
=
source
->
m_Unit
;
m_TimeStamp
=
GetNewTimeStamp
(
);
SetTimeStamp
(
GetNewTimeStamp
()
);
m_Text
->
Copy
(
source
->
m_Text
);
m_Text
->
Copy
(
source
->
m_Text
);
m_crossBarOx
=
source
->
m_crossBarOx
;
m_crossBarOx
=
source
->
m_crossBarOx
;
...
...
pcbnew/class_drawsegment.cpp
View file @
b979d1e0
...
@@ -48,7 +48,7 @@ void DRAWSEGMENT::Copy( DRAWSEGMENT* source )
...
@@ -48,7 +48,7 @@ void DRAWSEGMENT::Copy( DRAWSEGMENT* source )
m_End
=
source
->
m_End
;
m_End
=
source
->
m_End
;
m_Shape
=
source
->
m_Shape
;
m_Shape
=
source
->
m_Shape
;
m_Angle
=
source
->
m_Angle
;
m_Angle
=
source
->
m_Angle
;
m_TimeStamp
=
source
->
m_TimeStamp
;
SetTimeStamp
(
source
->
m_TimeStamp
)
;
m_BezierC1
=
source
->
m_BezierC1
;
m_BezierC1
=
source
->
m_BezierC1
;
m_BezierC2
=
source
->
m_BezierC1
;
m_BezierC2
=
source
->
m_BezierC1
;
m_BezierPoints
=
source
->
m_BezierPoints
;
m_BezierPoints
=
source
->
m_BezierPoints
;
...
...
pcbnew/class_drawsegment.h
View file @
b979d1e0
...
@@ -41,6 +41,7 @@ public:
...
@@ -41,6 +41,7 @@ public:
DRAWSEGMENT
*
Back
()
const
{
return
(
DRAWSEGMENT
*
)
Pback
;
}
DRAWSEGMENT
*
Back
()
const
{
return
(
DRAWSEGMENT
*
)
Pback
;
}
void
SetWidth
(
int
aWidth
)
{
m_Width
=
aWidth
;
}
void
SetWidth
(
int
aWidth
)
{
m_Width
=
aWidth
;
}
int
GetWidth
()
const
{
return
m_Width
;
}
void
SetStart
(
const
wxPoint
&
aStart
)
{
m_Start
=
aStart
;
}
void
SetStart
(
const
wxPoint
&
aStart
)
{
m_Start
=
aStart
;
}
...
@@ -52,10 +53,12 @@ public:
...
@@ -52,10 +53,12 @@ public:
* @param aAngle is tenths of degrees, but will soon be degrees.
* @param aAngle is tenths of degrees, but will soon be degrees.
*/
*/
void
SetAngle
(
double
aAngle
);
// encapsulates the transition to degrees
void
SetAngle
(
double
aAngle
);
// encapsulates the transition to degrees
double
GetAngle
()
const
{
return
m_Angle
;
}
void
SetType
(
int
aType
)
{
m_Type
=
aType
;
}
void
SetType
(
int
aType
)
{
m_Type
=
aType
;
}
void
SetShape
(
int
aShape
)
{
m_Shape
=
aShape
;
}
void
SetShape
(
int
aShape
)
{
m_Shape
=
aShape
;
}
int
GetShape
()
const
{
return
m_Shape
;
}
void
SetBezControl1
(
const
wxPoint
&
aPoint
)
{
m_BezierC1
=
aPoint
;
}
void
SetBezControl1
(
const
wxPoint
&
aPoint
)
{
m_BezierC1
=
aPoint
;
}
void
SetBezControl2
(
const
wxPoint
&
aPoint
)
{
m_BezierC2
=
aPoint
;
}
void
SetBezControl2
(
const
wxPoint
&
aPoint
)
{
m_BezierC2
=
aPoint
;
}
...
@@ -104,8 +107,8 @@ public:
...
@@ -104,8 +107,8 @@ public:
*/
*/
MODULE
*
GetParentModule
()
const
;
MODULE
*
GetParentModule
()
const
;
std
::
vector
<
wxPoint
>&
GetBezierPoints
()
{
return
m_BezierPoints
;
};
const
std
::
vector
<
wxPoint
>&
GetBezierPoints
()
const
{
return
m_BezierPoints
;
};
std
::
vector
<
wxPoint
>&
GetPolyPoints
()
{
return
m_PolyPoints
;
};
const
std
::
vector
<
wxPoint
>&
GetPolyPoints
()
const
{
return
m_PolyPoints
;
};
void
SetBezierPoints
(
std
::
vector
<
wxPoint
>&
aPoints
)
void
SetBezierPoints
(
std
::
vector
<
wxPoint
>&
aPoints
)
{
{
...
...
pcbnew/class_edge_mod.cpp
View file @
b979d1e0
...
@@ -223,7 +223,7 @@ void EDGE_MODULE::DisplayInfo( EDA_DRAW_FRAME* frame )
...
@@ -223,7 +223,7 @@ void EDGE_MODULE::DisplayInfo( EDA_DRAW_FRAME* frame )
frame
->
AppendMsgPanel
(
_
(
"Module"
),
module
->
m_Reference
->
m_Text
,
DARKCYAN
);
frame
->
AppendMsgPanel
(
_
(
"Module"
),
module
->
m_Reference
->
m_Text
,
DARKCYAN
);
frame
->
AppendMsgPanel
(
_
(
"Value"
),
module
->
m_Value
->
m_Text
,
BLUE
);
frame
->
AppendMsgPanel
(
_
(
"Value"
),
module
->
m_Value
->
m_Text
,
BLUE
);
msg
.
Printf
(
wxT
(
"%8.8lX"
),
module
->
m_TimeStamp
);
msg
.
Printf
(
wxT
(
"%8.8lX"
),
module
->
GetTimeStamp
()
);
frame
->
AppendMsgPanel
(
_
(
"TimeStamp"
),
msg
,
BROWN
);
frame
->
AppendMsgPanel
(
_
(
"TimeStamp"
),
msg
,
BROWN
);
frame
->
AppendMsgPanel
(
_
(
"Mod Layer"
),
board
->
GetLayerName
(
module
->
GetLayer
()
),
RED
);
frame
->
AppendMsgPanel
(
_
(
"Mod Layer"
),
board
->
GetLayerName
(
module
->
GetLayer
()
),
RED
);
frame
->
AppendMsgPanel
(
_
(
"Seg Layer"
),
board
->
GetLayerName
(
GetLayer
()
),
RED
);
frame
->
AppendMsgPanel
(
_
(
"Seg Layer"
),
board
->
GetLayerName
(
GetLayer
()
),
RED
);
...
...
pcbnew/class_mire.cpp
View file @
b979d1e0
...
@@ -50,7 +50,7 @@ void PCB_TARGET::Copy( PCB_TARGET* source )
...
@@ -50,7 +50,7 @@ void PCB_TARGET::Copy( PCB_TARGET* source )
m_Pos
=
source
->
m_Pos
;
m_Pos
=
source
->
m_Pos
;
m_Shape
=
source
->
m_Shape
;
m_Shape
=
source
->
m_Shape
;
m_Size
=
source
->
m_Size
;
m_Size
=
source
->
m_Size
;
m_TimeStamp
=
GetNewTimeStamp
(
);
SetTimeStamp
(
GetNewTimeStamp
()
);
}
}
...
...
pcbnew/class_module.cpp
View file @
b979d1e0
...
@@ -125,7 +125,7 @@ void MODULE::Copy( MODULE* aModule )
...
@@ -125,7 +125,7 @@ void MODULE::Copy( MODULE* aModule )
m_LastEdit_Time
=
aModule
->
m_LastEdit_Time
;
m_LastEdit_Time
=
aModule
->
m_LastEdit_Time
;
m_Link
=
aModule
->
m_Link
;
m_Link
=
aModule
->
m_Link
;
m_Path
=
aModule
->
m_Path
;
//is this correct behavior?
m_Path
=
aModule
->
m_Path
;
//is this correct behavior?
m_TimeStamp
=
GetNewTimeStamp
(
);
SetTimeStamp
(
GetNewTimeStamp
()
);
m_LocalClearance
=
aModule
->
m_LocalClearance
;
m_LocalClearance
=
aModule
->
m_LocalClearance
;
m_LocalSolderMaskMargin
=
aModule
->
m_LocalSolderMaskMargin
;
m_LocalSolderMaskMargin
=
aModule
->
m_LocalSolderMaskMargin
;
...
...
pcbnew/class_module.h
View file @
b979d1e0
...
@@ -23,22 +23,22 @@ class D_PAD;
...
@@ -23,22 +23,22 @@ class D_PAD;
class
BOARD
;
class
BOARD
;
enum
Mod_Attribut
/* Attributes used for modules */
/**
* Enum MODULE_ATTR_T
* is the set of attributes allowed within a MODULE, using MODULE::SetAttributes()
* and MODULE::GetAttributes(). These are to be ORed together when calling
* MODULE::SetAttrbute()
*/
enum
MODULE_ATTR_T
{
{
MOD_DEFAULT
=
0
,
/
* Type default */
MOD_DEFAULT
=
0
,
/
//< default
MOD_CMS
=
1
,
/
*
Set for modules listed in the automatic insertion list
MOD_CMS
=
1
,
/
//<
Set for modules listed in the automatic insertion list
* (usually SMD footprints) */
///< (usually SMD footprints)
MOD_VIRTUAL
=
2
/
*
Virtual component: when created by copper shapes on
MOD_VIRTUAL
=
2
/
//<
Virtual component: when created by copper shapes on
* board (Like edge card connectors, mounting hole...) */
///< board (Like edge card connectors, mounting hole...)
};
};
/* flags for autoplace and autoroute (.m_ModuleStatus member) */
#define MODULE_is_LOCKED 0x01
/* module LOCKED: no autoplace allowed */
#define MODULE_is_PLACED 0x02
/* In autoplace: module automatically placed */
#define MODULE_to_PLACE 0x04
/* In autoplace: module waiting for autoplace */
class
MODULE
:
public
BOARD_ITEM
class
MODULE
:
public
BOARD_ITEM
{
{
...
@@ -53,22 +53,33 @@ public:
...
@@ -53,22 +53,33 @@ public:
wxString
m_LibRef
;
/* Name of the module in library (and
wxString
m_LibRef
;
/* Name of the module in library (and
* the default value when loading a
* the default value when loading a
* module from the library) */
* module from the library) */
wxString
m_AlternateReference
;
/* Used when m_Reference cannot
wxString
m_AlternateReference
;
/* Used when m_Reference cannot
* be used to identify the
* be used to identify the
* footprint ( after a full
* footprint ( after a full
* reannotation of the schematic */
* reannotation of the schematic */
int
m_Attributs
;
/
* Flag bits ( see Mod_Attribut ) */
int
m_Attributs
;
/
//< Flag bits ( see Mod_Attribut )
int
flag
;
/* Use to trace ratsnest and auto routing. */
int
flag
;
/* Use to trace ratsnest and auto routing. */
int
m_ModuleStatus
;
/* For autoplace: flags (LOCKED, AUTOPLACED) */
int
m_ModuleStatus
;
///< For autoplace: flags (LOCKED, AUTOPLACED)
// m_ModuleStatus bits:
#define MODULE_is_LOCKED 0x01 ///< module LOCKED: no autoplace allowed
#define MODULE_is_PLACED 0x02 ///< In autoplace: module automatically placed
#define MODULE_to_PLACE 0x04 ///< In autoplace: module waiting for autoplace
EDA_RECT
m_BoundaryBox
;
// Bounding box : coordinates on board, real orientation.
EDA_RECT
m_BoundaryBox
;
// Bounding box : coordinates on board, real orientation.
int
m_PadNum
;
// Pad count
int
m_PadNum
;
// Pad count
int
m_AltPadNum
;
/* Pad with netcode > 0 (active pads) count */
int
m_AltPadNum
;
/* Pad with netcode > 0 (active pads) count */
int
m_CntRot90
;
/* Automatic placement : cost ( 0..10 )
int
m_CntRot90
;
///< Automatic placement : cost ( 0..10 )
* for 90 degrees rotation (Horiz<->Vertical) */
///< for 90 degrees rotation (Horiz<->Vertical)
int
m_CntRot180
;
/* Automatic placement : cost ( 0..10 )
* for 180 degrees rotation (UP <->Down) */
int
m_CntRot180
;
///< Automatic placement : cost ( 0..10 )
///< for 180 degrees rotation (UP <->Down)
wxSize
m_Ext
;
/* Automatic placement margin around the module */
wxSize
m_Ext
;
/* Automatic placement margin around the module */
double
m_Surface
;
// Bounding box area
double
m_Surface
;
// Bounding box area
...
@@ -79,16 +90,16 @@ public:
...
@@ -79,16 +90,16 @@ public:
wxString
m_Doc
;
// Module Description (info for users)
wxString
m_Doc
;
// Module Description (info for users)
wxString
m_KeyWord
;
// Keywords to select the module in lib
wxString
m_KeyWord
;
// Keywords to select the module in lib
// Local clearance. When null, the netclasses values are used. Usually
// Local tolerances. When zero, this means the corresponding netclass value
// the local clearance is null
// is used. Usually theses local tolerances zero, in deference to the
// corresponding netclass values.
int
m_LocalClearance
;
int
m_LocalClearance
;
int
m_LocalSolderMaskMargin
;
///< Solder mask margin
int
m_LocalSolderPasteMargin
;
///< Solder paste margin
///< absolute value
// Local mask margins: when NULL, the global design values are used
double
m_LocalSolderPasteMarginRatio
;
///< Solder mask margin ratio
int
m_LocalSolderMaskMargin
;
// Solder mask margin
///< value of pad size
int
m_LocalSolderPasteMargin
;
/* Solder paste margin
* absolute value */
double
m_LocalSolderPasteMarginRatio
;
/* Solder mask margin ratio
* value of pad size */
// The final margin is the sum of these 2 values
// The final margin is the sum of these 2 values
public
:
public
:
...
@@ -139,9 +150,35 @@ public:
...
@@ -139,9 +150,35 @@ public:
void
SetPosition
(
const
wxPoint
&
aPos
);
// overload
void
SetPosition
(
const
wxPoint
&
aPos
);
// overload
void
SetOrientation
(
int
newangle
);
void
SetOrientation
(
int
newangle
);
int
GetOrientation
()
const
{
return
m_Orient
;
}
int
GetOrientation
()
const
{
return
m_Orient
;
}
const
wxString
&
GetLibRef
()
const
{
return
m_LibRef
;
}
void
SetLibRef
(
const
wxString
&
aLibRef
)
{
m_LibRef
=
aLibRef
;
}
const
wxString
&
GetDescription
()
const
{
return
m_Doc
;
}
void
SetDescription
(
const
wxString
&
aDoc
)
{
m_Doc
=
aDoc
;
}
const
wxString
&
GetKeywords
()
const
{
return
m_KeyWord
;
}
void
SetKeywords
(
const
wxString
&
aKeywords
)
{
m_KeyWord
=
aKeywords
;
}
const
wxString
&
GetPath
()
const
{
return
m_Path
;
}
void
SetPath
(
const
wxString
&
aPath
)
{
m_Path
=
aPath
;
}
int
GetLocalSolderMaskMargin
()
const
{
return
m_LocalSolderMaskMargin
;
}
void
SetLocalSolderMaskMargin
(
int
aMargin
)
{
m_LocalSolderMaskMargin
=
aMargin
;
}
int
GetLocalClearance
()
const
{
return
m_LocalClearance
;
}
void
SetLocalClearance
(
int
aClearance
)
{
m_LocalClearance
=
aClearance
;
}
int
GetLocalSolderPasteMargin
()
const
{
return
m_LocalSolderPasteMargin
;
}
void
SetLocalSolderPasteMargin
(
int
aMargin
)
{
m_LocalSolderPasteMargin
=
aMargin
;
}
double
GetLocalSolderPasteMarginRatio
()
const
{
return
m_LocalSolderPasteMarginRatio
;
}
void
SetLocalSolderPasteMarginRatio
(
double
aRatio
)
{
m_LocalSolderPasteMarginRatio
=
aRatio
;
}
int
GetAttributes
()
const
{
return
m_Attributs
;
}
void
SetAttributes
(
int
aAttributes
)
{
m_Attributs
=
aAttributes
;
}
/**
/**
* Function Move
* Function Move
* move this object.
* move this object.
...
@@ -177,11 +214,11 @@ public:
...
@@ -177,11 +214,11 @@ public:
/**
/**
* Function SetLocked
* Function SetLocked
* sets the MODULE_is_LOCKED bit in the m_ModuleStatus
* sets the MODULE_is_LOCKED bit in the m_ModuleStatus
* @param
set
Locked When true means turn on locked status, else unlock
* @param
is
Locked When true means turn on locked status, else unlock
*/
*/
void
SetLocked
(
bool
set
Locked
)
void
SetLocked
(
bool
is
Locked
)
{
{
if
(
set
Locked
)
if
(
is
Locked
)
m_ModuleStatus
|=
MODULE_is_LOCKED
;
m_ModuleStatus
|=
MODULE_is_LOCKED
;
else
else
m_ModuleStatus
&=
~
MODULE_is_LOCKED
;
m_ModuleStatus
&=
~
MODULE_is_LOCKED
;
...
@@ -197,6 +234,7 @@ public:
...
@@ -197,6 +234,7 @@ public:
}
}
void
SetLastEditTime
(
long
aTime
)
{
m_LastEdit_Time
=
aTime
;
}
void
SetLastEditTime
(
long
aTime
)
{
m_LastEdit_Time
=
aTime
;
}
long
GetLastEditTime
()
const
{
return
m_LastEdit_Time
;
}
/* Reading and writing data on files */
/* Reading and writing data on files */
...
@@ -340,7 +378,7 @@ public:
...
@@ -340,7 +378,7 @@ public:
virtual
BITMAP_DEF
GetMenuImage
()
const
{
return
module_xpm
;
}
virtual
BITMAP_DEF
GetMenuImage
()
const
{
return
module_xpm
;
}
#if defined(DEBUG)
#if defined(DEBUG)
/**
/**
* Function Show
* Function Show
...
...
pcbnew/class_module_transform_functions.cpp
View file @
b979d1e0
...
@@ -150,7 +150,7 @@ void MODULE::Rotate(const wxPoint& aRotCentre, int aAngle)
...
@@ -150,7 +150,7 @@ void MODULE::Rotate(const wxPoint& aRotCentre, int aAngle)
wxPoint
newpos
=
m_Pos
;
wxPoint
newpos
=
m_Pos
;
RotatePoint
(
&
newpos
,
aRotCentre
,
aAngle
);
RotatePoint
(
&
newpos
,
aRotCentre
,
aAngle
);
SetPosition
(
newpos
);
SetPosition
(
newpos
);
SetOrientation
(
m_Orient
+
aAngle
);
SetOrientation
(
GetOrientation
()
+
aAngle
);
}
}
...
...
pcbnew/class_pad.cpp
View file @
b979d1e0
...
@@ -139,32 +139,33 @@ const wxPoint D_PAD::ReturnShapePos()
...
@@ -139,32 +139,33 @@ const wxPoint D_PAD::ReturnShapePos()
}
}
/* Return pad name as string in a wxString
const
wxString
D_PAD
::
GetPadName
()
const
*/
wxString
D_PAD
::
ReturnStringPadName
()
const
{
{
wxString
name
;
// Return pad name as wxString, assume it starts as a non-terminated
// utf8 character sequence
char
temp
[
sizeof
(
m_Padname
)
+
1
];
// a place to terminate with '\0'
strncpy
(
temp
,
m_Padname
,
sizeof
(
m_Padname
)
);
ReturnStringPadName
(
name
);
temp
[
sizeof
(
m_Padname
)]
=
0
;
return
name
;
return
FROM_UTF8
(
temp
);
}
}
/* Return pad name as string in a buffer
*/
void
D_PAD
::
ReturnStringPadName
(
wxString
&
text
)
const
void
D_PAD
::
ReturnStringPadName
(
wxString
&
text
)
const
{
{
int
ii
;
// Return pad name as wxString, assume it starts as a non-terminated
// utf8 character sequence
text
.
Empty
();
char
temp
[
sizeof
(
m_Padname
)
+
1
];
// a place to terminate with '\0'
for
(
ii
=
0
;
ii
<
4
;
ii
++
)
strncpy
(
temp
,
m_Padname
,
sizeof
(
m_Padname
)
);
{
if
(
m_Padname
[
ii
]
==
0
)
break
;
text
.
Append
(
m_Padname
[
ii
]
);
temp
[
sizeof
(
m_Padname
)]
=
0
;
}
text
=
FROM_UTF8
(
temp
);
}
}
...
@@ -712,7 +713,7 @@ wxString D_PAD::GetSelectMenuText() const
...
@@ -712,7 +713,7 @@ wxString D_PAD::GetSelectMenuText() const
padlayers
=
_
(
"???"
);
padlayers
=
_
(
"???"
);
text
.
Printf
(
_
(
"Pad [%s] (%s) of %s"
),
text
.
Printf
(
_
(
"Pad [%s] (%s) of %s"
),
GetChars
(
ReturnString
PadName
()
),
GetChars
(
padlayers
),
GetChars
(
Get
PadName
()
),
GetChars
(
padlayers
),
GetChars
((
(
MODULE
*
)
GetParent
()
)
->
GetReference
()
)
);
GetChars
((
(
MODULE
*
)
GetParent
()
)
->
GetReference
()
)
);
return
text
;
return
text
;
...
...
pcbnew/class_pad.h
View file @
b979d1e0
...
@@ -117,6 +117,7 @@ public:
...
@@ -117,6 +117,7 @@ public:
int
m_ShapeMaxRadius
;
// radius of the circle containing the pad shape
int
m_ShapeMaxRadius
;
// radius of the circle containing the pad shape
int
m_Attribut
;
// NORMAL, PAD_SMD, PAD_CONN, PAD_HOLE_NOT_PLATED
int
m_Attribut
;
// NORMAL, PAD_SMD, PAD_CONN, PAD_HOLE_NOT_PLATED
int
m_Orient
;
// in 1/10 degrees
int
m_Orient
;
// in 1/10 degrees
static
int
m_PadSketchModePenSize
;
// Pen size used to draw pads in sketch mode
static
int
m_PadSketchModePenSize
;
// Pen size used to draw pads in sketch mode
// (mode used to print pads on silkscreen layer)
// (mode used to print pads on silkscreen layer)
...
@@ -147,22 +148,22 @@ public:
...
@@ -147,22 +148,22 @@ public:
D_PAD
*
Next
()
{
return
(
D_PAD
*
)
Pnext
;
}
D_PAD
*
Next
()
{
return
(
D_PAD
*
)
Pnext
;
}
/**
/**
* Function
G
etNetname
* Function
S
etNetname
* @
return const wxString * , a pointer to the full
netname
* @
param aNetname: the new
netname
*/
*/
wxString
GetNetname
()
const
{
return
m_Netname
;
}
void
SetNetname
(
const
wxString
&
aNetname
);
/**
/**
* Function Get
Short
Netname
* Function GetNetname
* @return const wxString
* , a pointer to the short
netname
* @return const wxString
& - the full
netname
*/
*/
wxString
GetShortNetname
()
const
{
return
m_Short
Netname
;
}
const
wxString
&
GetNetname
()
const
{
return
m_
Netname
;
}
/**
/**
* Function
Se
tNetname
* Function
GetShor
tNetname
* @
param aNetname: the new
netname
* @
return const wxString& - the short
netname
*/
*/
void
SetNetname
(
const
wxString
&
aNetname
);
const
wxString
&
GetShortNetname
()
const
{
return
m_ShortNetname
;
}
/**
/**
* Function GetShape
* Function GetShape
...
@@ -171,18 +172,26 @@ public:
...
@@ -171,18 +172,26 @@ public:
int
GetShape
()
const
{
return
m_PadShape
&
0xFF
;
}
int
GetShape
()
const
{
return
m_PadShape
&
0xFF
;
}
void
SetShape
(
int
aShape
)
{
m_PadShape
=
aShape
;
}
void
SetShape
(
int
aShape
)
{
m_PadShape
=
aShape
;
}
void
SetPosition
(
const
wxPoint
&
aPos
)
{
m_Pos
=
aPos
;
}
// overload
const
wxPoint
GetPosition
()
const
// overload
const
wxPoint
GetPosition
()
const
// overload
{
{
return
m_Pos
;
return
m_Pos
;
}
}
void
SetPosition
(
const
wxPoint
&
aPos
)
{
m_Pos
=
aPos
;
}
// overload
void
SetPos0
(
const
wxPoint
&
aPos
)
{
m_Pos0
=
aPos
;
}
void
SetPos0
(
const
wxPoint
&
aPos
)
{
m_Pos0
=
aPos
;
}
const
wxPoint
&
GetPos0
()
const
{
return
m_Pos0
;
}
void
SetSize
(
const
wxSize
&
aSize
)
{
m_Size
=
aSize
;
}
void
SetSize
(
const
wxSize
&
aSize
)
{
m_Size
=
aSize
;
}
const
wxSize
&
GetSize
()
const
{
return
m_Size
;
}
void
SetDelta
(
const
wxSize
&
aSize
)
{
m_DeltaSize
=
aSize
;
}
void
SetDelta
(
const
wxSize
&
aSize
)
{
m_DeltaSize
=
aSize
;
}
const
wxSize
&
GetDelta
()
const
{
return
m_DeltaSize
;
}
void
SetDrillSize
(
const
wxSize
&
aSize
)
{
m_Drill
=
aSize
;
}
void
SetDrillSize
(
const
wxSize
&
aSize
)
{
m_Drill
=
aSize
;
}
const
wxSize
&
GetDrillSize
()
const
{
return
m_Drill
;
}
void
SetOffset
(
const
wxSize
&
aOffset
)
{
m_Offset
=
aOffset
;
}
void
SetOffset
(
const
wxSize
&
aOffset
)
{
m_Offset
=
aOffset
;
}
const
wxSize
&
GetOffset
()
const
{
return
m_Offset
;
}
/**
/**
* Function SetOrientation
* Function SetOrientation
...
@@ -198,15 +207,29 @@ public:
...
@@ -198,15 +207,29 @@ public:
double
GetOrientation
()
const
{
return
m_Orient
;
}
double
GetOrientation
()
const
{
return
m_Orient
;
}
void
SetDrillShape
(
int
aDrillShape
)
{
m_DrillShape
=
aDrillShape
;
}
void
SetDrillShape
(
int
aDrillShape
)
{
m_DrillShape
=
aDrillShape
;
}
int
GetDrillShape
()
const
{
return
m_DrillShape
;
}
void
SetLayerMask
(
int
aLayerMask
)
{
m_layerMask
=
aLayerMask
;
}
void
SetLayerMask
(
int
aLayerMask
)
{
m_layerMask
=
aLayerMask
;
}
int
GetLayerMask
()
const
{
return
m_layerMask
;
}
void
SetAttribute
(
int
aAttribute
)
{
m_Attribut
=
aAttribute
;
}
void
SetAttribute
(
int
aAttribute
)
{
m_Attribut
=
aAttribute
;
}
int
GetAttribute
()
const
{
return
m_Attribut
;
}
void
SetDieLength
(
int
aLength
)
{
m_LengthDie
=
aLength
;
}
void
SetDieLength
(
int
aLength
)
{
m_LengthDie
=
aLength
;
}
void
SetSolderMaskMargin
(
int
aLength
)
{
m_LocalSolderMaskMargin
=
aLength
;
}
int
GetDieLength
()
const
{
return
m_LengthDie
;
}
void
SetSolderPasteMargin
(
int
aLength
)
{
m_LocalSolderPasteMargin
=
aLength
;
}
void
SetSolderPasteRatio
(
double
aRatio
)
{
m_LocalSolderPasteMarginRatio
=
aRatio
;
}
int
GetLocalSolderMaskMargin
()
const
{
return
m_LocalSolderMaskMargin
;
}
void
SetLocalSolderMaskMargin
(
int
aMargin
)
{
m_LocalSolderMaskMargin
=
aMargin
;
}
int
GetLocalClearance
()
const
{
return
m_LocalClearance
;
}
void
SetLocalClearance
(
int
aClearance
)
{
m_LocalClearance
=
aClearance
;
}
int
GetLocalSolderPasteMargin
()
const
{
return
m_LocalSolderPasteMargin
;
}
void
SetLocalSolderPasteMargin
(
int
aMargin
)
{
m_LocalSolderPasteMargin
=
aMargin
;
}
double
GetLocalSolderPasteMarginRatio
()
const
{
return
m_LocalSolderPasteMarginRatio
;
}
void
SetLocalSolderPasteMarginRatio
(
double
aRatio
)
{
m_LocalSolderPasteMarginRatio
=
aRatio
;
}
/// A local override of the Module's clearance
void
SetPadClearance
(
int
aLength
)
{
m_LocalClearance
=
aLength
;
}
/**
/**
* Function TransformShapeWithClearanceToPolygon
* Function TransformShapeWithClearanceToPolygon
...
@@ -324,11 +347,9 @@ public:
...
@@ -324,11 +347,9 @@ public:
*/
*/
int
BuildSegmentFromOvalShape
(
wxPoint
&
aSegStart
,
wxPoint
&
aSegEnd
,
int
aRotation
)
const
;
int
BuildSegmentFromOvalShape
(
wxPoint
&
aSegStart
,
wxPoint
&
aSegEnd
,
int
aRotation
)
const
;
// others
void
SetPadName
(
const
wxString
&
name
);
// Change pad name
void
SetPadName
(
const
wxString
&
name
);
// Change pad name
void
SetPadName
(
const
char
*
aName
);
void
SetPadName
(
const
char
*
aName
);
const
wxString
GetPadName
()
const
;
wxString
ReturnStringPadName
()
const
;
// Return pad name as string in a wxString
void
ReturnStringPadName
(
wxString
&
text
)
const
;
// Return pad name as string in a buffer
void
ReturnStringPadName
(
wxString
&
text
)
const
;
// Return pad name as string in a buffer
...
...
pcbnew/class_text_mod.h
View file @
b979d1e0
...
@@ -27,14 +27,19 @@ class MODULE;
...
@@ -27,14 +27,19 @@ class MODULE;
class
TEXTE_MODULE
:
public
BOARD_ITEM
,
public
EDA_TEXT
class
TEXTE_MODULE
:
public
BOARD_ITEM
,
public
EDA_TEXT
{
{
/* Note: orientation in 1/10 deg relative to the footprint
// @todo eliminate these friends, make them use accessors
friend
class
MODULE
;
friend
class
FOOTPRINT_EDIT_FRAME
;
/* Note: orientation in 1/10 deg relative to the footprint
* Physical orient is m_Orient + m_Parent->m_Orient
* Physical orient is m_Orient + m_Parent->m_Orient
*/
*/
public
:
wxPoint
m_Pos0
;
// text coordinates relatives to the footprint anchor, orient 0
int
m_Type
;
///< 0=ref, 1=val, etc.
// Text coordinate ref point is the text centre
bool
m_NoShow
;
///< true = invisible
char
m_Type
;
// 0: ref,1: val, others = 2..255
bool
m_NoShow
;
// true = invisible
wxPoint
m_Pos0
;
///< text coordinates relatives to the footprint anchor, orient 0.
///< text coordinate ref point is the text centre
public
:
public
:
TEXTE_MODULE
(
MODULE
*
parent
,
int
text_type
=
TEXT_is_DIVERS
);
TEXTE_MODULE
(
MODULE
*
parent
,
int
text_type
=
TEXT_is_DIVERS
);
...
@@ -45,6 +50,11 @@ public:
...
@@ -45,6 +50,11 @@ public:
TEXTE_MODULE
*
Back
()
const
{
return
(
TEXTE_MODULE
*
)
Pback
;
}
TEXTE_MODULE
*
Back
()
const
{
return
(
TEXTE_MODULE
*
)
Pback
;
}
void
SetPosition
(
const
wxPoint
&
aPos
)
// overload a base
{
m_Pos
=
aPos
;
// in EDA_TEXT
}
const
wxPoint
GetPosition
()
const
// overload a base
const
wxPoint
GetPosition
()
const
// overload a base
{
{
return
m_Pos
;
// from EDA_TEXT
return
m_Pos
;
// from EDA_TEXT
...
@@ -52,16 +62,13 @@ public:
...
@@ -52,16 +62,13 @@ public:
/// @deprecated it seems
/// @deprecated it seems
void
SetType
(
int
aType
)
{
m_Type
=
aType
;
}
void
SetType
(
int
aType
)
{
m_Type
=
aType
;
}
int
GetType
()
const
{
return
m_Type
;
}
void
SetPosition
(
const
wxPoint
&
aPos
)
// overload a base
{
m_Pos
=
aPos
;
// in EDA_TEXT
}
void
SetVisible
(
bool
isVisible
)
{
m_NoShow
=
!
isVisible
;
}
void
SetVisible
(
bool
isVisible
)
{
m_NoShow
=
!
isVisible
;
}
bool
IsVisible
()
const
{
return
!
m_NoShow
;
}
bool
IsVisible
()
const
{
return
!
m_NoShow
;
}
void
SetPos0
(
const
wxPoint
&
aPos
)
{
m_Pos0
=
aPos
;
}
void
SetPos0
(
const
wxPoint
&
aPos
)
{
m_Pos0
=
aPos
;
}
const
wxPoint
&
GetPos0
()
const
{
return
m_Pos0
;
}
void
Copy
(
TEXTE_MODULE
*
source
);
// copy structure
void
Copy
(
TEXTE_MODULE
*
source
);
// copy structure
...
...
pcbnew/class_track.cpp
View file @
b979d1e0
...
@@ -230,7 +230,7 @@ TRACK::TRACK( const TRACK& Source ) :
...
@@ -230,7 +230,7 @@ TRACK::TRACK( const TRACK& Source ) :
SetNet
(
Source
.
GetNet
()
);
SetNet
(
Source
.
GetNet
()
);
m_Flags
=
Source
.
m_Flags
;
m_Flags
=
Source
.
m_Flags
;
m_TimeStamp
=
Source
.
m_TimeStamp
;
SetTimeStamp
(
Source
.
m_TimeStamp
)
;
SetStatus
(
Source
.
ReturnStatus
()
);
SetStatus
(
Source
.
ReturnStatus
()
);
m_Start
=
Source
.
m_Start
;
m_Start
=
Source
.
m_Start
;
m_End
=
Source
.
m_End
;
m_End
=
Source
.
m_End
;
...
...
pcbnew/class_zone.cpp
View file @
b979d1e0
...
@@ -815,7 +815,7 @@ void ZONE_CONTAINER::Copy( ZONE_CONTAINER* src )
...
@@ -815,7 +815,7 @@ void ZONE_CONTAINER::Copy( ZONE_CONTAINER* src )
m_Parent
=
src
->
m_Parent
;
m_Parent
=
src
->
m_Parent
;
m_Layer
=
src
->
m_Layer
;
m_Layer
=
src
->
m_Layer
;
SetNet
(
src
->
GetNet
()
);
SetNet
(
src
->
GetNet
()
);
m_TimeStamp
=
src
->
m_TimeStamp
;
SetTimeStamp
(
src
->
m_TimeStamp
)
;
m_Poly
->
RemoveAllContours
();
m_Poly
->
RemoveAllContours
();
m_Poly
->
Copy
(
src
->
m_Poly
);
// copy outlines
m_Poly
->
Copy
(
src
->
m_Poly
);
// copy outlines
m_CornerSelection
=
-
1
;
// For corner moving, corner index to drag, or -1 if no selection
m_CornerSelection
=
-
1
;
// For corner moving, corner index to drag, or -1 if no selection
...
...
pcbnew/collectors.cpp
View file @
b979d1e0
...
@@ -270,7 +270,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, const void* testDa
...
@@ -270,7 +270,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, const void* testDa
case
PCB_MODULE_TEXT_T
:
case
PCB_MODULE_TEXT_T
:
module
=
(
MODULE
*
)
item
->
GetParent
();
module
=
(
MODULE
*
)
item
->
GetParent
();
if
(
m_Guide
->
IgnoreMTextsMarkedNoShow
()
&&
(
(
TEXTE_MODULE
*
)
item
)
->
m_NoShow
)
if
(
m_Guide
->
IgnoreMTextsMarkedNoShow
()
&&
!
(
(
TEXTE_MODULE
*
)
item
)
->
IsVisible
()
)
goto
exit
;
goto
exit
;
if
(
module
)
if
(
module
)
...
...
pcbnew/controle.cpp
View file @
b979d1e0
...
@@ -168,14 +168,14 @@ BOARD_ITEM* PCB_BASE_FRAME::PcbGeneralLocateAndDisplay( int aHotKeyCode )
...
@@ -168,14 +168,14 @@ BOARD_ITEM* PCB_BASE_FRAME::PcbGeneralLocateAndDisplay( int aHotKeyCode )
continue
;
continue
;
/* Found a TYPE ZONE */
/* Found a TYPE ZONE */
if
(
item
->
m_TimeStamp
==
timestampzone
)
// Remove it, redundant, zone already found
if
(
item
->
GetTimeStamp
()
==
timestampzone
)
// Remove it, redundant, zone already found
{
{
m_Collector
->
Remove
(
ii
);
m_Collector
->
Remove
(
ii
);
ii
--
;
ii
--
;
}
}
else
else
{
{
timestampzone
=
item
->
m_TimeStamp
;
timestampzone
=
item
->
GetTimeStamp
()
;
}
}
}
}
...
...
pcbnew/cross-probing.cpp
View file @
b979d1e0
...
@@ -164,7 +164,7 @@ void PCB_EDIT_FRAME::SendMessageToEESCHEMA( BOARD_ITEM* objectToSync )
...
@@ -164,7 +164,7 @@ void PCB_EDIT_FRAME::SendMessageToEESCHEMA( BOARD_ITEM* objectToSync )
case
PCB_PAD_T
:
case
PCB_PAD_T
:
module
=
(
MODULE
*
)
objectToSync
->
GetParent
();
module
=
(
MODULE
*
)
objectToSync
->
GetParent
();
pad
=
(
D_PAD
*
)
objectToSync
;
pad
=
(
D_PAD
*
)
objectToSync
;
msg
=
pad
->
ReturnString
PadName
();
msg
=
pad
->
Get
PadName
();
sprintf
(
cmd
,
"$PART:
\"
%s
\"
$PAD:
\"
%s
\"
"
,
sprintf
(
cmd
,
"$PART:
\"
%s
\"
$PAD:
\"
%s
\"
"
,
TO_UTF8
(
module
->
m_Reference
->
m_Text
),
TO_UTF8
(
module
->
m_Reference
->
m_Text
),
TO_UTF8
(
msg
)
);
TO_UTF8
(
msg
)
);
...
@@ -176,9 +176,9 @@ void PCB_EDIT_FRAME::SendMessageToEESCHEMA( BOARD_ITEM* objectToSync )
...
@@ -176,9 +176,9 @@ void PCB_EDIT_FRAME::SendMessageToEESCHEMA( BOARD_ITEM* objectToSync )
module
=
(
MODULE
*
)
objectToSync
->
GetParent
();
module
=
(
MODULE
*
)
objectToSync
->
GetParent
();
text_mod
=
(
TEXTE_MODULE
*
)
objectToSync
;
text_mod
=
(
TEXTE_MODULE
*
)
objectToSync
;
if
(
text_mod
->
m_Type
==
REFERENCE
)
if
(
text_mod
->
GetType
()
==
REFERENCE
)
text_key
=
"$REF:"
;
text_key
=
"$REF:"
;
else
if
(
text_mod
->
m_Type
==
VALUE
)
else
if
(
text_mod
->
GetType
()
==
VALUE
)
text_key
=
"$VAL:"
;
text_key
=
"$VAL:"
;
else
else
break
;
break
;
...
...
pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp
View file @
b979d1e0
...
@@ -143,10 +143,9 @@ void DIALOG_MODULE_BOARD_EDITOR::OnCancelClick( wxCommandEvent& event )
...
@@ -143,10 +143,9 @@ void DIALOG_MODULE_BOARD_EDITOR::OnCancelClick( wxCommandEvent& event )
void
DIALOG_MODULE_BOARD_EDITOR
::
GotoModuleEditor
(
wxCommandEvent
&
event
)
void
DIALOG_MODULE_BOARD_EDITOR
::
GotoModuleEditor
(
wxCommandEvent
&
event
)
{
{
if
(
m_CurrentModule
->
m_TimeStamp
==
0
)
// Module Editor needs a non
if
(
m_CurrentModule
->
GetTimeStamp
()
==
0
)
// Module Editor needs a non null timestamp
// null timestamp
{
{
m_CurrentModule
->
m_TimeStamp
=
GetNewTimeStamp
(
);
m_CurrentModule
->
SetTimeStamp
(
GetNewTimeStamp
()
);
m_Parent
->
OnModify
();
m_Parent
->
OnModify
();
}
}
...
...
pcbnew/dialogs/dialog_edit_module_text.cpp
View file @
b979d1e0
...
@@ -108,11 +108,11 @@ void DialogEditModuleText::initDlg( )
...
@@ -108,11 +108,11 @@ void DialogEditModuleText::initDlg( )
m_ModuleInfoText
->
SetLabel
(
msg
);
m_ModuleInfoText
->
SetLabel
(
msg
);
if
(
m_currentText
->
m_Type
==
TEXT_is_VALUE
)
if
(
m_currentText
->
GetType
()
==
TEXT_is_VALUE
)
m_TextDataTitle
->
SetLabel
(
_
(
"Value:"
)
);
m_TextDataTitle
->
SetLabel
(
_
(
"Value:"
)
);
else
if
(
m_currentText
->
m_Type
==
TEXT_is_DIVERS
)
else
if
(
m_currentText
->
GetType
()
==
TEXT_is_DIVERS
)
m_TextDataTitle
->
SetLabel
(
_
(
"Text:"
)
);
m_TextDataTitle
->
SetLabel
(
_
(
"Text:"
)
);
else
if
(
m_currentText
->
m_Type
!=
TEXT_is_REFERENCE
)
else
if
(
m_currentText
->
GetType
()
!=
TEXT_is_REFERENCE
)
m_TextDataTitle
->
SetLabel
(
wxT
(
"???"
)
);
m_TextDataTitle
->
SetLabel
(
wxT
(
"???"
)
);
m_Name
->
SetValue
(
m_currentText
->
m_Text
);
m_Name
->
SetValue
(
m_currentText
->
m_Text
);
...
@@ -128,11 +128,11 @@ void DialogEditModuleText::initDlg( )
...
@@ -128,11 +128,11 @@ void DialogEditModuleText::initDlg( )
m_parent
->
m_InternalUnits
);
m_parent
->
m_InternalUnits
);
AddUnitSymbol
(
*
m_PosXTitle
);
AddUnitSymbol
(
*
m_PosXTitle
);
PutValueInLocalUnits
(
*
m_TxtPosCtrlX
,
m_currentText
->
m_Pos0
.
x
,
PutValueInLocalUnits
(
*
m_TxtPosCtrlX
,
m_currentText
->
GetPos0
()
.
x
,
m_parent
->
m_InternalUnits
);
m_parent
->
m_InternalUnits
);
AddUnitSymbol
(
*
m_PosYTitle
);
AddUnitSymbol
(
*
m_PosYTitle
);
PutValueInLocalUnits
(
*
m_TxtPosCtrlY
,
m_currentText
->
m_Pos0
.
y
,
PutValueInLocalUnits
(
*
m_TxtPosCtrlY
,
m_currentText
->
GetPos0
()
.
y
,
m_parent
->
m_InternalUnits
);
m_parent
->
m_InternalUnits
);
AddUnitSymbol
(
*
m_WidthTitle
);
AddUnitSymbol
(
*
m_WidthTitle
);
...
@@ -144,9 +144,8 @@ void DialogEditModuleText::initDlg( )
...
@@ -144,9 +144,8 @@ void DialogEditModuleText::initDlg( )
if
(
(
text_orient
!=
0
)
)
if
(
(
text_orient
!=
0
)
)
m_Orient
->
SetSelection
(
1
);
m_Orient
->
SetSelection
(
1
);
if
(
m_currentText
->
m_NoShow
)
if
(
!
m_currentText
->
IsVisible
()
)
m_Show
->
SetSelection
(
1
);;
m_Show
->
SetSelection
(
1
);;
}
}
...
@@ -167,13 +166,15 @@ void DialogEditModuleText::OnOkClick( wxCommandEvent& event )
...
@@ -167,13 +166,15 @@ void DialogEditModuleText::OnOkClick( wxCommandEvent& event )
m_currentText
->
m_Italic
=
m_Style
->
GetSelection
()
==
1
?
true
:
false
;
m_currentText
->
m_Italic
=
m_Style
->
GetSelection
()
==
1
?
true
:
false
;
wxPoint
tmp
;
msg
=
m_TxtPosCtrlX
->
GetValue
();
msg
=
m_TxtPosCtrlX
->
GetValue
();
m_currentText
->
m_Pos0
.
x
=
ReturnValueFromString
(
g_UserUnit
,
msg
,
tmp
.
x
=
ReturnValueFromString
(
g_UserUnit
,
msg
,
m_parent
->
m_InternalUnits
);
m_parent
->
m_InternalUnits
);
msg
=
m_TxtPosCtrlY
->
GetValue
();
msg
=
m_TxtPosCtrlY
->
GetValue
();
m_currentText
->
m_Pos0
.
y
=
ReturnValueFromString
(
g_UserUnit
,
msg
,
tmp
.
y
=
ReturnValueFromString
(
g_UserUnit
,
msg
,
m_parent
->
m_InternalUnits
);
m_parent
->
m_InternalUnits
);
m_currentText
->
SetPos0
(
tmp
);
msg
=
m_TxtSizeCtrlX
->
GetValue
();
msg
=
m_TxtSizeCtrlX
->
GetValue
();
m_currentText
->
m_Size
.
x
=
ReturnValueFromString
(
g_UserUnit
,
msg
,
m_currentText
->
m_Size
.
x
=
ReturnValueFromString
(
g_UserUnit
,
msg
,
...
@@ -202,7 +203,8 @@ void DialogEditModuleText::OnOkClick( wxCommandEvent& event )
...
@@ -202,7 +203,8 @@ void DialogEditModuleText::OnOkClick( wxCommandEvent& event )
}
}
m_currentText
->
SetThickness
(
width
);
m_currentText
->
SetThickness
(
width
);
m_currentText
->
m_NoShow
=
(
m_Show
->
GetSelection
()
==
0
)
?
0
:
1
;
m_currentText
->
SetVisible
(
m_Show
->
GetSelection
()
==
0
);
int
text_orient
=
(
m_Orient
->
GetSelection
()
==
0
)
?
0
:
900
;
int
text_orient
=
(
m_Orient
->
GetSelection
()
==
0
)
?
0
:
900
;
m_currentText
->
m_Orient
=
text_orient
;
m_currentText
->
m_Orient
=
text_orient
;
...
...
pcbnew/dialogs/dialog_pad_properties.cpp
View file @
b979d1e0
...
@@ -214,7 +214,7 @@ void DIALOG_PAD_PROPERTIES::initValues()
...
@@ -214,7 +214,7 @@ void DIALOG_PAD_PROPERTIES::initValues()
}
}
m_staticTextWarningPadFlipped
->
Show
(
m_isFlipped
);
m_staticTextWarningPadFlipped
->
Show
(
m_isFlipped
);
m_PadNumCtrl
->
SetValue
(
m_dummyPad
->
ReturnString
PadName
()
);
m_PadNumCtrl
->
SetValue
(
m_dummyPad
->
Get
PadName
()
);
m_PadNetNameCtrl
->
SetValue
(
m_dummyPad
->
GetNetname
()
);
m_PadNetNameCtrl
->
SetValue
(
m_dummyPad
->
GetNetname
()
);
// Display current unit name in dialog:
// Display current unit name in dialog:
...
@@ -637,7 +637,7 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event )
...
@@ -637,7 +637,7 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event )
if
(
m_isFlipped
)
if
(
m_isFlipped
)
m_CurrentPad
->
m_layerMask
=
ChangeSideMaskLayer
(
m_CurrentPad
->
m_layerMask
);
m_CurrentPad
->
m_layerMask
=
ChangeSideMaskLayer
(
m_CurrentPad
->
m_layerMask
);
m_CurrentPad
->
SetPadName
(
g_Pad_Master
.
ReturnString
PadName
()
);
m_CurrentPad
->
SetPadName
(
g_Pad_Master
.
Get
PadName
()
);
if
(
m_CurrentPad
->
GetNetname
()
!=
g_Pad_Master
.
GetNetname
()
)
if
(
m_CurrentPad
->
GetNetname
()
!=
g_Pad_Master
.
GetNetname
()
)
{
{
...
...
pcbnew/editmod.cpp
View file @
b979d1e0
...
@@ -102,7 +102,7 @@ void FOOTPRINT_EDIT_FRAME::Place_Ancre( MODULE* pt_mod )
...
@@ -102,7 +102,7 @@ void FOOTPRINT_EDIT_FRAME::Place_Ancre( MODULE* pt_mod )
case
PCB_MODULE_TEXT_T
:
case
PCB_MODULE_TEXT_T
:
#undef STRUCT
#undef STRUCT
#define STRUCT ( (TEXTE_MODULE*) PtStruct )
#define STRUCT ( (TEXTE_MODULE*) PtStruct )
STRUCT
->
m_Pos0
+=
moveVector
;
STRUCT
->
SetPos0
(
STRUCT
->
GetPos0
()
+
moveVector
)
;
break
;
break
;
default
:
default
:
...
@@ -129,13 +129,13 @@ void FOOTPRINT_EDIT_FRAME::RemoveStruct( EDA_ITEM* Item )
...
@@ -129,13 +129,13 @@ void FOOTPRINT_EDIT_FRAME::RemoveStruct( EDA_ITEM* Item )
{
{
TEXTE_MODULE
*
text
=
(
TEXTE_MODULE
*
)
Item
;
TEXTE_MODULE
*
text
=
(
TEXTE_MODULE
*
)
Item
;
if
(
text
->
m_Type
==
TEXT_is_REFERENCE
)
if
(
text
->
GetType
()
==
TEXT_is_REFERENCE
)
{
{
DisplayError
(
this
,
_
(
"Text is REFERENCE!"
)
);
DisplayError
(
this
,
_
(
"Text is REFERENCE!"
)
);
break
;
break
;
}
}
if
(
text
->
m_Type
==
TEXT_is_VALUE
)
if
(
text
->
GetType
()
==
TEXT_is_VALUE
)
{
{
DisplayError
(
this
,
_
(
"Text is VALUE!"
)
);
DisplayError
(
this
,
_
(
"Text is VALUE!"
)
);
break
;
break
;
...
...
pcbnew/edtxtmod.cpp
View file @
b979d1e0
...
@@ -36,7 +36,7 @@ static int TextInitialOrientation; // module text initial orientation for
...
@@ -36,7 +36,7 @@ static int TextInitialOrientation; // module text initial orientation for
/* Add a new graphical text to the active module (footprint)
/* Add a new graphical text to the active module (footprint)
* Note there always are 2 texts: reference and value.
* Note there always are 2 texts: reference and value.
* New texts have the member TEXTE_MODULE.
m_Type
set to TEXT_is_DIVERS
* New texts have the member TEXTE_MODULE.
GetType()
set to TEXT_is_DIVERS
*/
*/
TEXTE_MODULE
*
PCB_BASE_FRAME
::
CreateTextModule
(
MODULE
*
Module
,
wxDC
*
DC
)
TEXTE_MODULE
*
PCB_BASE_FRAME
::
CreateTextModule
(
MODULE
*
Module
,
wxDC
*
DC
)
{
{
...
@@ -118,7 +118,7 @@ void PCB_BASE_FRAME::DeleteTextModule( TEXTE_MODULE* Text )
...
@@ -118,7 +118,7 @@ void PCB_BASE_FRAME::DeleteTextModule( TEXTE_MODULE* Text )
Module
=
(
MODULE
*
)
Text
->
GetParent
();
Module
=
(
MODULE
*
)
Text
->
GetParent
();
if
(
Text
->
m_Type
==
TEXT_is_DIVERS
)
if
(
Text
->
GetType
()
==
TEXT_is_DIVERS
)
{
{
DrawPanel
->
RefreshDrawingRect
(
Text
->
GetBoundingBox
()
);
DrawPanel
->
RefreshDrawingRect
(
Text
->
GetBoundingBox
()
);
Text
->
DeleteStructure
();
Text
->
DeleteStructure
();
...
@@ -226,7 +226,7 @@ void PCB_BASE_FRAME::PlaceTexteModule( TEXTE_MODULE* Text, wxDC* DC )
...
@@ -226,7 +226,7 @@ void PCB_BASE_FRAME::PlaceTexteModule( TEXTE_MODULE* Text, wxDC* DC )
Text
->
m_Pos
=
GetScreen
()
->
GetCrossHairPosition
();
Text
->
m_Pos
=
GetScreen
()
->
GetCrossHairPosition
();
wxPoint
textRelPos
=
Text
->
m_Pos
-
Module
->
m_Pos
;
wxPoint
textRelPos
=
Text
->
m_Pos
-
Module
->
m_Pos
;
RotatePoint
(
&
textRelPos
,
-
Module
->
m_Orient
);
RotatePoint
(
&
textRelPos
,
-
Module
->
m_Orient
);
Text
->
m_Pos0
=
textRelPos
;
Text
->
SetPos0
(
textRelPos
)
;
Text
->
m_Flags
=
0
;
Text
->
m_Flags
=
0
;
Module
->
m_Flags
=
0
;
Module
->
m_Flags
=
0
;
Module
->
m_LastEdit_Time
=
time
(
NULL
);
Module
->
m_LastEdit_Time
=
time
(
NULL
);
...
...
pcbnew/export_gencad.cpp
View file @
b979d1e0
...
@@ -602,8 +602,8 @@ static void CreateComponentsSection( FILE* aFile, BOARD* aPcb )
...
@@ -602,8 +602,8 @@ static void CreateComponentsSection( FILE* aFile, BOARD* aPcb )
SILKSCREEN_N_BACK
:
SILKSCREEN_N_FRONT
];
SILKSCREEN_N_BACK
:
SILKSCREEN_N_FRONT
];
fprintf
(
aFile
,
"TEXT %g %g %g %g %s %s
\"
%s
\"
"
,
fprintf
(
aFile
,
"TEXT %g %g %g %g %s %s
\"
%s
\"
"
,
textmod
->
m_Pos0
.
x
/
SCALE_FACTOR
,
textmod
->
GetPos0
()
.
x
/
SCALE_FACTOR
,
-
textmod
->
m_Pos0
.
y
/
SCALE_FACTOR
,
-
textmod
->
GetPos0
()
.
y
/
SCALE_FACTOR
,
textmod
->
m_Size
.
x
/
SCALE_FACTOR
,
textmod
->
m_Size
.
x
/
SCALE_FACTOR
,
orient
/
10.0
,
orient
/
10.0
,
mirror
,
mirror
,
...
...
pcbnew/export_vrml.cpp
View file @
b979d1e0
...
@@ -834,7 +834,7 @@ static void export_vrml_zones( BOARD* pcb )
...
@@ -834,7 +834,7 @@ static void export_vrml_zones( BOARD* pcb )
static
void
export_vrml_text_module
(
TEXTE_MODULE
*
module
)
/*{{{*/
static
void
export_vrml_text_module
(
TEXTE_MODULE
*
module
)
/*{{{*/
{
{
if
(
!
module
->
m_NoShow
)
if
(
module
->
IsVisible
()
)
{
{
wxSize
size
=
module
->
m_Size
;
wxSize
size
=
module
->
m_Size
;
...
...
pcbnew/ioascii.cpp
View file @
b979d1e0
...
@@ -165,7 +165,7 @@ int PCB_BASE_FRAME::ReadListeSegmentDescr( LINE_READER* aReader,
...
@@ -165,7 +165,7 @@ int PCB_BASE_FRAME::ReadListeSegmentDescr( LINE_READER* aReader,
break
;
break
;
}
}
newTrack
->
m_TimeStamp
=
timeStamp
;
newTrack
->
SetTimeStamp
(
timeStamp
)
;
newTrack
->
m_Start
.
x
=
tempStartX
;
newTrack
->
m_Start
.
x
=
tempStartX
;
newTrack
->
m_Start
.
y
=
tempStartY
;
newTrack
->
m_Start
.
y
=
tempStartY
;
...
...
pcbnew/item_io.cpp
View file @
b979d1e0
...
@@ -1737,7 +1737,7 @@ int ZONE_CONTAINER::ReadDescr( LINE_READER* aReader )
...
@@ -1737,7 +1737,7 @@ int ZONE_CONTAINER::ReadDescr( LINE_READER* aReader )
}
}
else
else
{
{
m_TimeStamp
=
ts
;
SetTimeStamp
(
ts
)
;
SetNet
(
netcode
);
SetNet
(
netcode
);
ReadDelimitedText
(
netname_buffer
,
netname_buffer
,
1024
);
ReadDelimitedText
(
netname_buffer
,
netname_buffer
,
1024
);
m_Netname
=
FROM_UTF8
(
netname_buffer
);
m_Netname
=
FROM_UTF8
(
netname_buffer
);
...
...
pcbnew/kicad_plugin.cpp
View file @
b979d1e0
This diff is collapsed.
Click to expand it.
pcbnew/kicad_plugin.h
View file @
b979d1e0
...
@@ -43,7 +43,7 @@ class TEXTE_MODULE;
...
@@ -43,7 +43,7 @@ class TEXTE_MODULE;
class
EDGE_MODULE
;
class
EDGE_MODULE
;
class
TRACK
;
class
TRACK
;
class
SEGZONE
;
class
SEGZONE
;
class
D_PAD
;
/**
/**
* Class KICAD_PLUGIN
* Class KICAD_PLUGIN
...
@@ -164,21 +164,43 @@ protected:
...
@@ -164,21 +164,43 @@ protected:
//-----<save functions>-----------------------------------------------------
//-----<save functions>-----------------------------------------------------
/**
/**
* Function
checkW
riteError
* Function
w
riteError
*
checks to see if there is an error on the output FILE, and its ability to
*
returns an error message wxString containing the filename being
* c
ontinue saving to disk
.
* c
urrently written
.
*/
*/
void
checkWriteError
(
const
char
*
aCaller
)
const
;
wxString
writeError
()
const
;
int
biuSprintf
(
char
*
buf
,
BIU
aValue
)
const
;
/// convert a BIU to engineering units by scaling and formatting to ASCII.
/// convert a BIU to engineering units by scaling and formatting to ASCII.
std
::
string
biuFmt
(
BIU
aValue
);
std
::
string
fmtBIU
(
BIU
aValue
)
const
;
std
::
string
fmtBIUPair
(
BIU
first
,
BIU
second
)
const
;
std
::
string
fmtBIUPoint
(
const
wxPoint
&
aPoint
)
const
{
return
fmtBIUPair
(
aPoint
.
x
,
aPoint
.
y
);
}
std
::
string
fmtBIUSize
(
const
wxSize
&
aSize
)
const
{
// unfortunately there is inconsistency in the order of saving wxSize,
// so sometimes we use fmtBIUPair() directly in the saveXXX() functions.
return
fmtBIUPair
(
aSize
.
x
,
aSize
.
y
);
}
void
saveAllSections
()
const
;
void
saveAllSections
()
const
;
void
saveGENERAL
()
const
;
void
saveGENERAL
()
const
;
void
saveSHEET
()
const
;
void
saveSHEET
()
const
;
void
saveSETUP
()
const
;
void
saveSETUP
()
const
;
void
saveBOARD
()
const
;
void
saveBOARD
()
const
;
void
saveMODULE
(
const
MODULE
*
aModule
)
const
;
void
saveMODULE
(
const
MODULE
*
aModule
)
const
;
void
saveMODULE_TEXT
(
const
TEXTE_MODULE
*
aText
)
const
;
void
saveMODULE_EDGE
(
const
EDGE_MODULE
*
aGraphic
)
const
;
void
savePAD
(
const
D_PAD
*
aPad
)
const
;
void
save3D
(
const
MODULE
*
aModule
)
const
;
void
saveNETINFO_ITEM
(
const
NETINFO_ITEM
*
aNet
)
const
;
void
saveNETINFO_ITEM
(
const
NETINFO_ITEM
*
aNet
)
const
;
void
saveNETCLASSES
()
const
;
void
saveNETCLASSES
()
const
;
void
saveNETCLASS
(
const
NETCLASS
*
aNetclass
)
const
;
void
saveNETCLASS
(
const
NETCLASS
*
aNetclass
)
const
;
...
...
pcbnew/librairi.cpp
View file @
b979d1e0
...
@@ -604,9 +604,9 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
...
@@ -604,9 +604,9 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
}
}
/* Write the new footprint ( append it to the list of footprint ) */
/* Write the new footprint ( append it to the list of footprint ) */
tmp
=
aModule
->
m_TimeStamp
;
aModule
->
m_TimeStamp
=
0
;
tmp
=
aModule
->
GetTimeStamp
();
aModule
->
SetTimeStamp
(
0
)
;
aModule
->
Save
(
dest
);
aModule
->
Save
(
dest
);
aModule
->
m_TimeStamp
=
tmp
;
aModule
->
SetTimeStamp
(
tmp
)
;
output_lib
.
WriteEndOfFile
();
output_lib
.
WriteEndOfFile
();
...
...
pcbnew/loadcmp.cpp
View file @
b979d1e0
...
@@ -78,7 +78,7 @@ bool FOOTPRINT_EDIT_FRAME::Load_Module_From_BOARD( MODULE* aModule )
...
@@ -78,7 +78,7 @@ bool FOOTPRINT_EDIT_FRAME::Load_Module_From_BOARD( MODULE* aModule )
GetBoard
()
->
m_Status_Pcb
=
0
;
GetBoard
()
->
m_Status_Pcb
=
0
;
newModule
=
new
MODULE
(
GetBoard
()
);
newModule
=
new
MODULE
(
GetBoard
()
);
newModule
->
Copy
(
aModule
);
newModule
->
Copy
(
aModule
);
newModule
->
m_Link
=
aModule
->
m_TimeStamp
;
newModule
->
m_Link
=
aModule
->
GetTimeStamp
()
;
aModule
=
newModule
;
aModule
=
newModule
;
...
@@ -185,7 +185,7 @@ MODULE* PCB_BASE_FRAME::Load_Module_From_Library( const wxString& library, wxDC*
...
@@ -185,7 +185,7 @@ MODULE* PCB_BASE_FRAME::Load_Module_From_Library( const wxString& library, wxDC*
module
->
m_Flags
=
IS_NEW
;
module
->
m_Flags
=
IS_NEW
;
module
->
m_Link
=
0
;
module
->
m_Link
=
0
;
module
->
m_TimeStamp
=
GetNewTimeStamp
(
);
module
->
SetTimeStamp
(
GetNewTimeStamp
()
);
GetBoard
()
->
m_Status_Pcb
=
0
;
GetBoard
()
->
m_Status_Pcb
=
0
;
module
->
SetPosition
(
curspos
);
module
->
SetPosition
(
curspos
);
...
...
pcbnew/modedit.cpp
View file @
b979d1e0
...
@@ -284,7 +284,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
...
@@ -284,7 +284,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
for
(
;
source_module
!=
NULL
;
source_module
=
(
MODULE
*
)
source_module
->
Next
()
)
for
(
;
source_module
!=
NULL
;
source_module
=
(
MODULE
*
)
source_module
->
Next
()
)
{
{
if
(
module_in_edit
->
m_Link
==
source_module
->
m_TimeStamp
)
if
(
module_in_edit
->
m_Link
==
source_module
->
GetTimeStamp
()
)
break
;
break
;
}
}
}
}
...
@@ -325,7 +325,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
...
@@ -325,7 +325,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
// and the source_module (old module) is deleted
// and the source_module (old module) is deleted
PICKED_ITEMS_LIST
pickList
;
PICKED_ITEMS_LIST
pickList
;
pcbframe
->
Exchange_Module
(
source_module
,
newmodule
,
&
pickList
);
pcbframe
->
Exchange_Module
(
source_module
,
newmodule
,
&
pickList
);
newmodule
->
m_TimeStamp
=
module_in_edit
->
m_Link
;
newmodule
->
SetTimeStamp
(
module_in_edit
->
m_Link
)
;
if
(
pickList
.
GetCount
()
)
if
(
pickList
.
GetCount
()
)
pcbframe
->
SaveCopyInUndoList
(
pickList
,
UR_UNSPECIFIED
);
pcbframe
->
SaveCopyInUndoList
(
pickList
,
UR_UNSPECIFIED
);
...
@@ -336,7 +336,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
...
@@ -336,7 +336,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
pcbframe
->
GetScreen
()
->
SetCrossHairPosition
(
wxPoint
(
0
,
0
)
);
pcbframe
->
GetScreen
()
->
SetCrossHairPosition
(
wxPoint
(
0
,
0
)
);
pcbframe
->
PlaceModule
(
newmodule
,
NULL
);
pcbframe
->
PlaceModule
(
newmodule
,
NULL
);
pcbframe
->
GetScreen
()
->
SetCrossHairPosition
(
cursor_pos
);
pcbframe
->
GetScreen
()
->
SetCrossHairPosition
(
cursor_pos
);
newmodule
->
m_TimeStamp
=
GetNewTimeStamp
(
);
newmodule
->
SetTimeStamp
(
GetNewTimeStamp
()
);
pcbframe
->
SaveCopyInUndoList
(
newmodule
,
UR_NEW
);
pcbframe
->
SaveCopyInUndoList
(
newmodule
,
UR_NEW
);
}
}
...
@@ -413,12 +413,12 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
...
@@ -413,12 +413,12 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
if
(
val
&&
ref
)
if
(
val
&&
ref
)
{
{
ref
->
m_Type
=
TEXT_is_REFERENCE
;
// just in case ...
ref
->
SetType
(
TEXT_is_REFERENCE
)
;
// just in case ...
if
(
ref
->
m_Text
.
Length
()
==
0
)
if
(
ref
->
m_Text
.
Length
()
==
0
)
ref
->
m_Text
=
L"Ref**"
;
ref
->
m_Text
=
L"Ref**"
;
val
->
m_Type
=
TEXT_is_VALUE
;
// just in case ...
val
->
SetType
(
TEXT_is_VALUE
)
;
// just in case ...
if
(
val
->
m_Text
.
Length
()
==
0
)
if
(
val
->
m_Text
.
Length
()
==
0
)
val
->
m_Text
=
L"Val**"
;
val
->
m_Text
=
L"Val**"
;
...
@@ -708,20 +708,20 @@ void FOOTPRINT_EDIT_FRAME::Transform( MODULE* module, int transform )
...
@@ -708,20 +708,20 @@ void FOOTPRINT_EDIT_FRAME::Transform( MODULE* module, int transform )
for
(
;
pad
!=
NULL
;
pad
=
(
D_PAD
*
)
pad
->
Next
()
)
for
(
;
pad
!=
NULL
;
pad
=
(
D_PAD
*
)
pad
->
Next
()
)
{
{
pad
->
m_Pos0
=
pad
->
m_Pos
;
pad
->
SetPos0
(
pad
->
m_Pos
)
;
pad
->
m_Orient
-=
angle
;
pad
->
m_Orient
-=
angle
;
RotatePoint
(
&
pad
->
m_Offset
.
x
,
&
pad
->
m_Offset
.
y
,
angle
);
RotatePoint
(
&
pad
->
m_Offset
.
x
,
&
pad
->
m_Offset
.
y
,
angle
);
EXCHG
(
pad
->
m_Size
.
x
,
pad
->
m_Size
.
y
);
EXCHG
(
pad
->
m_Size
.
x
,
pad
->
m_Size
.
y
);
RotatePoint
(
&
pad
->
m_DeltaSize
.
x
,
&
pad
->
m_DeltaSize
.
y
,
-
angle
);
RotatePoint
(
&
pad
->
m_DeltaSize
.
x
,
&
pad
->
m_DeltaSize
.
y
,
-
angle
);
}
}
module
->
m_Reference
->
m_Pos0
=
module
->
m_Reference
->
m_Pos
;
module
->
m_Reference
->
SetPos0
(
module
->
m_Reference
->
m_Pos
)
;
module
->
m_Reference
->
m_Orient
+=
angle
;
module
->
m_Reference
->
m_Orient
+=
angle
;
if
(
module
->
m_Reference
->
m_Orient
>=
1800
)
if
(
module
->
m_Reference
->
m_Orient
>=
1800
)
module
->
m_Reference
->
m_Orient
-=
1800
;
module
->
m_Reference
->
m_Orient
-=
1800
;
module
->
m_Value
->
m_Pos0
=
module
->
m_Value
->
m_Pos
;
module
->
m_Value
->
SetPos0
(
module
->
m_Value
->
m_Pos
)
;
module
->
m_Value
->
m_Orient
+=
angle
;
module
->
m_Value
->
m_Orient
+=
angle
;
if
(
module
->
m_Value
->
m_Orient
>=
1800
)
if
(
module
->
m_Value
->
m_Orient
>=
1800
)
...
@@ -739,7 +739,7 @@ void FOOTPRINT_EDIT_FRAME::Transform( MODULE* module, int transform )
...
@@ -739,7 +739,7 @@ void FOOTPRINT_EDIT_FRAME::Transform( MODULE* module, int transform )
if
(
PtStruct
->
Type
()
==
PCB_MODULE_TEXT_T
)
if
(
PtStruct
->
Type
()
==
PCB_MODULE_TEXT_T
)
{
{
textmod
=
(
TEXTE_MODULE
*
)
PtStruct
;
textmod
=
(
TEXTE_MODULE
*
)
PtStruct
;
textmod
->
m_Pos0
=
textmod
->
m_Pos
;
textmod
->
SetPos0
(
textmod
->
m_Pos
)
;
}
}
}
}
...
@@ -747,7 +747,7 @@ void FOOTPRINT_EDIT_FRAME::Transform( MODULE* module, int transform )
...
@@ -747,7 +747,7 @@ void FOOTPRINT_EDIT_FRAME::Transform( MODULE* module, int transform )
break
;
break
;
case
ID_MODEDIT_MODULE_MIRROR
:
case
ID_MODEDIT_MODULE_MIRROR
:
for
(
;
pad
!=
NULL
;
pad
=
(
D_PAD
*
)
pad
->
Next
()
)
for
(
;
pad
;
pad
=
pad
->
Next
()
)
{
{
NEGATE
(
pad
->
m_Pos
.
y
);
NEGATE
(
pad
->
m_Pos
.
y
);
NEGATE
(
pad
->
m_Pos0
.
y
);
NEGATE
(
pad
->
m_Pos0
.
y
);
...
...
pcbnew/modedit_onclick.cpp
View file @
b979d1e0
...
@@ -307,7 +307,7 @@ bool FOOTPRINT_EDIT_FRAME::OnRightClick( const wxPoint& MousePos, wxMenu* PopMen
...
@@ -307,7 +307,7 @@ bool FOOTPRINT_EDIT_FRAME::OnRightClick( const wxPoint& MousePos, wxMenu* PopMen
HK_EDIT_ITEM
);
HK_EDIT_ITEM
);
AddMenuItem
(
PopMenu
,
ID_POPUP_PCB_EDIT_TEXTMODULE
,
msg
,
KiBitmap
(
edit_text_xpm
)
);
AddMenuItem
(
PopMenu
,
ID_POPUP_PCB_EDIT_TEXTMODULE
,
msg
,
KiBitmap
(
edit_text_xpm
)
);
if
(
(
(
TEXTE_MODULE
*
)
item
)
->
m_Type
==
TEXT_is_DIVERS
)
if
(
(
(
TEXTE_MODULE
*
)
item
)
->
GetType
()
==
TEXT_is_DIVERS
)
{
{
msg
=
AddHotkeyName
(
_
(
"Delete Text Mod."
),
g_Module_Editor_Hokeys_Descr
,
msg
=
AddHotkeyName
(
_
(
"Delete Text Mod."
),
g_Module_Editor_Hokeys_Descr
,
HK_DELETE
);
HK_DELETE
);
...
...
pcbnew/moduleframe.cpp
View file @
b979d1e0
...
@@ -300,7 +300,7 @@ void FOOTPRINT_EDIT_FRAME::OnUpdateInsertModuleInBoard( wxUpdateUIEvent& aEvent
...
@@ -300,7 +300,7 @@ void FOOTPRINT_EDIT_FRAME::OnUpdateInsertModuleInBoard( wxUpdateUIEvent& aEvent
// search if the source module was not deleted:
// search if the source module was not deleted:
for
(
;
source_module
!=
NULL
;
source_module
=
source_module
->
Next
()
)
for
(
;
source_module
!=
NULL
;
source_module
=
source_module
->
Next
()
)
{
{
if
(
module_in_edit
->
m_Link
==
source_module
->
m_TimeStamp
)
if
(
module_in_edit
->
m_Link
==
source_module
->
GetTimeStamp
()
)
break
;
break
;
}
}
...
@@ -326,7 +326,7 @@ void FOOTPRINT_EDIT_FRAME::OnUpdateReplaceModuleInBoard( wxUpdateUIEvent& aEvent
...
@@ -326,7 +326,7 @@ void FOOTPRINT_EDIT_FRAME::OnUpdateReplaceModuleInBoard( wxUpdateUIEvent& aEvent
// search if the source module was not deleted:
// search if the source module was not deleted:
for
(
;
source_module
!=
NULL
;
source_module
=
source_module
->
Next
()
)
for
(
;
source_module
!=
NULL
;
source_module
=
source_module
->
Next
()
)
{
{
if
(
module_in_edit
->
m_Link
==
source_module
->
m_TimeStamp
)
if
(
module_in_edit
->
m_Link
==
source_module
->
GetTimeStamp
()
)
break
;
break
;
}
}
...
...
pcbnew/move-drag_pads.cpp
View file @
b979d1e0
...
@@ -187,7 +187,7 @@ void PCB_BASE_FRAME::Import_Pad_Settings( D_PAD* aPad, bool aDraw )
...
@@ -187,7 +187,7 @@ void PCB_BASE_FRAME::Import_Pad_Settings( D_PAD* aPad, bool aDraw )
void
PCB_BASE_FRAME
::
AddPad
(
MODULE
*
Module
,
bool
draw
)
void
PCB_BASE_FRAME
::
AddPad
(
MODULE
*
Module
,
bool
draw
)
{
{
wxString
lastPadName
;
// Last used pad name (pad num)
wxString
lastPadName
;
// Last used pad name (pad num)
lastPadName
=
g_Pad_Master
.
ReturnString
PadName
();
lastPadName
=
g_Pad_Master
.
Get
PadName
();
m_Pcb
->
m_Status_Pcb
=
0
;
m_Pcb
->
m_Status_Pcb
=
0
;
Module
->
m_LastEdit_Time
=
time
(
NULL
);
Module
->
m_LastEdit_Time
=
time
(
NULL
);
...
...
pcbnew/muonde.cpp
View file @
b979d1e0
...
@@ -287,8 +287,8 @@ MODULE* PCB_EDIT_FRAME::Genere_Self( wxDC* DC )
...
@@ -287,8 +287,8 @@ MODULE* PCB_EDIT_FRAME::Genere_Self( wxDC* DC )
Module
->
m_Reference
->
m_Pos
.
y
-=
Module
->
m_Reference
->
m_Size
.
y
;
Module
->
m_Reference
->
m_Pos
.
y
-=
Module
->
m_Reference
->
m_Size
.
y
;
Module
->
m_Value
->
m_Pos
.
y
+=
Module
->
m_Value
->
m_Size
.
y
;
Module
->
m_Value
->
m_Pos
.
y
+=
Module
->
m_Value
->
m_Size
.
y
;
Module
->
m_Reference
->
m_Pos0
=
Module
->
m_Reference
->
m_Pos
-
Module
->
m_Pos
;
Module
->
m_Reference
->
SetPos0
(
Module
->
m_Reference
->
m_Pos
-
Module
->
m_Pos
)
;
Module
->
m_Value
->
m_Pos0
=
Module
->
m_Value
->
m_Pos
-
Module
->
m_Pos
;
Module
->
m_Value
->
SetPos0
(
Module
->
m_Value
->
m_Pos
-
Module
->
m_Pos
)
;
Module
->
CalculateBoundingBox
();
Module
->
CalculateBoundingBox
();
Module
->
Draw
(
DrawPanel
,
DC
,
GR_OR
);
Module
->
Draw
(
DrawPanel
,
DC
,
GR_OR
);
...
@@ -532,14 +532,22 @@ MODULE* PCB_EDIT_FRAME::Create_MuWaveBasicShape( const wxString& name, int pad_c
...
@@ -532,14 +532,22 @@ MODULE* PCB_EDIT_FRAME::Create_MuWaveBasicShape( const wxString& name, int pad_c
return
NULL
;
return
NULL
;
#define DEFAULT_SIZE 30
#define DEFAULT_SIZE 30
Module
->
m_TimeStamp
=
GetNewTimeStamp
();
Module
->
SetTimeStamp
(
GetNewTimeStamp
()
);
Module
->
m_Value
->
m_Size
=
wxSize
(
DEFAULT_SIZE
,
DEFAULT_SIZE
);
Module
->
m_Value
->
m_Size
=
wxSize
(
DEFAULT_SIZE
,
DEFAULT_SIZE
);
Module
->
m_Value
->
m_Pos0
.
y
=
-
DEFAULT_SIZE
;
Module
->
m_Value
->
m_Pos
.
y
+=
Module
->
m_Value
->
m_Pos0
.
y
;
Module
->
m_Value
->
SetPos0
(
wxPoint
(
0
,
-
DEFAULT_SIZE
)
);
Module
->
m_Value
->
m_Pos
.
y
+=
Module
->
m_Value
->
GetPos0
().
y
;
Module
->
m_Value
->
m_Thickness
=
DEFAULT_SIZE
/
4
;
Module
->
m_Value
->
m_Thickness
=
DEFAULT_SIZE
/
4
;
Module
->
m_Reference
->
m_Size
=
wxSize
(
DEFAULT_SIZE
,
DEFAULT_SIZE
);
Module
->
m_Reference
->
m_Size
=
wxSize
(
DEFAULT_SIZE
,
DEFAULT_SIZE
);
Module
->
m_Reference
->
m_Pos0
.
y
=
DEFAULT_SIZE
;
Module
->
m_Reference
->
m_Pos
.
y
+=
Module
->
m_Reference
->
m_Pos0
.
y
;
Module
->
m_Reference
->
SetPos0
(
wxPoint
(
0
,
DEFAULT_SIZE
)
);
Module
->
m_Reference
->
m_Pos
.
y
+=
Module
->
m_Reference
->
GetPos0
().
y
;
Module
->
m_Reference
->
m_Thickness
=
DEFAULT_SIZE
/
4
;
Module
->
m_Reference
->
m_Thickness
=
DEFAULT_SIZE
/
4
;
/* Create 2 pads used in gaps and stubs.
/* Create 2 pads used in gaps and stubs.
...
...
pcbnew/netlist.cpp
View file @
b979d1e0
...
@@ -1160,7 +1160,7 @@ bool NETLIST_READER::loadNewModules()
...
@@ -1160,7 +1160,7 @@ bool NETLIST_READER::loadNewModules()
/* Update schematic links : reference "Time Stamp" and schematic
/* Update schematic links : reference "Time Stamp" and schematic
* hierarchical path */
* hierarchical path */
Module
->
m_Reference
->
m_Text
=
cmp
->
m_CmpName
;
Module
->
m_Reference
->
m_Text
=
cmp
->
m_CmpName
;
Module
->
m_TimeStamp
=
GetNewTimeStamp
(
);
Module
->
SetTimeStamp
(
GetNewTimeStamp
()
);
Module
->
m_Path
=
cmp
->
m_TimeStampPath
;
Module
->
m_Path
=
cmp
->
m_TimeStampPath
;
}
}
else
else
...
@@ -1176,7 +1176,7 @@ bool NETLIST_READER::loadNewModules()
...
@@ -1176,7 +1176,7 @@ bool NETLIST_READER::loadNewModules()
Module
=
newmodule
;
Module
=
newmodule
;
Module
->
m_Reference
->
m_Text
=
cmp
->
m_CmpName
;
Module
->
m_Reference
->
m_Text
=
cmp
->
m_CmpName
;
Module
->
m_TimeStamp
=
GetNewTimeStamp
(
);
Module
->
SetTimeStamp
(
GetNewTimeStamp
()
);
Module
->
m_Path
=
cmp
->
m_TimeStampPath
;
Module
->
m_Path
=
cmp
->
m_TimeStampPath
;
}
}
}
}
...
...
pcbnew/onrightclick.cpp
View file @
b979d1e0
...
@@ -699,7 +699,7 @@ void PCB_EDIT_FRAME::createPopUpMenuForFpTexts( TEXTE_MODULE* FpText, wxMenu* me
...
@@ -699,7 +699,7 @@ void PCB_EDIT_FRAME::createPopUpMenuForFpTexts( TEXTE_MODULE* FpText, wxMenu* me
}
}
// Graphic texts can be deleted only if are not currently edited.
// Graphic texts can be deleted only if are not currently edited.
if
(
!
flags
&&
FpText
->
m_Type
==
TEXT_is_DIVERS
)
if
(
!
flags
&&
FpText
->
GetType
()
==
TEXT_is_DIVERS
)
{
{
AddMenuItem
(
sub_menu_Fp_text
,
ID_POPUP_PCB_DELETE_TEXTMODULE
,
AddMenuItem
(
sub_menu_Fp_text
,
ID_POPUP_PCB_DELETE_TEXTMODULE
,
_
(
"Delete"
),
KiBitmap
(
delete_xpm
)
);
_
(
"Delete"
),
KiBitmap
(
delete_xpm
)
);
...
...
pcbnew/plot_rtn.cpp
View file @
b979d1e0
...
@@ -145,7 +145,7 @@ module\n %s's \"reference\" text." ),
...
@@ -145,7 +145,7 @@ module\n %s's \"reference\" text." ),
if
(
(
(
1
<<
textLayer
)
&
aLayerMask
)
==
0
)
if
(
(
(
1
<<
textLayer
)
&
aLayerMask
)
==
0
)
trace_ref
=
false
;
trace_ref
=
false
;
if
(
text
->
m_NoShow
&&
!
g_PcbPlotOptions
.
m_PlotInvisibleTexts
)
if
(
!
text
->
IsVisible
()
&&
!
g_PcbPlotOptions
.
m_PlotInvisibleTexts
)
trace_ref
=
false
;
trace_ref
=
false
;
text
=
Module
->
m_Value
;
text
=
Module
->
m_Value
;
...
@@ -165,7 +165,7 @@ module\n %s's \"value\" text." ),
...
@@ -165,7 +165,7 @@ module\n %s's \"value\" text." ),
if
(
(
(
1
<<
textLayer
)
&
aLayerMask
)
==
0
)
if
(
(
(
1
<<
textLayer
)
&
aLayerMask
)
==
0
)
trace_val
=
false
;
trace_val
=
false
;
if
(
text
->
m_NoShow
&&
!
g_PcbPlotOptions
.
m_PlotInvisibleTexts
)
if
(
!
text
->
IsVisible
()
&&
!
g_PcbPlotOptions
.
m_PlotInvisibleTexts
)
trace_val
=
false
;
trace_val
=
false
;
/* Plot text fields, if allowed */
/* Plot text fields, if allowed */
...
@@ -185,7 +185,7 @@ module\n %s's \"value\" text." ),
...
@@ -185,7 +185,7 @@ module\n %s's \"value\" text." ),
if
(
!
g_PcbPlotOptions
.
m_PlotTextOther
)
if
(
!
g_PcbPlotOptions
.
m_PlotTextOther
)
continue
;
continue
;
if
(
(
pt_texte
->
m_NoShow
)
&&
!
g_PcbPlotOptions
.
m_PlotInvisibleTexts
)
if
(
!
pt_texte
->
IsVisible
(
)
&&
!
g_PcbPlotOptions
.
m_PlotInvisibleTexts
)
continue
;
continue
;
textLayer
=
pt_texte
->
GetLayer
();
textLayer
=
pt_texte
->
GetLayer
();
...
...
pcbnew/print_board_functions.cpp
View file @
b979d1e0
...
@@ -382,10 +382,10 @@ static void Print_Module( EDA_DRAW_PANEL* aPanel, wxDC* aDC, MODULE* aModule,
...
@@ -382,10 +382,10 @@ static void Print_Module( EDA_DRAW_PANEL* aPanel, wxDC* aDC, MODULE* aModule,
if
(
mlayer
&
aMasklayer
)
if
(
mlayer
&
aMasklayer
)
{
{
if
(
!
aModule
->
m_Reference
->
m_NoShow
)
if
(
aModule
->
m_Reference
->
IsVisible
()
)
aModule
->
m_Reference
->
Draw
(
aPanel
,
aDC
,
aDraw_mode
);
aModule
->
m_Reference
->
Draw
(
aPanel
,
aDC
,
aDraw_mode
);
if
(
!
aModule
->
m_Value
->
m_NoShow
)
if
(
aModule
->
m_Value
->
IsVisible
()
)
aModule
->
m_Value
->
Draw
(
aPanel
,
aDC
,
aDraw_mode
);
aModule
->
m_Value
->
Draw
(
aPanel
,
aDC
,
aDraw_mode
);
}
}
...
...
pcbnew/specctra_export.cpp
View file @
b979d1e0
...
@@ -565,7 +565,7 @@ IMAGE* SPECCTRA_DB::makeIMAGE( BOARD* aBoard, MODULE* aModule )
...
@@ -565,7 +565,7 @@ IMAGE* SPECCTRA_DB::makeIMAGE( BOARD* aBoard, MODULE* aModule )
PIN
*
pin
=
new
PIN
(
image
);
PIN
*
pin
=
new
PIN
(
image
);
padName
=
pad
->
ReturnString
PadName
();
padName
=
pad
->
Get
PadName
();
pin
->
pin_id
=
TO_UTF8
(
padName
);
pin
->
pin_id
=
TO_UTF8
(
padName
);
if
(
padName
!=
wxEmptyString
&&
pinmap
.
find
(
padName
)
==
pinmap
.
end
()
)
if
(
padName
!=
wxEmptyString
&&
pinmap
.
find
(
padName
)
==
pinmap
.
end
()
)
...
...
pcbnew/xchgmod.cpp
View file @
b979d1e0
...
@@ -516,7 +516,7 @@ void PCB_EDIT_FRAME::Exchange_Module( MODULE* aOldModule,
...
@@ -516,7 +516,7 @@ void PCB_EDIT_FRAME::Exchange_Module( MODULE* aOldModule,
aNewModule
->
m_Value
->
m_Text
=
aOldModule
->
m_Value
->
m_Text
;
aNewModule
->
m_Value
->
m_Text
=
aOldModule
->
m_Value
->
m_Text
;
/* Updating other parameters */
/* Updating other parameters */
aNewModule
->
m_TimeStamp
=
aOldModule
->
m_TimeStamp
;
aNewModule
->
SetTimeStamp
(
aOldModule
->
GetTimeStamp
()
)
;
aNewModule
->
m_Path
=
aOldModule
->
m_Path
;
aNewModule
->
m_Path
=
aOldModule
->
m_Path
;
/* Update pad netnames ( when possible) */
/* Update pad netnames ( when possible) */
...
@@ -624,7 +624,7 @@ void PCB_EDIT_FRAME::RecreateCmpFileFromBoard( wxCommandEvent& aEvent )
...
@@ -624,7 +624,7 @@ void PCB_EDIT_FRAME::RecreateCmpFileFromBoard( wxCommandEvent& aEvent )
for
(
;
Module
!=
NULL
;
Module
=
Module
->
Next
()
)
for
(
;
Module
!=
NULL
;
Module
=
Module
->
Next
()
)
{
{
fprintf
(
FichCmp
,
"
\n
BeginCmp
\n
"
);
fprintf
(
FichCmp
,
"
\n
BeginCmp
\n
"
);
fprintf
(
FichCmp
,
"TimeStamp = %8.8lX
\n
"
,
Module
->
m_TimeStamp
);
fprintf
(
FichCmp
,
"TimeStamp = %8.8lX
\n
"
,
Module
->
GetTimeStamp
()
);
fprintf
(
FichCmp
,
"Path = %s
\n
"
,
TO_UTF8
(
Module
->
m_Path
)
);
fprintf
(
FichCmp
,
"Path = %s
\n
"
,
TO_UTF8
(
Module
->
m_Path
)
);
fprintf
(
FichCmp
,
"Reference = %s;
\n
"
,
fprintf
(
FichCmp
,
"Reference = %s;
\n
"
,
!
Module
->
m_Reference
->
m_Text
.
IsEmpty
()
?
!
Module
->
m_Reference
->
m_Text
.
IsEmpty
()
?
...
...
pcbnew/zones_by_polygon.cpp
View file @
b979d1e0
...
@@ -534,7 +534,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC )
...
@@ -534,7 +534,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC )
if
(
zone
->
GetNumCorners
()
==
0
)
if
(
zone
->
GetNumCorners
()
==
0
)
{
{
zone
->
m_Flags
=
IS_NEW
;
zone
->
m_Flags
=
IS_NEW
;
zone
->
m_TimeStamp
=
GetNewTimeStamp
(
);
zone
->
SetTimeStamp
(
GetNewTimeStamp
()
);
g_Zone_Default_Setting
.
ExportSetting
(
*
zone
);
g_Zone_Default_Setting
.
ExportSetting
(
*
zone
);
zone
->
m_Poly
->
Start
(
g_Zone_Default_Setting
.
m_CurrentZone_Layer
,
zone
->
m_Poly
->
Start
(
g_Zone_Default_Setting
.
m_CurrentZone_Layer
,
GetScreen
()
->
GetCrossHairPosition
().
x
,
GetScreen
()
->
GetCrossHairPosition
().
x
,
...
@@ -791,7 +791,7 @@ void PCB_EDIT_FRAME::Delete_Zone_Contour( wxDC* DC, ZONE_CONTAINER* zone_contain
...
@@ -791,7 +791,7 @@ void PCB_EDIT_FRAME::Delete_Zone_Contour( wxDC* DC, ZONE_CONTAINER* zone_contain
EDA_RECT
dirty
=
zone_container
->
GetBoundingBox
();
EDA_RECT
dirty
=
zone_container
->
GetBoundingBox
();
// For compatibility with old boards: remove old SEGZONE fill segments
// For compatibility with old boards: remove old SEGZONE fill segments
Delete_OldZone_Fill
(
NULL
,
zone_container
->
m_TimeStamp
);
Delete_OldZone_Fill
(
NULL
,
zone_container
->
GetTimeStamp
()
);
// Remove current filling:
// Remove current filling:
zone_container
->
UnFill
();
zone_container
->
UnFill
();
...
...
pcbnew/zones_by_polygon_fill_functions.cpp
View file @
b979d1e0
...
@@ -59,7 +59,7 @@ void PCB_EDIT_FRAME::Delete_OldZone_Fill( SEGZONE* aZone, long aTimestamp )
...
@@ -59,7 +59,7 @@ void PCB_EDIT_FRAME::Delete_OldZone_Fill( SEGZONE* aZone, long aTimestamp )
if
(
aZone
==
NULL
)
if
(
aZone
==
NULL
)
TimeStamp
=
aTimestamp
;
TimeStamp
=
aTimestamp
;
else
else
TimeStamp
=
aZone
->
m_TimeStamp
;
// Save reference time stamp (aZone will be deleted)
TimeStamp
=
aZone
->
GetTimeStamp
()
;
// Save reference time stamp (aZone will be deleted)
SEGZONE
*
next
;
SEGZONE
*
next
;
...
@@ -67,7 +67,7 @@ void PCB_EDIT_FRAME::Delete_OldZone_Fill( SEGZONE* aZone, long aTimestamp )
...
@@ -67,7 +67,7 @@ void PCB_EDIT_FRAME::Delete_OldZone_Fill( SEGZONE* aZone, long aTimestamp )
{
{
next
=
zone
->
Next
();
next
=
zone
->
Next
();
if
(
zone
->
m_TimeStamp
==
TimeStamp
)
if
(
zone
->
GetTimeStamp
()
==
TimeStamp
)
{
{
modify
=
true
;
modify
=
true
;
/* remove item from linked list and free memory */
/* remove item from linked list and free memory */
...
...
pcbnew/zones_test_and_combine_areas.cpp
View file @
b979d1e0
...
@@ -88,7 +88,7 @@ ZONE_CONTAINER* BOARD::InsertArea( int netcode, int iarea, int layer, int x, int
...
@@ -88,7 +88,7 @@ ZONE_CONTAINER* BOARD::InsertArea( int netcode, int iarea, int layer, int x, int
new_area
->
SetNet
(
netcode
);
new_area
->
SetNet
(
netcode
);
new_area
->
SetLayer
(
layer
);
new_area
->
SetLayer
(
layer
);
new_area
->
m_TimeStamp
=
GetNewTimeStamp
(
);
new_area
->
SetTimeStamp
(
GetNewTimeStamp
()
);
if
(
iarea
<
(
int
)
(
m_ZoneDescriptorList
.
size
()
-
1
)
)
if
(
iarea
<
(
int
)
(
m_ZoneDescriptorList
.
size
()
-
1
)
)
m_ZoneDescriptorList
.
insert
(
m_ZoneDescriptorList
.
begin
()
+
iarea
+
1
,
new_area
);
m_ZoneDescriptorList
.
insert
(
m_ZoneDescriptorList
.
begin
()
+
iarea
+
1
,
new_area
);
...
@@ -284,7 +284,7 @@ int BOARD::ClipAreaPolygon( PICKED_ITEMS_LIST * aNewZonesList,
...
@@ -284,7 +284,7 @@ int BOARD::ClipAreaPolygon( PICKED_ITEMS_LIST * aNewZonesList,
{
{
wxString
str
;
wxString
str
;
str
.
Printf
(
wxT
(
"Area %8.8X of net
\"
%s
\"
has arcs intersecting other sides.
\n
"
),
str
.
Printf
(
wxT
(
"Area %8.8X of net
\"
%s
\"
has arcs intersecting other sides.
\n
"
),
aCurrArea
->
m_TimeStamp
,
GetChars
(
aCurrArea
->
m_Netname
)
);
aCurrArea
->
GetTimeStamp
()
,
GetChars
(
aCurrArea
->
m_Netname
)
);
str
+=
wxT
(
"This may cause problems with other editing operations,
\n
"
);
str
+=
wxT
(
"This may cause problems with other editing operations,
\n
"
);
str
+=
wxT
(
"such as adding cutouts. It can't be fixed automatically.
\n
"
);
str
+=
wxT
(
"such as adding cutouts. It can't be fixed automatically.
\n
"
);
str
+=
wxT
(
"Manual correction is recommended."
);
str
+=
wxT
(
"Manual correction is recommended."
);
...
@@ -307,7 +307,7 @@ int BOARD::ClipAreaPolygon( PICKED_ITEMS_LIST * aNewZonesList,
...
@@ -307,7 +307,7 @@ int BOARD::ClipAreaPolygon( PICKED_ITEMS_LIST * aNewZonesList,
{
{
wxString
str
;
wxString
str
;
str
.
Printf
(
wxT
(
"Area %8.8X of net
\"
%s
\"
is self-intersecting and will be clipped.
\n
"
),
str
.
Printf
(
wxT
(
"Area %8.8X of net
\"
%s
\"
is self-intersecting and will be clipped.
\n
"
),
aCurrArea
->
m_TimeStamp
,
GetChars
(
aCurrArea
->
m_Netname
)
);
aCurrArea
->
GetTimeStamp
()
,
GetChars
(
aCurrArea
->
m_Netname
)
);
str
+=
wxT
(
"This may result in splitting the area.
\n
"
);
str
+=
wxT
(
"This may result in splitting the area.
\n
"
);
str
+=
wxT
(
"If the area is complex, this may take a few seconds."
);
str
+=
wxT
(
"If the area is complex, this may take a few seconds."
);
wxMessageBox
(
str
);
wxMessageBox
(
str
);
...
...
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