Add Footprint & Datasheet buttons to Edit Symbol dialog.
This commit is contained in:
parent
fecadeca23
commit
bd90341e91
|
@ -102,11 +102,13 @@ set( BMAPS_SMALL
|
||||||
refresh
|
refresh
|
||||||
small_down
|
small_down
|
||||||
small_edit
|
small_edit
|
||||||
|
small_library
|
||||||
small_plus
|
small_plus
|
||||||
small_up
|
small_up
|
||||||
trash
|
trash
|
||||||
tree_nosel
|
tree_nosel
|
||||||
tree_sel
|
tree_sel
|
||||||
|
www
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
|
||||||
|
/* 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, 0x10, 0x00, 0x00, 0x00, 0x0f, 0x08, 0x06, 0x00, 0x00, 0x00, 0xed, 0x73, 0x4f,
|
||||||
|
0x2f, 0x00, 0x00, 0x00, 0x04, 0x73, 0x42, 0x49, 0x54, 0x08, 0x08, 0x08, 0x08, 0x7c, 0x08, 0x64,
|
||||||
|
0x88, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x09, 0x16, 0x00, 0x00, 0x09,
|
||||||
|
0x16, 0x01, 0xb9, 0x3b, 0x3c, 0xa9, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f,
|
||||||
|
0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63,
|
||||||
|
0x61, 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00, 0x01, 0xe2, 0x49,
|
||||||
|
0x44, 0x41, 0x54, 0x28, 0x91, 0xa5, 0xd0, 0xcf, 0x8b, 0x12, 0x61, 0x18, 0x07, 0xf0, 0xaf, 0x35,
|
||||||
|
0xfe, 0x7a, 0x61, 0x67, 0x74, 0x3c, 0x08, 0xea, 0xec, 0x61, 0x24, 0x10, 0x04, 0x2b, 0x64, 0x85,
|
||||||
|
0x05, 0x4f, 0x8a, 0x8a, 0x07, 0x0f, 0x06, 0x76, 0xeb, 0xe6, 0x41, 0xe8, 0x20, 0x1e, 0xfc, 0x2b,
|
||||||
|
0x22, 0x10, 0x8c, 0x2e, 0xe2, 0x69, 0xa9, 0x9b, 0x07, 0xaf, 0xba, 0x08, 0x22, 0x1e, 0xb2, 0x3d,
|
||||||
|
0x84, 0x17, 0xcd, 0x20, 0x14, 0xf3, 0x45, 0x73, 0x10, 0x1b, 0x72, 0x9c, 0x94, 0xc1, 0x2e, 0x31,
|
||||||
|
0x05, 0xee, 0xb6, 0x2d, 0x7d, 0x4f, 0x0f, 0x3c, 0x3c, 0x1f, 0x9e, 0xe7, 0x01, 0xfe, 0x33, 0x06,
|
||||||
|
0x00, 0xf0, 0xf9, 0x7c, 0x2f, 0x78, 0x9e, 0x7f, 0x02, 0x00, 0xb3, 0xd9, 0x6c, 0xb1, 0x5e, 0xaf,
|
||||||
|
0x5d, 0x5e, 0xaf, 0x77, 0xa7, 0x28, 0xca, 0x7d, 0x49, 0x92, 0x5e, 0x4b, 0x92, 0xf4, 0xf2, 0x26,
|
||||||
|
0xe0, 0x1e, 0x00, 0x30, 0x0c, 0x43, 0x92, 0xc9, 0xa4, 0x98, 0xcb, 0xe5, 0x44, 0x8e, 0xe3, 0x90,
|
||||||
|
0x4a, 0xa5, 0xec, 0xb5, 0x5a, 0xed, 0x41, 0x36, 0x9b, 0x15, 0x09, 0x21, 0x27, 0x3c, 0xcf, 0x9f,
|
||||||
|
0x0b, 0x82, 0xf0, 0xca, 0x66, 0xb3, 0xbd, 0xb3, 0xdb, 0xed, 0xa7, 0x47, 0x00, 0x00, 0xb8, 0x5c,
|
||||||
|
0x2e, 0x24, 0x12, 0x09, 0xbd, 0x41, 0x08, 0x01, 0x00, 0x50, 0x4a, 0x1f, 0x47, 0x22, 0x91, 0xcb,
|
||||||
|
0x4a, 0xa5, 0xf2, 0xbc, 0x5c, 0x2e, 0x87, 0x58, 0x96, 0x7d, 0x7a, 0x2d, 0x70, 0x53, 0x58, 0x96,
|
||||||
|
0xfd, 0x78, 0x38, 0x1c, 0xbe, 0xf9, 0xfd, 0x7e, 0x04, 0x83, 0x41, 0x18, 0x0c, 0x86, 0xd8, 0x9d,
|
||||||
|
0x00, 0x42, 0xc8, 0xf7, 0xe1, 0x70, 0x48, 0x4d, 0x26, 0x13, 0x1c, 0x0e, 0x07, 0x9c, 0x4e, 0xe7,
|
||||||
|
0xe9, 0x9f, 0x73, 0xb7, 0x02, 0x00, 0x20, 0xcb, 0xf2, 0xa7, 0xd1, 0x68, 0x04, 0x00, 0x08, 0x87,
|
||||||
|
0xc3, 0x6e, 0x96, 0x65, 0xcf, 0x8e, 0x80, 0xf9, 0x7c, 0x8e, 0x76, 0xbb, 0x7d, 0x2d, 0xa0, 0x69,
|
||||||
|
0xda, 0xdb, 0x4e, 0xa7, 0xf3, 0x03, 0x00, 0x62, 0xb1, 0xd8, 0x09, 0xc7, 0x71, 0xcf, 0x8e, 0x80,
|
||||||
|
0xd5, 0x6a, 0x85, 0x5e, 0xaf, 0xa7, 0x0f, 0x35, 0x1a, 0x0d, 0xbd, 0xa6, 0x94, 0x36, 0x9b, 0xcd,
|
||||||
|
0x26, 0x05, 0x80, 0x40, 0x20, 0x00, 0x42, 0xc8, 0xa3, 0x3b, 0x9d, 0x00, 0x40, 0xa5, 0x94, 0x7e,
|
||||||
|
0x99, 0x4e, 0xa7, 0xa0, 0x94, 0xc2, 0xe3, 0xf1, 0x78, 0x00, 0xb0, 0x3a, 0x60, 0x36, 0x9b, 0x6f,
|
||||||
|
0x85, 0x14, 0x45, 0xb9, 0xa2, 0x94, 0x42, 0x10, 0x04, 0xa4, 0xd3, 0x69, 0xb7, 0xdb, 0xed, 0x4e,
|
||||||
|
0xe8, 0x40, 0x3e, 0x9f, 0x3f, 0x2f, 0x14, 0x0a, 0x28, 0x16, 0x8b, 0x00, 0x00, 0xab, 0xd5, 0x8a,
|
||||||
|
0x78, 0x3c, 0x8e, 0x50, 0x28, 0xf4, 0x7b, 0x05, 0x55, 0xbd, 0x68, 0xb5, 0x5a, 0x6b, 0x00, 0xc8,
|
||||||
|
0x64, 0x32, 0x8c, 0xd1, 0x68, 0xcc, 0x00, 0x00, 0x03, 0x00, 0xd5, 0x6a, 0xf5, 0xbd, 0xc5, 0x62,
|
||||||
|
0x79, 0x28, 0x8a, 0x22, 0x00, 0x60, 0xbb, 0xdd, 0x02, 0x00, 0x26, 0x93, 0x89, 0x0e, 0x2c, 0x97,
|
||||||
|
0xcb, 0x0f, 0xdd, 0x6e, 0x97, 0xaa, 0xaa, 0x6a, 0xeb, 0xf7, 0xfb, 0xd8, 0x6c, 0x36, 0x01, 0x1d,
|
||||||
|
0x58, 0x2c, 0x16, 0xeb, 0x52, 0xa9, 0xf4, 0x19, 0x00, 0x64, 0x59, 0x36, 0xd4, 0xeb, 0x75, 0x79,
|
||||||
|
0x30, 0x18, 0x48, 0x8a, 0xa2, 0x30, 0xbb, 0xdd, 0x6e, 0xfb, 0xcb, 0x38, 0x8c, 0xc7, 0xe3, 0x7e,
|
||||||
|
0x34, 0x1a, 0xfd, 0xaa, 0x69, 0xda, 0xd5, 0x7e, 0xbf, 0x7f, 0xf3, 0x8f, 0xff, 0xfb, 0x7b, 0x7e,
|
||||||
|
0x02, 0x93, 0x47, 0xb2, 0xd0, 0xa1, 0x6d, 0x79, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e,
|
||||||
|
0x44, 0xae, 0x42, 0x60, 0x82,
|
||||||
|
};
|
||||||
|
|
||||||
|
const BITMAP_OPAQUE small_library_xpm[1] = {{ png, sizeof( png ), "small_library_xpm" }};
|
||||||
|
|
||||||
|
//EOF
|
|
@ -0,0 +1,41 @@
|
||||||
|
|
||||||
|
/* 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, 0x10, 0x00, 0x00, 0x00, 0x10, 0x08, 0x06, 0x00, 0x00, 0x00, 0x1f, 0xf3, 0xff,
|
||||||
|
0x61, 0x00, 0x00, 0x00, 0x04, 0x73, 0x42, 0x49, 0x54, 0x08, 0x08, 0x08, 0x08, 0x7c, 0x08, 0x64,
|
||||||
|
0x88, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x09, 0xd8, 0x00, 0x00, 0x09,
|
||||||
|
0xd8, 0x01, 0xc7, 0xa0, 0xb9, 0xad, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f,
|
||||||
|
0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63,
|
||||||
|
0x61, 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00, 0x01, 0x2f, 0x49,
|
||||||
|
0x44, 0x41, 0x54, 0x38, 0x8d, 0xa5, 0xd3, 0xbb, 0x2e, 0x44, 0x51, 0x14, 0x06, 0xe0, 0xcf, 0xd0,
|
||||||
|
0x1a, 0x12, 0x3a, 0x05, 0x05, 0x89, 0x4b, 0x29, 0x9e, 0x40, 0x29, 0x41, 0x3c, 0x00, 0x46, 0x29,
|
||||||
|
0x12, 0x85, 0x77, 0xe0, 0x29, 0xc4, 0x25, 0x2e, 0x89, 0x8a, 0x7a, 0xa2, 0x9d, 0x4e, 0x21, 0x08,
|
||||||
|
0x12, 0x8d, 0x82, 0x42, 0x22, 0x44, 0x33, 0x1a, 0x46, 0x71, 0xd6, 0x96, 0x33, 0xc3, 0x90, 0xf0,
|
||||||
|
0x27, 0x3b, 0xd9, 0xeb, 0xf2, 0xaf, 0xeb, 0xde, 0xfc, 0x13, 0x2d, 0x4d, 0xf4, 0x23, 0x98, 0xc2,
|
||||||
|
0x40, 0xc8, 0xd7, 0x38, 0xc2, 0xe5, 0x6f, 0x01, 0x3b, 0xb0, 0x8f, 0x77, 0xd4, 0xf0, 0x1a, 0xa7,
|
||||||
|
0x16, 0xba, 0x1d, 0x14, 0x7f, 0x22, 0x9f, 0xe1, 0x0e, 0xb3, 0x78, 0xc2, 0x2a, 0xd6, 0xe2, 0x3e,
|
||||||
|
0x1b, 0xb6, 0xd3, 0x66, 0x41, 0xf6, 0xc2, 0xa1, 0x17, 0x0b, 0x91, 0xb9, 0x0b, 0xdd, 0x71, 0x2f,
|
||||||
|
0x85, 0xed, 0x1e, 0xdb, 0x89, 0x94, 0x66, 0x30, 0x8c, 0xf3, 0xe8, 0xf1, 0x02, 0xa3, 0xe8, 0xc4,
|
||||||
|
0x71, 0xd8, 0xc7, 0xf1, 0x8c, 0x13, 0xd9, 0x7c, 0x86, 0x82, 0x73, 0x55, 0x08, 0x87, 0x69, 0xbc,
|
||||||
|
0x04, 0x19, 0x7a, 0x70, 0x9b, 0xab, 0xee, 0x36, 0x74, 0xc2, 0xe7, 0x25, 0x38, 0x9f, 0xd8, 0x40,
|
||||||
|
0x39, 0x27, 0x57, 0xa3, 0xe7, 0x84, 0xb9, 0xd0, 0x25, 0x94, 0xb1, 0x0e, 0xa9, 0x82, 0x9a, 0x7a,
|
||||||
|
0xd4, 0xd4, 0xaf, 0xb8, 0x45, 0xb6, 0x85, 0x46, 0x1f, 0x6d, 0x21, 0xdc, 0x60, 0x06, 0x07, 0x21,
|
||||||
|
0x17, 0xb0, 0x8c, 0x89, 0x90, 0xfb, 0xd1, 0x9a, 0xb3, 0x8f, 0x89, 0xf9, 0xa4, 0x0a, 0x0e, 0x65,
|
||||||
|
0xab, 0x19, 0x09, 0x39, 0x6d, 0x23, 0xa1, 0x37, 0x74, 0xc2, 0xa7, 0x3d, 0x38, 0x75, 0xd8, 0xcd,
|
||||||
|
0x11, 0x4b, 0xbe, 0xae, 0x71, 0x1e, 0x7d, 0xb2, 0x35, 0x6e, 0x25, 0x52, 0x21, 0x17, 0x60, 0x11,
|
||||||
|
0x8f, 0xa8, 0x44, 0xbf, 0x55, 0xac, 0xc4, 0xa9, 0x46, 0xcf, 0x15, 0x3c, 0x60, 0xa9, 0x31, 0x7b,
|
||||||
|
0x42, 0x51, 0xf6, 0x5c, 0xbf, 0x7b, 0xca, 0x6f, 0xd8, 0x8c, 0xf2, 0x3f, 0xd1, 0xec, 0x33, 0x0d,
|
||||||
|
0x61, 0x12, 0x83, 0x41, 0xbe, 0x92, 0x7d, 0xa6, 0xeb, 0x66, 0x99, 0xff, 0x8c, 0x0f, 0xf2, 0xa4,
|
||||||
|
0x50, 0xe9, 0xcf, 0x13, 0x86, 0x90, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42,
|
||||||
|
0x60, 0x82,
|
||||||
|
};
|
||||||
|
|
||||||
|
const BITMAP_OPAQUE www_xpm[1] = {{ png, sizeof( png ), "www_xpm" }};
|
||||||
|
|
||||||
|
//EOF
|
|
@ -0,0 +1,175 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<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"
|
||||||
|
version="1.0"
|
||||||
|
width="26"
|
||||||
|
height="26"
|
||||||
|
id="svg2"
|
||||||
|
inkscape:version="0.92.2 5c3e80d, 2017-08-06"
|
||||||
|
sodipodi:docname="small_library.svg">
|
||||||
|
<metadata
|
||||||
|
id="metadata166">
|
||||||
|
<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="1155"
|
||||||
|
inkscape:window-height="746"
|
||||||
|
id="namedview164"
|
||||||
|
showgrid="true"
|
||||||
|
inkscape:zoom="8.5793412"
|
||||||
|
inkscape:cx="9.5132358"
|
||||||
|
inkscape:cy="7.8136687"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="1"
|
||||||
|
inkscape:window-maximized="0"
|
||||||
|
inkscape:current-layer="g5154"
|
||||||
|
borderlayer="true">
|
||||||
|
<inkscape:grid
|
||||||
|
type="xygrid"
|
||||||
|
id="grid4171" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<defs
|
||||||
|
id="defs4">
|
||||||
|
<filter
|
||||||
|
style="color-interpolation-filters:sRGB;"
|
||||||
|
inkscape:label="Lightness-Contrast"
|
||||||
|
id="filter100">
|
||||||
|
<feColorMatrix
|
||||||
|
values="0.74 0.85 0.159574 0 0 0.74 0.85 0.159574 0 0 0.74 0.85 0.159574 0 0 0 0 0 1 0 "
|
||||||
|
id="feColorMatrix98"
|
||||||
|
result="fbSourceGraphic" />
|
||||||
|
<feColorMatrix
|
||||||
|
result="fbSourceGraphicAlpha"
|
||||||
|
in="fbSourceGraphic"
|
||||||
|
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
|
||||||
|
id="feColorMatrix118" />
|
||||||
|
<feColorMatrix
|
||||||
|
id="feColorMatrix120"
|
||||||
|
values="1.213 0 0 -0.123598 -0.1065 0 1.213 0 -0.123598 -0.1065 0 0 1.213 -0.123598 -0.1065 0 0 0 1 0"
|
||||||
|
in="fbSourceGraphic"
|
||||||
|
result="fbSourceGraphic" />
|
||||||
|
<feColorMatrix
|
||||||
|
result="fbSourceGraphicAlpha"
|
||||||
|
in="fbSourceGraphic"
|
||||||
|
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
|
||||||
|
id="feColorMatrix150" />
|
||||||
|
<feColorMatrix
|
||||||
|
id="feColorMatrix152"
|
||||||
|
values="1.10638 0 0 -0.117641 -0.0531915 0 1.10638 0 -0.117641 -0.0531915 0 0 1.10638 -0.117641 -0.0531915 0 0 0 1 0"
|
||||||
|
in="fbSourceGraphic" />
|
||||||
|
</filter>
|
||||||
|
</defs>
|
||||||
|
<g
|
||||||
|
id="g4229">
|
||||||
|
<g
|
||||||
|
id="g5136"
|
||||||
|
transform="translate(-0.62941612,0.75529934)">
|
||||||
|
<g
|
||||||
|
id="g5154">
|
||||||
|
<g
|
||||||
|
id="g4175"
|
||||||
|
style="filter:url(#filter100)"
|
||||||
|
inkscape:export-xdpi="59.0769"
|
||||||
|
inkscape:export-ydpi="59.0769"
|
||||||
|
inkscape:export-filename="/Users/jeff/kicad_dev/kicad/bitmaps_png/png_16/g4175.png">
|
||||||
|
<rect
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#28c428;fill-opacity:1;fill-rule:nonzero;stroke:#15260a;stroke-width:0.84007174;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||||
|
id="rect4298"
|
||||||
|
width="4.9950833"
|
||||||
|
height="20.658747"
|
||||||
|
x="8.9282351"
|
||||||
|
y="2.4524136" />
|
||||||
|
<rect
|
||||||
|
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect4300"
|
||||||
|
width="0.7733919"
|
||||||
|
height="8.8953876"
|
||||||
|
x="11.043409"
|
||||||
|
y="4.6331463" />
|
||||||
|
<circle
|
||||||
|
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.0999999;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="path4208"
|
||||||
|
cx="11.41946"
|
||||||
|
cy="19.988663"
|
||||||
|
r="1.1596951" />
|
||||||
|
<g
|
||||||
|
id="g4162"
|
||||||
|
transform="matrix(0.82442696,-0.22090454,0.22090454,0.82442696,4.556788,4.5209251)">
|
||||||
|
<rect
|
||||||
|
y="4.4792137"
|
||||||
|
x="11.525894"
|
||||||
|
height="21.007425"
|
||||||
|
width="5.9002724"
|
||||||
|
id="rect4298-3"
|
||||||
|
style="opacity:1;fill:#5599ff;fill-opacity:1;fill-rule:nonzero;stroke:#002864;stroke-width:1.04181492;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
<rect
|
||||||
|
y="8.3740788"
|
||||||
|
x="14.02117"
|
||||||
|
height="8.2753372"
|
||||||
|
width="0.920017"
|
||||||
|
id="rect4300-56"
|
||||||
|
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
<circle
|
||||||
|
r="1.4022287"
|
||||||
|
cy="21.83185"
|
||||||
|
cx="14.485021"
|
||||||
|
id="path4208-6"
|
||||||
|
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.0999999;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
</g>
|
||||||
|
<ellipse
|
||||||
|
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.0999999;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="path4208-3"
|
||||||
|
cx="2.9231663"
|
||||||
|
cy="19.671127"
|
||||||
|
transform="matrix(0.99865271,-0.05189193,0.05004351,0.99874704,0,0)"
|
||||||
|
rx="1.0929558"
|
||||||
|
ry="1.1052452" />
|
||||||
|
<rect
|
||||||
|
y="2.3705726"
|
||||||
|
x="3.5278809"
|
||||||
|
height="20.779217"
|
||||||
|
width="4.431663"
|
||||||
|
id="rect4156"
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#e20000;fill-opacity:1;fill-rule:nonzero;stroke:#4c1508;stroke-width:0.76281112;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||||
|
<rect
|
||||||
|
y="4.6331458"
|
||||||
|
x="5.3451138"
|
||||||
|
height="8.0753841"
|
||||||
|
width="0.70209831"
|
||||||
|
id="rect4158"
|
||||||
|
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.01600003;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
<circle
|
||||||
|
r="1.052791"
|
||||||
|
cy="19.988663"
|
||||||
|
cx="5.6864991"
|
||||||
|
id="circle4160"
|
||||||
|
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.01600003;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 7.7 KiB |
|
@ -0,0 +1,61 @@
|
||||||
|
<?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="24"
|
||||||
|
height="24"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
version="1.1"
|
||||||
|
id="svg6"
|
||||||
|
sodipodi:docname="www.svg"
|
||||||
|
inkscape:export-filename="/Users/jeff/kicad_dev/kicad/bitmaps_png/png_16/www.png"
|
||||||
|
inkscape:export-xdpi="64"
|
||||||
|
inkscape:export-ydpi="64"
|
||||||
|
inkscape:version="0.92.2 5c3e80d, 2017-08-06">
|
||||||
|
<metadata
|
||||||
|
id="metadata12">
|
||||||
|
<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="defs10" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
objecttolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
guidetolerance="10"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-width="1114"
|
||||||
|
inkscape:window-height="677"
|
||||||
|
id="namedview8"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="9.8333333"
|
||||||
|
inkscape:cx="12"
|
||||||
|
inkscape:cy="12"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="0"
|
||||||
|
inkscape:current-layer="svg6" />
|
||||||
|
<path
|
||||||
|
d="M0 0h24v24H0z"
|
||||||
|
fill="none"
|
||||||
|
id="path2" />
|
||||||
|
<path
|
||||||
|
d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"
|
||||||
|
id="path4" />
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.5 KiB |
|
@ -183,6 +183,7 @@ set( COMMON_WIDGET_SRCS
|
||||||
widgets/gal_options_panel.cpp
|
widgets/gal_options_panel.cpp
|
||||||
widgets/grid_combobox.cpp
|
widgets/grid_combobox.cpp
|
||||||
widgets/grid_icon_text_helpers.cpp
|
widgets/grid_icon_text_helpers.cpp
|
||||||
|
widgets/grid_text_button_helpers.cpp
|
||||||
widgets/indicator_icon.cpp
|
widgets/indicator_icon.cpp
|
||||||
widgets/mathplot.cpp
|
widgets/mathplot.cpp
|
||||||
widgets/paged_dialog.cpp
|
widgets/paged_dialog.cpp
|
||||||
|
|
|
@ -0,0 +1,179 @@
|
||||||
|
/*
|
||||||
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2018 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <wx/combo.h>
|
||||||
|
#include <bitmap_types.h>
|
||||||
|
#include <bitmaps.h>
|
||||||
|
#include <kiway.h>
|
||||||
|
#include <kiway_player.h>
|
||||||
|
#include <dialog_shim.h>
|
||||||
|
|
||||||
|
#include <widgets/grid_text_button_helpers.h>
|
||||||
|
#include <eda_doc.h>
|
||||||
|
|
||||||
|
|
||||||
|
//-------- Renderer ---------------------------------------------------------------------
|
||||||
|
// None required; just render as normal text.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//-------- Editor Base Class ------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Note: this implementation is an adaptation of wxGridCellChoiceEditor
|
||||||
|
|
||||||
|
|
||||||
|
wxString GRID_CELL_TEXT_BUTTON::GetValue() const
|
||||||
|
{
|
||||||
|
return Combo()->GetValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
void GRID_CELL_TEXT_BUTTON::SetSize( const wxRect& aRect )
|
||||||
|
{
|
||||||
|
wxRect rect( aRect );
|
||||||
|
rect.Inflate( -1 );
|
||||||
|
|
||||||
|
#if defined( __WXMAC__ )
|
||||||
|
rect.Inflate( 3 ); // no FOCUS_RING, even on Mac
|
||||||
|
#endif
|
||||||
|
|
||||||
|
Combo()->SetSize( rect, wxSIZE_ALLOW_MINUS_ONE );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GRID_CELL_TEXT_BUTTON::BeginEdit( int aRow, int aCol, wxGrid* aGrid )
|
||||||
|
{
|
||||||
|
auto evtHandler = static_cast<wxGridCellEditorEvtHandler*>( m_control->GetEventHandler() );
|
||||||
|
|
||||||
|
// Don't immediately end if we get a kill focus event within BeginEdit
|
||||||
|
evtHandler->SetInSetFocus( true );
|
||||||
|
|
||||||
|
m_value = aGrid->GetTable()->GetValue( aRow, aCol );
|
||||||
|
|
||||||
|
Combo()->SetValue( m_value );
|
||||||
|
Combo()->SetFocus();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool GRID_CELL_TEXT_BUTTON::EndEdit( int , int , const wxGrid* , const wxString& , wxString *aNewVal )
|
||||||
|
{
|
||||||
|
const wxString value = Combo()->GetValue();
|
||||||
|
|
||||||
|
if( value == m_value )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
m_value = value;
|
||||||
|
|
||||||
|
if( aNewVal )
|
||||||
|
*aNewVal = value;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GRID_CELL_TEXT_BUTTON::ApplyEdit( int aRow, int aCol, wxGrid* aGrid )
|
||||||
|
{
|
||||||
|
aGrid->GetTable()->SetValue( aRow, aCol, m_value );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GRID_CELL_TEXT_BUTTON::Reset()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class TEXT_BUTTON_FP_CHOOSER : public wxComboCtrl
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
TEXT_BUTTON_FP_CHOOSER( wxWindow* aParent, DIALOG_SHIM* aParentDlg ) :
|
||||||
|
wxComboCtrl( aParent ),
|
||||||
|
m_dlg( aParentDlg )
|
||||||
|
{
|
||||||
|
SetButtonBitmaps( KiBitmap( small_library_xpm ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void DoSetPopupControl( wxComboPopup* popup ) override
|
||||||
|
{
|
||||||
|
m_popup = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnButtonClick() override
|
||||||
|
{
|
||||||
|
// pick a footprint using the footprint picker.
|
||||||
|
wxString fpid = GetValue();
|
||||||
|
KIWAY_PLAYER* frame = m_dlg->Kiway().Player( FRAME_PCB_MODULE_VIEWER_MODAL, true, m_dlg );
|
||||||
|
|
||||||
|
if( frame->ShowModal( &fpid, m_dlg ) )
|
||||||
|
SetValue( fpid );
|
||||||
|
|
||||||
|
frame->Destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
DIALOG_SHIM* m_dlg;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void GRID_CELL_FOOTPRINT_EDITOR::Create( wxWindow* aParent, wxWindowID aId,
|
||||||
|
wxEvtHandler* aEventHandler )
|
||||||
|
{
|
||||||
|
m_control = new TEXT_BUTTON_FP_CHOOSER( aParent, m_dlg );
|
||||||
|
|
||||||
|
wxGridCellEditor::Create(aParent, aId, aEventHandler);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class TEXT_BUTTON_URL : public wxComboCtrl
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
TEXT_BUTTON_URL( wxWindow* aParent, DIALOG_SHIM* aParentDlg ) :
|
||||||
|
wxComboCtrl( aParent ),
|
||||||
|
m_dlg( aParentDlg )
|
||||||
|
{
|
||||||
|
SetButtonBitmaps( KiBitmap( www_xpm ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void DoSetPopupControl( wxComboPopup* popup ) override
|
||||||
|
{
|
||||||
|
m_popup = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnButtonClick() override
|
||||||
|
{
|
||||||
|
wxString uri = ResolveUriByEnvVars( GetValue() );
|
||||||
|
GetAssociatedDocument( m_dlg, uri );
|
||||||
|
}
|
||||||
|
|
||||||
|
DIALOG_SHIM* m_dlg;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void GRID_CELL_URL_EDITOR::Create( wxWindow* aParent, wxWindowID aId,
|
||||||
|
wxEvtHandler* aEventHandler )
|
||||||
|
{
|
||||||
|
m_control = new TEXT_BUTTON_URL( aParent, m_dlg );
|
||||||
|
|
||||||
|
wxGridCellEditor::Create(aParent, aId, aEventHandler);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -140,7 +140,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC( SCH_EDIT
|
||||||
|
|
||||||
m_cmp = aComponent;
|
m_cmp = aComponent;
|
||||||
m_part = GetParent()->GetLibPart( m_cmp->GetLibId(), true );
|
m_part = GetParent()->GetLibPart( m_cmp->GetLibId(), true );
|
||||||
m_fields = new FIELDS_GRID_TABLE<SCH_FIELD>( false, GetUserUnits(), m_part );
|
m_fields = new FIELDS_GRID_TABLE<SCH_FIELD>( this, false, m_part );
|
||||||
|
|
||||||
m_delayedFocusRow = REFERENCE;
|
m_delayedFocusRow = REFERENCE;
|
||||||
m_delayedFocusColumn = FDC_VALUE;
|
m_delayedFocusColumn = FDC_VALUE;
|
||||||
|
@ -171,7 +171,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC( SCH_EDIT
|
||||||
m_stdDialogButtonSizerOK->SetDefault();
|
m_stdDialogButtonSizerOK->SetDefault();
|
||||||
|
|
||||||
// Configure button logos
|
// Configure button logos
|
||||||
m_buttonBrowseLibrary->SetBitmap( KiBitmap( library_browse_xpm ) );
|
m_buttonBrowseLibrary->SetBitmap( KiBitmap( small_library_xpm ) );
|
||||||
m_bpAdd->SetBitmap( KiBitmap( small_plus_xpm ) );
|
m_bpAdd->SetBitmap( KiBitmap( small_plus_xpm ) );
|
||||||
m_bpDelete->SetBitmap( KiBitmap( trash_xpm ) );
|
m_bpDelete->SetBitmap( KiBitmap( trash_xpm ) );
|
||||||
m_bpMoveUp->SetBitmap( KiBitmap( small_up_xpm ) );
|
m_bpMoveUp->SetBitmap( KiBitmap( small_up_xpm ) );
|
||||||
|
|
|
@ -130,9 +130,11 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE
|
||||||
m_libraryNameTextCtrl = new wxTextCtrl( sbSizerLibraryReference->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
m_libraryNameTextCtrl = new wxTextCtrl( sbSizerLibraryReference->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_libraryNameTextCtrl->SetToolTip( _("Name of the symbol in the library to which this symbol is linked") );
|
m_libraryNameTextCtrl->SetToolTip( _("Name of the symbol in the library to which this symbol is linked") );
|
||||||
|
|
||||||
bLibraryReferenceSizer->Add( m_libraryNameTextCtrl, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
|
bLibraryReferenceSizer->Add( m_libraryNameTextCtrl, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||||
|
|
||||||
m_buttonBrowseLibrary = new wxBitmapButton( sbSizerLibraryReference->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
|
m_buttonBrowseLibrary = new wxBitmapButton( sbSizerLibraryReference->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
|
||||||
|
m_buttonBrowseLibrary->SetMinSize( wxSize( 29,29 ) );
|
||||||
|
|
||||||
bLibraryReferenceSizer->Add( m_buttonBrowseLibrary, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
bLibraryReferenceSizer->Add( m_buttonBrowseLibrary, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -864,7 +864,7 @@
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
<object class="sizeritem" expanded="0">
|
<object class="sizeritem" expanded="0">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM|wxLEFT</property>
|
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT</property>
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">1</property>
|
||||||
<object class="wxTextCtrl" expanded="0">
|
<object class="wxTextCtrl" expanded="0">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
|
@ -996,7 +996,7 @@
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
<property name="min_size"></property>
|
<property name="min_size"></property>
|
||||||
<property name="minimize_button">0</property>
|
<property name="minimize_button">0</property>
|
||||||
<property name="minimum_size">-1,-1</property>
|
<property name="minimum_size">29,29</property>
|
||||||
<property name="moveable">1</property>
|
<property name="moveable">1</property>
|
||||||
<property name="name">m_buttonBrowseLibrary</property>
|
<property name="name">m_buttonBrowseLibrary</property>
|
||||||
<property name="pane_border">1</property>
|
<property name="pane_border">1</property>
|
||||||
|
|
|
@ -123,7 +123,7 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB( LIB_EDIT
|
||||||
|
|
||||||
m_parent = aParent;
|
m_parent = aParent;
|
||||||
m_libEntry = aLibEntry;
|
m_libEntry = aLibEntry;
|
||||||
m_fields = new FIELDS_GRID_TABLE<LIB_FIELD>( true, GetUserUnits(), m_libEntry );
|
m_fields = new FIELDS_GRID_TABLE<LIB_FIELD>( this, true, m_libEntry );
|
||||||
|
|
||||||
m_delayedFocusRow = REFERENCE;
|
m_delayedFocusRow = REFERENCE;
|
||||||
m_delayedFocusColumn = FDC_VALUE;
|
m_delayedFocusColumn = FDC_VALUE;
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#include <class_library.h>
|
#include <class_library.h>
|
||||||
#include <template_fieldnames.h>
|
#include <template_fieldnames.h>
|
||||||
#include <widgets/grid_icon_text_helpers.h>
|
#include <widgets/grid_icon_text_helpers.h>
|
||||||
|
#include <widgets/grid_text_button_helpers.h>
|
||||||
|
|
||||||
#include "eda_doc.h"
|
#include "eda_doc.h"
|
||||||
|
|
||||||
|
@ -43,8 +44,8 @@ enum
|
||||||
|
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
FIELDS_GRID_TABLE<T>::FIELDS_GRID_TABLE( bool aInLibEdit, EDA_UNITS_T aUserUnits, LIB_PART* aPart ) :
|
FIELDS_GRID_TABLE<T>::FIELDS_GRID_TABLE( DIALOG_SHIM* aDialog, bool aInLibEdit, LIB_PART* aPart ) :
|
||||||
m_userUnits( aUserUnits ),
|
m_userUnits( aDialog->GetUserUnits() ),
|
||||||
m_part( aPart ),
|
m_part( aPart ),
|
||||||
m_inLibEdit( aInLibEdit ),
|
m_inLibEdit( aInLibEdit ),
|
||||||
m_valueValidator( aInLibEdit, REFERENCE )
|
m_valueValidator( aInLibEdit, REFERENCE )
|
||||||
|
@ -59,6 +60,12 @@ FIELDS_GRID_TABLE<T>::FIELDS_GRID_TABLE( bool aInLibEdit, EDA_UNITS_T aUserUnits
|
||||||
textEditor->SetValidator( m_valueValidator );
|
textEditor->SetValidator( m_valueValidator );
|
||||||
m_valueColAttr->SetEditor( textEditor );
|
m_valueColAttr->SetEditor( textEditor );
|
||||||
|
|
||||||
|
m_footprintAttr = new wxGridCellAttr;
|
||||||
|
m_footprintAttr->SetEditor( new GRID_CELL_FOOTPRINT_EDITOR( aDialog ) );
|
||||||
|
|
||||||
|
m_urlAttr = new wxGridCellAttr;
|
||||||
|
m_urlAttr->SetEditor( new GRID_CELL_URL_EDITOR( aDialog ) );
|
||||||
|
|
||||||
m_boolColAttr = new wxGridCellAttr;
|
m_boolColAttr = new wxGridCellAttr;
|
||||||
m_boolColAttr->SetRenderer( new wxGridCellBoolRenderer() );
|
m_boolColAttr->SetRenderer( new wxGridCellBoolRenderer() );
|
||||||
m_boolColAttr->SetEditor( new wxGridCellBoolEditor() );
|
m_boolColAttr->SetEditor( new wxGridCellBoolEditor() );
|
||||||
|
@ -95,6 +102,8 @@ FIELDS_GRID_TABLE<T>::~FIELDS_GRID_TABLE()
|
||||||
m_readOnlyAttr->DecRef();
|
m_readOnlyAttr->DecRef();
|
||||||
m_boolColAttr->DecRef();
|
m_boolColAttr->DecRef();
|
||||||
m_valueColAttr->DecRef();
|
m_valueColAttr->DecRef();
|
||||||
|
m_footprintAttr->DecRef();
|
||||||
|
m_urlAttr->DecRef();
|
||||||
m_vAlignColAttr->DecRef();
|
m_vAlignColAttr->DecRef();
|
||||||
m_hAlignColAttr->DecRef();
|
m_hAlignColAttr->DecRef();
|
||||||
m_orientationColAttr->DecRef();
|
m_orientationColAttr->DecRef();
|
||||||
|
@ -187,6 +196,16 @@ wxGridCellAttr* FIELDS_GRID_TABLE<T>::GetAttr( int aRow, int aCol, wxGridCellAtt
|
||||||
m_readOnlyAttr->IncRef();
|
m_readOnlyAttr->IncRef();
|
||||||
return m_readOnlyAttr;
|
return m_readOnlyAttr;
|
||||||
}
|
}
|
||||||
|
else if( aRow == FOOTPRINT )
|
||||||
|
{
|
||||||
|
m_footprintAttr->IncRef();
|
||||||
|
return m_footprintAttr;
|
||||||
|
}
|
||||||
|
else if( aRow == DATASHEET )
|
||||||
|
{
|
||||||
|
m_urlAttr->IncRef();
|
||||||
|
return m_urlAttr;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Some fields have different validation semantics. Make sure the
|
// Some fields have different validation semantics. Make sure the
|
||||||
|
@ -423,7 +442,7 @@ void FIELDS_GRID_TRICKS::doPopupSelection( wxCommandEvent& event )
|
||||||
if( event.GetId() == MYID_SELECT_FOOTPRINT )
|
if( event.GetId() == MYID_SELECT_FOOTPRINT )
|
||||||
{
|
{
|
||||||
// pick a footprint using the footprint picker.
|
// pick a footprint using the footprint picker.
|
||||||
wxString fpid;
|
wxString fpid = m_grid->GetCellValue( FOOTPRINT, FDC_VALUE );
|
||||||
KIWAY_PLAYER* frame = m_dlg->Kiway().Player( FRAME_PCB_MODULE_VIEWER_MODAL, true, m_dlg );
|
KIWAY_PLAYER* frame = m_dlg->Kiway().Player( FRAME_PCB_MODULE_VIEWER_MODAL, true, m_dlg );
|
||||||
|
|
||||||
if( frame->ShowModal( &fpid, m_dlg ) )
|
if( frame->ShowModal( &fpid, m_dlg ) )
|
||||||
|
|
|
@ -68,7 +68,7 @@ template <class T>
|
||||||
class FIELDS_GRID_TABLE : public wxGridTableBase, public std::vector<T>
|
class FIELDS_GRID_TABLE : public wxGridTableBase, public std::vector<T>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FIELDS_GRID_TABLE( bool aInLibEdit, EDA_UNITS_T userUnits, LIB_PART* aPart );
|
FIELDS_GRID_TABLE( DIALOG_SHIM* aDialog, bool aInLibEdit, LIB_PART* aPart );
|
||||||
~FIELDS_GRID_TABLE();
|
~FIELDS_GRID_TABLE();
|
||||||
|
|
||||||
int GetNumberRows() override { return (int) this->size(); }
|
int GetNumberRows() override { return (int) this->size(); }
|
||||||
|
@ -100,6 +100,8 @@ private:
|
||||||
|
|
||||||
wxGridCellAttr* m_readOnlyAttr;
|
wxGridCellAttr* m_readOnlyAttr;
|
||||||
wxGridCellAttr* m_valueColAttr;
|
wxGridCellAttr* m_valueColAttr;
|
||||||
|
wxGridCellAttr* m_footprintAttr;
|
||||||
|
wxGridCellAttr* m_urlAttr;
|
||||||
wxGridCellAttr* m_boolColAttr;
|
wxGridCellAttr* m_boolColAttr;
|
||||||
wxGridCellAttr* m_vAlignColAttr;
|
wxGridCellAttr* m_vAlignColAttr;
|
||||||
wxGridCellAttr* m_hAlignColAttr;
|
wxGridCellAttr* m_hAlignColAttr;
|
||||||
|
|
|
@ -501,6 +501,7 @@ EXTERN_BITMAP( show_zone_disable_xpm )
|
||||||
EXTERN_BITMAP( show_zone_outline_only_xpm )
|
EXTERN_BITMAP( show_zone_outline_only_xpm )
|
||||||
EXTERN_BITMAP( small_down_xpm )
|
EXTERN_BITMAP( small_down_xpm )
|
||||||
EXTERN_BITMAP( small_edit_xpm )
|
EXTERN_BITMAP( small_edit_xpm )
|
||||||
|
EXTERN_BITMAP( small_library_xpm )
|
||||||
EXTERN_BITMAP( small_plus_xpm )
|
EXTERN_BITMAP( small_plus_xpm )
|
||||||
EXTERN_BITMAP( small_up_xpm )
|
EXTERN_BITMAP( small_up_xpm )
|
||||||
EXTERN_BITMAP( spreadsheet_xpm )
|
EXTERN_BITMAP( spreadsheet_xpm )
|
||||||
|
@ -543,6 +544,7 @@ EXTERN_BITMAP( width_track_xpm )
|
||||||
EXTERN_BITMAP( width_vias_xpm )
|
EXTERN_BITMAP( width_vias_xpm )
|
||||||
EXTERN_BITMAP( wizard_add_fplib_icon_xpm )
|
EXTERN_BITMAP( wizard_add_fplib_icon_xpm )
|
||||||
EXTERN_BITMAP( wizard_add_fplib_small_xpm )
|
EXTERN_BITMAP( wizard_add_fplib_small_xpm )
|
||||||
|
EXTERN_BITMAP( www_xpm )
|
||||||
EXTERN_BITMAP( zip_tool_xpm )
|
EXTERN_BITMAP( zip_tool_xpm )
|
||||||
EXTERN_BITMAP( zip_xpm )
|
EXTERN_BITMAP( zip_xpm )
|
||||||
EXTERN_BITMAP( zone_duplicate_xpm )
|
EXTERN_BITMAP( zone_duplicate_xpm )
|
||||||
|
|
|
@ -0,0 +1,97 @@
|
||||||
|
/*
|
||||||
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2018 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef GRID_TEXT_BUTTON_HELPERS_H
|
||||||
|
#define GRID_TEXT_BUTTON_HELPERS_H
|
||||||
|
|
||||||
|
#include <wx/combobox.h>
|
||||||
|
#include <wx/generic/gridctrl.h>
|
||||||
|
#include <wx/generic/grideditors.h>
|
||||||
|
|
||||||
|
|
||||||
|
class wxGrid;
|
||||||
|
class DIALOG_SHIM;
|
||||||
|
|
||||||
|
|
||||||
|
class GRID_CELL_TEXT_BUTTON : public wxGridCellEditor
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
GRID_CELL_TEXT_BUTTON() {};
|
||||||
|
|
||||||
|
wxString GetValue() const override;
|
||||||
|
|
||||||
|
void SetSize( const wxRect& aRect ) override;
|
||||||
|
|
||||||
|
void BeginEdit( int aRow, int aCol, wxGrid* aGrid ) override;
|
||||||
|
bool EndEdit( int , int , const wxGrid* , const wxString& , wxString *aNewVal ) override;
|
||||||
|
void ApplyEdit( int aRow, int aCol, wxGrid* aGrid ) override;
|
||||||
|
void Reset() override;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
wxComboCtrl* Combo() const { return static_cast<wxComboCtrl*>( m_control ); }
|
||||||
|
|
||||||
|
wxString m_value;
|
||||||
|
|
||||||
|
wxDECLARE_NO_COPY_CLASS( GRID_CELL_TEXT_BUTTON );
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class GRID_CELL_FOOTPRINT_EDITOR : public GRID_CELL_TEXT_BUTTON
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
GRID_CELL_FOOTPRINT_EDITOR( DIALOG_SHIM* aParent ) :
|
||||||
|
m_dlg( aParent )
|
||||||
|
{ }
|
||||||
|
|
||||||
|
wxGridCellEditor* Clone() const override
|
||||||
|
{
|
||||||
|
return new GRID_CELL_FOOTPRINT_EDITOR( m_dlg );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Create( wxWindow* aParent, wxWindowID aId, wxEvtHandler* aEventHandler ) override;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
DIALOG_SHIM* m_dlg;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class GRID_CELL_URL_EDITOR : public GRID_CELL_TEXT_BUTTON
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
GRID_CELL_URL_EDITOR( DIALOG_SHIM* aParent ) :
|
||||||
|
m_dlg( aParent )
|
||||||
|
{ }
|
||||||
|
|
||||||
|
wxGridCellEditor* Clone() const override
|
||||||
|
{
|
||||||
|
return new GRID_CELL_URL_EDITOR( m_dlg );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Create( wxWindow* aParent, wxWindowID aId, wxEvtHandler* aEventHandler ) override;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
DIALOG_SHIM* m_dlg;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // GRID_TEXT_BUTTON_HELPERS_H
|
|
@ -82,7 +82,7 @@ DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS( PCB_EDIT_FRAME* aParent,
|
||||||
else
|
else
|
||||||
SetInitialFocus( m_specifiedRef );
|
SetInitialFocus( m_specifiedRef );
|
||||||
|
|
||||||
m_newIDBrowseButton->SetBitmap( KiBitmap( library_browse_xpm ) );
|
m_newIDBrowseButton->SetBitmap( KiBitmap( small_library_xpm ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( m_currentModule )
|
if( m_currentModule )
|
||||||
|
@ -117,7 +117,7 @@ DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS( PCB_EDIT_FRAME* aParent,
|
||||||
|
|
||||||
if( m_currentModule )
|
if( m_currentModule )
|
||||||
m_specifiedID->AppendText( FROM_UTF8( m_currentModule->GetFPID().Format().c_str() ) );
|
m_specifiedID->AppendText( FROM_UTF8( m_currentModule->GetFPID().Format().c_str() ) );
|
||||||
m_specifiedIDBrowseButton->SetBitmap( KiBitmap( library_browse_xpm ) );
|
m_specifiedIDBrowseButton->SetBitmap( KiBitmap( small_library_xpm ) );
|
||||||
|
|
||||||
m_upperSizer->SetEmptyCellSize( wxSize( 0, 0 ) );
|
m_upperSizer->SetEmptyCellSize( wxSize( 0, 0 ) );
|
||||||
m_upperSizer->RecalcSizes();
|
m_upperSizer->RecalcSizes();
|
||||||
|
|
|
@ -59,7 +59,9 @@ DIALOG_EXCHANGE_FOOTPRINTS_BASE::DIALOG_EXCHANGE_FOOTPRINTS_BASE( wxWindow* pare
|
||||||
bSizer4->Add( m_specifiedID, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
bSizer4->Add( m_specifiedID, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||||
|
|
||||||
m_specifiedIDBrowseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
|
m_specifiedIDBrowseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
|
||||||
bSizer4->Add( m_specifiedIDBrowseButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
m_specifiedIDBrowseButton->SetMinSize( wxSize( 29,29 ) );
|
||||||
|
|
||||||
|
bSizer4->Add( m_specifiedIDBrowseButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 2 );
|
||||||
|
|
||||||
|
|
||||||
m_mainSizer->Add( bSizer4, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 );
|
m_mainSizer->Add( bSizer4, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 );
|
||||||
|
@ -84,7 +86,9 @@ DIALOG_EXCHANGE_FOOTPRINTS_BASE::DIALOG_EXCHANGE_FOOTPRINTS_BASE( wxWindow* pare
|
||||||
bSizer3->Add( m_newID, 1, wxALIGN_CENTER_VERTICAL, 5 );
|
bSizer3->Add( m_newID, 1, wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
m_newIDBrowseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
|
m_newIDBrowseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
|
||||||
bSizer3->Add( m_newIDBrowseButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
m_newIDBrowseButton->SetMinSize( wxSize( 29,29 ) );
|
||||||
|
|
||||||
|
bSizer3->Add( m_newIDBrowseButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 2 );
|
||||||
|
|
||||||
|
|
||||||
m_changeSizer->Add( bSizer3, 1, wxEXPAND|wxLEFT, 5 );
|
m_changeSizer->Add( bSizer3, 1, wxEXPAND|wxLEFT, 5 );
|
||||||
|
|
|
@ -987,7 +987,7 @@
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
<property name="min_size"></property>
|
<property name="min_size"></property>
|
||||||
<property name="minimize_button">0</property>
|
<property name="minimize_button">0</property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size">29,29</property>
|
||||||
<property name="moveable">1</property>
|
<property name="moveable">1</property>
|
||||||
<property name="name">m_specifiedIDBrowseButton</property>
|
<property name="name">m_specifiedIDBrowseButton</property>
|
||||||
<property name="pane_border">1</property>
|
<property name="pane_border">1</property>
|
||||||
|
@ -1355,7 +1355,7 @@
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
<property name="min_size"></property>
|
<property name="min_size"></property>
|
||||||
<property name="minimize_button">0</property>
|
<property name="minimize_button">0</property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size">29,29</property>
|
||||||
<property name="moveable">1</property>
|
<property name="moveable">1</property>
|
||||||
<property name="name">m_newIDBrowseButton</property>
|
<property name="name">m_newIDBrowseButton</property>
|
||||||
<property name="pane_border">1</property>
|
<property name="pane_border">1</property>
|
||||||
|
|
Loading…
Reference in New Issue