merge in testing

This commit is contained in:
Dick Hollenbeck 2011-12-22 16:12:21 -06:00
commit 929d5c7a3f
228 changed files with 24131 additions and 15775 deletions

View File

@ -4,6 +4,19 @@ KiCad ChangeLog 2011
Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with
email address. email address.
2011-Dec-19, UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
Pcbnew:
Enhanced algorithms to calculate board connections:
- A track is seen connected to a pad if the track end is inside the pad shape.
- Pads inside pads are now seen connected, if the center of the pad is
*inside* the other pad.
(this is made to be sure a large copper area is shared by the 2 pads,
and to keep algorithm fast).
Algorithm to calculate pads connections is still very fast.
However some other functions (drag pads, track len calculation ...)
still need the track end exactly on the pad position.
2011-Dec-13 UPDATE Dick Hollenbeck <dick@softplc.com> 2011-Dec-13 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================ ================================================================================

View File

@ -78,7 +78,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
# Set default flags for Release build. # Set default flags for Release build.
set(CMAKE_C_FLAGS_RELEASE "-Wall -O2 -DNDEBUG ") set(CMAKE_C_FLAGS_RELEASE "-Wall -O2 -DNDEBUG ")
set(CMAKE_CXX_FLAGS_RELEASE "-Wall -O2 -DNDEBUG") set(CMAKE_CXX_FLAGS_RELEASE "-Wall -O2 -DNDEBUG")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-s -static-libgcc") set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-s")
# Set default flags for Debug build. # Set default flags for Debug build.
set(CMAKE_C_FLAGS_DEBUG "-Wall -g3 -ggdb3 -DDEBUG") set(CMAKE_C_FLAGS_DEBUG "-Wall -g3 -ggdb3 -DDEBUG")

View File

@ -156,6 +156,7 @@ set( BMAPS_MID
browse_files browse_files
cancel_tool cancel_tool
cancel cancel
change_entry_orient
create_cmp_file create_cmp_file
checked_ok checked_ok
component_select_unit component_select_unit
@ -239,9 +240,10 @@ set( BMAPS_MID
gbr_select_mode2 gbr_select_mode2
gerber_file gerber_file
gerber_recent_files gerber_recent_files
gerber_open_dcode_file
gerbview_drill_file gerbview_drill_file
gerbview_clear_layers gerbview_clear_layers
gerber_open_dcode_file gerbview_open_recent_drill_files
general_deletions general_deletions
general_ratsnest general_ratsnest
glabel2label glabel2label
@ -478,6 +480,7 @@ set( BMAPS_MID
unzip unzip
update_module_board update_module_board
up up
via
via_sketch via_sketch
warning warning
web_support web_support

View File

@ -0,0 +1,85 @@
/* Do not modify this file, it was automatically generated by the
* PNG2cpp CMake script, using a *.png file as input.
*/
#include "bitmaps.h"
static const unsigned char png[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c,
0xce, 0x00, 0x00, 0x04, 0x45, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xad, 0xd6, 0xdb, 0x53, 0x1b,
0x55, 0x1c, 0x07, 0xf0, 0x85, 0x96, 0x4d, 0x68, 0x02, 0x09, 0xe5, 0x52, 0xeb, 0x40, 0x99, 0xa9,
0xd5, 0xb1, 0x40, 0x8a, 0x34, 0x85, 0xbd, 0xe4, 0x0a, 0x41, 0xd2, 0x4d, 0xc8, 0x86, 0x6c, 0xd8,
0x92, 0x0b, 0x24, 0x54, 0xa0, 0x1d, 0x4a, 0x01, 0xdb, 0xa0, 0x63, 0x7d, 0x70, 0x3a, 0xe8, 0x8c,
0x4f, 0x3e, 0xb5, 0x33, 0xb6, 0x85, 0x04, 0x8b, 0x15, 0x5a, 0x15, 0x98, 0x04, 0x9c, 0x0e, 0xa3,
0x96, 0x7b, 0x47, 0x2c, 0x84, 0x4a, 0x8d, 0xd3, 0x07, 0x7d, 0xf2, 0x45, 0xeb, 0x1f, 0x11, 0xcf,
0x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0xd2, 0x74, 0xd1, 0xb9, 0x1f, 0x44, 0x88, 0x81, 0x06, 0x19, 0x04, 0xd0, 0x9f, 0x3d,
0xcb, 0xd2, 0xcb, 0x1a, 0x17, 0xfd, 0x2a, 0xdc, 0x03, 0xe1, 0x29, 0x99, 0x8e, 0x79, 0xbd, 0x85,
0x6f, 0x34, 0x74, 0xd9, 0xcb, 0x5d, 0x6e, 0xba, 0x0a, 0x9c, 0x37, 0xa7, 0x59, 0xf3, 0x89, 0xfd,
0x20, 0xa9, 0xbe, 0x27, 0xb6, 0xba, 0x4e, 0xed, 0xb6, 0xe5, 0x01, 0xf9, 0x0c, 0xdc, 0xea, 0x21,
0xa2, 0xb6, 0xa9, 0x0f, 0xfd, 0x1f, 0x88, 0x30, 0xff, 0x02, 0x94, 0x7c, 0x89, 0xd7, 0x2c, 0xef,
0xcc, 0x31, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE change_entry_orient_xpm[1] = {{ png, sizeof( png ), "change_entry_orient_xpm" }};
//EOF

View File

@ -0,0 +1,117 @@
/* Do not modify this file, it was automatically generated by the
* PNG2cpp CMake script, using a *.png file as input.
*/
#include "bitmaps.h"
static const unsigned char png[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c,
0xce, 0x00, 0x00, 0x06, 0x3d, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0x95, 0x95, 0x5b, 0x6c, 0x5c,
0x57, 0x15, 0x86, 0xbf, 0x7d, 0x2e, 0x73, 0xf7, 0xdc, 0xc7, 0x63, 0x4f, 0x6c, 0xc7, 0x8e, 0xc7,
0x26, 0x69, 0x94, 0x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93, 0x49, 0xf2, 0xd7, 0x67, 0x49, 0xa6, 0x52, 0xb8, 0xae, 0xc4, 0x30, 0x8a, 0xc4,
0x62, 0x71, 0x60, 0x74, 0x35, 0x30, 0x2b, 0x84, 0x30, 0xe4, 0xc7, 0x4a, 0x75, 0xd3, 0x0c, 0x12,
0xa8, 0xd6, 0xad, 0x18, 0xaa, 0x83, 0x6e, 0x2a, 0x21, 0x00, 0x6a, 0x35, 0xfb, 0xa0, 0xeb, 0xba,
0x3d, 0x8a, 0xaa, 0xa0, 0xe9, 0x3a, 0x35, 0xc7, 0x91, 0x9a, 0xae, 0x03, 0x52, 0xba, 0xae, 0xeb,
0x08, 0x21, 0x2e, 0x01, 0x25, 0xc0, 0xba, 0xb5, 0x76, 0xef, 0xa0, 0x51, 0xfd, 0xdb, 0x6a, 0x3d,
0xb4, 0x8f, 0x01, 0xff, 0xc7, 0x90, 0x80, 0x0b, 0x38, 0x40, 0xad, 0x7e, 0xbb, 0xf2, 0x0e, 0xa2,
0xff, 0x17, 0x66, 0x9b, 0xf9, 0x0b, 0x88, 0x97, 0x4b, 0xdf, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45,
0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE gerbview_open_recent_drill_files_xpm[1] = {{ png, sizeof( png ), "gerbview_open_recent_drill_files_xpm" }};
//EOF

View File

@ -0,0 +1,82 @@
/* Do not modify this file, it was automatically generated by the
* PNG2cpp CMake script, using a *.png file as input.
*/
#include "bitmaps.h"
static const unsigned char png[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c,
0xce, 0x00, 0x00, 0x04, 0x13, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7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, 0x39, 0xd2, 0xc1, 0xfd, 0x7b, 0x02, 0x8f, 0xe3, 0x06, 0xef, 0x0c, 0x66, 0x64, 0xd7, 0x92,
0x5f, 0x7c, 0x48, 0xe0, 0x03, 0x53, 0x09, 0xde, 0x45, 0x31, 0x50, 0xe2, 0x0b, 0x38, 0x55, 0xee,
0x7f, 0x7e, 0xc3, 0xe2, 0x74, 0xea, 0xce, 0x7d, 0x81, 0x66, 0xf7, 0x99, 0x16, 0xde, 0x36, 0xb4,
0x93, 0xef, 0x1c, 0xf0, 0x73, 0xcf, 0x89, 0x76, 0xbe, 0x75, 0xd0, 0x35, 0x61, 0x36, 0x9b, 0x23,
0xa2, 0xeb, 0x5e, 0xc9, 0x37, 0xc3, 0xbb, 0xe3, 0x75, 0xda, 0x17, 0x34, 0x43, 0xc3, 0xff, 0x48,
0xe8, 0x8c, 0xed, 0xf5, 0x08, 0x99, 0x3e, 0xb7, 0x5f, 0x80, 0xc8, 0xfb, 0x89, 0x3e, 0x48, 0x96,
0x2c, 0x64, 0xf9, 0xa5, 0x3a, 0xb3, 0xe2, 0xb6, 0xe3, 0x4f, 0x30, 0x23, 0xb0, 0x8e, 0x57, 0x0d,
0x42, 0x44, 0xf3, 0xa2, 0xcf, 0x2c, 0xc1, 0x3f, 0xcc, 0xc3, 0x66, 0x7a, 0x03, 0x39, 0xbc, 0xd6,
0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE via_xpm[1] = {{ png, sizeof( png ), "via_xpm" }};
//EOF

View File

@ -0,0 +1,231 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
height="48"
width="48"
version="1.1"
id="svg2"
inkscape:version="0.48.1 "
sodipodi:docname="change_entry_orient.svg">
<metadata
id="metadata53">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1280"
inkscape:window-height="968"
id="namedview51"
showgrid="false"
inkscape:zoom="9.7321397"
inkscape:cx="8.2414503"
inkscape:cy="26.142558"
inkscape:window-x="-4"
inkscape:window-y="-4"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<defs
id="defs4">
<mask
id="e">
<rect
transform="rotate(90)"
height="8.6868"
width="9.3725"
y="-72.949"
x="35.044"
fill="#fff"
id="rect7" />
<rect
transform="rotate(90)"
height="8.6868"
width="9.3725"
y="-87.48"
x="35.044"
fill="#fff"
id="rect9" />
<rect
transform="rotate(90)"
height="8.6868"
width="9.3725"
y="-102.01"
x="35.044"
fill="#fff"
id="rect11" />
<rect
transform="rotate(90)"
height="8.6868"
width="9.3725"
y="-116.54"
x="35.044"
fill="#fff"
id="rect13" />
</mask>
<mask
id="f">
<rect
transform="rotate(90)"
height="8.6868"
width="9.3725"
y="-72.949"
x="35.044"
fill="#fff"
id="rect16" />
<rect
transform="rotate(90)"
height="8.6868"
width="9.3725"
y="-87.48"
x="35.044"
fill="#fff"
id="rect18" />
<rect
transform="rotate(90)"
height="8.6868"
width="9.3725"
y="-102.01"
x="35.044"
fill="#fff"
id="rect20" />
<rect
transform="rotate(90)"
height="8.6868"
width="9.3725"
y="-116.54"
x="35.044"
fill="#fff"
id="rect22" />
</mask>
<filter
id="d"
color-interpolation-filters="sRGB">
<feGaussianBlur
stdDeviation="0.76169817"
id="feGaussianBlur25" />
</filter>
<mask
id="e-1">
<rect
style="fill:#ffffff"
transform="matrix(0,1,-1,0,0,0)"
height="8.6868"
width="9.3725004"
y="-72.948997"
x="35.043999"
id="rect7-7" />
<rect
style="fill:#ffffff"
transform="matrix(0,1,-1,0,0,0)"
height="8.6868"
width="9.3725004"
y="-87.480003"
x="35.043999"
id="rect9-4" />
<rect
style="fill:#ffffff"
transform="matrix(0,1,-1,0,0,0)"
height="8.6868"
width="9.3725004"
y="-102.01"
x="35.043999"
id="rect11-0" />
<rect
style="fill:#ffffff"
transform="matrix(0,1,-1,0,0,0)"
height="8.6868"
width="9.3725004"
y="-116.54"
x="35.043999"
id="rect13-9" />
</mask>
<filter
inkscape:collect="always"
id="filter3840">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.77409508"
id="feGaussianBlur3842" />
</filter>
<filter
color-interpolation-filters="sRGB"
inkscape:collect="always"
id="filter3840-8">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.77409508"
id="feGaussianBlur3842-2" />
</filter>
</defs>
<g
id="g3890"
transform="translate(34.422029,34.730287)">
<g
id="g35-5"
transform="matrix(0,2.9379,-2.1996,0,8.491481,-32.124217)">
<rect
style="fill-opacity:0"
id="rect37-5"
x="0"
y="0"
width="16"
height="16" />
</g>
<path
transform="matrix(0,0.91790986,-0.91920821,0,11.841319,-33.997331)"
inkscape:connector-curvature="0"
id="path3800-8-1"
d="m 7.8690809,3.4934004 41.1855461,40.6965116 0,0"
style="opacity:0.26068373;fill:none;stroke:#37574d;stroke-width:6.38199997;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;filter:url(#filter3840-8)" />
<path
inkscape:connector-curvature="0"
id="path3800-7"
d="m 8.5224219,-31.309913 -38.1711689,38.464589 0,0"
style="opacity:0.57692309;fill:none;stroke:#0539b2;stroke-width:5.9735837;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
</g>
<g
id="g3844">
<g
id="g35"
transform="matrix(2.9379,0,0,2.1996,2.1067,3.2221)">
<rect
id="rect37"
x="0"
y="0"
width="16"
height="16"
fill-opacity="0" />
</g>
<path
transform="matrix(0.91790986,0,0,0.91920821,0.23358571,-0.12773803)"
inkscape:connector-curvature="0"
id="path3800-8"
d="m 7.8690809,3.4934004 41.1855461,40.6965116 0,0"
style="opacity:0.26068373;fill:none;stroke:#37574d;stroke-width:6.38199997;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;filter:url(#filter3840)" />
<path
inkscape:connector-curvature="0"
id="path3800"
d="m 2.9210036,3.1911591 38.4645894,38.1711689 0,0"
style="fill:none;stroke:#73ce06;stroke-width:5.9735837;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.3 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="48"
height="48"
viewBox="0 0 0.24 0.24"
id="svg2"
version="1.1"
inkscape:version="0.48.1 "
sodipodi:docname="lang_bg.svg">
<metadata
id="metadata14">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs12" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1123"
inkscape:window-height="807"
id="namedview10"
showgrid="false"
inkscape:zoom="11.244203"
inkscape:cx="26.61597"
inkscape:cy="26.235738"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<g
id="g2991"
transform="matrix(0.04798479,0,0,0.07959657,0,0.22089684)">
<rect
style="fill:#ffffff"
y="-2.76"
x="0"
id="rect4"
height="3"
width="5" />
<rect
style="fill:#00966e"
x="0"
id="rect6"
y="-1.76"
height="2"
width="5" />
<rect
style="fill:#d62612"
x="0"
id="rect8"
y="-0.75999999"
height="1"
width="5" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

124
bitmaps_png/sources/via.svg Normal file
View File

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
height="48"
width="48"
version="1.1"
id="svg2"
inkscape:version="0.48.1 "
sodipodi:docname="via_sketch.svg">
<metadata
id="metadata16">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs14">
<filter
inkscape:collect="always"
id="filter3808">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.79203718"
id="feGaussianBlur3810" />
</filter>
</defs>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1280"
inkscape:window-height="968"
id="namedview12"
showgrid="false"
inkscape:snap-grids="false"
inkscape:snap-to-guides="false"
inkscape:zoom="10.873341"
inkscape:cx="10.68511"
inkscape:cy="22.398101"
inkscape:window-x="-4"
inkscape:window-y="-4"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<g
id="g3798"
style="opacity:0.38671875;filter:url(#filter3808)"
transform="translate(-90.843526,3.6539241)">
<rect
style="fill:#000000;fill-rule:evenodd;stroke:#000000;stroke-opacity:1"
id="rect4-4"
x="93.149178"
y="11.34338"
width="29.813433"
height="8.7306871"
ry="2.3031542"
rx="0" />
<rect
style="fill:#000000;fill-rule:evenodd;stroke:#000000;stroke-opacity:1"
id="rect6-8"
x="11.503523"
y="-123.2624"
width="30.819489"
height="8.5042381"
ry="2.243417"
rx="0"
transform="matrix(0,1,-1,0,0,0)" />
<path
style="fill:none;stroke:#000000;stroke-width:2.2720027;stroke-opacity:1"
inkscape:connector-curvature="0"
id="path8-1"
d="m 134.31482,15.979044 a 15.30449,14.862257 0 1 1 -30.60898,0 15.30449,14.862257 0 1 1 30.60898,0 z" />
<path
style="fill:#000000;stroke:#000000;stroke-width:3.44060159;stroke-opacity:1"
inkscape:connector-curvature="0"
id="path10-0"
d="m 124.433,15.872462 a 5.7326026,5.8850078 0 0 1 -11.4652,0 5.7326026,5.8850078 0 1 1 11.4652,0 z" />
</g>
<rect
rx="0"
ry="2.3031542"
height="8.7306871"
width="29.813433"
y="16.90716"
x="0.41774505"
id="rect4"
style="fill:#ff0000;fill-rule:evenodd" />
<rect
transform="matrix(0,1,-1,0,0,0)"
rx="0"
ry="2.243417"
height="8.5042381"
width="30.819489"
y="-30.530968"
x="17.067303"
id="rect6"
style="fill:#38d948;fill-rule:evenodd" />
<path
d="m 41.583387,21.542825 a 15.304489,14.862256 0 1 1 -30.608977,0 15.304489,14.862256 0 1 1 30.608977,0 z"
id="path8"
inkscape:connector-curvature="0"
style="fill:none;stroke:#6c6c6c;stroke-width:4;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" />
<path
d="m 31.701569,21.436243 a 5.7326025,5.8850077 0 1 1 -11.465205,0 5.7326025,5.8850077 0 1 1 11.465205,0 z"
id="path10"
inkscape:connector-curvature="0"
style="fill:none;stroke:#119b1d;stroke-width:3.44060159" />
</svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -70,7 +70,6 @@ EDA_ITEM::EDA_ITEM( const EDA_ITEM& base )
m_Flags = base.m_Flags; m_Flags = base.m_Flags;
SetTimeStamp( base.m_TimeStamp ); SetTimeStamp( base.m_TimeStamp );
m_Status = base.m_Status; m_Status = base.m_Status;
m_Selected = base.m_Selected;
} }
@ -86,7 +85,7 @@ void EDA_ITEM::InitVars()
m_Flags = 0; // flags for editions and other m_Flags = 0; // flags for editions and other
SetTimeStamp( 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_forceVisible = false; // true to override the visibility setting of the item.
} }

View File

@ -1,3 +1,28 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/** /**
* @file block_commande.cpp * @file block_commande.cpp
* @brief Common routines for managing on block commands. * @brief Common routines for managing on block commands.
@ -181,7 +206,7 @@ bool EDA_DRAW_FRAME::HandleBlockBegin( wxDC* DC, int key, const wxPoint& startpo
if( ( Block->m_Command != BLOCK_IDLE ) || ( Block->m_State != STATE_NO_BLOCK ) ) if( ( Block->m_Command != BLOCK_IDLE ) || ( Block->m_State != STATE_NO_BLOCK ) )
return false; return false;
Block->m_Flags = 0; Block->ClearFlags();
Block->m_Command = (CmdBlockType) ReturnBlockCommand( key ); Block->m_Command = (CmdBlockType) ReturnBlockCommand( key );
if( Block->m_Command == 0 ) if( Block->m_Command == 0 )
@ -203,11 +228,11 @@ bool EDA_DRAW_FRAME::HandleBlockBegin( wxDC* DC, int key, const wxPoint& startpo
case BLOCK_MIRROR_X: case BLOCK_MIRROR_X:
case BLOCK_MIRROR_Y: /* mirror */ case BLOCK_MIRROR_Y: /* mirror */
case BLOCK_PRESELECT_MOVE: /* Move with preselection list*/ case BLOCK_PRESELECT_MOVE: /* Move with preselection list*/
Block->InitData( DrawPanel, startpos ); Block->InitData( m_canvas, startpos );
break; break;
case BLOCK_PASTE: case BLOCK_PASTE:
Block->InitData( DrawPanel, startpos ); Block->InitData( m_canvas, startpos );
Block->m_BlockLastCursorPosition.x = 0; Block->m_BlockLastCursorPosition.x = 0;
Block->m_BlockLastCursorPosition.y = 0; Block->m_BlockLastCursorPosition.y = 0;
InitBlockPasteInfos(); InitBlockPasteInfos();
@ -216,11 +241,11 @@ bool EDA_DRAW_FRAME::HandleBlockBegin( wxDC* DC, int key, const wxPoint& startpo
{ {
DisplayError( this, wxT( "No Block to paste" ), 20 ); DisplayError( this, wxT( "No Block to paste" ), 20 );
GetScreen()->m_BlockLocate.m_Command = BLOCK_IDLE; GetScreen()->m_BlockLocate.m_Command = BLOCK_IDLE;
DrawPanel->m_mouseCaptureCallback = NULL; m_canvas->m_mouseCaptureCallback = NULL;
return true; return true;
} }
if( !DrawPanel->IsMouseCaptured() ) if( !m_canvas->IsMouseCaptured() )
{ {
Block->m_ItemsSelection.ClearItemsList(); Block->m_ItemsSelection.ClearItemsList();
DisplayError( this, DisplayError( this,
@ -229,7 +254,7 @@ bool EDA_DRAW_FRAME::HandleBlockBegin( wxDC* DC, int key, const wxPoint& startpo
} }
Block->m_State = STATE_BLOCK_MOVE; Block->m_State = STATE_BLOCK_MOVE;
DrawPanel->m_mouseCaptureCallback( DrawPanel, DC, startpos, false ); m_canvas->m_mouseCaptureCallback( m_canvas, DC, startpos, false );
break; break;
default: default:
@ -298,7 +323,7 @@ void AbortBlockCurrentCommand( EDA_DRAW_PANEL* Panel, wxDC* DC )
screen->m_BlockLocate.ClearItemsList(); screen->m_BlockLocate.ClearItemsList();
} }
screen->m_BlockLocate.m_Flags = 0; screen->m_BlockLocate.ClearFlags();
screen->m_BlockLocate.m_State = STATE_NO_BLOCK; screen->m_BlockLocate.m_State = STATE_NO_BLOCK;
screen->m_BlockLocate.m_Command = BLOCK_ABORT; screen->m_BlockLocate.m_Command = BLOCK_ABORT;
Panel->GetParent()->HandleBlockEnd( DC ); Panel->GetParent()->HandleBlockEnd( DC );

View File

@ -25,9 +25,9 @@ void EDA_DRAW_FRAME::CopyToClipboard( wxCommandEvent& event )
if( event.GetId() == ID_GEN_COPY_BLOCK_TO_CLIPBOARD ) if( event.GetId() == ID_GEN_COPY_BLOCK_TO_CLIPBOARD )
{ {
if( GetScreen()->IsBlockActive() ) if( GetScreen()->IsBlockActive() )
DrawPanel->SetCursor( wxCursor( DrawPanel->GetDefaultCursor() ) ); m_canvas->SetCursor( wxCursor( m_canvas->GetDefaultCursor() ) );
DrawPanel->EndMouseCapture(); m_canvas->EndMouseCapture();
} }
} }
@ -48,7 +48,7 @@ bool DrawPageOnClipboard( EDA_DRAW_FRAME* aFrame )
int ClipboardSizeX, ClipboardSizeY; int ClipboardSizeX, ClipboardSizeY;
bool DrawBlock = false; bool DrawBlock = false;
wxRect DrawArea; wxRect DrawArea;
BASE_SCREEN* screen = aFrame->DrawPanel->GetScreen(); BASE_SCREEN* screen = aFrame->GetCanvas()->GetScreen();
/* scale is the ratio resolution/internal units */ /* scale is the ratio resolution/internal units */
float scale = 82.0 / aFrame->GetInternalUnits(); float scale = 82.0 / aFrame->GetInternalUnits();
@ -73,7 +73,7 @@ bool DrawPageOnClipboard( EDA_DRAW_FRAME* aFrame )
wxMetafileDC dc; wxMetafileDC dc;
EDA_RECT tmp = aFrame->DrawPanel->m_ClipBox; EDA_RECT tmp = aFrame->GetCanvas()->m_ClipBox;
GRResetPenAndBrush( &dc ); GRResetPenAndBrush( &dc );
const bool plotBlackAndWhite = false; const bool plotBlackAndWhite = false;
GRForceBlackPen( plotBlackAndWhite ); GRForceBlackPen( plotBlackAndWhite );
@ -81,10 +81,10 @@ bool DrawPageOnClipboard( EDA_DRAW_FRAME* aFrame )
dc.SetUserScale( scale, scale ); dc.SetUserScale( scale, scale );
ClipboardSizeX = dc.MaxX() + 10; ClipboardSizeX = dc.MaxX() + 10;
ClipboardSizeY = dc.MaxY() + 10; ClipboardSizeY = dc.MaxY() + 10;
aFrame->DrawPanel->m_ClipBox.SetX( 0 ); aFrame->GetCanvas()->m_ClipBox.SetX( 0 );
aFrame->DrawPanel->m_ClipBox.SetY( 0 ); aFrame->GetCanvas()->m_ClipBox.SetY( 0 );
aFrame->DrawPanel->m_ClipBox.SetWidth( 0x7FFFFF0 ); aFrame->GetCanvas()->m_ClipBox.SetWidth( 0x7FFFFF0 );
aFrame->DrawPanel->m_ClipBox.SetHeight( 0x7FFFFF0 ); aFrame->GetCanvas()->m_ClipBox.SetHeight( 0x7FFFFF0 );
if( DrawBlock ) if( DrawBlock )
{ {
@ -94,7 +94,7 @@ bool DrawPageOnClipboard( EDA_DRAW_FRAME* aFrame )
const int maskLayer = 0xFFFFFFFF; const int maskLayer = 0xFFFFFFFF;
aFrame->PrintPage( &dc, maskLayer, false ); aFrame->PrintPage( &dc, maskLayer, false );
screen->m_IsPrinting = false; screen->m_IsPrinting = false;
aFrame->DrawPanel->m_ClipBox = tmp; aFrame->GetCanvas()->m_ClipBox = tmp;
wxMetafile* mf = dc.Close(); wxMetafile* mf = dc.Close();
if( mf ) if( mf )

View File

@ -29,8 +29,8 @@ void EDA_DRAW_FRAME::Process_PageSettings( wxCommandEvent& event )
DIALOG_PAGES_SETTINGS frame( this ); DIALOG_PAGES_SETTINGS frame( this );
int diag = frame.ShowModal(); int diag = frame.ShowModal();
if( DrawPanel && diag ) if( m_canvas && diag )
DrawPanel->Refresh(); m_canvas->Refresh();
} }
@ -257,7 +257,7 @@ void DIALOG_PAGES_SETTINGS::SavePageSettings( wxCommandEvent& event )
#endif #endif
m_Screen->SetModify(); m_Screen->SetModify();
m_Parent->DrawPanel->Refresh(); m_Parent->GetCanvas()->Refresh();
} }

View File

@ -94,7 +94,7 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( wxWindow* father, int idtype, const wxString& ti
m_zoomSelectBox = NULL; m_zoomSelectBox = NULL;
m_HotkeysZoomAndGridList = NULL; m_HotkeysZoomAndGridList = NULL;
DrawPanel = NULL; m_canvas = NULL;
m_messagePanel = NULL; m_messagePanel = NULL;
m_currentScreen = NULL; m_currentScreen = NULL;
m_toolId = ID_NO_TOOL_SELECTED; m_toolId = ID_NO_TOOL_SELECTED;
@ -142,7 +142,7 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( wxWindow* father, int idtype, const wxString& ti
m_FramePos.x = m_FramePos.y = 0; m_FramePos.x = m_FramePos.y = 0;
m_FrameSize.y -= m_MsgFrameHeight; m_FrameSize.y -= m_MsgFrameHeight;
DrawPanel = new EDA_DRAW_PANEL( this, -1, wxPoint( 0, 0 ), m_FrameSize ); m_canvas = new EDA_DRAW_PANEL( this, -1, wxPoint( 0, 0 ), m_FrameSize );
m_messagePanel = new EDA_MSG_PANEL( this, -1, wxPoint( 0, m_FrameSize.y ), m_messagePanel = new EDA_MSG_PANEL( this, -1, wxPoint( 0, m_FrameSize.y ),
wxSize( m_FrameSize.x, m_MsgFrameHeight ) ); wxSize( m_FrameSize.x, m_MsgFrameHeight ) );
@ -182,8 +182,8 @@ void EDA_DRAW_FRAME::OnActivate( wxActivateEvent& event )
{ {
m_FrameIsActive = event.GetActive(); m_FrameIsActive = event.GetActive();
if( DrawPanel ) if( m_canvas )
DrawPanel->m_CanStartBlock = -1; m_canvas->m_CanStartBlock = -1;
event.Skip(); // required under wxMAC event.Skip(); // required under wxMAC
} }
@ -191,8 +191,8 @@ void EDA_DRAW_FRAME::OnActivate( wxActivateEvent& event )
void EDA_DRAW_FRAME::OnMenuOpen( wxMenuEvent& event ) void EDA_DRAW_FRAME::OnMenuOpen( wxMenuEvent& event )
{ {
if( DrawPanel ) if( m_canvas )
DrawPanel->m_CanStartBlock = -1; m_canvas->m_CanStartBlock = -1;
event.Skip(); event.Skip();
} }
@ -201,7 +201,7 @@ void EDA_DRAW_FRAME::OnMenuOpen( wxMenuEvent& event )
void EDA_DRAW_FRAME::OnToggleGridState( wxCommandEvent& aEvent ) void EDA_DRAW_FRAME::OnToggleGridState( wxCommandEvent& aEvent )
{ {
SetGridVisibility( !IsGridVisible() ); SetGridVisibility( !IsGridVisible() );
DrawPanel->Refresh(); m_canvas->Refresh();
} }
@ -222,10 +222,10 @@ void EDA_DRAW_FRAME::OnSelectUnits( wxCommandEvent& aEvent )
void EDA_DRAW_FRAME::OnToggleCrossHairStyle( wxCommandEvent& aEvent ) void EDA_DRAW_FRAME::OnToggleCrossHairStyle( wxCommandEvent& aEvent )
{ {
INSTALL_UNBUFFERED_DC( dc, DrawPanel ); INSTALL_UNBUFFERED_DC( dc, m_canvas );
DrawPanel->CrossHairOff( &dc ); m_canvas->CrossHairOff( &dc );
m_cursorShape = !m_cursorShape; m_cursorShape = !m_cursorShape;
DrawPanel->CrossHairOn( &dc ); m_canvas->CrossHairOn( &dc );
} }
@ -445,9 +445,9 @@ void EDA_DRAW_FRAME::SetToolID( int aId, int aCursor, const wxString& aToolMsg )
// Keep default cursor in toolbars // Keep default cursor in toolbars
SetCursor( wxNullCursor ); SetCursor( wxNullCursor );
// Change DrawPanel cursor if requested. // Change m_canvas cursor if requested.
if( DrawPanel && aCursor >= 0 ) if( m_canvas && aCursor >= 0 )
DrawPanel->SetCurrentCursor( aCursor ); m_canvas->SetCurrentCursor( aCursor );
DisplayToolMsg( aToolMsg ); DisplayToolMsg( aToolMsg );
@ -486,7 +486,7 @@ int EDA_DRAW_FRAME::ReturnBlockCommand( int key )
void EDA_DRAW_FRAME::InitBlockPasteInfos() void EDA_DRAW_FRAME::InitBlockPasteInfos()
{ {
GetScreen()->m_BlockLocate.ClearItemsList(); GetScreen()->m_BlockLocate.ClearItemsList();
DrawPanel->m_mouseCaptureCallback = NULL; m_canvas->m_mouseCaptureCallback = NULL;
} }
@ -508,7 +508,7 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPosition )
BASE_SCREEN* screen = GetScreen(); BASE_SCREEN* screen = GetScreen();
bool noRefresh = true; bool noRefresh = true;
if( screen == NULL || DrawPanel == NULL ) if( screen == NULL || m_canvas == NULL )
return; return;
double scalar = screen->GetScalingFactor(); double scalar = screen->GetScalingFactor();
@ -518,7 +518,7 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPosition )
// Calculate the portion of the drawing that can be displayed in the // Calculate the portion of the drawing that can be displayed in the
// client area at the current zoom level. // client area at the current zoom level.
clientSize = DrawPanel->GetClientSize(); clientSize = m_canvas->GetClientSize();
// The logical size of the client window. // The logical size of the client window.
logicalClientSize.x = wxRound( (double) clientSize.x / scalar ); logicalClientSize.x = wxRound( (double) clientSize.x / scalar );
@ -693,7 +693,7 @@ SetScrollbars(%d, %d, %d, %d, %d, %d)" ),
screen->m_ScrollbarNumber.x, screen->m_ScrollbarNumber.y, screen->m_ScrollbarNumber.x, screen->m_ScrollbarNumber.y,
screen->m_ScrollbarPos.x, screen->m_ScrollbarPos.y ); screen->m_ScrollbarPos.x, screen->m_ScrollbarPos.y );
DrawPanel->SetScrollbars( screen->m_ScrollPixelsPerUnitX, m_canvas->SetScrollbars( screen->m_ScrollPixelsPerUnitX,
screen->m_ScrollPixelsPerUnitY, screen->m_ScrollPixelsPerUnitY,
screen->m_ScrollbarNumber.x, screen->m_ScrollbarNumber.x,
screen->m_ScrollbarNumber.y, screen->m_ScrollbarNumber.y,

View File

@ -63,7 +63,7 @@ BEGIN_EVENT_TABLE( EDA_DRAW_PANEL, wxScrolledWindow )
EVT_MOUSEWHEEL( EDA_DRAW_PANEL::OnMouseWheel ) EVT_MOUSEWHEEL( EDA_DRAW_PANEL::OnMouseWheel )
EVT_MOUSE_EVENTS( EDA_DRAW_PANEL::OnMouseEvent ) EVT_MOUSE_EVENTS( EDA_DRAW_PANEL::OnMouseEvent )
EVT_CHAR( EDA_DRAW_PANEL::OnKeyEvent ) EVT_CHAR( EDA_DRAW_PANEL::OnKeyEvent )
EVT_CHAR_HOOK( EDA_DRAW_PANEL::OnKeyEvent ) EVT_CHAR_HOOK( EDA_DRAW_PANEL::OnCharHook )
EVT_PAINT( EDA_DRAW_PANEL::OnPaint ) EVT_PAINT( EDA_DRAW_PANEL::OnPaint )
EVT_ERASE_BACKGROUND( EDA_DRAW_PANEL::OnEraseBackground ) EVT_ERASE_BACKGROUND( EDA_DRAW_PANEL::OnEraseBackground )
EVT_SCROLLWIN( EDA_DRAW_PANEL::OnScroll ) EVT_SCROLLWIN( EDA_DRAW_PANEL::OnScroll )
@ -421,15 +421,15 @@ void EDA_DRAW_PANEL::SetClipBox( wxDC& aDC, const wxRect* aRect )
clipBox.Inflate( CLIP_BOX_PADDING ); clipBox.Inflate( CLIP_BOX_PADDING );
// Convert from device units to drawing units. // Convert from device units to drawing units.
m_ClipBox.m_Pos = wxPoint( aDC.DeviceToLogicalX( clipBox.x ), m_ClipBox.SetOrigin( wxPoint( aDC.DeviceToLogicalX( clipBox.x ),
aDC.DeviceToLogicalY( clipBox.y ) ); aDC.DeviceToLogicalY( clipBox.y ) ) );
m_ClipBox.m_Size = wxSize( aDC.DeviceToLogicalXRel( clipBox.width ), m_ClipBox.SetSize( wxSize( aDC.DeviceToLogicalXRel( clipBox.width ),
aDC.DeviceToLogicalYRel( clipBox.height ) ); aDC.DeviceToLogicalYRel( clipBox.height ) ) );
wxLogTrace( KICAD_TRACE_COORDS, wxLogTrace( KICAD_TRACE_COORDS,
wxT( "Device clip box=(%d, %d, %d, %d), Logical clip box=(%d, %d, %d, %d)" ), wxT( "Device clip box=(%d, %d, %d, %d), Logical clip box=(%d, %d, %d, %d)" ),
clipBox.x, clipBox.y, clipBox.width, clipBox.height, clipBox.x, clipBox.y, clipBox.width, clipBox.height,
m_ClipBox.m_Pos.x, m_ClipBox.m_Pos.y, m_ClipBox.m_Size.x, m_ClipBox.m_Size.y ); m_ClipBox.GetX(), m_ClipBox.GetY(), m_ClipBox.GetWidth(), m_ClipBox.GetHeight() );
} }
@ -574,7 +574,7 @@ void EDA_DRAW_PANEL::DrawGrid( wxDC* aDC )
screenGridSize.x = aDC->LogicalToDeviceXRel( wxRound( gridSize.x ) ); screenGridSize.x = aDC->LogicalToDeviceXRel( wxRound( gridSize.x ) );
screenGridSize.y = aDC->LogicalToDeviceYRel( wxRound( gridSize.y ) ); screenGridSize.y = aDC->LogicalToDeviceYRel( wxRound( gridSize.y ) );
org = m_ClipBox.m_Pos; org = m_ClipBox.GetPosition();
if( screenGridSize.x < MIN_GRID_SIZE || screenGridSize.y < MIN_GRID_SIZE ) if( screenGridSize.x < MIN_GRID_SIZE || screenGridSize.y < MIN_GRID_SIZE )
{ {
@ -668,7 +668,7 @@ void EDA_DRAW_PANEL::DrawGrid( wxDC* aDC )
for( double x = (double) org.x; x <= right; x += gridSize.x ) for( double x = (double) org.x; x <= right; x += gridSize.x )
{ {
aDC->Blit( scaleDC.LogicalToDeviceX( wxRound( x ) ), aDC->Blit( scaleDC.LogicalToDeviceX( wxRound( x ) ),
scaleDC.LogicalToDeviceY( m_ClipBox.m_Pos.y ), scaleDC.LogicalToDeviceY( m_ClipBox.GetY() ),
1, tmpBM.GetHeight(), &tmpDC, 0, 0, wxCOPY, true ); 1, tmpBM.GetHeight(), &tmpDC, 0, 0, wxCOPY, true );
} }
#endif #endif
@ -1107,6 +1107,12 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event )
} }
void EDA_DRAW_PANEL::OnCharHook( wxKeyEvent& event )
{
event.Skip();
}
void EDA_DRAW_PANEL::OnKeyEvent( wxKeyEvent& event ) void EDA_DRAW_PANEL::OnKeyEvent( wxKeyEvent& event )
{ {
int localkey; int localkey;
@ -1116,14 +1122,8 @@ void EDA_DRAW_PANEL::OnKeyEvent( wxKeyEvent& event )
switch( localkey ) switch( localkey )
{ {
case WXK_CONTROL: default:
case WXK_CAPITAL: break;
case WXK_SHIFT:
case WXK_NUMLOCK:
case WXK_LBUTTON:
case WXK_RBUTTON:
case WXK_ALT:
return;
case WXK_ESCAPE: case WXK_ESCAPE:
m_AbortRequest = true; m_AbortRequest = true;
@ -1132,7 +1132,6 @@ void EDA_DRAW_PANEL::OnKeyEvent( wxKeyEvent& event )
EndMouseCapture(); EndMouseCapture();
else else
EndMouseCapture( ID_NO_TOOL_SELECTED, m_defaultCursor, wxEmptyString ); EndMouseCapture( ID_NO_TOOL_SELECTED, m_defaultCursor, wxEmptyString );
break; break;
} }

View File

@ -204,7 +204,7 @@ static int overbar_position( int size_v, int thickness )
/** /**
* Function DrawGraphicText * Function DrawGraphicText
* Draw a graphic text (like module texts) * Draw a graphic text (like module texts)
* @param aPanel = the current DrawPanel. NULL if draw within a 3D GL Canvas * @param aPanel = the current m_canvas. NULL if draw within a 3D GL Canvas
* @param aDC = the current Device Context. NULL if draw within a 3D GL Canvas * @param aDC = the current Device Context. NULL if draw within a 3D GL Canvas
* @param aPos = text position (according to h_justify, v_justify) * @param aPos = text position (according to h_justify, v_justify)
* @param aColor (enum EDA_Colors) = text color * @param aColor (enum EDA_Colors) = text color

View File

@ -100,13 +100,13 @@ void SCH_ITEM::Place( SCH_EDIT_FRAME* aFrame, wxDC* aDC )
m_Flags = 0; m_Flags = 0;
screen->SetModify(); screen->SetModify();
screen->SetCurItem( NULL ); screen->SetCurItem( NULL );
aFrame->DrawPanel->SetMouseCapture( NULL, NULL ); aFrame->GetCanvas()->SetMouseCapture( NULL, NULL );
aFrame->DrawPanel->EndMouseCapture(); aFrame->GetCanvas()->EndMouseCapture();
if( aDC ) if( aDC )
{ {
EDA_CROSS_HAIR_MANAGER( aFrame->DrawPanel, aDC ); // Erase schematic cursor EDA_CROSS_HAIR_MANAGER( aFrame->GetCanvas(), aDC ); // Erase schematic cursor
Draw( aFrame->DrawPanel, aDC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); Draw( aFrame->GetCanvas(), aDC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
} }
} }

View File

@ -1034,7 +1034,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
if( !screen->m_IsPrinting & g_ShowPageLimits ) if( !screen->m_IsPrinting & g_ShowPageLimits )
{ {
GRSetDrawMode( DC, GR_COPY ); GRSetDrawMode( DC, GR_COPY );
GRRect( &DrawPanel->m_ClipBox, DC, 0, 0, GRRect( &m_canvas->m_ClipBox, DC, 0, 0,
pageSize.x * scale, pageSize.y * scale, width, pageSize.x * scale, pageSize.y * scale, width,
g_DrawBgColor == WHITE ? LIGHTGRAY : DARKDARKGRAY ); g_DrawBgColor == WHITE ? LIGHTGRAY : DARKDARKGRAY );
} }
@ -1052,13 +1052,13 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
yg = pageSize.y - pageInfo.GetBottomMarginMils(); yg = pageSize.y - pageInfo.GetBottomMarginMils();
#if defined(KICAD_GOST) #if defined(KICAD_GOST)
GRRect( &DrawPanel->m_ClipBox, DC, refx * scale, refy * scale, GRRect( &m_canvas->m_ClipBox, DC, refx * scale, refy * scale,
xg * scale, yg * scale, width, Color ); xg * scale, yg * scale, width, Color );
#else #else
for( ii = 0; ii < 2; ii++ ) for( ii = 0; ii < 2; ii++ )
{ {
GRRect( &DrawPanel->m_ClipBox, DC, refx * scale, refy * scale, GRRect( &m_canvas->m_ClipBox, DC, refx * scale, refy * scale,
xg * scale, yg * scale, width, Color ); xg * scale, yg * scale, width, Color );
refx += GRID_REF_W; refy += GRID_REF_W; refx += GRID_REF_W; refy += GRID_REF_W;
@ -1085,7 +1085,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
case WS_PODPIS_LU: case WS_PODPIS_LU:
if( WsItem->m_Legende ) if( WsItem->m_Legende )
msg = WsItem->m_Legende; msg = WsItem->m_Legende;
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( m_canvas, DC, pos, Color,
msg, TEXT_ORIENT_VERT, size, msg, TEXT_ORIENT_VERT, size,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_BOTTOM, GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_BOTTOM,
width, false, false ); width, false, false );
@ -1094,7 +1094,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
case WS_SEGMENT_LU: case WS_SEGMENT_LU:
xg = pageInfo.GetLeftMargin() - WsItem->m_Endx; xg = pageInfo.GetLeftMargin() - WsItem->m_Endx;
yg = pageSize.y - pageInfo.GetBottomMarginMils() - WsItem->m_Endy; yg = pageSize.y - pageInfo.GetBottomMarginMils() - WsItem->m_Endy;
GRLine( &DrawPanel->m_ClipBox, DC, pos.x, pos.y, GRLine( &m_canvas->m_ClipBox, DC, pos.x, pos.y,
xg * scale, yg * scale, width, Color ); xg * scale, yg * scale, width, Color );
break; break;
} }
@ -1111,7 +1111,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
case WS_SEGMENT_LT: case WS_SEGMENT_LT:
xg = pageInfo.GetLeftMarginMils() + WsItem->m_Endx; xg = pageInfo.GetLeftMarginMils() + WsItem->m_Endx;
yg = pageInfo.GetBottomMarginMils() + WsItem->m_Endy; yg = pageInfo.GetBottomMarginMils() + WsItem->m_Endy;
GRLine( &DrawPanel->m_ClipBox, DC, pos.x, pos.y, GRLine( &m_canvas->m_ClipBox, DC, pos.x, pos.y,
xg * scale, yg * scale, width, Color ); xg * scale, yg * scale, width, Color );
break; break;
} }
@ -1134,11 +1134,10 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
if( ii < xg - PAS_REF / 2 ) if( ii < xg - PAS_REF / 2 )
{ {
GRLine( &DrawPanel->m_ClipBox, DC, ii * scale, refy * scale, GRLine( &m_canvas->m_ClipBox, DC, ii * scale, refy * scale,
ii * scale, ( refy + GRID_REF_W ) * scale, width, Color ); ii * scale, ( refy + GRID_REF_W ) * scale, width, Color );
} }
DrawGraphicText( m_canvas, DC,
DrawGraphicText( DrawPanel, DC,
wxPoint( ( ii - gxpas / 2 ) * scale, wxPoint( ( ii - gxpas / 2 ) * scale,
( refy + GRID_REF_W / 2 ) * scale ), ( refy + GRID_REF_W / 2 ) * scale ),
Color, Line, TEXT_ORIENT_HORIZ, size_ref, Color, Line, TEXT_ORIENT_HORIZ, size_ref,
@ -1147,11 +1146,10 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
if( ii < xg - PAS_REF / 2 ) if( ii < xg - PAS_REF / 2 )
{ {
GRLine( &DrawPanel->m_ClipBox, DC, ii * scale, yg * scale, GRLine( &m_canvas->m_ClipBox, DC, ii * scale, yg * scale,
ii * scale, ( yg - GRID_REF_W ) * scale, width, Color ); ii * scale, ( yg - GRID_REF_W ) * scale, width, Color );
} }
DrawGraphicText( m_canvas, DC,
DrawGraphicText( DrawPanel, DC,
wxPoint( ( ii - gxpas / 2 ) * scale, wxPoint( ( ii - gxpas / 2 ) * scale,
( yg - GRID_REF_W / 2) * scale ), ( yg - GRID_REF_W / 2) * scale ),
Color, Line, TEXT_ORIENT_HORIZ, size_ref, Color, Line, TEXT_ORIENT_HORIZ, size_ref,
@ -1171,11 +1169,11 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
if( ii < yg - PAS_REF / 2 ) if( ii < yg - PAS_REF / 2 )
{ {
GRLine( &DrawPanel->m_ClipBox, DC, refx * scale, ii * scale, GRLine( &m_canvas->m_ClipBox, DC, refx * scale, ii * scale,
( refx + GRID_REF_W ) * scale, ii * scale, width, Color ); ( refx + GRID_REF_W ) * scale, ii * scale, width, Color );
} }
DrawGraphicText( DrawPanel, DC, DrawGraphicText( m_canvas, DC,
wxPoint( ( refx + GRID_REF_W / 2 ) * scale, wxPoint( ( refx + GRID_REF_W / 2 ) * scale,
( ii - gypas / 2 ) * scale ), ( ii - gypas / 2 ) * scale ),
Color, Line, TEXT_ORIENT_HORIZ, size_ref, Color, Line, TEXT_ORIENT_HORIZ, size_ref,
@ -1184,11 +1182,10 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
if( ii < yg - PAS_REF / 2 ) if( ii < yg - PAS_REF / 2 )
{ {
GRLine( &DrawPanel->m_ClipBox, DC, xg * scale, ii * scale, GRLine( &m_canvas->m_ClipBox, DC, xg * scale, ii * scale,
( xg - GRID_REF_W ) * scale, ii * scale, width, Color ); ( xg - GRID_REF_W ) * scale, ii * scale, width, Color );
} }
DrawGraphicText( m_canvas, DC,
DrawGraphicText( DrawPanel, DC,
wxPoint( ( xg - GRID_REF_W / 2 ) * scale, wxPoint( ( xg - GRID_REF_W / 2 ) * scale,
( ii - gxpas / 2 ) * scale ), ( ii - gxpas / 2 ) * scale ),
Color, Line, TEXT_ORIENT_HORIZ, size_ref, Color, Line, TEXT_ORIENT_HORIZ, size_ref,
@ -1224,8 +1221,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
case WS_PODPIS: case WS_PODPIS:
if( WsItem->m_Legende ) if( WsItem->m_Legende )
msg = WsItem->m_Legende; msg = WsItem->m_Legende;
DrawGraphicText( m_canvas, DC, pos, Color,
DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size, msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
width, false, false ); width, false, false );
@ -1239,7 +1235,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
msg = WsItem->m_Legende; msg = WsItem->m_Legende;
if( screen->m_NumberOfScreen > 1 ) if( screen->m_NumberOfScreen > 1 )
msg << screen->m_ScreenNumber; msg << screen->m_ScreenNumber;
DrawGraphicText( DrawPanel, DC, pos, Color, msg, DrawGraphicText( m_canvas, DC, pos, Color, msg,
TEXT_ORIENT_HORIZ, size, GR_TEXT_HJUSTIFY_LEFT, TEXT_ORIENT_HORIZ, size, GR_TEXT_HJUSTIFY_LEFT,
GR_TEXT_VJUSTIFY_CENTER, width, false, false ); GR_TEXT_VJUSTIFY_CENTER, width, false, false );
break; break;
@ -1248,7 +1244,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
if( WsItem->m_Legende ) if( WsItem->m_Legende )
msg = WsItem->m_Legende; msg = WsItem->m_Legende;
msg << screen->m_NumberOfScreen; msg << screen->m_NumberOfScreen;
DrawGraphicText( DrawPanel, DC, pos, Color, msg, DrawGraphicText( m_canvas, DC, pos, Color, msg,
TEXT_ORIENT_HORIZ, size, GR_TEXT_HJUSTIFY_LEFT, TEXT_ORIENT_HORIZ, size, GR_TEXT_HJUSTIFY_LEFT,
GR_TEXT_VJUSTIFY_CENTER, width, false, false ); GR_TEXT_VJUSTIFY_CENTER, width, false, false );
break; break;
@ -1257,7 +1253,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
msg = screen->m_Company; msg = screen->m_Company;
if( !msg.IsEmpty() ) if( !msg.IsEmpty() )
{ {
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( m_canvas, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size1_5, msg, TEXT_ORIENT_HORIZ, size1_5,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
width, width,
@ -1269,7 +1265,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
msg = screen->m_Title; msg = screen->m_Title;
if( !msg.IsEmpty() ) if( !msg.IsEmpty() )
{ {
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( m_canvas, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size1_5, msg, TEXT_ORIENT_HORIZ, size1_5,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
width, width,
@ -1281,14 +1277,14 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
msg = screen->m_Commentaire1; msg = screen->m_Commentaire1;
if( !msg.IsEmpty() ) if( !msg.IsEmpty() )
{ {
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( m_canvas, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size3, msg, TEXT_ORIENT_HORIZ, size3,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
width, width,
false, false ); false, false );
pos.x = (pageInfo.GetLeftMarginMils() + 1260) * scale; pos.x = (pageInfo.GetLeftMarginMils() + 1260) * scale;
pos.y = (pageInfo.GetTopMarginMils() + 270) * scale; pos.y = (pageInfo.GetTopMarginMils() + 270) * scale;
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( m_canvas, DC, pos, Color,
msg, 1800, size2, msg, 1800, size2,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
width, width,
@ -1300,7 +1296,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
msg = screen->m_Commentaire2; msg = screen->m_Commentaire2;
if( !msg.IsEmpty() ) if( !msg.IsEmpty() )
{ {
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( m_canvas, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size, msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
width, false, false ); width, false, false );
@ -1311,7 +1307,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
msg = screen->m_Commentaire3; msg = screen->m_Commentaire3;
if( !msg.IsEmpty() ) if( !msg.IsEmpty() )
{ {
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( m_canvas, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size, msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
width, false, false ); width, false, false );
@ -1322,7 +1318,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
msg = screen->m_Commentaire4; msg = screen->m_Commentaire4;
if( !msg.IsEmpty() ) if( !msg.IsEmpty() )
{ {
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( m_canvas, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size, msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
width, false, false ); width, false, false );
@ -1340,7 +1336,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
pageInfo.GetRightMarginMils() - WsItem->m_Endx; pageInfo.GetRightMarginMils() - WsItem->m_Endx;
yg = pageSize.y - yg = pageSize.y -
pageInfo.GetBottomMarginMils() - WsItem->m_Endy; pageInfo.GetBottomMarginMils() - WsItem->m_Endy;
GRLine( &DrawPanel->m_ClipBox, DC, pos.x, pos.y, GRLine( &m_canvas->m_ClipBox, DC, pos.x, pos.y,
xg * scale, yg * scale, width, Color ); xg * scale, yg * scale, width, Color );
break; break;
} }
@ -1361,14 +1357,14 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
msg = screen->m_Commentaire1; msg = screen->m_Commentaire1;
if( !msg.IsEmpty() ) if( !msg.IsEmpty() )
{ {
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( m_canvas, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size3, msg, TEXT_ORIENT_HORIZ, size3,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
width, width,
false, false ); false, false );
pos.x = (pageInfo.GetLeftMarginMils() + 1260) * scale; pos.x = (pageInfo.GetLeftMarginMils() + 1260) * scale;
pos.y = (pageInfo.GetTopMarginMils() + 270) * scale; pos.y = (pageInfo.GetTopMarginMils() + 270) * scale;
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( m_canvas, DC, pos, Color,
msg, 1800, size2, msg, 1800, size2,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
width, width,
@ -1379,7 +1375,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
case WS_PODPIS_D: case WS_PODPIS_D:
if( WsItem->m_Legende ) if( WsItem->m_Legende )
msg = WsItem->m_Legende; msg = WsItem->m_Legende;
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( m_canvas, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size, msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
width, width,
@ -1390,7 +1386,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
if( WsItem->m_Legende ) if( WsItem->m_Legende )
msg = WsItem->m_Legende; msg = WsItem->m_Legende;
msg << screen->m_ScreenNumber; msg << screen->m_ScreenNumber;
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( m_canvas, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size, msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
width, false, false ); width, false, false );
@ -1404,7 +1400,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
pageInfo.GetRightMarginMils() - WsItem->m_Endx; pageInfo.GetRightMarginMils() - WsItem->m_Endx;
yg = pageSize.y - yg = pageSize.y -
pageInfo.GetBottomMarginMils() - WsItem->m_Endy; pageInfo.GetBottomMarginMils() - WsItem->m_Endy;
GRLine( &DrawPanel->m_ClipBox, DC, pos.x, pos.y, GRLine( &m_canvas->m_ClipBox, DC, pos.x, pos.y,
xg * scale, yg * scale, width, Color ); xg * scale, yg * scale, width, Color );
break; break;
} }
@ -1428,7 +1424,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
if( WsItem->m_Legende ) if( WsItem->m_Legende )
msg = WsItem->m_Legende; msg = WsItem->m_Legende;
msg += screen->m_Date; msg += screen->m_Date;
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( m_canvas, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size, msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
width, false, true ); width, false, true );
@ -1438,7 +1434,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
if( WsItem->m_Legende ) if( WsItem->m_Legende )
msg = WsItem->m_Legende; msg = WsItem->m_Legende;
msg += screen->m_Revision; msg += screen->m_Revision;
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( m_canvas, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size, msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
GetPenSizeForBold( MIN( size.x, size.y ) ), GetPenSizeForBold( MIN( size.x, size.y ) ),
@ -1450,7 +1446,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
msg = WsItem->m_Legende; msg = WsItem->m_Legende;
msg += g_ProductName + wxGetApp().GetAppName(); msg += g_ProductName + wxGetApp().GetAppName();
msg += wxT( " " ) + GetBuildVersion(); msg += wxT( " " ) + GetBuildVersion();
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( m_canvas, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size, msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
width, false, false ); width, false, false );
@ -1460,7 +1456,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
if( WsItem->m_Legende ) if( WsItem->m_Legende )
msg = WsItem->m_Legende; msg = WsItem->m_Legende;
msg += pageInfo.GetType(); msg += pageInfo.GetType();
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( m_canvas, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size, msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
width, false, false ); width, false, false );
@ -1471,7 +1467,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
if( WsItem->m_Legende ) if( WsItem->m_Legende )
msg = WsItem->m_Legende; msg = WsItem->m_Legende;
msg << screen->m_ScreenNumber << wxT( "/" ) << screen->m_NumberOfScreen; msg << screen->m_ScreenNumber << wxT( "/" ) << screen->m_NumberOfScreen;
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( m_canvas, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size, msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
width, false, false ); width, false, false );
@ -1486,7 +1482,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
msg = WsItem->m_Legende; msg = WsItem->m_Legende;
msg << fname << wxT( "." ) << fext; msg << fname << wxT( "." ) << fext;
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( m_canvas, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size, msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
width, false, false ); width, false, false );
@ -1497,7 +1493,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
if( WsItem->m_Legende ) if( WsItem->m_Legende )
msg = WsItem->m_Legende; msg = WsItem->m_Legende;
msg += GetScreenDesc(); msg += GetScreenDesc();
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( m_canvas, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size, msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
width, false, false ); width, false, false );
@ -1510,7 +1506,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
msg += screen->m_Company; msg += screen->m_Company;
if( !msg.IsEmpty() ) if( !msg.IsEmpty() )
{ {
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( m_canvas, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size, msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
GetPenSizeForBold( MIN( size.x, size.y ) ), GetPenSizeForBold( MIN( size.x, size.y ) ),
@ -1523,7 +1519,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
if( WsItem->m_Legende ) if( WsItem->m_Legende )
msg = WsItem->m_Legende; msg = WsItem->m_Legende;
msg += screen->m_Title; msg += screen->m_Title;
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( m_canvas, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size, msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
GetPenSizeForBold( MIN( size.x, size.y ) ), GetPenSizeForBold( MIN( size.x, size.y ) ),
@ -1536,7 +1532,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
msg += screen->m_Commentaire1; msg += screen->m_Commentaire1;
if( !msg.IsEmpty() ) if( !msg.IsEmpty() )
{ {
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( m_canvas, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size, msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
width, false, false ); width, false, false );
@ -1550,7 +1546,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
msg += screen->m_Commentaire2; msg += screen->m_Commentaire2;
if( !msg.IsEmpty() ) if( !msg.IsEmpty() )
{ {
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( m_canvas, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size, msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
width, false, false ); width, false, false );
@ -1564,7 +1560,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
msg += screen->m_Commentaire3; msg += screen->m_Commentaire3;
if( !msg.IsEmpty() ) if( !msg.IsEmpty() )
{ {
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( m_canvas, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size, msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
width, false, false ); width, false, false );
@ -1578,7 +1574,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
msg += screen->m_Commentaire4; msg += screen->m_Commentaire4;
if( !msg.IsEmpty() ) if( !msg.IsEmpty() )
{ {
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( m_canvas, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size, msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
width, false, false ); width, false, false );
@ -1601,7 +1597,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid
GRID_REF_W - pageInfo.GetRightMarginMils() - WsItem->m_Endx; GRID_REF_W - pageInfo.GetRightMarginMils() - WsItem->m_Endx;
yg = pageSize.y - yg = pageSize.y -
GRID_REF_W - pageInfo.GetBottomMarginMils() - WsItem->m_Endy; GRID_REF_W - pageInfo.GetBottomMarginMils() - WsItem->m_Endy;
GRLine( &DrawPanel->m_ClipBox, DC, pos.x, pos.y, GRLine( &m_canvas->m_ClipBox, DC, pos.x, pos.y,
xg * scale, yg * scale, width, Color ); xg * scale, yg * scale, width, Color );
break; break;
} }

View File

@ -22,10 +22,10 @@ void EDA_DRAW_FRAME::RedrawScreen( const wxPoint& aCenterPoint, bool aWarpPointe
// Move the mouse cursor to the on grid graphic cursor position // Move the mouse cursor to the on grid graphic cursor position
if( aWarpPointer ) if( aWarpPointer )
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
DrawPanel->Refresh(); m_canvas->Refresh();
DrawPanel->Update(); m_canvas->Update();
} }
@ -55,7 +55,7 @@ void EDA_DRAW_FRAME::Window_Zoom( EDA_RECT& Rect )
/* Compute the best zoom */ /* Compute the best zoom */
Rect.Normalize(); Rect.Normalize();
size = DrawPanel->GetClientSize(); size = m_canvas->GetClientSize();
// Use ceil to at least show the full rect // Use ceil to at least show the full rect
scalex = (double) Rect.GetSize().x / size.x; scalex = (double) Rect.GetSize().x / size.x;
@ -73,7 +73,7 @@ void EDA_DRAW_FRAME::Window_Zoom( EDA_RECT& Rect )
*/ */
void EDA_DRAW_FRAME::OnZoom( wxCommandEvent& event ) void EDA_DRAW_FRAME::OnZoom( wxCommandEvent& event )
{ {
if( DrawPanel == NULL ) if( m_canvas == NULL )
return; return;
int i; int i;
@ -105,7 +105,7 @@ void EDA_DRAW_FRAME::OnZoom( wxCommandEvent& event )
break; break;
case ID_ZOOM_REDRAW: case ID_ZOOM_REDRAW:
DrawPanel->Refresh(); m_canvas->Refresh();
break; break;
case ID_POPUP_ZOOM_CENTER: case ID_POPUP_ZOOM_CENTER:
@ -121,7 +121,7 @@ void EDA_DRAW_FRAME::OnZoom( wxCommandEvent& event )
break; break;
case ID_POPUP_CANCEL: case ID_POPUP_CANCEL:
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
break; break;
default: default:
@ -149,7 +149,7 @@ void EDA_DRAW_FRAME::AddMenuZoomAndGrid( wxMenu* MasterMenu )
int maxZoomIds; int maxZoomIds;
int zoom; int zoom;
wxString msg; wxString msg;
BASE_SCREEN * screen = DrawPanel->GetScreen(); BASE_SCREEN * screen = m_canvas->GetScreen();
msg = AddHotkeyName( _( "Center" ), m_HotkeysZoomAndGridList, HK_ZOOM_CENTER ); msg = AddHotkeyName( _( "Center" ), m_HotkeysZoomAndGridList, HK_ZOOM_CENTER );
AddMenuItem( MasterMenu, ID_POPUP_ZOOM_CENTER, msg, KiBitmap( zoom_center_on_screen_xpm ) ); AddMenuItem( MasterMenu, ID_POPUP_ZOOM_CENTER, msg, KiBitmap( zoom_center_on_screen_xpm ) );

View File

@ -128,7 +128,7 @@ DISPLAY_FOOTPRINTS_FRAME::DISPLAY_FOOTPRINTS_FRAME( CVPCB_MAINFRAME* father,
m_auimgr.AddPane( m_drawToolBar, m_auimgr.AddPane( m_drawToolBar,
wxAuiPaneInfo( vert ).Name( wxT( "m_drawToolBar" ) ).Right() ); wxAuiPaneInfo( vert ).Name( wxT( "m_drawToolBar" ) ).Right() );
m_auimgr.AddPane( DrawPanel, m_auimgr.AddPane( m_canvas,
wxAuiPaneInfo().Name( wxT( "DisplayFrame" ) ).CentrePane() ); wxAuiPaneInfo().Name( wxT( "DisplayFrame" ) ).CentrePane() );
m_auimgr.AddPane( m_messagePanel, m_auimgr.AddPane( m_messagePanel,
@ -313,7 +313,7 @@ void DISPLAY_FOOTPRINTS_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
if( m_DisplayModText > 2 ) if( m_DisplayModText > 2 )
m_DisplayModText = 0; m_DisplayModText = 0;
DrawPanel->Refresh( ); m_canvas->Refresh( );
break; break;
case ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH: case ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH:
@ -322,7 +322,7 @@ void DISPLAY_FOOTPRINTS_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
if( m_DisplayModEdge > 2 ) if( m_DisplayModEdge > 2 )
m_DisplayModEdge = 0; m_DisplayModEdge = 0;
DrawPanel->Refresh(); m_canvas->Refresh();
break; break;
default: default:
@ -381,25 +381,25 @@ void DISPLAY_FOOTPRINTS_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPositi
case WXK_NUMPAD8: /* cursor moved up */ case WXK_NUMPAD8: /* cursor moved up */
case WXK_UP: case WXK_UP:
pos.y -= wxRound( gridSize.y ); pos.y -= wxRound( gridSize.y );
DrawPanel->MoveCursor( pos ); m_canvas->MoveCursor( pos );
break; break;
case WXK_NUMPAD2: /* cursor moved down */ case WXK_NUMPAD2: /* cursor moved down */
case WXK_DOWN: case WXK_DOWN:
pos.y += wxRound( gridSize.y ); pos.y += wxRound( gridSize.y );
DrawPanel->MoveCursor( pos ); m_canvas->MoveCursor( pos );
break; break;
case WXK_NUMPAD4: /* cursor moved left */ case WXK_NUMPAD4: /* cursor moved left */
case WXK_LEFT: case WXK_LEFT:
pos.x -= wxRound( gridSize.x ); pos.x -= wxRound( gridSize.x );
DrawPanel->MoveCursor( pos ); m_canvas->MoveCursor( pos );
break; break;
case WXK_NUMPAD6: /* cursor moved right */ case WXK_NUMPAD6: /* cursor moved right */
case WXK_RIGHT: case WXK_RIGHT:
pos.x += wxRound( gridSize.x ); pos.x += wxRound( gridSize.x );
DrawPanel->MoveCursor( pos ); m_canvas->MoveCursor( pos );
break; break;
} }
@ -409,13 +409,13 @@ void DISPLAY_FOOTPRINTS_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPositi
{ {
pos = screen->GetCrossHairPosition(); pos = screen->GetCrossHairPosition();
screen->SetCrossHairPosition( oldpos ); screen->SetCrossHairPosition( oldpos );
DrawPanel->CrossHairOff( aDC ); m_canvas->CrossHairOff( aDC );
screen->SetCrossHairPosition( pos ); screen->SetCrossHairPosition( pos );
DrawPanel->CrossHairOn( aDC ); m_canvas->CrossHairOn( aDC );
if( DrawPanel->IsMouseCaptured() ) if( m_canvas->IsMouseCaptured() )
{ {
DrawPanel->m_mouseCaptureCallback( DrawPanel, aDC, aPosition, 0 ); m_canvas->m_mouseCaptureCallback( m_canvas, aDC, aPosition, 0 );
} }
} }

View File

@ -500,36 +500,47 @@ void CVPCB_MAINFRAME::OnLeftDClick( wxListEvent& event )
} }
/* Called when clicking on a component in component list window
* * Updates the filtered foorprint list, if the filtered list option is selected
* * Updates the current selected footprint in footprint list
* * Updates the footprint shown in footprint display window (if opened)
*/
void CVPCB_MAINFRAME::OnSelectComponent( wxListEvent& event ) void CVPCB_MAINFRAME::OnSelectComponent( wxListEvent& event )
{ {
int selection; #define REDRAW_LIST true
#define SELECT_FULL_LIST true
int selection = -1;
if( !m_mainToolBar->GetToolToggled( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST ) ) if( !m_mainToolBar->GetToolToggled( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST ) )
m_FootprintList->SetActiveFootprintList( SELECT_FULL_LIST, REDRAW_LIST );
else
{ {
m_FootprintList->SetActiveFootprintList( true, true ); selection = m_ListCmp->GetSelection();
return;
if( selection < 0 )
m_FootprintList->SetActiveFootprintList( SELECT_FULL_LIST, REDRAW_LIST );
else
{
if( &m_components[ selection ] == NULL )
m_FootprintList->SetActiveFootprintList( SELECT_FULL_LIST, REDRAW_LIST );
else
m_FootprintList->SetFootprintFilteredList( &m_components[ selection ],
m_footprints );
}
} }
selection = m_ListCmp->GetSelection(); selection = m_ListCmp->GetSelection();
if( selection < 0 ) if( selection < 0 )
{
m_FootprintList->SetActiveFootprintList( true, true );
return; return;
}
if( &m_components[ selection ] == NULL )
{
m_FootprintList->SetActiveFootprintList( true, true );
return;
}
m_FootprintList->SetFootprintFilteredList( &m_components[ selection ], m_footprints );
// Preview of the already assigned footprint. // Preview of the already assigned footprint.
// Find the footprint that was already choosen for this component and select it. // Find the footprint that was already choosen for this component and select it.
wxString module = *(&m_components[ selection ].m_Module); wxString module = *(&m_components[ selection ].m_Module);
bool found = false;
for( int ii = 0; ii < m_FootprintList->GetCount(); ii++ ) for( int ii = 0; ii < m_FootprintList->GetCount(); ii++ )
{ {
wxString footprintName; wxString footprintName;
@ -539,10 +550,23 @@ void CVPCB_MAINFRAME::OnSelectComponent( wxListEvent& event )
footprintName = msg.AfterFirst( wxChar( ' ' ) ); footprintName = msg.AfterFirst( wxChar( ' ' ) );
if( module.Cmp( footprintName ) == 0 ) if( module.Cmp( footprintName ) == 0 )
{
m_FootprintList->SetSelection( ii, true ); m_FootprintList->SetSelection( ii, true );
else found = true;
m_FootprintList->SetSelection( ii, false ); break;
} }
}
if( ! found )
{
int ii = m_FootprintList->GetSelection();
if ( ii >= 0 )
m_FootprintList->SetSelection( ii, false );
if( m_DisplayFootprintFrame )
{
CreateScreenCmp();
}
}
SendMessageToEESCHEMA(); SendMessageToEESCHEMA();
DisplayStatus(); DisplayStatus();

View File

@ -54,6 +54,14 @@ public:
void OnLeftClick( wxListEvent& event ); void OnLeftClick( wxListEvent& event );
void OnLeftDClick( wxListEvent& event ); void OnLeftDClick( wxListEvent& event );
/**
* Function OnSelectComponent
* Called when clicking on a component in component list window
* * Updates the filtered foorprint list, if the filtered list option is selected
* * Updates the current selected footprint in footprint list
* * Updates the footprint shown in footprint display window (if opened)
*/
void OnSelectComponent( wxListEvent& event ); void OnSelectComponent( wxListEvent& event );
void OnQuit( wxCommandEvent& event ); void OnQuit( wxCommandEvent& event );

View File

@ -68,7 +68,7 @@ void DIALOG_FOOTPRINTS_DISPLAY_OPTIONS::UpdateObjectSettings( void )
m_Parent->m_DisplayModText = m_TextDisplayOption->GetSelection(); m_Parent->m_DisplayModText = m_TextDisplayOption->GetSelection();
m_Parent->m_DisplayPadNum = m_IsShowPadNum->GetValue(); m_Parent->m_DisplayPadNum = m_IsShowPadNum->GetValue();
m_Parent->m_DisplayPadFill = m_IsShowPadFill->GetValue(); m_Parent->m_DisplayPadFill = m_IsShowPadFill->GetValue();
m_Parent->DrawPanel->Refresh(); m_Parent->GetCanvas()->Refresh();
} }

View File

@ -83,14 +83,24 @@ void CVPCB_MAINFRAME::CreateScreenCmp()
m_DisplayFootprintFrame->GetBoard()->m_Modules.PushBack( mod ); m_DisplayFootprintFrame->GetBoard()->m_Modules.PushBack( mod );
m_DisplayFootprintFrame->Zoom_Automatique( false ); m_DisplayFootprintFrame->Zoom_Automatique( false );
m_DisplayFootprintFrame->DrawPanel->Refresh(); m_DisplayFootprintFrame->GetCanvas()->Refresh();
m_DisplayFootprintFrame->UpdateStatusBar(); /* Display new cursor coordinates and zoom value */
// Display new cursor coordinates and zoom value:
m_DisplayFootprintFrame->UpdateStatusBar();
if( m_DisplayFootprintFrame->m_Draw3DFrame ) if( m_DisplayFootprintFrame->m_Draw3DFrame )
m_DisplayFootprintFrame->m_Draw3DFrame->NewDisplay(); m_DisplayFootprintFrame->m_Draw3DFrame->NewDisplay();
} }
else if( !IsNew ) else if( !IsNew ) // No footprint to display. Erase old footprint, if any
{ {
if( m_DisplayFootprintFrame->GetBoard()->m_Modules.GetCount() )
{
m_DisplayFootprintFrame->GetBoard()->m_Modules.DeleteAll();
m_DisplayFootprintFrame->Zoom_Automatique( false );
m_DisplayFootprintFrame->SetStatusText( wxEmptyString, 0 );
m_DisplayFootprintFrame->UpdateStatusBar();
}
m_DisplayFootprintFrame->Refresh(); m_DisplayFootprintFrame->Refresh();
if( m_DisplayFootprintFrame->m_Draw3DFrame ) if( m_DisplayFootprintFrame->m_Draw3DFrame )
@ -98,8 +108,6 @@ void CVPCB_MAINFRAME::CreateScreenCmp()
} }
} }
/* /*
* Draws the current highlighted footprint. * Draws the current highlighted footprint.
*/ */
@ -108,15 +116,15 @@ void DISPLAY_FOOTPRINTS_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg )
if( !GetBoard() ) if( !GetBoard() )
return; return;
DrawPanel->DrawBackGround( DC ); m_canvas->DrawBackGround( DC );
GetBoard()->Draw( DrawPanel, DC, GR_COPY ); GetBoard()->Draw( m_canvas, DC, GR_COPY );
MODULE* Module = GetBoard()->m_Modules; MODULE* Module = GetBoard()->m_Modules;
if ( Module ) if ( Module )
Module->DisplayInfo( this ); Module->DisplayInfo( this );
DrawPanel->DrawCrossHair( DC ); m_canvas->DrawCrossHair( DC );
} }
@ -131,21 +139,3 @@ void BOARD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode, const wxPoin
m_Modules->Draw( aPanel, aDC, GR_COPY ); m_Modules->Draw( aPanel, aDC, GR_COPY );
} }
} }
/* dummy_functions:
*
* These functions are used in some classes.
* they are useful in Pcbnew, but have no meaning or are never used
* in CvPcb or GerbView.
* but they must exist because they appear in some classes.
* Do nothing in CvPcb.
*/
TRACK* MarkTrace( BOARD* aPcb,
TRACK* aStartSegm,
int* aSegmCount,
int* aTrackLen,
int* aLenDie,
bool aReorder )
{
return NULL;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
update=03/12/2010 17:27:41 update=07/03/2011 07:10:15
last_client=pcbnew last_client=cvpcb
[general] [general]
version=1 version=1
RootSch=ecc83-pp.sch RootSch=ecc83-pp.sch
@ -65,14 +65,6 @@ LibName22=display
LibName23=cypress LibName23=cypress
LibName24=siliconi LibName24=siliconi
LibName25=contrib LibName25=contrib
[cvpcb]
version=1
NetITyp=0
NetIExt=.net
PkgIExt=.pkg
NetType=0
[cvpcb/libraries]
EquName1=devcms
[pcbnew] [pcbnew]
version=1 version=1
PadDrlX=760 PadDrlX=760
@ -92,8 +84,7 @@ TxtLar=120
MSegLar=150 MSegLar=150
LastNetListRead= LastNetListRead=
[pcbnew/libraries] [pcbnew/libraries]
LibDir= LibName1=dip_sockets
LibName1=supports
LibName2=valves LibName2=valves
LibName3=connect LibName3=connect
LibName4=discret LibName4=discret
@ -101,3 +92,9 @@ LibName5=pin_array
LibName6=divers LibName6=divers
LibName7=libcms LibName7=libcms
LibName8=display LibName8=display
LibDir=
[cvpcb]
version=1
NetIExt=.net
[cvpcb/libraries]
EquName1=devcms

File diff suppressed because it is too large Load Diff

View File

@ -1,36 +1,11 @@
EESchema Schematic File Version 2 date 30/12/2010 18:27:52 EESchema Schematic File Version 2
LIBS:power LIBS:power,device,valves,conn,linear,regul,74xx,cmos4000,adc-dac,memory,xilinx,special,microcontrollers,microchip,analog_switches,motorola,intel,audio,interface,digital-audio,philips,display,cypress,siliconi,contrib
LIBS:device EELAYER 23 0
LIBS:valves
LIBS:conn
LIBS:linear
LIBS:regul
LIBS:74xx
LIBS:cmos4000
LIBS:adc-dac
LIBS:memory
LIBS:xilinx
LIBS:special
LIBS:microcontrollers
LIBS:microchip
LIBS:analog_switches
LIBS:motorola
LIBS:intel
LIBS:audio
LIBS:interface
LIBS:digital-audio
LIBS:philips
LIBS:display
LIBS:cypress
LIBS:siliconi
LIBS:contrib
LIBS:ecc83-pp_v2-cache
EELAYER 25 0
EELAYER END EELAYER END
$Descr A4 11700 8267 $Descr A4 11700 8267
Sheet 1 1 Sheet 1 1
Title "ECC Push-Pull" Title "ECC Push-Pull"
Date "30 dec 2010" Date "11 dec 2006"
Rev "0.1" Rev "0.1"
Comp "" Comp ""
Comment1 "" Comment1 ""
@ -42,6 +17,7 @@ Wire Wire Line
6050 4450 6150 4450 6050 4450 6150 4450
Wire Wire Line Wire Wire Line
5750 3850 5750 4050 5750 3850 5750 4050
Connection ~ 4450 4500
Wire Wire Line Wire Wire Line
4450 5400 4450 4450 4450 5400 4450 4450
Wire Wire Line Wire Wire Line
@ -101,9 +77,9 @@ $Comp
L ECC83 U1 L ECC83 U1
U 3 1 48B4F266 U 3 1 48B4F266
P 9950 5700 P 9950 5700
F 0 "U1" H 10080 6010 50 0000 C CNN F 0 "U1" H 10080 6010 50 0000 C C
F 1 "ECC83" H 10300 5400 50 0000 C CNN F 1 "ECC81_83" H 10300 5400 50 0000 C C
F 2 "VALVE-NOVAL_P" H 10220 5300 50 0001 C CNN F 2 "VALVE-NOVAL_P" H 10220 5300 50 0001 C C
3 9950 5700 3 9950 5700
1 0 0 -1 1 0 0 -1
$EndComp $EndComp
@ -111,9 +87,9 @@ $Comp
L ECC83 U1 L ECC83 U1
U 2 1 48B4F263 U 2 1 48B4F263
P 4950 4450 P 4950 4450
F 0 "U1" H 5080 4760 50 0000 C CNN F 0 "U1" H 5080 4760 50 0000 C C
F 1 "ECC83" H 5150 4100 50 0000 C CNN F 1 "ECC83" H 5150 4100 50 0000 C C
F 2 "VALVE-NOVAL_P" H 5220 4050 50 0001 C CNN F 2 "VALVE-NOVAL_P" H 5220 4050 50 0001 C C
2 4950 4450 2 4950 4450
1 0 0 -1 1 0 0 -1
$EndComp $EndComp
@ -121,9 +97,9 @@ $Comp
L ECC83 U1 L ECC83 U1
U 1 1 48B4F256 U 1 1 48B4F256
P 5750 4450 P 5750 4450
F 0 "U1" H 5880 4760 50 0000 C CNN F 0 "U1" H 5880 4760 50 0000 C C
F 1 "ECC83" H 5500 4150 50 0000 C CNN F 1 "ECC83" H 5500 4150 50 0000 C C
F 2 "VALVE-NOVAL_P" H 6020 4050 50 0001 C CNN F 2 "VALVE-NOVAL_P" H 6020 4050 50 0001 C C
1 5750 4450 1 5750 4450
-1 0 0 -1 -1 0 0 -1
$EndComp $EndComp
@ -131,8 +107,8 @@ $Comp
L GND #PWR01 L GND #PWR01
U 1 1 457DBAF8 U 1 1 457DBAF8
P 6950 5150 P 6950 5150
F 0 "#PWR01" H 6950 5150 30 0001 C CNN F 0 "#PWR01" H 6950 5150 30 0001 C C
F 1 "GND" H 6950 5080 30 0001 C CNN F 1 "GND" H 6950 5080 30 0001 C C
1 6950 5150 1 6950 5150
1 0 0 -1 1 0 0 -1
$EndComp $EndComp
@ -140,8 +116,8 @@ $Comp
L GND #PWR02 L GND #PWR02
U 1 1 457DBAF5 U 1 1 457DBAF5
P 6700 5900 P 6700 5900
F 0 "#PWR02" H 6700 5900 30 0001 C CNN F 0 "#PWR02" H 6700 5900 30 0001 C C
F 1 "GND" H 6700 5830 30 0001 C CNN F 1 "GND" H 6700 5830 30 0001 C C
1 6700 5900 1 6700 5900
1 0 0 -1 1 0 0 -1
$EndComp $EndComp
@ -149,8 +125,8 @@ $Comp
L GND #PWR03 L GND #PWR03
U 1 1 457DBAF1 U 1 1 457DBAF1
P 4850 5900 P 4850 5900
F 0 "#PWR03" H 4850 5900 30 0001 C CNN F 0 "#PWR03" H 4850 5900 30 0001 C C
F 1 "GND" H 4850 5830 30 0001 C CNN F 1 "GND" H 4850 5830 30 0001 C C
1 4850 5900 1 4850 5900
1 0 0 -1 1 0 0 -1
$EndComp $EndComp
@ -158,8 +134,8 @@ $Comp
L GND #PWR04 L GND #PWR04
U 1 1 457DBAEF U 1 1 457DBAEF
P 4450 5900 P 4450 5900
F 0 "#PWR04" H 4450 5900 30 0001 C CNN F 0 "#PWR04" H 4450 5900 30 0001 C C
F 1 "GND" H 4450 5830 30 0001 C CNN F 1 "GND" H 4450 5830 30 0001 C C
1 4450 5900 1 4450 5900
1 0 0 -1 1 0 0 -1
$EndComp $EndComp
@ -167,8 +143,8 @@ $Comp
L PWR_FLAG #FLG05 L PWR_FLAG #FLG05
U 1 1 457DBAC0 U 1 1 457DBAC0
P 4100 5250 P 4100 5250
F 0 "#FLG05" H 4100 5520 30 0001 C CNN F 0 "#FLG05" H 4100 5520 30 0001 C C
F 1 "PWR_FLAG" H 4100 5480 30 0000 C CNN F 1 "PWR_FLAG" H 4100 5480 30 0000 C C
1 4100 5250 1 4100 5250
0 -1 -1 0 0 -1 -1 0
$EndComp $EndComp
@ -176,8 +152,8 @@ $Comp
L CONN_2 P4 L CONN_2 P4
U 1 1 456A8ACC U 1 1 456A8ACC
P 9950 6700 P 9950 6700
F 0 "P4" V 9900 6700 40 0000 C CNN F 0 "P4" V 9900 6700 40 0000 C C
F 1 "CONN_2" V 10000 6700 40 0000 C CNN F 1 "CONN_2" V 10000 6700 40 0000 C C
1 9950 6700 1 9950 6700
0 1 1 0 0 1 1 0
$EndComp $EndComp
@ -185,8 +161,8 @@ $Comp
L C C1 L C C1
U 1 1 4549F4BE U 1 1 4549F4BE
P 6700 4050 P 6700 4050
F 0 "C1" H 6750 4150 50 0000 L CNN F 0 "C1" H 6750 4150 50 0000 L C
F 1 "10uF" H 6450 4150 50 0000 L CNN F 1 "10uF" H 6450 4150 50 0000 L C
1 6700 4050 1 6700 4050
1 0 0 -1 1 0 0 -1
$EndComp $EndComp
@ -194,8 +170,8 @@ $Comp
L GND #PWR06 L GND #PWR06
U 1 1 4549F4B9 U 1 1 4549F4B9
P 4150 5300 P 4150 5300
F 0 "#PWR06" H 4150 5300 30 0001 C CNN F 0 "#PWR06" H 4150 5300 30 0001 C C
F 1 "GND" H 4150 5230 30 0001 C CNN F 1 "GND" H 4150 5230 30 0001 C C
1 4150 5300 1 4150 5300
1 0 0 -1 1 0 0 -1
$EndComp $EndComp
@ -203,8 +179,8 @@ $Comp
L GND #PWR07 L GND #PWR07
U 1 1 4549F4B3 U 1 1 4549F4B3
P 6950 4350 P 6950 4350
F 0 "#PWR07" H 6950 4350 30 0001 C CNN F 0 "#PWR07" H 6950 4350 30 0001 C C
F 1 "GND" H 6950 4280 30 0001 C CNN F 1 "GND" H 6950 4280 30 0001 C C
1 6950 4350 1 6950 4350
1 0 0 -1 1 0 0 -1
$EndComp $EndComp
@ -212,8 +188,8 @@ $Comp
L CONN_2 P3 L CONN_2 P3
U 1 1 4549F4A5 U 1 1 4549F4A5
P 7300 3950 P 7300 3950
F 0 "P3" V 7250 3950 40 0000 C CNN F 0 "P3" V 7250 3950 40 0000 C C
F 1 "POWER" V 7350 3950 40 0000 C CNN F 1 "POWER" V 7350 3950 40 0000 C C
1 7300 3950 1 7300 3950
1 0 0 -1 1 0 0 -1
$EndComp $EndComp
@ -221,8 +197,8 @@ $Comp
L CONN_2 P2 L CONN_2 P2
U 1 1 4549F46C U 1 1 4549F46C
P 7300 4900 P 7300 4900
F 0 "P2" V 7250 4900 40 0000 C CNN F 0 "P2" V 7250 4900 40 0000 C C
F 1 "OUT" V 7350 4900 40 0000 C CNN F 1 "OUT" V 7350 4900 40 0000 C C
1 7300 4900 1 7300 4900
1 0 0 -1 1 0 0 -1
$EndComp $EndComp
@ -230,8 +206,8 @@ $Comp
L CONN_2 P1 L CONN_2 P1
U 1 1 4549F464 U 1 1 4549F464
P 3800 4900 P 3800 4900
F 0 "P1" V 3750 4900 40 0000 C CNN F 0 "P1" V 3750 4900 40 0000 C C
F 1 "IN" V 3850 4900 40 0000 C CNN F 1 "IN" V 3850 4900 40 0000 C C
1 3800 4900 1 3800 4900
-1 0 0 1 -1 0 0 1
$EndComp $EndComp
@ -239,8 +215,8 @@ $Comp
L C C2 L C C2
U 1 1 4549F3BE U 1 1 4549F3BE
P 6500 4800 P 6500 4800
F 0 "C2" H 6550 4900 50 0000 L CNN F 0 "C2" H 6550 4900 50 0000 L C
F 1 "680nF" H 6550 4700 50 0000 L CNN F 1 "680nF" H 6550 4700 50 0000 L C
1 6500 4800 1 6500 4800
0 1 1 0 0 1 1 0
$EndComp $EndComp
@ -248,8 +224,8 @@ $Comp
L R R3 L R R3
U 1 1 4549F3AD U 1 1 4549F3AD
P 6700 5650 P 6700 5650
F 0 "R3" V 6780 5650 50 0000 C CNN F 0 "R3" V 6780 5650 50 0000 C C
F 1 "100K" V 6700 5650 50 0000 C CNN F 1 "100K" V 6700 5650 50 0000 C C
1 6700 5650 1 6700 5650
1 0 0 -1 1 0 0 -1
$EndComp $EndComp
@ -257,8 +233,8 @@ $Comp
L R R4 L R R4
U 1 1 4549F3A2 U 1 1 4549F3A2
P 4450 5650 P 4450 5650
F 0 "R4" V 4530 5650 50 0000 C CNN F 0 "R4" V 4530 5650 50 0000 C C
F 1 "47K" V 4450 5650 50 0000 C CNN F 1 "47K" V 4450 5650 50 0000 C C
1 4450 5650 1 4450 5650
1 0 0 -1 1 0 0 -1
$EndComp $EndComp
@ -266,8 +242,8 @@ $Comp
L R R2 L R R2
U 1 1 4549F39D U 1 1 4549F39D
P 4850 5650 P 4850 5650
F 0 "R2" V 4930 5650 50 0000 C CNN F 0 "R2" V 4930 5650 50 0000 C C
F 1 "1.5K" V 4850 5650 50 0000 C CNN F 1 "1.5K" V 4850 5650 50 0000 C C
1 4850 5650 1 4850 5650
1 0 0 -1 1 0 0 -1
$EndComp $EndComp
@ -275,8 +251,8 @@ $Comp
L R R1 L R R1
U 1 1 4549F38A U 1 1 4549F38A
P 6300 4250 P 6300 4250
F 0 "R1" V 6380 4250 50 0000 C CNN F 0 "R1" V 6380 4250 50 0000 C C
F 1 "1.5K" V 6300 4250 50 0000 C CNN F 1 "1.5K" V 6300 4250 50 0000 C C
1 6300 4250 1 6300 4250
1 0 0 -1 1 0 0 -1
$EndComp $EndComp

View File

@ -1,4 +1,5 @@
EESchema-LIBRARY Version 2.3 Date: 02/02/2011 07:13:37 EESchema-LIBRARY Version 2.3 Date: 18/12/2011 10:04:44
#encoding utf-8
# #
# 4003APG120 # 4003APG120
# #
@ -350,8 +351,8 @@ $FPLIST
C1-1 C1-1
$ENDFPLIST $ENDFPLIST
DRAW DRAW
P 2 0 1 10 -100 -30 100 -30 N P 2 0 1 20 -100 -30 100 -30 N
P 2 0 1 10 -100 30 100 30 N P 2 0 1 20 -100 30 100 30 N
X ~ 1 0 200 170 D 40 40 1 1 P X ~ 1 0 200 170 D 40 40 1 1 P
X ~ 2 0 -200 170 U 40 40 1 1 P X ~ 2 0 -200 170 U 40 40 1 1 P
ENDDRAW ENDDRAW
@ -582,12 +583,11 @@ ENDDEF
# PWR_FLAG # PWR_FLAG
# #
DEF PWR_FLAG #FLG 0 0 N N 1 F P DEF PWR_FLAG #FLG 0 0 N N 1 F P
F0 "#FLG" 0 270 30 H I C CNN F0 "#FLG" 0 95 30 H I C CNN
F1 "PWR_FLAG" 0 230 30 H V C CNN F1 "PWR_FLAG" 0 180 30 H V C CNN
DRAW DRAW
X pwr 1 0 0 0 U 20 20 0 0 w X pwr 1 0 0 0 U 20 20 0 0 w
P 3 0 1 0 0 0 0 100 0 100 N P 6 0 1 0 0 0 0 50 -75 100 0 150 75 100 0 50 N
P 5 0 1 0 0 100 -100 150 0 200 100 150 0 100 N
ENDDRAW ENDDRAW
ENDDEF ENDDEF
# #

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,389 +1,162 @@
# EESchema Netlist Version 1.1 created 3/5/2007-08:10:32 ( { EESchema Netlist Version 1.1 11/02/2011 10:40:30
( eeschema (2011-02-09 BZR 2801)-testing}
( 3EBF81A7 $noname C4 100pF {Lib=C} ( 4D527316 $noname R11 100
( 1 N-000001 ) ( 1 exists in 40exists in 40 )
( 2 GND ) ( 2 exists in 35exists in 35 )
) )
( 3EBF819B $noname R13 100 {Lib=R} ( 3EBF81A7 $noname C4 100pF
( 1 TMS-PROG_1 ) ( 1 exists in 34exists in 34 )
( 2 N-000001 ) ( 2 exists in 1exists in 1 )
) )
( 3EBF7DBD $noname U1 74LS125 {Lib=74LS125} ( 4D528082 $noname R13 100
( 1 N-000041 ) ( 1 exists in 42exists in 42 )
( 2 GND ) ( 2 exists in 34exists in 34 )
( 3 N-000026 )
( 4 N-000028 )
( 5 N-000040 )
( 6 N-000024 )
( 7 GND )
( 8 N-000023 )
( 9 N-000039 )
( 10 N-000028 )
( 11 N-000001 )
( 12 N-000003 )
( 13 N-000028 )
( 14 VCC )
) )
( 3ECDE5C8 $noname J2 DB9MALE {Lib=DB9} ( 3EBF7DBD $noname U1 74LS125
( 1 PWR(3,3-5V)_1 ) ( 1 exists in 31exists in 31 )
( 2 TD0-DONE/P_1 ) ( 2 exists in 1exists in 1 )
( 3 TDI-DIN_1 ) ( 3 exists in 38exists in 38 )
( 4 TCK-CCLK_1 ) ( 4 exists in 33exists in 33 )
( 5 TMS-PROG_1 ) ( 5 exists in 16exists in 16 )
( 6 GND ) ( 6 exists in 35exists in 35 )
( 7 GND ) ( 7 exists in 1exists in 1 )
( 8 GND ) ( 8 exists in 36exists in 36 )
( 9 GND ) ( 9 exists in 30exists in 30 )
( 10 exists in 33exists in 33 )
( 11 exists in 34exists in 34 )
( 12 exists in 32exists in 32 )
( 13 exists in 33exists in 33 )
( 14 exists in 5exists in 5 )
) )
( 3EBF830C $noname P1 CONN_6 {Lib=CONN_6} ( 3ECDE5C8 $noname J2 DB9MALE
( 1 PWR(3,3-5V)_1 ) ( 1 exists in 37exists in 37 )
( 2 GND ) ( 2 exists in 39exists in 39 )
( 3 TD0-DONE/P_1 ) ( 3 exists in 40exists in 40 )
( 4 TDI-DIN_1 ) ( 4 exists in 41exists in 41 )
( 5 TCK-CCLK_1 ) ( 5 exists in 42exists in 42 )
( 6 TMS-PROG_1 ) ( 6 exists in 1exists in 1 )
( 7 exists in 1exists in 1 )
( 8 exists in 1exists in 1 )
( 9 exists in 1exists in 1 )
) )
( 3EBF82C6 $noname C1 1uF {Lib=CP} ( 3EBF830C $noname P1 CONN_6
( 1 VCC ) ( 1 exists in 37exists in 37 )
( 2 GND ) ( 2 exists in 1exists in 1 )
( 3 exists in 39exists in 39 )
( 4 exists in 40exists in 40 )
( 5 exists in 41exists in 41 )
( 6 exists in 42exists in 42 )
) )
( 3EBF81A7 $noname C5 100pF {Lib=C} ( 3EBF82C6 $noname C1 1uF
( 1 N-000023 ) ( 1 exists in 5exists in 5 )
( 2 GND ) ( 2 exists in 1exists in 1 )
) )
( 3EBF819B $noname R12 100 {Lib=R} ( 4D528086 $noname C5 100pF
( 1 TCK-CCLK_1 ) ( 1 exists in 36exists in 36 )
( 2 N-000023 ) ( 2 exists in 1exists in 1 )
) )
( 3EBF81A7 $noname C2 100pF {Lib=C} ( 4D528083 $noname R12 100
( 1 N-000024 ) ( 1 exists in 41exists in 41 )
( 2 GND ) ( 2 exists in 36exists in 36 )
) )
( 3EBF819B $noname R11 100 {Lib=R} ( 4D528085 $noname C2 100pF
( 1 TDI-DIN_1 ) ( 1 exists in 35exists in 35 )
( 2 N-000024 ) ( 2 exists in 1exists in 1 )
) )
( 3EBF81A7 $noname C3 100pF {Lib=C} ( 4D528084 $noname C3 100pF
( 1 N-000026 ) ( 1 exists in 38exists in 38 )
( 2 GND ) ( 2 exists in 1exists in 1 )
) )
( 3EBF819B $noname R14 100 {Lib=R} ( 3EBF819B $noname R14 100
( 1 TD0-DONE/P_1 ) ( 1 exists in 39exists in 39 )
( 2 N-000026 ) ( 2 exists in 38exists in 38 )
) )
( 3EBF818E $noname R5 1K {Lib=R} ( 3EBF818E $noname R5 1K
( 1 VCC ) ( 1 exists in 5exists in 5 )
( 2 GND ) ( 2 exists in 1exists in 1 )
) )
( 3EBF8187 $noname R2 5,1K {Lib=R} ( 3EBF8187 $noname R2 5,1K
( 1 VCC ) ( 1 exists in 5exists in 5 )
( 2 N-000026 ) ( 2 exists in 38exists in 38 )
) )
( 3EBF8176 $noname D2 BAT46 {Lib=DIODESCH} ( 3EBF8176 $noname D2 BAT46
( 1 PWR(3,3-5V)_1 ) ( 1 exists in 37exists in 37 )
( 2 VCC ) ( 2 exists in 5exists in 5 )
) )
( 3EBF815E $noname D1 BAT46 {Lib=DIODESCH} ( 3EBF815E $noname D1 BAT46
( 1 VCC ) ( 1 exists in 5exists in 5 )
( 2 N-000025 ) ( 2 exists in 14exists in 14 )
) )
( 3EBF7EEC $noname U2 74LS125 {Lib=74LS125} ( 3EBF7EEC $noname U2 74LS125
( 1 GND ) ( 1 exists in 1exists in 1 )
( 2 N-000026 ) ( 2 exists in 38exists in 38 )
( 3 N-000042 ) ( 3 exists in 15exists in 15 )
( 4 GND ) ( 4 exists in 1exists in 1 )
( 5 GND ) ( 5 exists in 1exists in 1 )
( 6 ? ) ( 6 exists in 4exists in 4 )
( 7 GND ) ( 7 exists in 1exists in 1 )
( 8 ? ) ( 8 exists in 3exists in 3 )
( 9 GND ) ( 9 exists in 1exists in 1 )
( 10 GND ) ( 10 exists in 1exists in 1 )
( 11 ? ) ( 11 exists in 2exists in 2 )
( 12 GND ) ( 12 exists in 1exists in 1 )
( 13 GND ) ( 13 exists in 1exists in 1 )
( 14 VCC ) ( 14 exists in 5exists in 5 )
) )
( 3EBF7D33 $noname R9 100 {Lib=R} ( 3EBF7D33 $noname R9 100
( 1 N-000003 ) ( 1 exists in 32exists in 32 )
( 2 TMS/PROG(D2)_1 ) ( 2 exists in 6exists in 6 )
) )
( 3EBF7D31 $noname R10 100 {Lib=R} ( 3EBF7D31 $noname R10 100
( 1 N-000039 ) ( 1 exists in 30exists in 30 )
( 2 CLK(D1)_1 ) ( 2 exists in 12exists in 12 )
) )
( 3EBF7D33 $noname R8 100 {Lib=R} ( 4D528080 $noname R8 100
( 1 N-000028 ) ( 1 exists in 33exists in 33 )
( 2 CTRL(D3)_1 ) ( 2 exists in 11exists in 11 )
) )
( 3EBF7D31 $noname R7 100 {Lib=R} ( 4D52807F $noname R7 100
( 1 N-000040 ) ( 1 exists in 16exists in 16 )
( 2 TDI/DIN(D0)_1 ) ( 2 exists in 10exists in 10 )
) )
( 3EBF7D26 $noname R6 100 {Lib=R} ( 3EBF7D26 $noname R6 100
( 1 N-000041 ) ( 1 exists in 31exists in 31 )
( 2 TD0/PROG(D4)_1 ) ( 2 exists in 9exists in 9 )
) )
( 3EBF7D22 $noname R4 47 {Lib=R} ( 3EBF7D22 $noname R4 47
( 1 N-000042 ) ( 1 exists in 15exists in 15 )
( 2 DONE(/SELECT)_1 ) ( 2 exists in 24exists in 24 )
) )
( 3EBF7D16 $noname R1 100 {Lib=R} ( 3EBF7D16 $noname R1 100
( 1 N-000025 ) ( 1 exists in 14exists in 14 )
( 2 VCC_SENSE(/ERROR)_1 ) ( 2 exists in 7exists in 7 )
) )
( 3EBF7D04 $noname J1 DB25MALE {Lib=DB25} ( 3EBF7D04 $noname J1 DB25MALE
( 1 ? ) ( 1 exists in 13exists in 13 )
( 2 TDI/DIN(D0)_1 ) ( 2 exists in 10exists in 10 )
( 3 CLK(D1)_1 ) ( 3 exists in 12exists in 12 )
( 4 TMS/PROG(D2)_1 ) ( 4 exists in 6exists in 6 )
( 5 CTRL(D3)_1 ) ( 5 exists in 11exists in 11 )
( 6 TD0/PROG(D4)_1 ) ( 6 exists in 9exists in 9 )
( 7 ? ) ( 7 exists in 29exists in 29 )
( 8 N-000027 ) ( 8 exists in 8exists in 8 )
( 9 ? ) ( 9 exists in 28exists in 28 )
( 10 ? ) ( 10 exists in 27exists in 27 )
( 11 N-000027 ) ( 11 exists in 8exists in 8 )
( 12 N-000027 ) ( 12 exists in 8exists in 8 )
( 13 DONE(/SELECT)_1 ) ( 13 exists in 24exists in 24 )
( 14 ? ) ( 14 exists in 22exists in 22 )
( 15 VCC_SENSE(/ERROR)_1 ) ( 15 exists in 7exists in 7 )
( 16 ? ) ( 16 exists in 20exists in 20 )
( 17 ? ) ( 17 exists in 19exists in 19 )
( 18 ? ) ( 18 exists in 18exists in 18 )
( 19 ? ) ( 19 exists in 17exists in 17 )
( 20 GND ) ( 20 exists in 1exists in 1 )
( 21 ? ) ( 21 exists in 26exists in 26 )
( 22 ? ) ( 22 exists in 25exists in 25 )
( 23 ? ) ( 23 exists in 23exists in 23 )
( 24 ? ) ( 24 exists in 21exists in 21 )
( 25 GND ) ( 25 exists in 1exists in 1 )
) )
) )
* *
{ Allowed footprints by component:
$component C4
C?
SM*
$endlist
$component R13
R?
SM0603
SM0805
$endlist
$component J2
DB9*
$endlist
$component C1
CP*
SM*
$endlist
$component C5
C?
SM*
$endlist
$component R12
R?
SM0603
SM0805
$endlist
$component C2
C?
SM*
$endlist
$component R11
R?
SM0603
SM0805
$endlist
$component C3
C?
SM*
$endlist
$component R14
R?
SM0603
SM0805
$endlist
$component R5
R?
SM0603
SM0805
$endlist
$component R2
R?
SM0603
SM0805
$endlist
$component R9
R?
SM0603
SM0805
$endlist
$component R10
R?
SM0603
SM0805
$endlist
$component R8
R?
SM0603
SM0805
$endlist
$component R7
R?
SM0603
SM0805
$endlist
$component R6
R?
SM0603
SM0805
$endlist
$component R4
R?
SM0603
SM0805
$endlist
$component R1
R?
SM0603
SM0805
$endlist
$component J1
DB25*
$endlist
$endfootprintlist
}
{ Pin List by Nets
Net 1 ""
U1 11
C4 1
R13 2
Net 2 "GND"
C4 2
U2 10
J1 25
C5 2
U1 7
J2 6
J2 7
J1 20
J2 8
J2 9
U2 5
U2 7
U2 12
U2 4
U2 7
R5 2
U2 13
C3 2
U1 7
C1 2
U2 1
U2 7
P1 2
U1 7
U1 7
U1 2
U2 7
U2 9
C2 2
Net 3 ""
U1 12
R9 1
Net 4 "VCC"
U2 14
U1 14
C1 1
U1 14
R5 1
R2 1
D2 2
U2 14
U2 14
U1 14
U2 14
U1 14
D1 1
Net 18 "PWR(3,3-5V)_1"
D2 1
P1 1
J2 1
Net 19 "TMS-PROG_1"
J2 5
R13 1
P1 6
Net 20 "TCK-CCLK_1"
P1 5
J2 4
R12 1
Net 21 "TDI-DIN_1"
J2 3
R11 1
P1 4
Net 22 "TD0-DONE/P_1"
J2 2
P1 3
R14 1
Net 23 ""
U1 8
R12 2
C5 1
Net 24 ""
C2 1
R11 2
U1 6
Net 25 ""
R1 1
D1 2
Net 26 ""
R14 2
C3 1
U2 2
U1 3
R2 2
Net 27 ""
J1 12
J1 8
J1 11
Net 28 ""
U1 13
U1 4
U1 10
R8 1
Net 29 "VCC_SENSE(/ERROR)_1"
J1 15
R1 2
Net 30 "TDI/DIN(D0)_1"
R7 2
J1 2
Net 31 "CLK(D1)_1"
J1 3
R10 2
Net 32 "CTRL(D3)_1"
R8 2
J1 5
Net 33 "TD0/PROG(D4)_1"
R6 2
J1 6
Net 34 "TMS/PROG(D2)_1"
J1 4
R9 2
Net 35 "DONE(/SELECT)_1"
R4 2
J1 13
Net 39 ""
U1 9
R10 1
Net 40 ""
R7 1
U1 5
Net 41 ""
U1 1
R6 1
Net 42 ""
R4 1
U2 3
}
#End

View File

@ -1,4 +1,4 @@
EESchema Schematic File Version 2 date 09/02/2011 18:36:39 EESchema Schematic File Version 2 date 10/02/2011 12:23:20
LIBS:power LIBS:power
LIBS:device LIBS:device
LIBS:conn LIBS:conn
@ -30,7 +30,7 @@ EELAYER END
$Descr A4 11700 8267 $Descr A4 11700 8267
Sheet 1 1 Sheet 1 1
Title "CABLE PARALLELE III" Title "CABLE PARALLELE III"
Date "9 feb 2011" Date "10 feb 2011"
Rev "1" Rev "1"
Comp "" Comp ""
Comment1 "" Comment1 ""
@ -38,6 +38,15 @@ Comment2 ""
Comment3 "" Comment3 ""
Comment4 "" Comment4 ""
$EndDescr $EndDescr
$Comp
L R R11
U 1 1 4D527316
P 6650 2600
F 0 "R11" V 6730 2600 50 0000 C CNN
F 1 "100" V 6650 2600 50 0000 C CNN
1 6650 2600
0 1 1 0
$EndComp
Wire Wire Line Wire Wire Line
6900 4200 7350 4200 6900 4200 7350 4200
Wire Wire Line Wire Wire Line
@ -48,17 +57,17 @@ Wire Wire Line
Wire Wire Line Wire Wire Line
6400 4200 5900 4200 6400 4200 5900 4200
$Comp $Comp
L GND #PWR111 L GND #PWR01
U 1 1 4D52D0AC U 1 1 3EBF81B1
P 6300 4650 P 6300 4650
F 0 "#PWR111" H 6300 4650 40 0001 C CNN F 0 "#PWR01" H 6300 4650 40 0001 C CNN
F 1 "GND" H 6300 4580 40 0001 C CNN F 1 "GND" H 6300 4580 40 0001 C CNN
1 6300 4650 1 6300 4650
1 0 0 -1 1 0 0 -1
$EndComp $EndComp
$Comp $Comp
L C C4 L C C4
U 1 1 4D52D0AA U 1 1 3EBF81A7
P 6300 4450 P 6300 4450
F 0 "C4" H 6350 4550 50 0000 L CNN F 0 "C4" H 6350 4550 50 0000 L CNN
F 1 "100pF" H 6350 4350 50 0000 L CNN F 1 "100pF" H 6350 4350 50 0000 L CNN
@ -67,7 +76,7 @@ F 1 "100pF" H 6350 4350 50 0000 L CNN
$EndComp $EndComp
$Comp $Comp
L R R13 L R R13
U 1 1 4D52D0A6 U 1 1 4D528082
P 6650 4200 P 6650 4200
F 0 "R13" V 6730 4200 50 0000 C CNN F 0 "R13" V 6730 4200 50 0000 C CNN
F 1 "100" V 6650 4200 50 0000 C CNN F 1 "100" V 6650 4200 50 0000 C CNN
@ -134,37 +143,37 @@ Wire Wire Line
Wire Wire Line Wire Wire Line
8400 3700 8400 2750 8400 3700 8400 2750
$Comp $Comp
L PWR_FLAG #FLG102 L PWR_FLAG #FLG02
U 1 1 3EBF848F U 1 1 3EBF848F
P 6200 1050 P 6200 1050
F 0 "#FLG102" H 6200 1320 30 0001 C CNN F 0 "#FLG02" H 6200 1320 30 0001 C CNN
F 1 "PWR_FLAG" H 6200 1280 30 0000 C CNN F 1 "PWR_FLAG" H 6200 1280 30 0000 C CNN
1 6200 1050 1 6200 1050
1 0 0 -1 1 0 0 -1
$EndComp $EndComp
$Comp $Comp
L VCC #PWR106 L VCC #PWR03
U 1 1 3EBF8479 U 1 1 3EBF8479
P 5900 1050 P 5900 1050
F 0 "#PWR106" H 5900 1150 30 0001 C CNN F 0 "#PWR03" H 5900 1150 30 0001 C CNN
F 1 "VCC" H 5900 1150 30 0000 C CNN F 1 "VCC" H 5900 1150 30 0000 C CNN
1 5900 1050 1 5900 1050
1 0 0 -1 1 0 0 -1
$EndComp $EndComp
$Comp $Comp
L GND #PWR101 L GND #PWR04
U 1 1 3EBF8458 U 1 1 3EBF8458
P 800 7300 P 800 7300
F 0 "#PWR101" H 800 7300 40 0001 C CNN F 0 "#PWR04" H 800 7300 40 0001 C CNN
F 1 "GND" H 800 7230 40 0001 C CNN F 1 "GND" H 800 7230 40 0001 C CNN
1 800 7300 1 800 7300
1 0 0 -1 1 0 0 -1
$EndComp $EndComp
$Comp $Comp
L PWR_FLAG #FLG101 L PWR_FLAG #FLG05
U 1 1 3EBF843C U 1 1 3EBF843C
P 800 7300 P 800 7300
F 0 "#FLG101" H 800 7570 30 0001 C CNN F 0 "#FLG05" H 800 7570 30 0001 C CNN
F 1 "PWR_FLAG" H 800 7530 30 0000 C CNN F 1 "PWR_FLAG" H 800 7530 30 0000 C CNN
1 800 7300 1 800 7300
1 0 0 -1 1 0 0 -1
@ -179,10 +188,10 @@ Wire Wire Line
Wire Wire Line Wire Wire Line
2500 2700 2200 2700 2500 2700 2200 2700
$Comp $Comp
L GND #PWR104 L GND #PWR06
U 1 1 4D52D0A5 U 1 1 4D528081
P 2500 2750 P 2500 2750
F 0 "#PWR104" H 2500 2750 40 0001 C CNN F 0 "#PWR06" H 2500 2750 40 0001 C CNN
F 1 "GND" H 2500 2680 40 0001 C CNN F 1 "GND" H 2500 2680 40 0001 C CNN
1 2500 2750 1 2500 2750
1 0 0 -1 1 0 0 -1
@ -198,12 +207,12 @@ NoConn ~ 2200 1900
Wire Wire Line Wire Wire Line
10250 3500 9400 3500 10250 3500 9400 3500
Text Label 9450 3500 0 60 ~ 0 Text Label 9450 3500 0 60 ~ 0
PWR(3,3-5V) PWR_3,3-5V
$Comp $Comp
L GND #PWR114 L GND #PWR07
U 1 1 3EBF8376 U 1 1 4D52808A
P 10050 3600 P 10050 3600
F 0 "#PWR114" H 10050 3600 40 0001 C CNN F 0 "#PWR07" H 10050 3600 40 0001 C CNN
F 1 "GND" H 10050 3530 40 0001 C CNN F 1 "GND" H 10050 3530 40 0001 C CNN
1 10050 3600 1 10050 3600
0 1 1 0 0 1 1 0
@ -215,14 +224,14 @@ TCK-CCLK
Text Label 7550 2850 0 60 ~ 0 Text Label 7550 2850 0 60 ~ 0
TDI-DIN TDI-DIN
Text Label 7550 2750 0 60 ~ 0 Text Label 7550 2750 0 60 ~ 0
TD0-DONE/P TD0-DONE
Text Label 7700 2550 0 60 ~ 0 Text Label 7700 2550 0 60 ~ 0
PWR(3,3-5V) PWR_3,3-5V
$Comp $Comp
L GND #PWR113 L GND #PWR08
U 1 1 4D52D0AF U 1 1 3EBF8376
P 8500 2650 P 8500 2650
F 0 "#PWR113" H 8500 2650 40 0001 C CNN F 0 "#PWR08" H 8500 2650 40 0001 C CNN
F 1 "GND" H 8500 2580 40 0001 C CNN F 1 "GND" H 8500 2580 40 0001 C CNN
1 8500 2650 1 8500 2650
0 1 1 0 0 1 1 0
@ -266,10 +275,10 @@ Connection ~ 6500 1050
Wire Wire Line Wire Wire Line
6500 1100 6500 1050 6500 1100 6500 1050
$Comp $Comp
L GND #PWR112 L GND #PWR09
U 1 1 3EBF82CF U 1 1 3EBF82CF
P 6500 1500 P 6500 1500
F 0 "#PWR112" H 6500 1500 40 0001 C CNN F 0 "#PWR09" H 6500 1500 40 0001 C CNN
F 1 "GND" H 6500 1430 40 0001 C CNN F 1 "GND" H 6500 1430 40 0001 C CNN
1 6500 1500 1 6500 1500
1 0 0 -1 1 0 0 -1
@ -299,17 +308,17 @@ Wire Wire Line
Wire Wire Line Wire Wire Line
6400 1900 5900 1900 6400 1900 5900 1900
$Comp $Comp
L GND #PWR110 L GND #PWR010
U 1 1 4D52D0AD U 1 1 4D528089
P 6300 3750 P 6300 3750
F 0 "#PWR110" H 6300 3750 40 0001 C CNN F 0 "#PWR010" H 6300 3750 40 0001 C CNN
F 1 "GND" H 6300 3680 40 0001 C CNN F 1 "GND" H 6300 3680 40 0001 C CNN
1 6300 3750 1 6300 3750
1 0 0 -1 1 0 0 -1
$EndComp $EndComp
$Comp $Comp
L C C5 L C C5
U 1 1 3EBF81A7 U 1 1 4D528086
P 6300 3550 P 6300 3550
F 0 "C5" H 6350 3650 50 0000 L CNN F 0 "C5" H 6350 3650 50 0000 L CNN
F 1 "100pF" H 6350 3450 50 0000 L CNN F 1 "100pF" H 6350 3450 50 0000 L CNN
@ -318,7 +327,7 @@ F 1 "100pF" H 6350 3450 50 0000 L CNN
$EndComp $EndComp
$Comp $Comp
L R R12 L R R12
U 1 1 4D52D0A7 U 1 1 4D528083
P 6650 3300 P 6650 3300
F 0 "R12" V 6730 3300 50 0000 C CNN F 0 "R12" V 6730 3300 50 0000 C CNN
F 1 "100" V 6650 3300 50 0000 C CNN F 1 "100" V 6650 3300 50 0000 C CNN
@ -326,32 +335,23 @@ F 1 "100" V 6650 3300 50 0000 C CNN
0 1 1 0 0 1 1 0
$EndComp $EndComp
$Comp $Comp
L GND #PWR109 L GND #PWR011
U 1 1 4D52D0AE U 1 1 4D528088
P 6300 3050 P 6300 3050
F 0 "#PWR109" H 6300 3050 40 0001 C CNN F 0 "#PWR011" H 6300 3050 40 0001 C CNN
F 1 "GND" H 6300 2980 40 0001 C CNN F 1 "GND" H 6300 2980 40 0001 C CNN
1 6300 3050 1 6300 3050
1 0 0 -1 1 0 0 -1
$EndComp $EndComp
$Comp $Comp
L C C2 L C C2
U 1 1 4D52D0AB U 1 1 4D528085
P 6300 2850 P 6300 2850
F 0 "C2" H 6350 2950 50 0000 L CNN F 0 "C2" H 6350 2950 50 0000 L CNN
F 1 "100pF" H 6350 2750 50 0000 L CNN F 1 "100pF" H 6350 2750 50 0000 L CNN
1 6300 2850 1 6300 2850
1 0 0 -1 1 0 0 -1
$EndComp $EndComp
$Comp
L R R11
U 1 1 4D52D0A8
P 6650 2600
F 0 "R11" V 6730 2600 50 0000 C CNN
F 1 "100" V 6650 2600 50 0000 C CNN
1 6650 2600
0 1 1 0
$EndComp
Connection ~ 5900 1050 Connection ~ 5900 1050
Connection ~ 6200 1050 Connection ~ 6200 1050
Wire Wire Line Wire Wire Line
@ -365,26 +365,26 @@ Wire Wire Line
Wire Wire Line Wire Wire Line
6200 1050 6200 1100 6200 1050 6200 1100
$Comp $Comp
L GND #PWR107 L GND #PWR012
U 1 1 3EBF81B3 U 1 1 3EBF81B3
P 6200 1600 P 6200 1600
F 0 "#PWR107" H 6200 1600 40 0001 C CNN F 0 "#PWR012" H 6200 1600 40 0001 C CNN
F 1 "GND" H 6200 1530 40 0001 C CNN F 1 "GND" H 6200 1530 40 0001 C CNN
1 6200 1600 1 6200 1600
1 0 0 -1 1 0 0 -1
$EndComp $EndComp
$Comp $Comp
L GND #PWR108 L GND #PWR013
U 1 1 3EBF81B1 U 1 1 4D528087
P 6300 2350 P 6300 2350
F 0 "#PWR108" H 6300 2350 40 0001 C CNN F 0 "#PWR013" H 6300 2350 40 0001 C CNN
F 1 "GND" H 6300 2280 40 0001 C CNN F 1 "GND" H 6300 2280 40 0001 C CNN
1 6300 2350 1 6300 2350
1 0 0 -1 1 0 0 -1
$EndComp $EndComp
$Comp $Comp
L C C3 L C C3
U 1 1 4D52D0A9 U 1 1 4D528084
P 6300 2150 P 6300 2150
F 0 "C3" H 6350 2250 50 0000 L CNN F 0 "C3" H 6350 2250 50 0000 L CNN
F 1 "100pF" H 6350 2050 50 0000 L CNN F 1 "100pF" H 6350 2050 50 0000 L CNN
@ -450,19 +450,19 @@ Wire Wire Line
Wire Wire Line Wire Wire Line
2500 1700 2200 1700 2500 1700 2200 1700
$Comp $Comp
L GND #PWR103 L GND #PWR014
U 1 1 3EBF8100 U 1 1 3EBF8100
P 2500 1750 P 2500 1750
F 0 "#PWR103" H 2500 1750 40 0001 C CNN F 0 "#PWR014" H 2500 1750 40 0001 C CNN
F 1 "GND" H 2500 1680 40 0001 C CNN F 1 "GND" H 2500 1680 40 0001 C CNN
1 2500 1750 1 2500 1750
1 0 0 -1 1 0 0 -1
$EndComp $EndComp
$Comp $Comp
L GND #PWR105 L GND #PWR015
U 1 1 3EBF80DD U 1 1 3EBF80DD
P 4650 2000 P 4650 2000
F 0 "#PWR105" H 4650 2000 40 0001 C CNN F 0 "#PWR015" H 4650 2000 40 0001 C CNN
F 1 "GND" H 4650 1930 40 0001 C CNN F 1 "GND" H 4650 1930 40 0001 C CNN
1 4650 2000 1 4650 2000
1 0 0 -1 1 0 0 -1
@ -470,17 +470,17 @@ $EndComp
Connection ~ 4800 3600 Connection ~ 4800 3600
Connection ~ 4800 2900 Connection ~ 4800 2900
Text Label 2500 1050 0 60 ~ 0 Text Label 2500 1050 0 60 ~ 0
VCC_SENSE(/ERROR) VCC_SENSE-ERROR*
Text Label 2400 3800 0 60 ~ 0 Text Label 2400 3800 0 60 ~ 0
TDI/DIN(D0) TDI-DIN-D0
Text Label 2400 3600 0 60 ~ 0 Text Label 2400 3600 0 60 ~ 0
CLK(D1) CLK-D1
Text Label 2400 3400 0 60 ~ 0 Text Label 2400 3400 0 60 ~ 0
TMS/PROG(D2) TMS-PROG-D2
Text Label 2400 3200 0 60 ~ 0 Text Label 2400 3200 0 60 ~ 0
CTRL(D3) CTRL-D3
Text Label 2400 3000 0 60 ~ 0 Text Label 2400 3000 0 60 ~ 0
TD0/PROG(D4) TD0-PROG-D4
Wire Wire Line Wire Wire Line
2300 1050 3700 1050 2300 1050 3700 1050
Wire Wire Line Wire Wire Line
@ -516,7 +516,7 @@ Wire Wire Line
Wire Wire Line Wire Wire Line
3350 2250 3700 2250 3350 2250 3700 2250
Text Label 2500 1600 0 60 ~ 0 Text Label 2500 1600 0 60 ~ 0
DONE(/SELECT) DONE-SELECT*
NoConn ~ 2150 6900 NoConn ~ 2150 6900
NoConn ~ 2150 6250 NoConn ~ 2150 6250
NoConn ~ 2150 5600 NoConn ~ 2150 5600
@ -531,10 +531,10 @@ Wire Wire Line
Wire Wire Line Wire Wire Line
1700 7200 1150 7200 1700 7200 1150 7200
$Comp $Comp
L GND #PWR102 L GND #PWR016
U 1 1 3EBF7F0D U 1 1 3EBF7F0D
P 1150 7300 P 1150 7300
F 0 "#PWR102" H 1150 7300 40 0001 C CNN F 0 "#PWR016" H 1150 7300 40 0001 C CNN
F 1 "GND" H 1150 7230 40 0001 C CNN F 1 "GND" H 1150 7230 40 0001 C CNN
1 1150 7300 1 1150 7300
1 0 0 -1 1 0 0 -1
@ -653,7 +653,7 @@ F 1 "100" V 3950 3300 50 0000 C CNN
$EndComp $EndComp
$Comp $Comp
L R R8 L R R8
U 1 1 4D52D0A4 U 1 1 4D528080
P 3950 2900 P 3950 2900
F 0 "R8" V 4030 2900 50 0000 C CNN F 0 "R8" V 4030 2900 50 0000 C CNN
F 1 "100" V 3950 2900 50 0000 C CNN F 1 "100" V 3950 2900 50 0000 C CNN
@ -662,7 +662,7 @@ F 1 "100" V 3950 2900 50 0000 C CNN
$EndComp $EndComp
$Comp $Comp
L R R7 L R R7
U 1 1 4D52D0A3 U 1 1 4D52807F
P 3950 2600 P 3950 2600
F 0 "R7" V 4030 2600 50 0000 C CNN F 0 "R7" V 4030 2600 50 0000 C CNN
F 1 "100" V 3950 2600 50 0000 C CNN F 1 "100" V 3950 2600 50 0000 C CNN

View File

@ -0,0 +1,16 @@
EESchema-LIBRARY Version 2.3 Date: 19/12/2011 12:55:30
#encoding utf-8
#
# CONN_1
#
DEF ~CONN_1 P 0 30 N N 1 F N
F0 "P" 80 0 40 H V L CNN
F1 "CONN_1" 0 55 30 H I C CNN
DRAW
C 0 0 31 0 1 0 N
P 2 0 1 0 -30 0 -50 0 N
X 1 1 -150 0 100 R 60 60 1 1 P
ENDDRAW
ENDDEF
#
#End Library

View File

@ -0,0 +1,249 @@
PCBNEW-BOARD Version 1 date 19/12/2011 12:56:01
# Created by Pcbnew(2011-12-16 BZR 3311)-testing
$GENERAL
encoding utf-8
LayerCount 2
Ly 1FFF8001
EnabledLayers 1FFF8001
Links 12
NoConn 0
Di 29493 12193 43883 25650
Ndraw 0
Ntrack 4
Nzone 0
BoardThickness 630
Nmodule 4
Nnets 3
$EndGENERAL
$SHEETDESCR
Sheet A4 11700 8267
Title ""
Date "19 dec 2011"
Rev ""
Comp ""
Comment1 ""
Comment2 ""
Comment3 ""
Comment4 ""
$EndSHEETDESCR
$SETUP
InternalUnit 0.000100 INCH
Layers 2
Layer[0] Dessous signal
Layer[15] Dessus signal
TrackWidth 80
TrackClearence 100
ZoneClearence 200
TrackMinWidth 80
DrawSegmWidth 150
EdgeSegmWidth 150
ViaSize 350
ViaDrill 250
ViaMinSize 350
ViaMinDrill 200
MicroViaSize 200
MicroViaDrill 50
MicroViasAllowed 0
MicroViaMinSize 200
MicroViaMinDrill 50
TextPcbWidth 120
TextPcbSize 600 800
EdgeModWidth 150
TextModSize 600 600
TextModWidth 120
PadSize 600 600
PadDrill 320
Pad2MaskClearance 100
AuxiliaryAxisOrg 0 0
PcbPlotParams (pcbplotparams (layerselection 3178497) (usegerberextensions true) (excludeedgelayer true) (linewidth 60) (plotframeref false) (viasonmask false) (mode 1) (useauxorigin false) (hpglpennumber 1) (hpglpenspeed 20) (hpglpendiameter 15) (hpglpenoverlay 0) (pscolor true) (psnegative false) (psa4output false) (plotreference true) (plotvalue true) (plotothertext true) (plotinvisibletext false) (padsonsilk false) (subtractmaskfromsilk false) (outputformat 1) (mirror false) (drillshape 1) (scaleselection 1) (outputdirectory ""))
$EndSETUP
$EQUIPOT
Na 0 ""
St ~
$EndEQUIPOT
$EQUIPOT
Na 1 "/NET1"
St ~
$EndEQUIPOT
$EQUIPOT
Na 2 "/NET2"
St ~
$EndEQUIPOT
$NCLASS
Name "Default"
Desc "Ceci est la Netclass par défaut"
Clearance 100
TrackWidth 80
ViaDia 350
ViaDrill 250
uViaDia 200
uViaDrill 50
AddNet ""
AddNet "/NET1"
AddNet "/NET2"
$EndNCLASS
$MODULE 1pin
Po 35250 17950 0 15 4EE506A9 4EE505BA ~~
Li 1pin
Cd module 1 pin (ou trou mecanique de percage)
Kw DEV
Sc 4EE505BA
AR /4EDF7CC5
Op 0 0 0
T0 0 -1200 400 400 0 100 N V 21 N "P1"
T1 0 1100 400 400 0 100 N I 21 N "CONN_1"
DC 0 0 0 -900 150 21
$PAD
Sh "1" R 8000 8000 0 0 0
Dr 0 0 0
At SMD N 00888000
Ne 2 "/NET2"
Po 0 0
$EndPAD
$PAD
Sh "1" C 600 600 0 0 0
Dr 300 0 0
At STD N 00E0FFFF
Ne 2 "/NET2"
Po -3250 -3000
$EndPAD
$PAD
Sh "1" C 600 600 0 0 0
Dr 300 0 0
At STD N 00E0FFFF
Ne 2 "/NET2"
Po -1500 -3000
$EndPAD
$PAD
Sh "1" C 600 600 0 0 0
Dr 300 0 0
At STD N 00E0FFFF
Ne 2 "/NET2"
Po 0 -3000
$EndPAD
$PAD
Sh "1" C 600 600 0 0 0
Dr 300 0 0
At STD N 00E0FFFF
Ne 2 "/NET2"
Po 1500 -3000
$EndPAD
$PAD
Sh "1" C 600 600 0 0 0
Dr 300 0 0
At STD N 00E0FFFF
Ne 2 "/NET2"
Po 3250 -3000
$EndPAD
$PAD
Sh "1" C 600 600 0 0 0
Dr 300 0 0
At STD N 00E0FFFF
Ne 2 "/NET2"
Po 3250 -1750
$EndPAD
$PAD
Sh "1" C 600 600 0 0 0
Dr 300 0 0
At STD N 00E0FFFF
Ne 2 "/NET2"
Po 1500 -1750
$EndPAD
$PAD
Sh "1" C 600 600 0 0 0
Dr 300 0 0
At STD N 00E0FFFF
Ne 2 "/NET2"
Po 0 -1750
$EndPAD
$PAD
Sh "1" C 600 600 0 0 0
Dr 300 0 0
At STD N 00E0FFFF
Ne 2 "/NET2"
Po -1500 -1750
$EndPAD
$PAD
Sh "1" C 600 600 0 0 0
Dr 300 0 0
At STD N 00E0FFFF
Ne 2 "/NET2"
Po -3250 -1750
$EndPAD
$EndMODULE 1pin
$MODULE 1pin
Po 42400 17950 0 15 00200000 4EE505BC ~~
Li 1pin
Cd module 1 pin (ou trou mecanique de percage)
Kw DEV
Sc 4EE505BC
AR /4EDF7CC0
Op 0 0 0
T0 0 -1200 400 400 0 100 N V 21 N "P2"
T1 0 1100 400 400 0 100 N I 21 N "CONN_1"
DC 0 0 0 -900 150 21
$PAD
Sh "1" C 1600 1600 0 0 0
Dr 1200 0 0
At STD N 00E0FFFF
Ne 2 "/NET2"
Po 0 0
$EndPAD
$EndMODULE 1pin
$MODULE 1pin
Po 34300 24200 0 15 00200000 4EE505BE ~~
Li 1pin
Cd module 1 pin (ou trou mecanique de percage)
Kw DEV
Sc 4EE505BE
AR /4EE5056C
Op 0 0 0
T0 0 -1200 400 400 0 100 N V 21 N "P3"
T1 0 1100 400 400 0 100 N I 21 N "CONN_1"
DC 0 0 0 -900 150 21
$PAD
Sh "1" C 1600 1600 0 0 0
Dr 1200 0 0
At STD N 00E0FFFF
Ne 1 "/NET1"
Po 0 0
$EndPAD
$EndMODULE 1pin
$MODULE 1pin
Po 42150 24200 0 15 4EE8A1D1 4EE505C0 ~~
Li 1pin
Cd module 1 pin (ou trou mecanique de percage)
Kw DEV
Sc 4EE505C0
AR /4EE5056D
Op 0 0 0
T0 0 -1200 400 400 0 100 N V 21 N "P4"
T1 0 1100 400 400 0 100 N I 21 N "CONN_1"
DC 0 0 0 -900 150 21
$PAD
Sh "1" C 1600 1600 0 0 0
Dr 1200 0 0
At STD N 00E0FFFF
Ne 1 "/NET1"
Po 0 0
Le 3000
$EndPAD
$EndMODULE 1pin
$TRACK
Po 0 42150 24200 34300 24200 80 -1
De 0 0 1 0 C00000
Po 0 38500 16200 40850 16200 80 -1
De 0 0 2 0 0
Po 0 42400 17750 42400 17950 80 -1
De 0 0 2 0 0
Po 0 40850 16200 42400 17750 80 -1
De 0 0 2 0 0
$EndTRACK
$ZONE
$EndZONE
$EndBOARD

View File

@ -0,0 +1,31 @@
Cmp-Mod V01 Created by CvPcb (2011-12-09 BZR 3290)-testing date = 11/12/2011 20:34:04
BeginCmp
TimeStamp = /4EDF7CC5;
Reference = P1;
ValeurCmp = CONN_1;
IdModule = 1pin;
EndCmp
BeginCmp
TimeStamp = /4EDF7CC0;
Reference = P2;
ValeurCmp = CONN_1;
IdModule = 1pin;
EndCmp
BeginCmp
TimeStamp = /4EE5056C;
Reference = P3;
ValeurCmp = CONN_1;
IdModule = 1pin;
EndCmp
BeginCmp
TimeStamp = /4EE5056D;
Reference = P4;
ValeurCmp = CONN_1;
IdModule = 1pin;
EndCmp
EndListe

View File

@ -0,0 +1,25 @@
# EESchema Netlist Version 1.1 created 19/12/2011 12:55:28
(
( /4EE5056D $noname P4 CONN_1 {Lib=CONN_1}
( 1 /NET1 )
)
( /4EE5056C $noname P3 CONN_1 {Lib=CONN_1}
( 1 /NET1 )
)
( /4EDF7CC5 $noname P1 CONN_1 {Lib=CONN_1}
( 1 /NET2 )
)
( /4EDF7CC0 $noname P2 CONN_1 {Lib=CONN_1}
( 1 /NET2 )
)
)
*
{ Pin List by Nets
Net 1 "/NET1" "NET1"
P4 1
P3 1
Net 2 "/NET2" "NET2"
P1 1
P2 1
}
#End

View File

@ -0,0 +1,108 @@
update=13/12/2011 11:04:14
version=1
last_client=pcbnew
[cvpcb]
version=1
NetITyp=0
NetIExt=.net
PkgIExt=.pkg
NetDir=
LibDir=
NetType=0
[cvpcb/libraries]
EquName1=devcms
[eeschema]
version=1
LibDir=
NetFmt=1
HPGLSpd=20
HPGLDm=15
HPGLNum=1
offX_A4=0
offY_A4=0
offX_A3=0
offY_A3=0
offX_A2=0
offY_A2=0
offX_A1=0
offY_A1=0
offX_A0=0
offY_A0=0
offX_A=0
offY_A=0
offX_B=0
offY_B=0
offX_C=0
offY_C=0
offX_D=0
offY_D=0
offX_E=0
offY_E=0
RptD_X=0
RptD_Y=100
RptLab=1
SimCmd=
UseNetN=0
LabSize=60
[eeschema/libraries]
LibName1=power
LibName2=device
LibName3=transistors
LibName4=conn
LibName5=linear
LibName6=regul
LibName7=74xx
LibName8=cmos4000
LibName9=adc-dac
LibName10=memory
LibName11=xilinx
LibName12=special
LibName13=microcontrollers
LibName14=dsp
LibName15=microchip
LibName16=analog_switches
LibName17=motorola
LibName18=texas
LibName19=intel
LibName20=audio
LibName21=interface
LibName22=digital-audio
LibName23=philips
LibName24=display
LibName25=cypress
LibName26=siliconi
LibName27=opto
LibName28=atmel
LibName29=contrib
LibName30=valves
[general]
version=1
[pcbnew]
version=1
PadDrlX=320
PadDimH=600
PadDimV=600
BoardThickness=630
TxtPcbV=800
TxtPcbH=600
TxtModV=600
TxtModH=600
TxtModW=120
VEgarde=100
DrawLar=150
EdgeLar=150
TxtLar=120
MSegLar=150
LastNetListRead=
[pcbnew/libraries]
LibDir=
LibName1=sockets
LibName2=connect
LibName3=discret
LibName4=pin_array
LibName5=divers
LibName6=libcms
LibName7=display
LibName8=valves
LibName9=led
LibName10=dip_sockets

View File

@ -0,0 +1,90 @@
EESchema Schematic File Version 2 date 19/12/2011 12:55:30
LIBS:power
LIBS:device
LIBS:transistors
LIBS:conn
LIBS:linear
LIBS:regul
LIBS:74xx
LIBS:cmos4000
LIBS:adc-dac
LIBS:memory
LIBS:xilinx
LIBS:special
LIBS:microcontrollers
LIBS:dsp
LIBS:microchip
LIBS:analog_switches
LIBS:motorola
LIBS:texas
LIBS:intel
LIBS:audio
LIBS:interface
LIBS:digital-audio
LIBS:philips
LIBS:display
LIBS:cypress
LIBS:siliconi
LIBS:opto
LIBS:atmel
LIBS:contrib
LIBS:valves
EELAYER 25 0
EELAYER END
$Descr A4 11700 8267
encoding utf-8
Sheet 1 1
Title ""
Date "19 dec 2011"
Rev ""
Comp ""
Comment1 ""
Comment2 ""
Comment3 ""
Comment4 ""
$EndDescr
Wire Wire Line
4150 1750 3750 1750
Wire Wire Line
4150 1450 3750 1450
Text Label 3850 1450 0 60 ~ 0
NET1
$Comp
L CONN_1 P4
U 1 1 4EE5056D
P 4300 1450
F 0 "P4" H 4380 1450 40 0000 L CNN
F 1 "CONN_1" H 4300 1505 30 0001 C CNN
1 4300 1450
1 0 0 -1
$EndComp
$Comp
L CONN_1 P3
U 1 1 4EE5056C
P 3600 1450
F 0 "P3" H 3680 1450 40 0000 L CNN
F 1 "CONN_1" H 3600 1505 30 0001 C CNN
1 3600 1450
-1 0 0 1
$EndComp
$Comp
L CONN_1 P1
U 1 1 4EDF7CC5
P 3600 1750
F 0 "P1" H 3680 1750 40 0000 L CNN
F 1 "CONN_1" H 3600 1805 30 0001 C CNN
1 3600 1750
-1 0 0 1
$EndComp
$Comp
L CONN_1 P2
U 1 1 4EDF7CC0
P 4300 1750
F 0 "P2" H 4380 1750 40 0000 L CNN
F 1 "CONN_1" H 4300 1805 30 0001 C CNN
1 4300 1750
1 0 0 -1
$EndComp
Text Label 3850 1750 0 60 ~ 0
NET2
$EndSCHEMATC

File diff suppressed because it is too large Load Diff

View File

@ -148,7 +148,7 @@ void SCH_EDIT_FRAME::AnnotateComponents( bool aAnnotateSchematic,
m_CurrentSheet->UpdateAllScreenReferences(); m_CurrentSheet->UpdateAllScreenReferences();
SetSheetNumberAndCount(); SetSheetNumberAndCount();
DrawPanel->Refresh( true ); m_canvas->Refresh( true );
} }

View File

@ -105,7 +105,7 @@ void SCH_EDIT_FRAME::InitBlockPasteInfos()
BLOCK_SELECTOR* block = &GetScreen()->m_BlockLocate; BLOCK_SELECTOR* block = &GetScreen()->m_BlockLocate;
block->m_ItemsSelection.CopyList( m_blockItems.m_ItemsSelection ); block->m_ItemsSelection.CopyList( m_blockItems.m_ItemsSelection );
DrawPanel->m_mouseCaptureCallback = DrawMovingBlockOutlines; m_canvas->m_mouseCaptureCallback = DrawMovingBlockOutlines;
} }
@ -113,7 +113,7 @@ void SCH_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
{ {
BLOCK_SELECTOR* block = &GetScreen()->m_BlockLocate; BLOCK_SELECTOR* block = &GetScreen()->m_BlockLocate;
if( !DrawPanel->IsMouseCaptured() ) if( !m_canvas->IsMouseCaptured() )
{ {
DisplayError( this, wxT( "HandleBlockPLace() : m_mouseCaptureCallback = NULL" ) ); DisplayError( this, wxT( "HandleBlockPLace() : m_mouseCaptureCallback = NULL" ) );
} }
@ -138,8 +138,8 @@ void SCH_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
case BLOCK_MIRROR_Y: case BLOCK_MIRROR_Y:
case BLOCK_DRAG: /* Drag */ case BLOCK_DRAG: /* Drag */
case BLOCK_MOVE: /* Move */ case BLOCK_MOVE: /* Move */
if( DrawPanel->IsMouseCaptured() ) if( m_canvas->IsMouseCaptured() )
DrawPanel->m_mouseCaptureCallback( DrawPanel, DC, wxDefaultPosition, false ); m_canvas->m_mouseCaptureCallback( m_canvas, DC, wxDefaultPosition, false );
SaveCopyInUndoList( block->m_ItemsSelection, UR_MOVED, block->m_MoveVector ); SaveCopyInUndoList( block->m_ItemsSelection, UR_MOVED, block->m_MoveVector );
MoveItemsInList( block->m_ItemsSelection, block->m_MoveVector ); MoveItemsInList( block->m_ItemsSelection, block->m_MoveVector );
@ -148,8 +148,8 @@ void SCH_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
case BLOCK_COPY: /* Copy */ case BLOCK_COPY: /* Copy */
case BLOCK_PRESELECT_MOVE: /* Move with preselection list*/ case BLOCK_PRESELECT_MOVE: /* Move with preselection list*/
if( DrawPanel->IsMouseCaptured() ) if( m_canvas->IsMouseCaptured() )
DrawPanel->m_mouseCaptureCallback( DrawPanel, DC, wxDefaultPosition, false ); m_canvas->m_mouseCaptureCallback( m_canvas, DC, wxDefaultPosition, false );
DuplicateItemsInList( GetScreen(), block->m_ItemsSelection, block->m_MoveVector ); DuplicateItemsInList( GetScreen(), block->m_ItemsSelection, block->m_MoveVector );
@ -160,8 +160,8 @@ void SCH_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
break; break;
case BLOCK_PASTE: case BLOCK_PASTE:
if( DrawPanel->IsMouseCaptured() ) if( m_canvas->IsMouseCaptured() )
DrawPanel->m_mouseCaptureCallback( DrawPanel, DC, wxDefaultPosition, false ); m_canvas->m_mouseCaptureCallback( m_canvas, DC, wxDefaultPosition, false );
PasteListOfItems( DC ); PasteListOfItems( DC );
block->ClearItemsList(); block->ClearItemsList();
@ -182,7 +182,7 @@ void SCH_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
GetScreen()->ClearDrawingState(); GetScreen()->ClearDrawingState();
GetScreen()->ClearBlockCommand(); GetScreen()->ClearBlockCommand();
GetScreen()->SetCurItem( NULL ); GetScreen()->SetCurItem( NULL );
GetScreen()->TestDanglingEnds( DrawPanel, DC ); GetScreen()->TestDanglingEnds( m_canvas, DC );
if( block->GetCount() ) if( block->GetCount() )
{ {
@ -190,8 +190,8 @@ void SCH_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
block->ClearItemsList(); block->ClearItemsList();
} }
DrawPanel->EndMouseCapture( GetToolId(), DrawPanel->GetCurrentCursor(), wxEmptyString, false ); m_canvas->EndMouseCapture( GetToolId(), m_canvas->GetCurrentCursor(), wxEmptyString, false );
DrawPanel->Refresh(); m_canvas->Refresh();
} }
@ -206,19 +206,19 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* DC )
BlockState state = block->m_State; BlockState state = block->m_State;
CmdBlockType command = block->m_Command; CmdBlockType command = block->m_Command;
if( DrawPanel->m_endMouseCaptureCallback ) if( m_canvas->m_endMouseCaptureCallback )
DrawPanel->m_endMouseCaptureCallback( DrawPanel, DC ); m_canvas->m_endMouseCaptureCallback( m_canvas, DC );
block->m_State = state; block->m_State = state;
block->m_Command = command; block->m_Command = command;
DrawPanel->SetMouseCapture( DrawAndSizingBlockOutlines, AbortBlockCurrentCommand ); m_canvas->SetMouseCapture( DrawAndSizingBlockOutlines, AbortBlockCurrentCommand );
GetScreen()->SetCrossHairPosition( block->GetEnd() ); GetScreen()->SetCrossHairPosition( block->GetEnd() );
if( block->m_Command != BLOCK_ABORT ) if( block->m_Command != BLOCK_ABORT )
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
} }
if( DrawPanel->IsMouseCaptured() ) if( m_canvas->IsMouseCaptured() )
{ {
switch( block->m_Command ) switch( block->m_Command )
{ {
@ -243,36 +243,36 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* DC )
{ {
nextcmd = true; nextcmd = true;
GetScreen()->SelectBlockItems(); GetScreen()->SelectBlockItems();
DrawPanel->m_mouseCaptureCallback( DrawPanel, DC, wxDefaultPosition, false ); m_canvas->m_mouseCaptureCallback( m_canvas, DC, wxDefaultPosition, false );
DrawPanel->m_mouseCaptureCallback = DrawMovingBlockOutlines; m_canvas->m_mouseCaptureCallback = DrawMovingBlockOutlines;
DrawPanel->m_mouseCaptureCallback( DrawPanel, DC, wxDefaultPosition, false ); m_canvas->m_mouseCaptureCallback( m_canvas, DC, wxDefaultPosition, false );
block->m_State = STATE_BLOCK_MOVE; block->m_State = STATE_BLOCK_MOVE;
} }
else else
{ {
DrawPanel->m_mouseCaptureCallback( DrawPanel, DC, wxDefaultPosition, false ); m_canvas->m_mouseCaptureCallback( m_canvas, DC, wxDefaultPosition, false );
DrawPanel->SetMouseCapture( NULL, NULL ); m_canvas->SetMouseCapture( NULL, NULL );
} }
break; break;
case BLOCK_DELETE: /* Delete */ case BLOCK_DELETE: /* Delete */
GetScreen()->UpdatePickList(); GetScreen()->UpdatePickList();
DrawAndSizingBlockOutlines( DrawPanel, DC, wxDefaultPosition, false ); DrawAndSizingBlockOutlines( m_canvas, DC, wxDefaultPosition, false );
if( block->GetCount() ) if( block->GetCount() )
{ {
DeleteItemsInList( DrawPanel, block->m_ItemsSelection ); DeleteItemsInList( m_canvas, block->m_ItemsSelection );
OnModify(); OnModify();
} }
block->ClearItemsList(); block->ClearItemsList();
GetScreen()->TestDanglingEnds( DrawPanel, DC ); GetScreen()->TestDanglingEnds( m_canvas, DC );
DrawPanel->Refresh(); m_canvas->Refresh();
break; break;
case BLOCK_SAVE: /* Save */ case BLOCK_SAVE: /* Save */
GetScreen()->UpdatePickList(); GetScreen()->UpdatePickList();
DrawAndSizingBlockOutlines( DrawPanel, DC, wxDefaultPosition, false ); DrawAndSizingBlockOutlines( m_canvas, DC, wxDefaultPosition, false );
if( block->GetCount() ) if( block->GetCount() )
{ {
@ -304,16 +304,16 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* DC )
if( block->m_Command == BLOCK_ABORT ) if( block->m_Command == BLOCK_ABORT )
{ {
GetScreen()->ClearDrawingState(); GetScreen()->ClearDrawingState();
DrawPanel->Refresh(); m_canvas->Refresh();
} }
if( ! nextcmd ) if( ! nextcmd )
{ {
block->m_Flags = 0; block->ClearFlags();
block->m_State = STATE_NO_BLOCK; block->m_State = STATE_NO_BLOCK;
block->m_Command = BLOCK_IDLE; block->m_Command = BLOCK_IDLE;
GetScreen()->SetCurItem( NULL ); GetScreen()->SetCurItem( NULL );
DrawPanel->EndMouseCapture( GetToolId(), DrawPanel->GetCurrentCursor(), wxEmptyString, m_canvas->EndMouseCapture( GetToolId(), m_canvas->GetCurrentCursor(), wxEmptyString,
false ); false );
} }
@ -351,8 +351,8 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC )
break; break;
case BLOCK_DRAG: /* move to Drag */ case BLOCK_DRAG: /* move to Drag */
if( DrawPanel->IsMouseCaptured() ) if( m_canvas->IsMouseCaptured() )
DrawPanel->m_mouseCaptureCallback( DrawPanel, DC, wxDefaultPosition, false ); m_canvas->m_mouseCaptureCallback( m_canvas, DC, wxDefaultPosition, false );
// Clear list of items to move, and rebuild it with items to drag: // Clear list of items to move, and rebuild it with items to drag:
block->ClearItemsList(); block->ClearItemsList();
@ -365,30 +365,30 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC )
blockCmdFinished = false; blockCmdFinished = false;
GetScreen()->SelectBlockItems(); GetScreen()->SelectBlockItems();
if( DrawPanel->IsMouseCaptured() ) if( m_canvas->IsMouseCaptured() )
DrawPanel->m_mouseCaptureCallback( DrawPanel, DC, wxDefaultPosition, false ); m_canvas->m_mouseCaptureCallback( m_canvas, DC, wxDefaultPosition, false );
block->m_State = STATE_BLOCK_MOVE; block->m_State = STATE_BLOCK_MOVE;
} }
break; break;
case BLOCK_DELETE: /* move to Delete */ case BLOCK_DELETE: /* move to Delete */
if( DrawPanel->IsMouseCaptured() ) if( m_canvas->IsMouseCaptured() )
DrawPanel->m_mouseCaptureCallback( DrawPanel, DC, wxDefaultPosition, false ); m_canvas->m_mouseCaptureCallback( m_canvas, DC, wxDefaultPosition, false );
if( block->GetCount() ) if( block->GetCount() )
{ {
DeleteItemsInList( DrawPanel, block->m_ItemsSelection ); DeleteItemsInList( m_canvas, block->m_ItemsSelection );
OnModify(); OnModify();
} }
GetScreen()->TestDanglingEnds( DrawPanel, DC ); GetScreen()->TestDanglingEnds( m_canvas, DC );
DrawPanel->Refresh(); m_canvas->Refresh();
break; break;
case BLOCK_SAVE: /* Save list in paste buffer*/ case BLOCK_SAVE: /* Save list in paste buffer*/
if( DrawPanel->IsMouseCaptured() ) if( m_canvas->IsMouseCaptured() )
DrawPanel->m_mouseCaptureCallback( DrawPanel, DC, wxDefaultPosition, false ); m_canvas->m_mouseCaptureCallback( m_canvas, DC, wxDefaultPosition, false );
if( block->GetCount() ) if( block->GetCount() )
{ {
@ -399,15 +399,15 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC )
break; break;
case BLOCK_ZOOM: /* Window Zoom */ case BLOCK_ZOOM: /* Window Zoom */
DrawPanel->m_endMouseCaptureCallback( DrawPanel, DC ); m_canvas->m_endMouseCaptureCallback( m_canvas, DC );
DrawPanel->SetCursor( DrawPanel->GetDefaultCursor() ); m_canvas->SetCursor( m_canvas->GetDefaultCursor() );
Window_Zoom( GetScreen()->m_BlockLocate ); Window_Zoom( GetScreen()->m_BlockLocate );
break; break;
case BLOCK_ROTATE: case BLOCK_ROTATE:
if( DrawPanel->IsMouseCaptured() ) if( m_canvas->IsMouseCaptured() )
DrawPanel->m_mouseCaptureCallback( DrawPanel, DC, wxDefaultPosition, false ); m_canvas->m_mouseCaptureCallback( m_canvas, DC, wxDefaultPosition, false );
if( block->GetCount() ) if( block->GetCount() )
{ {
@ -420,13 +420,13 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC )
OnModify(); OnModify();
} }
GetScreen()->TestDanglingEnds( DrawPanel, DC ); GetScreen()->TestDanglingEnds( m_canvas, DC );
DrawPanel->Refresh(); m_canvas->Refresh();
break; break;
case BLOCK_MIRROR_X: case BLOCK_MIRROR_X:
if( DrawPanel->IsMouseCaptured() ) if( m_canvas->IsMouseCaptured() )
DrawPanel->m_mouseCaptureCallback( DrawPanel, DC, wxDefaultPosition, false ); m_canvas->m_mouseCaptureCallback( m_canvas, DC, wxDefaultPosition, false );
if( block->GetCount() ) if( block->GetCount() )
{ {
@ -438,13 +438,13 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC )
Mirror_X_ListOfItems( block->m_ItemsSelection, mirrorPoint ); Mirror_X_ListOfItems( block->m_ItemsSelection, mirrorPoint );
OnModify(); OnModify();
} }
GetScreen()->TestDanglingEnds( DrawPanel, DC ); GetScreen()->TestDanglingEnds( m_canvas, DC );
DrawPanel->Refresh(); m_canvas->Refresh();
break; break;
case BLOCK_MIRROR_Y: case BLOCK_MIRROR_Y:
if( DrawPanel->IsMouseCaptured() ) if( m_canvas->IsMouseCaptured() )
DrawPanel->m_mouseCaptureCallback( DrawPanel, DC, wxDefaultPosition, false ); m_canvas->m_mouseCaptureCallback( m_canvas, DC, wxDefaultPosition, false );
if( block->GetCount() ) if( block->GetCount() )
{ {
@ -457,8 +457,8 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC )
OnModify(); OnModify();
} }
GetScreen()->TestDanglingEnds( DrawPanel, DC ); GetScreen()->TestDanglingEnds( m_canvas, DC );
DrawPanel->Refresh(); m_canvas->Refresh();
break; break;
default: default:
@ -469,7 +469,7 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC )
{ {
block->Clear(); block->Clear();
GetScreen()->SetCurItem( NULL ); GetScreen()->SetCurItem( NULL );
DrawPanel->EndMouseCapture( GetToolId(), DrawPanel->GetCurrentCursor(), wxEmptyString, m_canvas->EndMouseCapture( GetToolId(), m_canvas->GetCurrentCursor(), wxEmptyString,
false ); false );
} }
} }
@ -559,7 +559,7 @@ void SCH_EDIT_FRAME::PasteListOfItems( wxDC* DC )
} }
SetSchItemParent( Struct, GetScreen() ); SetSchItemParent( Struct, GetScreen() );
Struct->Draw( DrawPanel, DC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); Struct->Draw( m_canvas, DC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
Struct->SetNext( GetScreen()->GetDrawItems() ); Struct->SetNext( GetScreen()->GetDrawItems() );
GetScreen()->SetDrawItems( Struct ); GetScreen()->SetDrawItems( Struct );
} }

View File

@ -92,13 +92,13 @@ bool LIB_EDIT_FRAME::HandleBlockEnd( wxDC* DC )
{ {
BlockState state = GetScreen()->m_BlockLocate.m_State; BlockState state = GetScreen()->m_BlockLocate.m_State;
CmdBlockType command = GetScreen()->m_BlockLocate.m_Command; CmdBlockType command = GetScreen()->m_BlockLocate.m_Command;
DrawPanel->m_endMouseCaptureCallback( DrawPanel, DC ); m_canvas->m_endMouseCaptureCallback( m_canvas, DC );
GetScreen()->m_BlockLocate.m_State = state; GetScreen()->m_BlockLocate.m_State = state;
GetScreen()->m_BlockLocate.m_Command = command; GetScreen()->m_BlockLocate.m_Command = command;
DrawPanel->SetMouseCapture( DrawAndSizingBlockOutlines, AbortBlockCurrentCommand ); m_canvas->SetMouseCapture( DrawAndSizingBlockOutlines, AbortBlockCurrentCommand );
GetScreen()->SetCrossHairPosition( wxPoint( GetScreen()->m_BlockLocate.GetRight(), GetScreen()->SetCrossHairPosition( wxPoint( GetScreen()->m_BlockLocate.GetRight(),
GetScreen()->m_BlockLocate.GetBottom() ) ); GetScreen()->m_BlockLocate.GetBottom() ) );
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
} }
switch( GetScreen()->m_BlockLocate.m_Command ) switch( GetScreen()->m_BlockLocate.m_Command )
@ -118,21 +118,21 @@ bool LIB_EDIT_FRAME::HandleBlockEnd( wxDC* DC )
{ {
nextCmd = true; nextCmd = true;
if( DrawPanel->IsMouseCaptured() ) if( m_canvas->IsMouseCaptured() )
{ {
DrawPanel->m_mouseCaptureCallback( DrawPanel, DC, wxDefaultPosition, false ); m_canvas->m_mouseCaptureCallback( m_canvas, DC, wxDefaultPosition, false );
DrawPanel->m_mouseCaptureCallback = DrawMovingBlockOutlines; m_canvas->m_mouseCaptureCallback = DrawMovingBlockOutlines;
DrawPanel->m_mouseCaptureCallback( DrawPanel, DC, wxDefaultPosition, false ); m_canvas->m_mouseCaptureCallback( m_canvas, DC, wxDefaultPosition, false );
} }
GetScreen()->m_BlockLocate.m_State = STATE_BLOCK_MOVE; GetScreen()->m_BlockLocate.m_State = STATE_BLOCK_MOVE;
DrawPanel->Refresh( true ); m_canvas->Refresh( true );
} }
break; break;
case BLOCK_PRESELECT_MOVE: /* Move with preselection list*/ case BLOCK_PRESELECT_MOVE: /* Move with preselection list*/
nextCmd = true; nextCmd = true;
DrawPanel->m_mouseCaptureCallback = DrawMovingBlockOutlines; m_canvas->m_mouseCaptureCallback = DrawMovingBlockOutlines;
GetScreen()->m_BlockLocate.m_State = STATE_BLOCK_MOVE; GetScreen()->m_BlockLocate.m_State = STATE_BLOCK_MOVE;
break; break;
@ -201,13 +201,13 @@ bool LIB_EDIT_FRAME::HandleBlockEnd( wxDC* DC )
if( GetScreen()->m_BlockLocate.m_Command != BLOCK_SELECT_ITEMS_ONLY && m_component ) if( GetScreen()->m_BlockLocate.m_Command != BLOCK_SELECT_ITEMS_ONLY && m_component )
m_component->ClearSelectedItems(); m_component->ClearSelectedItems();
GetScreen()->m_BlockLocate.m_Flags = 0; GetScreen()->m_BlockLocate.ClearFlags();
GetScreen()->m_BlockLocate.m_State = STATE_NO_BLOCK; GetScreen()->m_BlockLocate.m_State = STATE_NO_BLOCK;
GetScreen()->m_BlockLocate.m_Command = BLOCK_IDLE; GetScreen()->m_BlockLocate.m_Command = BLOCK_IDLE;
GetScreen()->SetCurItem( NULL ); GetScreen()->SetCurItem( NULL );
DrawPanel->EndMouseCapture( GetToolId(), DrawPanel->GetCurrentCursor(), wxEmptyString, m_canvas->EndMouseCapture( GetToolId(), m_canvas->GetCurrentCursor(), wxEmptyString,
false ); false );
DrawPanel->Refresh( true ); m_canvas->Refresh( true );
} }
return nextCmd; return nextCmd;
@ -218,7 +218,7 @@ void LIB_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
{ {
wxPoint pt; wxPoint pt;
if( !DrawPanel->IsMouseCaptured() ) if( !m_canvas->IsMouseCaptured() )
{ {
DisplayError( this, wxT( "HandleBlockPLace : m_mouseCaptureCallback = NULL" ) ); DisplayError( this, wxT( "HandleBlockPLace : m_mouseCaptureCallback = NULL" ) );
} }
@ -244,7 +244,7 @@ void LIB_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
if ( m_component ) if ( m_component )
m_component->MoveSelectedItems( pt ); m_component->MoveSelectedItems( pt );
DrawPanel->Refresh( true ); m_canvas->Refresh( true );
break; break;
case BLOCK_COPY: /* Copy */ case BLOCK_COPY: /* Copy */
@ -298,12 +298,12 @@ void LIB_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
OnModify(); OnModify();
GetScreen()->m_BlockLocate.m_Flags = 0; GetScreen()->m_BlockLocate.ClearFlags();
GetScreen()->m_BlockLocate.m_State = STATE_NO_BLOCK; GetScreen()->m_BlockLocate.m_State = STATE_NO_BLOCK;
GetScreen()->m_BlockLocate.m_Command = BLOCK_IDLE; GetScreen()->m_BlockLocate.m_Command = BLOCK_IDLE;
GetScreen()->SetCurItem( NULL ); GetScreen()->SetCurItem( NULL );
DrawPanel->EndMouseCapture( GetToolId(), DrawPanel->GetCurrentCursor(), wxEmptyString, false ); m_canvas->EndMouseCapture( GetToolId(), m_canvas->GetCurrentCursor(), wxEmptyString, false );
DrawPanel->Refresh( true ); m_canvas->Refresh( true );
} }

View File

@ -129,7 +129,7 @@ void SCH_EDIT_FRAME::BeginSegment( wxDC* DC, int type )
{ {
s_ConnexionStartPoint = cursorpos; s_ConnexionStartPoint = cursorpos;
s_OldWiresList = GetScreen()->ExtractWires( true ); s_OldWiresList = GetScreen()->ExtractWires( true );
GetScreen()->SchematicCleanUp( DrawPanel ); GetScreen()->SchematicCleanUp( m_canvas );
switch( type ) switch( type )
{ {
@ -160,7 +160,7 @@ void SCH_EDIT_FRAME::BeginSegment( wxDC* DC, int type )
} }
GetScreen()->SetCurItem( newsegment ); GetScreen()->SetCurItem( newsegment );
DrawPanel->SetMouseCapture( DrawSegment, AbortCreateNewLine ); m_canvas->SetMouseCapture( DrawSegment, AbortCreateNewLine );
m_itemToRepeat = NULL; m_itemToRepeat = NULL;
} }
else // A segment is in progress: terminates the current segment and add a new segment. else // A segment is in progress: terminates the current segment and add a new segment.
@ -181,7 +181,7 @@ void SCH_EDIT_FRAME::BeginSegment( wxDC* DC, int type )
return; return;
} }
DrawPanel->m_mouseCaptureCallback( DrawPanel, DC, wxDefaultPosition, false ); m_canvas->m_mouseCaptureCallback( m_canvas, DC, wxDefaultPosition, false );
/* Creates the new segment, or terminates the command /* Creates the new segment, or terminates the command
* if the end point is on a pin, junction or an other wire or bus */ * if the end point is on a pin, junction or an other wire or bus */
@ -193,9 +193,9 @@ void SCH_EDIT_FRAME::BeginSegment( wxDC* DC, int type )
oldsegment->SetNext( GetScreen()->GetDrawItems() ); oldsegment->SetNext( GetScreen()->GetDrawItems() );
GetScreen()->SetDrawItems( oldsegment ); GetScreen()->SetDrawItems( oldsegment );
DrawPanel->CrossHairOff( DC ); // Erase schematic cursor m_canvas->CrossHairOff( DC ); // Erase schematic cursor
oldsegment->Draw( DrawPanel, DC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); oldsegment->Draw( m_canvas, DC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
DrawPanel->CrossHairOn( DC ); // Display schematic cursor m_canvas->CrossHairOn( DC ); // Display schematic cursor
/* Create a new segment, and chain it after the current new segment */ /* Create a new segment, and chain it after the current new segment */
if( nextsegment ) if( nextsegment )
@ -218,7 +218,7 @@ void SCH_EDIT_FRAME::BeginSegment( wxDC* DC, int type )
oldsegment->SetFlags( SELECTED ); oldsegment->SetFlags( SELECTED );
newsegment->SetFlags( IS_NEW ); newsegment->SetFlags( IS_NEW );
GetScreen()->SetCurItem( newsegment ); GetScreen()->SetCurItem( newsegment );
DrawPanel->m_mouseCaptureCallback( DrawPanel, DC, wxDefaultPosition, false ); m_canvas->m_mouseCaptureCallback( m_canvas, DC, wxDefaultPosition, false );
/* This is the first segment: Now we know the start segment position. /* This is the first segment: Now we know the start segment position.
* Create a junction if needed. Note: a junction can be needed later, * Create a junction if needed. Note: a junction can be needed later,
@ -282,7 +282,7 @@ void SCH_EDIT_FRAME::EndSegment( wxDC* DC )
GetScreen()->SetDrawItems( lastsegment ); GetScreen()->SetDrawItems( lastsegment );
} }
DrawPanel->EndMouseCapture( -1, -1, wxEmptyString, false ); m_canvas->EndMouseCapture( -1, -1, wxEmptyString, false );
GetScreen()->SetCurItem( NULL ); GetScreen()->SetCurItem( NULL );
wxPoint end_point, alt_end_point; wxPoint end_point, alt_end_point;
@ -298,7 +298,7 @@ void SCH_EDIT_FRAME::EndSegment( wxDC* DC )
alt_end_point = lastsegment->GetStartPoint(); alt_end_point = lastsegment->GetStartPoint();
} }
GetScreen()->SchematicCleanUp( DrawPanel ); GetScreen()->SchematicCleanUp( m_canvas );
/* clear flags and find last segment entered, for repeat function */ /* clear flags and find last segment entered, for repeat function */
segment = (SCH_LINE*) GetScreen()->GetDrawItems(); segment = (SCH_LINE*) GetScreen()->GetDrawItems();
@ -329,10 +329,10 @@ void SCH_EDIT_FRAME::EndSegment( wxDC* DC )
if( GetScreen()->IsJunctionNeeded( s_ConnexionStartPoint ) ) if( GetScreen()->IsJunctionNeeded( s_ConnexionStartPoint ) )
AddJunction( DC, s_ConnexionStartPoint ); AddJunction( DC, s_ConnexionStartPoint );
GetScreen()->TestDanglingEnds( DrawPanel, DC ); GetScreen()->TestDanglingEnds( m_canvas, DC );
/* Redraw wires and junctions which can be changed by TestDanglingEnds() */ /* Redraw wires and junctions which can be changed by TestDanglingEnds() */
DrawPanel->CrossHairOff( DC ); // Erase schematic cursor m_canvas->CrossHairOff( DC ); // Erase schematic cursor
EDA_ITEM* item = GetScreen()->GetDrawItems(); EDA_ITEM* item = GetScreen()->GetDrawItems();
while( item ) while( item )
@ -341,7 +341,7 @@ void SCH_EDIT_FRAME::EndSegment( wxDC* DC )
{ {
case SCH_JUNCTION_T: case SCH_JUNCTION_T:
case SCH_LINE_T: case SCH_LINE_T:
DrawPanel->RefreshDrawingRect( item->GetBoundingBox() ); m_canvas->RefreshDrawingRect( item->GetBoundingBox() );
break; break;
default: default:
@ -351,7 +351,7 @@ void SCH_EDIT_FRAME::EndSegment( wxDC* DC )
item = item->Next(); item = item->Next();
} }
DrawPanel->CrossHairOn( DC ); // Display schematic cursor m_canvas->CrossHairOn( DC ); // Display schematic cursor
SaveCopyInUndoList( s_OldWiresList, UR_WIRE_IMAGE ); SaveCopyInUndoList( s_OldWiresList, UR_WIRE_IMAGE );
s_OldWiresList = NULL; s_OldWiresList = NULL;
@ -436,15 +436,15 @@ void SCH_EDIT_FRAME::DeleteCurrentSegment( wxDC* DC )
} }
polyLine->SetPoint( idx, endpos ); polyLine->SetPoint( idx, endpos );
polyLine->Draw( DrawPanel, DC, wxPoint( 0, 0 ), g_XorMode ); polyLine->Draw( m_canvas, DC, wxPoint( 0, 0 ), g_XorMode );
} }
else else
{ {
DrawSegment( DrawPanel, DC, wxDefaultPosition, false ); DrawSegment( m_canvas, DC, wxDefaultPosition, false );
} }
screen->RemoveFromDrawList( screen->GetCurItem() ); screen->RemoveFromDrawList( screen->GetCurItem() );
DrawPanel->m_mouseCaptureCallback = NULL; m_canvas->m_mouseCaptureCallback = NULL;
screen->SetCurItem( NULL ); screen->SetCurItem( NULL );
} }
@ -456,9 +456,9 @@ SCH_JUNCTION* SCH_EDIT_FRAME::AddJunction( wxDC* aDC, const wxPoint& aPosition,
m_itemToRepeat = junction; m_itemToRepeat = junction;
DrawPanel->CrossHairOff( aDC ); // Erase schematic cursor m_canvas->CrossHairOff( aDC ); // Erase schematic cursor
junction->Draw( DrawPanel, aDC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); junction->Draw( m_canvas, aDC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
DrawPanel->CrossHairOn( aDC ); // Display schematic cursor m_canvas->CrossHairOn( aDC ); // Display schematic cursor
junction->SetNext( GetScreen()->GetDrawItems() ); junction->SetNext( GetScreen()->GetDrawItems() );
GetScreen()->SetDrawItems( junction ); GetScreen()->SetDrawItems( junction );
@ -478,9 +478,9 @@ SCH_NO_CONNECT* SCH_EDIT_FRAME::AddNoConnect( wxDC* aDC, const wxPoint& aPositio
NewNoConnect = new SCH_NO_CONNECT( aPosition ); NewNoConnect = new SCH_NO_CONNECT( aPosition );
m_itemToRepeat = NewNoConnect; m_itemToRepeat = NewNoConnect;
DrawPanel->CrossHairOff( aDC ); // Erase schematic cursor m_canvas->CrossHairOff( aDC ); // Erase schematic cursor
NewNoConnect->Draw( DrawPanel, aDC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); NewNoConnect->Draw( m_canvas, aDC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
DrawPanel->CrossHairOn( aDC ); // Display schematic cursor m_canvas->CrossHairOn( aDC ); // Display schematic cursor
NewNoConnect->SetNext( GetScreen()->GetDrawItems() ); NewNoConnect->SetNext( GetScreen()->GetDrawItems() );
GetScreen()->SetDrawItems( NewNoConnect ); GetScreen()->SetDrawItems( NewNoConnect );
@ -528,7 +528,7 @@ void SCH_EDIT_FRAME::RepeatDrawItem( wxDC* DC )
m_itemToRepeat->SetFlags( IS_NEW ); m_itemToRepeat->SetFlags( IS_NEW );
( (SCH_COMPONENT*) m_itemToRepeat )->SetTimeStamp( 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( m_canvas, DC, wxPoint( 0, 0 ), g_XorMode );
MoveItem( m_itemToRepeat, DC ); MoveItem( m_itemToRepeat, DC );
return; return;
} }
@ -543,7 +543,7 @@ void SCH_EDIT_FRAME::RepeatDrawItem( wxDC* DC )
m_itemToRepeat->SetNext( GetScreen()->GetDrawItems() ); m_itemToRepeat->SetNext( GetScreen()->GetDrawItems() );
GetScreen()->SetDrawItems( m_itemToRepeat ); GetScreen()->SetDrawItems( m_itemToRepeat );
GetScreen()->TestDanglingEnds(); GetScreen()->TestDanglingEnds();
m_itemToRepeat->Draw( DrawPanel, DC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); m_itemToRepeat->Draw( m_canvas, DC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
SaveCopyInUndoList( m_itemToRepeat, UR_NEW ); SaveCopyInUndoList( m_itemToRepeat, UR_NEW );
m_itemToRepeat->ClearFlags(); m_itemToRepeat->ClearFlags();
} }

View File

@ -48,7 +48,7 @@ SCH_BUS_ENTRY* SCH_EDIT_FRAME::CreateBusEntry( wxDC* DC, int entry_type )
// Create and place a new bus entry at cursor position // Create and place a new bus entry at cursor position
SCH_BUS_ENTRY* BusEntry = new SCH_BUS_ENTRY( GetScreen()->GetCrossHairPosition(), s_LastShape, SCH_BUS_ENTRY* BusEntry = new SCH_BUS_ENTRY( GetScreen()->GetCrossHairPosition(), s_LastShape,
entry_type ); entry_type );
BusEntry->m_Flags = IS_NEW; BusEntry->SetFlags( IS_NEW );
BusEntry->Place( this, DC ); BusEntry->Place( this, DC );
OnModify(); OnModify();
return BusEntry; return BusEntry;
@ -69,40 +69,15 @@ void SCH_EDIT_FRAME::SetBusEntryShape( wxDC* DC, SCH_BUS_ENTRY* BusEntry, int en
} }
/* Put old item in undo list if it is not currently in edit */ /* Put old item in undo list if it is not currently in edit */
if( BusEntry->m_Flags == 0 ) if( BusEntry->GetFlags() == 0 )
SaveCopyInUndoList( BusEntry, UR_CHANGED ); SaveCopyInUndoList( BusEntry, UR_CHANGED );
BusEntry->Draw( DrawPanel, DC, wxPoint( 0, 0 ), g_XorMode ); s_LastShape = entry_shape == '/' ? '/' : '\\';
wxSize size = BusEntry->GetSize();
switch( entry_shape )
{
case '\\':
s_LastShape = '\\';
size.y = 100;
BusEntry->SetSize( size );
break;
case '/':
s_LastShape = '/';
size.y = -100;
BusEntry->SetSize( size );
break;
}
BusEntry->Draw( m_canvas, DC, wxPoint( 0, 0 ), g_XorMode );
BusEntry->SetBusEntryShape( s_LastShape );
GetScreen()->TestDanglingEnds(); GetScreen()->TestDanglingEnds();
BusEntry->Draw( DrawPanel, DC, wxPoint( 0, 0 ), g_XorMode ); BusEntry->Draw( m_canvas, DC, wxPoint( 0, 0 ), g_XorMode );
OnModify( ); OnModify( );
} }
int SCH_EDIT_FRAME::GetBusEntryShape( SCH_BUS_ENTRY* BusEntry )
{
int entry_shape = '\\';
if( BusEntry->GetSize().y < 0 )
entry_shape = '/';
return entry_shape;
}

View File

@ -293,7 +293,7 @@ void LIB_COMPONENT::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDc, const wxPoint& aOff
if( drawItem.m_Fill != FILLED_WITH_BG_BODYCOLOR ) if( drawItem.m_Fill != FILLED_WITH_BG_BODYCOLOR )
continue; continue;
if( aOnlySelected && drawItem.m_Selected == 0 ) if( aOnlySelected && !drawItem.IsSelected() )
continue; continue;
// Do not draw an item while moving (the cursor handler does that) // Do not draw an item while moving (the cursor handler does that)
@ -323,7 +323,7 @@ void LIB_COMPONENT::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDc, const wxPoint& aOff
BOOST_FOREACH( LIB_ITEM& drawItem, drawings ) BOOST_FOREACH( LIB_ITEM& drawItem, drawings )
{ {
if( aOnlySelected && drawItem.m_Selected == 0 ) if( aOnlySelected && !drawItem.IsSelected() )
continue; continue;
// Do not draw an item while moving (the cursor handler does that) // Do not draw an item while moving (the cursor handler does that)
@ -1199,7 +1199,6 @@ void LIB_COMPONENT::ClearStatus()
BOOST_FOREACH( LIB_ITEM& item, drawings ) BOOST_FOREACH( LIB_ITEM& item, drawings )
{ {
item.m_Flags = 0; item.m_Flags = 0;
item.m_Selected = 0;
} }
} }
@ -1210,7 +1209,7 @@ int LIB_COMPONENT::SelectItems( EDA_RECT& aRect, int aUnit, int aConvert, bool a
BOOST_FOREACH( LIB_ITEM& item, drawings ) BOOST_FOREACH( LIB_ITEM& item, drawings )
{ {
item.m_Selected = 0; item.ClearFlags( SELECTED );
if( ( item.m_Unit && item.m_Unit != aUnit ) if( ( item.m_Unit && item.m_Unit != aUnit )
|| ( item.m_Convert && item.m_Convert != aConvert ) ) || ( item.m_Convert && item.m_Convert != aConvert ) )
@ -1226,7 +1225,7 @@ int LIB_COMPONENT::SelectItems( EDA_RECT& aRect, int aUnit, int aConvert, bool a
if( item.Inside( aRect ) ) if( item.Inside( aRect ) )
{ {
item.m_Selected = IS_SELECTED; item.SetFlags( SELECTED );
itemCount++; itemCount++;
} }
} }
@ -1239,11 +1238,11 @@ void LIB_COMPONENT::MoveSelectedItems( const wxPoint& aOffset )
{ {
BOOST_FOREACH( LIB_ITEM& item, drawings ) BOOST_FOREACH( LIB_ITEM& item, drawings )
{ {
if( item.m_Selected == 0 ) if( !item.IsSelected() )
continue; continue;
item.SetOffset( aOffset ); item.SetOffset( aOffset );
item.m_Flags = item.m_Selected = 0; item.m_Flags = 0;
} }
drawings.sort(); drawings.sort();
@ -1253,7 +1252,9 @@ void LIB_COMPONENT::MoveSelectedItems( const wxPoint& aOffset )
void LIB_COMPONENT::ClearSelectedItems() void LIB_COMPONENT::ClearSelectedItems()
{ {
BOOST_FOREACH( LIB_ITEM& item, drawings ) BOOST_FOREACH( LIB_ITEM& item, drawings )
item.m_Flags = item.m_Selected = 0; {
item.m_Flags = 0;
}
} }
@ -1272,13 +1273,14 @@ void LIB_COMPONENT::DeleteSelectedItems()
{ {
#if 0 // Set to 1 to allows fields deletion on block delete or other global command #if 0 // Set to 1 to allows fields deletion on block delete or other global command
LIB_FIELD& field = ( LIB_FIELD& ) *item; LIB_FIELD& field = ( LIB_FIELD& ) *item;
if( (field.GetId() == REFERENCE) || (field.m_FieldId == VALUE) || if( (field.GetId() == REFERENCE) || (field.m_FieldId == VALUE) ||
(field.m_Attributs & TEXT_NO_VISIBLE) ) (field.m_Attributs & TEXT_NO_VISIBLE) )
#endif #endif
item->m_Selected = 0; item->ClearFlags( SELECTED );
} }
if( item->m_Selected == 0 ) if( !item->IsSelected() )
item++; item++;
else else
item = drawings.erase( item ); item = drawings.erase( item );
@ -1298,17 +1300,18 @@ void LIB_COMPONENT::CopySelectedItems( const wxPoint& aOffset )
for( unsigned ii = 0; ii < icnt; ii++ ) for( unsigned ii = 0; ii < icnt; ii++ )
{ {
LIB_ITEM& item = drawings[ii]; LIB_ITEM& item = drawings[ii];
// We *do not* copy fields because they are unique for the whole component // We *do not* copy fields because they are unique for the whole component
// so skip them (do not duplicate) if they are flagged selected. // so skip them (do not duplicate) if they are flagged selected.
if( item.Type() == LIB_FIELD_T ) if( item.Type() == LIB_FIELD_T )
item.m_Selected = 0; item.ClearFlags( SELECTED );
if( item.m_Selected == 0 ) if( !item.IsSelected() )
continue; continue;
item.m_Selected = 0; item.ClearFlags( SELECTED );
LIB_ITEM* newItem = (LIB_ITEM*) item.Clone(); LIB_ITEM* newItem = (LIB_ITEM*) item.Clone();
newItem->m_Selected = IS_SELECTED; newItem->SetFlags( SELECTED );
drawings.push_back( newItem ); drawings.push_back( newItem );
} }
@ -1322,11 +1325,11 @@ void LIB_COMPONENT::MirrorSelectedItemsH( const wxPoint& aCenter )
{ {
BOOST_FOREACH( LIB_ITEM& item, drawings ) BOOST_FOREACH( LIB_ITEM& item, drawings )
{ {
if( item.m_Selected == 0 ) if( !item.IsSelected() )
continue; continue;
item.MirrorHorizontal( aCenter ); item.MirrorHorizontal( aCenter );
item.m_Flags = item.m_Selected = 0; item.m_Flags = 0;
} }
drawings.sort(); drawings.sort();
@ -1336,11 +1339,11 @@ void LIB_COMPONENT::MirrorSelectedItemsV( const wxPoint& aCenter )
{ {
BOOST_FOREACH( LIB_ITEM& item, drawings ) BOOST_FOREACH( LIB_ITEM& item, drawings )
{ {
if( item.m_Selected == 0 ) if( !item.IsSelected() )
continue; continue;
item.MirrorVertical( aCenter ); item.MirrorVertical( aCenter );
item.m_Flags = item.m_Selected = 0; item.m_Flags = 0;
} }
drawings.sort(); drawings.sort();
@ -1350,11 +1353,11 @@ void LIB_COMPONENT::RotateSelectedItems( const wxPoint& aCenter )
{ {
BOOST_FOREACH( LIB_ITEM& item, drawings ) BOOST_FOREACH( LIB_ITEM& item, drawings )
{ {
if( item.m_Selected == 0 ) if( !item.IsSelected() )
continue; continue;
item.Rotate( aCenter ); item.Rotate( aCenter );
item.m_Flags = item.m_Selected = 0; item.m_Flags = 0;
} }
drawings.sort(); drawings.sort();

View File

@ -62,9 +62,9 @@ SCH_ITEM* SCH_EDIT_FRAME::LocateAndShowItem( const wxPoint& aPosition, const KIC
// If the user aborted the clarification context menu, don't show it again at the // If the user aborted the clarification context menu, don't show it again at the
// off grid position. // off grid position.
if( !item && DrawPanel->m_AbortRequest ) if( !item && m_canvas->m_AbortRequest )
{ {
DrawPanel->m_AbortRequest = false; m_canvas->m_AbortRequest = false;
return NULL; return NULL;
} }
@ -73,7 +73,7 @@ SCH_ITEM* SCH_EDIT_FRAME::LocateAndShowItem( const wxPoint& aPosition, const KIC
if( !item ) if( !item )
{ {
DrawPanel->m_AbortRequest = false; // Just in case the user aborted the context menu. m_canvas->m_AbortRequest = false; // Just in case the user aborted the context menu.
return NULL; return NULL;
} }
@ -171,9 +171,9 @@ SCH_ITEM* SCH_EDIT_FRAME::LocateItem( const wxPoint& aPosition, const KICAD_T aF
// Set to NULL in case user aborts the clarification context menu. // Set to NULL in case user aborts the clarification context menu.
GetScreen()->SetCurItem( NULL ); GetScreen()->SetCurItem( NULL );
DrawPanel->m_AbortRequest = true; // Changed to false if an item is selected m_canvas->m_AbortRequest = true; // Changed to false if an item is selected
PopupMenu( &selectMenu ); PopupMenu( &selectMenu );
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
item = GetScreen()->GetCurItem(); item = GetScreen()->GetCurItem();
} }
} }
@ -208,25 +208,25 @@ void SCH_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH
case WXK_NUMPAD8: case WXK_NUMPAD8:
case WXK_UP: case WXK_UP:
pos.y -= wxRound( gridSize.y ); pos.y -= wxRound( gridSize.y );
DrawPanel->MoveCursor( pos ); m_canvas->MoveCursor( pos );
break; break;
case WXK_NUMPAD2: case WXK_NUMPAD2:
case WXK_DOWN: case WXK_DOWN:
pos.y += wxRound( gridSize.y ); pos.y += wxRound( gridSize.y );
DrawPanel->MoveCursor( pos ); m_canvas->MoveCursor( pos );
break; break;
case WXK_NUMPAD4: case WXK_NUMPAD4:
case WXK_LEFT: case WXK_LEFT:
pos.x -= wxRound( gridSize.x ); pos.x -= wxRound( gridSize.x );
DrawPanel->MoveCursor( pos ); m_canvas->MoveCursor( pos );
break; break;
case WXK_NUMPAD6: case WXK_NUMPAD6:
case WXK_RIGHT: case WXK_RIGHT:
pos.x += wxRound( gridSize.x ); pos.x += wxRound( gridSize.x );
DrawPanel->MoveCursor( pos ); m_canvas->MoveCursor( pos );
break; break;
default: default:
@ -240,23 +240,23 @@ void SCH_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH
{ {
pos = screen->GetCrossHairPosition(); pos = screen->GetCrossHairPosition();
screen->SetCrossHairPosition( oldpos ); screen->SetCrossHairPosition( oldpos );
DrawPanel->CrossHairOff( aDC ); m_canvas->CrossHairOff( aDC );
screen->SetCrossHairPosition( pos ); screen->SetCrossHairPosition( pos );
DrawPanel->CrossHairOn( aDC ); m_canvas->CrossHairOn( aDC );
if( DrawPanel->IsMouseCaptured() ) if( m_canvas->IsMouseCaptured() )
{ {
#ifdef USE_WX_OVERLAY #ifdef USE_WX_OVERLAY
wxDCOverlay oDC( DrawPanel->m_overlay, (wxWindowDC*)aDC ); wxDCOverlay oDC( m_canvas->m_overlay, (wxWindowDC*)aDC );
oDC.Clear(); oDC.Clear();
DrawPanel->m_mouseCaptureCallback( DrawPanel, aDC, aPosition, false ); m_canvas->m_mouseCaptureCallback( m_canvas, aDC, aPosition, false );
#else #else
DrawPanel->m_mouseCaptureCallback( DrawPanel, aDC, aPosition, true ); m_canvas->m_mouseCaptureCallback( m_canvas, aDC, aPosition, true );
#endif #endif
} }
#ifdef USE_WX_OVERLAY #ifdef USE_WX_OVERLAY
else else
DrawPanel->m_overlay.Reset(); m_canvas->m_overlay.Reset();
#endif #endif
} }
@ -291,25 +291,25 @@ void LIB_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH
case WXK_NUMPAD8: case WXK_NUMPAD8:
case WXK_UP: case WXK_UP:
pos.y -= wxRound( gridSize.y ); pos.y -= wxRound( gridSize.y );
DrawPanel->MoveCursor( pos ); m_canvas->MoveCursor( pos );
break; break;
case WXK_NUMPAD2: case WXK_NUMPAD2:
case WXK_DOWN: case WXK_DOWN:
pos.y += wxRound( gridSize.y ); pos.y += wxRound( gridSize.y );
DrawPanel->MoveCursor( pos ); m_canvas->MoveCursor( pos );
break; break;
case WXK_NUMPAD4: case WXK_NUMPAD4:
case WXK_LEFT: case WXK_LEFT:
pos.x -= wxRound( gridSize.x ); pos.x -= wxRound( gridSize.x );
DrawPanel->MoveCursor( pos ); m_canvas->MoveCursor( pos );
break; break;
case WXK_NUMPAD6: case WXK_NUMPAD6:
case WXK_RIGHT: case WXK_RIGHT:
pos.x += wxRound( gridSize.x ); pos.x += wxRound( gridSize.x );
DrawPanel->MoveCursor( pos ); m_canvas->MoveCursor( pos );
break; break;
default: default:
@ -323,23 +323,23 @@ void LIB_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH
{ {
pos = screen->GetCrossHairPosition(); pos = screen->GetCrossHairPosition();
screen->SetCrossHairPosition( oldpos ); screen->SetCrossHairPosition( oldpos );
DrawPanel->CrossHairOff( aDC ); m_canvas->CrossHairOff( aDC );
screen->SetCrossHairPosition( pos ); screen->SetCrossHairPosition( pos );
DrawPanel->CrossHairOn( aDC ); m_canvas->CrossHairOn( aDC );
if( DrawPanel->IsMouseCaptured() ) if( m_canvas->IsMouseCaptured() )
{ {
#ifdef USE_WX_OVERLAY #ifdef USE_WX_OVERLAY
wxDCOverlay oDC( DrawPanel->m_overlay, (wxWindowDC*)aDC ); wxDCOverlay oDC( m_canvas->m_overlay, (wxWindowDC*)aDC );
oDC.Clear(); oDC.Clear();
DrawPanel->m_mouseCaptureCallback( DrawPanel, aDC, aPosition, false ); m_canvas->m_mouseCaptureCallback( m_canvas, aDC, aPosition, false );
#else #else
DrawPanel->m_mouseCaptureCallback( DrawPanel, aDC, aPosition, true ); m_canvas->m_mouseCaptureCallback( m_canvas, aDC, aPosition, true );
#endif #endif
} }
#ifdef USE_WX_OVERLAY #ifdef USE_WX_OVERLAY
else else
DrawPanel->m_overlay.Reset(); m_canvas->m_overlay.Reset();
#endif #endif
} }
@ -371,25 +371,25 @@ void LIB_VIEW_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH
case WXK_NUMPAD8: case WXK_NUMPAD8:
case WXK_UP: case WXK_UP:
pos.y -= wxRound( gridSize.y ); pos.y -= wxRound( gridSize.y );
DrawPanel->MoveCursor( pos ); m_canvas->MoveCursor( pos );
break; break;
case WXK_NUMPAD2: case WXK_NUMPAD2:
case WXK_DOWN: case WXK_DOWN:
pos.y += wxRound( gridSize.y ); pos.y += wxRound( gridSize.y );
DrawPanel->MoveCursor( pos ); m_canvas->MoveCursor( pos );
break; break;
case WXK_NUMPAD4: case WXK_NUMPAD4:
case WXK_LEFT: case WXK_LEFT:
pos.x -= wxRound( gridSize.x ); pos.x -= wxRound( gridSize.x );
DrawPanel->MoveCursor( pos ); m_canvas->MoveCursor( pos );
break; break;
case WXK_NUMPAD6: case WXK_NUMPAD6:
case WXK_RIGHT: case WXK_RIGHT:
pos.x += wxRound( gridSize.x ); pos.x += wxRound( gridSize.x );
DrawPanel->MoveCursor( pos ); m_canvas->MoveCursor( pos );
break; break;
default: default:
@ -403,13 +403,13 @@ void LIB_VIEW_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH
{ {
pos = screen->GetCrossHairPosition(); pos = screen->GetCrossHairPosition();
screen->SetCrossHairPosition( oldpos ); screen->SetCrossHairPosition( oldpos );
DrawPanel->CrossHairOff( aDC ); m_canvas->CrossHairOff( aDC );
screen->SetCrossHairPosition( pos ); screen->SetCrossHairPosition( pos );
DrawPanel->CrossHairOn( aDC ); m_canvas->CrossHairOn( aDC );
if( DrawPanel->IsMouseCaptured() ) if( m_canvas->IsMouseCaptured() )
{ {
DrawPanel->m_mouseCaptureCallback( DrawPanel, aDC, aPosition, true ); m_canvas->m_mouseCaptureCallback( m_canvas, aDC, aPosition, true );
} }
} }

View File

@ -118,6 +118,7 @@ void DIALOG_ANNOTATE::OnApplyClick( wxCommandEvent& event )
message = _( "Clear and annotate all of the components " ); message = _( "Clear and annotate all of the components " );
else else
message = _( "Annotate only the unannotated components " ); message = _( "Annotate only the unannotated components " );
if( GetLevel() ) if( GetLevel() )
message += _( "on the entire schematic?" ); message += _( "on the entire schematic?" );
else else
@ -125,13 +126,14 @@ void DIALOG_ANNOTATE::OnApplyClick( wxCommandEvent& event )
message += _( "\n\nThis operation will change the current annotation and cannot be undone." ); message += _( "\n\nThis operation will change the current annotation and cannot be undone." );
response = wxMessageBox( message, wxT( "" ), wxICON_EXCLAMATION | wxOK | wxCANCEL ); response = wxMessageBox( message, wxT( "" ), wxICON_EXCLAMATION | wxOK | wxCANCEL );
if (response == wxCANCEL) if (response == wxCANCEL)
return; return;
m_Parent->AnnotateComponents( GetLevel(), (ANNOTATE_ORDER_T) GetSortOrder(), m_Parent->AnnotateComponents( GetLevel(), (ANNOTATE_ORDER_T) GetSortOrder(),
(ANNOTATE_OPTION_T) GetAnnotateAlgo(), (ANNOTATE_OPTION_T) GetAnnotateAlgo(),
GetResetItems() , true ); GetResetItems() , true );
m_Parent->DrawPanel->Refresh(); m_Parent->GetCanvas()->Refresh();
m_btnClear->Enable(); m_btnClear->Enable();
} }
@ -150,12 +152,13 @@ void DIALOG_ANNOTATE::OnClearAnnotationCmpClick( wxCommandEvent& event )
message += _( "the current sheet?" ); message += _( "the current sheet?" );
message += _( "\n\nThis operation will clear the existing annotation and cannot be undone." ); message += _( "\n\nThis operation will clear the existing annotation and cannot be undone." );
response = wxMessageBox( message, wxT( "" ), response = wxMessageBox( message, wxT( "" ), wxICON_EXCLAMATION | wxOK | wxCANCEL );
wxICON_EXCLAMATION | wxOK | wxCANCEL );
if (response == wxCANCEL) if (response == wxCANCEL)
return; return;
m_Parent->DeleteAnnotation( GetLevel() ? false : true ); m_Parent->DeleteAnnotation( GetLevel() ? false : true );
m_Parent->DrawPanel->Refresh(); m_Parent->GetCanvas()->Refresh();
m_btnClear->Enable(false); m_btnClear->Enable(false);
} }

View File

@ -212,7 +212,7 @@ bool DIALOG_SVG_PRINT::DrawSVGPage( EDA_DRAW_FRAME* frame,
SheetSize = screen->ReturnPageSize(); // page size in 1/1000 inch, ie in internal units SheetSize = screen->ReturnPageSize(); // page size in 1/1000 inch, ie in internal units
screen->SetScalingFactor( 1.0 ); screen->SetScalingFactor( 1.0 );
EDA_DRAW_PANEL* panel = frame->DrawPanel; EDA_DRAW_PANEL* panel = frame->GetCanvas();
SetLocaleTo_C_standard(); // Switch the locale to standard C (needed SetLocaleTo_C_standard(); // Switch the locale to standard C (needed
// to print floating point numbers like 1.3) // to print floating point numbers like 1.3)

View File

@ -289,14 +289,17 @@ bool DIALOG_COLOR_CONFIG::UpdateColorsSettings()
g_DrawBgColor = BLACK; g_DrawBgColor = BLACK;
bool warning = false; bool warning = false;
for( int ii = 0; ii < MAX_LAYERS; ii++ ) for( int ii = 0; ii < MAX_LAYERS; ii++ )
{ {
g_LayerDescr.LayerColor[ ii ] = currentColors[ ii ]; g_LayerDescr.LayerColor[ ii ] = currentColors[ ii ];
if( g_DrawBgColor == g_LayerDescr.LayerColor[ ii ] ) if( g_DrawBgColor == g_LayerDescr.LayerColor[ ii ] )
warning = true; warning = true;
} }
m_Parent->SetGridColor( g_LayerDescr.LayerColor[LAYER_GRID] ); m_Parent->SetGridColor( g_LayerDescr.LayerColor[LAYER_GRID] );
if( g_DrawBgColor == g_LayerDescr.LayerColor[ LAYER_GRID ] ) if( g_DrawBgColor == g_LayerDescr.LayerColor[ LAYER_GRID ] )
warning = true; warning = true;
@ -311,11 +314,9 @@ void DIALOG_COLOR_CONFIG::OnOkClick( wxCommandEvent& event )
// Prompt the user if an item has the same color as the background // Prompt the user if an item has the same color as the background
// because this item cannot be seen: // because this item cannot be seen:
if( warning ) if( warning )
wxMessageBox( wxMessageBox( _("Warning:\nSome items have the same color as the background\nand they will not be seen on screen") );
_("Warning:\nSome items have the same color as the background\nand they will not be seen on screen")
);
m_Parent->DrawPanel->Refresh(); m_Parent->GetCanvas()->Refresh();
EndModal( 1 ); EndModal( 1 );
} }
@ -330,7 +331,7 @@ void DIALOG_COLOR_CONFIG::OnCancelClick( wxCommandEvent& event )
void DIALOG_COLOR_CONFIG::OnApplyClick( wxCommandEvent& event ) void DIALOG_COLOR_CONFIG::OnApplyClick( wxCommandEvent& event )
{ {
UpdateColorsSettings(); UpdateColorsSettings();
m_Parent->DrawPanel->Refresh(); m_Parent->GetCanvas()->Refresh();
} }

View File

@ -29,7 +29,7 @@ void SCH_EDIT_FRAME::EditComponent( SCH_COMPONENT* aComponent )
wxCHECK_RET( aComponent != NULL && aComponent->Type() == SCH_COMPONENT_T, wxCHECK_RET( aComponent != NULL && aComponent->Type() == SCH_COMPONENT_T,
wxT( "Invalid component object pointer. Bad Programmer!" ) ); wxT( "Invalid component object pointer. Bad Programmer!" ) );
DrawPanel->m_IgnoreMouseEvents = true; m_canvas->m_IgnoreMouseEvents = true;
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC* dlg = new DIALOG_EDIT_COMPONENT_IN_SCHEMATIC( this ); DIALOG_EDIT_COMPONENT_IN_SCHEMATIC* dlg = new DIALOG_EDIT_COMPONENT_IN_SCHEMATIC( this );
@ -54,8 +54,8 @@ void SCH_EDIT_FRAME::EditComponent( SCH_COMPONENT* aComponent )
// so it comes up wide enough next time. // so it comes up wide enough next time.
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::s_LastSize = dlg->GetSize(); DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::s_LastSize = dlg->GetSize();
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
DrawPanel->m_IgnoreMouseEvents = false; m_canvas->m_IgnoreMouseEvents = false;
dlg->Destroy(); dlg->Destroy();
} }
@ -283,7 +283,7 @@ Do you wish to remove this and all remaining undefined fields?" ),
m_Parent->OnModify(); m_Parent->OnModify();
m_Parent->GetScreen()->TestDanglingEnds(); m_Parent->GetScreen()->TestDanglingEnds();
m_Parent->DrawPanel->Refresh( true ); m_Parent->GetCanvas()->Refresh( true );
EndModal( 0 ); EndModal( 0 );
} }
@ -834,8 +834,8 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::SetInitCmp( wxCommandEvent& event )
if( m_Cmp->m_Flags == 0 ) if( m_Cmp->m_Flags == 0 )
m_Parent->SaveCopyInUndoList( m_Cmp, UR_CHANGED ); m_Parent->SaveCopyInUndoList( m_Cmp, UR_CHANGED );
INSTALL_UNBUFFERED_DC( dc, m_Parent->DrawPanel ); INSTALL_UNBUFFERED_DC( dc, m_Parent->GetCanvas() );
m_Cmp->Draw( m_Parent->DrawPanel, &dc, wxPoint( 0, 0 ), g_XorMode ); m_Cmp->Draw( m_Parent->GetCanvas(), &dc, wxPoint( 0, 0 ), g_XorMode );
// Initialize field values to default values found in library: // Initialize field values to default values found in library:
LIB_FIELD& refField = entry->GetReferenceField(); LIB_FIELD& refField = entry->GetReferenceField();
@ -850,6 +850,6 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::SetInitCmp( wxCommandEvent& event )
m_Parent->OnModify(); m_Parent->OnModify();
m_Cmp->Draw( m_Parent->DrawPanel, &dc, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); m_Cmp->Draw( m_Parent->GetCanvas(), &dc, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
EndModal( 1 ); EndModal( 1 );
} }

View File

@ -214,7 +214,7 @@ void DialogLabelEditor::OnOkClick( wxCommandEvent& aEvent )
void DialogLabelEditor::OnCancelClick( wxCommandEvent& aEvent ) void DialogLabelEditor::OnCancelClick( wxCommandEvent& aEvent )
{ {
m_Parent->DrawPanel->MoveCursorToCrossHair(); m_Parent->GetCanvas()->MoveCursorToCrossHair();
EndModal( wxID_CANCEL ); EndModal( wxID_CANCEL );
} }
@ -225,16 +225,16 @@ void DialogLabelEditor::TextPropertiesAccept( wxCommandEvent& aEvent )
int value; int value;
/* save old text in undo list if not already in edit */ /* save old text in undo list if not already in edit */
if( m_CurrentText->m_Flags == 0 ) if( m_CurrentText->GetFlags() == 0 )
m_Parent->SaveCopyInUndoList( m_CurrentText, UR_CHANGED ); m_Parent->SaveCopyInUndoList( m_CurrentText, UR_CHANGED );
m_Parent->DrawPanel->RefreshDrawingRect( m_CurrentText->GetBoundingBox() ); m_Parent->GetCanvas()->RefreshDrawingRect( m_CurrentText->GetBoundingBox() );
text = m_textLabel->GetValue(); text = m_textLabel->GetValue();
if( !text.IsEmpty() ) if( !text.IsEmpty() )
m_CurrentText->m_Text = text; m_CurrentText->m_Text = text;
else if( (m_CurrentText->m_Flags & IS_NEW) == 0 ) else if( !m_CurrentText->IsNew() )
DisplayError( this, _( "Empty Text!" ) ); DisplayError( this, _( "Empty Text!" ) );
m_CurrentText->SetOrientation( m_TextOrient->GetSelection() ); m_CurrentText->SetOrientation( m_TextOrient->GetSelection() );
@ -266,10 +266,10 @@ void DialogLabelEditor::TextPropertiesAccept( wxCommandEvent& aEvent )
m_Parent->OnModify(); m_Parent->OnModify();
/* Make the text size as new default size if it is a new text */ /* Make the text size as new default size if it is a new text */
if( (m_CurrentText->m_Flags & IS_NEW) != 0 ) if( m_CurrentText->IsNew() )
g_DefaultTextLabelSize = m_CurrentText->m_Size.x; g_DefaultTextLabelSize = m_CurrentText->m_Size.x;
m_Parent->DrawPanel->RefreshDrawingRect( m_CurrentText->GetBoundingBox() ); m_Parent->GetCanvas()->RefreshDrawingRect( m_CurrentText->GetBoundingBox() );
m_Parent->DrawPanel->MoveCursorToCrossHair(); m_Parent->GetCanvas()->MoveCursorToCrossHair();
EndModal( wxID_OK ); EndModal( wxID_OK );
} }

View File

@ -109,7 +109,7 @@ void LIB_EDIT_FRAME::InstallFieldsEditorDialog( wxCommandEvent& event )
if( m_component == NULL ) if( m_component == NULL )
return; return;
DrawPanel->EndMouseCapture( ID_NO_TOOL_SELECTED, DrawPanel->GetDefaultCursor() ); m_canvas->EndMouseCapture( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor() );
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB dlg( this, m_component ); DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB dlg( this, m_component );

View File

@ -113,7 +113,7 @@ void DIALOG_ERC::OnEraseDrcMarkersClick( wxCommandEvent& event )
ScreenList.DeleteAllMarkers( MARK_ERC ); ScreenList.DeleteAllMarkers( MARK_ERC );
m_MarkersList->ClearList(); m_MarkersList->ClearList();
m_Parent->DrawPanel->Refresh(); m_Parent->GetCanvas()->Refresh();
} }
@ -563,7 +563,7 @@ void DIALOG_ERC::TestErc( wxArrayString* aMessagesList )
DisplayERC_MarkersList(); DisplayERC_MarkersList();
// Display new markers: // Display new markers:
m_Parent->DrawPanel->Refresh(); m_Parent->GetCanvas()->Refresh();
if( m_writeErcFile ) if( m_writeErcFile )
{ {

View File

@ -316,7 +316,7 @@ void SCH_PRINTOUT::DrawPage( SCH_SCREEN* aScreen )
wxRect fitRect; wxRect fitRect;
wxDC* dc = GetDC(); wxDC* dc = GetDC();
SCH_EDIT_FRAME* parent = m_Parent->GetParent(); SCH_EDIT_FRAME* parent = m_Parent->GetParent();
EDA_DRAW_PANEL* panel = parent->DrawPanel; EDA_DRAW_PANEL* panel = parent->GetCanvas();
wxBusyCursor dummy; wxBusyCursor dummy;

View File

@ -528,7 +528,7 @@
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxCheckBox" expanded="0"> <object class="wxCheckBox" expanded="0">
<property name="bg"></property> <property name="bg"></property>
<property name="checked">0</property> <property name="checked">1</property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
<property name="enabled">1</property> <property name="enabled">1</property>
@ -536,7 +536,7 @@
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Match &amp;whole word</property> <property name="label">Match whole wor&amp;d</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_checkWholeWord</property> <property name="name">m_checkWholeWord</property>
@ -764,7 +764,7 @@
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Search all component &amp;fields</property> <property name="label">Search all com&amp;ponent fields</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_checkAllFields</property> <property name="name">m_checkAllFields</property>
@ -821,7 +821,7 @@
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Search all pin names and numbers</property> <property name="label">Search all pin &amp;names and numbers</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_checkAllPins</property> <property name="name">m_checkAllPins</property>
@ -878,7 +878,7 @@
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Search the current sheet on&amp;ly</property> <property name="label">Search the current &amp;sheet onl&amp;y</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_checkCurrentSheetOnly</property> <property name="name">m_checkCurrentSheetOnly</property>
@ -921,6 +921,63 @@
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1">
<property name="border">6</property>
<property name="flag">wxBOTTOM|wxLEFT|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="bg"></property>
<property name="checked">0</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">1</property>
<property name="id">wxID_ANY</property>
<property name="label">Replace componen&amp;t reference designators</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_checkReplaceReferences</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">6</property> <property name="border">6</property>
<property name="flag">wxBOTTOM|wxLEFT|wxRIGHT</property> <property name="flag">wxBOTTOM|wxLEFT|wxRIGHT</property>
@ -935,7 +992,7 @@
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Do not warp cursor to found item</property> <property name="label">D&amp;o not warp cursor to found item</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_checkNoWarpCursor</property> <property name="name">m_checkNoWarpCursor</property>

View File

@ -1,3 +1,32 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2010 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2010-2011 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file dialog_schematic_find.cpp
* @brief Schematic find and replace dialog implementation.
*/
#include "dialog_schematic_find.h" #include "dialog_schematic_find.h"
@ -21,6 +50,7 @@ DIALOG_SCH_FIND::DIALOG_SCH_FIND( wxWindow* aParent, wxFindReplaceData* aData,
m_buttonReplaceAll->Show( true ); m_buttonReplaceAll->Show( true );
m_staticReplace->Show( true ); m_staticReplace->Show( true );
m_comboReplace->Show( true ); m_comboReplace->Show( true );
m_checkReplaceReferences->Show( true );
m_checkWildcardMatch->Show( false ); // Wildcard replace is not implemented. m_checkWildcardMatch->Show( false ); // Wildcard replace is not implemented.
} }
@ -36,6 +66,7 @@ DIALOG_SCH_FIND::DIALOG_SCH_FIND( wxWindow* aParent, wxFindReplaceData* aData,
m_checkWildcardMatch->SetValue( flags & FR_MATCH_WILDCARD ); m_checkWildcardMatch->SetValue( flags & FR_MATCH_WILDCARD );
m_checkAllFields->SetValue( flags & FR_SEARCH_ALL_FIELDS ); m_checkAllFields->SetValue( flags & FR_SEARCH_ALL_FIELDS );
m_checkReplaceReferences->SetValue( flags & FR_REPLACE_REFERENCES );
m_checkAllPins->SetValue( flags & FR_SEARCH_ALL_PINS ); m_checkAllPins->SetValue( flags & FR_SEARCH_ALL_PINS );
m_checkWrap->SetValue( flags & FR_SEARCH_WRAP ); m_checkWrap->SetValue( flags & FR_SEARCH_WRAP );
m_checkCurrentSheetOnly->SetValue( flags & FR_CURRENT_SHEET_ONLY ); m_checkCurrentSheetOnly->SetValue( flags & FR_CURRENT_SHEET_ONLY );
@ -43,7 +74,21 @@ DIALOG_SCH_FIND::DIALOG_SCH_FIND( wxWindow* aParent, wxFindReplaceData* aData,
m_buttonFind->SetDefault(); m_buttonFind->SetDefault();
m_comboFind->SetFocus(); m_comboFind->SetFocus();
SetPosition( aPosition ); SetPosition( aPosition );
SetSize( aSize );
// Adjust the height of the dialog to prevent controls from being hidden when
// switching between the find and find/replace modes of the dialog. This ignores
// the users preferred height if any of the controls would be hidden.
wxSize size = aSize;
if( aSize != wxDefaultSize )
{
wxSize bestSize = GetBestSize();
if( size.GetHeight() != bestSize.GetHeight() )
size.SetHeight( bestSize.GetHeight() );
}
SetSize( size );
} }
@ -142,6 +187,9 @@ void DIALOG_SCH_FIND::SendEvent( const wxEventType& aEventType )
{ {
event.SetReplaceString( m_comboReplace->GetValue() ); event.SetReplaceString( m_comboReplace->GetValue() );
flags |= FR_SEARCH_REPLACE; flags |= FR_SEARCH_REPLACE;
if( m_checkReplaceReferences->GetValue() )
flags |= FR_REPLACE_REFERENCES;
} }
if( m_radioForward->GetValue() ) if( m_radioForward->GetValue() )

View File

@ -1,5 +1,26 @@
#ifndef __dialog_schematic_find__ /*
#define __dialog_schematic_find__ * This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2010 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2010-2011 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/** /**
* @file * @file
@ -12,6 +33,9 @@
* find out how matching is performed against that item. * find out how matching is performed against that item.
*/ */
#ifndef __dialog_schematic_find__
#define __dialog_schematic_find__
#include "dialog_schematic_find_base.h" #include "dialog_schematic_find_base.h"
#include <wx/fdrepdlg.h> // Use the wxFindReplaceDialog events, data, and enums. #include <wx/fdrepdlg.h> // Use the wxFindReplaceDialog events, data, and enums.
@ -49,7 +73,10 @@ enum SchematicFindReplaceFlags
/// Used by the search event handler to let the dialog know that a replaceable /// Used by the search event handler to let the dialog know that a replaceable
/// item has been found. /// item has been found.
FR_REPLACE_ITEM_FOUND = wxFR_MATCHCASE << 8 FR_REPLACE_ITEM_FOUND = wxFR_MATCHCASE << 8,
/// Used by replace to ignore the component reference designator field.
FR_REPLACE_REFERENCES = wxFR_MATCHCASE << 9
}; };

View File

@ -67,7 +67,8 @@ DIALOG_SCH_FIND_BASE::DIALOG_SCH_FIND_BASE( wxWindow* parent, wxWindowID id, con
leftSizer->Add( leftGridSizer, 0, wxALL|wxEXPAND, 6 ); leftSizer->Add( leftGridSizer, 0, wxALL|wxEXPAND, 6 );
m_checkWholeWord = new wxCheckBox( this, wxID_ANY, _("Match &whole word"), wxDefaultPosition, wxDefaultSize, 0 ); m_checkWholeWord = new wxCheckBox( this, wxID_ANY, _("Match whole wor&d"), wxDefaultPosition, wxDefaultSize, 0 );
m_checkWholeWord->SetValue(true);
leftSizer->Add( m_checkWholeWord, 0, wxALL, 6 ); leftSizer->Add( m_checkWholeWord, 0, wxALL, 6 );
m_checkMatchCase = new wxCheckBox( this, wxID_ANY, _("&Match case"), wxDefaultPosition, wxDefaultSize, 0 ); m_checkMatchCase = new wxCheckBox( this, wxID_ANY, _("&Match case"), wxDefaultPosition, wxDefaultSize, 0 );
@ -80,16 +81,21 @@ DIALOG_SCH_FIND_BASE::DIALOG_SCH_FIND_BASE( wxWindow* parent, wxWindowID id, con
m_checkWrap->SetValue(true); m_checkWrap->SetValue(true);
leftSizer->Add( m_checkWrap, 0, wxBOTTOM|wxLEFT|wxRIGHT, 6 ); leftSizer->Add( m_checkWrap, 0, wxBOTTOM|wxLEFT|wxRIGHT, 6 );
m_checkAllFields = new wxCheckBox( this, wxID_ANY, _("Search all component &fields"), wxDefaultPosition, wxDefaultSize, 0 ); m_checkAllFields = new wxCheckBox( this, wxID_ANY, _("Search all com&ponent fields"), wxDefaultPosition, wxDefaultSize, 0 );
leftSizer->Add( m_checkAllFields, 0, wxBOTTOM|wxLEFT|wxRIGHT, 6 ); leftSizer->Add( m_checkAllFields, 0, wxBOTTOM|wxLEFT|wxRIGHT, 6 );
m_checkAllPins = new wxCheckBox( this, wxID_ANY, _("Search all pin names and numbers"), wxDefaultPosition, wxDefaultSize, 0 ); m_checkAllPins = new wxCheckBox( this, wxID_ANY, _("Search all pin &names and numbers"), wxDefaultPosition, wxDefaultSize, 0 );
leftSizer->Add( m_checkAllPins, 0, wxBOTTOM|wxRIGHT|wxLEFT, 6 ); leftSizer->Add( m_checkAllPins, 0, wxBOTTOM|wxRIGHT|wxLEFT, 6 );
m_checkCurrentSheetOnly = new wxCheckBox( this, wxID_ANY, _("Search the current sheet on&ly"), wxDefaultPosition, wxDefaultSize, 0 ); m_checkCurrentSheetOnly = new wxCheckBox( this, wxID_ANY, _("Search the current &sheet onl&y"), wxDefaultPosition, wxDefaultSize, 0 );
leftSizer->Add( m_checkCurrentSheetOnly, 0, wxBOTTOM|wxLEFT|wxRIGHT, 6 ); leftSizer->Add( m_checkCurrentSheetOnly, 0, wxBOTTOM|wxLEFT|wxRIGHT, 6 );
m_checkNoWarpCursor = new wxCheckBox( this, wxID_ANY, _("Do not warp cursor to found item"), wxDefaultPosition, wxDefaultSize, 0 ); m_checkReplaceReferences = new wxCheckBox( this, wxID_ANY, _("Replace componen&t reference designators"), wxDefaultPosition, wxDefaultSize, 0 );
m_checkReplaceReferences->Hide();
leftSizer->Add( m_checkReplaceReferences, 0, wxBOTTOM|wxLEFT|wxRIGHT, 6 );
m_checkNoWarpCursor = new wxCheckBox( this, wxID_ANY, _("D&o not warp cursor to found item"), wxDefaultPosition, wxDefaultSize, 0 );
leftSizer->Add( m_checkNoWarpCursor, 0, wxBOTTOM|wxLEFT|wxRIGHT, 6 ); leftSizer->Add( m_checkNoWarpCursor, 0, wxBOTTOM|wxLEFT|wxRIGHT, 6 );
mainSizer->Add( leftSizer, 1, wxALL|wxEXPAND, 6 ); mainSizer->Add( leftSizer, 1, wxALL|wxEXPAND, 6 );

View File

@ -48,6 +48,7 @@ class DIALOG_SCH_FIND_BASE : public wxDialog
wxCheckBox* m_checkAllFields; wxCheckBox* m_checkAllFields;
wxCheckBox* m_checkAllPins; wxCheckBox* m_checkAllPins;
wxCheckBox* m_checkCurrentSheetOnly; wxCheckBox* m_checkCurrentSheetOnly;
wxCheckBox* m_checkReplaceReferences;
wxCheckBox* m_checkNoWarpCursor; wxCheckBox* m_checkNoWarpCursor;
wxButton* m_buttonFind; wxButton* m_buttonFind;
wxButton* m_buttonReplace; wxButton* m_buttonReplace;

View File

@ -90,7 +90,7 @@ static void moveBitmap( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosit
aPanel->SetMouseCapture( NULL, NULL ); // Avoid loop in redraw panel aPanel->SetMouseCapture( NULL, NULL ); // Avoid loop in redraw panel
int flgs = image->GetFlags(); int flgs = image->GetFlags();
image->m_Flags = 0; image->ClearFlags();
aPanel->RefreshDrawingRect( dirty ); aPanel->RefreshDrawingRect( dirty );
image->SetFlags( flgs ); image->SetFlags( flgs );
aPanel->SetMouseCapture( moveBitmap, abortMoveBitmap ); aPanel->SetMouseCapture( moveBitmap, abortMoveBitmap );
@ -133,9 +133,9 @@ SCH_BITMAP* SCH_EDIT_FRAME::CreateNewImage( wxDC* aDC )
image->SetFlags( IS_NEW | IS_MOVED ); image->SetFlags( IS_NEW | IS_MOVED );
image->Draw( DrawPanel, aDC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); image->Draw( m_canvas, aDC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
DrawPanel->SetMouseCapture( moveBitmap, abortMoveBitmap ); m_canvas->SetMouseCapture( moveBitmap, abortMoveBitmap );
GetScreen()->SetCurItem( image ); GetScreen()->SetCurItem( image );
OnModify(); OnModify();
@ -146,16 +146,16 @@ void SCH_EDIT_FRAME::MoveImage( SCH_BITMAP* aImageItem, wxDC* aDC )
{ {
aImageItem->SetFlags( IS_MOVED ); aImageItem->SetFlags( IS_MOVED );
DrawPanel->SetMouseCapture( moveBitmap, abortMoveBitmap ); m_canvas->SetMouseCapture( moveBitmap, abortMoveBitmap );
GetScreen()->SetCurItem( aImageItem ); GetScreen()->SetCurItem( aImageItem );
m_itemToRepeat = NULL; m_itemToRepeat = NULL;
SetUndoItem( aImageItem ); SetUndoItem( aImageItem );
DrawPanel->CrossHairOff( aDC ); m_canvas->CrossHairOff( aDC );
GetScreen()->SetCrossHairPosition( aImageItem->GetPosition() ); GetScreen()->SetCrossHairPosition( aImageItem->GetPosition() );
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
DrawPanel->CrossHairOn( aDC ); m_canvas->CrossHairOn( aDC );
OnModify(); OnModify();
} }
@ -167,7 +167,7 @@ void SCH_EDIT_FRAME::RotateImage( SCH_BITMAP* aItem )
aItem->Rotate( aItem->GetPosition() ); aItem->Rotate( aItem->GetPosition() );
OnModify(); OnModify();
DrawPanel->Refresh(); m_canvas->Refresh();
} }
void SCH_EDIT_FRAME::MirrorImage( SCH_BITMAP* aItem, bool Is_X_axis ) void SCH_EDIT_FRAME::MirrorImage( SCH_BITMAP* aItem, bool Is_X_axis )
@ -181,7 +181,7 @@ void SCH_EDIT_FRAME::MirrorImage( SCH_BITMAP* aItem, bool Is_X_axis )
aItem->Mirror_Y( aItem->GetPosition().x ); aItem->Mirror_Y( aItem->GetPosition().x );
OnModify(); OnModify();
DrawPanel->Refresh(); m_canvas->Refresh();
} }
void SCH_EDIT_FRAME::EditImage( SCH_BITMAP* aItem ) void SCH_EDIT_FRAME::EditImage( SCH_BITMAP* aItem )
@ -196,5 +196,5 @@ void SCH_EDIT_FRAME::EditImage( SCH_BITMAP* aItem )
dlg.TransfertToImage(aItem->m_Image); dlg.TransfertToImage(aItem->m_Image);
OnModify(); OnModify();
DrawPanel->Refresh(); m_canvas->Refresh();
} }

View File

@ -74,7 +74,7 @@ create a new power component with the new value." ), GetChars( entry->GetName()
// Don't use GetText() here. If the field is the reference designator and it's parent // Don't use GetText() here. If the field is the reference designator and it's parent
// component has multiple parts, we don't want the part suffix added to the field. // component has multiple parts, we don't want the part suffix added to the field.
wxString newtext = aField->m_Text; wxString newtext = aField->m_Text;
DrawPanel->m_IgnoreMouseEvents = true; m_canvas->m_IgnoreMouseEvents = true;
wxString title; wxString title;
title.Printf( _( "Edit %s Field" ), GetChars( aField->GetName() ) ); title.Printf( _( "Edit %s Field" ), GetChars( aField->GetName() ) );
@ -82,8 +82,8 @@ create a new power component with the new value." ), GetChars( entry->GetName()
wxTextEntryDialog dlg( this, wxEmptyString , title, newtext ); wxTextEntryDialog dlg( this, wxEmptyString , title, newtext );
int response = dlg.ShowModal(); int response = dlg.ShowModal();
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
DrawPanel->m_IgnoreMouseEvents = false; m_canvas->m_IgnoreMouseEvents = false;
newtext = dlg.GetValue( ); newtext = dlg.GetValue( );
newtext.Trim( true ); newtext.Trim( true );
newtext.Trim( false ); newtext.Trim( false );
@ -91,7 +91,7 @@ create a new power component with the new value." ), GetChars( entry->GetName()
if ( response != wxID_OK || newtext == aField->GetText() ) if ( response != wxID_OK || newtext == aField->GetText() )
return; // canceled by user return; // canceled by user
aField->Draw( DrawPanel, aDC, wxPoint( 0, 0 ), g_XorMode ); aField->Draw( m_canvas, aDC, wxPoint( 0, 0 ), g_XorMode );
if( !newtext.IsEmpty() ) if( !newtext.IsEmpty() )
{ {
@ -135,7 +135,7 @@ create a new power component with the new value." ), GetChars( entry->GetName()
} }
} }
aField->Draw( DrawPanel, aDC, wxPoint( 0, 0 ), g_XorMode ); aField->Draw( m_canvas, aDC, wxPoint( 0, 0 ), g_XorMode );
component->DisplayInfo( this ); component->DisplayInfo( this );
OnModify(); OnModify();
} }
@ -152,14 +152,14 @@ void SCH_EDIT_FRAME::RotateField( SCH_FIELD* aField, wxDC* aDC )
if( aField->GetFlags() == 0 ) if( aField->GetFlags() == 0 )
SaveCopyInUndoList( component, UR_CHANGED ); SaveCopyInUndoList( component, UR_CHANGED );
aField->Draw( DrawPanel, aDC, wxPoint( 0, 0 ), g_XorMode ); aField->Draw( m_canvas, aDC, wxPoint( 0, 0 ), g_XorMode );
if( aField->m_Orient == TEXT_ORIENT_HORIZ ) if( aField->m_Orient == TEXT_ORIENT_HORIZ )
aField->m_Orient = TEXT_ORIENT_VERT; aField->m_Orient = TEXT_ORIENT_VERT;
else else
aField->m_Orient = TEXT_ORIENT_HORIZ; aField->m_Orient = TEXT_ORIENT_HORIZ;
aField->Draw( DrawPanel, aDC, wxPoint( 0, 0 ), g_XorMode ); aField->Draw( m_canvas, aDC, wxPoint( 0, 0 ), g_XorMode );
OnModify(); OnModify();
} }

View File

@ -60,12 +60,12 @@ void SCH_EDIT_FRAME::ChangeTextOrient( SCH_TEXT* aTextItem, wxDC* aDC )
if( aTextItem->GetFlags() == 0 ) if( aTextItem->GetFlags() == 0 )
SaveCopyInUndoList( aTextItem, UR_CHANGED ); SaveCopyInUndoList( aTextItem, UR_CHANGED );
DrawPanel->CrossHairOff( aDC ); m_canvas->CrossHairOff( aDC );
aTextItem->Draw( DrawPanel, aDC, wxPoint( 0, 0 ), g_XorMode ); aTextItem->Draw( m_canvas, aDC, wxPoint( 0, 0 ), g_XorMode );
aTextItem->SetOrientation( orient ); aTextItem->SetOrientation( orient );
OnModify(); OnModify();
aTextItem->Draw( DrawPanel, aDC, wxPoint( 0, 0 ), g_XorMode ); aTextItem->Draw( m_canvas, aDC, wxPoint( 0, 0 ), g_XorMode );
DrawPanel->CrossHairOn( aDC ); m_canvas->CrossHairOn( aDC );
} }
@ -106,7 +106,7 @@ SCH_TEXT* SCH_EDIT_FRAME::CreateNewText( wxDC* aDC, int aType )
textItem->m_Size.x = textItem->m_Size.y = g_DefaultTextLabelSize; textItem->m_Size.x = textItem->m_Size.y = g_DefaultTextLabelSize;
textItem->SetFlags( IS_NEW | IS_MOVED ); textItem->SetFlags( IS_NEW | IS_MOVED );
textItem->Draw( DrawPanel, aDC, wxPoint( 0, 0 ), g_XorMode ); textItem->Draw( m_canvas, aDC, wxPoint( 0, 0 ), g_XorMode );
EditSchematicText( textItem ); EditSchematicText( textItem );
if( textItem->m_Text.IsEmpty() ) if( textItem->m_Text.IsEmpty() )
@ -124,7 +124,7 @@ SCH_TEXT* SCH_EDIT_FRAME::CreateNewText( wxDC* aDC, int aType )
lastGlobalLabelShape = textItem->GetShape(); lastGlobalLabelShape = textItem->GetShape();
} }
textItem->Draw( DrawPanel, aDC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); textItem->Draw( m_canvas, aDC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
MoveItem( (SCH_ITEM*) textItem, aDC ); MoveItem( (SCH_ITEM*) textItem, aDC );
return textItem; return textItem;
@ -220,17 +220,17 @@ void SCH_EDIT_FRAME::OnConvertTextType( wxCommandEvent& aEvent )
* put in undo list later, at the end of the current command (if not aborted) * put in undo list later, at the end of the current command (if not aborted)
*/ */
INSTALL_UNBUFFERED_DC( dc, DrawPanel ); INSTALL_UNBUFFERED_DC( dc, m_canvas );
DrawPanel->CrossHairOff( &dc ); // Erase schematic cursor m_canvas->CrossHairOff( &dc ); // Erase schematic cursor
text->Draw( DrawPanel, &dc, wxPoint( 0, 0 ), g_XorMode ); text->Draw( m_canvas, &dc, wxPoint( 0, 0 ), g_XorMode );
screen->RemoveFromDrawList( text ); screen->RemoveFromDrawList( text );
screen->AddToDrawList( newtext ); screen->AddToDrawList( newtext );
GetScreen()->SetCurItem( newtext ); GetScreen()->SetCurItem( newtext );
m_itemToRepeat = NULL; m_itemToRepeat = NULL;
OnModify(); OnModify();
newtext->Draw( DrawPanel, &dc, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); newtext->Draw( m_canvas, &dc, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
DrawPanel->CrossHairOn( &dc ); // redraw schematic cursor m_canvas->CrossHairOn( &dc ); // redraw schematic cursor
if( text->IsNew() ) if( text->IsNew() )
{ {

View File

@ -47,16 +47,16 @@ void SCH_EDIT_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg )
if( GetScreen() == NULL ) if( GetScreen() == NULL )
return; return;
DrawPanel->DrawBackGround( DC ); m_canvas->DrawBackGround( DC );
GetScreen()->Draw( DrawPanel, DC, GR_DEFAULT_DRAWMODE ); GetScreen()->Draw( m_canvas, DC, GR_DEFAULT_DRAWMODE );
TraceWorkSheet( DC, GetScreen(), g_DrawDefaultLineThickness ); TraceWorkSheet( DC, GetScreen(), g_DrawDefaultLineThickness );
if( DrawPanel->IsMouseCaptured() ) if( m_canvas->IsMouseCaptured() )
DrawPanel->m_mouseCaptureCallback( DrawPanel, DC, wxDefaultPosition, FALSE ); m_canvas->m_mouseCaptureCallback( m_canvas, DC, wxDefaultPosition, FALSE );
DrawPanel->DrawCrossHair( DC ); m_canvas->DrawCrossHair( DC );
// Display the sheet filename, and the sheet path, for non root sheets // Display the sheet filename, and the sheet path, for non root sheets
if( GetScreen()->GetFileName() == m_DefaultSchematicFileName ) if( GetScreen()->GetFileName() == m_DefaultSchematicFileName )

View File

@ -170,13 +170,13 @@ bool EDA_APP::OnInit()
wxSetWorkingDirectory( filename.GetPath() ); wxSetWorkingDirectory( filename.GetPath() );
if( frame->LoadOneEEProject( filename.GetFullPath(), false ) ) if( frame->LoadOneEEProject( filename.GetFullPath(), false ) )
frame->DrawPanel->Refresh( true ); frame->GetCanvas()->Refresh( true );
} }
else else
{ {
// Read a default config file if no file to load. // Read a default config file if no file to load.
frame->LoadProjectFile( wxEmptyString, true ); frame->LoadProjectFile( wxEmptyString, true );
frame->DrawPanel->Refresh( true ); frame->GetCanvas()->Refresh( true );
} }
return true; return true;

View File

@ -191,7 +191,7 @@ void SCH_EDIT_FRAME::OnSetOptions( wxCommandEvent& event )
dlg.SetAutoSaveInterval( GetAutoSaveInterval() / 60 ); dlg.SetAutoSaveInterval( GetAutoSaveInterval() / 60 );
dlg.SetShowGrid( IsGridVisible() ); dlg.SetShowGrid( IsGridVisible() );
dlg.SetShowHiddenPins( m_showAllPins ); dlg.SetShowHiddenPins( m_showAllPins );
dlg.SetEnableAutoPan( DrawPanel->m_AutoPAN_Enable ); dlg.SetEnableAutoPan( m_canvas->m_AutoPAN_Enable );
dlg.SetEnableHVBusOrientation( g_HVLines ); dlg.SetEnableHVBusOrientation( g_HVLines );
dlg.SetShowPageLimits( g_ShowPageLimits ); dlg.SetShowPageLimits( g_ShowPageLimits );
dlg.Layout(); dlg.Layout();
@ -222,7 +222,7 @@ void SCH_EDIT_FRAME::OnSetOptions( wxCommandEvent& event )
SetAutoSaveInterval( dlg.GetAutoSaveInterval() * 60 ); SetAutoSaveInterval( dlg.GetAutoSaveInterval() * 60 );
SetGridVisibility( dlg.GetShowGrid() ); SetGridVisibility( dlg.GetShowGrid() );
m_showAllPins = dlg.GetShowHiddenPins(); m_showAllPins = dlg.GetShowHiddenPins();
DrawPanel->m_AutoPAN_Enable = dlg.GetEnableAutoPan(); m_canvas->m_AutoPAN_Enable = dlg.GetEnableAutoPan();
g_HVLines = dlg.GetEnableHVBusOrientation(); g_HVLines = dlg.GetEnableHVBusOrientation();
g_ShowPageLimits = dlg.GetShowPageLimits(); g_ShowPageLimits = dlg.GetShowPageLimits();
@ -247,7 +247,7 @@ void SCH_EDIT_FRAME::OnSetOptions( wxCommandEvent& event )
} }
} }
DrawPanel->Refresh( true ); m_canvas->Refresh( true );
} }

View File

@ -18,10 +18,10 @@ void SCH_EDIT_FRAME::OnCopySchematicItemRequest( wxCommandEvent& event )
{ {
SCH_ITEM * curr_item = GetScreen()->GetCurItem(); SCH_ITEM * curr_item = GetScreen()->GetCurItem();
if( !curr_item || curr_item->m_Flags ) if( !curr_item || curr_item->GetFlags() )
return; return;
INSTALL_UNBUFFERED_DC( dc, DrawPanel ); INSTALL_UNBUFFERED_DC( dc, m_canvas );
switch( curr_item->Type() ) switch( curr_item->Type() )
{ {
@ -31,12 +31,11 @@ void SCH_EDIT_FRAME::OnCopySchematicItemRequest( wxCommandEvent& event )
newitem = new SCH_COMPONENT( *( (SCH_COMPONENT*) curr_item ) ); newitem = new SCH_COMPONENT( *( (SCH_COMPONENT*) curr_item ) );
newitem->SetTimeStamp( GetNewTimeStamp() ); newitem->SetTimeStamp( GetNewTimeStamp() );
newitem->ClearAnnotation( NULL ); newitem->ClearAnnotation( NULL );
newitem->m_Flags = IS_NEW; newitem->SetFlags( IS_NEW );
MoveItem( (SCH_ITEM*) newitem, &dc ); MoveItem( (SCH_ITEM*) newitem, &dc );
/* Redraw the original part, because StartMovePart() erased // Redraw the original part, because StartMovePart() erased it from screen.
* it from screen */ curr_item->Draw( m_canvas, &dc, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
curr_item->Draw( DrawPanel, &dc, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
} }
break; break;
@ -50,7 +49,7 @@ void SCH_EDIT_FRAME::OnCopySchematicItemRequest( wxCommandEvent& event )
MoveItem( (SCH_ITEM*) newitem, &dc ); MoveItem( (SCH_ITEM*) newitem, &dc );
/* Redraw the original part in XOR mode */ /* Redraw the original part in XOR mode */
curr_item->Draw( DrawPanel, &dc, wxPoint( 0, 0 ), g_XorMode ); curr_item->Draw( m_canvas, &dc, wxPoint( 0, 0 ), g_XorMode );
} }
break; break;

View File

@ -75,6 +75,7 @@ bool SCH_EDIT_FRAME::SaveEEFile( SCH_SCREEN* aScreen, int aSaveType, bool aCreat
if( schematicFileName.FileExists() ) if( schematicFileName.FileExists() )
{ {
backupFileName.SetExt( g_SchematicBackupFileExtension ); backupFileName.SetExt( g_SchematicBackupFileExtension );
if( backupFileName.FileExists() )
wxRemoveFile( backupFileName.GetFullPath() ); wxRemoveFile( backupFileName.GetFullPath() );
if( !wxRenameFile( schematicFileName.GetFullPath(), backupFileName.GetFullPath() ) ) if( !wxRenameFile( schematicFileName.GetFullPath(), backupFileName.GetFullPath() ) )
@ -257,7 +258,7 @@ bool SCH_EDIT_FRAME::LoadOneEEProject( const wxString& aFileName, bool aIsNew )
LoadProjectFile( wxEmptyString, true ); LoadProjectFile( wxEmptyString, true );
Zoom_Automatique( false ); Zoom_Automatique( false );
SetSheetNumberAndCount(); SetSheetNumberAndCount();
DrawPanel->Refresh(); m_canvas->Refresh();
return true; return true;
} }
@ -353,7 +354,7 @@ bool SCH_EDIT_FRAME::LoadOneEEProject( const wxString& aFileName, bool aIsNew )
GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId ); GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId );
Zoom_Automatique( false ); Zoom_Automatique( false );
SetSheetNumberAndCount(); SetSheetNumberAndCount();
DrawPanel->Refresh( true ); m_canvas->Refresh( true );
return diag; return diag;
} }

View File

@ -208,7 +208,7 @@ SCH_ITEM* SCH_EDIT_FRAME::FindComponentAndItem( const wxString& aReference,
/* There may be need to reframe the drawing */ /* There may be need to reframe the drawing */
if( ! DrawPanel->IsPointOnDisplay( pos ) ) if( ! m_canvas->IsPointOnDisplay( pos ) )
{ {
centerAndRedraw = true; centerAndRedraw = true;
} }
@ -221,16 +221,16 @@ SCH_ITEM* SCH_EDIT_FRAME::FindComponentAndItem( const wxString& aReference,
else else
{ {
INSTALL_UNBUFFERED_DC( dc, DrawPanel ); INSTALL_UNBUFFERED_DC( dc, m_canvas );
DrawPanel->CrossHairOff( &dc ); m_canvas->CrossHairOff( &dc );
if( aWarpMouse ) if( aWarpMouse )
DrawPanel->MoveCursor( pos ); m_canvas->MoveCursor( pos );
GetScreen()->SetCrossHairPosition(pos); GetScreen()->SetCrossHairPosition(pos);
DrawPanel->CrossHairOn( &dc ); m_canvas->CrossHairOn( &dc );
} }
} }
@ -309,13 +309,14 @@ void SCH_EDIT_FRAME::OnFindSchematicItem( wxFindDialogEvent& aEvent )
searchCriteria.SetFindString( aEvent.GetFindString() ); searchCriteria.SetFindString( aEvent.GetFindString() );
searchCriteria.SetReplaceString( aEvent.GetReplaceString() ); searchCriteria.SetReplaceString( aEvent.GetReplaceString() );
if( m_foundItems.GetFindReplaceData().ChangesSearch( searchCriteria ) )
{
if( aEvent.GetEventType() == wxEVT_COMMAND_FIND_CLOSE ) if( aEvent.GetEventType() == wxEVT_COMMAND_FIND_CLOSE )
{ {
warpCursor = true; if( m_foundItems.GetCount() == 0 )
return;
} }
else if( aEvent.GetFlags() & FR_CURRENT_SHEET_ONLY && g_RootSheet->CountSheets() > 1 ) else if( m_foundItems.IsSearchRequired( searchCriteria ) )
{
if( aEvent.GetFlags() & FR_CURRENT_SHEET_ONLY && g_RootSheet->CountSheets() > 1 )
{ {
m_foundItems.Collect( searchCriteria, m_CurrentSheet ); m_foundItems.Collect( searchCriteria, m_CurrentSheet );
} }

View File

@ -33,9 +33,6 @@ class TRANSFORM;
#define HIGHLIGHT_COLOR WHITE #define HIGHLIGHT_COLOR WHITE
/* Used for EDA_ITEM, .m_Select member */
#define IS_SELECTED 1
#define TEXT_NO_VISIBLE 1 #define TEXT_NO_VISIBLE 1
//#define GR_DEFAULT_DRAWMODE GR_COPY //#define GR_DEFAULT_DRAWMODE GR_COPY

View File

@ -96,7 +96,7 @@ SCH_COMPONENT* SCH_EDIT_FRAME::Load_Component( wxDC* DC,
static wxString lastCommponentName; static wxString lastCommponentName;
m_itemToRepeat = NULL; m_itemToRepeat = NULL;
DrawPanel->m_IgnoreMouseEvents = true; m_canvas->m_IgnoreMouseEvents = true;
if( !libname.IsEmpty() ) if( !libname.IsEmpty() )
{ {
@ -122,8 +122,8 @@ SCH_COMPONENT* SCH_EDIT_FRAME::Load_Component( wxDC* DC,
if ( dlg.ShowModal() == wxID_CANCEL ) if ( dlg.ShowModal() == wxID_CANCEL )
{ {
DrawPanel->m_IgnoreMouseEvents = false; m_canvas->m_IgnoreMouseEvents = false;
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
return NULL; return NULL;
} }
@ -140,8 +140,8 @@ SCH_COMPONENT* SCH_EDIT_FRAME::Load_Component( wxDC* DC,
if( Name.IsEmpty() ) if( Name.IsEmpty() )
{ {
DrawPanel->m_IgnoreMouseEvents = false; m_canvas->m_IgnoreMouseEvents = false;
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
return NULL; return NULL;
} }
@ -157,8 +157,8 @@ SCH_COMPONENT* SCH_EDIT_FRAME::Load_Component( wxDC* DC,
if( Name.IsEmpty() ) if( Name.IsEmpty() )
{ {
DrawPanel->m_IgnoreMouseEvents = false; m_canvas->m_IgnoreMouseEvents = false;
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
return NULL; return NULL;
} }
} }
@ -168,8 +168,8 @@ SCH_COMPONENT* SCH_EDIT_FRAME::Load_Component( wxDC* DC,
if( GetNameOfPartToLoad( this, Library, Name ) == 0 ) if( GetNameOfPartToLoad( this, Library, Name ) == 0 )
{ {
DrawPanel->m_IgnoreMouseEvents = false; m_canvas->m_IgnoreMouseEvents = false;
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
return NULL; return NULL;
} }
} }
@ -180,8 +180,8 @@ SCH_COMPONENT* SCH_EDIT_FRAME::Load_Component( wxDC* DC,
if( Name.IsEmpty() ) if( Name.IsEmpty() )
{ {
DrawPanel->m_IgnoreMouseEvents = false; m_canvas->m_IgnoreMouseEvents = false;
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
return NULL; return NULL;
} }
} }
@ -200,14 +200,14 @@ SCH_COMPONENT* SCH_EDIT_FRAME::Load_Component( wxDC* DC,
if( Entry == NULL ) if( Entry == NULL )
{ {
DrawPanel->m_IgnoreMouseEvents = false; m_canvas->m_IgnoreMouseEvents = false;
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
return NULL; return NULL;
} }
} }
DrawPanel->m_IgnoreMouseEvents = false; m_canvas->m_IgnoreMouseEvents = false;
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
if( Entry == NULL ) if( Entry == NULL )
{ {
@ -230,7 +230,7 @@ SCH_COMPONENT* SCH_EDIT_FRAME::Load_Component( wxDC* DC,
// Set the component value that can differ from component name in lib, for aliases // Set the component value that can differ from component name in lib, for aliases
component->GetField( VALUE )->m_Text = Name; component->GetField( VALUE )->m_Text = Name;
component->DisplayInfo( this ); component->DisplayInfo( this );
component->Draw( DrawPanel, DC, wxPoint( 0, 0 ), g_XorMode, g_GhostColor ); component->Draw( m_canvas, DC, wxPoint( 0, 0 ), g_XorMode, g_GhostColor );
component->SetFlags( IS_NEW ); component->SetFlags( IS_NEW );
MoveItem( (SCH_ITEM*) component, DC ); MoveItem( (SCH_ITEM*) component, DC );
@ -252,7 +252,7 @@ void SCH_EDIT_FRAME::OrientComponent( COMPONENT_ORIENTATION_T aOrientation )
SCH_COMPONENT* component = (SCH_COMPONENT*) item; SCH_COMPONENT* component = (SCH_COMPONENT*) item;
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
if( component->GetFlags() == 0 ) if( component->GetFlags() == 0 )
{ {
@ -260,27 +260,27 @@ void SCH_EDIT_FRAME::OrientComponent( COMPONENT_ORIENTATION_T aOrientation )
GetScreen()->SetCurItem( NULL ); GetScreen()->SetCurItem( NULL );
} }
INSTALL_UNBUFFERED_DC( dc, DrawPanel ); INSTALL_UNBUFFERED_DC( dc, m_canvas );
// Erase the previous component in it's current orientation. // Erase the previous component in it's current orientation.
DrawPanel->CrossHairOff( &dc ); m_canvas->CrossHairOff( &dc );
if( component->GetFlags() ) if( component->GetFlags() )
component->Draw( DrawPanel, &dc, wxPoint( 0, 0 ), g_XorMode, g_GhostColor ); component->Draw( m_canvas, &dc, wxPoint( 0, 0 ), g_XorMode, g_GhostColor );
else else
DrawPanel->RefreshDrawingRect( component->GetBoundingBox() ); m_canvas->RefreshDrawingRect( component->GetBoundingBox() );
component->SetOrientation( aOrientation ); component->SetOrientation( aOrientation );
/* Redraw the component in the new position. */ /* Redraw the component in the new position. */
if( component->GetFlags() ) if( component->GetFlags() )
component->Draw( DrawPanel, &dc, wxPoint( 0, 0 ), g_XorMode, g_GhostColor ); component->Draw( m_canvas, &dc, wxPoint( 0, 0 ), g_XorMode, g_GhostColor );
else else
component->Draw( DrawPanel, &dc, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); component->Draw( m_canvas, &dc, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
DrawPanel->CrossHairOn( &dc ); m_canvas->CrossHairOn( &dc );
GetScreen()->TestDanglingEnds( DrawPanel, &dc ); GetScreen()->TestDanglingEnds( m_canvas, &dc );
OnModify(); OnModify();
} }
@ -296,9 +296,9 @@ void SCH_EDIT_FRAME::OnSelectUnit( wxCommandEvent& aEvent )
wxCHECK_RET( item != NULL && item->Type() == SCH_COMPONENT_T, wxCHECK_RET( item != NULL && item->Type() == SCH_COMPONENT_T,
wxT( "Cannot select unit of invalid schematic item." ) ); wxT( "Cannot select unit of invalid schematic item." ) );
INSTALL_UNBUFFERED_DC( dc, DrawPanel ); INSTALL_UNBUFFERED_DC( dc, m_canvas );
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
SCH_COMPONENT* component = (SCH_COMPONENT*) item; SCH_COMPONENT* component = (SCH_COMPONENT*) item;
@ -330,9 +330,9 @@ void SCH_EDIT_FRAME::OnSelectUnit( wxCommandEvent& aEvent )
SaveCopyInUndoList( component, UR_CHANGED ); SaveCopyInUndoList( component, UR_CHANGED );
if( flags ) if( flags )
component->Draw( DrawPanel, &dc, wxPoint( 0, 0 ), g_XorMode, g_GhostColor ); component->Draw( m_canvas, &dc, wxPoint( 0, 0 ), g_XorMode, g_GhostColor );
else else
component->Draw( DrawPanel, &dc, wxPoint( 0, 0 ), g_XorMode ); component->Draw( m_canvas, &dc, wxPoint( 0, 0 ), g_XorMode );
/* Update the unit number. */ /* Update the unit number. */
component->SetUnitSelection( m_CurrentSheet, unit ); component->SetUnitSelection( m_CurrentSheet, unit );
@ -342,11 +342,11 @@ void SCH_EDIT_FRAME::OnSelectUnit( wxCommandEvent& aEvent )
/* Redraw the component in the new position. */ /* Redraw the component in the new position. */
if( flags ) if( flags )
component->Draw( DrawPanel, &dc, wxPoint( 0, 0 ), g_XorMode, g_GhostColor ); component->Draw( m_canvas, &dc, wxPoint( 0, 0 ), g_XorMode, g_GhostColor );
else else
component->Draw( DrawPanel, &dc, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); component->Draw( m_canvas, &dc, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
screen->TestDanglingEnds( DrawPanel, &dc ); screen->TestDanglingEnds( m_canvas, &dc );
OnModify(); OnModify();
} }
@ -369,11 +369,12 @@ void SCH_EDIT_FRAME::ConvertPart( SCH_COMPONENT* DrawComponent, wxDC* DC )
return; return;
} }
int flags = DrawComponent->m_Flags; int flags = DrawComponent->GetFlags();
if( DrawComponent->m_Flags )
DrawComponent->Draw( DrawPanel, DC, wxPoint( 0, 0 ), g_XorMode, g_GhostColor ); if( DrawComponent->GetFlags() )
DrawComponent->Draw( m_canvas, DC, wxPoint( 0, 0 ), g_XorMode, g_GhostColor );
else else
DrawComponent->Draw( DrawPanel, DC, wxPoint( 0, 0 ), g_XorMode ); DrawComponent->Draw( m_canvas, DC, wxPoint( 0, 0 ), g_XorMode );
DrawComponent->SetConvert( DrawComponent->GetConvert() + 1 ); DrawComponent->SetConvert( DrawComponent->GetConvert() + 1 );
@ -390,11 +391,11 @@ void SCH_EDIT_FRAME::ConvertPart( SCH_COMPONENT* DrawComponent, wxDC* DC )
DrawComponent->SetFlags( flags ); // Restore m_Flag (modified by SetConvert()) DrawComponent->SetFlags( flags ); // Restore m_Flag (modified by SetConvert())
/* Redraw the component in the new position. */ /* Redraw the component in the new position. */
if( DrawComponent->m_Flags & IS_MOVED ) if( DrawComponent->IsMoving() )
DrawComponent->Draw( DrawPanel, DC, wxPoint( 0, 0 ), g_XorMode, g_GhostColor ); DrawComponent->Draw( m_canvas, DC, wxPoint( 0, 0 ), g_XorMode, g_GhostColor );
else else
DrawComponent->Draw( DrawPanel, DC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); DrawComponent->Draw( m_canvas, DC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
GetScreen()->TestDanglingEnds( DrawPanel, DC ); GetScreen()->TestDanglingEnds( m_canvas, DC );
OnModify( ); OnModify( );
} }

View File

@ -280,26 +280,26 @@ void SCH_EDIT_FRAME::DisplayCurrentSheet()
// update the References // update the References
m_CurrentSheet->UpdateAllScreenReferences(); m_CurrentSheet->UpdateAllScreenReferences();
SetSheetNumberAndCount(); SetSheetNumberAndCount();
DrawPanel->m_CanStartBlock = -1; m_canvas->m_CanStartBlock = -1;
if( screen->m_FirstRedraw ) if( screen->m_FirstRedraw )
{ {
Zoom_Automatique( false ); Zoom_Automatique( false );
screen->m_FirstRedraw = false; screen->m_FirstRedraw = false;
screen->SetCrossHairPosition( screen->GetScrollCenterPosition() ); screen->SetCrossHairPosition( screen->GetScrollCenterPosition() );
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
} }
else else
{ {
RedrawScreen( screen->GetScrollCenterPosition(), true ); RedrawScreen( screen->GetScrollCenterPosition(), true );
} }
// Now refresh DrawPanel. Should be not necessary, but because screen has changed // Now refresh m_canvas. Should be not necessary, but because screen has changed
// the previous refresh has set all new draw parameters (scroll position ..) // the previous refresh has set all new draw parameters (scroll position ..)
// but most of time there were some inconsitencies about cursor parameters // but most of time there were some inconsitencies about cursor parameters
// ( previous position of cursor ...) and artefacts can happen // ( previous position of cursor ...) and artefacts can happen
// mainly when sheet size has changed // mainly when sheet size has changed
// This second refresh clears artefacts because at this point, // This second refresh clears artefacts because at this point,
// all parameters are now updated // all parameters are now updated
DrawPanel->Refresh(); m_canvas->Refresh();
} }

View File

@ -387,7 +387,7 @@ void LIB_ARC::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOf
if( aColor < 0 ) // Used normal color or selected color if( aColor < 0 ) // Used normal color or selected color
{ {
if( ( m_Selected & IS_SELECTED ) ) if( IsSelected() )
color = g_ItemSelectetColor; color = g_ItemSelectetColor;
} }
else else

View File

@ -316,7 +316,7 @@ void LIB_BEZIER::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint&
if( aColor < 0 ) // Used normal color or selected color if( aColor < 0 ) // Used normal color or selected color
{ {
if( m_Selected & IS_SELECTED ) if( IsSelected() )
color = g_ItemSelectetColor; color = g_ItemSelectetColor;
} }
else else

View File

@ -228,7 +228,7 @@ void LIB_CIRCLE::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint&
if( aColor < 0 ) // Used normal color or selected color if( aColor < 0 ) // Used normal color or selected color
{ {
if( ( m_Selected & IS_SELECTED ) ) if( IsSelected() )
color = g_ItemSelectetColor; color = g_ItemSelectetColor;
} }
else else

View File

@ -89,7 +89,7 @@ void LIB_EDIT_FRAME::OnImportPart( wxCommandEvent& event )
m_lastLibImportPath = fn.GetPath(); m_lastLibImportPath = fn.GetPath();
DisplayLibInfos(); DisplayLibInfos();
GetScreen()->ClearUndoRedoList(); GetScreen()->ClearUndoRedoList();
DrawPanel->Refresh(); m_canvas->Refresh();
} }
delete LibTmp; delete LibTmp;

View File

@ -292,7 +292,7 @@ void LIB_FIELD::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& a
{ {
color = g_InvisibleItemColor; color = g_InvisibleItemColor;
} }
else if( ( m_Selected & IS_SELECTED ) && ( aColor < 0 ) ) else if( IsSelected() && ( aColor < 0 ) )
{ {
color = g_ItemSelectetColor; color = g_ItemSelectetColor;
} }

View File

@ -882,7 +882,7 @@ void LIB_PIN::DrawPinSymbol( EDA_DRAW_PANEL* aPanel,
if( aColor < 0 ) // Used normal color or selected color if( aColor < 0 ) // Used normal color or selected color
{ {
if( (m_Selected & IS_SELECTED) ) if( IsSelected() )
color = g_ItemSelectetColor; color = g_ItemSelectetColor;
} }
else else
@ -1104,7 +1104,7 @@ void LIB_PIN::DrawPinTexts( EDA_DRAW_PANEL* panel,
GRSetDrawMode( DC, DrawMode ); GRSetDrawMode( DC, DrawMode );
/* Get the num and name colors */ /* Get the num and name colors */
if( (Color < 0) && (m_Selected & IS_SELECTED) ) if( (Color < 0) && IsSelected() )
Color = g_ItemSelectetColor; Color = g_ItemSelectetColor;
NameColor = (EDA_Colors) ( Color == -1 ? ReturnLayerColor( LAYER_PINNAM ) : Color ); NameColor = (EDA_Colors) ( Color == -1 ? ReturnLayerColor( LAYER_PINNAM ) : Color );

View File

@ -282,7 +282,7 @@ void LIB_POLYLINE::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint
if( aColor < 0 ) // Used normal color or selected color if( aColor < 0 ) // Used normal color or selected color
{ {
if( m_Selected & IS_SELECTED ) if( IsSelected() )
color = g_ItemSelectetColor; color = g_ItemSelectetColor;
} }
else else

View File

@ -214,7 +214,7 @@ void LIB_RECTANGLE::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
if( aColor < 0 ) // Used normal color or selected color if( aColor < 0 ) // Used normal color or selected color
{ {
if( m_Selected & IS_SELECTED ) if( IsSelected() )
color = g_ItemSelectetColor; color = g_ItemSelectetColor;
} }
else else

View File

@ -350,7 +350,7 @@ void LIB_TEXT::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aO
if( aColor < 0 ) // Used normal color or selected color if( aColor < 0 ) // Used normal color or selected color
{ {
if( ( m_Selected & IS_SELECTED ) ) if( IsSelected() )
color = g_ItemSelectetColor; color = g_ItemSelectetColor;
} }
else else

View File

@ -118,7 +118,7 @@ void LIB_EDIT_FRAME::LoadOneLibraryPart( wxCommandEvent& event )
wxString CmpName; wxString CmpName;
LIB_ALIAS* LibEntry = NULL; LIB_ALIAS* LibEntry = NULL;
DrawPanel->EndMouseCapture( ID_NO_TOOL_SELECTED, DrawPanel->GetDefaultCursor() ); m_canvas->EndMouseCapture( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor() );
if( GetScreen()->IsModify() if( GetScreen()->IsModify()
&& !IsOK( this, _( "Current part not saved.\n\nDiscard current changes?" ) ) ) && !IsOK( this, _( "Current part not saved.\n\nDiscard current changes?" ) ) )
@ -235,7 +235,7 @@ void LIB_EDIT_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg )
if( GetScreen() == NULL ) if( GetScreen() == NULL )
return; return;
DrawPanel->DrawBackGround( DC ); m_canvas->DrawBackGround( DC );
if( m_component ) if( m_component )
{ {
@ -246,15 +246,15 @@ void LIB_EDIT_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg )
wxString fieldText = Field->m_Text; wxString fieldText = Field->m_Text;
wxString fieldfullText = Field->GetFullText( m_unit ); wxString fieldfullText = Field->GetFullText( m_unit );
Field->m_Text = fieldfullText; Field->m_Text = fieldfullText;
m_component->Draw( DrawPanel, DC, wxPoint( 0, 0 ), m_unit, m_component->Draw( m_canvas, DC, wxPoint( 0, 0 ), m_unit,
m_convert, GR_DEFAULT_DRAWMODE ); m_convert, GR_DEFAULT_DRAWMODE );
Field->m_Text = fieldText; Field->m_Text = fieldText;
} }
if( DrawPanel->IsMouseCaptured() ) if( m_canvas->IsMouseCaptured() )
DrawPanel->m_mouseCaptureCallback( DrawPanel, DC, wxDefaultPosition, false ); m_canvas->m_mouseCaptureCallback( m_canvas, DC, wxDefaultPosition, false );
DrawPanel->DrawCrossHair( DC ); m_canvas->DrawCrossHair( DC );
DisplayLibInfos(); DisplayLibInfos();
UpdateStatusBar(); UpdateStatusBar();
@ -266,7 +266,7 @@ void LIB_EDIT_FRAME::SaveActiveLibrary( wxCommandEvent& event )
wxFileName fn; wxFileName fn;
wxString msg; wxString msg;
DrawPanel->EndMouseCapture( ID_NO_TOOL_SELECTED, DrawPanel->GetDefaultCursor() ); m_canvas->EndMouseCapture( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor() );
if( m_library == NULL ) if( m_library == NULL )
{ {
@ -456,7 +456,7 @@ void LIB_EDIT_FRAME::DeleteOnePart( wxCommandEvent& event )
wxArrayString ListNames; wxArrayString ListNames;
wxString msg; wxString msg;
DrawPanel->EndMouseCapture( ID_NO_TOOL_SELECTED, DrawPanel->GetDefaultCursor() ); m_canvas->EndMouseCapture( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor() );
m_lastDrawItem = NULL; m_lastDrawItem = NULL;
m_drawItem = NULL; m_drawItem = NULL;
@ -536,7 +536,7 @@ All changes will be lost. Discard changes?" ) ) )
m_aliasName.Empty(); m_aliasName.Empty();
} }
DrawPanel->Refresh(); m_canvas->Refresh();
} }
@ -550,7 +550,7 @@ void LIB_EDIT_FRAME::CreateNewLibraryPart( wxCommandEvent& event )
lost!\n\nClear the current component from the screen?" ) ) ) lost!\n\nClear the current component from the screen?" ) ) )
return; return;
DrawPanel->EndMouseCapture( ID_NO_TOOL_SELECTED, DrawPanel->GetDefaultCursor() ); m_canvas->EndMouseCapture( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor() );
m_drawItem = NULL; m_drawItem = NULL;
@ -634,7 +634,7 @@ lost!\n\nClear the current component from the screen?" ) ) )
m_lastDrawItem = NULL; m_lastDrawItem = NULL;
GetScreen()->ClearUndoRedoList(); GetScreen()->ClearUndoRedoList();
OnModify(); OnModify();
DrawPanel->Refresh(); m_canvas->Refresh();
m_mainToolBar->Refresh(); m_mainToolBar->Refresh();
} }

View File

@ -22,7 +22,7 @@ void LIB_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& aPosition )
if( m_component == NULL ) // No component loaded ! if( m_component == NULL ) // No component loaded !
return; return;
if( item == NULL || item->m_Flags == 0 ) if( item == NULL || item->GetFlags() == 0 )
{ {
item = LocateItemUsingCursor( aPosition ); item = LocateItemUsingCursor( aPosition );
@ -32,15 +32,15 @@ void LIB_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& aPosition )
{ {
DisplayCmpDoc(); DisplayCmpDoc();
if( DrawPanel->m_AbortRequest ) if( m_canvas->m_AbortRequest )
DrawPanel->m_AbortRequest = false; m_canvas->m_AbortRequest = false;
} }
} }
switch( GetToolId() ) switch( GetToolId() )
{ {
case ID_NO_TOOL_SELECTED: case ID_NO_TOOL_SELECTED:
if( item && item->m_Flags ) // moved object if( item && item->GetFlags() ) // moved object
{ {
switch( item->Type() ) switch( item->Type() )
{ {
@ -56,7 +56,7 @@ void LIB_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& aPosition )
break; break;
case ID_LIBEDIT_PIN_BUTT: case ID_LIBEDIT_PIN_BUTT:
if( m_drawItem == NULL || m_drawItem->m_Flags == 0 ) if( m_drawItem == NULL || m_drawItem->GetFlags() == 0 )
{ {
CreatePin( DC ); CreatePin( DC );
} }
@ -71,7 +71,7 @@ void LIB_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& aPosition )
case ID_LIBEDIT_BODY_CIRCLE_BUTT: case ID_LIBEDIT_BODY_CIRCLE_BUTT:
case ID_LIBEDIT_BODY_RECT_BUTT: case ID_LIBEDIT_BODY_RECT_BUTT:
case ID_LIBEDIT_BODY_TEXT_BUTT: case ID_LIBEDIT_BODY_TEXT_BUTT:
if( m_drawItem == NULL || m_drawItem->m_Flags == 0 ) if( m_drawItem == NULL || m_drawItem->GetFlags() == 0 )
{ {
m_drawItem = CreateGraphicItem( m_component, DC ); m_drawItem = CreateGraphicItem( m_component, DC );
} }
@ -97,12 +97,12 @@ void LIB_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& aPosition )
case ID_LIBEDIT_ANCHOR_ITEM_BUTT: case ID_LIBEDIT_ANCHOR_ITEM_BUTT:
SaveCopyInUndoList( m_component ); SaveCopyInUndoList( m_component );
PlaceAnchor(); PlaceAnchor();
SetToolID( ID_NO_TOOL_SELECTED, DrawPanel->GetDefaultCursor(), wxEmptyString ); SetToolID( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor(), wxEmptyString );
break; break;
default: default:
wxFAIL_MSG( wxString::Format( wxT( "Unhandled command ID %d" ), GetToolId() ) ); wxFAIL_MSG( wxString::Format( wxT( "Unhandled command ID %d" ), GetToolId() ) );
SetToolID( ID_NO_TOOL_SELECTED, DrawPanel->GetDefaultCursor(), wxEmptyString ); SetToolID( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor(), wxEmptyString );
break; break;
} }
} }
@ -118,7 +118,7 @@ void LIB_EDIT_FRAME::OnLeftDClick( wxDC* DC, const wxPoint& aPosition )
if( m_component == NULL ) if( m_component == NULL )
return; return;
if( ( m_drawItem == NULL ) || ( m_drawItem->m_Flags == 0 ) ) if( ( m_drawItem == NULL ) || ( m_drawItem->GetFlags() == 0 ) )
{ // We can locate an item { // We can locate an item
m_drawItem = LocateItemUsingCursor( aPosition ); m_drawItem = LocateItemUsingCursor( aPosition );
@ -135,12 +135,12 @@ void LIB_EDIT_FRAME::OnLeftDClick( wxDC* DC, const wxPoint& aPosition )
else else
return; return;
DrawPanel->m_IgnoreMouseEvents = true; m_canvas->m_IgnoreMouseEvents = true;
switch( m_drawItem->Type() ) switch( m_drawItem->Type() )
{ {
case LIB_PIN_T: case LIB_PIN_T:
if( m_drawItem->m_Flags == 0 ) if( m_drawItem->GetFlags() == 0 )
{ {
wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED ); wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED );
cmd.SetId( ID_LIBEDIT_EDIT_PIN ); cmd.SetId( ID_LIBEDIT_EDIT_PIN );
@ -151,14 +151,14 @@ void LIB_EDIT_FRAME::OnLeftDClick( wxDC* DC, const wxPoint& aPosition )
case LIB_ARC_T: case LIB_ARC_T:
case LIB_CIRCLE_T: case LIB_CIRCLE_T:
case LIB_RECTANGLE_T: case LIB_RECTANGLE_T:
if( m_drawItem->m_Flags == 0 ) if( m_drawItem->GetFlags() == 0 )
{ {
EditGraphicSymbol( DC, m_drawItem ); EditGraphicSymbol( DC, m_drawItem );
} }
break; break;
case LIB_POLYLINE_T: case LIB_POLYLINE_T:
if( m_drawItem->m_Flags == 0 ) if( m_drawItem->GetFlags() == 0 )
{ {
EditGraphicSymbol( DC, m_drawItem ); EditGraphicSymbol( DC, m_drawItem );
} }
@ -169,14 +169,14 @@ void LIB_EDIT_FRAME::OnLeftDClick( wxDC* DC, const wxPoint& aPosition )
break; break;
case LIB_TEXT_T: case LIB_TEXT_T:
if( m_drawItem->m_Flags == 0 ) if( m_drawItem->GetFlags() == 0 )
{ {
EditSymbolText( DC, m_drawItem ); EditSymbolText( DC, m_drawItem );
} }
break; break;
case LIB_FIELD_T: case LIB_FIELD_T:
if( m_drawItem->m_Flags == 0 ) if( m_drawItem->GetFlags() == 0 )
{ {
EditField( DC, (LIB_FIELD*) m_drawItem ); EditField( DC, (LIB_FIELD*) m_drawItem );
} }
@ -187,6 +187,6 @@ void LIB_EDIT_FRAME::OnLeftDClick( wxDC* DC, const wxPoint& aPosition )
break; break;
} }
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
DrawPanel->m_IgnoreMouseEvents = false; m_canvas->m_IgnoreMouseEvents = false;
} }

View File

@ -51,9 +51,9 @@ bool LIB_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
item = LocateItemUsingCursor( aPosition ); item = LocateItemUsingCursor( aPosition );
// If the clarify item selection context menu is aborted, don't show the context menu. // If the clarify item selection context menu is aborted, don't show the context menu.
if( item == NULL && DrawPanel->m_AbortRequest ) if( item == NULL && m_canvas->m_AbortRequest )
{ {
DrawPanel->m_AbortRequest = false; m_canvas->m_AbortRequest = false;
return false; return false;
} }
@ -234,8 +234,8 @@ bool LIB_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
void AddMenusForPin( wxMenu* PopMenu, LIB_PIN* Pin, LIB_EDIT_FRAME* frame ) void AddMenusForPin( wxMenu* PopMenu, LIB_PIN* Pin, LIB_EDIT_FRAME* frame )
{ {
bool selected = (Pin->m_Selected & IS_SELECTED) != 0; bool selected = Pin->IsSelected();
bool not_in_move = (Pin->GetFlags() == 0); bool not_in_move = !Pin->IsMoving();
wxString msg; wxString msg;
if( not_in_move ) if( not_in_move )

View File

@ -72,7 +72,7 @@ void LIB_EDIT_FRAME::OnPlotCurrentComponent( wxCommandEvent& event )
* the margin is 10% the size of the component size * the margin is 10% the size of the component size
*/ */
wxSize pagesize = GetScreen()->ReturnPageSize( ); wxSize pagesize = GetScreen()->ReturnPageSize( );
wxSize componentSize = m_component->GetBoundingBox( m_unit, m_convert ).m_Size; wxSize componentSize = m_component->GetBoundingBox( m_unit, m_convert ).GetSize();
// Add a small margin to the plot bounding box // Add a small margin to the plot bounding box
componentSize.x = (int)(componentSize.x * 1.2); componentSize.x = (int)(componentSize.x * 1.2);
@ -88,9 +88,9 @@ void LIB_EDIT_FRAME::OnPlotCurrentComponent( wxCommandEvent& event )
void LIB_EDIT_FRAME::CreatePNGorJPEGFile( const wxString& aFileName, bool aFmt_jpeg ) void LIB_EDIT_FRAME::CreatePNGorJPEGFile( const wxString& aFileName, bool aFmt_jpeg )
{ {
wxSize image_size = DrawPanel->GetClientSize(); wxSize image_size = m_canvas->GetClientSize();
wxClientDC dc( DrawPanel ); wxClientDC dc( m_canvas );
wxBitmap bitmap( image_size.x, image_size.y ); wxBitmap bitmap( image_size.x, image_size.y );
wxMemoryDC memdc; wxMemoryDC memdc;
@ -125,7 +125,7 @@ void LIB_EDIT_FRAME::PrintPage( wxDC* aDC, int aPrintMask, bool aPrintMirrorMode
plot_offset.x = pagesize.x/2; plot_offset.x = pagesize.x/2;
plot_offset.y = pagesize.y/2; plot_offset.y = pagesize.y/2;
m_component->Draw( DrawPanel, aDC, plot_offset, m_unit, m_convert, GR_DEFAULT_DRAWMODE ); m_component->Draw( m_canvas, aDC, plot_offset, m_unit, m_convert, GR_DEFAULT_DRAWMODE );
} }

View File

@ -63,7 +63,7 @@ void LIB_EDIT_FRAME::GetComponentFromRedoList( wxCommandEvent& event )
DisplayLibInfos(); DisplayLibInfos();
DisplayCmpDoc(); DisplayCmpDoc();
OnModify(); OnModify();
DrawPanel->Refresh(); m_canvas->Refresh();
} }
@ -99,5 +99,5 @@ void LIB_EDIT_FRAME::GetComponentFromUndoList( wxCommandEvent& event )
DisplayLibInfos(); DisplayLibInfos();
DisplayCmpDoc(); DisplayCmpDoc();
OnModify(); OnModify();
DrawPanel->Refresh(); m_canvas->Refresh();
} }

View File

@ -223,8 +223,8 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( SCH_EDIT_FRAME* aParent,
SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y ); SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );
GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId ); GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId );
if( DrawPanel ) if( m_canvas )
DrawPanel->m_Block_Enable = true; m_canvas->m_Block_Enable = true;
EnsureActiveLibExists(); EnsureActiveLibExists();
ReCreateMenuBar(); ReCreateMenuBar();
@ -256,7 +256,7 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( SCH_EDIT_FRAME* aParent,
m_auimgr.AddPane( m_optionsToolBar, m_auimgr.AddPane( m_optionsToolBar,
wxAuiPaneInfo( vert ).Name( wxT( "m_optionsToolBar" ) ).Left() ); wxAuiPaneInfo( vert ).Name( wxT( "m_optionsToolBar" ) ).Left() );
m_auimgr.AddPane( DrawPanel, m_auimgr.AddPane( m_canvas,
wxAuiPaneInfo().Name( wxT( "DrawFrame" ) ).CentrePane() ); wxAuiPaneInfo().Name( wxT( "DrawFrame" ) ).CentrePane() );
m_auimgr.AddPane( m_messagePanel, m_auimgr.AddPane( m_messagePanel,
@ -382,7 +382,7 @@ double LIB_EDIT_FRAME::BestZoom()
GetScreen()->SetScrollCenterPosition( wxPoint( 0, 0 ) ); GetScreen()->SetScrollCenterPosition( wxPoint( 0, 0 ) );
} }
size = DrawPanel->GetClientSize(); size = m_canvas->GetClientSize();
// Reserve a 10% margin around component bounding box. // Reserve a 10% margin around component bounding box.
double margin_scale_factor = 0.8; double margin_scale_factor = 0.8;
@ -562,7 +562,7 @@ void LIB_EDIT_FRAME::OnSelectAlias( wxCommandEvent& event )
m_aliasName = m_aliasSelectBox->GetStringSelection(); m_aliasName = m_aliasSelectBox->GetStringSelection();
DisplayCmpDoc(); DisplayCmpDoc();
DrawPanel->Refresh(); m_canvas->Refresh();
} }
@ -575,7 +575,7 @@ void LIB_EDIT_FRAME::OnSelectPart( wxCommandEvent& event )
m_lastDrawItem = NULL; m_lastDrawItem = NULL;
m_unit = i + 1; m_unit = i + 1;
DrawPanel->Refresh(); m_canvas->Refresh();
DisplayCmpDoc(); DisplayCmpDoc();
} }
@ -599,7 +599,7 @@ void LIB_EDIT_FRAME::OnViewEntryDoc( wxCommandEvent& event )
void LIB_EDIT_FRAME::OnSelectBodyStyle( wxCommandEvent& event ) void LIB_EDIT_FRAME::OnSelectBodyStyle( wxCommandEvent& event )
{ {
DrawPanel->EndMouseCapture( ID_NO_TOOL_SELECTED, DrawPanel->GetDefaultCursor() ); m_canvas->EndMouseCapture( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor() );
if( event.GetId() == ID_DE_MORGAN_NORMAL_BUTT ) if( event.GetId() == ID_DE_MORGAN_NORMAL_BUTT )
m_convert = 1; m_convert = 1;
@ -607,7 +607,7 @@ void LIB_EDIT_FRAME::OnSelectBodyStyle( wxCommandEvent& event )
m_convert = 2; m_convert = 2;
m_lastDrawItem = NULL; m_lastDrawItem = NULL;
DrawPanel->Refresh(); m_canvas->Refresh();
} }
@ -616,7 +616,7 @@ void LIB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
int id = event.GetId(); int id = event.GetId();
wxPoint pos; wxPoint pos;
DrawPanel->m_IgnoreMouseEvents = true; m_canvas->m_IgnoreMouseEvents = true;
wxGetMousePosition( &pos.x, &pos.y ); wxGetMousePosition( &pos.x, &pos.y );
pos.y += 20; pos.y += 20;
@ -642,23 +642,23 @@ void LIB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
break; break;
case ID_POPUP_LIBEDIT_CANCEL_EDITING: case ID_POPUP_LIBEDIT_CANCEL_EDITING:
if( DrawPanel->IsMouseCaptured() ) if( m_canvas->IsMouseCaptured() )
DrawPanel->EndMouseCapture(); m_canvas->EndMouseCapture();
else else
DrawPanel->EndMouseCapture( ID_NO_TOOL_SELECTED, DrawPanel->GetDefaultCursor() ); m_canvas->EndMouseCapture( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor() );
break; break;
case ID_POPUP_LIBEDIT_DELETE_ITEM: case ID_POPUP_LIBEDIT_DELETE_ITEM:
DrawPanel->EndMouseCapture(); m_canvas->EndMouseCapture();
break; break;
default: default:
DrawPanel->EndMouseCapture( ID_NO_TOOL_SELECTED, DrawPanel->GetDefaultCursor(), m_canvas->EndMouseCapture( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor(),
wxEmptyString ); wxEmptyString );
break; break;
} }
INSTALL_UNBUFFERED_DC( dc, DrawPanel ); INSTALL_UNBUFFERED_DC( dc, m_canvas );
switch( id ) switch( id )
{ {
@ -678,7 +678,7 @@ void LIB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
break; break;
case ID_POPUP_LIBEDIT_END_CREATE_ITEM: case ID_POPUP_LIBEDIT_END_CREATE_ITEM:
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
if( m_drawItem ) if( m_drawItem )
{ {
EndDrawGraphicItem( &dc ); EndDrawGraphicItem( &dc );
@ -688,7 +688,7 @@ void LIB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_LIBEDIT_BODY_EDIT_ITEM: case ID_POPUP_LIBEDIT_BODY_EDIT_ITEM:
if( m_drawItem ) if( m_drawItem )
{ {
DrawPanel->CrossHairOff( &dc ); m_canvas->CrossHairOff( &dc );
switch( m_drawItem->Type() ) switch( m_drawItem->Type() )
{ {
@ -707,7 +707,7 @@ void LIB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
; ;
} }
DrawPanel->CrossHairOn( &dc ); m_canvas->CrossHairOn( &dc );
} }
break; break;
@ -717,12 +717,12 @@ void LIB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
if( m_drawItem == NULL ) if( m_drawItem == NULL )
break; break;
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
int oldFlags = m_drawItem->GetFlags(); int oldFlags = m_drawItem->GetFlags();
m_drawItem->ClearFlags(); m_drawItem->ClearFlags();
m_drawItem->Draw( DrawPanel, &dc, wxPoint( 0, 0 ), -1, g_XorMode, NULL, DefaultTransform ); m_drawItem->Draw( m_canvas, &dc, wxPoint( 0, 0 ), -1, g_XorMode, NULL, DefaultTransform );
( (LIB_POLYLINE*) m_drawItem )->DeleteSegment( GetScreen()->GetCrossHairPosition( true ) ); ( (LIB_POLYLINE*) m_drawItem )->DeleteSegment( GetScreen()->GetCrossHairPosition( true ) );
m_drawItem->Draw( DrawPanel, &dc, wxPoint( 0, 0 ), -1, g_XorMode, NULL, DefaultTransform ); m_drawItem->Draw( m_canvas, &dc, wxPoint( 0, 0 ), -1, g_XorMode, NULL, DefaultTransform );
m_drawItem->SetFlags( oldFlags ); m_drawItem->SetFlags( oldFlags );
m_lastDrawItem = NULL; m_lastDrawItem = NULL;
break; break;
@ -749,7 +749,7 @@ void LIB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
if( m_drawItem == NULL ) if( m_drawItem == NULL )
break; break;
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
if( m_drawItem->Type() == LIB_RECTANGLE_T if( m_drawItem->Type() == LIB_RECTANGLE_T
|| m_drawItem->Type() == LIB_CIRCLE_T || m_drawItem->Type() == LIB_CIRCLE_T
|| m_drawItem->Type() == LIB_POLYLINE_T || m_drawItem->Type() == LIB_POLYLINE_T
@ -765,15 +765,15 @@ void LIB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
if( m_drawItem == NULL ) if( m_drawItem == NULL )
break; break;
DrawPanel->CrossHairOff( &dc ); m_canvas->CrossHairOff( &dc );
if( m_drawItem->Type() == LIB_FIELD_T ) if( m_drawItem->Type() == LIB_FIELD_T )
{ {
EditField( &dc, (LIB_FIELD*) m_drawItem ); EditField( &dc, (LIB_FIELD*) m_drawItem );
} }
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
DrawPanel->CrossHairOn( &dc ); m_canvas->CrossHairOn( &dc );
break; break;
case ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_PINSIZE_ITEM: case ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_PINSIZE_ITEM:
@ -784,60 +784,60 @@ void LIB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
SaveCopyInUndoList( m_component ); SaveCopyInUndoList( m_component );
GlobalSetPins( &dc, (LIB_PIN*) m_drawItem, id ); GlobalSetPins( &dc, (LIB_PIN*) m_drawItem, id );
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
break; break;
case ID_POPUP_ZOOM_BLOCK: case ID_POPUP_ZOOM_BLOCK:
DrawPanel->m_AutoPAN_Request = false; m_canvas->m_AutoPAN_Request = false;
GetScreen()->m_BlockLocate.m_Command = BLOCK_ZOOM; GetScreen()->m_BlockLocate.m_Command = BLOCK_ZOOM;
HandleBlockEnd( &dc ); HandleBlockEnd( &dc );
break; break;
case ID_POPUP_DELETE_BLOCK: case ID_POPUP_DELETE_BLOCK:
DrawPanel->m_AutoPAN_Request = false; m_canvas->m_AutoPAN_Request = false;
GetScreen()->m_BlockLocate.m_Command = BLOCK_DELETE; GetScreen()->m_BlockLocate.m_Command = BLOCK_DELETE;
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
HandleBlockEnd( &dc ); HandleBlockEnd( &dc );
break; break;
case ID_POPUP_COPY_BLOCK: case ID_POPUP_COPY_BLOCK:
DrawPanel->m_AutoPAN_Request = false; m_canvas->m_AutoPAN_Request = false;
GetScreen()->m_BlockLocate.m_Command = BLOCK_COPY; GetScreen()->m_BlockLocate.m_Command = BLOCK_COPY;
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
HandleBlockPlace( &dc ); HandleBlockPlace( &dc );
break; break;
case ID_POPUP_SELECT_ITEMS_BLOCK: case ID_POPUP_SELECT_ITEMS_BLOCK:
DrawPanel->m_AutoPAN_Request = false; m_canvas->m_AutoPAN_Request = false;
GetScreen()->m_BlockLocate.m_Command = BLOCK_SELECT_ITEMS_ONLY; GetScreen()->m_BlockLocate.m_Command = BLOCK_SELECT_ITEMS_ONLY;
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
HandleBlockEnd( &dc ); HandleBlockEnd( &dc );
break; break;
case ID_POPUP_MIRROR_Y_BLOCK: case ID_POPUP_MIRROR_Y_BLOCK:
DrawPanel->m_AutoPAN_Request = false; m_canvas->m_AutoPAN_Request = false;
GetScreen()->m_BlockLocate.m_Command = BLOCK_MIRROR_Y; GetScreen()->m_BlockLocate.m_Command = BLOCK_MIRROR_Y;
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
HandleBlockPlace( &dc ); HandleBlockPlace( &dc );
break; break;
case ID_POPUP_MIRROR_X_BLOCK: case ID_POPUP_MIRROR_X_BLOCK:
DrawPanel->m_AutoPAN_Request = false; m_canvas->m_AutoPAN_Request = false;
GetScreen()->m_BlockLocate.m_Command = BLOCK_MIRROR_X; GetScreen()->m_BlockLocate.m_Command = BLOCK_MIRROR_X;
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
HandleBlockPlace( &dc ); HandleBlockPlace( &dc );
break; break;
case ID_POPUP_ROTATE_BLOCK: case ID_POPUP_ROTATE_BLOCK:
DrawPanel->m_AutoPAN_Request = false; m_canvas->m_AutoPAN_Request = false;
GetScreen()->m_BlockLocate.m_Command = BLOCK_ROTATE; GetScreen()->m_BlockLocate.m_Command = BLOCK_ROTATE;
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
HandleBlockPlace( &dc ); HandleBlockPlace( &dc );
break; break;
case ID_POPUP_PLACE_BLOCK: case ID_POPUP_PLACE_BLOCK:
DrawPanel->m_AutoPAN_Request = false; m_canvas->m_AutoPAN_Request = false;
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
HandleBlockPlace( &dc ); HandleBlockPlace( &dc );
break; break;
@ -846,7 +846,7 @@ void LIB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
break; break;
} }
DrawPanel->m_IgnoreMouseEvents = false; m_canvas->m_IgnoreMouseEvents = false;
if( GetToolId() == ID_NO_TOOL_SELECTED ) if( GetToolId() == ID_NO_TOOL_SELECTED )
m_lastDrawItem = NULL; m_lastDrawItem = NULL;
@ -933,7 +933,7 @@ void LIB_EDIT_FRAME::EditSymbolText( wxDC* DC, LIB_ITEM* DrawItem )
/* Deleting old text. */ /* Deleting old text. */
if( DC && !DrawItem->InEditMode() ) if( DC && !DrawItem->InEditMode() )
DrawItem->Draw( DrawPanel, DC, wxPoint( 0, 0 ), -1, g_XorMode, NULL, DefaultTransform ); DrawItem->Draw( m_canvas, DC, wxPoint( 0, 0 ), -1, g_XorMode, NULL, DefaultTransform );
DIALOG_LIB_EDIT_TEXT* frame = new DIALOG_LIB_EDIT_TEXT( this, (LIB_TEXT*) DrawItem ); DIALOG_LIB_EDIT_TEXT* frame = new DIALOG_LIB_EDIT_TEXT( this, (LIB_TEXT*) DrawItem );
frame->ShowModal(); frame->ShowModal();
@ -942,7 +942,7 @@ void LIB_EDIT_FRAME::EditSymbolText( wxDC* DC, LIB_ITEM* DrawItem )
/* Display new text. */ /* Display new text. */
if( DC && !DrawItem->InEditMode() ) if( DC && !DrawItem->InEditMode() )
DrawItem->Draw( DrawPanel, DC, wxPoint( 0, 0 ), -1, GR_DEFAULT_DRAWMODE, NULL, DrawItem->Draw( m_canvas, DC, wxPoint( 0, 0 ), -1, GR_DEFAULT_DRAWMODE, NULL,
DefaultTransform ); DefaultTransform );
} }
@ -968,7 +968,7 @@ void LIB_EDIT_FRAME::OnEditComponentProperties( wxCommandEvent& event )
DisplayLibInfos(); DisplayLibInfos();
DisplayCmpDoc(); DisplayCmpDoc();
OnModify(); OnModify();
DrawPanel->Refresh(); m_canvas->Refresh();
} }
@ -984,11 +984,11 @@ void LIB_EDIT_FRAME::OnCreateNewPartFromExisting( wxCommandEvent& event )
wxCHECK_RET( m_component != NULL, wxCHECK_RET( m_component != NULL,
wxT( "Cannot create new part from non-existent current part." ) ); wxT( "Cannot create new part from non-existent current part." ) );
INSTALL_UNBUFFERED_DC( dc, DrawPanel ); INSTALL_UNBUFFERED_DC( dc, m_canvas );
DrawPanel->CrossHairOff( &dc ); m_canvas->CrossHairOff( &dc );
EditField( &dc, &m_component->GetValueField() ); EditField( &dc, &m_component->GetValueField() );
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
DrawPanel->CrossHairOn( &dc ); m_canvas->CrossHairOn( &dc );
} }
void LIB_EDIT_FRAME::OnSelectTool( wxCommandEvent& aEvent ) void LIB_EDIT_FRAME::OnSelectTool( wxCommandEvent& aEvent )
@ -998,13 +998,13 @@ void LIB_EDIT_FRAME::OnSelectTool( wxCommandEvent& aEvent )
if( GetToolId() == ID_NO_TOOL_SELECTED ) if( GetToolId() == ID_NO_TOOL_SELECTED )
m_lastDrawItem = NULL; m_lastDrawItem = NULL;
DrawPanel->EndMouseCapture( ID_NO_TOOL_SELECTED, DrawPanel->GetDefaultCursor(), m_canvas->EndMouseCapture( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor(),
wxEmptyString ); wxEmptyString );
switch( id ) switch( id )
{ {
case ID_NO_TOOL_SELECTED: case ID_NO_TOOL_SELECTED:
SetToolID( id, DrawPanel->GetDefaultCursor(), wxEmptyString ); SetToolID( id, m_canvas->GetDefaultCursor(), wxEmptyString );
break; break;
case ID_LIBEDIT_PIN_BUTT: case ID_LIBEDIT_PIN_BUTT:
@ -1018,7 +1018,7 @@ void LIB_EDIT_FRAME::OnSelectTool( wxCommandEvent& aEvent )
wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED ); wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED );
cmd.SetId( ID_LIBEDIT_EDIT_PIN ); cmd.SetId( ID_LIBEDIT_EDIT_PIN );
GetEventHandler()->ProcessEvent( cmd ); GetEventHandler()->ProcessEvent( cmd );
SetToolID( ID_NO_TOOL_SELECTED, DrawPanel->GetDefaultCursor(), wxEmptyString ); SetToolID( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor(), wxEmptyString );
} }
break; break;
@ -1047,15 +1047,15 @@ void LIB_EDIT_FRAME::OnSelectTool( wxCommandEvent& aEvent )
break; break;
case ID_LIBEDIT_IMPORT_BODY_BUTT: case ID_LIBEDIT_IMPORT_BODY_BUTT:
SetToolID( id, DrawPanel->GetDefaultCursor(), _( "Import" ) ); SetToolID( id, m_canvas->GetDefaultCursor(), _( "Import" ) );
LoadOneSymbol(); LoadOneSymbol();
SetToolID( ID_NO_TOOL_SELECTED, DrawPanel->GetDefaultCursor(), wxEmptyString ); SetToolID( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor(), wxEmptyString );
break; break;
case ID_LIBEDIT_EXPORT_BODY_BUTT: case ID_LIBEDIT_EXPORT_BODY_BUTT:
SetToolID( id, DrawPanel->GetDefaultCursor(), _( "Export" ) ); SetToolID( id, m_canvas->GetDefaultCursor(), _( "Export" ) );
SaveOneSymbol(); SaveOneSymbol();
SetToolID( ID_NO_TOOL_SELECTED, DrawPanel->GetDefaultCursor(), wxEmptyString ); SetToolID( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor(), wxEmptyString );
break; break;
case ID_LIBEDIT_DELETE_ITEM_BUTT: case ID_LIBEDIT_DELETE_ITEM_BUTT:
@ -1072,7 +1072,7 @@ void LIB_EDIT_FRAME::OnSelectTool( wxCommandEvent& aEvent )
break; break;
} }
DrawPanel->m_IgnoreMouseEvents = false; m_canvas->m_IgnoreMouseEvents = false;
} }
@ -1093,7 +1093,7 @@ void LIB_EDIT_FRAME::OnRotateItem( wxCommandEvent& aEvent )
if( !m_drawItem->InEditMode() ) if( !m_drawItem->InEditMode() )
m_drawItem->ClearFlags(); m_drawItem->ClearFlags();
DrawPanel->Refresh(); m_canvas->Refresh();
if( GetToolId() == ID_NO_TOOL_SELECTED ) if( GetToolId() == ID_NO_TOOL_SELECTED )
m_lastDrawItem = NULL; m_lastDrawItem = NULL;
@ -1160,9 +1160,9 @@ LIB_ITEM* LIB_EDIT_FRAME::locateItem( const wxPoint& aPosition, const KICAD_T aF
// Set to NULL in case user aborts the clarification context menu. // Set to NULL in case user aborts the clarification context menu.
m_drawItem = NULL; m_drawItem = NULL;
DrawPanel->m_AbortRequest = true; // Changed to false if an item is selected m_canvas->m_AbortRequest = true; // Changed to false if an item is selected
PopupMenu( &selectMenu ); PopupMenu( &selectMenu );
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
item = m_drawItem; item = m_drawItem;
} }
} }
@ -1180,7 +1180,7 @@ void LIB_EDIT_FRAME::deleteItem( wxDC* aDC )
{ {
wxCHECK_RET( m_drawItem != NULL, wxT( "No drawing item selected to delete." ) ); wxCHECK_RET( m_drawItem != NULL, wxT( "No drawing item selected to delete." ) );
DrawPanel->CrossHairOff( aDC ); m_canvas->CrossHairOff( aDC );
SaveCopyInUndoList( m_component ); SaveCopyInUndoList( m_component );
if( m_drawItem->Type() == LIB_PIN_T ) if( m_drawItem->Type() == LIB_PIN_T )
@ -1188,7 +1188,7 @@ void LIB_EDIT_FRAME::deleteItem( wxDC* aDC )
LIB_PIN* pin = (LIB_PIN*) m_drawItem; LIB_PIN* pin = (LIB_PIN*) m_drawItem;
wxPoint pos = pin->GetPosition(); wxPoint pos = pin->GetPosition();
m_component->RemoveDrawItem( (LIB_ITEM*) pin, DrawPanel, aDC ); m_component->RemoveDrawItem( (LIB_ITEM*) pin, m_canvas, aDC );
if( SynchronizePins() ) if( SynchronizePins() )
{ {
@ -1206,25 +1206,25 @@ void LIB_EDIT_FRAME::deleteItem( wxDC* aDC )
} }
} }
DrawPanel->Refresh(); m_canvas->Refresh();
} }
else else
{ {
if( DrawPanel->IsMouseCaptured() ) if( m_canvas->IsMouseCaptured() )
{ {
DrawPanel->m_endMouseCaptureCallback( DrawPanel, aDC ); m_canvas->m_endMouseCaptureCallback( m_canvas, aDC );
} }
else else
{ {
m_component->RemoveDrawItem( m_drawItem, DrawPanel, aDC ); m_component->RemoveDrawItem( m_drawItem, m_canvas, aDC );
DrawPanel->Refresh(); m_canvas->Refresh();
} }
} }
m_drawItem = NULL; m_drawItem = NULL;
m_lastDrawItem = NULL; m_lastDrawItem = NULL;
OnModify(); OnModify();
DrawPanel->CrossHairOn( aDC ); m_canvas->CrossHairOn( aDC );
} }
@ -1237,7 +1237,7 @@ void LIB_EDIT_FRAME::OnSelectItem( wxCommandEvent& aEvent )
&& (index >= 0 && index < m_collectedItems.GetCount()) ) && (index >= 0 && index < m_collectedItems.GetCount()) )
{ {
LIB_ITEM* item = m_collectedItems[index]; LIB_ITEM* item = m_collectedItems[index];
DrawPanel->m_AbortRequest = false; m_canvas->m_AbortRequest = false;
m_drawItem = item; m_drawItem = item;
} }
} }

View File

@ -144,7 +144,7 @@ this component?" ),
if( !aField->InEditMode() ) if( !aField->InEditMode() )
{ {
SaveCopyInUndoList( parent ); SaveCopyInUndoList( parent );
( (LIB_ITEM*) aField )->Draw( DrawPanel, DC, wxPoint( 0, 0 ), -1, g_XorMode, ( (LIB_ITEM*) aField )->Draw( m_canvas, DC, wxPoint( 0, 0 ), -1, g_XorMode,
&fieldText, DefaultTransform ); &fieldText, DefaultTransform );
} }
@ -152,7 +152,7 @@ this component?" ),
if( !aField->InEditMode() ) if( !aField->InEditMode() )
{ {
fieldText = aField->GetFullText( m_unit ); fieldText = aField->GetFullText( m_unit );
( (LIB_ITEM*) aField )->Draw( DrawPanel, DC, wxPoint( 0, 0 ), -1, g_XorMode, ( (LIB_ITEM*) aField )->Draw( m_canvas, DC, wxPoint( 0, 0 ), -1, g_XorMode,
&fieldText, DefaultTransform ); &fieldText, DefaultTransform );
} }

View File

@ -57,7 +57,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
if( ( GetToolId() == ID_NO_TOOL_SELECTED ) || ( item && item->GetFlags() ) ) if( ( GetToolId() == ID_NO_TOOL_SELECTED ) || ( item && item->GetFlags() ) )
{ {
DrawPanel->m_AutoPAN_Request = false; m_canvas->m_AutoPAN_Request = false;
m_itemToRepeat = NULL; m_itemToRepeat = NULL;
if( item && item->GetFlags() ) if( item && item->GetFlags() )
@ -79,7 +79,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
item->Place( this, aDC ); item->Place( this, aDC );
GetScreen()->SetCurItem( NULL ); GetScreen()->SetCurItem( NULL );
GetScreen()->TestDanglingEnds(); GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( true ); m_canvas->Refresh( true );
return; return;
case SCH_LINE_T: // May already be drawing segment. case SCH_LINE_T: // May already be drawing segment.
@ -129,16 +129,16 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
{ {
m_itemToRepeat = AddNoConnect( aDC, gridPosition ); m_itemToRepeat = AddNoConnect( aDC, gridPosition );
GetScreen()->SetCurItem( m_itemToRepeat ); GetScreen()->SetCurItem( m_itemToRepeat );
DrawPanel->m_AutoPAN_Request = true; m_canvas->m_AutoPAN_Request = true;
} }
else else
{ {
item->Place( this, aDC ); item->Place( this, aDC );
DrawPanel->m_AutoPAN_Request = false; m_canvas->m_AutoPAN_Request = false;
} }
GetScreen()->TestDanglingEnds(); GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( true ); m_canvas->Refresh( true );
break; break;
case ID_JUNCTION_BUTT: case ID_JUNCTION_BUTT:
@ -146,16 +146,16 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
{ {
m_itemToRepeat = AddJunction( aDC, gridPosition, true ); m_itemToRepeat = AddJunction( aDC, gridPosition, true );
GetScreen()->SetCurItem( m_itemToRepeat ); GetScreen()->SetCurItem( m_itemToRepeat );
DrawPanel->m_AutoPAN_Request = true; m_canvas->m_AutoPAN_Request = true;
} }
else else
{ {
item->Place( this, aDC ); item->Place( this, aDC );
DrawPanel->m_AutoPAN_Request = false; m_canvas->m_AutoPAN_Request = false;
} }
GetScreen()->TestDanglingEnds(); GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( true ); m_canvas->Refresh( true );
break; break;
case ID_WIRETOBUS_ENTRY_BUTT: case ID_WIRETOBUS_ENTRY_BUTT:
@ -165,15 +165,15 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
item = CreateBusEntry( aDC, ( GetToolId() == ID_WIRETOBUS_ENTRY_BUTT ) ? item = CreateBusEntry( aDC, ( GetToolId() == ID_WIRETOBUS_ENTRY_BUTT ) ?
WIRE_TO_BUS : BUS_TO_BUS ); WIRE_TO_BUS : BUS_TO_BUS );
GetScreen()->SetCurItem( item ); GetScreen()->SetCurItem( item );
DrawPanel->m_AutoPAN_Request = true; m_canvas->m_AutoPAN_Request = true;
} }
else else
{ {
item->Place( this, aDC ); item->Place( this, aDC );
GetScreen()->SetCurItem( NULL ); GetScreen()->SetCurItem( NULL );
GetScreen()->TestDanglingEnds(); GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( true ); m_canvas->Refresh( true );
DrawPanel->m_AutoPAN_Request = false; m_canvas->m_AutoPAN_Request = false;
} }
break; break;
@ -183,29 +183,29 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
case ID_WIRE_BUTT: case ID_WIRE_BUTT:
BeginSegment( aDC, LAYER_WIRE ); BeginSegment( aDC, LAYER_WIRE );
DrawPanel->m_AutoPAN_Request = true; m_canvas->m_AutoPAN_Request = true;
break; break;
case ID_BUS_BUTT: case ID_BUS_BUTT:
BeginSegment( aDC, LAYER_BUS ); BeginSegment( aDC, LAYER_BUS );
DrawPanel->m_AutoPAN_Request = true; m_canvas->m_AutoPAN_Request = true;
break; break;
case ID_LINE_COMMENT_BUTT: case ID_LINE_COMMENT_BUTT:
BeginSegment( aDC, LAYER_NOTES ); BeginSegment( aDC, LAYER_NOTES );
DrawPanel->m_AutoPAN_Request = true; m_canvas->m_AutoPAN_Request = true;
break; break;
case ID_TEXT_COMMENT_BUTT: case ID_TEXT_COMMENT_BUTT:
if( ( item == NULL ) || ( item->GetFlags() == 0 ) ) if( ( item == NULL ) || ( item->GetFlags() == 0 ) )
{ {
GetScreen()->SetCurItem( CreateNewText( aDC, LAYER_NOTES ) ); GetScreen()->SetCurItem( CreateNewText( aDC, LAYER_NOTES ) );
DrawPanel->m_AutoPAN_Request = true; m_canvas->m_AutoPAN_Request = true;
} }
else else
{ {
item->Place( this, aDC ); item->Place( this, aDC );
DrawPanel->m_AutoPAN_Request = false; m_canvas->m_AutoPAN_Request = false;
} }
break; break;
@ -213,12 +213,12 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
if( ( item == NULL ) || ( item->GetFlags() == 0 ) ) if( ( item == NULL ) || ( item->GetFlags() == 0 ) )
{ {
GetScreen()->SetCurItem( CreateNewImage( aDC ) ); GetScreen()->SetCurItem( CreateNewImage( aDC ) );
DrawPanel->m_AutoPAN_Request = true; m_canvas->m_AutoPAN_Request = true;
} }
else else
{ {
item->Place( this, aDC ); item->Place( this, aDC );
DrawPanel->m_AutoPAN_Request = false; m_canvas->m_AutoPAN_Request = false;
} }
break; break;
@ -226,14 +226,14 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
if( ( item == NULL ) || ( item->GetFlags() == 0 ) ) if( ( item == NULL ) || ( item->GetFlags() == 0 ) )
{ {
GetScreen()->SetCurItem( CreateNewText( aDC, LAYER_LOCLABEL ) ); GetScreen()->SetCurItem( CreateNewText( aDC, LAYER_LOCLABEL ) );
DrawPanel->m_AutoPAN_Request = true; m_canvas->m_AutoPAN_Request = true;
} }
else else
{ {
item->Place( this, aDC ); item->Place( this, aDC );
DrawPanel->m_AutoPAN_Request = false; m_canvas->m_AutoPAN_Request = false;
GetScreen()->TestDanglingEnds(); GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( true ); m_canvas->Refresh( true );
} }
break; break;
@ -247,14 +247,14 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
if( GetToolId() == ID_HIERLABEL_BUTT ) if( GetToolId() == ID_HIERLABEL_BUTT )
GetScreen()->SetCurItem( CreateNewText( aDC, LAYER_HIERLABEL ) ); GetScreen()->SetCurItem( CreateNewText( aDC, LAYER_HIERLABEL ) );
DrawPanel->m_AutoPAN_Request = true; m_canvas->m_AutoPAN_Request = true;
} }
else else
{ {
item->Place( this, aDC ); item->Place( this, aDC );
DrawPanel->m_AutoPAN_Request = false; m_canvas->m_AutoPAN_Request = false;
GetScreen()->TestDanglingEnds(); GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( true ); m_canvas->Refresh( true );
} }
break; break;
@ -262,14 +262,14 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
if( ( item == NULL ) || ( item->GetFlags() == 0 ) ) if( ( item == NULL ) || ( item->GetFlags() == 0 ) )
{ {
GetScreen()->SetCurItem( CreateSheet( aDC ) ); GetScreen()->SetCurItem( CreateSheet( aDC ) );
DrawPanel->m_AutoPAN_Request = true; m_canvas->m_AutoPAN_Request = true;
} }
else else
{ {
item->Place( this, aDC ); item->Place( this, aDC );
DrawPanel->m_AutoPAN_Request = false; m_canvas->m_AutoPAN_Request = false;
GetScreen()->TestDanglingEnds(); GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( true ); m_canvas->Refresh( true );
} }
break; break;
@ -292,7 +292,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
{ {
item->Place( this, aDC ); item->Place( this, aDC );
GetScreen()->TestDanglingEnds(); GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( true ); m_canvas->Refresh( true );
} }
break; break;
@ -300,14 +300,14 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
if( (item == NULL) || (item->GetFlags() == 0) ) if( (item == NULL) || (item->GetFlags() == 0) )
{ {
GetScreen()->SetCurItem( Load_Component( aDC, wxEmptyString, s_CmpNameList, true ) ); GetScreen()->SetCurItem( Load_Component( aDC, wxEmptyString, s_CmpNameList, true ) );
DrawPanel->m_AutoPAN_Request = true; m_canvas->m_AutoPAN_Request = true;
} }
else else
{ {
item->Place( this, aDC ); item->Place( this, aDC );
DrawPanel->m_AutoPAN_Request = false; m_canvas->m_AutoPAN_Request = false;
GetScreen()->TestDanglingEnds(); GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( true ); m_canvas->Refresh( true );
} }
break; break;
@ -316,19 +316,19 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
{ {
GetScreen()->SetCurItem( Load_Component( aDC, wxT( "power" ), GetScreen()->SetCurItem( Load_Component( aDC, wxT( "power" ),
s_PowerNameList, false ) ); s_PowerNameList, false ) );
DrawPanel->m_AutoPAN_Request = true; m_canvas->m_AutoPAN_Request = true;
} }
else else
{ {
item->Place( this, aDC ); item->Place( this, aDC );
DrawPanel->m_AutoPAN_Request = false; m_canvas->m_AutoPAN_Request = false;
GetScreen()->TestDanglingEnds(); GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( true ); m_canvas->Refresh( true );
} }
break; break;
default: default:
SetToolID( ID_NO_TOOL_SELECTED, DrawPanel->GetDefaultCursor(), wxEmptyString ); SetToolID( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor(), wxEmptyString );
wxFAIL_MSG( wxT( "SCH_EDIT_FRAME::OnLeftClick invalid tool ID <" ) + wxFAIL_MSG( wxT( "SCH_EDIT_FRAME::OnLeftClick invalid tool ID <" ) +
wxString::Format( wxT( "%d> selected." ), GetToolId() ) ); wxString::Format( wxT( "%d> selected." ), GetToolId() ) );
} }
@ -368,7 +368,7 @@ void SCH_EDIT_FRAME::OnLeftDClick( wxDC* aDC, const wxPoint& aPosition )
case SCH_COMPONENT_T: case SCH_COMPONENT_T:
EditComponent( (SCH_COMPONENT*) item ); EditComponent( (SCH_COMPONENT*) item );
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
break; break;
case SCH_TEXT_T: case SCH_TEXT_T:
@ -384,7 +384,7 @@ void SCH_EDIT_FRAME::OnLeftDClick( wxDC* aDC, const wxPoint& aPosition )
case SCH_FIELD_T: case SCH_FIELD_T:
EditComponentFieldText( (SCH_FIELD*) item, aDC ); EditComponentFieldText( (SCH_FIELD*) item, aDC );
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
break; break;
case SCH_MARKER_T: case SCH_MARKER_T:

View File

@ -62,6 +62,7 @@ static void AddMenusForComponent( wxMenu* PopMenu, SCH_COMPONENT* Component );
static void AddMenusForComponentField( wxMenu* PopMenu, SCH_FIELD* Field ); static void AddMenusForComponentField( wxMenu* PopMenu, SCH_FIELD* Field );
static void AddMenusForMarkers( wxMenu* aPopMenu, SCH_MARKER* aMarker, SCH_EDIT_FRAME* aFrame ); static void AddMenusForMarkers( wxMenu* aPopMenu, SCH_MARKER* aMarker, SCH_EDIT_FRAME* aFrame );
static void AddMenusForBitmap( wxMenu* aPopMenu, SCH_BITMAP * aBitmap ); static void AddMenusForBitmap( wxMenu* aPopMenu, SCH_BITMAP * aBitmap );
static void AddMenusForBusEntry( wxMenu* aPopMenu, SCH_BUS_ENTRY * aBusEntry );
@ -75,7 +76,7 @@ bool SCH_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
bool BlockActive = GetScreen()->IsBlockActive(); bool BlockActive = GetScreen()->IsBlockActive();
// Do not start a block command on context menu. // Do not start a block command on context menu.
DrawPanel->m_CanStartBlock = -1; m_canvas->m_CanStartBlock = -1;
if( BlockActive ) if( BlockActive )
{ {
@ -90,9 +91,9 @@ bool SCH_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
item = LocateAndShowItem( aPosition, SCH_COLLECTOR::AllItemsButPins ); item = LocateAndShowItem( aPosition, SCH_COLLECTOR::AllItemsButPins );
// If the clarify item selection context menu is aborted, don't show the context menu. // If the clarify item selection context menu is aborted, don't show the context menu.
if( item == NULL && DrawPanel->m_AbortRequest ) if( item == NULL && m_canvas->m_AbortRequest )
{ {
DrawPanel->m_AbortRequest = false; m_canvas->m_AbortRequest = false;
return false; return false;
} }
} }
@ -149,20 +150,7 @@ bool SCH_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
break; break;
case SCH_BUS_ENTRY_T: case SCH_BUS_ENTRY_T:
if( !flags ) AddMenusForBusEntry( PopMenu, (SCH_BUS_ENTRY*) item );
{
wxString msg = AddHotkeyName( _( "Move Bus Entry" ), s_Schematic_Hokeys_Descr,
HK_MOVE_COMPONENT_OR_ITEM );
AddMenuItem( PopMenu, ID_SCH_MOVE_ITEM, msg, KiBitmap( move_xpm ) );
}
if( GetBusEntryShape( (SCH_BUS_ENTRY*) item ) == '\\' )
PopMenu->Append( ID_POPUP_SCH_ENTRY_SELECT_SLASH, _( "Set Bus Entry /" ) );
else
PopMenu->Append( ID_POPUP_SCH_ENTRY_SELECT_ANTISLASH, _( "Set Bus Entry \\" ) );
AddMenuItem( PopMenu, ID_POPUP_SCH_DELETE, _( "Delete Bus Entry" ),
KiBitmap( delete_bus_xpm ) );
break; break;
case SCH_MARKER_T: case SCH_MARKER_T:
@ -746,3 +734,24 @@ void AddMenusForBitmap( wxMenu* aPopMenu, SCH_BITMAP * aBitmap )
AddMenuItem( aPopMenu, ID_POPUP_SCH_DELETE, msg, KiBitmap( delete_xpm ) ); AddMenuItem( aPopMenu, ID_POPUP_SCH_DELETE, msg, KiBitmap( delete_xpm ) );
} }
} }
void AddMenusForBusEntry( wxMenu* aPopMenu, SCH_BUS_ENTRY * aBusEntry )
{
wxString msg;
if( !aBusEntry->GetFlags() )
{
msg = AddHotkeyName( _( "Move Bus Entry" ), s_Schematic_Hokeys_Descr,
HK_MOVE_COMPONENT_OR_ITEM );
AddMenuItem( aPopMenu, ID_SCH_MOVE_ITEM, msg, KiBitmap( move_xpm ) );
}
if( aBusEntry->GetBusEntryShape() == '\\' )
AddMenuItem( aPopMenu, ID_POPUP_SCH_ENTRY_SELECT_SLASH,
_( "Set Bus Entry Shape /" ), KiBitmap( change_entry_orient_xpm ) );
else
AddMenuItem( aPopMenu, ID_POPUP_SCH_ENTRY_SELECT_ANTISLASH,
_( "Set Bus Entry Shape \\" ), KiBitmap( change_entry_orient_xpm ) );
msg = AddHotkeyName( _( "Delete Bus Entry" ), s_Schematic_Hokeys_Descr, HK_DELETE );
AddMenuItem( aPopMenu, ID_POPUP_SCH_DELETE, msg, KiBitmap( delete_xpm ) );
}

View File

@ -142,6 +142,7 @@ void DeleteItemsInList( EDA_DRAW_PANEL* panel, PICKED_ITEMS_LIST& aItemsList )
void SCH_EDIT_FRAME::DeleteItem( SCH_ITEM* aItem ) void SCH_EDIT_FRAME::DeleteItem( SCH_ITEM* aItem )
{ {
wxCHECK_RET( aItem != NULL, wxT( "Cannot delete invalid item." ) ); wxCHECK_RET( aItem != NULL, wxT( "Cannot delete invalid item." ) );
if( aItem == NULL ) if( aItem == NULL )
return; return;
@ -155,7 +156,7 @@ void SCH_EDIT_FRAME::DeleteItem( SCH_ITEM* aItem )
wxT( "Sheet label has invalid parent item." ) ); wxT( "Sheet label has invalid parent item." ) );
SaveCopyInUndoList( (SCH_ITEM*) sheet, UR_CHANGED ); SaveCopyInUndoList( (SCH_ITEM*) sheet, UR_CHANGED );
sheet->RemovePin( (SCH_SHEET_PIN*) aItem ); sheet->RemovePin( (SCH_SHEET_PIN*) aItem );
DrawPanel->RefreshDrawingRect( sheet->GetBoundingBox() ); m_canvas->RefreshDrawingRect( sheet->GetBoundingBox() );
} }
else else
{ {
@ -165,7 +166,7 @@ void SCH_EDIT_FRAME::DeleteItem( SCH_ITEM* aItem )
aItem->SetBack( NULL ); // Only one struct -> no link aItem->SetBack( NULL ); // Only one struct -> no link
SaveCopyInUndoList( aItem, UR_DELETED ); SaveCopyInUndoList( aItem, UR_DELETED );
DrawPanel->RefreshDrawingRect( aItem->GetBoundingBox() ); m_canvas->RefreshDrawingRect( aItem->GetBoundingBox() );
} }
} }
@ -248,7 +249,7 @@ SCH_ITEM* DuplicateStruct( SCH_ITEM* aDrawStruct, bool aClone )
if( aClone ) if( aClone )
NewDrawStruct->SetTimeStamp( aDrawStruct->GetTimeStamp() ); NewDrawStruct->SetTimeStamp( aDrawStruct->GetTimeStamp() );
NewDrawStruct->m_Image = aDrawStruct; NewDrawStruct->SetImage( aDrawStruct );
return NewDrawStruct; return NewDrawStruct;
} }

View File

@ -70,7 +70,7 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event )
if( m_drawItem == NULL || m_drawItem->Type() != LIB_PIN_T ) if( m_drawItem == NULL || m_drawItem->Type() != LIB_PIN_T )
return; return;
int item_flags = m_drawItem->m_Flags; // save flags to restore them after editing int item_flags = m_drawItem->GetFlags(); // save flags to restore them after editing
LIB_PIN* pin = (LIB_PIN*) m_drawItem; LIB_PIN* pin = (LIB_PIN*) m_drawItem;
DIALOG_LIB_EDIT_PIN dlg( this, pin ); DIALOG_LIB_EDIT_PIN dlg( this, pin );
@ -115,8 +115,8 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event )
{ {
if( pin->IsNew() ) if( pin->IsNew() )
{ {
pin->m_Flags |= IS_CANCELLED; pin->SetFlags( IS_CANCELLED );
DrawPanel->EndMouseCapture(); m_canvas->EndMouseCapture();
} }
return; return;
} }
@ -152,13 +152,14 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event )
OnModify( ); OnModify( );
pin->DisplayInfo( this ); pin->DisplayInfo( this );
DrawPanel->Refresh(); m_canvas->Refresh();
} }
pin->EnableEditMode( false, m_editPinsPerPartOrConvert ); pin->EnableEditMode( false, m_editPinsPerPartOrConvert );
// Restore pin flags, that can be changed by the dialog editor // Restore pin flags, that can be changed by the dialog editor
pin->m_Flags = item_flags; pin->ClearFlags();
pin->SetFlags( item_flags );
} }
@ -214,17 +215,17 @@ void LIB_EDIT_FRAME::PlacePin( wxDC* DC )
// Test for an other pin in same new position: // Test for an other pin in same new position:
for( Pin = m_component->GetNextPin(); Pin != NULL; Pin = m_component->GetNextPin( Pin ) ) for( Pin = m_component->GetNextPin(); Pin != NULL; Pin = m_component->GetNextPin( Pin ) )
{ {
if( Pin == CurrentPin || newpos != Pin->GetPosition() || Pin->m_Flags ) if( Pin == CurrentPin || newpos != Pin->GetPosition() || Pin->GetFlags() )
continue; continue;
if( ask_for_pin && SynchronizePins() ) if( ask_for_pin && SynchronizePins() )
{ {
DrawPanel->m_IgnoreMouseEvents = true; m_canvas->m_IgnoreMouseEvents = true;
status = status =
IsOK( this, _( "This position is already occupied by \ IsOK( this, _( "This position is already occupied by \
another pin. Continue?" ) ); another pin. Continue?" ) );
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
DrawPanel->m_IgnoreMouseEvents = false; m_canvas->m_IgnoreMouseEvents = false;
if( !status ) if( !status )
return; return;
@ -240,7 +241,7 @@ another pin. Continue?" ) );
else else
SaveCopyInUndoList( m_component ); SaveCopyInUndoList( m_component );
DrawPanel->SetMouseCapture( NULL, NULL ); m_canvas->SetMouseCapture( NULL, NULL );
OnModify(); OnModify();
CurrentPin->SetPosition( newpos ); CurrentPin->SetPosition( newpos );
@ -260,18 +261,18 @@ another pin. Continue?" ) );
/* Put linked pins in new position, and clear flags */ /* Put linked pins in new position, and clear flags */
for( Pin = m_component->GetNextPin(); Pin != NULL; Pin = m_component->GetNextPin( Pin ) ) for( Pin = m_component->GetNextPin(); Pin != NULL; Pin = m_component->GetNextPin( Pin ) )
{ {
if( Pin->m_Flags == 0 ) if( Pin->GetFlags() == 0 )
continue; continue;
Pin->SetPosition( CurrentPin->GetPosition() ); Pin->SetPosition( CurrentPin->GetPosition() );
Pin->m_Flags = 0; Pin->ClearFlags();
} }
DrawPanel->CrossHairOff( DC ); m_canvas->CrossHairOff( DC );
bool showPinText = true; bool showPinText = true;
CurrentPin->Draw( DrawPanel, DC, wxPoint( 0, 0 ), -1, GR_DEFAULT_DRAWMODE, CurrentPin->Draw( m_canvas, DC, wxPoint( 0, 0 ), -1, GR_DEFAULT_DRAWMODE,
&showPinText, DefaultTransform ); &showPinText, DefaultTransform );
DrawPanel->CrossHairOn( DC ); m_canvas->CrossHairOn( DC );
m_drawItem = NULL; m_drawItem = NULL;
} }
@ -296,7 +297,7 @@ void LIB_EDIT_FRAME::StartMovePin( wxDC* DC )
for( ; Pin != NULL; Pin = m_component->GetNextPin( Pin ) ) for( ; Pin != NULL; Pin = m_component->GetNextPin( Pin ) )
{ {
Pin->m_Flags = 0; Pin->ClearFlags();
if( Pin == CurrentPin ) if( Pin == CurrentPin )
continue; continue;
@ -304,21 +305,21 @@ void LIB_EDIT_FRAME::StartMovePin( wxDC* DC )
if( ( Pin->GetPosition() == CurrentPin->GetPosition() ) if( ( Pin->GetPosition() == CurrentPin->GetPosition() )
&& ( Pin->GetOrientation() == CurrentPin->GetOrientation() ) && ( Pin->GetOrientation() == CurrentPin->GetOrientation() )
&& SynchronizePins() ) && SynchronizePins() )
Pin->m_Flags |= IS_LINKED | IS_MOVED; Pin->SetFlags( IS_LINKED | IS_MOVED );
} }
CurrentPin->m_Flags |= IS_LINKED | IS_MOVED; CurrentPin->SetFlags( IS_LINKED | IS_MOVED );
PinPreviousPos = OldPos = CurrentPin->GetPosition(); PinPreviousPos = OldPos = CurrentPin->GetPosition();
startPos.x = OldPos.x; startPos.x = OldPos.x;
startPos.y = -OldPos.y; startPos.y = -OldPos.y;
DrawPanel->CrossHairOff( DC ); m_canvas->CrossHairOff( DC );
GetScreen()->SetCrossHairPosition( startPos ); GetScreen()->SetCrossHairPosition( startPos );
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
CurrentPin->DisplayInfo( this ); CurrentPin->DisplayInfo( this );
DrawPanel->SetMouseCapture( DrawMovePin, AbortPinMove ); m_canvas->SetMouseCapture( DrawMovePin, AbortPinMove );
DrawPanel->CrossHairOn( DC ); m_canvas->CrossHairOn( DC );
} }
@ -378,13 +379,13 @@ void LIB_EDIT_FRAME::CreatePin( wxDC* DC )
m_drawItem = pin; m_drawItem = pin;
pin->m_Flags = IS_NEW; pin->SetFlags( IS_NEW );
pin->SetUnit( m_unit ); pin->SetUnit( m_unit );
pin->SetConvert( m_convert ); pin->SetConvert( m_convert );
/* Flag pins to consider */ /* Flag pins to consider */
if( SynchronizePins() ) if( SynchronizePins() )
pin->m_Flags |= IS_LINKED; pin->SetFlags( IS_LINKED );
pin->SetPosition( GetScreen()->GetCrossHairPosition( true ) ); pin->SetPosition( GetScreen()->GetCrossHairPosition( true ) );
pin->SetLength( LastPinLength ); pin->SetLength( LastPinLength );
@ -397,24 +398,24 @@ void LIB_EDIT_FRAME::CreatePin( wxDC* DC )
pin->SetUnit( LastPinCommonUnit ? 0 : m_unit ); pin->SetUnit( LastPinCommonUnit ? 0 : m_unit );
pin->SetVisible( LastPinVisible ); pin->SetVisible( LastPinVisible );
PinPreviousPos = pin->GetPosition(); PinPreviousPos = pin->GetPosition();
DrawPanel->m_IgnoreMouseEvents = true; m_canvas->m_IgnoreMouseEvents = true;
wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED ); wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED );
cmd.SetId( ID_LIBEDIT_EDIT_PIN ); cmd.SetId( ID_LIBEDIT_EDIT_PIN );
GetEventHandler()->ProcessEvent( cmd ); GetEventHandler()->ProcessEvent( cmd );
DrawPanel->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
DrawPanel->m_IgnoreMouseEvents = false; m_canvas->m_IgnoreMouseEvents = false;
if( pin->m_Flags & IS_CANCELLED ) if( pin->GetFlags() & IS_CANCELLED )
{ {
deleteItem( DC ); deleteItem( DC );
} }
else else
{ {
ClearTempCopyComponent(); ClearTempCopyComponent();
DrawPanel->SetMouseCapture( DrawMovePin, AbortPinMove ); m_canvas->SetMouseCapture( DrawMovePin, AbortPinMove );
if( DC ) if( DC )
pin->Draw( DrawPanel, DC, wxPoint( 0, 0 ), -1, wxCOPY, &showPinText, pin->Draw( m_canvas, DC, wxPoint( 0, 0 ), -1, wxCOPY, &showPinText,
DefaultTransform ); DefaultTransform );
} }
@ -480,7 +481,7 @@ void LIB_EDIT_FRAME::GlobalSetPins( wxDC* DC, LIB_PIN* MasterPin, int id )
{ {
LIB_PIN* Pin; LIB_PIN* Pin;
bool selected = ( MasterPin->m_Selected & IS_SELECTED ) != 0; bool selected = MasterPin->IsSelected();
bool showPinText = true; bool showPinText = true;
if( ( m_component == NULL ) || ( MasterPin == NULL ) ) if( ( m_component == NULL ) || ( MasterPin == NULL ) )
@ -499,10 +500,10 @@ void LIB_EDIT_FRAME::GlobalSetPins( wxDC* DC, LIB_PIN* MasterPin, int id )
continue; continue;
// Is it the "selected mode" ? // Is it the "selected mode" ?
if( selected && ( Pin->m_Selected & IS_SELECTED ) == 0 ) if( selected && !Pin->IsSelected() )
continue; continue;
Pin->Draw( DrawPanel, DC, wxPoint( 0, 0 ), -1, g_XorMode, &showPinText, DefaultTransform ); Pin->Draw( m_canvas, DC, wxPoint( 0, 0 ), -1, g_XorMode, &showPinText, DefaultTransform );
switch( id ) switch( id )
{ {
@ -519,7 +520,7 @@ void LIB_EDIT_FRAME::GlobalSetPins( wxDC* DC, LIB_PIN* MasterPin, int id )
break; break;
} }
Pin->Draw( DrawPanel, DC, wxPoint( 0, 0 ), -1, GR_DEFAULT_DRAWMODE, &showPinText, Pin->Draw( m_canvas, DC, wxPoint( 0, 0 ), -1, GR_DEFAULT_DRAWMODE, &showPinText,
DefaultTransform ); DefaultTransform );
} }
} }
@ -535,7 +536,8 @@ void LIB_EDIT_FRAME::RepeatPinItem( wxDC* DC, LIB_PIN* SourcePin )
return; return;
Pin = (LIB_PIN*) SourcePin->Clone(); Pin = (LIB_PIN*) SourcePin->Clone();
Pin->m_Flags = IS_NEW; Pin->ClearFlags();
Pin->SetFlags( IS_NEW );
Pin->SetPosition( Pin->GetPosition() + wxPoint( g_RepeatStep.x, -g_RepeatStep.y ) ); Pin->SetPosition( Pin->GetPosition() + wxPoint( g_RepeatStep.x, -g_RepeatStep.y ) );
wxString nextName = Pin->GetName(); wxString nextName = Pin->GetName();
IncrementLabelMember( nextName ); IncrementLabelMember( nextName );
@ -548,10 +550,10 @@ void LIB_EDIT_FRAME::RepeatPinItem( wxDC* DC, LIB_PIN* SourcePin )
m_drawItem = Pin; m_drawItem = Pin;
if( SynchronizePins() ) if( SynchronizePins() )
Pin->m_Flags |= IS_LINKED; Pin->SetFlags( IS_LINKED );
wxPoint savepos = GetScreen()->GetCrossHairPosition(); wxPoint savepos = GetScreen()->GetCrossHairPosition();
DrawPanel->CrossHairOff( DC ); m_canvas->CrossHairOff( DC );
GetScreen()->SetCrossHairPosition( wxPoint( Pin->GetPosition().x, -Pin->GetPosition().y ) ); GetScreen()->SetCrossHairPosition( wxPoint( Pin->GetPosition().x, -Pin->GetPosition().y ) );
// Add this new pin in list, and creates pins for others parts if needed // Add this new pin in list, and creates pins for others parts if needed
@ -561,7 +563,7 @@ void LIB_EDIT_FRAME::RepeatPinItem( wxDC* DC, LIB_PIN* SourcePin )
m_lastDrawItem = Pin; m_lastDrawItem = Pin;
GetScreen()->SetCrossHairPosition( savepos ); GetScreen()->SetCrossHairPosition( savepos );
DrawPanel->CrossHairOn( DC ); m_canvas->CrossHairOn( DC );
Pin->DisplayInfo( this ); Pin->DisplayInfo( this );
OnModify( ); OnModify( );

View File

@ -296,3 +296,37 @@ void SCH_BUS_ENTRY::doPlot( PLOTTER* aPlotter )
aPlotter->move_to( m_pos ); aPlotter->move_to( m_pos );
aPlotter->finish_to( m_End() ); aPlotter->finish_to( m_End() );
} }
/* SetBusEntryShape:
* Set the shape of the bus entry.
* aShape = ascii code '/' or '\'
*/
void SCH_BUS_ENTRY::SetBusEntryShape( int aShape )
{
switch( aShape )
{
case '\\':
if( m_size.y < 0 )
m_size.y = -m_size.y;
break;
case '/':
if( m_size.y > 0 )
m_size.y = -m_size.y;
break;
}
}
/* GetBusEntryShape:
* return the shape of the bus entry, as an ascii code '/' or '\'
*/
int SCH_BUS_ENTRY::GetBusEntryShape() const
{
int shape = '\\';
if( GetSize().y < 0 )
shape = '/';
return shape;
}

View File

@ -64,6 +64,18 @@ public:
wxPoint m_End() const; wxPoint m_End() const;
/**
* function GetBusEntryShape
* @return the shape of the bus entry, as an ascii code '/' or '\'
*/
int GetBusEntryShape() const;
/**
* function SetBusEntryShape
* @param aShape = the shape of the bus entry, as an ascii code '/' or '\'
*/
void SetBusEntryShape( int aShape );
int GetWidth() const { return m_width; } int GetWidth() const { return m_width; }
void SetWidth( int aWidth ) { m_width = aWidth; } void SetWidth( int aWidth ) { m_width = aWidth; }

View File

@ -408,20 +408,22 @@ wxString SCH_FIND_COLLECTOR::GetText()
SCH_FIND_COLLECTOR_DATA data = m_data[ m_foundIndex ]; SCH_FIND_COLLECTOR_DATA data = m_data[ m_foundIndex ];
EDA_ITEM* foundItem = m_List[ m_foundIndex ]; EDA_ITEM* foundItem = m_List[ m_foundIndex ];
wxCHECK_MSG( foundItem != NULL, wxEmptyString, wxT( "Inavalid found item pointer." ) ); wxCHECK_MSG( foundItem != NULL, wxEmptyString, wxT( "Invalid found item pointer." ) );
wxString msg; wxString msg;
if( data.GetParent() ) if( data.GetParent() )
{ {
msg = _( "Child item " ) + foundItem->GetSelectMenuText() + msg.Printf( _( "Child item %s of parent item %s found in sheet %s" ),
_( " of parent item " ) + data.GetParent()->GetSelectMenuText() + GetChars( foundItem->GetSelectMenuText() ),
_( " found in sheet " ) + data.GetSheetPath(); GetChars( data.GetParent()->GetSelectMenuText() ),
GetChars( data.GetSheetPath() ) );
} }
else else
{ {
msg = _( "Item " ) + foundItem->GetSelectMenuText() + _( " found in sheet " ) + msg.Printf( _( "Item %s found in sheet %s" ),
data.GetSheetPath(); GetChars( foundItem->GetSelectMenuText() ),
GetChars( data.GetSheetPath() ) );
} }
return msg; return msg;
@ -494,13 +496,14 @@ SEARCH_RESULT SCH_FIND_COLLECTOR::Inspect( EDA_ITEM* aItem, const void* aTestDat
void SCH_FIND_COLLECTOR::Collect( SCH_FIND_REPLACE_DATA& aFindReplaceData, void SCH_FIND_COLLECTOR::Collect( SCH_FIND_REPLACE_DATA& aFindReplaceData,
SCH_SHEET_PATH* aSheetPath ) SCH_SHEET_PATH* aSheetPath )
{ {
if( !m_findReplaceData.ChangesSearch( aFindReplaceData ) ) if( !m_findReplaceData.ChangesSearch( aFindReplaceData ) && !m_List.empty() && !m_forceSearch )
return; return;
m_findReplaceData = aFindReplaceData; m_findReplaceData = aFindReplaceData;
Empty(); // empty the collection just in case Empty(); // empty the collection just in case
m_data.clear(); m_data.clear();
m_foundIndex = 0; m_foundIndex = 0;
m_forceSearch = false;
if( aSheetPath ) if( aSheetPath )
{ {

View File

@ -221,6 +221,10 @@ class SCH_FIND_COLLECTOR : public COLLECTOR
/// The current found item list index. /// The current found item list index.
int m_foundIndex; int m_foundIndex;
/// A flag to indicate that the schemtic has been modified and a new search must be
/// performed even if the search criteria hasn't changed.
bool m_forceSearch;
/** /**
* Function atEnd * Function atEnd
* tests if #m_foundIndex is at the end of the list give the current find/replace * tests if #m_foundIndex is at the end of the list give the current find/replace
@ -247,8 +251,11 @@ public:
{ {
SetScanTypes( aScanTypes ); SetScanTypes( aScanTypes );
m_foundIndex = 0; m_foundIndex = 0;
m_forceSearch = false;
} }
void SetForceSearch() { m_forceSearch = true; }
/** /**
* Function UpdateIndex * Function UpdateIndex
* updates the list index according to the current find and replace criteria. * updates the list index according to the current find and replace criteria.
@ -266,12 +273,19 @@ public:
SCH_FIND_COLLECTOR_DATA GetFindData( int aIndex ); SCH_FIND_COLLECTOR_DATA GetFindData( int aIndex );
/** /**
* Function GetFindReplaceData * Function IsSearchRequired
* checks the current collector state agaianst \a aFindReplaceData to see if a new search
* needs to be performed to update the collector.
* *
* @return A reference to a #SCH_FIND_REPLACE_DATA object containing the current * @param aFindReplaceData A #SCH_FIND_REPLACE_DATA object containing the search criteria
* search criteria. * to test for changes against the current search criteria.
* @return True if \a aFindReplaceData would require a new search to be performaed or
* the force search flag is true. Otherwise, false is returned.
*/ */
SCH_FIND_REPLACE_DATA& GetFindReplaceData() { return m_findReplaceData; } bool IsSearchRequired( SCH_FIND_REPLACE_DATA& aFindReplaceData )
{
return m_findReplaceData.ChangesSearch( aFindReplaceData ) || m_forceSearch;
}
/** /**
* Function GetText() * Function GetText()

View File

@ -313,7 +313,7 @@ void SCH_COMPONENT::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& offset
SCH_FIELD* field = GetField( REFERENCE ); SCH_FIELD* field = GetField( REFERENCE );
if( field->IsVisible() && !( field->m_Flags & IS_MOVED ) ) if( field->IsVisible() && !field->IsMoving() )
{ {
field->Draw( panel, DC, offset, DrawMode ); field->Draw( panel, DC, offset, DrawMode );
} }
@ -322,7 +322,7 @@ void SCH_COMPONENT::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& offset
{ {
field = GetField( ii ); field = GetField( ii );
if( field->m_Flags & IS_MOVED ) if( field->IsMoving() )
continue; continue;
field->Draw( panel, DC, offset, DrawMode ); field->Draw( panel, DC, offset, DrawMode );

View File

@ -345,14 +345,14 @@ bool SCH_FIELD::Save( FILE* aFile ) const
void SCH_FIELD::Place( SCH_EDIT_FRAME* frame, wxDC* DC ) void SCH_FIELD::Place( SCH_EDIT_FRAME* frame, wxDC* DC )
{ {
frame->DrawPanel->SetMouseCapture( NULL, NULL ); frame->GetCanvas()->SetMouseCapture( NULL, NULL );
SCH_COMPONENT* component = (SCH_COMPONENT*) GetParent(); SCH_COMPONENT* component = (SCH_COMPONENT*) GetParent();
// save old cmp in undo list // save old cmp in undo list
frame->SaveUndoItemInUndoList( component ); frame->SaveUndoItemInUndoList( component );
Draw( frame->DrawPanel, DC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); Draw( frame->GetCanvas(), DC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
ClearFlags(); ClearFlags();
frame->GetScreen()->SetCurItem( NULL ); frame->GetScreen()->SetCurItem( NULL );
frame->OnModify(); frame->OnModify();
@ -364,7 +364,8 @@ bool SCH_FIELD::Matches( wxFindReplaceData& aSearchData, void* aAuxData, wxPoint
bool match; bool match;
wxString text = GetText(); wxString text = GetText();
if( (m_id > VALUE) && !(aSearchData.GetFlags() & FR_SEARCH_ALL_FIELDS) ) if( ((m_id > VALUE) && !(aSearchData.GetFlags() & FR_SEARCH_ALL_FIELDS))
|| ((m_id == REFERENCE) && !(aSearchData.GetFlags() & FR_REPLACE_REFERENCES)) )
return false; return false;
wxLogTrace( traceFindItem, wxT( " child item " ) + GetSelectMenuText() ); wxLogTrace( traceFindItem, wxT( " child item " ) + GetSelectMenuText() );
@ -398,6 +399,40 @@ bool SCH_FIELD::Matches( wxFindReplaceData& aSearchData, void* aAuxData, wxPoint
} }
bool SCH_FIELD::Replace( wxFindReplaceData& aSearchData, void* aAuxData )
{
bool isReplaced;
wxString text = GetText();
if( m_id == REFERENCE && aAuxData != NULL )
{
wxCHECK_MSG( aSearchData.GetFlags() & FR_REPLACE_REFERENCES, false,
wxT( "Invalid replace component reference field call." ) ) ;
SCH_COMPONENT* component = (SCH_COMPONENT*) m_Parent;
wxCHECK_MSG( component != NULL, false,
wxT( "No component associated with field" ) + text );
text = component->GetRef( (SCH_SHEET_PATH*) aAuxData );
if( component->GetPartCount() > 1 )
text << LIB_COMPONENT::ReturnSubReference( component->GetUnit() );
isReplaced = EDA_ITEM::Replace( aSearchData, text );
if( isReplaced )
component->SetRef( (SCH_SHEET_PATH*) aAuxData, text );
}
else
{
isReplaced = EDA_ITEM::Replace( aSearchData, m_Text );
}
return isReplaced;
}
void SCH_FIELD::Rotate( wxPoint rotationPoint ) void SCH_FIELD::Rotate( wxPoint rotationPoint )
{ {
RotatePoint( &m_Pos, rotationPoint, 900 ); RotatePoint( &m_Pos, rotationPoint, 900 );

Some files were not shown because too many files have changed in this diff Show More