ADDED: Editing style of multiple graphical lines at the same time.

Provides the ability to quickly set the style of multiple lines.  This is only allowed if the selection includes _only_ graphical lines.
This commit is contained in:
Mark Roszko 2019-12-31 04:05:51 +00:00 committed by Seth Hillbrand
parent 8bf9a4c811
commit b84fe2b703
19 changed files with 1070 additions and 681 deletions

View File

@ -91,6 +91,7 @@ set( BMAPS_SMALL
pintype_opencoll pintype_opencoll
pintype_openemit pintype_openemit
pintype_noconnect pintype_noconnect
question_mark
refresh refresh
small_down small_down
small_edit small_edit
@ -534,6 +535,10 @@ set( BMAPS_BIG
) )
set( BMAPS_OTHER set( BMAPS_OTHER
stroke_dash
stroke_dashdot
stroke_dot
stroke_solid
tune_diff_pair_length_legend tune_diff_pair_length_legend
tune_diff_pair_skew_legend tune_diff_pair_skew_legend
tune_single_track_length_legend tune_single_track_length_legend

View File

@ -0,0 +1,22 @@
/* 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, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x28, 0xcf, 0x63, 0x60, 0x18, 0x6c, 0xc0,
0x83, 0x21, 0x8c, 0xa1, 0x8c, 0x21, 0x88, 0x81, 0x11, 0xbb, 0xb4, 0x09, 0x43, 0x1b, 0x90, 0x94,
0x63, 0xf8, 0xc1, 0x60, 0x83, 0x5d, 0x01, 0x3b, 0x83, 0x0b, 0x90, 0x14, 0x66, 0xf8, 0xce, 0xa0,
0x80, 0xcf, 0x9a, 0x44, 0x86, 0x6e, 0xfc, 0xee, 0x98, 0xc6, 0xc0, 0x8c, 0x4f, 0x5a, 0x98, 0xc1,
0x02, 0xbf, 0x7e, 0x0d, 0x06, 0x69, 0xfc, 0x0a, 0x9a, 0x18, 0xf2, 0x06, 0x5d, 0xe0, 0x33, 0x00,
0x00, 0x29, 0xbc, 0x07, 0xec, 0x3c, 0xd3, 0xa9, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e,
0x44, 0xae, 0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE question_mark_xpm[1] = {{ png, sizeof( png ), "question_mark_xpm" }};
//EOF

View File

@ -0,0 +1,27 @@
/* 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, 0x40, 0x00, 0x00, 0x00, 0x10, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa6, 0xe7, 0x79,
0x29, 0x00, 0x00, 0x00, 0xa5, 0x49, 0x44, 0x41, 0x54, 0x58, 0xc3, 0x63, 0x60, 0x18, 0x05, 0xa3,
0x60, 0x14, 0x8c, 0x02, 0x04, 0x60, 0x04, 0x62, 0x6e, 0x12, 0x31, 0x23, 0x91, 0xe6, 0x72, 0x90,
0x88, 0xe9, 0x68, 0x2e, 0x77, 0x16, 0x0f, 0x83, 0xc8, 0xb1, 0x02, 0x06, 0xf1, 0x87, 0x17, 0x18,
0xa4, 0xbe, 0xfc, 0x27, 0x09, 0x83, 0xf4, 0x80, 0xf4, 0x82, 0xcc, 0xc0, 0x69, 0xee, 0x83, 0x73,
0x0c, 0x92, 0xef, 0xff, 0x92, 0x84, 0xc5, 0x1f, 0x9e, 0xa3, 0x9f, 0xb9, 0xa2, 0xe7, 0xa7, 0x32,
0x48, 0xff, 0xff, 0x4f, 0x11, 0x06, 0x99, 0x81, 0x0e, 0xc4, 0x2e, 0x50, 0x6e, 0x2e, 0xc8, 0x0c,
0x1a, 0x9b, 0xcb, 0xc4, 0x20, 0xf1, 0xf4, 0x05, 0xc5, 0x06, 0x82, 0xcc, 0x00, 0x99, 0x85, 0x00,
0x40, 0x73, 0x9f, 0x51, 0xc1, 0xdc, 0x67, 0x34, 0x37, 0x97, 0x4a, 0x01, 0xf0, 0x6c, 0xc8, 0x06,
0xc0, 0x88, 0xcf, 0x02, 0xc8, 0x85, 0xca, 0x79, 0x06, 0xa9, 0xcf, 0x24, 0x14, 0x82, 0x40, 0xb5,
0x20, 0x3d, 0x78, 0x0b, 0xab, 0xa3, 0xf9, 0xe4, 0x17, 0x56, 0x40, 0xbd, 0xf4, 0x34, 0x77, 0xe4,
0x56, 0x83, 0xa3, 0x60, 0x14, 0x8c, 0x82, 0x91, 0x0a, 0x00, 0xfd, 0x46, 0x7a, 0xf6, 0xe4, 0x09,
0x17, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE stroke_dash_xpm[1] = {{ png, sizeof( png ), "stroke_dash_xpm" }};
//EOF

View File

@ -0,0 +1,30 @@
/* 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, 0x40, 0x00, 0x00, 0x00, 0x10, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa6, 0xe7, 0x79,
0x29, 0x00, 0x00, 0x00, 0xd6, 0x49, 0x44, 0x41, 0x54, 0x58, 0xc3, 0x63, 0x60, 0x18, 0x05, 0xa3,
0x60, 0x14, 0x8c, 0x02, 0x04, 0x60, 0x04, 0x62, 0x6e, 0x12, 0x31, 0x23, 0x99, 0x76, 0xb1, 0x22,
0x99, 0xc1, 0x31, 0xb0, 0xee, 0xe5, 0xce, 0xe2, 0x61, 0x10, 0x39, 0x56, 0xc0, 0x20, 0xfe, 0xf0,
0x02, 0x83, 0xd4, 0x97, 0xff, 0x24, 0x61, 0x90, 0x1e, 0x90, 0x5e, 0x90, 0x19, 0xc4, 0x00, 0x81,
0xb9, 0x5a, 0x0c, 0x62, 0x97, 0xa7, 0x30, 0x48, 0xbc, 0x7c, 0x03, 0x37, 0x43, 0xf2, 0xdd, 0x4f,
0x06, 0xf1, 0xdb, 0x6b, 0x19, 0x84, 0x36, 0x7a, 0x10, 0x65, 0x06, 0xd5, 0xdd, 0x2b, 0x7a, 0x7e,
0x2a, 0x83, 0xf4, 0xff, 0xff, 0x14, 0x61, 0x90, 0x19, 0x84, 0x00, 0x4f, 0x85, 0x30, 0xd0, 0xe3,
0xf7, 0x71, 0x9a, 0x21, 0xf5, 0xfd, 0x17, 0x83, 0xd0, 0x6a, 0x07, 0x82, 0xe6, 0x50, 0xd9, 0xbd,
0x4c, 0x0c, 0x12, 0x4f, 0x5f, 0x50, 0x6c, 0x20, 0xc8, 0x0c, 0x90, 0x59, 0xf8, 0x80, 0xf0, 0xf6,
0x50, 0x82, 0xe6, 0x88, 0x5d, 0x9d, 0x4c, 0xc0, 0xfb, 0x54, 0x77, 0x2f, 0x95, 0x0c, 0x7c, 0x36,
0xc4, 0x02, 0x00, 0xd9, 0xbd, 0x23, 0x3c, 0x0b, 0x20, 0x15, 0x2a, 0x0f, 0xce, 0x33, 0x48, 0x7d,
0x26, 0xa1, 0x50, 0x01, 0xaa, 0x05, 0xe9, 0x21, 0xa5, 0x10, 0x14, 0x5c, 0xa8, 0x09, 0x2c, 0x04,
0x27, 0xa3, 0x15, 0x82, 0x3f, 0x20, 0x85, 0xe0, 0x7a, 0x77, 0xd2, 0x0a, 0x41, 0xea, 0xbb, 0x77,
0x84, 0x56, 0x83, 0xa3, 0x60, 0x14, 0x8c, 0x82, 0x91, 0x0a, 0x00, 0x52, 0xd0, 0x0d, 0xf8, 0xc1,
0xaa, 0x4a, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE stroke_dashdot_xpm[1] = {{ png, sizeof( png ), "stroke_dashdot_xpm" }};
//EOF

View File

@ -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, 0x40, 0x00, 0x00, 0x00, 0x10, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa6, 0xe7, 0x79,
0x29, 0x00, 0x00, 0x00, 0xda, 0x49, 0x44, 0x41, 0x54, 0x58, 0xc3, 0x63, 0x60, 0x18, 0x05, 0xa3,
0x60, 0x14, 0x8c, 0x02, 0x04, 0x60, 0x04, 0x62, 0x6e, 0x24, 0xcc, 0x48, 0x23, 0x3d, 0x20, 0xc0,
0x8e, 0xa4, 0x87, 0x7d, 0x60, 0xdd, 0xc7, 0x9d, 0xc5, 0xc3, 0x20, 0x72, 0xac, 0x80, 0x41, 0xfc,
0xe1, 0x05, 0x06, 0xa9, 0x2f, 0xff, 0xe1, 0x18, 0xc4, 0x07, 0x89, 0x83, 0xe4, 0xa9, 0xa1, 0x07,
0x04, 0x84, 0x56, 0x59, 0x32, 0x88, 0xdd, 0x58, 0xc0, 0x20, 0xf9, 0xf6, 0x33, 0x5c, 0x0f, 0x88,
0x0d, 0x12, 0x13, 0x5c, 0x61, 0x81, 0x55, 0x0f, 0xcd, 0xdd, 0x27, 0x7a, 0x7e, 0x2a, 0x83, 0xf4,
0xff, 0xff, 0x38, 0x31, 0x48, 0x1e, 0x1d, 0x90, 0xa3, 0x47, 0x60, 0x8e, 0x3a, 0x83, 0xe4, 0xc7,
0x0f, 0x38, 0xf5, 0x80, 0xe4, 0x40, 0x6a, 0xa8, 0x61, 0x17, 0x09, 0x7a, 0x98, 0x18, 0x24, 0x9e,
0xbe, 0xc0, 0xab, 0x18, 0x24, 0x0f, 0x52, 0x87, 0x00, 0xe4, 0xe8, 0x01, 0x3a, 0xea, 0x54, 0x09,
0x5e, 0x3d, 0x60, 0x87, 0x01, 0xd5, 0xa0, 0x02, 0x9a, 0xbb, 0x8f, 0x08, 0xc5, 0xcf, 0xc8, 0xb0,
0xe0, 0x19, 0x1d, 0x03, 0x80, 0x52, 0xf7, 0x0d, 0x9e, 0x2c, 0xf0, 0x7e, 0x20, 0xb2, 0x00, 0x52,
0x81, 0xf1, 0xe0, 0x3c, 0x83, 0xd4, 0x67, 0x68, 0x81, 0x01, 0xa4, 0x41, 0x7c, 0x82, 0x85, 0x0c,
0x09, 0x7a, 0x40, 0x00, 0x54, 0xd0, 0x89, 0xdd, 0x98, 0x8f, 0xa5, 0x10, 0x9c, 0x4f, 0xb8, 0x10,
0xa4, 0xbd, 0xfb, 0x46, 0x68, 0x35, 0x38, 0x0a, 0x46, 0xc1, 0x28, 0x18, 0xa9, 0x00, 0x00, 0xba,
0xdf, 0xf2, 0x05, 0x94, 0xde, 0xe7, 0x97, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae,
0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE stroke_dot_xpm[1] = {{ png, sizeof( png ), "stroke_dot_xpm" }};
//EOF

View File

@ -0,0 +1,25 @@
/* 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, 0x40, 0x00, 0x00, 0x00, 0x10, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa6, 0xe7, 0x79,
0x29, 0x00, 0x00, 0x00, 0x79, 0x49, 0x44, 0x41, 0x54, 0x58, 0xc3, 0x63, 0x60, 0x18, 0x05, 0xa3,
0x60, 0x14, 0x8c, 0x02, 0x04, 0x60, 0x02, 0x62, 0xee, 0x61, 0x8e, 0x99, 0x30, 0xbd, 0xcd, 0x9d,
0xc5, 0xc3, 0x20, 0x7a, 0x7e, 0x2a, 0x83, 0xc4, 0xb3, 0x17, 0x0c, 0x52, 0x5f, 0xfe, 0x0f, 0x6b,
0x0c, 0xf2, 0xa3, 0xd8, 0x85, 0xa9, 0x60, 0x3f, 0xc3, 0x81, 0xc8, 0xb1, 0x02, 0x06, 0xe9, 0xff,
0xff, 0x47, 0x14, 0x06, 0xf9, 0x19, 0x0a, 0x18, 0x19, 0xc4, 0x1f, 0x5c, 0x18, 0x71, 0x01, 0x00,
0xf2, 0x33, 0xc8, 0xef, 0x90, 0x00, 0x78, 0x38, 0xa2, 0x03, 0x60, 0xc4, 0x67, 0x01, 0xa4, 0x42,
0xf0, 0x29, 0xb0, 0x10, 0xfc, 0x3c, 0x8c, 0x0b, 0x41, 0xa0, 0xdf, 0x40, 0x7e, 0x04, 0xf9, 0x15,
0xa5, 0x10, 0x1c, 0xf1, 0xd5, 0xe0, 0x28, 0x18, 0x05, 0xa3, 0x60, 0xa4, 0x02, 0x00, 0xa5, 0x1e,
0xfd, 0xde, 0x95, 0x35, 0x0a, 0xb9, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42,
0x60, 0x82,
};
const BITMAP_OPAQUE stroke_solid_xpm[1] = {{ png, sizeof( png ), "stroke_solid_xpm" }};
//EOF

View File

@ -375,6 +375,7 @@ EXTERN_BITMAP( ps_diff_pair_tune_phase_xpm )
EXTERN_BITMAP( ps_diff_pair_via_gap_xpm ) EXTERN_BITMAP( ps_diff_pair_via_gap_xpm )
EXTERN_BITMAP( ps_tune_length_xpm ) EXTERN_BITMAP( ps_tune_length_xpm )
EXTERN_BITMAP( py_script_xpm ) EXTERN_BITMAP( py_script_xpm )
EXTERN_BITMAP( question_mark_xpm )
EXTERN_BITMAP( ratsnest_xpm ) EXTERN_BITMAP( ratsnest_xpm )
EXTERN_BITMAP( read_setup_xpm ) EXTERN_BITMAP( read_setup_xpm )
EXTERN_BITMAP( recent_xpm ) EXTERN_BITMAP( recent_xpm )
@ -437,6 +438,10 @@ 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 )
EXTERN_BITMAP( stroke_dash_xpm )
EXTERN_BITMAP( stroke_dashdot_xpm )
EXTERN_BITMAP( stroke_dot_xpm )
EXTERN_BITMAP( stroke_solid_xpm )
EXTERN_BITMAP( svg_file_xpm ) EXTERN_BITMAP( svg_file_xpm )
EXTERN_BITMAP( swap_layer_xpm ) EXTERN_BITMAP( swap_layer_xpm )
EXTERN_BITMAP( text_xpm ) EXTERN_BITMAP( text_xpm )

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 16 16" version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<metadata
id="metadata43">
<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/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by/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:License>
</rdf:RDF>
</metadata>
<path id="path3094" d="M7.846,4.15c0.878,0 1.569,0.222 2.073,0.664c0.337,0.301 0.505,0.661 0.505,1.081c0,0.518 -0.308,1.1 -0.925,1.745c-0.112,0.113 -0.294,0.293 -0.546,0.54c-0.449,0.451 -0.743,0.976 -0.883,1.576c-0.009,0.053 -0.019,0.105 -0.028,0.158l-0.238,0c0.019,-0.578 0.159,-1.111 0.42,-1.599l0.392,-0.72c0.346,-0.638 0.519,-1.224 0.519,-1.757c0,-0.487 -0.229,-0.866 -0.687,-1.136c-0.243,-0.143 -0.518,-0.214 -0.826,-0.214c-0.486,0 -0.869,0.12 -1.149,0.36c-0.121,0.112 -0.182,0.225 -0.182,0.338c0,0.067 0.098,0.199 0.294,0.394c0.159,0.172 0.238,0.319 0.238,0.439c0,0.232 -0.131,0.379 -0.392,0.439c-0.056,0.015 -0.117,0.022 -0.182,0.022c-0.449,0 -0.673,-0.232 -0.673,-0.698c0,-0.57 0.304,-1.013 0.911,-1.328c0.392,-0.203 0.845,-0.304 1.359,-0.304m0.098,6.495c0.308,0 0.532,0.117 0.672,0.349c0.056,0.083 0.084,0.173 0.084,0.271c0,0.27 -0.158,0.45 -0.476,0.54c-0.093,0.03 -0.191,0.045 -0.294,0.045c-0.346,0 -0.574,-0.12 -0.687,-0.36c-0.028,-0.068 -0.042,-0.139 -0.042,-0.214c0,-0.285 0.15,-0.48 0.449,-0.585c0.093,-0.031 0.191,-0.045 0.294,-0.045" style="fill-rule:nonzero;"/>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 64 16" version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
<metadata
id="metadata43">
<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/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by/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:License>
</rdf:RDF>
</metadata>
<path d="M41,8c0,-1.648 -1.338,-2.987 -2.987,-2.987l-12.026,0c-1.649,0 -2.987,1.339 -2.987,2.987c0,1.648 1.338,2.987 2.987,2.987l12.026,0c1.649,0 2.987,-1.339 2.987,-2.987Z" style="fill:#001bff;stroke:#000;stroke-width:0.09px;"/>
<path d="M19,8c0,-1.656 -1.344,-3 -3,-3l-12,0c-1.656,0 -3,1.344 -3,3c0,1.656 1.344,3 3,3l12,0c1.656,0 3,-1.344 3,-3Z" style="fill:#001bff;stroke:#000;stroke-width:0.09px;"/>
<path d="M63,8c0,-1.648 -1.338,-2.987 -2.987,-2.987l-12.026,0c-1.649,0 -2.987,1.339 -2.987,2.987c0,1.648 1.338,2.987 2.987,2.987l12.026,0c1.649,0 2.987,-1.339 2.987,-2.987Z" style="fill:#001bff;stroke:#000;stroke-width:0.09px;"/>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 64 16" version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
<metadata
id="metadata43">
<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/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by/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:License>
</rdf:RDF>
</metadata>
<path d="M36.635,8c0,-1.656 -1.344,-3 -3,-3l-3,0c-1.656,0 -3,1.344 -3,3c0,1.656 1.344,3 3,3l3,0c1.656,0 3,-1.344 3,-3Z" style="fill:#001bff;stroke:#000;stroke-width:0.09px;"/>
<path d="M19,8c0,-1.656 -1.344,-3 -3,-3l-12,0c-1.656,0 -3,1.344 -3,3c0,1.656 1.344,3 3,3l12,0c1.656,0 3,-1.344 3,-3Z" style="fill:#001bff;stroke:#000;stroke-width:0.09px;"/>
<path d="M63,8c0,-1.656 -1.344,-3 -3,-3l-12,0c-1.656,0 -3,1.344 -3,3c0,1.656 1.344,3 3,3l12,0c1.656,0 3,-1.344 3,-3Z" style="fill:#001bff;stroke:#000;stroke-width:0.09px;"/>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 64 16" version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
<metadata
id="metadata43">
<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/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by/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:License>
</rdf:RDF>
</metadata>
<path d="M36.5,8c0,-1.656 -1.344,-3 -3,-3l-3,0c-1.656,0 -3,1.344 -3,3c0,1.656 1.344,3 3,3l3,0c1.656,0 3,-1.344 3,-3Z" style="fill:#001bff;stroke:#000;stroke-width:0.09px;"/>
<path d="M10,8c0,-1.656 -1.344,-3 -3,-3l-3,0c-1.656,0 -3,1.344 -3,3c0,1.656 1.344,3 3,3l3,0c1.656,0 3,-1.344 3,-3Z" style="fill:#001bff;stroke:#000;stroke-width:0.09px;"/>
<path d="M50,8c0,-1.656 -1.344,-3 -3,-3l-3,0c-1.656,0 -3,1.344 -3,3c0,1.656 1.344,3 3,3l3,0c1.656,0 3,-1.344 3,-3Z" style="fill:#001bff;stroke:#000;stroke-width:0.09px;"/>
<path d="M23,8c0,-1.656 -1.344,-3 -3,-3l-3,0c-1.656,0 -3,1.344 -3,3c0,1.656 1.344,3 3,3l3,0c1.656,0 3,-1.344 3,-3Z" style="fill:#001bff;stroke:#000;stroke-width:0.09px;"/>
<path d="M63,8c0,-1.656 -1.344,-3 -3,-3l-3,0c-1.656,0 -3,1.344 -3,3c0,1.656 1.344,3 3,3l3,0c1.656,0 3,-1.344 3,-3Z" style="fill:#001bff;stroke:#000;stroke-width:0.09px;"/>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 64 16" version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
<metadata
id="metadata43">
<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/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by/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:License>
</rdf:RDF>
</metadata>
<path d="M63,8c0,-1.656 -1.344,-3 -3,-3l-56,0c-1.656,0 -3,1.344 -3,3c0,1.656 1.344,3 3,3l56,0c1.656,0 3,-1.344 3,-3Z" style="fill:#001bff;stroke:#000;stroke-width:0.09px;"/>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -22,29 +22,50 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <cassert> #include <bitmaps.h>
#include <sch_edit_frame.h>
#include <sch_line.h> #include <sch_line.h>
#include <dialogs/dialog_color_picker.h>
#include <dialog_edit_line_style.h> #include <dialog_edit_line_style.h>
#include <dialogs/dialog_color_picker.h>
#include <sch_edit_frame.h>
const int BUTT_COLOR_MINSIZE_X = 32; const int BUTT_COLOR_MINSIZE_X = 32;
const int BUTT_COLOR_MINSIZE_Y = 20; const int BUTT_COLOR_MINSIZE_Y = 20;
DIALOG_EDIT_LINE_STYLE::DIALOG_EDIT_LINE_STYLE( SCH_EDIT_FRAME* aParent, SCH_LINE* aLine ) :
DIALOG_EDIT_LINE_STYLE_BASE( aParent ), struct lineTypeStruct
{
wxString name;
const BITMAP_OPAQUE* bitmap;
};
/*
* Conversion map between PLOT_DASH_TYPE values and style names displayed
*/
const std::map<PLOT_DASH_TYPE, struct lineTypeStruct> lineTypeNames = {
{ PLOT_DASH_TYPE::SOLID, { _( "Solid" ), stroke_solid_xpm } },
{ PLOT_DASH_TYPE::DASH, { _( "Dashed" ), stroke_dash_xpm } },
{ PLOT_DASH_TYPE::DOT, { _( "Dotted" ), stroke_dot_xpm } },
{ PLOT_DASH_TYPE::DASHDOT, { _( "Dash-Dot" ), stroke_dashdot_xpm } },
};
DIALOG_EDIT_LINE_STYLE::DIALOG_EDIT_LINE_STYLE(
SCH_EDIT_FRAME* aParent, std::deque<SCH_LINE*>& lines )
: DIALOG_EDIT_LINE_STYLE_BASE( aParent ),
m_frame( aParent ), m_frame( aParent ),
m_line( aLine ), m_lines( lines ),
m_width( aParent, m_staticTextWidth, m_lineWidth, m_staticWidthUnits, true ) m_width( aParent, m_staticTextWidth, m_lineWidth, m_staticWidthUnits, true )
{ {
m_sdbSizerApply->SetLabel( _( "Default" ) ); m_sdbSizerApply->SetLabel( _( "Default" ) );
wxBitmap bitmap( std::max( m_colorButton->GetSize().x, BUTT_COLOR_MINSIZE_X ),
std::max( m_colorButton->GetSize().y, BUTT_COLOR_MINSIZE_Y ) );
m_colorButton->SetBitmap( bitmap );
SetInitialFocus( m_lineWidth ); SetInitialFocus( m_lineWidth );
for( auto& typeEntry : lineTypeNames )
{
m_typeCombo->Append( typeEntry.second.name, KiBitmap( typeEntry.second.bitmap ) );
}
m_sdbSizerOK->SetDefault(); m_sdbSizerOK->SetDefault();
// Now all widgets have the size fixed, call FinishDialogSettings // Now all widgets have the size fixed, call FinishDialogSettings
@ -54,9 +75,49 @@ DIALOG_EDIT_LINE_STYLE::DIALOG_EDIT_LINE_STYLE( SCH_EDIT_FRAME* aParent, SCH_LIN
bool DIALOG_EDIT_LINE_STYLE::TransferDataToWindow() bool DIALOG_EDIT_LINE_STYLE::TransferDataToWindow()
{ {
m_width.SetValue( m_line->GetPenSize() ); auto first_line = m_lines.front();
setColor( m_line->GetLineColor() );
m_lineStyle->SetSelection( static_cast<int>( m_line->GetLineStyle() ) ); if( std::all_of( m_lines.begin() + 1, m_lines.end(),
[&]( const SCH_LINE* r )
{
return r->GetPenSize() == first_line->GetPenSize();
} ) )
{
m_width.SetValue( first_line->GetPenSize() );
}
else
{
m_width.SetValue( INDETERMINATE );
}
if( std::all_of( m_lines.begin() + 1, m_lines.end(),
[&]( const SCH_LINE* r )
{
return r->GetLineColor() == first_line->GetLineColor();
} ) )
{
setColor( first_line->GetLineColor() );
}
else
{
setColor( COLOR4D::UNSPECIFIED );
}
if( std::all_of( m_lines.begin() + 1, m_lines.end(),
[&]( const SCH_LINE* r )
{
return r->GetLineStyle() == first_line->GetLineStyle();
} ) )
{
int style = static_cast<int>( first_line->GetLineStyle() );
wxCHECK_MSG( style < lineTypeNames.size(), false,
"Line type for first line is not found in the type lookup map" );
m_typeCombo->SetSelection( style );
}
else
{
m_typeCombo->SetSelection( wxNOT_FOUND );
}
return true; return true;
} }
@ -74,14 +135,23 @@ void DIALOG_EDIT_LINE_STYLE::onColorButtonClicked( wxCommandEvent& event )
return; return;
setColor( newColor ); setColor( newColor );
} }
void DIALOG_EDIT_LINE_STYLE::updateColorButton( COLOR4D& aColor ) void DIALOG_EDIT_LINE_STYLE::updateColorButton( COLOR4D& aColor )
{ {
wxMemoryDC iconDC; wxMemoryDC iconDC;
wxBitmap bitmap = m_colorButton->GetBitmapLabel();
if( aColor == COLOR4D::UNSPECIFIED )
{
m_colorButton->SetBitmap( KiBitmap( question_mark_xpm ) );
}
else
{
wxBitmap bitmap( std::max( m_colorButton->GetSize().x, BUTT_COLOR_MINSIZE_X ),
std::max( m_colorButton->GetSize().y, BUTT_COLOR_MINSIZE_Y ) );
iconDC.SelectObject( bitmap ); iconDC.SelectObject( bitmap );
iconDC.SetPen( *wxBLACK_PEN ); iconDC.SetPen( *wxBLACK_PEN );
@ -92,7 +162,9 @@ void DIALOG_EDIT_LINE_STYLE::updateColorButton( COLOR4D& aColor )
iconDC.SetBackground( brush ); iconDC.SetBackground( brush );
iconDC.Clear(); iconDC.Clear();
m_colorButton->SetBitmapLabel( bitmap ); m_colorButton->SetBitmap( bitmap );
}
m_colorButton->Refresh(); m_colorButton->Refresh();
Refresh( false ); Refresh( false );
@ -101,9 +173,14 @@ void DIALOG_EDIT_LINE_STYLE::updateColorButton( COLOR4D& aColor )
void DIALOG_EDIT_LINE_STYLE::resetDefaults( wxCommandEvent& event ) void DIALOG_EDIT_LINE_STYLE::resetDefaults( wxCommandEvent& event )
{ {
m_width.SetValue( m_line->GetDefaultWidth() ); m_width.SetValue( m_lines.front()->GetDefaultWidth() );
setColor( m_line->GetDefaultColor() ); setColor( m_lines.front()->GetDefaultColor() );
m_lineStyle->SetSelection( static_cast<int>( m_line->GetDefaultStyle() ) );
auto typeIt = lineTypeNames.find( m_lines.front()->GetDefaultStyle() );
wxCHECK_RET( typeIt != lineTypeNames.end(),
"Default line type not found line dialogs line type lookup map" );
m_typeCombo->SetSelection( static_cast<int>( typeIt->first ) );
Refresh(); Refresh();
} }
@ -117,13 +194,35 @@ void DIALOG_EDIT_LINE_STYLE::setColor( const COLOR4D& aColor )
bool DIALOG_EDIT_LINE_STYLE::TransferDataFromWindow() bool DIALOG_EDIT_LINE_STYLE::TransferDataFromWindow()
{ {
m_frame->SaveCopyInUndoList( m_line, UR_CHANGED ); for( auto& line : m_lines )
{
m_frame->SaveCopyInUndoList( line, UR_CHANGED );
m_line->SetLineWidth( m_width.GetValue() ); if( !m_width.IsIndeterminate() )
m_line->SetLineStyle( m_lineStyle->GetSelection() ); {
m_line->SetLineColor( m_selectedColor ); line->SetLineWidth( m_width.GetValue() );
}
if( m_typeCombo->GetSelection() != wxNOT_FOUND )
{
int selection = m_typeCombo->GetSelection();
wxCHECK_MSG( selection < lineTypeNames.size(), false,
"Selected line type index exceeds size of line type lookup map" );
auto it = lineTypeNames.begin();
std::advance( it, selection );
line->SetLineStyle( it->first );
}
if( m_selectedColor != COLOR4D::UNSPECIFIED )
{
line->SetLineColor( m_selectedColor );
}
m_frame->RefreshItem( line );
}
m_frame->RefreshItem( m_line );
m_frame->GetCanvas()->Refresh(); m_frame->GetCanvas()->Refresh();
m_frame->OnModify(); m_frame->OnModify();

View File

@ -36,14 +36,14 @@ class SCH_LINE;
class DIALOG_EDIT_LINE_STYLE : public DIALOG_EDIT_LINE_STYLE_BASE class DIALOG_EDIT_LINE_STYLE : public DIALOG_EDIT_LINE_STYLE_BASE
{ {
public: public:
DIALOG_EDIT_LINE_STYLE( SCH_EDIT_FRAME* aParent, SCH_LINE* aLine ); DIALOG_EDIT_LINE_STYLE( SCH_EDIT_FRAME* aParent, std::deque<SCH_LINE*>& lines );
bool TransferDataToWindow() override; bool TransferDataToWindow() override;
bool TransferDataFromWindow() override; bool TransferDataFromWindow() override;
private: private:
SCH_EDIT_FRAME* m_frame; SCH_EDIT_FRAME* m_frame;
SCH_LINE* m_line; std::deque<SCH_LINE*> m_lines;
UNIT_BINDER m_width; UNIT_BINDER m_width;
COLOR4D m_selectedColor; COLOR4D m_selectedColor;

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 19 2018) // C++ code generated with wxFormBuilder (version Oct 26 2018)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO *NOT* EDIT THIS FILE! // PLEASE DO *NOT* EDIT THIS FILE!
@ -21,11 +21,8 @@ DIALOG_EDIT_LINE_STYLE_BASE::DIALOG_EDIT_LINE_STYLE_BASE( wxWindow* parent, wxWi
wxBoxSizer* mainSizer; wxBoxSizer* mainSizer;
mainSizer = new wxBoxSizer( wxVERTICAL ); mainSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bSizerUpper;
bSizerUpper = new wxBoxSizer( wxHORIZONTAL );
wxStaticBoxSizer* sbSizerGeneral; mainSizer->Add( 0, 0, 1, wxEXPAND, 5 );
sbSizerGeneral = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("General:") ), wxVERTICAL );
wxFlexGridSizer* fgSizerGeneral; wxFlexGridSizer* fgSizerGeneral;
fgSizerGeneral = new wxFlexGridSizer( 0, 3, 0, 0 ); fgSizerGeneral = new wxFlexGridSizer( 0, 3, 0, 0 );
@ -33,40 +30,45 @@ DIALOG_EDIT_LINE_STYLE_BASE::DIALOG_EDIT_LINE_STYLE_BASE( wxWindow* parent, wxWi
fgSizerGeneral->SetFlexibleDirection( wxBOTH ); fgSizerGeneral->SetFlexibleDirection( wxBOTH );
fgSizerGeneral->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); fgSizerGeneral->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_staticTextWidth = new wxStaticText( sbSizerGeneral->GetStaticBox(), wxID_ANY, _("Width:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextWidth = new wxStaticText( this, wxID_ANY, _("Width:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextWidth->Wrap( -1 ); m_staticTextWidth->Wrap( -1 );
fgSizerGeneral->Add( m_staticTextWidth, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); fgSizerGeneral->Add( m_staticTextWidth, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_lineWidth = new wxTextCtrl( sbSizerGeneral->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 ); m_lineWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 );
m_lineWidth->SetMinSize( wxSize( 80,-1 ) ); m_lineWidth->SetMinSize( wxSize( 80,-1 ) );
fgSizerGeneral->Add( m_lineWidth, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 ); fgSizerGeneral->Add( m_lineWidth, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
m_staticWidthUnits = new wxStaticText( sbSizerGeneral->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticWidthUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticWidthUnits->Wrap( -1 ); m_staticWidthUnits->Wrap( -1 );
fgSizerGeneral->Add( m_staticWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 1 ); m_staticWidthUnits->SetMinSize( wxSize( 40,-1 ) );
m_staticText5 = new wxStaticText( sbSizerGeneral->GetStaticBox(), wxID_ANY, _("Color:"), wxDefaultPosition, wxDefaultSize, 0 ); fgSizerGeneral->Add( m_staticWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_staticText5 = new wxStaticText( this, wxID_ANY, _("Color:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText5->Wrap( -1 ); m_staticText5->Wrap( -1 );
fgSizerGeneral->Add( m_staticText5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); fgSizerGeneral->Add( m_staticText5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_colorButton = new wxBitmapButton( sbSizerGeneral->GetStaticBox(), idColorBtn, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); m_colorButton = new wxBitmapButton( this, idColorBtn, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
fgSizerGeneral->Add( m_colorButton, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_colorButton->SetBitmap( wxNullBitmap );
fgSizerGeneral->Add( m_colorButton, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 3 );
m_staticText4 = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_staticText4->Wrap( -1 );
fgSizerGeneral->Add( m_staticText4, 0, wxALL, 5 );
m_staticText51 = new wxStaticText( this, wxID_ANY, _("Type:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText51->Wrap( -1 );
fgSizerGeneral->Add( m_staticText51, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_typeCombo = new wxBitmapComboBox( this, wxID_ANY, _("Combo!"), wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY );
m_typeCombo->SetMinSize( wxSize( 140,-1 ) );
fgSizerGeneral->Add( m_typeCombo, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
sbSizerGeneral->Add( fgSizerGeneral, 3, wxEXPAND, 5 ); mainSizer->Add( fgSizerGeneral, 3, wxEXPAND, 5 );
bSizerUpper->Add( sbSizerGeneral, 3, wxALL|wxEXPAND, 5 );
wxString m_lineStyleChoices[] = { _("Solid"), _("Dashed"), _("Dotted"), _("Dash-Dot") };
int m_lineStyleNChoices = sizeof( m_lineStyleChoices ) / sizeof( wxString );
m_lineStyle = new wxRadioBox( this, wxID_ANY, _("Line Style:"), wxDefaultPosition, wxDefaultSize, m_lineStyleNChoices, m_lineStyleChoices, 4, wxRA_SPECIFY_ROWS );
m_lineStyle->SetSelection( 1 );
bSizerUpper->Add( m_lineStyle, 2, wxALL|wxEXPAND, 5 );
mainSizer->Add( bSizerUpper, 0, wxEXPAND, 5 );
mainSizer->Add( 0, 0, 1, wxALL|wxEXPAND, 1 ); mainSizer->Add( 0, 0, 1, wxALL|wxEXPAND, 1 );

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project> <wxFormBuilder_Project>
<FileVersion major="1" minor="13" /> <FileVersion major="1" minor="15" />
<object class="Project" expanded="1"> <object class="Project" expanded="1">
<property name="class_decoration"></property> <property name="class_decoration"></property>
<property name="code_generation">C++</property> <property name="code_generation">C++</property>
@ -45,50 +45,14 @@
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">DIALOG_EDIT_LINE_STYLE_BASE</property> <property name="name">DIALOG_EDIT_LINE_STYLE_BASE</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size">298,204</property> <property name="size">325,180</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property> <property name="style">wxDEFAULT_DIALOG_STYLE</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property> <property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">Line Style</property> <property name="title">Line Style</property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnActivate"></event>
<event name="OnActivateApp"></event>
<event name="OnAuiFindManager"></event>
<event name="OnAuiPaneButton"></event>
<event name="OnAuiPaneClose"></event>
<event name="OnAuiPaneMaximize"></event>
<event name="OnAuiPaneRestore"></event>
<event name="OnAuiRender"></event>
<event name="OnChar"></event>
<event name="OnClose"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnHibernate"></event>
<event name="OnIconize"></event>
<event name="OnIdle"></event>
<event name="OnInitDialog"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
<object class="wxBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">mainSizer</property> <property name="name">mainSizer</property>
@ -97,25 +61,13 @@
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1"> <object class="spacer" expanded="1">
<property name="minimum_size"></property> <property name="height">0</property>
<property name="name">bSizerUpper</property> <property name="permission">protected</property>
<property name="orient">wxHORIZONTAL</property> <property name="width">0</property>
<property name="permission">none</property> </object>
<object class="sizeritem" expanded="1"> </object>
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">3</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">General:</property>
<property name="minimum_size"></property>
<property name="name">sbSizerGeneral</property>
<property name="orient">wxVERTICAL</property>
<property name="parent">1</property>
<property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND</property>
@ -165,6 +117,7 @@
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Width:</property> <property name="label">Width:</property>
<property name="markup">0</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -190,29 +143,6 @@
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<property name="wrap">-1</property> <property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
@ -251,7 +181,7 @@
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="maxlength">0</property> <property name="maxlength">0</property>
<property name="min_size">20,-1</property> <property name="min_size">-1,-1</property>
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size">80,-1</property> <property name="minimum_size">80,-1</property>
<property name="moveable">1</property> <property name="moveable">1</property>
@ -277,37 +207,10 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnText"></event>
<event name="OnTextEnter"></event>
<event name="OnTextMaxLen"></event>
<event name="OnTextURL"></event>
<event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
<property name="border">1</property> <property name="border">3</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="0"> <object class="wxStaticText" expanded="0">
@ -339,12 +242,13 @@
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">unit</property> <property name="label">unit</property>
<property name="markup">0</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<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">40,-1</property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">m_staticWidthUnits</property> <property name="name">m_staticWidthUnits</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
@ -364,29 +268,6 @@
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<property name="wrap">-1</property> <property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
@ -422,6 +303,7 @@
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Color:</property> <property name="label">Color:</property>
<property name="markup">0</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -440,40 +322,17 @@
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
<property name="subclass">; forward_declare</property> <property name="subclass">; ; Not forward_declare</property>
<property name="toolbar_pane">0</property> <property name="toolbar_pane">0</property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<property name="wrap">-1</property> <property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">3</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property> <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxBitmapButton" expanded="1"> <object class="wxBitmapButton" expanded="1">
@ -494,6 +353,7 @@
<property name="close_button">1</property> <property name="close_button">1</property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
<property name="current"></property>
<property name="default">0</property> <property name="default">0</property>
<property name="default_pane">0</property> <property name="default_pane">0</property>
<property name="disabled"></property> <property name="disabled"></property>
@ -507,9 +367,10 @@
<property name="font"></property> <property name="font"></property>
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="hover"></property>
<property name="id">idColorBtn</property> <property name="id">idColorBtn</property>
<property name="label">MyButton</property> <property name="label">MyButton</property>
<property name="margins"></property>
<property name="markup">0</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -524,11 +385,12 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="pressed"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="selected"></property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style">wxBU_AUTODRAW</property> <property name="style"></property>
<property name="subclass">; forward_declare</property> <property name="subclass">; forward_declare</property>
<property name="toolbar_pane">0</property> <property name="toolbar_pane">0</property>
<property name="tooltip"></property> <property name="tooltip"></property>
@ -540,40 +402,13 @@
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnButtonClick">onColorButtonClicked</event> <event name="OnButtonClick">onColorButtonClicked</event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
</object> <object class="sizeritem" expanded="1">
</object>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxALL</property>
<property name="proportion">2</property> <property name="proportion">0</property>
<object class="wxRadioBox" expanded="0"> <object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -587,7 +422,6 @@
<property name="caption"></property> <property name="caption"></property>
<property name="caption_visible">1</property> <property name="caption_visible">1</property>
<property name="center_pane">0</property> <property name="center_pane">0</property>
<property name="choices">&quot;Solid&quot; &quot;Dashed&quot; &quot;Dotted&quot; &quot;Dash-Dot&quot;</property>
<property name="close_button">1</property> <property name="close_button">1</property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
@ -602,8 +436,8 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Line Style:</property> <property name="label"></property>
<property name="majorDimension">4</property> <property name="markup">0</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -611,7 +445,7 @@
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">m_lineStyle</property> <property name="name">m_staticText4</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
@ -619,44 +453,142 @@
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="selection">1</property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style">wxRA_SPECIFY_ROWS</property> <property name="style"></property>
<property name="subclass">; forward_declare</property> <property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Type:</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_staticText51</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">3</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxBitmapComboBox" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices"></property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size">140,-1</property>
<property name="moveable">1</property>
<property name="name">m_typeCombo</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="selection">-1</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxCB_READONLY</property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property> <property name="toolbar_pane">0</property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="validator_data_type"></property> <property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property> <property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property> <property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property> <property name="validator_variable"></property>
<property name="value">Combo!</property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
</object> </object>
@ -727,29 +659,6 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
@ -769,13 +678,6 @@
<property name="name">m_sdbSizer</property> <property name="name">m_sdbSizer</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<event name="OnApplyButtonClick">resetDefaults</event> <event name="OnApplyButtonClick">resetDefaults</event>
<event name="OnCancelButtonClick"></event>
<event name="OnContextHelpButtonClick"></event>
<event name="OnHelpButtonClick"></event>
<event name="OnNoButtonClick"></event>
<event name="OnOKButtonClick"></event>
<event name="OnSaveButtonClick"></event>
<event name="OnYesButtonClick"></event>
</object> </object>
</object> </object>
</object> </object>

View File

@ -1,12 +1,11 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 19 2018) // C++ code generated with wxFormBuilder (version Oct 26 2018)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO *NOT* EDIT THIS FILE! // PLEASE DO *NOT* EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#ifndef __DIALOG_EDIT_LINE_STYLE_BASE_H__ #pragma once
#define __DIALOG_EDIT_LINE_STYLE_BASE_H__
#include <wx/artprov.h> #include <wx/artprov.h>
#include <wx/xrc/xmlres.h> #include <wx/xrc/xmlres.h>
@ -19,14 +18,13 @@
#include <wx/colour.h> #include <wx/colour.h>
#include <wx/settings.h> #include <wx/settings.h>
#include <wx/textctrl.h> #include <wx/textctrl.h>
#include <wx/bmpbuttn.h>
#include <wx/bitmap.h> #include <wx/bitmap.h>
#include <wx/image.h> #include <wx/image.h>
#include <wx/icon.h> #include <wx/icon.h>
#include <wx/bmpbuttn.h>
#include <wx/button.h> #include <wx/button.h>
#include <wx/bmpcbox.h>
#include <wx/sizer.h> #include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/radiobox.h>
#include <wx/statline.h> #include <wx/statline.h>
#include <wx/dialog.h> #include <wx/dialog.h>
@ -56,7 +54,9 @@ class DIALOG_EDIT_LINE_STYLE_BASE : public DIALOG_SHIM
wxStaticText* m_staticWidthUnits; wxStaticText* m_staticWidthUnits;
wxStaticText* m_staticText5; wxStaticText* m_staticText5;
wxBitmapButton* m_colorButton; wxBitmapButton* m_colorButton;
wxRadioBox* m_lineStyle; wxStaticText* m_staticText4;
wxStaticText* m_staticText51;
wxBitmapComboBox* m_typeCombo;
wxStaticLine* m_staticline; wxStaticLine* m_staticline;
wxStdDialogButtonSizer* m_sdbSizer; wxStdDialogButtonSizer* m_sdbSizer;
wxButton* m_sdbSizerOK; wxButton* m_sdbSizerOK;
@ -71,9 +71,8 @@ class DIALOG_EDIT_LINE_STYLE_BASE : public DIALOG_SHIM
public: public:
bool m_isValid; bool m_isValid;
DIALOG_EDIT_LINE_STYLE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Line Style"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 298,204 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); DIALOG_EDIT_LINE_STYLE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Line Style"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 325,180 ), long style = wxDEFAULT_DIALOG_STYLE );
~DIALOG_EDIT_LINE_STYLE_BASE(); ~DIALOG_EDIT_LINE_STYLE_BASE();
}; };
#endif //__DIALOG_EDIT_LINE_STYLE_BASE_H__

View File

@ -176,7 +176,9 @@ bool SCH_EDIT_TOOL::Init()
}; };
auto propertiesCondition = []( const SELECTION& aSel ) { auto propertiesCondition = []( const SELECTION& aSel ) {
if( aSel.GetSize() != 1 ) if( aSel.GetSize() != 1
&& !( aSel.GetSize() >= 1 && aSel.Front()->Type() == SCH_LINE_T
&& aSel.AreAllItemsIdentical() ) )
return false; return false;
auto item = static_cast<EDA_ITEM*>( aSel.Front() ); auto item = static_cast<EDA_ITEM*>( aSel.Front() );
@ -192,12 +194,25 @@ bool SCH_EDIT_TOOL::Init()
return false; return false;
case SCH_LINE_T: case SCH_LINE_T:
{ {
SCH_LINE* line = static_cast<SCH_LINE*>( item ); const std::deque<EDA_ITEM*> items = aSel.GetItems();
if( !std::all_of( items.begin(), items.end(),
assert( line != nullptr ); [&]( const EDA_ITEM* item )
{
const SCH_LINE* line = dynamic_cast<const SCH_LINE*>( item );
if ( line == nullptr )
{
wxLogWarning(
"Non-line object encountered in selection, this shouldn't have bypassed the preceeding check" );
return false;
}
return line->IsGraphicLine();
} ) )
{
return false;
}
// Only graphic lines support properties in the file format // Only graphic lines support properties in the file format
return line->IsGraphicLine(); return true;
} }
default: default:
return true; return true;
@ -1297,7 +1312,22 @@ int SCH_EDIT_TOOL::Properties( const TOOL_EVENT& aEvent )
if( !line->IsGraphicLine() ) if( !line->IsGraphicLine() )
break; break;
DIALOG_EDIT_LINE_STYLE dlg( m_frame, line ); if( !selection.AreAllItemsIdentical() )
break;
std::deque<SCH_LINE*> lines;
for( auto item : selection.Items() )
{
auto line = dynamic_cast<SCH_LINE*>( item );
assert( line != nullptr );
lines.push_back( line );
}
if( !std::all_of( lines.begin(), lines.end(),
[&]( const SCH_LINE* r ) { return r->IsGraphicLine(); } ) )
break;
DIALOG_EDIT_LINE_STYLE dlg( m_frame, lines );
if( dlg.ShowModal() == wxID_OK ) if( dlg.ShowModal() == wxID_OK )
{ {

View File

@ -250,6 +250,20 @@ public:
m_referencePoint = NULLOPT; m_referencePoint = NULLOPT;
} }
/**
* Checks if all items in the selection are the same KICAD_T type
*
* @return True if all items are the same type, this includes zero or single items
*/
bool AreAllItemsIdentical() const
{
return ( std::all_of( m_items.begin() + 1, m_items.end(),
[&]( const EDA_ITEM* r )
{
return r->Type() == m_items.front()->Type();
} ) );
}
protected: protected:
OPT<VECTOR2I> m_referencePoint; OPT<VECTOR2I> m_referencePoint;
std::deque<EDA_ITEM*> m_items; std::deque<EDA_ITEM*> m_items;