Browse Source
ADDED: New appearance control widget for PcbNew
ADDED: New appearance control widget for PcbNew
Featuring: - Layer view presets - Per-type opacity for tracks, vias, pads, zones - Net and netclass color and visibility controls CHANGED: Simplified object visibilty controls Fixes https://gitlab.com/kicad/code/kicad/-/issues/1951 Fixes https://gitlab.com/kicad/code/kicad/-/issues/1981 Fixes https://gitlab.com/kicad/code/kicad/-/issues/2003 Fixes https://gitlab.com/kicad/code/kicad/-/issues/2173 Fixes https://gitlab.com/kicad/code/kicad/-/issues/2254 Fixes https://gitlab.com/kicad/code/kicad/-/issues/4325pull/16/head
59 changed files with 5797 additions and 397 deletions
-
2bitmaps_png/CMakeLists.txt
-
31bitmaps_png/cpp_16/visibility.cpp
-
28bitmaps_png/cpp_16/visibility_off.cpp
-
2bitmaps_png/include/bitmaps_png/bitmaps_list.h
-
196bitmaps_png/sources/visibility.svg
-
166bitmaps_png/sources/visibility_off.svg
-
1common/CMakeLists.txt
-
67common/lset.cpp
-
2common/page_layout/ws_painter.cpp
-
21common/project/project_local_settings.cpp
-
1common/settings/color_settings.cpp
-
72common/widgets/bitmap_toggle.cpp
-
14common/widgets/color_swatch.cpp
-
2eeschema/sch_painter.cpp
-
2eeschema/sch_painter.h
-
2gerbview/gerbview_painter.cpp
-
2gerbview/gerbview_painter.h
-
59include/layers_id_colors_and_visibility.h
-
16include/pcb_display_options.h
-
41include/project/board_project_settings.h
-
11include/project/project_local_settings.h
-
3include/render_settings.h
-
69include/widgets/bitmap_toggle.h
-
2include/ws_painter.h
-
3pcbnew/CMakeLists.txt
-
4pcbnew/class_pad.cpp
-
8pcbnew/class_track.cpp
-
10pcbnew/class_zone.cpp
-
2pcbnew/class_zone.h
-
7pcbnew/connectivity/connectivity_data.cpp
-
8pcbnew/connectivity/connectivity_data.h
-
4pcbnew/dialogs/dialog_drc.cpp
-
4pcbnew/dialogs/panel_pcbnew_color_settings.cpp
-
2pcbnew/files.cpp
-
3pcbnew/initpcb.cpp
-
6pcbnew/menubar_pcb_editor.cpp
-
6pcbnew/pcb_base_edit_frame.cpp
-
4pcbnew/pcb_base_edit_frame.h
-
10pcbnew/pcb_display_options.cpp
-
100pcbnew/pcb_draw_panel_gal.cpp
-
138pcbnew/pcb_edit_frame.cpp
-
44pcbnew/pcb_edit_frame.h
-
177pcbnew/pcb_painter.cpp
-
35pcbnew/pcb_painter.h
-
74pcbnew/pcbnew_config.cpp
-
5pcbnew/pcbnew_settings.cpp
-
23pcbnew/ratsnest/ratsnest_viewitem.cpp
-
3pcbnew/router/router_tool.cpp
-
4pcbnew/swig/layers_id_colors_and_visibility.i
-
15pcbnew/toolbars_pcb_editor.cpp
-
9pcbnew/tools/pcb_inspection_tool.cpp
-
11pcbnew/tools/pcbnew_control.cpp
-
3pcbnew/tools/pcbnew_control.h
-
22pcbnew/tools/selection_tool.cpp
-
1907pcbnew/widgets/appearance_controls.cpp
-
286pcbnew/widgets/appearance_controls.h
-
283pcbnew/widgets/appearance_controls_base.cpp
-
2055pcbnew/widgets/appearance_controls_base.fbp
-
107pcbnew/widgets/appearance_controls_base.h
@ -0,0 +1,31 @@ |
|||
|
|||
/* Do not modify this file, it was automatically generated by the
|
|||
* PNG2cpp CMake script, using a *.png file as input. |
|||
*/ |
|||
|
|||
#include <bitmaps_png/bitmaps_list.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, 0x04, 0x00, 0x00, 0x00, 0xb5, 0xfa, 0x37, |
|||
0xea, 0x00, 0x00, 0x00, 0xe5, 0x49, 0x44, 0x41, 0x54, 0x28, 0x15, 0x05, 0xc1, 0xb1, 0x2b, 0x84, |
|||
0x01, 0x00, 0x07, 0xd0, 0xf7, 0x5d, 0xb1, 0x89, 0x2c, 0x06, 0x92, 0x52, 0xea, 0x92, 0x8b, 0x44, |
|||
0x8e, 0xae, 0xce, 0x22, 0x3b, 0x83, 0xba, 0xe5, 0x16, 0xfb, 0x2d, 0x8c, 0x36, 0x7f, 0x87, 0xdd, |
|||
0x62, 0x30, 0x18, 0x24, 0xb1, 0xe8, 0x0c, 0x4e, 0x19, 0x2c, 0x26, 0x74, 0xc9, 0x6a, 0x40, 0x9d, |
|||
0xef, 0xe7, 0x3d, 0x00, 0x86, 0x14, 0xa8, 0xa9, 0x83, 0x61, 0x80, 0x0a, 0x80, 0x47, 0x55, 0x6c, |
|||
0xd9, 0xc5, 0x9c, 0x27, 0x80, 0x8a, 0xc2, 0x0a, 0xb8, 0xd7, 0x04, 0xb0, 0xa9, 0x0b, 0x56, 0x14, |
|||
0x85, 0x69, 0xf7, 0x5a, 0xae, 0x2c, 0x9a, 0x35, 0x61, 0x4a, 0xbc, 0xe9, 0x7b, 0xd3, 0xb3, 0xed, |
|||
0xc4, 0x32, 0x34, 0x9d, 0xda, 0xd2, 0x13, 0x51, 0x8a, 0x88, 0x3b, 0x0d, 0x67, 0x36, 0x00, 0x8e, |
|||
0x95, 0xe2, 0xd5, 0x8e, 0x11, 0xa3, 0x5a, 0x3e, 0xc4, 0x9f, 0x43, 0x80, 0x03, 0x11, 0xdf, 0xe6, |
|||
0xad, 0xbb, 0x74, 0x61, 0xc9, 0xaa, 0x81, 0x88, 0x7d, 0x98, 0xf1, 0x2b, 0xe2, 0x5a, 0xa1, 0x2f, |
|||
0xe2, 0x19, 0x0f, 0x22, 0xbe, 0x4c, 0x54, 0x44, 0x40, 0x21, 0x4a, 0x50, 0xa2, 0x00, 0x51, 0x42, |
|||
0x47, 0xc4, 0x8f, 0x05, 0xab, 0x2e, 0x9c, 0xab, 0xa9, 0x1b, 0x88, 0x68, 0x03, 0x1c, 0x29, 0xc5, |
|||
0xbb, 0x3d, 0x63, 0xc6, 0xb5, 0x7d, 0x8a, 0x81, 0x0e, 0x00, 0x6c, 0xea, 0x8a, 0x88, 0x88, 0xb8, |
|||
0xb1, 0x06, 0x14, 0x00, 0xa8, 0x6a, 0x98, 0x14, 0xaf, 0x6e, 0xbd, 0x00, 0x00, 0x00, 0x00, 0x00, |
|||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1f, 0x5e, 0x5d, 0x56, 0xf6, 0x32, 0x70, |
|||
0x52, 0x40, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, |
|||
}; |
|||
|
|||
const BITMAP_OPAQUE visibility_xpm[1] = {{ png, sizeof( png ), "visibility_xpm" }}; |
|||
|
|||
//EOF
|
|||
@ -0,0 +1,28 @@ |
|||
|
|||
/* Do not modify this file, it was automatically generated by the
|
|||
* PNG2cpp CMake script, using a *.png file as input. |
|||
*/ |
|||
|
|||
#include <bitmaps_png/bitmaps_list.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, 0x04, 0x00, 0x00, 0x00, 0xb5, 0xfa, 0x37, |
|||
0xea, 0x00, 0x00, 0x00, 0xb6, 0x49, 0x44, 0x41, 0x54, 0x28, 0xcf, 0x63, 0x60, 0xa0, 0x27, 0x48, |
|||
0xd7, 0x4f, 0xcd, 0x4a, 0x6f, 0x4b, 0x6b, 0x4d, 0xcf, 0x48, 0xd7, 0xc2, 0x90, 0x4c, 0x73, 0x4b, |
|||
0x3b, 0x9f, 0xf6, 0x1f, 0x08, 0xff, 0x81, 0xc9, 0xff, 0xe9, 0xc7, 0x53, 0x6c, 0x91, 0xa5, 0x5b, |
|||
0xc1, 0x12, 0x8f, 0x52, 0x83, 0x93, 0x78, 0xd3, 0xf8, 0x53, 0xa3, 0xd3, 0x5e, 0x00, 0x79, 0x7f, |
|||
0xd3, 0xca, 0x60, 0xd2, 0xa5, 0x60, 0x5d, 0xdf, 0x53, 0xb5, 0x61, 0x1a, 0x32, 0xcc, 0xd2, 0xfe, |
|||
0x80, 0xc4, 0x52, 0x53, 0x81, 0x9c, 0x64, 0xf9, 0xb4, 0x1f, 0x60, 0x05, 0xfb, 0x80, 0x4a, 0x37, |
|||
0xa6, 0x9f, 0x01, 0xc2, 0x75, 0x40, 0xd6, 0x39, 0xb0, 0xd8, 0x97, 0x2c, 0x09, 0x84, 0x82, 0x03, |
|||
0x28, 0x0a, 0x20, 0x2e, 0xfa, 0x94, 0x28, 0x0a, 0xb2, 0xa2, 0x00, 0xcc, 0xf9, 0x91, 0xa6, 0x0b, |
|||
0xf7, 0x8f, 0x25, 0xd4, 0x8a, 0x04, 0xa8, 0x40, 0x6a, 0x1d, 0xd8, 0x91, 0x4f, 0x52, 0x23, 0x12, |
|||
0x04, 0x92, 0x85, 0x52, 0x13, 0xd2, 0x5e, 0x01, 0x79, 0x7f, 0xd2, 0x0a, 0x90, 0xfd, 0xe1, 0x98, |
|||
0x7a, 0x12, 0xe2, 0x41, 0x28, 0x3c, 0x98, 0x62, 0x81, 0x11, 0x16, 0x29, 0x9a, 0xe9, 0x69, 0xe9, |
|||
0x8d, 0x69, 0x0d, 0xa9, 0x49, 0xc9, 0x2a, 0x74, 0x8d, 0x21, 0x00, 0xfd, 0xf4, 0x70, 0x5c, 0x67, |
|||
0xba, 0xa2, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, |
|||
}; |
|||
|
|||
const BITMAP_OPAQUE visibility_off_xpm[1] = {{ png, sizeof( png ), "visibility_off_xpm" }}; |
|||
|
|||
//EOF
|
|||
@ -0,0 +1,196 @@ |
|||
<?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="svg3803" |
|||
sodipodi:docname="visibility.svg" |
|||
inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"> |
|||
<metadata |
|||
id="metadata3809"> |
|||
<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:license |
|||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" /> |
|||
</cc:Work> |
|||
<cc:License |
|||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/"> |
|||
<cc:permits |
|||
rdf:resource="http://creativecommons.org/ns#Reproduction" /> |
|||
<cc:permits |
|||
rdf:resource="http://creativecommons.org/ns#Distribution" /> |
|||
<cc:requires |
|||
rdf:resource="http://creativecommons.org/ns#Notice" /> |
|||
<cc:requires |
|||
rdf:resource="http://creativecommons.org/ns#Attribution" /> |
|||
<cc:permits |
|||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /> |
|||
<cc:requires |
|||
rdf:resource="http://creativecommons.org/ns#ShareAlike" /> |
|||
</cc:License> |
|||
</rdf:RDF> |
|||
</metadata> |
|||
<defs |
|||
id="defs3807" /> |
|||
<sodipodi:namedview |
|||
pagecolor="#ffffff" |
|||
bordercolor="#666666" |
|||
borderopacity="1" |
|||
objecttolerance="10" |
|||
gridtolerance="10" |
|||
guidetolerance="10" |
|||
inkscape:pageopacity="0" |
|||
inkscape:pageshadow="2" |
|||
inkscape:window-width="2560" |
|||
inkscape:window-height="1370" |
|||
id="namedview3805" |
|||
showgrid="false" |
|||
showguides="true" |
|||
inkscape:guide-bbox="true" |
|||
inkscape:zoom="45.254834" |
|||
inkscape:cx="-4.3168652" |
|||
inkscape:cy="15.336071" |
|||
inkscape:window-x="0" |
|||
inkscape:window-y="0" |
|||
inkscape:window-maximized="1" |
|||
inkscape:current-layer="svg3803"> |
|||
<sodipodi:guide |
|||
position="0,0" |
|||
orientation="0,24" |
|||
id="guide3862" |
|||
inkscape:locked="false" /> |
|||
<sodipodi:guide |
|||
position="24,0" |
|||
orientation="-24,0" |
|||
id="guide3864" |
|||
inkscape:locked="false" /> |
|||
<sodipodi:guide |
|||
position="24,24" |
|||
orientation="0,-24" |
|||
id="guide3866" |
|||
inkscape:locked="false" /> |
|||
<sodipodi:guide |
|||
position="0,24" |
|||
orientation="24,0" |
|||
id="guide3868" |
|||
inkscape:locked="false" /> |
|||
<sodipodi:guide |
|||
position="3.335608,16.474179" |
|||
orientation="0,1" |
|||
id="guide3872" |
|||
inkscape:locked="false" /> |
|||
<sodipodi:guide |
|||
position="6.9364841,18.795302" |
|||
orientation="0,1" |
|||
id="guide3874" |
|||
inkscape:locked="false" /> |
|||
<sodipodi:guide |
|||
position="1,12.010067" |
|||
orientation="1,0" |
|||
id="guide3876" |
|||
inkscape:locked="false" |
|||
inkscape:label="" |
|||
inkscape:color="rgb(0,0,255)" /> |
|||
<sodipodi:guide |
|||
position="22.959732,12.010067" |
|||
orientation="1,0" |
|||
id="guide3878" |
|||
inkscape:locked="false" /> |
|||
<sodipodi:guide |
|||
position="11.321966,19.51172" |
|||
orientation="0,1" |
|||
id="guide3910" |
|||
inkscape:locked="false" /> |
|||
<sodipodi:guide |
|||
position="12,14.295302" |
|||
orientation="1,0" |
|||
id="guide3915" |
|||
inkscape:locked="false" |
|||
inkscape:label="" |
|||
inkscape:color="rgb(0,0,255)" /> |
|||
<sodipodi:guide |
|||
position="8.3999893,19.167397" |
|||
orientation="1,0" |
|||
id="guide4765" |
|||
inkscape:locked="false" /> |
|||
<sodipodi:guide |
|||
position="15.6,21.898213" |
|||
orientation="1,0" |
|||
id="guide4767" |
|||
inkscape:locked="false" |
|||
inkscape:label="" |
|||
inkscape:color="rgb(0,0,255)" /> |
|||
<sodipodi:guide |
|||
position="24,24" |
|||
orientation="1,0" |
|||
id="guide4784" |
|||
inkscape:locked="false" /> |
|||
</sodipodi:namedview> |
|||
<path |
|||
d="M0 0h24v24H0z" |
|||
fill="none" |
|||
id="path3799" /> |
|||
<path |
|||
d="m 11.959732,5.1644295 c -5.0000005,0 -9.2700005,2.8303087 -11.00000046,6.8255035 1.72999996,3.995195 5.99999996,6.825504 11.00000046,6.825504 5,0 9.27,-2.830309 11,-6.825504 -1.73,-3.9951948 -6,-6.8255035 -11,-6.8255035 z m 0,11.3758395 c -2.7600005,0 -5.0000005,-2.03855 -5.0000005,-4.550336 0,-2.5117854 2.24,-4.5503357 5.0000005,-4.5503357 2.76,0 5,2.0385503 5,4.5503357 0,2.511786 -2.24,4.550336 -5,4.550336 z m 0,-7.2805375 c -1.66,0 -3.0000005,1.2194895 -3.0000005,2.7302015 0,1.510712 1.3400005,2.730202 3.0000005,2.730202 1.66,0 3,-1.21949 3,-2.730202 0,-1.510712 -1.34,-2.7302015 -3,-2.7302015 z" |
|||
id="path3801" |
|||
inkscape:connector-curvature="0" |
|||
style="stroke-width:0.95397437" /> |
|||
<rect |
|||
style="stroke-width:0.89999998;stroke-miterlimit:4;stroke-dasharray:none;paint-order:stroke fill markers" |
|||
id="rect4742" |
|||
width="1.5100671" |
|||
height="3.6040268" |
|||
x="-2.3988652" |
|||
y="4.2705975" |
|||
ry="0.0195265" |
|||
transform="rotate(-40.846397)" /> |
|||
<rect |
|||
style="stroke-width:0.89999998;stroke-miterlimit:4;stroke-dasharray:none;paint-order:stroke fill markers" |
|||
id="rect4742-5" |
|||
width="1.5100671" |
|||
height="3.6040268" |
|||
x="5.4401145" |
|||
y="3.1494057" |
|||
ry="0.0195265" |
|||
transform="rotate(-14.26516)" /> |
|||
<rect |
|||
style="stroke-width:0.89999998;stroke-miterlimit:4;stroke-dasharray:none;paint-order:stroke fill markers" |
|||
id="rect4742-6" |
|||
width="1.5100671" |
|||
height="3.6040268" |
|||
x="11.323424" |
|||
y="0.88057196" |
|||
ry="0.0195265" |
|||
transform="rotate(0.01862949)" /> |
|||
<rect |
|||
style="stroke-width:0.89999998;stroke-miterlimit:4;stroke-dasharray:none;paint-order:stroke fill markers" |
|||
id="rect4742-5-2" |
|||
width="1.5100671" |
|||
height="3.6040268" |
|||
x="-17.841269" |
|||
y="-2.7698705" |
|||
ry="0.0195265" |
|||
transform="matrix(-0.96916574,-0.24640974,-0.24640974,0.96916574,0,0)" /> |
|||
<rect |
|||
style="stroke-width:0.89999998;stroke-miterlimit:4;stroke-dasharray:none;paint-order:stroke fill markers" |
|||
id="rect4742-9" |
|||
width="1.5100671" |
|||
height="3.6040268" |
|||
x="-20.526423" |
|||
y="-11.402325" |
|||
ry="0.0195265" |
|||
transform="matrix(-0.75646568,-0.65403339,-0.65403339,0.75646568,0,0)" /> |
|||
</svg> |
|||
@ -0,0 +1,166 @@ |
|||
<?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="svg3803" |
|||
sodipodi:docname="visibility_off.svg" |
|||
inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"> |
|||
<metadata |
|||
id="metadata3809"> |
|||
<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:license |
|||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" /> |
|||
</cc:Work> |
|||
<cc:License |
|||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/"> |
|||
<cc:permits |
|||
rdf:resource="http://creativecommons.org/ns#Reproduction" /> |
|||
<cc:permits |
|||
rdf:resource="http://creativecommons.org/ns#Distribution" /> |
|||
<cc:requires |
|||
rdf:resource="http://creativecommons.org/ns#Notice" /> |
|||
<cc:requires |
|||
rdf:resource="http://creativecommons.org/ns#Attribution" /> |
|||
<cc:permits |
|||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /> |
|||
<cc:requires |
|||
rdf:resource="http://creativecommons.org/ns#ShareAlike" /> |
|||
</cc:License> |
|||
</rdf:RDF> |
|||
</metadata> |
|||
<defs |
|||
id="defs3807" /> |
|||
<sodipodi:namedview |
|||
pagecolor="#ffffff" |
|||
bordercolor="#666666" |
|||
borderopacity="1" |
|||
objecttolerance="10" |
|||
gridtolerance="10" |
|||
guidetolerance="10" |
|||
inkscape:pageopacity="0" |
|||
inkscape:pageshadow="2" |
|||
inkscape:window-width="2560" |
|||
inkscape:window-height="1370" |
|||
id="namedview3805" |
|||
showgrid="false" |
|||
showguides="true" |
|||
inkscape:guide-bbox="true" |
|||
inkscape:zoom="16" |
|||
inkscape:cx="-1.087079" |
|||
inkscape:cy="10.657984" |
|||
inkscape:window-x="0" |
|||
inkscape:window-y="0" |
|||
inkscape:window-maximized="1" |
|||
inkscape:current-layer="svg3803"> |
|||
<sodipodi:guide |
|||
position="0,0" |
|||
orientation="0,24" |
|||
id="guide3862" |
|||
inkscape:locked="false" /> |
|||
<sodipodi:guide |
|||
position="24,0" |
|||
orientation="-24,0" |
|||
id="guide3864" |
|||
inkscape:locked="false" /> |
|||
<sodipodi:guide |
|||
position="24,24" |
|||
orientation="0,-24" |
|||
id="guide3866" |
|||
inkscape:locked="false" /> |
|||
<sodipodi:guide |
|||
position="0,24" |
|||
orientation="24,0" |
|||
id="guide3868" |
|||
inkscape:locked="false" /> |
|||
<sodipodi:guide |
|||
position="3.335608,16.474179" |
|||
orientation="0,1" |
|||
id="guide3872" |
|||
inkscape:locked="false" /> |
|||
<sodipodi:guide |
|||
position="6.9364841,18.795302" |
|||
orientation="0,1" |
|||
id="guide3874" |
|||
inkscape:locked="false" /> |
|||
<sodipodi:guide |
|||
position="1,12.010067" |
|||
orientation="1,0" |
|||
id="guide3876" |
|||
inkscape:locked="false" |
|||
inkscape:label="" |
|||
inkscape:color="rgb(0,0,255)" /> |
|||
<sodipodi:guide |
|||
position="22.959732,12.010067" |
|||
orientation="1,0" |
|||
id="guide3878" |
|||
inkscape:locked="false" /> |
|||
<sodipodi:guide |
|||
position="11.321966,19.51172" |
|||
orientation="0,1" |
|||
id="guide3910" |
|||
inkscape:locked="false" /> |
|||
<sodipodi:guide |
|||
position="12,14.295302" |
|||
orientation="1,0" |
|||
id="guide3915" |
|||
inkscape:locked="false" |
|||
inkscape:label="" |
|||
inkscape:color="rgb(0,0,255)" /> |
|||
<sodipodi:guide |
|||
position="8.3999893,19.167397" |
|||
orientation="1,0" |
|||
id="guide4765" |
|||
inkscape:locked="false" /> |
|||
<sodipodi:guide |
|||
position="15.6,21.898213" |
|||
orientation="1,0" |
|||
id="guide4767" |
|||
inkscape:locked="false" |
|||
inkscape:label="" |
|||
inkscape:color="rgb(0,0,255)" /> |
|||
<sodipodi:guide |
|||
position="24,24" |
|||
orientation="1,0" |
|||
id="guide4784" |
|||
inkscape:locked="false" /> |
|||
<sodipodi:guide |
|||
position="0.95973154,12.010067" |
|||
orientation="0,1" |
|||
id="guide4834" |
|||
inkscape:locked="false" /> |
|||
</sodipodi:namedview> |
|||
<path |
|||
d="M0 0h24v24H0z" |
|||
fill="none" |
|||
id="path3799" /> |
|||
<path |
|||
d="m 11.959732,5.1644295 c -5.0000005,0 -9.2700005,2.8303087 -11.00000046,6.8255035 1.72999996,3.995195 5.99999996,6.825504 11.00000046,6.825504 5,0 9.27,-2.830309 11,-6.825504 -1.73,-3.9951948 -6,-6.8255035 -11,-6.8255035 z m 0,11.3758395 c -2.7600005,0 -5.0000005,-2.03855 -5.0000005,-4.550336 0,-2.5117854 2.24,-4.5503357 5.0000005,-4.5503357 2.76,0 5,2.0385503 5,4.5503357 0,2.511786 -2.24,4.550336 -5,4.550336 z" |
|||
id="path3801" |
|||
inkscape:connector-curvature="0" |
|||
style="fill:#666666;stroke-width:0.95397437" |
|||
sodipodi:nodetypes="scscssssss" /> |
|||
<rect |
|||
style="fill:#666666;stroke-width:1.41000319;stroke-miterlimit:4;stroke-dasharray:none;paint-order:stroke fill markers" |
|||
id="rect4742-6" |
|||
width="2.3932726" |
|||
height="5.5814533" |
|||
x="10.76524" |
|||
y="-14.781991" |
|||
ry="0.030240133" |
|||
transform="matrix(-3.1770953e-4,0.99999995,-0.99999994,-3.3273889e-4,0,0)" /> |
|||
</svg> |
|||
@ -0,0 +1,72 @@ |
|||
/*
|
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors. |
|||
* @author Jon Evans <jon@craftyjon.com> |
|||
* |
|||
* 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 <widgets/bitmap_toggle.h>
|
|||
|
|||
|
|||
wxDEFINE_EVENT( TOGGLE_CHANGED, wxCommandEvent ); |
|||
|
|||
|
|||
BITMAP_TOGGLE::BITMAP_TOGGLE( wxWindow *aParent, wxWindowID aId, const wxBitmap& aCheckedBitmap, |
|||
const wxBitmap& aUncheckedBitmap, bool aChecked ) : |
|||
wxPanel( aParent, aId ), |
|||
m_checked( aChecked ), |
|||
m_unchecked_bitmap( aUncheckedBitmap ), |
|||
m_checked_bitmap( aCheckedBitmap ) |
|||
{ |
|||
wxBoxSizer* sizer = new wxBoxSizer( wxHORIZONTAL ); |
|||
SetSizer( sizer ); |
|||
|
|||
const wxBitmap& bitmap = aChecked ? m_checked_bitmap : m_unchecked_bitmap; |
|||
|
|||
m_bitmap = new wxStaticBitmap( this, aId, bitmap, wxDefaultPosition, bitmap.GetSize() ); |
|||
|
|||
sizer->Add( m_bitmap, 0, 0 ); |
|||
|
|||
m_bitmap->Bind( wxEVT_LEFT_UP, |
|||
[&]( wxMouseEvent& ) |
|||
{ |
|||
SetValue( !GetValue() ); |
|||
wxCommandEvent event( TOGGLE_CHANGED ); |
|||
event.SetInt( m_checked ); |
|||
event.SetEventObject( this ); |
|||
wxPostEvent( this, event ); |
|||
} ); |
|||
|
|||
auto passOnEvent = |
|||
[&]( wxEvent& aEvent ) |
|||
{ |
|||
wxPostEvent( this, aEvent ); |
|||
}; |
|||
|
|||
m_bitmap->Bind( wxEVT_RIGHT_DOWN, passOnEvent ); |
|||
m_bitmap->Bind( wxEVT_RIGHT_UP, passOnEvent ); |
|||
} |
|||
|
|||
|
|||
void BITMAP_TOGGLE::SetValue( bool aValue ) |
|||
{ |
|||
m_checked = aValue; |
|||
m_bitmap->SetBitmap( aValue ? m_checked_bitmap : m_unchecked_bitmap ); |
|||
} |
|||
@ -0,0 +1,69 @@ |
|||
/* |
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2019 KiCad Developers, see AUTHORS.txt for contributors. |
|||
* @author Jon Evans <jon@craftyjon.com> |
|||
* |
|||
* 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 _BITMAP_TOGGLE_H |
|||
#define _BITMAP_TOGGLE_H |
|||
|
|||
#include <wx/wx.h> |
|||
|
|||
//#include <common.h> |
|||
|
|||
#include <gal/color4d.h> |
|||
|
|||
|
|||
wxDECLARE_EVENT( TOGGLE_CHANGED, wxCommandEvent ); |
|||
|
|||
/** |
|||
* A checkbox control except with custom bitmaps for the checked and unchecked states |
|||
* |
|||
* This is useful in space-constrained situations where native toggle button controls are too big |
|||
*/ |
|||
|
|||
class BITMAP_TOGGLE : public wxPanel |
|||
{ |
|||
public: |
|||
BITMAP_TOGGLE() {} |
|||
|
|||
BITMAP_TOGGLE( wxWindow *aParent, wxWindowID aId, const wxBitmap& aCheckedBitmap, |
|||
const wxBitmap& aUncheckedBitmap, bool aChecked = false ); |
|||
|
|||
///> Set the checkbox state |
|||
void SetValue( bool aValue ); |
|||
|
|||
///> Read the checkbox state |
|||
bool GetValue() { return m_checked; } |
|||
|
|||
private: |
|||
bool m_checked; |
|||
|
|||
wxStaticBitmap* m_bitmap; |
|||
|
|||
///> Bitmap to display in unchecked state |
|||
wxBitmap m_unchecked_bitmap; |
|||
|
|||
///> Bitmap to display in checked state |
|||
wxBitmap m_checked_bitmap; |
|||
}; |
|||
|
|||
#endif |
|||
1907
pcbnew/widgets/appearance_controls.cpp
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,286 @@ |
|||
/* |
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2020 Jon Evans <jon@craftyjon.com> |
|||
* Copyright (C) 2020 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 3 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, see <http://www.gnu.org/licenses/>. |
|||
*/ |
|||
|
|||
#ifndef _APPEARANCE_CONTROLS_H |
|||
#define _APPEARANCE_CONTROLS_H |
|||
|
|||
#include <vector> |
|||
|
|||
#include <class_board.h> |
|||
#include <gal/color4d.h> |
|||
#include <layers_id_colors_and_visibility.h> |
|||
#include <project/board_project_settings.h> |
|||
#include <widgets/appearance_controls_base.h> |
|||
|
|||
|
|||
class BITMAP_TOGGLE; |
|||
class COLOR_SWATCH; |
|||
class INDICATOR_ICON; |
|||
class PCB_BASE_FRAME; |
|||
class ROW_ICON_PROVIDER; |
|||
|
|||
using KIGFX::COLOR4D; |
|||
|
|||
|
|||
class APPEARANCE_CONTROLS : public APPEARANCE_CONTROLS_BASE, public BOARD_LISTENER |
|||
{ |
|||
public: |
|||
|
|||
/** |
|||
* Container for an appearance setting (can control a single board layer, or GAL layer, etc) |
|||
*/ |
|||
struct APPEARANCE_SETTING |
|||
{ |
|||
int id; |
|||
wxString label; |
|||
wxString tooltip; |
|||
bool visible; |
|||
bool can_control_opacity; |
|||
bool spacer; |
|||
|
|||
wxPanel* ctl_panel; |
|||
INDICATOR_ICON* ctl_indicator; |
|||
BITMAP_TOGGLE* ctl_visibility; |
|||
COLOR_SWATCH* ctl_color; |
|||
wxStaticText* ctl_text; |
|||
wxSlider* ctl_opacity; |
|||
|
|||
APPEARANCE_SETTING( const wxString& aLabel, int aId, |
|||
const wxString& aTooltip = wxEmptyString, |
|||
bool aCanControlOpacity = false ) |
|||
{ |
|||
label = aLabel; |
|||
id = aId; |
|||
tooltip = aTooltip; |
|||
spacer = false; |
|||
visible = true; |
|||
|
|||
can_control_opacity = aCanControlOpacity; |
|||
|
|||
ctl_panel = nullptr; |
|||
ctl_indicator = nullptr; |
|||
ctl_visibility = nullptr; |
|||
ctl_color = nullptr; |
|||
ctl_text = nullptr; |
|||
ctl_opacity = nullptr; |
|||
} |
|||
|
|||
APPEARANCE_SETTING() : |
|||
id( -1 ), label( "" ), tooltip( "" ), visible( false ), |
|||
can_control_opacity( false ), spacer( true ) |
|||
{ |
|||
} |
|||
}; |
|||
|
|||
APPEARANCE_CONTROLS( PCB_BASE_FRAME* aParent, wxWindow* aFocusOwner, bool aFpEditor = false ); |
|||
|
|||
wxSize GetBestSize() const; |
|||
|
|||
///> Updates the panel contents from the application and board models |
|||
void OnBoardChanged(); |
|||
|
|||
void OnBoardNetSettingsChanged( BOARD& aBoard ) override; |
|||
|
|||
void OnBoardItemAdded( BOARD& aBoard, BOARD_ITEM* aBoardItem ) override; |
|||
|
|||
void OnBoardItemRemoved( BOARD& aBoard, BOARD_ITEM* aBoardItem ) override; |
|||
|
|||
void OnBoardItemChanged( BOARD& aBoard, BOARD_ITEM* aBoardItem ) override; |
|||
|
|||
///> Updates the colors on all the widgets from the new chosen color theme |
|||
void OnColorThemeChanged(); |
|||
|
|||
///> Updates the widget when the active board layer is changed |
|||
void OnLayerChanged(); |
|||
|
|||
///> Manually update visibility for a given layer |
|||
void SetLayerVisible( LAYER_NUM aLayer, bool isVisible ); |
|||
|
|||
void SetObjectVisible( GAL_LAYER_ID aLayer, bool isVisible = true ); |
|||
|
|||
///> Updates the manual layer alpha overrides |
|||
void OnLayerAlphaChanged(); |
|||
|
|||
void UpdateDisplayOptions(); |
|||
|
|||
///> Returns a list of the layer presets created by the user |
|||
std::vector<LAYER_PRESET> GetUserLayerPresets() const; |
|||
|
|||
///> Updates the current layer presets from those saved in the project file |
|||
void SetUserLayerPresets( std::vector<LAYER_PRESET>& aPresetList ); |
|||
|
|||
void ApplyLayerPreset( const wxString& aPresetName ); |
|||
|
|||
void ApplyLayerPreset( const LAYER_PRESET& aPreset ); |
|||
|
|||
wxString GetActiveLayerPreset() const |
|||
{ |
|||
if( m_currentPreset ) |
|||
return m_currentPreset->name; |
|||
else |
|||
return wxEmptyString; |
|||
} |
|||
|
|||
void OnColorSwatchChanged( wxCommandEvent& aEvent ); |
|||
|
|||
void OnLayerContextMenu( wxCommandEvent& aEvent ); |
|||
|
|||
protected: |
|||
|
|||
void OnLayerDisplayPaneChanged( wxCollapsiblePaneEvent& event ) override; |
|||
|
|||
void OnNetDisplayPaneChanged( wxCollapsiblePaneEvent& event ) override; |
|||
|
|||
void OnBtnDeleteLayerPreset( wxCommandEvent& event ) override; |
|||
|
|||
void OnNotebookPageChanged( wxNotebookEvent& event ) override; |
|||
|
|||
private: |
|||
PCB_BASE_FRAME* m_frame; |
|||
|
|||
static const APPEARANCE_SETTING s_objectSettings[]; |
|||
|
|||
ROW_ICON_PROVIDER* m_iconProvider; |
|||
|
|||
BOARD* m_board; |
|||
|
|||
std::vector<std::unique_ptr<APPEARANCE_SETTING>> m_layerSettings; |
|||
|
|||
std::map<PCB_LAYER_ID, APPEARANCE_SETTING*> m_layerSettingsMap; |
|||
|
|||
std::vector<std::unique_ptr<APPEARANCE_SETTING>> m_objectSettings; |
|||
|
|||
std::map<GAL_LAYER_ID, APPEARANCE_SETTING*> m_objectSettingsMap; |
|||
|
|||
std::vector<std::unique_ptr<APPEARANCE_SETTING>> m_netSettings; |
|||
|
|||
std::map<int, APPEARANCE_SETTING*> m_netSettingsMap; |
|||
|
|||
std::vector<std::unique_ptr<APPEARANCE_SETTING>> m_netclassSettings; |
|||
|
|||
std::map<wxString, APPEARANCE_SETTING*> m_netclassSettingsMap; |
|||
|
|||
// TODO(JE) Move preset storage to the PCBNEW_CONTROL tool |
|||
|
|||
// Storage for all layer presets |
|||
std::map<wxString, LAYER_PRESET> m_layerPresets; |
|||
|
|||
LAYER_PRESET* m_currentPreset; |
|||
|
|||
wxMenu* m_layerContextMenu; |
|||
|
|||
/// Stores wxIDs for each netclass for control event mapping |
|||
std::map<int, wxString> m_netclassIdMap; |
|||
|
|||
/// The net code of the net that was right-clicked |
|||
int m_contextMenuNetCode; |
|||
|
|||
/// The name of the netclass that was right-clicked |
|||
wxString m_contextMenuNetclass; |
|||
|
|||
// The built-in layer presets |
|||
|
|||
static LAYER_PRESET presetNoLayers; |
|||
static LAYER_PRESET presetAllLayers; |
|||
static LAYER_PRESET presetAllCopper; |
|||
static LAYER_PRESET presetInnerCopper; |
|||
static LAYER_PRESET presetFront; |
|||
static LAYER_PRESET presetFrontAssembly; |
|||
static LAYER_PRESET presetBack; |
|||
static LAYER_PRESET presetBackAssembly; |
|||
|
|||
int m_pointSize; |
|||
|
|||
enum POPUP_ID |
|||
{ |
|||
ID_CHANGE_COLOR = wxID_HIGHEST, |
|||
ID_SET_NET_COLOR, |
|||
ID_CLEAR_NET_COLOR, |
|||
ID_SHOW_ALL_NETS, |
|||
ID_HIDE_OTHER_NETS, |
|||
ID_HIGHLIGHT_NET, |
|||
ID_SELECT_NET, |
|||
ID_SHOW_ALL_COPPER_LAYERS, |
|||
ID_HIDE_ALL_COPPER_LAYERS, |
|||
ID_HIDE_ALL_BUT_ACTIVE, |
|||
ID_PRESET_NO_LAYERS, |
|||
ID_PRESET_ALL_LAYERS, |
|||
ID_PRESET_FRONT, |
|||
ID_PRESET_FRONT_ASSEMBLY, |
|||
ID_PRESET_INNER_COPPER, |
|||
ID_PRESET_BACK, |
|||
ID_PRESET_BACK_ASSEMBLY, |
|||
ID_HIDE_ALL_NON_COPPER, |
|||
ID_SHOW_ALL_NON_COPPER, |
|||
ID_LAST_VALUE |
|||
}; |
|||
|
|||
void rebuildLayers(); |
|||
|
|||
void rebuildLayerContextMenu(); |
|||
|
|||
void syncColorsAndVisibility(); |
|||
|
|||
void rebuildObjects(); |
|||
|
|||
void syncObjectSettings(); |
|||
|
|||
void rebuildNets(); |
|||
|
|||
void loadDefaultLayerPresets(); |
|||
|
|||
void rebuildLayerPresetsWidget(); |
|||
|
|||
void syncLayerPresetSelection(); |
|||
|
|||
void updateDeleteLayerPresetButton(); |
|||
|
|||
void onLayerClick( wxMouseEvent& aEvent ); |
|||
|
|||
void onLayerVisibilityChanged( PCB_LAYER_ID aLayer, bool isVisible, bool isFinal ); |
|||
|
|||
void onObjectVisibilityChanged( GAL_LAYER_ID aLayer, bool isVisible, bool isFinal ); |
|||
|
|||
void onObjectOpacitySlider( int aLayer, float aOpacity ); |
|||
|
|||
void updateLayerPresetSelection( const wxString& aName ); |
|||
|
|||
void onLayerPresetChanged( wxCommandEvent& aEvent ); |
|||
|
|||
void doApplyLayerPreset( const LAYER_PRESET& aPreset ); |
|||
|
|||
void onNetclassVisibilityChanged( wxCommandEvent& aEvent ); |
|||
|
|||
void showNetclass( const wxString& aClassName, bool aShow = true ); |
|||
|
|||
void onNetContextMenu( wxCommandEvent& aEvent ); |
|||
|
|||
void onNetclassColorChanged( wxCommandEvent& aEvent ); |
|||
|
|||
wxString netclassNameFromEvent( wxEvent& aEvent ); |
|||
|
|||
void onNetColorModeChanged( wxCommandEvent& aEvent ); |
|||
|
|||
void onNetclassContextMenu( wxCommandEvent& aEvent ); |
|||
|
|||
void handleBoardItemsChanged(); |
|||
}; |
|||
|
|||
#endif |
|||
@ -0,0 +1,283 @@ |
|||
///////////////////////////////////////////////////////////////////////////
|
|||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
|||
// http://www.wxformbuilder.org/
|
|||
//
|
|||
// PLEASE DO *NOT* EDIT THIS FILE!
|
|||
///////////////////////////////////////////////////////////////////////////
|
|||
|
|||
#include "appearance_controls_base.h"
|
|||
|
|||
///////////////////////////////////////////////////////////////////////////
|
|||
|
|||
APPEARANCE_CONTROLS_BASE::APPEARANCE_CONTROLS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name ) |
|||
{ |
|||
this->SetFont( wxFont( 9, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); |
|||
|
|||
m_sizerOuter = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_panelLayers = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); |
|||
m_panelLayersSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
m_windowLayers = new wxScrolledWindow( m_panelLayers, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); |
|||
m_windowLayers->SetScrollRate( 0, 5 ); |
|||
m_windowLayers->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); |
|||
|
|||
m_layers_outer_sizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
|
|||
m_windowLayers->SetSizer( m_layers_outer_sizer ); |
|||
m_windowLayers->Layout(); |
|||
m_layers_outer_sizer->Fit( m_windowLayers ); |
|||
m_panelLayersSizer->Add( m_windowLayers, 1, wxEXPAND | wxALL, 5 ); |
|||
|
|||
m_paneLayerDisplay = new wxCollapsiblePane( m_panelLayers, wxID_ANY, wxT("Layer Display Options"), wxDefaultPosition, wxDefaultSize, wxCP_DEFAULT_STYLE|wxCP_NO_TLW_RESIZE|wxBORDER_NONE|wxCLIP_CHILDREN|wxFULL_REPAINT_ON_RESIZE ); |
|||
m_paneLayerDisplay->Collapse( true ); |
|||
|
|||
wxBoxSizer* bSizer121; |
|||
bSizer121 = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
m_staticText13 = new wxStaticText( m_paneLayerDisplay->GetPane(), wxID_ANY, wxT("Show non-active layers as:"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_staticText13->Wrap( -1 ); |
|||
bSizer121->Add( m_staticText13, 0, wxALL, 5 ); |
|||
|
|||
wxBoxSizer* bSizer19; |
|||
bSizer19 = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
m_rbHighContrastNormal = new wxRadioButton( m_paneLayerDisplay->GetPane(), wxID_ANY, wxT("Normal"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); |
|||
m_rbHighContrastNormal->SetValue( true ); |
|||
m_rbHighContrastNormal->SetToolTip( wxT("Non-active layers will be shown in full color") ); |
|||
|
|||
bSizer19->Add( m_rbHighContrastNormal, 0, wxALL, 5 ); |
|||
|
|||
m_rbHighContrastDim = new wxRadioButton( m_paneLayerDisplay->GetPane(), wxID_ANY, wxT("Dimmed"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_rbHighContrastDim->SetToolTip( wxT("Non-active layers will be dimmed") ); |
|||
|
|||
bSizer19->Add( m_rbHighContrastDim, 0, wxALL, 5 ); |
|||
|
|||
m_rbHighContrastOff = new wxRadioButton( m_paneLayerDisplay->GetPane(), wxID_ANY, wxT("Off"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_rbHighContrastOff->SetToolTip( wxT("Non-active layers will be hidden") ); |
|||
|
|||
bSizer19->Add( m_rbHighContrastOff, 0, wxALL, 5 ); |
|||
|
|||
|
|||
bSizer121->Add( bSizer19, 0, wxEXPAND, 5 ); |
|||
|
|||
m_staticline5 = new wxStaticLine( m_paneLayerDisplay->GetPane(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); |
|||
bSizer121->Add( m_staticline5, 0, wxEXPAND | wxALL, 5 ); |
|||
|
|||
m_cbFlipBoard = new wxCheckBox( m_paneLayerDisplay->GetPane(), wxID_ANY, wxT("Flip board view"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bSizer121->Add( m_cbFlipBoard, 0, wxALL, 5 ); |
|||
|
|||
|
|||
m_paneLayerDisplay->GetPane()->SetSizer( bSizer121 ); |
|||
m_paneLayerDisplay->GetPane()->Layout(); |
|||
bSizer121->Fit( m_paneLayerDisplay->GetPane() ); |
|||
m_panelLayersSizer->Add( m_paneLayerDisplay, 0, wxBOTTOM|wxEXPAND|wxTOP, 5 ); |
|||
|
|||
|
|||
m_panelLayers->SetSizer( m_panelLayersSizer ); |
|||
m_panelLayers->Layout(); |
|||
m_panelLayersSizer->Fit( m_panelLayers ); |
|||
m_notebook->AddPage( m_panelLayers, wxT("Layers"), true ); |
|||
m_panelObjects = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); |
|||
m_panelObjects->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); |
|||
|
|||
m_objectsPanelSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
m_windowObjects = new wxScrolledWindow( m_panelObjects, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); |
|||
m_windowObjects->SetScrollRate( 0, 5 ); |
|||
m_windowObjects->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); |
|||
|
|||
m_objectsSizer = new wxGridBagSizer( 0, 0 ); |
|||
m_objectsSizer->SetFlexibleDirection( wxBOTH ); |
|||
m_objectsSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); |
|||
|
|||
|
|||
m_windowObjects->SetSizer( m_objectsSizer ); |
|||
m_windowObjects->Layout(); |
|||
m_objectsSizer->Fit( m_windowObjects ); |
|||
m_objectsPanelSizer->Add( m_windowObjects, 1, wxEXPAND | wxALL, 5 ); |
|||
|
|||
|
|||
m_panelObjects->SetSizer( m_objectsPanelSizer ); |
|||
m_panelObjects->Layout(); |
|||
m_objectsPanelSizer->Fit( m_panelObjects ); |
|||
m_notebook->AddPage( m_panelObjects, wxT("Objects"), false ); |
|||
m_panelNetsAndClasses = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); |
|||
wxBoxSizer* bSizer16; |
|||
bSizer16 = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
m_netsTabSplitter = new wxSplitterWindow( m_panelNetsAndClasses, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D|wxSP_LIVE_UPDATE ); |
|||
m_netsTabSplitter->SetSashGravity( 0.8 ); |
|||
m_netsTabSplitter->Connect( wxEVT_IDLE, wxIdleEventHandler( APPEARANCE_CONTROLS_BASE::m_netsTabSplitterOnIdle ), NULL, this ); |
|||
m_netsTabSplitter->SetMinimumPaneSize( 80 ); |
|||
|
|||
m_panelNets = new wxPanel( m_netsTabSplitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); |
|||
wxBoxSizer* bSizer192; |
|||
bSizer192 = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
wxBoxSizer* bSizer17; |
|||
bSizer17 = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
m_staticText141 = new wxStaticText( m_panelNets, wxID_ANY, wxT("Nets"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_staticText141->Wrap( -1 ); |
|||
m_staticText141->SetFont( wxFont( 9, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); |
|||
|
|||
bSizer17->Add( m_staticText141, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 ); |
|||
|
|||
m_txtNetFilter = new wxTextCtrl( m_panelNets, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_txtNetFilter->Hide(); |
|||
|
|||
bSizer17->Add( m_txtNetFilter, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxTOP, 5 ); |
|||
|
|||
m_btnNetInspector = new wxBitmapButton( m_panelNets, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE ); |
|||
m_btnNetInspector->SetToolTip( wxT("Show the Net Inspector") ); |
|||
|
|||
bSizer17->Add( m_btnNetInspector, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 ); |
|||
|
|||
|
|||
bSizer192->Add( bSizer17, 0, wxEXPAND, 5 ); |
|||
|
|||
m_netsScrolledWindow = new wxScrolledWindow( m_panelNets, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); |
|||
m_netsScrolledWindow->SetScrollRate( 5, 5 ); |
|||
m_netsOuterSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
|
|||
m_netsScrolledWindow->SetSizer( m_netsOuterSizer ); |
|||
m_netsScrolledWindow->Layout(); |
|||
m_netsOuterSizer->Fit( m_netsScrolledWindow ); |
|||
bSizer192->Add( m_netsScrolledWindow, 1, wxEXPAND | wxALL, 5 ); |
|||
|
|||
|
|||
m_panelNets->SetSizer( bSizer192 ); |
|||
m_panelNets->Layout(); |
|||
bSizer192->Fit( m_panelNets ); |
|||
m_panelNetclasses = new wxPanel( m_netsTabSplitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); |
|||
wxBoxSizer* bSizer21; |
|||
bSizer21 = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
wxBoxSizer* bSizer20; |
|||
bSizer20 = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
m_staticText14 = new wxStaticText( m_panelNetclasses, wxID_ANY, wxT("Net Classes"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_staticText14->Wrap( -1 ); |
|||
m_staticText14->SetFont( wxFont( 9, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); |
|||
|
|||
bSizer20->Add( m_staticText14, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 ); |
|||
|
|||
m_btnConfigureNetClasses = new wxBitmapButton( m_panelNetclasses, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE ); |
|||
m_btnConfigureNetClasses->SetToolTip( wxT("Configure net classes") ); |
|||
|
|||
bSizer20->Add( m_btnConfigureNetClasses, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); |
|||
|
|||
|
|||
bSizer21->Add( bSizer20, 0, wxEXPAND, 5 ); |
|||
|
|||
m_netclassScrolledWindow = new wxScrolledWindow( m_panelNetclasses, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); |
|||
m_netclassScrolledWindow->SetScrollRate( 5, 5 ); |
|||
m_netclassOuterSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
|
|||
m_netclassScrolledWindow->SetSizer( m_netclassOuterSizer ); |
|||
m_netclassScrolledWindow->Layout(); |
|||
m_netclassOuterSizer->Fit( m_netclassScrolledWindow ); |
|||
bSizer21->Add( m_netclassScrolledWindow, 1, wxEXPAND | wxALL, 5 ); |
|||
|
|||
|
|||
m_panelNetclasses->SetSizer( bSizer21 ); |
|||
m_panelNetclasses->Layout(); |
|||
bSizer21->Fit( m_panelNetclasses ); |
|||
m_netsTabSplitter->SplitHorizontally( m_panelNets, m_panelNetclasses, 300 ); |
|||
bSizer16->Add( m_netsTabSplitter, 1, wxEXPAND, 5 ); |
|||
|
|||
m_paneNetDisplay = new wxCollapsiblePane( m_panelNetsAndClasses, wxID_ANY, wxT("Net Display Options"), wxDefaultPosition, wxDefaultSize, wxCP_DEFAULT_STYLE|wxCP_NO_TLW_RESIZE ); |
|||
m_paneNetDisplay->Collapse( true ); |
|||
|
|||
wxBoxSizer* bSizer1211; |
|||
bSizer1211 = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
m_staticText131 = new wxStaticText( m_paneNetDisplay->GetPane(), wxID_ANY, wxT("Show net colors on:"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_staticText131->Wrap( -1 ); |
|||
m_staticText131->SetToolTip( wxT("Choose when to show net and netclass colors") ); |
|||
|
|||
bSizer1211->Add( m_staticText131, 0, wxALL|wxEXPAND, 5 ); |
|||
|
|||
wxBoxSizer* bSizer191; |
|||
bSizer191 = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
m_rbNetColorOff = new wxRadioButton( m_paneNetDisplay->GetPane(), wxID_ANY, wxT("Off"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); |
|||
m_rbNetColorOff->SetToolTip( wxT("Net and netclass colors are not shown") ); |
|||
|
|||
bSizer191->Add( m_rbNetColorOff, 0, wxLEFT|wxTOP, 5 ); |
|||
|
|||
m_rbNetColorRatsnest = new wxRadioButton( m_paneNetDisplay->GetPane(), wxID_ANY, wxT("Ratsnest"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_rbNetColorRatsnest->SetValue( true ); |
|||
m_rbNetColorRatsnest->SetToolTip( wxT("Net and netclass colors are shown on the ratsnest only") ); |
|||
|
|||
bSizer191->Add( m_rbNetColorRatsnest, 0, wxLEFT|wxTOP, 5 ); |
|||
|
|||
m_rbNetColorAll = new wxRadioButton( m_paneNetDisplay->GetPane(), wxID_ANY, wxT("All Items"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_rbNetColorAll->SetToolTip( wxT("Net and netclass colors are shown on all copper items") ); |
|||
|
|||
bSizer191->Add( m_rbNetColorAll, 0, wxALL, 5 ); |
|||
|
|||
|
|||
bSizer1211->Add( bSizer191, 0, wxEXPAND, 5 ); |
|||
|
|||
|
|||
m_paneNetDisplay->GetPane()->SetSizer( bSizer1211 ); |
|||
m_paneNetDisplay->GetPane()->Layout(); |
|||
bSizer1211->Fit( m_paneNetDisplay->GetPane() ); |
|||
bSizer16->Add( m_paneNetDisplay, 0, wxEXPAND | wxALL, 5 ); |
|||
|
|||
|
|||
m_panelNetsAndClasses->SetSizer( bSizer16 ); |
|||
m_panelNetsAndClasses->Layout(); |
|||
bSizer16->Fit( m_panelNetsAndClasses ); |
|||
m_notebook->AddPage( m_panelNetsAndClasses, wxT("Nets"), false ); |
|||
|
|||
m_sizerOuter->Add( m_notebook, 1, wxEXPAND | wxALL, 5 ); |
|||
|
|||
wxStaticBoxSizer* presetsSizer; |
|||
presetsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Layer Presets") ), wxHORIZONTAL ); |
|||
|
|||
wxString m_cbLayerPresetsChoices[] = { wxT("All Layers"), wxT("(unsaved)") }; |
|||
int m_cbLayerPresetsNChoices = sizeof( m_cbLayerPresetsChoices ) / sizeof( wxString ); |
|||
m_cbLayerPresets = new wxChoice( presetsSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_cbLayerPresetsNChoices, m_cbLayerPresetsChoices, 0 ); |
|||
m_cbLayerPresets->SetSelection( 1 ); |
|||
presetsSizer->Add( m_cbLayerPresets, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); |
|||
|
|||
m_btnDeletePreset = new wxBitmapButton( presetsSizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); |
|||
m_btnDeletePreset->Enable( false ); |
|||
m_btnDeletePreset->SetToolTip( wxT("Delete this layer preset") ); |
|||
|
|||
presetsSizer->Add( m_btnDeletePreset, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP, 5 ); |
|||
|
|||
|
|||
m_sizerOuter->Add( presetsSizer, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); |
|||
|
|||
|
|||
this->SetSizer( m_sizerOuter ); |
|||
this->Layout(); |
|||
|
|||
// Connect Events
|
|||
m_notebook->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( APPEARANCE_CONTROLS_BASE::OnNotebookPageChanged ), NULL, this ); |
|||
m_paneLayerDisplay->Connect( wxEVT_COLLAPSIBLEPANE_CHANGED, wxCollapsiblePaneEventHandler( APPEARANCE_CONTROLS_BASE::OnLayerDisplayPaneChanged ), NULL, this ); |
|||
m_cbFlipBoard->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( APPEARANCE_CONTROLS_BASE::OnFlipBoardChecked ), NULL, this ); |
|||
m_paneNetDisplay->Connect( wxEVT_COLLAPSIBLEPANE_CHANGED, wxCollapsiblePaneEventHandler( APPEARANCE_CONTROLS_BASE::OnNetDisplayPaneChanged ), NULL, this ); |
|||
m_cbLayerPresets->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( APPEARANCE_CONTROLS_BASE::OnLayerPresetChanged ), NULL, this ); |
|||
m_btnDeletePreset->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( APPEARANCE_CONTROLS_BASE::OnBtnDeleteLayerPreset ), NULL, this ); |
|||
} |
|||
|
|||
APPEARANCE_CONTROLS_BASE::~APPEARANCE_CONTROLS_BASE() |
|||
{ |
|||
// Disconnect Events
|
|||
m_notebook->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( APPEARANCE_CONTROLS_BASE::OnNotebookPageChanged ), NULL, this ); |
|||
m_paneLayerDisplay->Disconnect( wxEVT_COLLAPSIBLEPANE_CHANGED, wxCollapsiblePaneEventHandler( APPEARANCE_CONTROLS_BASE::OnLayerDisplayPaneChanged ), NULL, this ); |
|||
m_cbFlipBoard->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( APPEARANCE_CONTROLS_BASE::OnFlipBoardChecked ), NULL, this ); |
|||
m_paneNetDisplay->Disconnect( wxEVT_COLLAPSIBLEPANE_CHANGED, wxCollapsiblePaneEventHandler( APPEARANCE_CONTROLS_BASE::OnNetDisplayPaneChanged ), NULL, this ); |
|||
m_cbLayerPresets->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( APPEARANCE_CONTROLS_BASE::OnLayerPresetChanged ), NULL, this ); |
|||
m_btnDeletePreset->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( APPEARANCE_CONTROLS_BASE::OnBtnDeleteLayerPreset ), NULL, this ); |
|||
|
|||
} |
|||
2055
pcbnew/widgets/appearance_controls_base.fbp
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,107 @@ |
|||
/////////////////////////////////////////////////////////////////////////// |
|||
// C++ code generated with wxFormBuilder (version Oct 26 2018) |
|||
// http://www.wxformbuilder.org/ |
|||
// |
|||
// PLEASE DO *NOT* EDIT THIS FILE! |
|||
/////////////////////////////////////////////////////////////////////////// |
|||
|
|||
#pragma once |
|||
|
|||
#include <wx/artprov.h> |
|||
#include <wx/xrc/xmlres.h> |
|||
#include <wx/sizer.h> |
|||
#include <wx/gdicmn.h> |
|||
#include <wx/scrolwin.h> |
|||
#include <wx/font.h> |
|||
#include <wx/colour.h> |
|||
#include <wx/settings.h> |
|||
#include <wx/string.h> |
|||
#include <wx/stattext.h> |
|||
#include <wx/radiobut.h> |
|||
#include <wx/statline.h> |
|||
#include <wx/checkbox.h> |
|||
#include <wx/collpane.h> |
|||
#include <wx/panel.h> |
|||
#include <wx/bitmap.h> |
|||
#include <wx/image.h> |
|||
#include <wx/icon.h> |
|||
#include <wx/gbsizer.h> |
|||
#include <wx/textctrl.h> |
|||
#include <wx/bmpbuttn.h> |
|||
#include <wx/button.h> |
|||
#include <wx/splitter.h> |
|||
#include <wx/notebook.h> |
|||
#include <wx/choice.h> |
|||
#include <wx/statbox.h> |
|||
|
|||
/////////////////////////////////////////////////////////////////////////// |
|||
|
|||
|
|||
/////////////////////////////////////////////////////////////////////////////// |
|||
/// Class APPEARANCE_CONTROLS_BASE |
|||
/////////////////////////////////////////////////////////////////////////////// |
|||
class APPEARANCE_CONTROLS_BASE : public wxPanel |
|||
{ |
|||
private: |
|||
|
|||
protected: |
|||
wxBoxSizer* m_sizerOuter; |
|||
wxNotebook* m_notebook; |
|||
wxPanel* m_panelLayers; |
|||
wxBoxSizer* m_panelLayersSizer; |
|||
wxScrolledWindow* m_windowLayers; |
|||
wxBoxSizer* m_layers_outer_sizer; |
|||
wxCollapsiblePane* m_paneLayerDisplay; |
|||
wxStaticText* m_staticText13; |
|||
wxRadioButton* m_rbHighContrastNormal; |
|||
wxRadioButton* m_rbHighContrastDim; |
|||
wxRadioButton* m_rbHighContrastOff; |
|||
wxStaticLine* m_staticline5; |
|||
wxCheckBox* m_cbFlipBoard; |
|||
wxPanel* m_panelObjects; |
|||
wxBoxSizer* m_objectsPanelSizer; |
|||
wxScrolledWindow* m_windowObjects; |
|||
wxGridBagSizer* m_objectsSizer; |
|||
wxPanel* m_panelNetsAndClasses; |
|||
wxSplitterWindow* m_netsTabSplitter; |
|||
wxPanel* m_panelNets; |
|||
wxStaticText* m_staticText141; |
|||
wxTextCtrl* m_txtNetFilter; |
|||
wxBitmapButton* m_btnNetInspector; |
|||
wxScrolledWindow* m_netsScrolledWindow; |
|||
wxBoxSizer* m_netsOuterSizer; |
|||
wxPanel* m_panelNetclasses; |
|||
wxStaticText* m_staticText14; |
|||
wxBitmapButton* m_btnConfigureNetClasses; |
|||
wxScrolledWindow* m_netclassScrolledWindow; |
|||
wxBoxSizer* m_netclassOuterSizer; |
|||
wxCollapsiblePane* m_paneNetDisplay; |
|||
wxStaticText* m_staticText131; |
|||
wxRadioButton* m_rbNetColorOff; |
|||
wxRadioButton* m_rbNetColorRatsnest; |
|||
wxRadioButton* m_rbNetColorAll; |
|||
wxChoice* m_cbLayerPresets; |
|||
wxBitmapButton* m_btnDeletePreset; |
|||
|
|||
// Virtual event handlers, overide them in your derived class |
|||
virtual void OnNotebookPageChanged( wxNotebookEvent& event ) { event.Skip(); } |
|||
virtual void OnLayerDisplayPaneChanged( wxCollapsiblePaneEvent& event ) { event.Skip(); } |
|||
virtual void OnFlipBoardChecked( wxCommandEvent& event ) { event.Skip(); } |
|||
virtual void OnNetDisplayPaneChanged( wxCollapsiblePaneEvent& event ) { event.Skip(); } |
|||
virtual void OnLayerPresetChanged( wxCommandEvent& event ) { event.Skip(); } |
|||
virtual void OnBtnDeleteLayerPreset( wxCommandEvent& event ) { event.Skip(); } |
|||
|
|||
|
|||
public: |
|||
|
|||
APPEARANCE_CONTROLS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 275,762 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString ); |
|||
~APPEARANCE_CONTROLS_BASE(); |
|||
|
|||
void m_netsTabSplitterOnIdle( wxIdleEvent& ) |
|||
{ |
|||
m_netsTabSplitter->SetSashPosition( 300 ); |
|||
m_netsTabSplitter->Disconnect( wxEVT_IDLE, wxIdleEventHandler( APPEARANCE_CONTROLS_BASE::m_netsTabSplitterOnIdle ), NULL, this ); |
|||
} |
|||
|
|||
}; |
|||
|
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue