diff --git a/bitmaps_png/CMakeLists.txt b/bitmaps_png/CMakeLists.txt index 322836ed2f..cbef91207f 100644 --- a/bitmaps_png/CMakeLists.txt +++ b/bitmaps_png/CMakeLists.txt @@ -151,6 +151,12 @@ set( BMAPS_MID annotate_down_right annotate_right_down annotate + array_line + array_module + array_pad + array_text + array_target + array_zone auto_associe auto_delete_track auto_track_width @@ -217,6 +223,12 @@ set( BMAPS_MID drag_track_segment drc_off drc + duplicate_line + duplicate_module + duplicate_pad + duplicate_target + duplicate_text + duplicate_zone edges_sketch edit_comp_footprint edit_component @@ -363,9 +375,11 @@ set( BMAPS_MID move_polygon move_rectangle move_sheet + move_target move_text move_track_segment move_track + move_zone move mw_add_gap mw_add_line diff --git a/bitmaps_png/cpp_26/array_footprint.cpp b/bitmaps_png/cpp_26/array_footprint.cpp new file mode 100644 index 0000000000..c7b32372e6 --- /dev/null +++ b/bitmaps_png/cpp_26/array_footprint.cpp @@ -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 + +static const unsigned char png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, + 0xce, 0x00, 0x00, 0x00, 0x79, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xdd, 0x94, 0x41, 0x0a, 0x00, + 0x31, 0x08, 0x03, 0xfd, 0x4a, 0xff, 0x94, 0xff, 0xf6, 0xdc, 0xfd, 0x94, 0x7b, 0xda, 0x43, 0x65, + 0x41, 0xad, 0x90, 0x82, 0x07, 0xc1, 0x8b, 0x0e, 0xc4, 0x18, 0x51, 0x55, 0x61, 0x94, 0xd0, 0x41, + 0x00, 0xd4, 0x2b, 0x3b, 0x0c, 0x60, 0x7a, 0xb5, 0x81, 0xbe, 0x45, 0xb2, 0x86, 0x7a, 0xbd, 0x85, + 0xc8, 0x33, 0xa6, 0xd7, 0xdf, 0x03, 0x65, 0xe4, 0x8b, 0xc8, 0xf6, 0x0b, 0x8a, 0x1c, 0xd4, 0x82, + 0x82, 0x33, 0x97, 0x40, 0x34, 0xe9, 0x7a, 0xb9, 0x8e, 0xf6, 0xb0, 0x6d, 0xb3, 0x2e, 0x2c, 0x43, + 0x25, 0xeb, 0x52, 0x87, 0xad, 0xb8, 0x8e, 0x0b, 0xca, 0x48, 0x71, 0xfa, 0xb0, 0xa9, 0x38, 0xa9, + 0x44, 0x10, 0x0f, 0x44, 0x93, 0xae, 0x97, 0xeb, 0x68, 0x0f, 0xdb, 0x2a, 0xeb, 0x5e, 0x8c, 0x95, + 0x3c, 0x73, 0x5c, 0xe2, 0x55, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, + 0x60, 0x82, +}; + +const BITMAP_OPAQUE array_footprint_xpm[1] = {{ png, sizeof( png ), "array_footprint_xpm" }}; + +//EOF diff --git a/bitmaps_png/cpp_26/array_line.cpp b/bitmaps_png/cpp_26/array_line.cpp new file mode 100644 index 0000000000..0b0911eba6 --- /dev/null +++ b/bitmaps_png/cpp_26/array_line.cpp @@ -0,0 +1,54 @@ + +/* Do not modify this file, it was automatically generated by the + * PNG2cpp CMake script, using a *.png file as input. + */ + +#include + +static const unsigned char png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, + 0xce, 0x00, 0x00, 0x02, 0x51, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xa5, 0x96, 0x4f, 0x6c, 0x4c, + 0x51, 0x14, 0xc6, 0x7f, 0xa3, 0xff, 0xa4, 0xd5, 0x4a, 0x34, 0xb5, 0x20, 0x4d, 0xc5, 0x42, 0x5a, + 0x74, 0xa9, 0x34, 0x44, 0x42, 0x10, 0x82, 0x48, 0x2c, 0x84, 0x88, 0x58, 0x58, 0xd0, 0x8d, 0xda, + 0x48, 0x49, 0xa4, 0xe9, 0x06, 0x8b, 0x62, 0x31, 0xb4, 0xe3, 0xdd, 0x73, 0xdf, 0x8c, 0x69, 0xaa, + 0x99, 0x94, 0x11, 0xed, 0x58, 0xb1, 0x60, 0x67, 0x6d, 0x65, 0x6b, 0x63, 0x67, 0x61, 0x23, 0xb1, + 0x20, 0xd7, 0xe6, 0x78, 0xf3, 0x5a, 0x33, 0xef, 0xde, 0xc6, 0xe2, 0x25, 0x2f, 0x99, 0xef, 0xe4, + 0x77, 0xee, 0x79, 0xe7, 0xfb, 0xee, 0xe0, 0x9c, 0x23, 0xf4, 0x61, 0x8a, 0x75, 0x6b, 0xd2, 0x43, + 0x2e, 0x79, 0x0f, 0x2e, 0x12, 0xc6, 0x10, 0xde, 0x11, 0xd3, 0x1d, 0xa4, 0x37, 0x5c, 0xc4, 0x30, + 0xc1, 0x7b, 0x5a, 0x83, 0x41, 0x08, 0x67, 0x11, 0x7e, 0x23, 0x38, 0x84, 0x9b, 0x01, 0x90, 0x13, + 0x08, 0x35, 0x84, 0x1a, 0x31, 0x87, 0x82, 0x40, 0x58, 0x0e, 0x22, 0xfc, 0x54, 0xc8, 0x0b, 0xdf, + 0xf8, 0x88, 0x19, 0x45, 0x58, 0x56, 0xd0, 0x58, 0xd0, 0xe8, 0x88, 0x18, 0x46, 0xf8, 0xae, 0x90, + 0x0f, 0xe4, 0xe9, 0xf0, 0x9c, 0x64, 0x17, 0x42, 0x15, 0xa1, 0x86, 0xe5, 0x36, 0x2e, 0xe0, 0x1b, + 0x61, 0x19, 0x40, 0xf8, 0xaa, 0x90, 0x4f, 0x44, 0x6c,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x11, 0x84, 0x2a, 0x96, 0x87, 0x94, 0x58, 0x1f, 0x9c, 0x75, 0xce, + 0x39, 0x98, 0x65, 0x3b, 0x73, 0x75, 0x83, 0x05, 0x04, 0xeb, 0x10, 0xf3, 0xf4, 0x04, 0xeb, 0xd7, + 0xf2, 0x87, 0xf0, 0x7f, 0x9e, 0x3f, 0x6d, 0x57, 0x45, 0xa7, 0xea, 0xac, 0xbd, 0xc8, 0x00, 0x00, + 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, +}; + +const BITMAP_OPAQUE array_line_xpm[1] = {{ png, sizeof( png ), "array_line_xpm" }}; + +//EOF diff --git a/bitmaps_png/cpp_26/array_module.cpp b/bitmaps_png/cpp_26/array_module.cpp new file mode 100644 index 0000000000..deb7ef121f --- /dev/null +++ b/bitmaps_png/cpp_26/array_module.cpp @@ -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 + +static const unsigned char png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, + 0xce, 0x00, 0x00, 0x00, 0x79, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xdd, 0x94, 0x41, 0x0a, 0x00, + 0x31, 0x08, 0x03, 0xfd, 0x4a, 0xff, 0x94, 0xff, 0xf6, 0xdc, 0xfd, 0x94, 0x7b, 0xda, 0x43, 0x65, + 0x41, 0xad, 0x90, 0x82, 0x07, 0xc1, 0x8b, 0x0e, 0xc4, 0x18, 0x51, 0x55, 0x61, 0x94, 0xd0, 0x41, + 0x00, 0xd4, 0x2b, 0x3b, 0x0c, 0x60, 0x7a, 0xb5, 0x81, 0xbe, 0x45, 0xb2, 0x86, 0x7a, 0xbd, 0x85, + 0xc8, 0x33, 0xa6, 0xd7, 0xdf, 0x03, 0x65, 0xe4, 0x8b, 0xc8, 0xf6, 0x0b, 0x8a, 0x1c, 0xd4, 0x82, + 0x82, 0x33, 0x97, 0x40, 0x34, 0xe9, 0x7a, 0xb9, 0x8e, 0xf6, 0xb0, 0x6d, 0xb3, 0x2e, 0x2c, 0x43, + 0x25, 0xeb, 0x52, 0x87, 0xad, 0xb8, 0x8e, 0x0b, 0xca, 0x48, 0x71, 0xfa, 0xb0, 0xa9, 0x38, 0xa9, + 0x44, 0x10, 0x0f, 0x44, 0x93, 0xae, 0x97, 0xeb, 0x68, 0x0f, 0xdb, 0x2a, 0xeb, 0x5e, 0x8c, 0x95, + 0x3c, 0x73, 0x5c, 0xe2, 0x55, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, + 0x60, 0x82, +}; + +const BITMAP_OPAQUE array_module_xpm[1] = {{ png, sizeof( png ), "array_module_xpm" }}; + +//EOF diff --git a/bitmaps_png/cpp_26/array_pad.cpp b/bitmaps_png/cpp_26/array_pad.cpp new file mode 100644 index 0000000000..9afe012a82 --- /dev/null +++ b/bitmaps_png/cpp_26/array_pad.cpp @@ -0,0 +1,77 @@ + +/* Do not modify this file, it was automatically generated by the + * PNG2cpp CMake script, using a *.png file as input. + */ + +#include + +static const unsigned char png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, + 0xce, 0x00, 0x00, 0x03, 0xbd, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xbd, 0x96, 0xdd, 0x4b, 0x54, + 0x41, 0x18, 0xc6, 0x67, 0x3f, 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 0x20, 0x1d, 0xd6, 0xe7, 0x9c, 0xed, 0x5e, + 0x82, 0xb0, 0x30, 0xee, 0x22, 0xf1, 0xe4, 0x44, 0xa4, 0x4a, 0x5e, 0xc3, 0x44, 0x4a, 0xc9, 0x19, + 0x06, 0xc1, 0x8d, 0x89, 0x2a, 0x48, 0x72, 0x22, 0x64, 0x64, 0x12, 0x93, 0x59, 0x64, 0xbf, 0x89, + 0x08, 0x97, 0xb0, 0x3d, 0x22, 0x05, 0x32, 0x20, 0x07, 0xb2, 0x20, 0x0f, 0x32, 0xed, 0x45, 0x3a, + 0xe6, 0xfe, 0x55, 0x3a, 0x12, 0x27, 0xfa, 0x8e, 0x14, 0xf4, 0xe5, 0x75, 0xf5, 0xac, 0xb4, 0x86, + 0x9c, 0xe4, 0xf6, 0xaf, 0x76, 0x56, 0x07, 0x87, 0xce, 0x76, 0xc8, 0x02, 0x51, 0x37, 0x99, 0x36, + 0x83, 0xe5, 0x19, 0x0d, 0x0e, 0x17, 0x45, 0x18, 0xe3, 0x8c, 0x67, 0x2e, 0x6b, 0xb0, 0x56, 0x42, + 0x33, 0x60, 0xc5, 0xdc, 0xde, 0x93, 0x3d, 0x0c, 0xb6, 0xe7, 0x2b, 0xc3, 0x85, 0x62, 0x55, 0x2c, + 0x8b, 0x75, 0xe9, 0x83, 0x4c, 0x47, 0xe6, 0xb2, 0xf7, 0xc5, 0x91, 0x60, 0x7b, 0x52, 0x7b, 0xcb, + 0x5a, 0x3b, 0xec, 0xad, 0xef, 0x13, 0x39, 0x5c, 0x1c, 0x32, 0x0e, 0x9b, 0x39, 0x80, 0x15, 0x1c, + 0x42, 0xda, 0x2c, 0xc4, 0xae, 0x69, 0xeb, 0x7c, 0xc4, 0x1d, 0x58, 0x8f, 0x73, 0x60, 0x2d, 0xef, + 0x6d, 0xda, 0x49, 0x0f, 0x2c, 0x65, 0x82, 0x72, 0xc1, 0x4e, 0x28, 0x1f, 0x52, 0x46, 0xee, 0x39, + 0x3b, 0x61, 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0x35, 0x96, 0xde, 0x98, 0xf6, 0x62, 0x4f, 0x8f, + 0x93, 0x6d, 0x9d, 0xe4, 0x8c, 0xa7, 0x13, 0x4f, 0x28, 0x63, 0xcf, 0x7d, 0x7d, 0x6e, 0xfd, 0x4b, + 0xfc, 0x01, 0x33, 0x8a, 0x28, 0x8c, 0xb5, 0xeb, 0xec, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, + 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, +}; + +const BITMAP_OPAQUE array_pad_xpm[1] = {{ png, sizeof( png ), "array_pad_xpm" }}; + +//EOF diff --git a/bitmaps_png/cpp_26/array_target.cpp b/bitmaps_png/cpp_26/array_target.cpp new file mode 100644 index 0000000000..e5b52092cb --- /dev/null +++ b/bitmaps_png/cpp_26/array_target.cpp @@ -0,0 +1,51 @@ + +/* Do not modify this file, it was automatically generated by the + * PNG2cpp CMake script, using a *.png file as input. + */ + +#include + +static const unsigned char png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, + 0xce, 0x00, 0x00, 0x02, 0x22, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xbd, 0x94, 0x4f, 0x4b, 0x1b, + 0x41, 0x18, 0x87, 0x67, 0xc1, 0x59, 0xdd, 0x4d, 0xb6, 0x69, 0x24, 0xb6, 0xb6, 0x62, 0xbd, 0x0a, + 0x31, 0x15, 0x94, 0x5d, 0x12, 0x6a, 0xbd, 0xd9, 0xcf, 0xe1, 0xb9, 0x58, 0xe8, 0x27, 0x29, 0x3d, + 0xf5, 0xd8, 0x4b, 0xa1, 0xe0, 0x45, 0xb1, 0xc1, 0x4b, 0xa1, 0x9d, 0x0f, 0xe0, 0xd5,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0x03, 0x53, 0x67, 0xff, 0x23, 0x60, + 0x54, 0x46, 0x1b, 0x01, 0xd1, 0x2e, 0x2a, 0xf1, 0xa5, 0xf7, 0x6b, 0xd4, 0x7f, 0x04, 0x8c, 0xca, + 0x68, 0x23, 0x20, 0xda, 0x45, 0x25, 0x7d, 0xc8, 0xf2, 0x58, 0x67, 0x40, 0x33, 0x40, 0xf5, 0x07, + 0xf2, 0x67, 0xb5, 0x22, 0xde, 0x67, 0x72, 0x06, 0xa3, 0x19, 0x20, 0x93, 0xb3, 0x5b, 0x0d, 0xc4, + 0xce, 0x48, 0x67, 0xb8, 0x57, 0xaf, 0xcb, 0x9a, 0x34, 0x09, 0x53, 0xcd, 0x64, 0x90, 0x65, 0x4d, + 0x35, 0xb3, 0x41, 0x96, 0x31, 0xd5, 0x5c, 0x06, 0x59, 0xd8, 0x54, 0xf3, 0x1a, 0x64, 0x19, 0x53, + 0xcd, 0x65, 0x90, 0x45, 0x4d, 0x55, 0xdd, 0x4b, 0x14, 0x31, 0xc8, 0xc2, 0xa6, 0x9a, 0xd7, 0x20, + 0xcb, 0x98, 0x6a, 0x2e, 0x83, 0x2c, 0x6b, 0xaa, 0x99, 0x0d, 0x72, 0x12, 0xa6, 0x9a, 0xc9, 0x20, + 0x27, 0x6d, 0xaa, 0x13, 0xf5, 0xba, 0xff, 0x0c, 0x96, 0xd3, 0x5f, 0x78, 0x1d, 0xd5, 0x5b, 0x00, + 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, +}; + +const BITMAP_OPAQUE array_target_xpm[1] = {{ png, sizeof( png ), "array_target_xpm" }}; + +//EOF diff --git a/bitmaps_png/cpp_26/array_text.cpp b/bitmaps_png/cpp_26/array_text.cpp new file mode 100644 index 0000000000..37aa012460 --- /dev/null +++ b/bitmaps_png/cpp_26/array_text.cpp @@ -0,0 +1,39 @@ + +/* Do not modify this file, it was automatically generated by the + * PNG2cpp CMake script, using a *.png file as input. + */ + +#include + +static const unsigned char png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, + 0xce, 0x00, 0x00, 0x01, 0x59, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xed, 0x96, 0xb1, 0x6a, 0x02, + 0x41, 0x10, 0x86, 0x07, 0x7c, 0x06, 0xad, 0x0c, 0xd8, 0x48, 0xb0, 0x31, 0x36, 0xd6, 0x22, 0x58, + 0x5a, 0xa4, 0xb8, 0x4a, 0xc8, 0x1b, 0x58, 0xa5, 0xca, 0x95, 0xa9, 0x7c, 0x82, 0x20, 0xec, 0xed, + 0xa9, 0x98, 0xce, 0xca, 0x60, 0x93, 0xd6, 0x77, 0xb1, 0xf0, 0x1d, 0x0c, 0x5c, 0x66, 0x6f, 0xe6, + 0xbc, 0xec, 0xe6, 0x76, 0xdd, 0x1c, 0x41, 0x10, 0xee, 0xe0, 0x67, 0x6f, 0x66, 0xff, 0xe1, 0x63, + 0xef, 0x98, 0x61, 0x21, 0x49, 0x12, 0xb8, 0x86, 0xf0, 0x91, 0x53, 0x80, 0xe8, 0xe8, 0x2f, 0xe5, + 0x17, 0x63, 0x7c, 0x7f, 0xf7, 0x97, 0xf2, 0x43, 0xf4, 0x82, 0x42, 0x64, 0x74, 0x40, 0x7d, 0xa2, + 0xf6, 0x1c, 0x67, 0xda, 0x73, 0xfe, 0xc0, 0xb1, 0xf2, 0x07, 0xa8, 0x1d, 0x6a, 0x85, 0xe0, 0x57, + 0x5c, 0x67, 0x1c, 0x67, 0x9a, 0x71, 0x7e, 0xc5, 0x71, 0x90, 0x81, 0xbe, 0x90, 0xda, 0xa7, 0x23, + 0xce, 0x5b, 0x3a, 0x68, 0xde, 0xa2, 0xbc, 0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x35, 0xe6, 0xdc, + 0x0a, 0x2d, 0xd7, 0xa5, 0xd0, 0x31, 0xeb, 0xbc, 0x6a, 0xe0, 0x5a, 0x17, 0xc8, 0x6f, 0x28, 0x7d, + 0x35, 0x0d, 0xec, 0xf1, 0xfb, 0x82, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, + 0x60, 0x82, +}; + +const BITMAP_OPAQUE array_text_xpm[1] = {{ png, sizeof( png ), "array_text_xpm" }}; + +//EOF diff --git a/bitmaps_png/cpp_26/array_zone.cpp b/bitmaps_png/cpp_26/array_zone.cpp new file mode 100644 index 0000000000..211aed3385 --- /dev/null +++ b/bitmaps_png/cpp_26/array_zone.cpp @@ -0,0 +1,51 @@ + +/* Do not modify this file, it was automatically generated by the + * PNG2cpp CMake script, using a *.png file as input. + */ + +#include + +static const unsigned char png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, + 0xce, 0x00, 0x00, 0x02, 0x1a, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xcd, 0x94, 0x3d, 0x88, 0x13, + 0x41, 0x18, 0x86, 0xe7, 0x40, 0xbb, 0x20, 0xe1, 0x1a, 0x13, 0x3b, 0xb1, 0xb3, 0xb0, 0xbf, 0x43, + 0x0e, 0xe5, 0x38, 0xbd, 0xd2, 0x46, 0x10, 0x04, 0x0b, 0x0b, 0x4b, 0xb9, 0xce, 0x9f, 0xc2, 0xcc, + 0x9a, 0x9d, 0x9d, 0x9f, 0x6c, 0x22, 0xc1, 0x22, 0x6a, 0x27, 0x07, 0x5a, 0x18, 0xb2, 0xe4, 0xe4, + 0x20, 0x46, 0x4c, 0x8a, 0x6b, 0x6c, 0xc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, 0x1c, 0x17, 0x66, 0xdf, 0xfe, 0xfa, 0x1f, 0x51, 0x52, 0x0b, 0xcb, 0x3a, 0x2a, + 0x69, 0x77, 0x60, 0x28, 0x84, 0x3b, 0x2f, 0xa4, 0xfb, 0xc8, 0x88, 0x0c, 0x19, 0x9a, 0x39, 0xc9, + 0x15, 0xab, 0x0d, 0x8f, 0xe2, 0x20, 0x32, 0x38, 0xa4, 0x95, 0xa5, 0xd9, 0x2c, 0xae, 0x60, 0x09, + 0xe3, 0x67, 0xc8, 0x54, 0x59, 0x37, 0x3d, 0xa8, 0x1a, 0x02, 0xd2, 0x06, 0xaa, 0x46, 0x80, 0xb4, + 0x81, 0xaa, 0x11, 0x20, 0x6d, 0xa0, 0x6a, 0x04, 0x48, 0x1b, 0xa8, 0x1a, 0x01, 0xd2, 0x06, 0xaa, + 0x46, 0x80, 0xb4, 0x81, 0xaa, 0x11, 0x20, 0x6d, 0xa0, 0x6a, 0x04, 0x48, 0x1b, 0xa8, 0x1a, 0x01, + 0xd2, 0x06, 0xaa, 0x46, 0x80, 0xfc, 0x77, 0xa8, 0x1a, 0x02, 0xf2, 0xbf, 0x86, 0xea, 0x2f, 0x73, + 0x29, 0x07, 0xb2, 0xe7, 0xc3, 0x61, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, + 0x42, 0x60, 0x82, +}; + +const BITMAP_OPAQUE array_zone_xpm[1] = {{ png, sizeof( png ), "array_zone_xpm" }}; + +//EOF diff --git a/bitmaps_png/cpp_26/duplicate_footprint.cpp b/bitmaps_png/cpp_26/duplicate_footprint.cpp new file mode 100644 index 0000000000..e811930db6 --- /dev/null +++ b/bitmaps_png/cpp_26/duplicate_footprint.cpp @@ -0,0 +1,43 @@ + +/* Do not modify this file, it was automatically generated by the + * PNG2cpp CMake script, using a *.png file as input. + */ + +#include + +static const unsigned char png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, + 0xce, 0x00, 0x00, 0x01, 0xa4, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0x63, 0xf8, 0xff, 0xff, 0x3f, + 0x03, 0x3d, 0x30, 0x0a, 0x27, 0x24, 0x24, 0xe4, 0x3f, 0x0c, 0x13, 0xc3, 0xa7, 0xc8, 0x22, 0x86, + 0x93, 0x8a, 0x28, 0x06, 0xe3, 0xe2, 0x2f, 0x61, 0x60, 0xe0, 0x03, 0x62, 0x4f, 0x20, 0xae, 0x58, + 0xcc, 0xc0, 0x10, 0xbc, 0x9c, 0x81, 0x41, 0x96, 0xa0, 0x45, 0xc8, 0x2e, 0x85, 0x19, 0x84, 0x8f, + 0x9f, 0x65, 0x67, 0xf7, 0x7f, 0x31, 0x23, 0x23, 0xc8, 0x32, 0x30, 0x5e, 0xc3, 0xc2, 0xf2, 0x73, + 0x19, 0x23, 0xe3, 0xb7, 0xa5, 0x0c, 0x0c, 0x76, 0x04, 0x2d, 0x22, 0x25, 0xe8, 0xc2, 0x03, 0x03, + 0xff, 0x2f, 0x62, 0x60, 0xd0, 0xc9, 0xb0, 0xb7, 0xff, 0xbf, 0x8c, 0x89, 0xa9, 0x72, 0x39, 0x23, + 0xe3, 0xe7, 0x63, 0x42, 0x42, 0x20, 0xf6, 0x27, 0xa0, 0xcf, 0x14, 0x08, 0xf9, 0x28, 0x28, 0x3a, + 0x3a, 0x9a, 0x8f, 0x94, 0x70, 0x87, 0x39, 0x00, 0xe8, 0xab, 0xc0, 0x4d, 0xec, 0xec, 0x9f, 0x80, + 0x96, 0xfd, 0x02, 0x5a, 0xd6, 0x45, 0xc8, 0xa2, 0x43, 0x40, 0xbc, 0x81, 0x1c, 0x8b, 0x80, 0xc6, + 0x30, 0x02, 0x83, 0x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5, 0x93, 0x6c, 0x11, 0x31, 0x41, + 0x85, 0x8d, 0x4f, 0x8e, 0x8f, 0x6c, 0xd3, 0xd2, 0xd2, 0xb8, 0x48, 0xcc, 0x02, 0x64, 0x59, 0x34, + 0x31, 0x38, 0x38, 0xb8, 0x85, 0xe6, 0x16, 0x79, 0x7a, 0x7a, 0xb2, 0x03, 0xe9, 0x3d, 0xa4, 0xf8, + 0x8a, 0x5c, 0x1f, 0x4d, 0x02, 0xfa, 0x68, 0x02, 0x3d, 0x82, 0xce, 0x33, 0x34, 0x34, 0x94, 0x99, + 0xe6, 0x16, 0xd1, 0x33, 0xd5, 0xd1, 0x3e, 0x1f, 0x21, 0x5b, 0x88, 0xaf, 0x24, 0xa0, 0xb8, 0x64, + 0xc0, 0xe6, 0x33, 0xb2, 0xcb, 0x3a, 0x5a, 0x62, 0x00, 0x66, 0x05, 0x94, 0x24, 0x1f, 0x97, 0xfe, + 0x47, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, +}; + +const BITMAP_OPAQUE duplicate_footprint_xpm[1] = {{ png, sizeof( png ), "duplicate_footprint_xpm" }}; + +//EOF diff --git a/bitmaps_png/cpp_26/duplicate_line.cpp b/bitmaps_png/cpp_26/duplicate_line.cpp new file mode 100644 index 0000000000..097a1826b7 --- /dev/null +++ b/bitmaps_png/cpp_26/duplicate_line.cpp @@ -0,0 +1,37 @@ + +/* Do not modify this file, it was automatically generated by the + * PNG2cpp CMake script, using a *.png file as input. + */ + +#include + +static const unsigned char png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, + 0xce, 0x00, 0x00, 0x01, 0x41, 0x49, 0x44, 0x41, 0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, + 0x3b, 0xbb, 0x0c, 0x89, 0xd6, 0x57, 0x37, 0x85, 0xc2, 0x67, 0x6b, 0x6e, 0x2e, 0x4d, 0x44, 0x6a, + 0xce, 0x44, 0x31, 0xac, 0x35, 0x3c, 0xaf, 0xff, 0x58, 0x2e, 0x5b, 0x23, 0xd2, 0x8b, 0x61, 0x33, + 0x82, 0xbd, 0x43, 0xc8, 0x8f, 0x54, 0x54, 0x87, 0x62, 0xac, 0x54, 0xf7, 0xb6, 0x54, 0xb2, 0x97, + 0xb3, 0xb3, 0x69, 0x22, 0xf2, 0x76, 0xac, 0x75, 0x6b, 0xa4, 0x13, 0x45, 0xb0, 0x1e, 0x43, 0xda, + 0xd0, 0xfa, 0xbd, 0x13, 0x04, 0xf6, 0xa5, 0x52, 0xb1, 0xcd, 0x4c, 0xe6, 0xb5, 0x0e, 0x5b, 0x23, + 0x7f, 0xba, 0x08, 0x96, 0x8d, 0xc8, 0xdd, 0x79, 0x36, 0xdb, 0xef, 0x04, 0x81, 0x35, 0x22, 0xdd, + 0x13, 0xd0, 0x4e, 0x6a, 0x62, 0x1f, 0xa6, 0x8e, 0x44, 0x6a, 0x11, 0x0c, 0x63, 0x91, 0x5d, 0xe7, + 0x7d, 0x14, 0x42, 0xb5, 0x0e, 0xc5, 0x9f, 0xf4, 0xd1, 0x99, 0x0b, 0x26, 0x40, 0xf4, 0xf7, 0x3e, + 0x27, 0xff, 0xa2, 0xdf, 0xf2, 0x05, 0x63, 0x00, 0xb0, 0xc1, 0xf1, 0xcc, 0x65, 0x5d, 0x00, 0x00, + 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, +}; + +const BITMAP_OPAQUE duplicate_line_xpm[1] = {{ png, sizeof( png ), "duplicate_line_xpm" }}; + +//EOF diff --git a/bitmaps_png/cpp_26/duplicate_module.cpp b/bitmaps_png/cpp_26/duplicate_module.cpp new file mode 100644 index 0000000000..ecf5bcde44 --- /dev/null +++ b/bitmaps_png/cpp_26/duplicate_module.cpp @@ -0,0 +1,43 @@ + +/* Do not modify this file, it was automatically generated by the + * PNG2cpp CMake script, using a *.png file as input. + */ + +#include + +static const unsigned char png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, + 0xce, 0x00, 0x00, 0x01, 0xa4, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0x63, 0xf8, 0xff, 0xff, 0x3f, + 0x03, 0x3d, 0x30, 0x0a, 0x27, 0x24, 0x24, 0xe4, 0x3f, 0x0c, 0x13, 0xc3, 0xa7, 0xc8, 0x22, 0x86, + 0x93, 0x8a, 0x28, 0x06, 0xe3, 0xe2, 0x2f, 0x61, 0x60, 0xe0, 0x03, 0x62, 0x4f, 0x20, 0xae, 0x58, + 0xcc, 0xc0, 0x10, 0xbc, 0x9c, 0x81, 0x41, 0x96, 0xa0, 0x45, 0xc8, 0x2e, 0x85, 0x19, 0x84, 0x8f, + 0x9f, 0x65, 0x67, 0xf7, 0x7f, 0x31, 0x23, 0x23, 0xc8, 0x32, 0x30, 0x5e, 0xc3, 0xc2, 0xf2, 0x73, + 0x19, 0x23, 0xe3, 0xb7, 0xa5, 0x0c, 0x0c, 0x76, 0x04, 0x2d, 0x22, 0x25, 0xe8, 0xc2, 0x03, 0x03, + 0xff, 0x2f, 0x62, 0x60, 0xd0, 0xc9, 0xb0, 0xb7, 0xff, 0xbf, 0x8c, 0x89, 0xa9, 0x72, 0x39, 0x23, + 0xe3, 0xe7, 0x63, 0x42, 0x42, 0x20, 0xf6, 0x27, 0xa0, 0xcf, 0x14, 0x08, 0xf9, 0x28, 0x28, 0x3a, + 0x3a, 0x9a, 0x8f, 0x94, 0x70, 0x87, 0x39, 0x00, 0xe8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x3f, 0x0c, 0x63, 0xe3, 0x53, 0x5c, 0xd6, 0x21, 0x1b, 0xcc, 0x70, 0x4a, 0x71, 0x3f, 0x2e, 0x3e, + 0x56, 0x8b, 0x08, 0x44, 0x3c, 0xdc, 0xa5, 0x30, 0x83, 0x88, 0xe5, 0x93, 0x6c, 0x11, 0x31, 0x41, + 0x85, 0x8d, 0x4f, 0x8e, 0x8f, 0x6c, 0xd3, 0xd2, 0xd2, 0xb8, 0x48, 0xcc, 0x02, 0x64, 0x59, 0x34, + 0x31, 0x38, 0x38, 0xb8, 0x85, 0xe6, 0x16, 0x79, 0x7a, 0x7a, 0xb2, 0x03, 0xe9, 0x3d, 0xa4, 0xf8, + 0x8a, 0x5c, 0x1f, 0x4d, 0x02, 0xfa, 0x68, 0x02, 0x3d, 0x82, 0xce, 0x33, 0x34, 0x34, 0x94, 0x99, + 0xe6, 0x16, 0xd1, 0x33, 0xd5, 0xd1, 0x3e, 0x1f, 0x21, 0x5b, 0x88, 0xaf, 0x24, 0xa0, 0xb8, 0x64, + 0xc0, 0xe6, 0x33, 0xb2, 0xcb, 0x3a, 0x5a, 0x62, 0x00, 0x66, 0x05, 0x94, 0x24, 0x1f, 0x97, 0xfe, + 0x47, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, +}; + +const BITMAP_OPAQUE duplicate_module_xpm[1] = {{ png, sizeof( png ), "duplicate_module_xpm" }}; + +//EOF diff --git a/bitmaps_png/cpp_26/duplicate_pad.cpp b/bitmaps_png/cpp_26/duplicate_pad.cpp new file mode 100644 index 0000000000..7a60b513d4 --- /dev/null +++ b/bitmaps_png/cpp_26/duplicate_pad.cpp @@ -0,0 +1,50 @@ + +/* Do not modify this file, it was automatically generated by the + * PNG2cpp CMake script, using a *.png file as input. + */ + +#include + +static const unsigned char png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, + 0xce, 0x00, 0x00, 0x02, 0x12, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xd5, 0x54, 0x4d, 0x48, 0x54, + 0x51, 0x18, 0x3d, 0xef, 0x4e, 0xf8, 0x83, 0x0c, 0x31, 0x9a, 0x1b, 0x45, 0x66, 0xd1, 0x6a, 0x60, + 0xda, 0xb6, 0x69, 0xe1, 0xaa, 0x89, 0x36, 0x41, 0x20, 0x41, 0xab, 0x20, 0xc6, 0xa5, 0xd0, 0xc2, + 0xad, 0x36, 0x69, 0x30, 0xd0, 0x66, 0x08, 0x5d, 0xd8, 0x22, 0x06, 0x52, 0xf3, 0xe9, 0x4a, 0x26, + 0xa9, 0x45, 0x42, 0x09, 0xea, 0xea, 0x6d, 0x24, 0x10, 0x8d, 0x76, 0x12, 0x21, 0x44, 0x8c, 0xe2, + 0x28, 0xa2, 0xf5, 0x3a, 0xdf, 0x7d, 0xdf, 0x44, 0x0c, 0x09, 0xce, 0xcc, 0xf3, 0x41, 0x8b, 0xc3, + 0x7d, 0xef, 0xfb, 0xee, 0x3d, 0xe7, 0x9e, 0xef, 0xbb, 0xf7, 0xc2, 0xf7, 0x7d, 0x44, 0x81, 0x9a, + 0x1f, 0x38, 0xc8, 0x21, 0x8b, 0x27, 0xf8, 0xc8, 0xb1, 0x6c, 0x11, 0x7c, 0x67, 0x25, 0x17, 0x8a, + 0x10, 0xc9, 0x7a, 0x88, 0x35, 0x62, 0x87, 0xf0, 0x88, 0x65, 0x85, 0xa7, 0x31, 0xc9, 0xf5, 0x34, + 0x25, 0xa4, 0x4e, 0x84, 0x68, 0x8b, 0x28, 0x9d, 0x81, 0x2d, 0x3b, 0xa7, 0x41, 0x67, 0x55, 0x37, + 0x59, 0xdd, 0x75, 0x09, 0x8f, 0xf1, 0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 0x97, 0xe3, 0xf1, + 0xe3, 0x1f, 0xa9, 0x94, 0xbf, 0xdd, 0xd7, 0x27, 0x25, 0xfc, 0x1c, 0xfa, 0x85, 0x2d, 0x02, 0x6d, + 0x24, 0x7e, 0xc1, 0x83, 0x51, 0x11, 0x47, 0xef, 0xe3, 0xf1, 0x7d, 0x0a, 0x0f, 0x5e, 0xd8, 0x13, + 0xc4, 0xbe, 0xdc, 0x9c, 0x33, 0xe6, 0xfb, 0xac, 0xe3, 0x54, 0x78, 0xbf, 0x3a, 0xce, 0x25, 0x54, + 0xff, 0x6d, 0xb7, 0x1b, 0xcb, 0x5c, 0x79, 0x84, 0xc2, 0xed, 0x5b, 0x58, 0xe7, 0xb7, 0x4b, 0xe4, + 0x25, 0x56, 0xbb, 0xb1, 0xc6, 0x45, 0x72, 0xe8, 0x24, 0x9e, 0x11, 0x45, 0xa2, 0x40, 0x3c, 0x55, + 0x14, 0x34, 0x26, 0xb9, 0xce, 0xa6, 0x84, 0xd4, 0x89, 0x10, 0x4d, 0x61, 0x14, 0x23, 0xff, 0x84, + 0xe4, 0x64, 0x8e, 0x3a, 0x6b, 0xd4, 0x4d, 0xc6, 0xee, 0x5a, 0x08, 0x85, 0x36, 0x87, 0x09, 0x62, + 0x46, 0x31, 0x61, 0x63, 0x81, 0x98, 0x38, 0xcb, 0x34, 0x23, 0x94, 0xb7, 0x25, 0x0a, 0xc8, 0x44, + 0x64, 0x92, 0x48, 0x2b, 0x26, 0x6d, 0x2c, 0xc8, 0x49, 0x19, 0xf3, 0xcd, 0x08, 0xb9, 0xb6, 0x1f, + 0x01, 0x99, 0xb8, 0x48, 0xff, 0x95, 0x4b, 0xdb, 0x58, 0x90, 0x93, 0x9e, 0xb9, 0xff, 0x85, 0x50, + 0x64, 0xa5, 0x8b, 0xe8, 0x30, 0x44, 0x75, 0xbc, 0x23, 0xbb, 0xb0, 0xb5, 0x4f, 0x90, 0xf6, 0xcc, + 0xbd, 0x90, 0x27, 0xa8, 0x5e, 0xfc, 0x06, 0x78, 0x64, 0xb7, 0x0e, 0x00, 0x4c, 0xaa, 0xda, 0x00, + 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, +}; + +const BITMAP_OPAQUE duplicate_pad_xpm[1] = {{ png, sizeof( png ), "duplicate_pad_xpm" }}; + +//EOF diff --git a/bitmaps_png/cpp_26/duplicate_target.cpp b/bitmaps_png/cpp_26/duplicate_target.cpp new file mode 100644 index 0000000000..bf4b78ea42 --- /dev/null +++ b/bitmaps_png/cpp_26/duplicate_target.cpp @@ -0,0 +1,63 @@ + +/* Do not modify this file, it was automatically generated by the + * PNG2cpp CMake script, using a *.png file as input. + */ + +#include + +static const unsigned char png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, + 0xce, 0x00, 0x00, 0x02, 0xda, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xcd, 0x96, 0xcf, 0x6b, 0x13, + 0x41, 0x14, 0xc7, 0x67, 0x7f, 0x25, 0xdd, 0x4d, 0xb6, 0x69, 0x24, 0xd5, 0x26, 0xa5, 0x49, 0x0f, + 0x1e, 0x5a, 0xd3, 0x58, 0xb0, 0x6c, 0x4c, 0xb0, 0xea, 0x41, 0xf4, 0xe0, 0xc1, 0xbf, 0xa1, 0x67, + 0xa9, 0xe0, 0xdd, 0x8b, 0xb7, 0xde, 0xd4, 0x53, 0xd1, 0x83, 0x0a, 0xd6, 0xa6, 0x4d, 0x0a, 0x8a, + 0x8d, 0x22, 0x28, 0xed, 0x1e, 0x7a, 0xb3, 0x37, 0x29, 0x6a, 0x8d, 0x0a, 0x7a, 0xb2, 0x50, 0x91, + 0x16, 0x63, 0x62, 0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0xae, + 0x69, 0x6c, 0xda, 0xc5, 0x16, 0x13, 0xcf, 0x07, 0x8c, 0x9d, 0xac, 0xd5, 0x4f, 0x07, 0xaa, 0x0e, + 0x55, 0x85, 0xea, 0x02, 0xcc, 0x09, 0x02, 0x24, 0x1e, 0x8f, 0x73, 0x45, 0x11, 0xb6, 0x99, 0x4b, + 0xaf, 0xd8, 0xa0, 0xa6, 0x1b, 0x16, 0x7d, 0x02, 0x18, 0x94, 0xc1, 0x46, 0x80, 0x60, 0x17, 0x94, + 0x78, 0x14, 0x61, 0xcb, 0xd9, 0x47, 0x34, 0x34, 0xbf, 0xc6, 0x2e, 0x87, 0x02, 0x4a, 0x06, 0xa0, + 0x50, 0x50, 0x99, 0xc1, 0x3b, 0xe6, 0x5b, 0xba, 0x19, 0x90, 0x33, 0x80, 0x82, 0xdd, 0xca, 0x17, + 0xbf, 0x8f, 0xdd, 0x72, 0x2a, 0xa1, 0x31, 0xa4, 0x7a, 0x85, 0x27, 0x27, 0x8e, 0xf7, 0x2d, 0xa5, + 0x53, 0x86, 0x09, 0xd0, 0x6a, 0xfe, 0xb4, 0x39, 0x39, 0x31, 0xf0, 0x82, 0x0e, 0xfa, 0x18, 0xeb, + 0x1d, 0xdf, 0x75, 0x38, 0xb1, 0xd7, 0x23, 0x2c, 0xa6, 0x8c, 0x11, 0x93, 0x2c, 0x35, 0xc9, 0x5a, + 0x0b, 0x54, 0x2e, 0x9c, 0x37, 0x77, 0xde, 0xa7, 0x4d, 0xb2, 0xde, 0xac, 0xc0, 0xb4, 0x8e, 0x40, + 0xb0, 0x87, 0x1a, 0x7b, 0x19, 0x10, 0x00, 0x9c, 0x20, 0x2a, 0x22, 0x0b, 0x06, 0x65, 0xf8, 0xae, + 0x69, 0x90, 0x5b, 0x50, 0x63, 0x67, 0x0d, 0xc3, 0xb0, 0x00, 0x76, 0xd8, 0x20, 0x3b, 0x60, 0x23, + 0x72, 0xd6, 0x16, 0x08, 0x9b, 0xb5, 0x1b, 0x6d, 0x29, 0xc2, 0x49, 0x71, 0x62, 0xa7, 0x02, 0xdb, + 0x42, 0x3b, 0xa0, 0x58, 0xd7, 0xe4, 0x47, 0x1d, 0x59, 0x07, 0xef, 0x91, 0x03, 0xe4, 0x02, 0x39, + 0x71, 0x82, 0xf0, 0x44, 0xee, 0xfa, 0xc3, 0xbd, 0xa6, 0xaa, 0xb2, 0xab, 0x1d, 0x81, 0x50, 0x4d, + 0xa8, 0x2a, 0x54, 0x17, 0x60, 0x4e, 0x10, 0x20, 0xd4, 0xd8, 0xa6, 0xc7, 0x23, 0x3c, 0x6b, 0xa9, + 0xea, 0xea, 0xc0, 0x86, 0x00, 0x83, 0x32, 0xd8, 0x08, 0x10, 0xec, 0x82, 0x92, 0x0a, 0xa4, 0xb5, + 0x3e, 0x6a, 0xa4, 0xcc, 0xba, 0x19, 0x28, 0x67, 0x00, 0x51, 0x63, 0x67, 0xfd, 0x2a, 0x9b, 0x6c, + 0xfa, 0x66, 0x68, 0x13, 0x6a, 0x76, 0xf4, 0x2f, 0xe8, 0xbf, 0x03, 0x35, 0x13, 0x7f, 0x00, 0x00, + 0x4f, 0xfc, 0x7e, 0x5d, 0x89, 0x9f, 0xa7, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, + 0x42, 0x60, 0x82, +}; + +const BITMAP_OPAQUE duplicate_target_xpm[1] = {{ png, sizeof( png ), "duplicate_target_xpm" }}; + +//EOF diff --git a/bitmaps_png/cpp_26/duplicate_text.cpp b/bitmaps_png/cpp_26/duplicate_text.cpp new file mode 100644 index 0000000000..a231825612 --- /dev/null +++ b/bitmaps_png/cpp_26/duplicate_text.cpp @@ -0,0 +1,40 @@ + +/* Do not modify this file, it was automatically generated by the + * PNG2cpp CMake script, using a *.png file as input. + */ + +#include + +static const unsigned char png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, + 0xce, 0x00, 0x00, 0x01, 0x6e, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0x63, 0xf8, 0xff, 0xff, 0x3f, + 0x03, 0x3d, 0x30, 0x84, 0x60, 0x98, 0xfd, 0x9f, 0x54, 0xbc, 0x98, 0x81, 0x41, 0x65, 0x19, 0x03, + 0x83, 0x3d, 0x90, 0xd6, 0x5f, 0xc5, 0xc0, 0xc0, 0x49, 0x75, 0x8b, 0x0c, 0x18, 0xf2, 0xfe, 0xb7, + 0x31, 0x29, 0xfd, 0x5f, 0x02, 0xd4, 0xba, 0x94, 0x81, 0xe1, 0xdf, 0x6a, 0x16, 0x96, 0xaf, 0x2b, + 0x98, 0x98, 0x6e, 0x00, 0x2d, 0x94, 0x24, 0xc5, 0xa2, 0x06, 0xb8, 0x04, 0x92, 0xe1, 0x48, 0x62, + 0x0d, 0x91, 0x4c, 0x5e, 0xff, 0x2b, 0x98, 0x0c, 0xfe, 0x03, 0x0d, 0x9f, 0xb1, 0x92, 0x89, 0xe9, + 0xd2, 0x2a, 0x16, 0x96, 0xef, 0x87, 0x05, 0x05, 0x7f, 0x2f, 0x63, 0x64, 0x7c, 0x39, 0x97, 0x81, + 0x81, 0x97, 0x18, 0x8b, 0x1a, 0x50, 0x24, 0xb0, 0x58, 0x04, 0xb3, 0x0c, 0x59, 0x0c, 0x68, 0xe1, + 0xb4, 0x7d, 0xfc, 0xfc, 0x5f, 0x77, 0xf3, 0xf0, 0x7c, 0x5d, 0xc6, 0xc4, 0x54, 0x8d, 0xd7, 0x22, + 0xac, 0x12, 0x38, 0x2c, 0x42, 0xc7, 0xc0, 0x20, 0xe4, 0x03, 0xfa, 0xe6, 0xfb, 0x3d, 0x05, 0x85, + 0xff, 0xcb, 0x99, 0x98, 0x3e, 0x02, 0x83, 0xd3, 0x0b, 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, 0xb7, 0xa3, 0x15, 0x39, 0xed, 0x20, 0x71, 0x2a, 0x5b, 0x84, 0xbf, 0x7c, 0xa3, 0x7a, 0xd0, + 0x11, 0x83, 0x01, 0xfa, 0xc4, 0x94, 0x7d, 0x09, 0xb7, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, + 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, +}; + +const BITMAP_OPAQUE duplicate_text_xpm[1] = {{ png, sizeof( png ), "duplicate_text_xpm" }}; + +//EOF diff --git a/bitmaps_png/cpp_26/duplicate_zone.cpp b/bitmaps_png/cpp_26/duplicate_zone.cpp new file mode 100644 index 0000000000..a49ffcd039 --- /dev/null +++ b/bitmaps_png/cpp_26/duplicate_zone.cpp @@ -0,0 +1,63 @@ + +/* Do not modify this file, it was automatically generated by the + * PNG2cpp CMake script, using a *.png file as input. + */ + +#include + +static const unsigned char png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, + 0xce, 0x00, 0x00, 0x02, 0xde, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xbd, 0x94, 0x5d, 0x48, 0x14, + 0x51, 0x14, 0xc7, 0xcf, 0xce, 0x8c, 0x48, 0xe2, 0x47, 0x42, 0x09, 0xfa, 0xa0, 0x46, 0xbd, 0xd8, + 0x4b, 0xbd, 0x05, 0x51, 0x46, 0x4a, 0x06, 0x3e, 0x54, 0x2f, 0x41, 0x21, 0x14, 0xf4, 0x18, 0x61, + 0x3e, 0x04, 0x69, 0x5f, 0xde, 0xd5, 0x9d, 0x9d, 0x3b, 0xe3, 0x6a, 0x48, 0x91, 0x59, 0x44, 0xe5, + 0xc7, 0x6e, 0x7e, 0xa4, 0x68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f9, 0x25, 0x36, 0xbf, + 0xdf, 0x22, 0x49, 0x1f, 0x5a, 0x15, 0x65, 0x7e, 0x20, 0x35, 0x75, 0xd1, 0xeb, 0x70, 0x8c, 0x3f, + 0x22, 0x4a, 0x8a, 0x26, 0xa2, 0x8f, 0xba, 0x47, 0x1b, 0xe8, 0xea, 0xee, 0x14, 0x93, 0x93, 0x13, + 0xc2, 0xeb, 0x6b, 0x14, 0xdc, 0x50, 0x57, 0xb4, 0x93, 0xed, 0x78, 0x08, 0x9f, 0xc5, 0xc8, 0x33, + 0x02, 0xf0, 0x5e, 0x7f, 0x4a, 0x4a, 0xa0, 0x37, 0x31, 0x31, 0xe0, 0x95, 0xa4, 0xeb, 0x31, 0x47, + 0x84, 0xb5, 0x64, 0xa4, 0x72, 0xc4, 0x65, 0x54, 0xf8, 0xad, 0xf4, 0xae, 0x02, 0x21, 0x85, 0xc9, + 0x88, 0x66, 0x7e, 0x2c, 0x3b, 0x5b, 0xf8, 0x24, 0xe9, 0x27, 0xd2, 0x59, 0x88, 0xb9, 0xdb, 0x8f, + 0x89, 0xb6, 0x6f, 0xe4, 0x8c, 0x5e, 0x99, 0x6b, 0x05, 0x6a, 0x9e, 0x0b, 0x51, 0x05, 0x15, 0xa6, + 0xf4, 0x45, 0x82, 0xcc, 0xb3, 0xf1, 0x39, 0x1c, 0x9f, 0x86, 0x32, 0x32, 0x44, 0x5f, 0x52, 0xd2, + 0x1c, 0x22, 0x5c, 0xc0, 0x19, 0x0e, 0xac, 0x5f, 0x75, 0x2c, 0x54, 0x75, 0x83, 0xd0, 0x2f, 0x6b, + 0x6c, 0xda, 0x41, 0x80, 0x26, 0x2f, 0xf3, 0x4b, 0x3e, 0x44, 0x3e, 0x1c, 0x16, 0x4d, 0x3e, 0x22, + 0x98, 0x6f, 0x93, 0xe5, 0xc5, 0xd1, 0xac, 0x2c, 0x31, 0x95, 0x93, 0x23, 0xba, 0xe3, 0xe3, 0x67, + 0x00, 0x3f, 0x11, 0xed, 0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, 0xa3, 0x37, 0xfa, 0xd1, + 0x1b, 0xfd, 0xdc, 0x70, 0x2f, 0xab, 0x4a, 0x7d, 0x93, 0xe6, 0x4c, 0x3b, 0x0e, 0x9f, 0x96, 0x2d, + 0x8b, 0x08, 0x65, 0x11, 0x87, 0xf6, 0x75, 0xd5, 0xe5, 0x71, 0x9e, 0x87, 0xcf, 0xf3, 0xad, 0x3a, + 0xa3, 0x33, 0x50, 0x7f, 0x01, 0xcf, 0x3b, 0x88, 0x2e, 0xd2, 0x2e, 0x33, 0xf9, 0xdc, 0x66, 0x57, + 0x5d, 0x31, 0xf4, 0xd4, 0x82, 0x37, 0x98, 0x63, 0xce, 0xd5, 0x9a, 0x62, 0x5e, 0x7c, 0x12, 0xef, + 0x57, 0x36, 0xef, 0x1e, 0x31, 0xaa, 0x0b, 0x95, 0xb5, 0x59, 0x65, 0xe5, 0x78, 0xa2, 0xf2, 0x6e, + 0x1a, 0x65, 0x87, 0xb9, 0xee, 0x7a, 0x60, 0xb7, 0x33, 0xf8, 0xff, 0x72, 0x31, 0xc3, 0xd5, 0x84, + 0xb4, 0x15, 0xe2, 0xac, 0x8e, 0xc1, 0xdf, 0xb1, 0xb5, 0x2d, 0xa8, 0x82, 0x2e, 0xda, 0xee, 0x75, + 0xb1, 0xe8, 0x0f, 0xc0, 0x74, 0xed, 0xb7, 0x43, 0x22, 0xa0, 0x6f, 0x00, 0x00, 0x00, 0x00, 0x49, + 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, +}; + +const BITMAP_OPAQUE duplicate_zone_xpm[1] = {{ png, sizeof( png ), "duplicate_zone_xpm" }}; + +//EOF diff --git a/bitmaps_png/cpp_26/move_target.cpp b/bitmaps_png/cpp_26/move_target.cpp new file mode 100644 index 0000000000..7ba8a6e138 --- /dev/null +++ b/bitmaps_png/cpp_26/move_target.cpp @@ -0,0 +1,67 @@ + +/* Do not modify this file, it was automatically generated by the + * PNG2cpp CMake script, using a *.png file as input. + */ + +#include + +static const unsigned char png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, + 0xce, 0x00, 0x00, 0x03, 0x21, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xbd, 0x94, 0x4b, 0x4c, 0x13, + 0x51, 0x14, 0x86, 0x6f, 0xdb, 0x81, 0x96, 0xb6, 0xd8, 0x97, 0x7d, 0x4c, 0xa7, 0x9d, 0x3e, 0x10, + 0x6c, 0x30, 0x02, 0x0b, 0x7c, 0xe0, 0x13, 0xad, 0xb4, 0x18, 0x4c, 0x04, 0x12, 0xa5, 0xc4, 0x85, + 0x21, 0xb8, 0x75, 0x67, 0x5c, 0xb0, 0x76, 0x6f, 0x5c, 0xf9, 0x88, 0x89, 0xc1, 0x40, 0x81, 0xc6, + 0x40, 0x14, 0x62, 0x5c, 0x01, 0x01, 0x0c, 0x0b, 0x13, 0x62, 0x10, 0x0d, 0x89, 0xdd, 0xb8, 0x37, + 0x90, 0xa0, 0x96, 0x87, 0x8d, 0xc7, 0xfb, 0x8f, 0x14, 0x8b, 0xb1, 0xb1, 0xa5, 0xc8, 0x24, 0x7f, + 0x32, 0x3d, 0x9d, 0x3b, 0xdf, 0x3d, 0xe7, 0xff, 0xef, 0x30, 0x22, 0x62, 0x7b, 0xa1, 0x7f, 0x3f, + 0xc0, 0xd8, 0x65, 0xae, 0xe1, 0xbd, 0x00, 0xc5, 0xb8, 0x26, 0xff, 0x1b, 0x88, 0x5f, 0x36, 0xae, + 0xae, 0x12, 0x81, 0x4d, 0x6b, 0xd4, 0x6c, 0x99, 0xdf, 0xf7, 0x70, 0xd5, 0xef, 0x2a, 0x88, 0x5f, + 0x4d, 0xda, 0x12, 0xb6, 0xec, 0xf7, 0x6a, 0x37, 0x24, 0xc9, 0x41, 0x55, 0x41, 0x03, 0xdd, 0x88, + 0xb9, 0xd6, 0xcb, 0x74, 0xaa, 0x35, 0x5e, 0xbf, 0xc7, 0xff, 0xd7, 0x16, 0x0d, 0x02, 0x44, 0xa7, + 0x55, 0xaf, 0x57, 0x04, 0x25, 0xf2, 0xf9, 0x7c, 0x14, 0x0c, 0x06, 0xe8, 0x5c, 0x83, 0x95, 0x36, + 0x16, 0x6b, 0xe8, 0xd3, 0x4c, 0x2d, 0x9d, 0x39, 0x66, 0x4a, 0xe9, 0x75, 0xec, 0x55, 0x51, 0x20, + 0x8c, 0xab, 0x54, 0x60, 0x2b, 0x07, 0x2a, 0x7c, 0x64, 0x30, 0xe8, 0x51, 0x20, 0xbf, 0xdf, 0x4f, + 0xe1, 0x13, 0x56, 0xfa, 0xfe, 0xc1, 0x47, 0xe9, 0x05, 0x33, 0x2d, 0xcd, 0xd5, 0x92, 0x68, 0x17, + 0x56, 0x35, 0x1a, 0xd6, 0x5d, 0x0c, 0xa8, 0xcb, 0x69, 0xd7, 0xa5, 0x65, 0xd9, 0xab, 0x40, 0xb6, + 0x40, 0x27, 0x33, 0x20, 0x13, 0xa5, 0xdf, 0x3b, 0x69, 0xe4, 0x41, 0x25, 0xed, 0x33, 0xaa, 0x92, + 0x05, 0x83, 0x36, 0x23, 0x1c, 0xe3, 0xc6, 0xbf, 0x76, 0xb9, 0xec, 0x14, 0x08, 0x04, 0x14, 0x00, + 0x24, 0x8a, 0x22, 0x1d, 0x0e, 0x19, 0x69, 0xe4, 0x61, 0x35, 0x07, 0x84, 0x14, 0xf5, 0xdd, 0xad, + 0x26, 0xb5, 0x5a, 0xf5, 0x83, 0xaf, 0xb9, 0xbe, 0x99, 0x4a, 0x39, 0x5f, 0xd0, 0x30, 0x22, 0x8c, + 0x74, 0x55, 0x72, 0xe3, 0xcf, 0x1e, 0xb5, 0x6e, 0x29, 0x54, 0x61, 0x24, 0x6d, 0xa9, 0x40, 0xa2, +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e1, 0x09, 0xc6, + 0x85, 0x4e, 0xf0, 0xf2, 0x68, 0x5c, 0x5c, 0x44, 0x2d, 0x3a, 0x20, 0x4e, 0xb5, 0x4d, 0x7a, 0xd3, + 0xfc, 0x7e, 0xac, 0x71, 0x82, 0x09, 0x3b, 0x02, 0x65, 0x60, 0x48, 0x57, 0xae, 0x30, 0x44, 0xe3, + 0xee, 0x2e, 0xbe, 0x91, 0xf1, 0x2b, 0x09, 0xa6, 0xc9, 0xdb, 0xa3, 0x5c, 0x42, 0x84, 0x91, 0x2e, + 0x18, 0x0f, 0x4f, 0x94, 0x8e, 0x78, 0x27, 0x80, 0x84, 0x7b, 0x1d, 0x0d, 0xd9, 0x90, 0xa2, 0x40, + 0xca, 0xce, 0x79, 0x84, 0x91, 0x2e, 0x18, 0x0f, 0x4f, 0x30, 0xae, 0x3f, 0x3b, 0xd9, 0x15, 0x50, + 0xb6, 0x67, 0x30, 0x1e, 0x9e, 0xfc, 0x0d, 0xb2, 0x2b, 0xa0, 0x2d, 0xcf, 0x78, 0xba, 0x32, 0xc6, + 0xff, 0x37, 0x50, 0x3e, 0xfa, 0x09, 0x65, 0x16, 0x60, 0xbf, 0x0d, 0xb1, 0xac, 0x3b, 0x00, 0x00, + 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, +}; + +const BITMAP_OPAQUE move_target_xpm[1] = {{ png, sizeof( png ), "move_target_xpm" }}; + +//EOF diff --git a/bitmaps_png/cpp_26/move_zone.cpp b/bitmaps_png/cpp_26/move_zone.cpp new file mode 100644 index 0000000000..dd00c175f2 --- /dev/null +++ b/bitmaps_png/cpp_26/move_zone.cpp @@ -0,0 +1,62 @@ + +/* Do not modify this file, it was automatically generated by the + * PNG2cpp CMake script, using a *.png file as input. + */ + +#include + +static const unsigned char png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, + 0xce, 0x00, 0x00, 0x02, 0xcf, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xbd, 0x95, 0xcb, 0x4f, 0x13, + 0x51, 0x14, 0xc6, 0x6f, 0xa2, 0x74, 0xd1, 0x44, 0x8c, 0x1b, 0x71, 0xa6, 0x50, 0x68, 0x54, 0x8c, + 0xb2, 0x70, 0xa1, 0x46, 0xdc, 0x35, 0xa9, 0x76, 0x30, 0x43, 0x42, 0x21, 0xe1, 0x15, 0x56, 0x4d, + 0x17, 0xd6, 0x08, 0xb2, 0x31, 0x04, 0x31, 0xd8, 0x19, 0xe2, 0x3f, 0x60, 0x7c, 0x2c, 0x94, 0x68, + 0x6b, 0xa0, 0x85, 0x06, 0x5f, 0x05, 0x4d, 0x11, 0xd3, 0xd6, 0xc2, 0x46, 0x4c, 0x8c, 0x01, 0x8d, + 0x24, 0xa2, 0xae, 0x74, 0x85, 0x1b, 0x12, 0x10, 0x23, 0xc9, 0xf8, 0x9d, 0xe1, 0x42, 0x0a, 0x42, + 0xd2, 0x99, 0x41, 0x17, 0xbf, 0xde, 0x3b, 0xa7, 0x33, 0xe7, 0xbb, 0xe7, 0x7c, 0x67, 0x5a, 0xa6, + 0x69, 0x1a, 0xfb, 0x1f, 0xac, 0x7c, 0x28, 0x4c, 0x64, 0x2a, 0x3b, 0x6f, 0x18, 0x85, 0x05, 0x41, + 0x61, 0xfe, 0x42, 0x2b, 0x0f, 0x8d, 0x81, 0xc7, 0x06, 0x19, 0x07, 0x6e, 0xa3, 0x42, 0xf4, 0x60, + 0x78, 0x8d, 0x10, 0x7b, 0x88, 0xb5, 0x6f, 0x5d, 0xec, 0x6f, 0x92, 0x56, 0x84, 0x5e, 0x82, 0x41, + 0x70, 0x11, 0xdc, 0xe4, 0x95, 0xc6, 0xb7, 0x5b, 0x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 0xff, 0x4c, + 0x28, 0x1f, 0xfe, 0x00, 0x7b, 0xdc, 0xc2, 0x19, 0xcd, 0xc3, 0x9e, 0x72, 0x00, 0x00, 0x00, 0x00, + 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, +}; + +const BITMAP_OPAQUE move_zone_xpm[1] = {{ png, sizeof( png ), "move_zone_xpm" }}; + +//EOF diff --git a/bitmaps_png/sources/array_line.svg b/bitmaps_png/sources/array_line.svg new file mode 100644 index 0000000000..ba726bf427 --- /dev/null +++ b/bitmaps_png/sources/array_line.svg @@ -0,0 +1,44 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/bitmaps_png/sources/array_module.svg b/bitmaps_png/sources/array_module.svg new file mode 100644 index 0000000000..deea56d3c3 --- /dev/null +++ b/bitmaps_png/sources/array_module.svg @@ -0,0 +1,141 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + diff --git a/bitmaps_png/sources/array_pad.svg b/bitmaps_png/sources/array_pad.svg new file mode 100644 index 0000000000..8d275518ad --- /dev/null +++ b/bitmaps_png/sources/array_pad.svg @@ -0,0 +1,44 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/bitmaps_png/sources/array_target.svg b/bitmaps_png/sources/array_target.svg new file mode 100644 index 0000000000..6ea4156a65 --- /dev/null +++ b/bitmaps_png/sources/array_target.svg @@ -0,0 +1,174 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bitmaps_png/sources/array_text.svg b/bitmaps_png/sources/array_text.svg new file mode 100644 index 0000000000..1ef82e6056 --- /dev/null +++ b/bitmaps_png/sources/array_text.svg @@ -0,0 +1,44 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/bitmaps_png/sources/array_zone.svg b/bitmaps_png/sources/array_zone.svg new file mode 100644 index 0000000000..2c11152927 --- /dev/null +++ b/bitmaps_png/sources/array_zone.svg @@ -0,0 +1,161 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bitmaps_png/sources/duplicate_line.svg b/bitmaps_png/sources/duplicate_line.svg new file mode 100644 index 0000000000..3f19b6fd2f --- /dev/null +++ b/bitmaps_png/sources/duplicate_line.svg @@ -0,0 +1,95 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + diff --git a/bitmaps_png/sources/duplicate_module.svg b/bitmaps_png/sources/duplicate_module.svg new file mode 100644 index 0000000000..965b12e464 --- /dev/null +++ b/bitmaps_png/sources/duplicate_module.svg @@ -0,0 +1,145 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bitmaps_png/sources/duplicate_pad.svg b/bitmaps_png/sources/duplicate_pad.svg new file mode 100644 index 0000000000..6841fbd5e5 --- /dev/null +++ b/bitmaps_png/sources/duplicate_pad.svg @@ -0,0 +1,70 @@ + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/bitmaps_png/sources/duplicate_target.svg b/bitmaps_png/sources/duplicate_target.svg new file mode 100644 index 0000000000..9676b99b16 --- /dev/null +++ b/bitmaps_png/sources/duplicate_target.svg @@ -0,0 +1,164 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bitmaps_png/sources/duplicate_text.svg b/bitmaps_png/sources/duplicate_text.svg new file mode 100644 index 0000000000..419b9452f5 --- /dev/null +++ b/bitmaps_png/sources/duplicate_text.svg @@ -0,0 +1,90 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/bitmaps_png/sources/duplicate_zone.svg b/bitmaps_png/sources/duplicate_zone.svg new file mode 100644 index 0000000000..00417405e1 --- /dev/null +++ b/bitmaps_png/sources/duplicate_zone.svg @@ -0,0 +1,161 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bitmaps_png/sources/move_target.svg b/bitmaps_png/sources/move_target.svg new file mode 100644 index 0000000000..71c5b168bb --- /dev/null +++ b/bitmaps_png/sources/move_target.svg @@ -0,0 +1,227 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bitmaps_png/sources/move_zone.svg b/bitmaps_png/sources/move_zone.svg new file mode 100644 index 0000000000..c9adba4dcc --- /dev/null +++ b/bitmaps_png/sources/move_zone.svg @@ -0,0 +1,169 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/common/base_units.cpp b/common/base_units.cpp index 846c8b0eb3..7cf035c470 100644 --- a/common/base_units.cpp +++ b/common/base_units.cpp @@ -97,6 +97,9 @@ double To_User_Unit( EDA_UNITS_T aUnit, double aValue ) case INCHES: return IU_TO_IN( aValue ); + case DEGREES: + return aValue / 10.0f; + default: return aValue; } @@ -246,6 +249,10 @@ wxString StringFromValue( EDA_UNITS_T aUnit, int aValue, bool aAddUnitSymbol ) stringValue += _( " mm" ); break; + case DEGREES: + stringValue += _( " deg" ); + break; + case UNSCALED_UNITS: break; } @@ -277,6 +284,11 @@ double From_User_Unit( EDA_UNITS_T aUnit, double aValue ) value = IN_TO_IU( aValue ); break; + case DEGREES: + // Convert to "decidegrees" + value = aValue * 10; + break; + default: case UNSCALED_UNITS: value = aValue; @@ -286,7 +298,7 @@ double From_User_Unit( EDA_UNITS_T aUnit, double aValue ) } -int ValueFromString( EDA_UNITS_T aUnits, const wxString& aTextValue ) +double DoubleValueFromString( EDA_UNITS_T aUnits, const wxString& aTextValue ) { double value; double dtmp = 0; @@ -328,22 +340,39 @@ int ValueFromString( EDA_UNITS_T aUnits, const wxString& aTextValue ) // Check the optional unit designator (2 ch significant) wxString unit( buf.Mid( brk_point ).Strip( wxString::leading ).Left( 2 ).Lower() ); - if( unit == wxT( "in" ) || unit == wxT( "\"" ) ) + if( aUnits == INCHES || aUnits == MILLIMETRES ) { - aUnits = INCHES; + if( unit == wxT( "in" ) || unit == wxT( "\"" ) ) + { + aUnits = INCHES; + } + else if( unit == wxT( "mm" ) ) + { + aUnits = MILLIMETRES; + } + else if( unit == wxT( "mi" ) || unit == wxT( "th" ) ) // Mils or thous + { + aUnits = INCHES; + dtmp /= 1000; + } } - else if( unit == wxT( "mm" ) ) + else if( aUnits == DEGREES ) { - aUnits = MILLIMETRES; - } - else if( unit == wxT( "mi" ) || unit == wxT( "th" ) ) // Mils or thous - { - aUnits = INCHES; - dtmp /= 1000; + if( unit == wxT( "ra" ) ) // Radians + { + dtmp *= 180.0f / M_PI; + } } value = From_User_Unit( aUnits, dtmp ); + return value; +} + + +int ValueFromString( EDA_UNITS_T aUnits, const wxString& aTextValue ) +{ + double value = DoubleValueFromString( aUnits, aTextValue ); return KiROUND( value ); } diff --git a/common/block_commande.cpp b/common/block_commande.cpp index 990fa6cee0..73e5223d6c 100644 --- a/common/block_commande.cpp +++ b/common/block_commande.cpp @@ -64,6 +64,7 @@ void BLOCK_SELECTOR::SetMessageBlock( EDA_DRAW_FRAME* frame ) case BLOCK_MOVE: // Move case BLOCK_PRESELECT_MOVE: // Move with preselection list + case BLOCK_MOVE_EXACT: msg = _( "Block Move" ); break; diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index c6781043ba..74faa141c2 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -195,7 +195,8 @@ private: TOOL_MANAGER::TOOL_MANAGER() : - m_model( NULL ), m_view( NULL ), m_viewControls( NULL ), m_editFrame( NULL ) + m_model( NULL ), m_view( NULL ), m_viewControls( NULL ), m_editFrame( NULL ), + m_undoInhibit( false ) { m_actionMgr = new ACTION_MANAGER( this ); @@ -713,3 +714,23 @@ bool TOOL_MANAGER::isActive( TOOL_BASE* aTool ) // Just check if the tool is on the active tools stack return std::find( m_activeTools.begin(), m_activeTools.end(), aTool->GetId() ) != m_activeTools.end(); } + + +void TOOL_MANAGER::IncUndoInhibit() +{ + m_undoInhibit++; +} + + +void TOOL_MANAGER::DecUndoInhibit() +{ + m_undoInhibit--; + + wxASSERT_MSG( m_undoInhibit >= 0, wxT( "Undo inhibit count decremented past zero" ) ); +} + + +bool TOOL_MANAGER::IsUndoInhibited() const +{ + return m_undoInhibit > 0; +} diff --git a/eeschema/block_libedit.cpp b/eeschema/block_libedit.cpp index 794ce6a52e..cf0430110f 100644 --- a/eeschema/block_libedit.cpp +++ b/eeschema/block_libedit.cpp @@ -197,6 +197,9 @@ bool LIB_EDIT_FRAME::HandleBlockEnd( wxDC* DC ) case BLOCK_SELECT_ITEMS_ONLY: break; + + case BLOCK_MOVE_EXACT: + break; } if( !nextCmd ) diff --git a/include/base_units.h b/include/base_units.h index 2858cc7388..c4092b1dd9 100644 --- a/include/base_units.h +++ b/include/base_units.h @@ -148,10 +148,21 @@ wxString& operator <<( wxString& aString, const wxPoint& aPoint ); void PutValueInLocalUnits( wxTextCtrl& aTextCtr, int aValue ); /** - * Return in internal units the value "val" given in inch or mm + * Return in internal units the value "val" given in a real unit + * such as "in", "mm" or "deg" */ double From_User_Unit( EDA_UNITS_T aUnit, double aValue ); + +/** + * Function DoubleValueFromString + * converts \a aTextValue to a double + * @param aUnits The units of \a aTextValue. + * @param aTextValue A reference to a wxString object containing the string to convert. + * @return A double representing that value in internal units + */ +double DoubleValueFromString( EDA_UNITS_T aUnits, const wxString& aTextValue ); + /** * Function ValueFromString * converts \a aTextValue in \a aUnits to internal units used by the application. diff --git a/include/bitmaps.h b/include/bitmaps.h index 3f8482951a..bb77f1cf27 100644 --- a/include/bitmaps.h +++ b/include/bitmaps.h @@ -102,6 +102,12 @@ EXTERN_BITMAP( anchor_xpm ) EXTERN_BITMAP( annotate_down_right_xpm ) EXTERN_BITMAP( annotate_right_down_xpm ) EXTERN_BITMAP( annotate_xpm ) +EXTERN_BITMAP( array_line_xpm ) +EXTERN_BITMAP( array_module_xpm ) +EXTERN_BITMAP( array_pad_xpm ) +EXTERN_BITMAP( array_target_xpm ) +EXTERN_BITMAP( array_text_xpm ) +EXTERN_BITMAP( array_zone_xpm ) EXTERN_BITMAP( auto_associe_xpm ) EXTERN_BITMAP( auto_delete_track_xpm ) EXTERN_BITMAP( auto_track_width_xpm ) @@ -174,6 +180,12 @@ EXTERN_BITMAP( drag_segment_withslope_xpm ) EXTERN_BITMAP( drag_track_segment_xpm ) EXTERN_BITMAP( drc_off_xpm ) EXTERN_BITMAP( drc_xpm ) +EXTERN_BITMAP( duplicate_line_xpm ) +EXTERN_BITMAP( duplicate_module_xpm ) +EXTERN_BITMAP( duplicate_pad_xpm ) +EXTERN_BITMAP( duplicate_target_xpm ) +EXTERN_BITMAP( duplicate_text_xpm ) +EXTERN_BITMAP( duplicate_zone_xpm ) EXTERN_BITMAP( edges_sketch_xpm ) EXTERN_BITMAP( edit_comp_footprint_xpm ) EXTERN_BITMAP( edit_component_xpm ) @@ -332,8 +344,10 @@ EXTERN_BITMAP( move_polygon_xpm ) EXTERN_BITMAP( move_rectangle_xpm ) EXTERN_BITMAP( move_sheet_xpm ) EXTERN_BITMAP( move_text_xpm ) +EXTERN_BITMAP( move_target_xpm ) EXTERN_BITMAP( move_track_segment_xpm ) EXTERN_BITMAP( move_track_xpm ) +EXTERN_BITMAP( move_zone_xpm ) EXTERN_BITMAP( move_xpm ) EXTERN_BITMAP( mw_add_gap_xpm ) EXTERN_BITMAP( mw_add_line_xpm ) diff --git a/include/block_commande.h b/include/block_commande.h index cf2c140237..8d2b94fa0e 100644 --- a/include/block_commande.h +++ b/include/block_commande.h @@ -62,6 +62,7 @@ typedef enum { BLOCK_ZOOM, BLOCK_ABORT, BLOCK_PRESELECT_MOVE, + BLOCK_MOVE_EXACT, BLOCK_SELECT_ITEMS_ONLY, BLOCK_MIRROR_X, BLOCK_MIRROR_Y diff --git a/include/class_board_item.h b/include/class_board_item.h index 19e3f9ab6e..ebbf4bcff5 100644 --- a/include/class_board_item.h +++ b/include/class_board_item.h @@ -78,6 +78,9 @@ class BOARD_ITEM : public EDA_ITEM protected: LAYER_ID m_Layer; + static int getTrailingInt( wxString aStr ); + static int getNextNumberInSequence( std::set aSeq, bool aFillSequenceGaps); + public: BOARD_ITEM( BOARD_ITEM* aParent, KICAD_T idtype ) : @@ -89,6 +92,16 @@ public: virtual const wxPoint& GetPosition() const = 0; + /** + * Function GetCenter() + * + * This defaults to the same point as returned by GetPosition(), unless + * overridden + * + * @return centre point of the item + */ + virtual const wxPoint GetCenter() const { return GetPosition(); } + virtual void SetPosition( const wxPoint& aPos ) = 0; /** diff --git a/include/common.h b/include/common.h index ed663942e9..337196ad60 100644 --- a/include/common.h +++ b/include/common.h @@ -166,7 +166,8 @@ inline int Mils2mm( double x ) { return KiROUND( x * 25.4 / 1000. ); } enum EDA_UNITS_T { INCHES = 0, MILLIMETRES = 1, - UNSCALED_UNITS = 2 + UNSCALED_UNITS = 2, + DEGREES = 3, }; diff --git a/include/id.h b/include/id.h index d37c8149b0..32ea99c4ea 100644 --- a/include/id.h +++ b/include/id.h @@ -158,6 +158,7 @@ enum main_id ID_POPUP_CANCEL_CURRENT_COMMAND, ID_POPUP_CLOSE_CURRENT_TOOL, ID_POPUP_MOVE_BLOCK, + ID_POPUP_MOVE_BLOCK_EXACT, ID_POPUP_DRAG_BLOCK, ID_POPUP_COPY_BLOCK, ID_POPUP_ROTATE_BLOCK, diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index c2011deb2c..af65021201 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -301,6 +301,29 @@ public: return actionList; } + /** + * Increments the undo inhibit counter. This will indicate that tools + * should not create an undo point, as another tool is doing it already, + * and considers that its operation is atomic, even if it calls another one + * (for example a duplicate calls a move) + */ + void IncUndoInhibit(); + + /** + * Decrements the inhibit counter. An assert is raised if the counter drops + * below zero + */ + void DecUndoInhibit(); + + /** + * Report if the tool manager has been told at least once that undo + * points should not be created. This can be ignored if the undo point + * is still required. + * + * @return true if undo are inhibited + */ + bool IsUndoInhibited() const; + private: struct TOOL_STATE; typedef std::pair TRANSITION; @@ -428,6 +451,9 @@ private: /// Flag saying if the currently processed event should be passed to other tools. bool m_passEvent; + + /// Counter of undo inhibitions. When zero, undo is not inhibited + int m_undoInhibit; }; #endif diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 5b999e5d6f..eb4df9c8e0 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -193,6 +193,19 @@ protected: */ void duplicateZone( wxDC* aDC, ZONE_CONTAINER* aZone ); + /** + * Function moveExact + * Move the selected item exactly + */ + void moveExact(); + + /** + * Function duplicateItems + * Duplicate selected item if possible and start a move + * @param aIncrement increment the item number if appropriate + */ + void duplicateItem( bool aIncrement ); + // protected so that PCB::IFACE::CreateWindow() is the only factory. PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ); @@ -459,6 +472,15 @@ public: */ int OnHotkeyCopyItem(); + /** + * Function OnHotkeyDuplicateOrArrayItem + * Duplicate an item (optionally incrementing if necessary and possible) + * or invoke array dialog and create an array + * @param aIdCommand = the hotkey command id + * @return true if item duplicated or arrayed + */ + bool OnHotkeyDuplicateOrArrayItem( int aIdCommand ); + /** * Function OnHotkeyMoveItem * Moves or drag the item (footprint, track, text .. ) found under the mouse cursor diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 0e916943cf..8c021667cc 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -46,6 +46,8 @@ set( PCBNEW_DIALOGS dialogs/dialog_cleaning_options.cpp dialogs/dialog_copper_zones.cpp dialogs/dialog_copper_zones_base.cpp + dialogs/dialog_create_array.cpp + dialogs/dialog_create_array_base.cpp dialogs/dialog_design_rules.cpp dialogs/dialog_design_rules_base.cpp dialogs/dialog_dimension_editor_base.cpp @@ -104,6 +106,8 @@ set( PCBNEW_DIALOGS dialogs/dialog_pcb_text_properties_base.cpp dialogs/dialog_pns_settings.cpp dialogs/dialog_pns_settings_base.cpp + dialogs/dialog_move_exact.cpp + dialogs/dialog_move_exact_base.cpp dialogs/dialog_non_copper_zones_properties.cpp dialogs/dialog_non_copper_zones_properties_base.cpp dialogs/dialog_pad_properties.cpp diff --git a/pcbnew/block_module_editor.cpp b/pcbnew/block_module_editor.cpp index 2898af9260..4a9f1ea0ec 100644 --- a/pcbnew/block_module_editor.cpp +++ b/pcbnew/block_module_editor.cpp @@ -53,14 +53,19 @@ #include #include +#include + #define BLOCK_COLOR BROWN // Functions defined here, but used also in other files -// These 2 functions are used in modedit to rotate or mirror the whole footprint -// so they are called with force_all = true +// These 3 functions are used in modedit to rotate, mirror or move the +// whole footprint so they are called with force_all = true void MirrorMarkedItems( MODULE* module, wxPoint offset, bool force_all = false ); void RotateMarkedItems( MODULE* module, wxPoint offset, bool force_all = false ); +void MoveMarkedItemsExactly( MODULE* module, const wxPoint& centre, + const wxPoint& translation, double rotation, + bool force_all = false ); // Local functions: static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition, @@ -166,6 +171,26 @@ bool FOOTPRINT_EDIT_FRAME::HandleBlockEnd( wxDC* DC ) break; + case BLOCK_MOVE_EXACT: + itemsCount = MarkItemsInBloc( currentModule, GetScreen()->m_BlockLocate ); + + if( itemsCount ) + { + wxPoint translation; + double rotation = 0; + + DIALOG_MOVE_EXACT dialog( this, translation, rotation ); + int ret = dialog.ShowModal(); + + if( ret == DIALOG_MOVE_EXACT::MOVE_OK ) + { + SaveCopyInUndoList( currentModule, UR_MODEDIT ); + const wxPoint blockCentre = GetScreen()->m_BlockLocate.Centre(); + MoveMarkedItemsExactly( currentModule, blockCentre, translation, rotation ); + } + } + break; + case BLOCK_PRESELECT_MOVE: // Move with preselection list nextcmd = true; m_canvas->SetMouseCaptureCallback( DrawMovingBlockOutlines ); @@ -194,7 +219,6 @@ bool FOOTPRINT_EDIT_FRAME::HandleBlockEnd( wxDC* DC ) RotateMarkedItems( currentModule, GetScreen()->m_BlockLocate.Centre() ); break; - case BLOCK_MIRROR_X: case BLOCK_MIRROR_Y: case BLOCK_FLIP: // mirror @@ -706,6 +730,78 @@ void ClearMarkItems( MODULE* module ) } +void MoveMarkedItemsExactly( MODULE* module, const wxPoint& centre, + const wxPoint& translation, + double rotation, bool force_all ) +{ + if( module == NULL ) + return; + + if( module->Reference().IsSelected() || force_all ) + { + module->Reference().RotateTransformWithModule( centre, rotation ); + module->Reference().MoveTransformWithModule( translation ); + } + + if( module->Value().IsSelected() || force_all ) + { + module->Value().RotateTransformWithModule( centre, rotation ); + module->Value().MoveTransformWithModule( translation ); + } + + D_PAD* pad = module->Pads(); + + for( ; pad != NULL; pad = pad->Next() ) + { + if( !pad->IsSelected() && !force_all ) + continue; + + // rotate about centre point, + wxPoint newPos = pad->GetPosition(); + RotatePoint( &newPos, centre, rotation ); + + // shift and update + newPos += translation; + pad->SetPosition( newPos ); + pad->SetPos0( newPos ); + + // finally apply rotation to the pad itself + pad->Rotate( newPos, rotation ); + } + + EDA_ITEM* item = module->GraphicalItems(); + + for( ; item != NULL; item = item->Next() ) + { + if( !item->IsSelected() && !force_all ) + continue; + + switch( item->Type() ) + { + case PCB_MODULE_TEXT_T: + { + TEXTE_MODULE* text = static_cast( item ); + + text->RotateTransformWithModule( centre, rotation ); + text->MoveTransformWithModule( translation ); + break; + } + case PCB_MODULE_EDGE_T: + { + EDGE_MODULE* em = static_cast( item ); + em->Rotate( centre, rotation ); + em->Move( translation ); + break; + } + default: + ; + } + } + + ClearMarkItems( module ); +} + + /* Mark items inside rect. * Items are inside rect when an end point is inside rect */ diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index ea5421e058..cf4e0436ca 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -54,6 +54,10 @@ #include #include #include +#include +#include +#include +#include /* This is an odd place for this, but CvPcb won't link if it is @@ -2614,6 +2618,131 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets, } +BOARD_ITEM* BOARD::DuplicateAndAddItem( const BOARD_ITEM* aItem, + bool aIncrementReferences ) +{ + BOARD_ITEM* new_item = NULL; + + switch( aItem->Type() ) + { + case PCB_MODULE_T: + { + MODULE* new_module = new MODULE( *static_cast( aItem ) ); + + if( aIncrementReferences ) + { + // Take the next available module number + new_module->IncrementReference( true ); + } + + m_Modules.PushBack( new_module ); + new_item = new_module; + break; + } + case PCB_TEXT_T: + { + const TEXTE_PCB* old_text = static_cast( aItem ); + + TEXTE_PCB* new_text = new TEXTE_PCB( *old_text ); + + m_Drawings.PushBack( new_text ); + new_item = new_text; + + break; + } + case PCB_LINE_T: + { + DRAWSEGMENT* new_edge = new DRAWSEGMENT( + *static_cast(aItem) ); + + m_Drawings.PushBack( new_edge ); + new_item = new_edge; + break; + } + case PCB_TRACE_T: + { + TRACK* new_track = new TRACK( + *static_cast(aItem) ); + + m_Track.PushBack( new_track ); + new_item = new_track; + break; + } + case PCB_ZONE_AREA_T: + { + ZONE_CONTAINER* new_zone = new ZONE_CONTAINER( + *static_cast(aItem) ); + + m_ZoneDescriptorList.push_back( new_zone ); + new_item = new_zone; + break; + } + case PCB_TARGET_T: + { + PCB_TARGET* new_target = new PCB_TARGET( + *static_cast(aItem) ); + + m_Drawings.PushBack( new_target ); + new_item = new_target; + break; + } + case PCB_DIMENSION_T: + { + DIMENSION* new_dim = new DIMENSION( + *static_cast(aItem) ); + + m_Drawings.PushBack( new_dim ); + new_item = new_dim; + break; + } + default: + // Un-handled item for duplication + wxASSERT_MSG( false, "Duplication not supported for items of class " + + aItem->GetClass() ); + break; + } + + return new_item; +} + + +wxString BOARD::GetNextModuleReferenceWithPrefix( const wxString& aPrefix, + bool aFillSequenceGaps ) +{ + wxString nextRef; + + std::set usedNumbers; + + for( MODULE* module = m_Modules; module; module = module->Next() ) + { + const wxString ref = module->GetReference(); + wxString remainder; + + // ONly interested in modules with the right prefix + if( !ref.StartsWith( aPrefix, &remainder ) ) + continue; + + // the suffix must be a number + if ( !remainder.IsNumber() ) + continue; + + long number; + if( remainder.ToCLong( &number ) ) + usedNumbers.insert( number ); + } + + int nextNum = 1; + + if( usedNumbers.size() ) + { + nextNum = getNextNumberInSequence( usedNumbers, aFillSequenceGaps ); + nextRef = wxString::Format( wxT( "%s%i" ), aPrefix, nextNum ); + } + + return nextRef; +} + + /* Extracts the board outlines and build a closed polygon * from lines, arcs and circle items on edge cut layer * Any closed outline inside the main outline is a hole diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index b2bdfb3b28..1f7fab1647 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -301,6 +301,16 @@ public: */ BOARD_ITEM* Remove( BOARD_ITEM* aBoardItem ); + BOARD_ITEM* DuplicateAndAddItem( const BOARD_ITEM* aItem, + bool aIncrementReferences ); + + /** + * Function GetNextModuleReferenceWithPrefix + * Get the next available module reference with this prefix + */ + wxString GetNextModuleReferenceWithPrefix( const wxString& aPrefix, + bool aFillSequenceGaps ); + /** * Function GetRatsnest() * returns list of missing connections between components/tracks. diff --git a/pcbnew/class_board_item.cpp b/pcbnew/class_board_item.cpp index 0ab41d1058..9fc1589a21 100644 --- a/pcbnew/class_board_item.cpp +++ b/pcbnew/class_board_item.cpp @@ -195,3 +195,51 @@ void BOARD_ITEM::ViewGetLayers( int aLayers[], int& aCount ) const aCount = 1; aLayers[0] = m_Layer; } + + +int BOARD_ITEM::getTrailingInt( wxString aStr ) +{ + int number = 0; + int base = 1; + + // Trim and extract the trailing numeric part + int index = aStr.Len() - 1; + while( index >= 0 ) + { + const char chr = aStr.GetChar( index ); + + if( chr < '0' || chr > '9' ) + break; + + number += ( chr - '0' ) * base; + base *= 10; + index--; + } + + return number; +} + +int BOARD_ITEM::getNextNumberInSequence( std::set aSeq, bool aFillSequenceGaps) +{ + // By default go to the end of the sequence + int candidate = *aSeq.end(); + + // Filling in gaps in pad numbering + if( aFillSequenceGaps ) + { + // start at the beginning + candidate = *aSeq.begin(); + + for( std::set::iterator it = aSeq.begin(), + itEnd = aSeq.end(); it != itEnd; ++it ) + { + if( *it - candidate > 1 ) + break; + + candidate = *it; + } + } + + candidate++; + return candidate; +} diff --git a/pcbnew/class_drawsegment.cpp b/pcbnew/class_drawsegment.cpp index d137c479b6..53c2f4b7cc 100644 --- a/pcbnew/class_drawsegment.cpp +++ b/pcbnew/class_drawsegment.cpp @@ -94,10 +94,41 @@ void DRAWSEGMENT::Copy( DRAWSEGMENT* source ) void DRAWSEGMENT::Rotate( const wxPoint& aRotCentre, double aAngle ) { - RotatePoint( &m_Start, aRotCentre, aAngle ); - RotatePoint( &m_End, aRotCentre, aAngle ); -} + switch( m_Shape ) + { + case S_ARC: + case S_SEGMENT: + case S_CIRCLE: + // these can all be done by just rotating the start and end points + RotatePoint( &m_Start, aRotCentre, aAngle); + RotatePoint( &m_End, aRotCentre, aAngle); + break; + case S_POLYGON: + for( unsigned ii = 0; ii < m_PolyPoints.size(); ii++ ) + { + RotatePoint( &m_PolyPoints[ii], aRotCentre, aAngle); + } + break; + + case S_CURVE: + RotatePoint( &m_Start, aRotCentre, aAngle); + RotatePoint( &m_End, aRotCentre, aAngle); + + for( unsigned int ii = 0; ii < m_BezierPoints.size(); ii++ ) + { + RotatePoint( &m_BezierPoints[ii], aRotCentre, aAngle); + } + break; + + case S_RECT: + default: + // un-handled edge transform + wxASSERT_MSG( false, wxT( "DRAWSEGMENT::Rotate not implemented for " + + ShowShape( m_Shape ) ) ); + break; + } +}; void DRAWSEGMENT::Flip( const wxPoint& aCentre ) { @@ -112,6 +143,37 @@ void DRAWSEGMENT::Flip( const wxPoint& aCentre ) SetLayer( FlipLayer( GetLayer() ) ); } +const wxPoint DRAWSEGMENT::GetCenter() const +{ + wxPoint c; + + switch( m_Shape ) + { + case S_ARC: + case S_CIRCLE: + c = m_Start; + break; + + case S_SEGMENT: + // Midpoint of the line + c = ( GetStart() + GetEnd() ) / 2; + break; + + case S_POLYGON: + case S_RECT: + case S_CURVE: + c = GetBoundingBox().Centre(); + break; + + default: + wxASSERT_MSG( false, "DRAWSEGMENT::GetCentre not implemented for shape" + + ShowShape( GetShape() ) ); + break; + } + + return c; +} + const wxPoint DRAWSEGMENT::GetArcEnd() const { wxPoint endPoint; // start of arc diff --git a/pcbnew/class_drawsegment.h b/pcbnew/class_drawsegment.h index 7316b4e554..10920dd1a6 100644 --- a/pcbnew/class_drawsegment.h +++ b/pcbnew/class_drawsegment.h @@ -117,7 +117,7 @@ public: // m_Start, m_End, and m_Angle. // No Set...() function for these attributes. - const wxPoint& GetCenter() const { return m_Start; } + const wxPoint GetCenter() const; //override const wxPoint& GetArcStart() const { return m_End; } const wxPoint GetArcEnd() const; diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index dfeddedb2f..0dea8191f0 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -1131,3 +1131,122 @@ void MODULE::SetOrientation( double newangle ) CalculateBoundingBox(); } +BOARD_ITEM* MODULE::DuplicateAndAddItem( const BOARD_ITEM* aItem, + bool aIncrementPadNumbers ) +{ + BOARD_ITEM* new_item = NULL; + + switch( aItem->Type() ) + { + case PCB_PAD_T: + { + D_PAD* new_pad = new D_PAD( *static_cast( aItem ) ); + + if( aIncrementPadNumbers ) + { + // Take the next available pad number + new_pad->IncrementPadName( true, true ); + } + + Pads().PushBack( new_pad ); + new_item = new_pad; + break; + } + case PCB_MODULE_TEXT_T: + { + const TEXTE_MODULE* old_text = static_cast( aItem ); + + // do not duplicate value or reference fields + // (there can only be one of each) + if( old_text->GetType() == TEXTE_MODULE::TEXT_is_DIVERS ) + { + TEXTE_MODULE* new_text = new TEXTE_MODULE( *old_text ); + + GraphicalItems().PushBack( new_text ); + new_item = new_text; + } + break; + } + case PCB_MODULE_EDGE_T: + { + EDGE_MODULE* new_edge = new EDGE_MODULE( + *static_cast(aItem) ); + + GraphicalItems().PushBack( new_edge ); + new_item = new_edge; + break; + } + case PCB_MODULE_T: + // Ignore the module itself + break; + + default: + // Un-handled item for duplication + wxASSERT_MSG( false, "Duplication not supported for items of class " + + aItem->GetClass() ); + break; + } + + return new_item; +} + + +wxString MODULE::GetNextPadName( bool aFillSequenceGaps ) const +{ + std::set usedNumbers; + + // Create a set of used pad numbers + for( D_PAD* pad = Pads(); pad; pad = pad->Next() ) + { + int padNumber = getTrailingInt( pad->GetPadName() ); + usedNumbers.insert( padNumber ); + } + + const int nextNum = getNextNumberInSequence( usedNumbers, aFillSequenceGaps ); + + return wxString::Format( wxT( "%i" ), nextNum ); +} + + +wxString MODULE::GetReferencePrefix() const +{ + wxString prefix = GetReference(); + + int strIndex = prefix.length() - 1; + while( strIndex >= 0 ) + { + const wxUniChar chr = prefix.GetChar( strIndex ); + + // numeric suffix + if( chr >= '0' && chr <= '9' ) + break; + + strIndex--; + } + + prefix = prefix.Mid( 0, strIndex ); + + return prefix; +} + + +bool MODULE::IncrementReference( bool aFillSequenceGaps ) +{ + BOARD* board = GetBoard(); + + if( !board ) + return false; + + bool success = false; + const wxString prefix = GetReferencePrefix(); + const wxString newReference = board->GetNextModuleReferenceWithPrefix( + prefix, aFillSequenceGaps ); + + if( !newReference.IsEmpty() ) + { + SetReference( newReference ); + success = true; + } + + return success; +} diff --git a/pcbnew/class_module.h b/pcbnew/class_module.h index 2ba023cec2..d9df61a52e 100644 --- a/pcbnew/class_module.h +++ b/pcbnew/class_module.h @@ -405,6 +405,15 @@ public: m_Reference->SetText( aReference ); } + /** + * Function GetReference prefix + * Gets the alphabetic prefix of the module reference - e.g. + * R1 -> R + * IC34 -> IC + * @return the reference prefix (may be empty) + */ + wxString GetReferencePrefix() const; + /** * Function GetValue * @return const wxString& - the value text. @@ -431,6 +440,17 @@ public: TEXTE_MODULE& Value() const { return *m_Value; } TEXTE_MODULE& Reference() const { return *m_Reference; } + /** + * Function INcrementReference + * Increments the module's reference, if possible. A reference with + * a numerical suffix and an optional alphabetical prefix can be + * incremented: "A1" and "1" can be, "B" can't. + * + * @param aFillSequenceGaps if true, the next reference in a sequence + * like A1,A3,A4 will be A2. If false, it will be A5. + * @return true if the reference was incremented. + */ + bool IncrementReference( bool aFillSequenceGaps ); /** * Function FindPadByName @@ -462,6 +482,16 @@ public: */ unsigned GetPadCount( INCLUDE_NPTH_T aIncludeNPTH = INCLUDE_NPTH_T( INCLUDE_NPTH ) ) const; + /** + * Function GetNextPadName + * returns the next available pad name in the module + * + * @param aFillSequenceGaps true if the numbering should "fill in" gaps in + * the sequence, else return the highest value + 1 + * @return the next available pad name + */ + wxString GetNextPadName( bool aFillSequenceGaps ) const; + double GetArea() const { return m_Surface; } time_t GetLink() const { return m_Link; } @@ -473,6 +503,14 @@ public: int GetPlacementCost90() const { return m_CntRot90; } void SetPlacementCost90( int aCost ) { m_CntRot90 = aCost; } + /** + * Function DuplicateAndAddItem + * Duplicate a given item within the module + * @return the new item, or NULL if the item could not be duplicated + */ + BOARD_ITEM* DuplicateAndAddItem( const BOARD_ITEM* item, + bool aIncrementPadNumbers ); + /** * Function Add3DModel * adds \a a3DModel definition to the end of the 3D model list. diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index 4abd48edcf..d189b31dec 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -408,6 +408,15 @@ void D_PAD::SetPadName( const wxString& name ) } +void D_PAD::IncrementPadName( bool aSkipUnconnectable, bool aFillSequenceGaps ) +{ + bool skip = aSkipUnconnectable && ( GetAttribute() == PAD_HOLE_NOT_PLATED ); + + if( !skip ) + SetPadName( GetParent()->GetNextPadName( aFillSequenceGaps ) ); +} + + void D_PAD::Copy( D_PAD* source ) { if( source == NULL ) diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h index c68596bd29..c80fce4746 100644 --- a/pcbnew/class_pad.h +++ b/pcbnew/class_pad.h @@ -103,6 +103,15 @@ public: void SetPadName( const wxString& name ); // Change pad name const wxString GetPadName() const; + /** + * Function IncrementPadName + * + * Increments the pad name to the next available name in the module. + * + * @param aSkipUnconnectable skips any pads that are not connectable (for example NPTH) + */ + void IncrementPadName( bool aSkipUnconnectable, bool aFillSequenceGaps ); + bool PadNameEqual( const D_PAD* other ) const { return m_NumPadName == other->m_NumPadName; // hide tricks behind sensible API diff --git a/pcbnew/dialogs/dialog_create_array.cpp b/pcbnew/dialogs/dialog_create_array.cpp new file mode 100644 index 0000000000..cf03185ab3 --- /dev/null +++ b/pcbnew/dialogs/dialog_create_array.cpp @@ -0,0 +1,512 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 John Beard, john.j.beard@gmail.com + * Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include + +#include +#include +#include + +#include "dialog_create_array.h" + + +// initialise statics +DIALOG_CREATE_ARRAY::CREATE_ARRAY_DIALOG_ENTRIES DIALOG_CREATE_ARRAY::m_options; + +// character set +// NOTE: do not change the order of this relative to the ARRAY_NUMBERING_TYPE_T enum +static const wxString charSetDescriptions[] = +{ + "Numerals (0,1,2,...,9,10)", + "Hexadecimal (0,1,...,F,10,...)", + "Alphabet, minus IOSQXZ", + "Alphabet, full 26 characters" +}; + + +DIALOG_CREATE_ARRAY::DIALOG_CREATE_ARRAY( PCB_BASE_FRAME* aParent, wxPoint aOrigPos, + ARRAY_OPTIONS** aSettings ) : + DIALOG_CREATE_ARRAY_BASE( aParent ), + CONFIG_SAVE_RESTORE_WINDOW( m_options.m_optionsSet ), + m_settings( aSettings ), + m_originalItemPosition( aOrigPos ) +{ + // Set up numbering scheme drop downs + m_choicePriAxisNumbering->Set( boost::size( charSetDescriptions ), charSetDescriptions ); + m_choiceSecAxisNumbering->Set( boost::size( charSetDescriptions ), charSetDescriptions ); + m_choiceCircNumberingType->Set( boost::size( charSetDescriptions ), charSetDescriptions );; + + m_choicePriAxisNumbering->SetSelection( 0 ); + m_choiceSecAxisNumbering->SetSelection( 0 ); + m_choiceCircNumberingType->SetSelection( 0 ); + + Add( m_entryNx, m_options.m_gridNx ); + Add( m_entryNy, m_options.m_gridNy ); + Add( m_entryDx, m_options.m_gridDx ); + Add( m_entryDy, m_options.m_gridDy ); + + Add( m_entryOffsetX, m_options.m_gridOffsetX ); + Add( m_entryOffsetY, m_options.m_gridOffsetY ); + Add( m_entryStagger, m_options.m_gridStagger ); + + Add( m_radioBoxGridStaggerType, m_options.m_gridStaggerType ); + + Add( m_radioBoxGridNumberingAxis, m_options.m_gridNumberingAxis ); + Add( m_checkBoxGridReverseNumbering, m_options.m_gridNumberingReverseAlternate ); + + Add( m_entryCentreX, m_options.m_circCentreX ); + Add( m_entryCentreY, m_options.m_circCentreY ); + Add( m_entryCircAngle, m_options.m_circAngle ); + Add( m_entryCircCount, m_options.m_circCount ); + Add( m_entryRotateItemsCb, m_options.m_circRotate ); + Add( m_entryCircNumberingStart, m_options.m_circNumberingOffset ); + + Add( m_gridTypeNotebook, m_options.m_arrayTypeTab ); + + Add( m_radioBoxGridNumberingScheme, m_options.m_grid2dArrayNumbering ); + Add( m_choicePriAxisNumbering, m_options.m_gridPriAxisNumScheme ); + Add( m_choiceSecAxisNumbering, m_options.m_gridSecAxisNumScheme ); + + Add( m_entryGridPriNumberingOffset, m_options.m_gridPriNumberingOffset ); + Add( m_entryGridSecNumberingOffset, m_options.m_gridSecNumberingOffset ); + + + RestoreConfigToControls(); + + // Load units into labels + { + const wxString lengthUnit = GetAbbreviatedUnitsLabel( g_UserUnit ); + + m_unitLabelCentreX->SetLabelText( lengthUnit ); + m_unitLabelCentreY->SetLabelText( lengthUnit ); + m_unitLabelDx->SetLabelText( lengthUnit ); + m_unitLabelDy->SetLabelText( lengthUnit ); + m_unitLabelOffsetX->SetLabelText( lengthUnit ); + m_unitLabelOffsetY->SetLabelText( lengthUnit ); + } + + // Run the callbacks once to process the dialog contents + setControlEnablement(); + calculateCircularArrayProperties(); + + Fit(); +} + + +void DIALOG_CREATE_ARRAY::OnParameterChanged( wxCommandEvent& event ) +{ + const wxObject* evObj = event.GetEventObject(); + + // some controls result in a change of enablement + if( evObj == m_radioBoxGridNumberingScheme + || evObj == m_checkBoxGridRestartNumbering ) + { + setControlEnablement(); + } + if( evObj == m_entryCentreX || evObj == m_entryCentreY ) + { + calculateCircularArrayProperties(); + } +} + + +void DIALOG_CREATE_ARRAY::OnCancelClick( wxCommandEvent& event ) +{ + EndModal( CREATE_ARRAY_ABORT ); +} + + +static const std::string& alphabetFromNumberingScheme( + DIALOG_CREATE_ARRAY::ARRAY_NUMBERING_TYPE_T type ) +{ + static const std::string alphaNumeric = "0123456789"; + static const std::string alphaHex = "0123456789ABCDEF"; + static const std::string alphaFull = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + static const std::string alphaNoIOSQXZ = "ABCDEFGHJKLNMPRTUVWY"; + static const std::string alphaEmpty = ""; + + switch( type ) + { + case DIALOG_CREATE_ARRAY::NUMBERING_NUMERIC: + return alphaNumeric; + + case DIALOG_CREATE_ARRAY::NUMBERING_HEX: + return alphaHex; + + case DIALOG_CREATE_ARRAY::NUMBERING_ALPHA_NO_IOSQXZ: + return alphaNoIOSQXZ; + + case DIALOG_CREATE_ARRAY::NUMBERING_ALPHA_FULL: + return alphaFull; + + default: + wxASSERT_MSG( false, wxString( "Un-handled numbering scheme: " ) << type ); + } + + return alphaEmpty; +} + + +/** + * @return False for schemes like 0,1...9,10 + * True for schemes like A,B..Z,AA (where the tens column starts with char 0) + */ +static bool schemeNonUnitColsStartAt0( DIALOG_CREATE_ARRAY::ARRAY_NUMBERING_TYPE_T type ) +{ + return type == DIALOG_CREATE_ARRAY::NUMBERING_ALPHA_FULL + || type == DIALOG_CREATE_ARRAY::NUMBERING_ALPHA_NO_IOSQXZ; +} + + +static bool getNumberingOffset( const std::string& str, + DIALOG_CREATE_ARRAY::ARRAY_NUMBERING_TYPE_T type, + int& offsetToFill ) +{ + const std::string alphabet = alphabetFromNumberingScheme( type ); + + wxASSERT_MSG( !alphabet.empty(), wxString( + "Unable to determine alphabet for numbering scheme: " ) << type ); + + int offset = 0; + const int radix = alphabet.length(); + + for( unsigned i = 0; i < str.length(); i++ ) + { + int chIndex = alphabet.find( str[i], 0 ); + + if( chIndex == wxNOT_FOUND ) + return false; + + const bool start0 = schemeNonUnitColsStartAt0( type ); + + // eg "AA" is actually index 27, not 26 + if( start0 && i < str.length() - 1 ) + chIndex++; + + offset *= radix; + offset += chIndex; + } + + offsetToFill = offset; + return true; +} + + +void DIALOG_CREATE_ARRAY::OnOkClick( wxCommandEvent& event ) +{ + ARRAY_OPTIONS* newSettings = NULL; + + const wxWindow* page = m_gridTypeNotebook->GetCurrentPage(); + + if( page == m_gridPanel ) + { + ARRAY_GRID_OPTIONS* newGrid = new ARRAY_GRID_OPTIONS(); + bool ok = true; + + // ints + ok = ok && m_entryNx->GetValue().ToLong( &newGrid->m_nx ); + ok = ok && m_entryNy->GetValue().ToLong( &newGrid->m_ny ); + + newGrid->m_delta.x = DoubleValueFromString( g_UserUnit, m_entryDx->GetValue() ); + newGrid->m_delta.y = DoubleValueFromString( g_UserUnit, m_entryDy->GetValue() ); + + newGrid->m_offset.x = DoubleValueFromString( g_UserUnit, m_entryOffsetX->GetValue() ); + newGrid->m_offset.y = DoubleValueFromString( g_UserUnit, m_entryOffsetY->GetValue() ); + + ok = ok && m_entryStagger->GetValue().ToLong( &newGrid->m_stagger ); + + newGrid->m_stagger_rows = m_radioBoxGridStaggerType->GetSelection() == 0; + + newGrid->m_horizontalThenVertical = m_radioBoxGridNumberingAxis->GetSelection() == 0; + newGrid->m_reverseNumberingAlternate = m_checkBoxGridReverseNumbering->GetValue(); + + newGrid->m_2dArrayNumbering = m_radioBoxGridNumberingScheme->GetSelection() != 0; + + // this is only correct if you set the choice up according to the enum size and order + ok = ok && m_choicePriAxisNumbering->GetSelection() < NUMBERING_TYPE_Max + && m_choiceSecAxisNumbering->GetSelection() < NUMBERING_TYPE_Max; + + // mind undefined casts to enums (should not be able to happen) + if( ok ) + { + newGrid->m_priAxisNumType = + (ARRAY_NUMBERING_TYPE_T) m_choicePriAxisNumbering->GetSelection(); + newGrid->m_secAxisNumType = + (ARRAY_NUMBERING_TYPE_T) m_choiceSecAxisNumbering->GetSelection(); + } + + // Work out the offsets for the numbering + ok = ok && getNumberingOffset( + m_entryGridPriNumberingOffset->GetValue().ToStdString(), + newGrid->m_priAxisNumType, newGrid->m_numberingOffsetX ); + + if( newGrid->m_2dArrayNumbering ) + ok = ok && getNumberingOffset( + m_entryGridSecNumberingOffset->GetValue().ToStdString(), + newGrid->m_secAxisNumType, newGrid->m_numberingOffsetY ); + + newGrid->m_shouldRenumber = m_checkBoxGridRestartNumbering->GetValue(); + + // Only use settings if all values are good + if( ok ) + newSettings = newGrid; + } + else if( page == m_circularPanel ) + { + ARRAY_CIRCULAR_OPTIONS* newCirc = new ARRAY_CIRCULAR_OPTIONS(); + bool ok = true; + + newCirc->m_centre.x = DoubleValueFromString( g_UserUnit, m_entryCentreX->GetValue() ); + newCirc->m_centre.y = DoubleValueFromString( g_UserUnit, m_entryCentreY->GetValue() ); + + newCirc->m_angle = DoubleValueFromString( DEGREES, m_entryCircAngle->GetValue() ); + ok = ok && m_entryCircCount->GetValue().ToLong( &newCirc->m_nPts ); + + newCirc->m_rotateItems = m_entryRotateItemsCb->GetValue(); + + newCirc->m_shouldRenumber = m_checkBoxCircRestartNumbering->GetValue(); + + // This is only correct if you set the choice up according to the enum size and order + ok = ok && m_choiceCircNumberingType->GetSelection() < NUMBERING_TYPE_Max; + + // Mind undefined casts to enums (should not be able to happen) + if( ok ) + newCirc->m_numberingType = + (ARRAY_NUMBERING_TYPE_T) m_choiceCircNumberingType->GetSelection(); + + ok = ok && m_entryCircNumberingStart->GetValue().ToLong( &newCirc->m_numberingOffset ); + + // Only use settings if all values are good + if( ok ) + newSettings = newCirc; + } + + // If we got good settings, send them out and finish + if( newSettings ) + { + delete *m_settings; + + // assign pointer and ownership here + *m_settings = newSettings; + + ReadConfigFromControls(); + + EndModal( CREATE_ARRAY_OK ); + } +} + + +void DIALOG_CREATE_ARRAY::setControlEnablement() +{ + const bool renumber = m_checkBoxGridRestartNumbering->GetValue(); + + // If we're not renumbering, we can't set the numbering scheme + // or axis numbering types + m_radioBoxGridNumberingScheme->Enable( renumber ); + m_labelPriAxisNumbering->Enable( renumber ); + m_choicePriAxisNumbering->Enable( renumber ); + + // Disable the secondary axis numbering option if the + // numbering scheme doesn't have two axes + const bool num2d = m_radioBoxGridNumberingScheme->GetSelection() != 0; + + m_labelSecAxisNumbering->Enable( renumber && num2d ); + m_choiceSecAxisNumbering->Enable( renumber && num2d ); + + // We can only set an offset if we renumber + m_labelGridNumberingOffset->Enable( renumber ); + m_entryGridPriNumberingOffset->Enable( renumber ); + m_entryGridSecNumberingOffset->Enable( renumber && num2d ); + + + // Circular array options + const bool circRenumber = m_checkBoxCircRestartNumbering->GetValue(); + m_choiceCircNumberingType->Enable( circRenumber ); +} + + +void DIALOG_CREATE_ARRAY::calculateCircularArrayProperties() +{ + wxPoint centre; + + centre.x = DoubleValueFromString( g_UserUnit, m_entryCentreX->GetValue() ); + centre.y = DoubleValueFromString( g_UserUnit, m_entryCentreY->GetValue() ); + + // FInd the radius, etc of the circle + centre -= m_originalItemPosition; + + const double radius = VECTOR2I(centre.x, centre.y).EuclideanNorm(); + + m_labelCircRadiusValue->SetLabelText( StringFromValue( g_UserUnit, int(radius), true ) ); +} + + +// ARRAY OPTION implementation functions -------------------------------------- + +std::string DIALOG_CREATE_ARRAY::ARRAY_OPTIONS::getCoordinateNumber( int n, + ARRAY_NUMBERING_TYPE_T type ) +{ + std::string itemNum; + const std::string& alphabet = alphabetFromNumberingScheme( type ); + + if( !alphabet.empty() ) + { + const bool nonUnitColsStartAt0 = schemeNonUnitColsStartAt0( type ); + + bool firstRound = true; + int radix = alphabet.length(); + + do { + int modN = n % radix; + + if( nonUnitColsStartAt0 && !firstRound ) + modN--; // Start the "tens/hundreds/etc column" at "Ax", not "Bx" + + itemNum.insert( 0, 1, alphabet[modN] ); + + n /= radix; + firstRound = false; + } while( n ); + } + + return itemNum; +} + + +wxString DIALOG_CREATE_ARRAY::ARRAY_OPTIONS::InterpolateNumberIntoString( + int aN, const wxString& aPattern ) const +{ + wxString newStr( aPattern ); + newStr.Replace( "%s", GetItemNumber( aN ), false ); + + return newStr; +} + + +int DIALOG_CREATE_ARRAY::ARRAY_GRID_OPTIONS::GetArraySize() const +{ + return m_nx * m_ny; +} + + +wxPoint DIALOG_CREATE_ARRAY::ARRAY_GRID_OPTIONS::getGridCoords( int n ) const +{ + const int axisSize = m_horizontalThenVertical ? m_nx : m_ny; + + int x = n % axisSize; + int y = n / axisSize; + + // reverse on this row/col? + if( m_reverseNumberingAlternate && ( y % 2 ) ) + x = axisSize - x - 1; + + wxPoint coords( x, y ); + + return coords; +} + + +void DIALOG_CREATE_ARRAY::ARRAY_GRID_OPTIONS::TransformItem( int n, BOARD_ITEM* item, + const wxPoint& rotPoint ) const +{ + wxPoint point; + + wxPoint coords = getGridCoords( n ); + + // swap axes if needed + if( !m_horizontalThenVertical ) + std::swap( coords.x, coords.y ); + + point.x = coords.x * m_delta.x + coords.y * m_offset.x; + point.y = coords.y * m_delta.y + coords.x * m_offset.y; + + if( abs( m_stagger ) > 1 ) + { + const int stagger = abs( m_stagger ); + const bool sr = m_stagger_rows; + const int stagger_idx = ( ( sr ? coords.y : coords.x ) % stagger ); + + wxPoint stagger_delta( ( sr ? m_delta.x : m_offset.x ), + ( sr ? m_offset.y : m_delta.y ) ); + + // Stagger to the left/up if the sign of the stagger is negative + point += stagger_delta * copysign( stagger_idx, m_stagger ) / stagger; + } + + // this is already relative to the first array entry + item->Move( point ); +} + + +wxString DIALOG_CREATE_ARRAY::ARRAY_GRID_OPTIONS::GetItemNumber( int n ) const +{ + wxString itemNum; + + if( m_2dArrayNumbering ) + { + wxPoint coords = getGridCoords( n ); + + itemNum += getCoordinateNumber( coords.x + m_numberingOffsetX, m_priAxisNumType ); + itemNum += getCoordinateNumber( coords.y + m_numberingOffsetY, m_secAxisNumType ); + } + else + { + itemNum += getCoordinateNumber( n + m_numberingOffsetX, m_priAxisNumType ); + } + + return itemNum; +} + + +int DIALOG_CREATE_ARRAY::ARRAY_CIRCULAR_OPTIONS::GetArraySize() const +{ + return m_nPts; +} + + +void DIALOG_CREATE_ARRAY::ARRAY_CIRCULAR_OPTIONS::TransformItem( int n, BOARD_ITEM* item, + const wxPoint& rotPoint ) const +{ + double angle; + + if( m_angle == 0 ) + // angle is zero, divide evenly into m_nPts + angle = 3600.0 * n / float(m_nPts); + else + // n'th step + angle = m_angle * n; + + item->Rotate( m_centre, angle ); + + // take off the rotation (but not the translation) if needed + if( !m_rotateItems ) + item->Rotate( item->GetCenter(), -angle ); +} + + +wxString DIALOG_CREATE_ARRAY::ARRAY_CIRCULAR_OPTIONS::GetItemNumber( int aN ) const +{ + return getCoordinateNumber( aN + m_numberingOffset, m_numberingType ); +} diff --git a/pcbnew/dialogs/dialog_create_array.h b/pcbnew/dialogs/dialog_create_array.h new file mode 100644 index 0000000000..2f80d27ba0 --- /dev/null +++ b/pcbnew/dialogs/dialog_create_array.h @@ -0,0 +1,360 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 John Beard, john.j.beard@gmail.com + * Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __DIALOG_CREATE_ARRAY__ +#define __DIALOG_CREATE_ARRAY__ + +// Include the wxFormBuider header base: +#include + +#include + +class CONFIG_SAVE_RESTORE_WINDOW +{ +private: + + enum CONFIG_CTRL_TYPE_T + { + CFG_CTRL_TEXT, + CFG_CTRL_CHECKBOX, + CFG_CTRL_RADIOBOX, + CFG_CTRL_CHOICE, + CFG_CTRL_TAB + }; + + struct CONFIG_CTRL_T + { + wxControl* control; + CONFIG_CTRL_TYPE_T type; + void* dest; + }; + + std::vector ctrls; + bool& valid; + +protected: + CONFIG_SAVE_RESTORE_WINDOW( bool& validFlag ) : + valid( validFlag ) + {} + + void Add( wxRadioBox* ctrl, int& dest ) + { + CONFIG_CTRL_T ctrlInfo = { ctrl, CFG_CTRL_RADIOBOX, (void*) &dest }; + + ctrls.push_back( ctrlInfo ); + } + + void Add( wxCheckBox* ctrl, bool& dest ) + { + CONFIG_CTRL_T ctrlInfo = { ctrl, CFG_CTRL_CHECKBOX, (void*) &dest }; + + ctrls.push_back( ctrlInfo ); + } + + void Add( wxTextCtrl* ctrl, std::string& dest ) + { + CONFIG_CTRL_T ctrlInfo = { ctrl, CFG_CTRL_TEXT, (void*) &dest }; + + ctrls.push_back( ctrlInfo ); + } + + void Add( wxChoice* ctrl, int& dest ) + { + CONFIG_CTRL_T ctrlInfo = { ctrl, CFG_CTRL_CHOICE, (void*) &dest }; + + ctrls.push_back( ctrlInfo ); + } + + void Add( wxNotebook* ctrl, int& dest ) + { + CONFIG_CTRL_T ctrlInfo = { ctrl, CFG_CTRL_TAB, (void*) &dest }; + + ctrls.push_back( ctrlInfo ); + } + + void ReadConfigFromControls() + { + for( std::vector::const_iterator iter = ctrls.begin(), iend = ctrls.end(); + iter != iend; ++iter ) + { + switch( iter->type ) + { + case CFG_CTRL_CHECKBOX: + *(bool*) iter->dest = static_cast( iter->control )->GetValue(); + break; + + case CFG_CTRL_TEXT: + *(std::string*) iter->dest = static_cast( iter->control )->GetValue(); + break; + + case CFG_CTRL_CHOICE: + *(int*) iter->dest = static_cast( iter->control )->GetSelection(); + break; + + case CFG_CTRL_RADIOBOX: + *(int*) iter->dest = static_cast( iter->control )->GetSelection(); + break; + + case CFG_CTRL_TAB: + *(int*) iter->dest = static_cast( iter->control )->GetSelection(); + break; + + default: + wxASSERT_MSG( false, wxString( + "Unhandled control type for config store: " ) << iter->type ); + } + } + + valid = true; + } + + void RestoreConfigToControls() + { + if( !valid ) + return; + + for( std::vector::const_iterator iter = ctrls.begin(), iend = ctrls.end(); + iter != iend; ++iter ) + { + switch( iter->type ) + { + case CFG_CTRL_CHECKBOX: + static_cast( iter->control )->SetValue( *(bool*) iter->dest ); + break; + + case CFG_CTRL_TEXT: + static_cast( iter->control )->SetValue( *(std::string*) iter->dest ); + break; + + case CFG_CTRL_CHOICE: + static_cast( iter->control )->SetSelection( *(int*) iter->dest ); + break; + + case CFG_CTRL_RADIOBOX: + static_cast( iter->control )->SetSelection( *(int*) iter->dest ); + break; + + case CFG_CTRL_TAB: + static_cast( iter->control )->SetSelection( *(int*) iter->dest ); + break; + + default: + wxASSERT_MSG( false, wxString( + "Unhandled control type for config restore: " ) << iter->type ); + } + } + } +}; + +class DIALOG_CREATE_ARRAY : public DIALOG_CREATE_ARRAY_BASE, + public CONFIG_SAVE_RESTORE_WINDOW +{ +public: + + enum CREATE_ARRAY_EDIT_T + { + CREATE_ARRAY_ABORT, ///< if not changed or error + CREATE_ARRAY_OK, ///< if successfully changed + }; + + enum ARRAY_TYPE_T + { + ARRAY_GRID, ///< A grid (x*y) array + ARRAY_CIRCULAR, ///< A circular array + }; + + // NOTE: do not change order relative to charSetDescriptions + enum ARRAY_NUMBERING_TYPE_T + { + NUMBERING_NUMERIC = 0, ///< Arabic numerals: 0,1,2,3,4,5,6,7,8,9,10,11... + NUMBERING_HEX, + NUMBERING_ALPHA_NO_IOSQXZ, /*!< Alphabet, excluding IOSQXZ + * + * Per ASME Y14.35M-1997 sec. 5.2 (previously MIL-STD-100 sec. 406.5) + * as these can be confused with numerals and are often not used + * for pin numbering on BGAs, etc + */ + NUMBERING_ALPHA_FULL, ///< Full 26-character alphabet + NUMBERING_TYPE_Max ///< Invalid maximum value, insert above here + }; + + /** + * Persistent dialog options + */ + struct ARRAY_OPTIONS + { + ARRAY_OPTIONS( ARRAY_TYPE_T aType ) : + m_type( aType ), + m_shouldRenumber( false ) + {} + + virtual ~ARRAY_OPTIONS() {}; + + ARRAY_TYPE_T m_type; + bool m_shouldRenumber; + + /*! + * Function GetArrayPositions + * Returns the set of points that represent the array + * in order, if that is important + * + * TODO: Can/should this be done with some sort of iterator? + */ + virtual void TransformItem( int n, BOARD_ITEM* item, + const wxPoint& rotPoint ) const = 0; + virtual int GetArraySize() const = 0; + virtual wxString GetItemNumber( int n ) const = 0; + virtual wxString InterpolateNumberIntoString( int n, const wxString& pattern ) const; + + bool ShouldRenumberItems() const + { + return m_shouldRenumber; + } + +protected: + static std::string getCoordinateNumber( int n, ARRAY_NUMBERING_TYPE_T type ); + }; + + struct ARRAY_GRID_OPTIONS : public ARRAY_OPTIONS + { + ARRAY_GRID_OPTIONS() : + ARRAY_OPTIONS( ARRAY_GRID ), + m_nx( 0 ), m_ny( 0 ), + m_horizontalThenVertical( true ), + m_reverseNumberingAlternate( false ), + m_stagger( 0 ), + m_stagger_rows( true ), + m_2dArrayNumbering( false ), + m_numberingOffsetX( 0 ), + m_numberingOffsetY( 0 ), + m_priAxisNumType( NUMBERING_NUMERIC ), + m_secAxisNumType( NUMBERING_NUMERIC ) + {} + + long m_nx, m_ny; + bool m_horizontalThenVertical, m_reverseNumberingAlternate; + wxPoint m_delta; + wxPoint m_offset; + long m_stagger; + bool m_stagger_rows; + bool m_2dArrayNumbering; + int m_numberingOffsetX, m_numberingOffsetY; + ARRAY_NUMBERING_TYPE_T m_priAxisNumType, m_secAxisNumType; + + void TransformItem( int n, BOARD_ITEM* item, const wxPoint& rotPoint ) const; // override virtual + int GetArraySize() const; // override virtual + wxString GetItemNumber( int n ) const; // override virtual + +private: + wxPoint getGridCoords( int n ) const; + }; + + struct ARRAY_CIRCULAR_OPTIONS : public ARRAY_OPTIONS + { + ARRAY_CIRCULAR_OPTIONS() : + ARRAY_OPTIONS( ARRAY_CIRCULAR ), + m_nPts( 0 ), + m_angle( 0.0f ), + m_rotateItems( false ), + m_numberingType( NUMBERING_NUMERIC ), + m_numberingOffset( 0 ) + {} + + long m_nPts; + double m_angle; + wxPoint m_centre; + bool m_rotateItems; + ARRAY_NUMBERING_TYPE_T m_numberingType; + long m_numberingOffset; + + void TransformItem( int n, BOARD_ITEM* item, const wxPoint& rotPoint ) const; // override virtual + int GetArraySize() const; // override virtual + wxString GetItemNumber( int n ) const; // override virtual + }; + + // Constructor and destructor + DIALOG_CREATE_ARRAY( PCB_BASE_FRAME* aParent, wxPoint aOrigPos, ARRAY_OPTIONS** settings ); + virtual ~DIALOG_CREATE_ARRAY() {}; + +private: + + /** + * The settings object returned to the caller. + * We update the caller's object and never have ownership + */ + ARRAY_OPTIONS** m_settings; + + /* + * The position of the original item(s), used for finding radius, etc + */ + const wxPoint m_originalItemPosition; + + // Event callbacks + void OnParameterChanged( wxCommandEvent& event ); + void OnCancelClick( wxCommandEvent& event ); + void OnOkClick( wxCommandEvent& event ); + + // Internal callback handlers + void setControlEnablement(); + void calculateCircularArrayProperties(); + + struct CREATE_ARRAY_DIALOG_ENTRIES + { + CREATE_ARRAY_DIALOG_ENTRIES() : + m_optionsSet( false ), + m_gridStaggerType( 0 ), + m_gridNumberingAxis( 0 ), + m_gridNumberingReverseAlternate( false ), + m_grid2dArrayNumbering( 0 ), + m_gridPriAxisNumScheme( 0 ), + m_gridSecAxisNumScheme( 0 ), + m_circRotate( false ), + m_arrayTypeTab( 0 ) + {} + + bool m_optionsSet; + + std::string m_gridNx, m_gridNy, + m_gridDx, m_gridDy, + m_gridOffsetX, m_gridOffsetY, + m_gridStagger; + + int m_gridStaggerType, m_gridNumberingAxis; + bool m_gridNumberingReverseAlternate; + int m_grid2dArrayNumbering; + int m_gridPriAxisNumScheme, m_gridSecAxisNumScheme; + std::string m_gridPriNumberingOffset, m_gridSecNumberingOffset; + + std::string m_circCentreX, m_circCentreY, + m_circAngle, m_circCount, m_circNumberingOffset; + bool m_circRotate; + + int m_arrayTypeTab; + }; + + static CREATE_ARRAY_DIALOG_ENTRIES m_options; + +}; + +#endif // __DIALOG_CREATE_ARRAY__ diff --git a/pcbnew/dialogs/dialog_create_array_base.cpp b/pcbnew/dialogs/dialog_create_array_base.cpp new file mode 100644 index 0000000000..066b6629de --- /dev/null +++ b/pcbnew/dialogs/dialog_create_array_base.cpp @@ -0,0 +1,341 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Jun 6 2014) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "dialog_create_array_base.h" + +/////////////////////////////////////////////////////////////////////////// + +DIALOG_CREATE_ARRAY_BASE::DIALOG_CREATE_ARRAY_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize ); + + wxBoxSizer* bMainSizer; + bMainSizer = new wxBoxSizer( wxVERTICAL ); + + m_gridTypeNotebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + m_gridPanel = new wxPanel( m_gridTypeNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer2; + bSizer2 = new wxBoxSizer( wxHORIZONTAL ); + + wxGridBagSizer* gbSizer1; + gbSizer1 = new wxGridBagSizer( 0, 0 ); + gbSizer1->SetFlexibleDirection( wxBOTH ); + gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_labelNx = new wxStaticText( m_gridPanel, wxID_ANY, _("x Count:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_labelNx->Wrap( -1 ); + gbSizer1->Add( m_labelNx, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_RIGHT|wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_entryNx = new wxTextCtrl( m_gridPanel, wxID_ANY, _("5"), wxDefaultPosition, wxDefaultSize, 0 ); + gbSizer1->Add( m_entryNx, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 ); + + m_labelNy = new wxStaticText( m_gridPanel, wxID_ANY, _("y Count:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_labelNy->Wrap( -1 ); + gbSizer1->Add( m_labelNy, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_RIGHT|wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_entryNy = new wxTextCtrl( m_gridPanel, wxID_ANY, _("5"), wxDefaultPosition, wxDefaultSize, 0 ); + gbSizer1->Add( m_entryNy, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 ); + + m_labelDx = new wxStaticText( m_gridPanel, wxID_ANY, _("x Spacing:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_labelDx->Wrap( -1 ); + gbSizer1->Add( m_labelDx, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + + m_entryDx = new wxTextCtrl( m_gridPanel, wxID_ANY, _("5"), wxDefaultPosition, wxDefaultSize, 0 ); + gbSizer1->Add( m_entryDx, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 ); + + m_unitLabelDx = new wxStaticText( m_gridPanel, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 ); + m_unitLabelDx->Wrap( -1 ); + gbSizer1->Add( m_unitLabelDx, wxGBPosition( 2, 2 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_labelDy = new wxStaticText( m_gridPanel, wxID_ANY, _("y Spacing:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_labelDy->Wrap( -1 ); + gbSizer1->Add( m_labelDy, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + + m_entryDy = new wxTextCtrl( m_gridPanel, wxID_ANY, _("5"), wxDefaultPosition, wxDefaultSize, 0 ); + gbSizer1->Add( m_entryDy, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 ); + + m_unitLabelDy = new wxStaticText( m_gridPanel, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 ); + m_unitLabelDy->Wrap( -1 ); + gbSizer1->Add( m_unitLabelDy, wxGBPosition( 3, 2 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_labelOffsetX = new wxStaticText( m_gridPanel, wxID_ANY, _("x Offset:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_labelOffsetX->Wrap( -1 ); + gbSizer1->Add( m_labelOffsetX, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + + m_entryOffsetX = new wxTextCtrl( m_gridPanel, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 ); + gbSizer1->Add( m_entryOffsetX, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 ); + + m_unitLabelOffsetX = new wxStaticText( m_gridPanel, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 ); + m_unitLabelOffsetX->Wrap( -1 ); + gbSizer1->Add( m_unitLabelOffsetX, wxGBPosition( 4, 2 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_labelOffsetY = new wxStaticText( m_gridPanel, wxID_ANY, _("y Offset:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_labelOffsetY->Wrap( -1 ); + gbSizer1->Add( m_labelOffsetY, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + + m_entryOffsetY = new wxTextCtrl( m_gridPanel, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 ); + gbSizer1->Add( m_entryOffsetY, wxGBPosition( 5, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 ); + + m_unitLabelOffsetY = new wxStaticText( m_gridPanel, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 ); + m_unitLabelOffsetY->Wrap( -1 ); + gbSizer1->Add( m_unitLabelOffsetY, wxGBPosition( 5, 2 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_labelStagger = new wxStaticText( m_gridPanel, wxID_ANY, _("Stagger:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_labelStagger->Wrap( -1 ); + gbSizer1->Add( m_labelStagger, wxGBPosition( 6, 0 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + + m_entryStagger = new wxTextCtrl( m_gridPanel, wxID_ANY, _("1"), wxDefaultPosition, wxDefaultSize, 0 ); + gbSizer1->Add( m_entryStagger, wxGBPosition( 6, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 ); + + wxString m_radioBoxGridStaggerTypeChoices[] = { _("Rows"), _("Columns") }; + int m_radioBoxGridStaggerTypeNChoices = sizeof( m_radioBoxGridStaggerTypeChoices ) / sizeof( wxString ); + m_radioBoxGridStaggerType = new wxRadioBox( m_gridPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, m_radioBoxGridStaggerTypeNChoices, m_radioBoxGridStaggerTypeChoices, 1, wxRA_SPECIFY_COLS ); + m_radioBoxGridStaggerType->SetSelection( 0 ); + gbSizer1->Add( m_radioBoxGridStaggerType, wxGBPosition( 7, 1 ), wxGBSpan( 1, 2 ), wxALL|wxEXPAND, 5 ); + + m_labelGridStaggerType = new wxStaticText( m_gridPanel, wxID_ANY, _("Stagger type:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_labelGridStaggerType->Wrap( -1 ); + gbSizer1->Add( m_labelGridStaggerType, wxGBPosition( 7, 0 ), wxGBSpan( 1, 1 ), wxALL, 5 ); + + + bSizer2->Add( gbSizer1, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizer3; + bSizer3 = new wxBoxSizer( wxVERTICAL ); + + wxString m_radioBoxGridNumberingAxisChoices[] = { _("Horizontal, then vertical"), _("Vertical, then horizontal") }; + int m_radioBoxGridNumberingAxisNChoices = sizeof( m_radioBoxGridNumberingAxisChoices ) / sizeof( wxString ); + m_radioBoxGridNumberingAxis = new wxRadioBox( m_gridPanel, wxID_ANY, _("Numbering direction:"), wxDefaultPosition, wxDefaultSize, m_radioBoxGridNumberingAxisNChoices, m_radioBoxGridNumberingAxisChoices, 1, wxRA_SPECIFY_COLS ); + m_radioBoxGridNumberingAxis->SetSelection( 0 ); + bSizer3->Add( m_radioBoxGridNumberingAxis, 0, wxALL|wxEXPAND, 5 ); + + m_checkBoxGridReverseNumbering = new wxCheckBox( m_gridPanel, wxID_ANY, _("Reverse numbering on \nalternate rows/columns"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer3->Add( m_checkBoxGridReverseNumbering, 0, wxALL, 5 ); + + m_checkBoxGridRestartNumbering = new wxCheckBox( m_gridPanel, wxID_ANY, _("Restart numbering"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxGridRestartNumbering->SetValue(true); + bSizer3->Add( m_checkBoxGridRestartNumbering, 0, wxALL, 5 ); + + wxString m_radioBoxGridNumberingSchemeChoices[] = { _("Continuous (1, 2, 3...)"), _("Co-ordinate (A1, A2, ... B1, ...)") }; + int m_radioBoxGridNumberingSchemeNChoices = sizeof( m_radioBoxGridNumberingSchemeChoices ) / sizeof( wxString ); + m_radioBoxGridNumberingScheme = new wxRadioBox( m_gridPanel, wxID_ANY, _("Numbering scheme:"), wxDefaultPosition, wxDefaultSize, m_radioBoxGridNumberingSchemeNChoices, m_radioBoxGridNumberingSchemeChoices, 1, wxRA_SPECIFY_COLS ); + m_radioBoxGridNumberingScheme->SetSelection( 0 ); + bSizer3->Add( m_radioBoxGridNumberingScheme, 0, wxALL|wxEXPAND, 5 ); + + m_labelPriAxisNumbering = new wxStaticText( m_gridPanel, wxID_ANY, _("Primary axis numbering:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_labelPriAxisNumbering->Wrap( -1 ); + bSizer3->Add( m_labelPriAxisNumbering, 0, wxALL, 5 ); + + wxArrayString m_choicePriAxisNumberingChoices; + m_choicePriAxisNumbering = new wxChoice( m_gridPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choicePriAxisNumberingChoices, 0 ); + m_choicePriAxisNumbering->SetSelection( 0 ); + bSizer3->Add( m_choicePriAxisNumbering, 0, wxALL|wxEXPAND, 5 ); + + m_labelSecAxisNumbering = new wxStaticText( m_gridPanel, wxID_ANY, _("Secondary axis numbering:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_labelSecAxisNumbering->Wrap( -1 ); + m_labelSecAxisNumbering->Enable( false ); + + bSizer3->Add( m_labelSecAxisNumbering, 0, wxALL, 5 ); + + wxArrayString m_choiceSecAxisNumberingChoices; + m_choiceSecAxisNumbering = new wxChoice( m_gridPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceSecAxisNumberingChoices, 0 ); + m_choiceSecAxisNumbering->SetSelection( 0 ); + m_choiceSecAxisNumbering->Enable( false ); + + bSizer3->Add( m_choiceSecAxisNumbering, 0, wxALL|wxEXPAND, 5 ); + + wxBoxSizer* bSizer5; + bSizer5 = new wxBoxSizer( wxHORIZONTAL ); + + m_labelGridNumberingOffset = new wxStaticText( m_gridPanel, wxID_ANY, _("Numbering start:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_labelGridNumberingOffset->Wrap( -1 ); + bSizer5->Add( m_labelGridNumberingOffset, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_entryGridPriNumberingOffset = new wxTextCtrl( m_gridPanel, wxID_ANY, _("1"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer5->Add( m_entryGridPriNumberingOffset, 0, wxALL, 5 ); + + m_entryGridSecNumberingOffset = new wxTextCtrl( m_gridPanel, wxID_ANY, _("1"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer5->Add( m_entryGridSecNumberingOffset, 0, wxALL, 5 ); + + + bSizer3->Add( bSizer5, 0, wxEXPAND, 5 ); + + + bSizer2->Add( bSizer3, 1, wxEXPAND, 5 ); + + + m_gridPanel->SetSizer( bSizer2 ); + m_gridPanel->Layout(); + bSizer2->Fit( m_gridPanel ); + m_gridTypeNotebook->AddPage( m_gridPanel, _("Grid"), true ); + m_circularPanel = new wxPanel( m_gridTypeNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer4; + bSizer4 = new wxBoxSizer( wxHORIZONTAL ); + + wxGridBagSizer* gbSizer2; + gbSizer2 = new wxGridBagSizer( 0, 0 ); + gbSizer2->SetFlexibleDirection( wxBOTH ); + gbSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_labelCentreX = new wxStaticText( m_circularPanel, wxID_ANY, _("x Centre:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_labelCentreX->Wrap( -1 ); + gbSizer2->Add( m_labelCentreX, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); + + m_entryCentreX = new wxTextCtrl( m_circularPanel, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 ); + gbSizer2->Add( m_entryCentreX, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 ); + + m_unitLabelCentreX = new wxStaticText( m_circularPanel, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 ); + m_unitLabelCentreX->Wrap( -1 ); + gbSizer2->Add( m_unitLabelCentreX, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_labelCentreY = new wxStaticText( m_circularPanel, wxID_ANY, _("y Centre:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_labelCentreY->Wrap( -1 ); + gbSizer2->Add( m_labelCentreY, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); + + m_entryCentreY = new wxTextCtrl( m_circularPanel, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 ); + gbSizer2->Add( m_entryCentreY, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 ); + + m_unitLabelCentreY = new wxStaticText( m_circularPanel, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 ); + m_unitLabelCentreY->Wrap( -1 ); + gbSizer2->Add( m_unitLabelCentreY, wxGBPosition( 1, 2 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_labelCircRadius = new wxStaticText( m_circularPanel, wxID_ANY, _("Radius:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_labelCircRadius->Wrap( -1 ); + gbSizer2->Add( m_labelCircRadius, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); + + m_labelCircRadiusValue = new wxStaticText( m_circularPanel, wxID_ANY, _("0 mm"), wxDefaultPosition, wxDefaultSize, 0 ); + m_labelCircRadiusValue->Wrap( -1 ); + gbSizer2->Add( m_labelCircRadiusValue, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 ); + + m_labelCircAngle = new wxStaticText( m_circularPanel, wxID_ANY, _("Angle:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_labelCircAngle->Wrap( -1 ); + gbSizer2->Add( m_labelCircAngle, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); + + m_entryCircAngle = new wxTextCtrl( m_circularPanel, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 ); + m_entryCircAngle->SetToolTip( _("Positive angles represent an anti-clockwise rotation. An angle of 0 will produce a full circle divided evenly into \"Count\" portions.") ); + + gbSizer2->Add( m_entryCircAngle, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 ); + + m_unitLabelCircAngle = new wxStaticText( m_circularPanel, wxID_ANY, _("deg"), wxDefaultPosition, wxDefaultSize, 0 ); + m_unitLabelCircAngle->Wrap( -1 ); + gbSizer2->Add( m_unitLabelCircAngle, wxGBPosition( 3, 2 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_labelCircCount = new wxStaticText( m_circularPanel, wxID_ANY, _("Count:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_labelCircCount->Wrap( -1 ); + gbSizer2->Add( m_labelCircCount, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); + + m_entryCircCount = new wxTextCtrl( m_circularPanel, wxID_ANY, _("4"), wxDefaultPosition, wxDefaultSize, 0 ); + m_entryCircCount->SetToolTip( _("How many items in the array.") ); + + gbSizer2->Add( m_entryCircCount, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 ); + + m_labelCircRotate = new wxStaticText( m_circularPanel, wxID_ANY, _("Rotate:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_labelCircRotate->Wrap( -1 ); + gbSizer2->Add( m_labelCircRotate, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); + + m_entryRotateItemsCb = new wxCheckBox( m_circularPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_entryRotateItemsCb->SetValue(true); + m_entryRotateItemsCb->SetToolTip( _("Rotate the item as well as move it - multi-selections will be rotated together") ); + + gbSizer2->Add( m_entryRotateItemsCb, wxGBPosition( 5, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 ); + + + bSizer4->Add( gbSizer2, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizer6; + bSizer6 = new wxBoxSizer( wxVERTICAL ); + + m_checkBoxCircRestartNumbering = new wxCheckBox( m_circularPanel, wxID_ANY, _("Restart numbering"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxCircRestartNumbering->SetValue(true); + bSizer6->Add( m_checkBoxCircRestartNumbering, 0, wxALL, 5 ); + + m_labelCircNumbering = new wxStaticText( m_circularPanel, wxID_ANY, _("Numbering type:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_labelCircNumbering->Wrap( -1 ); + bSizer6->Add( m_labelCircNumbering, 0, wxALL, 5 ); + + wxArrayString m_choiceCircNumberingTypeChoices; + m_choiceCircNumberingType = new wxChoice( m_circularPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceCircNumberingTypeChoices, 0 ); + m_choiceCircNumberingType->SetSelection( 0 ); + bSizer6->Add( m_choiceCircNumberingType, 0, wxALL|wxEXPAND, 5 ); + + wxBoxSizer* bSizer7; + bSizer7 = new wxBoxSizer( wxHORIZONTAL ); + + m_labelCircNumStart = new wxStaticText( m_circularPanel, wxID_ANY, _("Numbering start:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_labelCircNumStart->Wrap( -1 ); + bSizer7->Add( m_labelCircNumStart, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); + + m_entryCircNumberingStart = new wxTextCtrl( m_circularPanel, wxID_ANY, _("1"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer7->Add( m_entryCircNumberingStart, 0, wxALL, 5 ); + + + bSizer6->Add( bSizer7, 0, wxEXPAND, 5 ); + + + bSizer4->Add( bSizer6, 1, wxEXPAND, 5 ); + + + m_circularPanel->SetSizer( bSizer4 ); + m_circularPanel->Layout(); + bSizer4->Fit( m_circularPanel ); + m_gridTypeNotebook->AddPage( m_circularPanel, _("Circular"), false ); + + bMainSizer->Add( m_gridTypeNotebook, 1, wxEXPAND | wxALL, 5 ); + + m_stdButtons = new wxStdDialogButtonSizer(); + m_stdButtonsOK = new wxButton( this, wxID_OK ); + m_stdButtons->AddButton( m_stdButtonsOK ); + m_stdButtonsCancel = new wxButton( this, wxID_CANCEL ); + m_stdButtons->AddButton( m_stdButtonsCancel ); + m_stdButtons->Realize(); + + bMainSizer->Add( m_stdButtons, 0, wxALL|wxEXPAND, 5 ); + + + this->SetSizer( bMainSizer ); + this->Layout(); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_CREATE_ARRAY_BASE::OnClose ) ); + m_entryNx->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this ); + m_entryNy->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this ); + m_entryDx->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this ); + m_entryDy->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this ); + m_entryOffsetX->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this ); + m_entryOffsetY->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this ); + m_entryStagger->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this ); + m_checkBoxGridRestartNumbering->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this ); + m_radioBoxGridNumberingScheme->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this ); + m_entryCentreX->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this ); + m_entryCentreY->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this ); + m_entryCircAngle->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this ); + m_entryCircCount->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this ); + m_stdButtonsCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnCancelClick ), NULL, this ); + m_stdButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnOkClick ), NULL, this ); +} + +DIALOG_CREATE_ARRAY_BASE::~DIALOG_CREATE_ARRAY_BASE() +{ + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_CREATE_ARRAY_BASE::OnClose ) ); + m_entryNx->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this ); + m_entryNy->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this ); + m_entryDx->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this ); + m_entryDy->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this ); + m_entryOffsetX->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this ); + m_entryOffsetY->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this ); + m_entryStagger->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this ); + m_checkBoxGridRestartNumbering->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this ); + m_radioBoxGridNumberingScheme->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this ); + m_entryCentreX->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this ); + m_entryCentreY->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this ); + m_entryCircAngle->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this ); + m_entryCircCount->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this ); + m_stdButtonsCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnCancelClick ), NULL, this ); + m_stdButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnOkClick ), NULL, this ); + +} diff --git a/pcbnew/dialogs/dialog_create_array_base.fbp b/pcbnew/dialogs/dialog_create_array_base.fbp new file mode 100644 index 0000000000..09c058ec23 --- /dev/null +++ b/pcbnew/dialogs/dialog_create_array_base.fbp @@ -0,0 +1,4965 @@ + + + + + + C++ + 1 + source_name + 0 + 0 + res + UTF-8 + connect + dialog_create_array_base + 1000 + none + 1 + DIALOG_CREATE_ARRAY_BASE + + . + + 1 + 1 + 1 + 1 + UI + 0 + 0 + + 0 + wxAUI_MGR_DEFAULT + + + + 1 + 1 + impl_virtual + + + + 0 + wxID_DIALOG_CREATE_ARRAY + + -1,-1 + DIALOG_CREATE_ARRAY_BASE + + 576,528 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + DIALOG_SHIM; dialog_shim.h + Create array + + + + + + + + + + + + + + OnClose + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bMainSizer + wxVERTICAL + none + + 5 + wxEXPAND | wxALL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_gridTypeNotebook + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Load From File; + Grid + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_gridPanel + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer2 + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + + wxBOTH + + + 0 + + gbSizer1 + wxFLEX_GROWMODE_SPECIFIED + none + 0 + + 5 + 1 + 0 + wxALIGN_RIGHT|wxALL|wxALIGN_CENTER_VERTICAL + 0 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + x Count: + + 0 + + + 0 + + 1 + m_labelNx + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 1 + wxALL + 0 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_entryNx + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 5 + + + + + + + + + + + + + + + + + + + + + + + + + + + OnParameterChanged + + + + + + + 5 + 1 + 0 + wxALIGN_RIGHT|wxALL|wxALIGN_CENTER_VERTICAL + 1 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + y Count: + + 0 + + + 0 + + 1 + m_labelNy + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 1 + wxALL + 1 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_entryNy + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 5 + + + + + + + + + + + + + + + + + + + + + + + + + + + OnParameterChanged + + + + + + + 5 + 1 + 0 + wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL + 2 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + x Spacing: + + 0 + + + 0 + + 1 + m_labelDx + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 1 + wxALL + 2 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_entryDx + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 5 + + + + + + + + + + + + + + + + + + + + + + + + + + + OnParameterChanged + + + + + + + 5 + 1 + 2 + wxALL|wxALIGN_CENTER_VERTICAL + 2 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + mm + + 0 + + + 0 + + 1 + m_unitLabelDx + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 0 + wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL + 3 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + y Spacing: + + 0 + + + 0 + + 1 + m_labelDy + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 1 + wxALL + 3 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_entryDy + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 5 + + + + + + + + + + + + + + + + + + + + + + + + + + + OnParameterChanged + + + + + + + 5 + 1 + 2 + wxALL|wxALIGN_CENTER_VERTICAL + 3 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + mm + + 0 + + + 0 + + 1 + m_unitLabelDy + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 0 + wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL + 4 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + x Offset: + + 0 + + + 0 + + 1 + m_labelOffsetX + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 1 + wxALL + 4 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_entryOffsetX + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + OnParameterChanged + + + + + + + 5 + 1 + 2 + wxALL|wxALIGN_CENTER_VERTICAL + 4 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + mm + + 0 + + + 0 + + 1 + m_unitLabelOffsetX + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 0 + wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL + 5 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + y Offset: + + 0 + + + 0 + + 1 + m_labelOffsetY + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 1 + wxALL + 5 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_entryOffsetY + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + OnParameterChanged + + + + + + + 5 + 1 + 2 + wxALL|wxALIGN_CENTER_VERTICAL + 5 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + mm + + 0 + + + 0 + + 1 + m_unitLabelOffsetY + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 0 + wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL + 6 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Stagger: + + 0 + + + 0 + + 1 + m_labelStagger + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 1 + wxALL + 6 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_entryStagger + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + OnParameterChanged + + + + + + + 5 + 2 + 1 + wxALL|wxEXPAND + 7 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Rows" "Columns" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 1 + + 0 + + + 0 + + 1 + m_radioBoxGridStaggerType + 1 + + + protected + 1 + + Resizable + 0 + 1 + + wxRA_SPECIFY_COLS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 0 + wxALL + 7 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Stagger type: + + 0 + + + 0 + + 1 + m_labelGridStaggerType + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer3 + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Horizontal, then vertical" "Vertical, then horizontal" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Numbering direction: + 1 + + 0 + + + 0 + + 1 + m_radioBoxGridNumberingAxis + 1 + + + protected + 1 + + Resizable + 0 + 1 + + wxRA_SPECIFY_COLS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Reverse numbering on alternate rows/columns + + 0 + + + 0 + + 1 + m_checkBoxGridReverseNumbering + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Restart numbering + + 0 + + + 0 + + 1 + m_checkBoxGridRestartNumbering + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnParameterChanged + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Continuous (1, 2, 3...)" "Co-ordinate (A1, A2, ... B1, ...)" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Numbering scheme: + 1 + + 0 + + + 0 + + 1 + m_radioBoxGridNumberingScheme + 1 + + + protected + 1 + + Resizable + 0 + 1 + + wxRA_SPECIFY_COLS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + OnParameterChanged + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Primary axis numbering: + + 0 + + + 0 + + 1 + m_labelPriAxisNumbering + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_choicePriAxisNumbering + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + + 1 + + 0 + 0 + wxID_ANY + Secondary axis numbering: + + 0 + + + 0 + + 1 + m_labelSecAxisNumbering + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 0 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_choiceSecAxisNumbering + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + bSizer5 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Numbering start: + + 0 + + + 0 + + 1 + m_labelGridNumberingOffset + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_entryGridPriNumberingOffset + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_entryGridSecNumberingOffset + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Circular + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_circularPanel + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer4 + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + + wxBOTH + + + 0 + + gbSizer2 + wxFLEX_GROWMODE_SPECIFIED + none + 0 + + 5 + 1 + 0 + wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT + 0 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + x Centre: + + 0 + + + 0 + + 1 + m_labelCentreX + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 1 + wxALL + 0 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_entryCentreX + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + OnParameterChanged + + + + + + + + 5 + 1 + 2 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + mm + + 0 + + + 0 + + 1 + m_unitLabelCentreX + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 0 + wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT + 1 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + y Centre: + + 0 + + + 0 + + 1 + m_labelCentreY + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 1 + wxALL + 1 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_entryCentreY + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + OnParameterChanged + + + + + + + + 5 + 1 + 2 + wxALL|wxALIGN_CENTER_VERTICAL + 1 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + mm + + 0 + + + 0 + + 1 + m_unitLabelCentreY + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 0 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL + 2 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Radius: + + 0 + + + 0 + + 1 + m_labelCircRadius + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 1 + wxALL + 2 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + 0 mm + + 0 + + + 0 + + 1 + m_labelCircRadiusValue + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 0 + wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT + 3 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Angle: + + 0 + + + 0 + + 1 + m_labelCircAngle + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 1 + wxALL + 3 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_entryCircAngle + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Positive angles represent an anti-clockwise rotation. An angle of 0 will produce a full circle divided evenly into "Count" portions. + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + OnParameterChanged + + + + + + + 5 + 1 + 2 + wxALL|wxALIGN_CENTER_VERTICAL + 3 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + deg + + 0 + + + 0 + + 1 + m_unitLabelCircAngle + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 0 + wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT + 4 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Count: + + 0 + + + 0 + + 1 + m_labelCircCount + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 1 + wxALL + 4 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_entryCircCount + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + How many items in the array. + + wxFILTER_NONE + wxDefaultValidator + + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + OnParameterChanged + + + + + + + 5 + 1 + 0 + wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT + 5 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Rotate: + + 0 + + + 0 + + 1 + m_labelCircRotate + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 1 + wxALL + 5 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + + 0 + + 1 + m_entryRotateItemsCb + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Rotate the item as well as move it - multi-selections will be rotated together + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer6 + wxVERTICAL + none + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Restart numbering + + 0 + + + 0 + + 1 + m_checkBoxCircRestartNumbering + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Numbering type: + + 0 + + + 0 + + 1 + m_labelCircNumbering + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_choiceCircNumberingType + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + bSizer7 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Numbering start: + + 0 + + + 0 + + 1 + m_labelCircNumStart + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_entryCircNumberingStart + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + + m_stdButtons + protected + + OnCancelClick + + + + OnOkClick + + + + + + + + diff --git a/pcbnew/dialogs/dialog_create_array_base.h b/pcbnew/dialogs/dialog_create_array_base.h new file mode 100644 index 0000000000..442058e86b --- /dev/null +++ b/pcbnew/dialogs/dialog_create_array_base.h @@ -0,0 +1,121 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Jun 6 2014) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __DIALOG_CREATE_ARRAY_BASE_H__ +#define __DIALOG_CREATE_ARRAY_BASE_H__ + +#include +#include +#include +class DIALOG_SHIM; + +#include "dialog_shim.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + +#define wxID_DIALOG_CREATE_ARRAY 1000 + +/////////////////////////////////////////////////////////////////////////////// +/// Class DIALOG_CREATE_ARRAY_BASE +/////////////////////////////////////////////////////////////////////////////// +class DIALOG_CREATE_ARRAY_BASE : public DIALOG_SHIM +{ + private: + + protected: + wxNotebook* m_gridTypeNotebook; + wxPanel* m_gridPanel; + wxStaticText* m_labelNx; + wxTextCtrl* m_entryNx; + wxStaticText* m_labelNy; + wxTextCtrl* m_entryNy; + wxStaticText* m_labelDx; + wxTextCtrl* m_entryDx; + wxStaticText* m_unitLabelDx; + wxStaticText* m_labelDy; + wxTextCtrl* m_entryDy; + wxStaticText* m_unitLabelDy; + wxStaticText* m_labelOffsetX; + wxTextCtrl* m_entryOffsetX; + wxStaticText* m_unitLabelOffsetX; + wxStaticText* m_labelOffsetY; + wxTextCtrl* m_entryOffsetY; + wxStaticText* m_unitLabelOffsetY; + wxStaticText* m_labelStagger; + wxTextCtrl* m_entryStagger; + wxRadioBox* m_radioBoxGridStaggerType; + wxStaticText* m_labelGridStaggerType; + wxRadioBox* m_radioBoxGridNumberingAxis; + wxCheckBox* m_checkBoxGridReverseNumbering; + wxCheckBox* m_checkBoxGridRestartNumbering; + wxRadioBox* m_radioBoxGridNumberingScheme; + wxStaticText* m_labelPriAxisNumbering; + wxChoice* m_choicePriAxisNumbering; + wxStaticText* m_labelSecAxisNumbering; + wxChoice* m_choiceSecAxisNumbering; + wxStaticText* m_labelGridNumberingOffset; + wxTextCtrl* m_entryGridPriNumberingOffset; + wxTextCtrl* m_entryGridSecNumberingOffset; + wxPanel* m_circularPanel; + wxStaticText* m_labelCentreX; + wxTextCtrl* m_entryCentreX; + wxStaticText* m_unitLabelCentreX; + wxStaticText* m_labelCentreY; + wxTextCtrl* m_entryCentreY; + wxStaticText* m_unitLabelCentreY; + wxStaticText* m_labelCircRadius; + wxStaticText* m_labelCircRadiusValue; + wxStaticText* m_labelCircAngle; + wxTextCtrl* m_entryCircAngle; + wxStaticText* m_unitLabelCircAngle; + wxStaticText* m_labelCircCount; + wxTextCtrl* m_entryCircCount; + wxStaticText* m_labelCircRotate; + wxCheckBox* m_entryRotateItemsCb; + wxCheckBox* m_checkBoxCircRestartNumbering; + wxStaticText* m_labelCircNumbering; + wxChoice* m_choiceCircNumberingType; + wxStaticText* m_labelCircNumStart; + wxTextCtrl* m_entryCircNumberingStart; + wxStdDialogButtonSizer* m_stdButtons; + wxButton* m_stdButtonsOK; + wxButton* m_stdButtonsCancel; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnParameterChanged( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); } + + + public: + + DIALOG_CREATE_ARRAY_BASE( wxWindow* parent, wxWindowID id = wxID_DIALOG_CREATE_ARRAY, const wxString& title = _("Create array"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 576,528 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_CREATE_ARRAY_BASE(); + +}; + +#endif //__DIALOG_CREATE_ARRAY_BASE_H__ diff --git a/pcbnew/dialogs/dialog_move_exact.cpp b/pcbnew/dialogs/dialog_move_exact.cpp new file mode 100644 index 0000000000..070380cf4a --- /dev/null +++ b/pcbnew/dialogs/dialog_move_exact.cpp @@ -0,0 +1,210 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 John Beard, john.j.beard@gmail.com + * Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include + +#include + +#include "dialog_move_exact.h" + +// initialise statics +DIALOG_MOVE_EXACT::MOVE_EXACT_OPTIONS DIALOG_MOVE_EXACT::m_options; + + +DIALOG_MOVE_EXACT::DIALOG_MOVE_EXACT( PCB_BASE_FRAME* aParent, + wxPoint& translation, double& rotation ): + DIALOG_MOVE_EXACT_BASE( aParent ), + m_translation( translation ), + m_rotation( rotation ) +{ + // set the unit labels + m_xUnit->SetLabelText( GetAbbreviatedUnitsLabel( g_UserUnit ) ); + m_yUnit->SetLabelText( GetAbbreviatedUnitsLabel( g_UserUnit ) ); + // rotation is always degrees + m_rotUnit->SetLabelText( _( "deg" ) ); + + // tabbing goes through the entries in sequence + m_yEntry->MoveAfterInTabOrder( m_xEntry ); + m_rotEntry->MoveAfterInTabOrder( m_yEntry ); + + // and set up the entries according to the saved options + m_polarCoords->SetValue( m_options.polarCoords ); + m_xEntry->SetValue( wxString::FromDouble( m_options.entry1 ) ); + m_yEntry->SetValue( wxString::FromDouble( m_options.entry2 ) ); + m_rotEntry->SetValue( wxString::FromDouble( m_options.entryRotation ) ); + + Fit(); +} + + +DIALOG_MOVE_EXACT::~DIALOG_MOVE_EXACT() +{ +} + + +/*! + * Convert a given Cartesian point into a polar representation. + * + * Linear units are not considered, the answer is in the same units as given + * Angle is returned in degrees + */ +void DIALOG_MOVE_EXACT::ToPolarDeg( double x, double y, double& r, double& q ) +{ + // convert to polar coordinates + r = hypot ( x, y ); + + q = ( r != 0) ? RAD2DEG( atan2( y, x ) ) : 0; +} + + +/*! + * Get the (Cartesian) translation described by the text entries + * @param val output translation vector + * @param polar interpret as polar coords + * @return false if error (though the text conversion functions don't report errors) + */ +bool DIALOG_MOVE_EXACT::GetTranslationInIU ( wxPoint& val, bool polar ) +{ + if( polar ) + { + const int r = ValueFromTextCtrl( *m_xEntry ); + const double q = DoubleValueFromString( DEGREES, m_yEntry->GetValue() ); + + val.x = r * cos( DEG2RAD( q / 10.0 ) ); + val.y = r * sin( DEG2RAD( q / 10.0 ) ); + } + else + { + // direct read + val.x = ValueFromTextCtrl( *m_xEntry ); + val.y = ValueFromTextCtrl( *m_yEntry ); + } + + // no validation to do here, but in future, you could return false here + return true; +} + + +void DIALOG_MOVE_EXACT::OnPolarChanged( wxCommandEvent& event ) +{ + bool newPolar = m_polarCoords->IsChecked(); + wxPoint val; + + // get the value as previously stored + GetTranslationInIU( val, !newPolar ); + + if( newPolar ) + { + // convert to polar coordinates + double r, q; + ToPolarDeg( val.x, val.y, r, q); + + PutValueInLocalUnits( *m_xEntry, round( r / 10.0) * 10 ); + m_xLabel->SetLabelText( wxT( "r:" ) ); + + m_yEntry->SetValue( wxString::FromDouble( q ) ); + m_yLabel->SetLabelText( wxT( "\u03b8:" ) ); // theta + + m_yUnit->SetLabelText( GetAbbreviatedUnitsLabel( DEGREES ) ); + } + else + { + // vector is already in Cartesian, so just render out + + // note - round off the last decimal place (10nm) to prevent + // (some) rounding causing errors when round-tripping + // you can never eliminate entirely, however + PutValueInLocalUnits( *m_xEntry, round( val.x / 10.0) * 10 ); + m_xLabel->SetLabelText( wxT( "x:" ) ); + + PutValueInLocalUnits( *m_yEntry, round( val.y / 10.0) * 10 ); + m_yLabel->SetLabelText( wxT( "y:" ) ); + + m_yUnit->SetLabelText( GetAbbreviatedUnitsLabel( g_UserUnit ) ); + } +} + + +void DIALOG_MOVE_EXACT::OnClear( wxCommandEvent& event ) +{ + wxObject* obj = event.GetEventObject(); + wxTextCtrl* entry = NULL; + + if( obj == m_clearX ) + { + entry = m_xEntry; + } + else if( obj == m_clearY ) + { + entry = m_yEntry; + } + else if( obj == m_clearRot ) + { + entry = m_rotEntry; + } + + if( entry ) + entry->SetValue( "0" ); +} + + +void DIALOG_MOVE_EXACT::OnCancelClick( wxCommandEvent& event ) +{ + EndModal( MOVE_ABORT ); +} + + +void DIALOG_MOVE_EXACT::OnOkClick( wxCommandEvent& event ) +{ + m_rotation = DoubleValueFromString( DEGREES, m_rotEntry->GetValue() ); + + // for the output, we only deliver a Cartesian vector + bool ok = GetTranslationInIU( m_translation, m_polarCoords->IsChecked() ); + + if ( ok ) + { + // save the settings + m_options.polarCoords = m_polarCoords->GetValue(); + m_xEntry->GetValue().ToDouble( &m_options.entry1 ); + m_yEntry->GetValue().ToDouble( &m_options.entry2 ); + m_rotEntry->GetValue().ToDouble( &m_options.entryRotation ); + + EndModal( MOVE_OK ); + } +} + + +/*! + * Reset a text field to be 0 if it was exited while blank + */ +void DIALOG_MOVE_EXACT::OnTextFocusLost( wxFocusEvent& event ) +{ + wxTextCtrl* obj = static_cast( event.GetEventObject() ); + + if( obj->GetValue().IsEmpty() ) + { + obj->SetValue("0"); + } +} diff --git a/pcbnew/dialogs/dialog_move_exact.fbp b/pcbnew/dialogs/dialog_move_exact.fbp new file mode 100644 index 0000000000..db4223f270 --- /dev/null +++ b/pcbnew/dialogs/dialog_move_exact.fbp @@ -0,0 +1,1281 @@ + + + + + + C++ + 1 + source_name + 0 + 0 + res + UTF-8 + connect + dialog_move_exact_base + 1000 + none + 1 + DIALOG_MOVE_EXACT_BASE + + . + + 1 + 1 + 1 + 1 + UI + 0 + 0 + + 0 + wxAUI_MGR_DEFAULT + + + + 1 + 1 + impl_virtual + + + + 0 + wxID_ANY + + -1,-1 + DIALOG_MOVE_EXACT_BASE + + -1,-1 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + DIALOG_SHIM; dialog_shim.h + Move item + + + + + + + + + + + + + + OnClose + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bMainSizer + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Polar coordinates + + 0 + + + 0 + + 1 + m_polarCoords + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnPolarChanged + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + 4 + wxBOTH + 1 + + 0 + + fgSizer2 + wxFLEX_GROWMODE_SPECIFIED + none + 0 + 0 + + 5 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + x: + + 0 + + + 0 + + 1 + m_xLabel + 1 + + + protected + 1 + + Resizable + 1 + -1,-1 + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_xEntry + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + + + OnTextFocusLost + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + mm + + 0 + + + 0 + + 1 + m_xUnit + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + Load From Art Provider; wxART_DELETE; wxART_BUTTON + + 1 + 0 + 1 + + 1 + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + + wxID_CLEAR + Clear + + 0 + + + 0 + + 1 + m_clearX + 1 + + + protected + 1 + + Resizable + + 1 + + wxBU_AUTODRAW + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnClear + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + y: + + 0 + + + 0 + + 1 + m_yLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_yEntry + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + + + OnTextFocusLost + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + mm + + 0 + + + 0 + + 1 + m_yUnit + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + Load From Art Provider; wxART_DELETE; wxART_BUTTON + + 1 + 0 + 1 + + 1 + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + + wxID_CLEAR + Clear + + 0 + + + 0 + + 1 + m_clearY + 1 + + + protected + 1 + + Resizable + + 1 + + wxBU_AUTODRAW + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnClear + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Rotate: + + 0 + + + 0 + + 1 + m_rotLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_rotEntry + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + + + OnTextFocusLost + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + deg + + 0 + + + 0 + + 1 + m_rotUnit + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + Load From Art Provider; wxART_DELETE; wxART_BUTTON + + 1 + 0 + 1 + + 1 + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + + wxID_CLEAR + Clear + + 0 + + + 0 + + 1 + m_clearRot + 1 + + + protected + 1 + + Resizable + + 1 + + wxBU_AUTODRAW + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnClear + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + + m_stdButtons + protected + + OnCancelClick + + + + OnOkClick + + + + + + + + diff --git a/pcbnew/dialogs/dialog_move_exact.h b/pcbnew/dialogs/dialog_move_exact.h new file mode 100644 index 0000000000..b71f871551 --- /dev/null +++ b/pcbnew/dialogs/dialog_move_exact.h @@ -0,0 +1,87 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2014 John Beard, john.j.beard@gmail.com + * Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __DIALOG_MOVE_EXACT__ +#define __DIALOG_MOVE_EXACT__ + +// Include the wxFormBuider header base: +#include +#include + +class DIALOG_MOVE_EXACT : public DIALOG_MOVE_EXACT_BASE +{ +private: + + wxPoint& m_translation; + double& m_rotation; + +public: + + enum MOVE_EDIT_T + { + MOVE_ABORT, ///< if not changed or error + MOVE_OK, ///< if successfully changed + }; + + // Constructor and destructor + DIALOG_MOVE_EXACT( PCB_BASE_FRAME* aParent, wxPoint& translation, + double& rotation ); + ~DIALOG_MOVE_EXACT(); + +private: + + void OnTextFocusLost( wxFocusEvent& event ); + void OnPolarChanged( wxCommandEvent& event ); + void OnClear( wxCommandEvent& event ); + + void OnCancelClick( wxCommandEvent& event ); + void OnOkClick( wxCommandEvent& event ); + + void ToPolarDeg( double x, double y, double& r, double& q ); + bool GetTranslationInIU ( wxPoint& val, bool polar ); + + /** + * Persistent dialog options + */ + struct MOVE_EXACT_OPTIONS + { + bool polarCoords; + double entry1; + double entry2; + double entryRotation; + + MOVE_EXACT_OPTIONS(): + polarCoords(false), + entry1(0), + entry2(0), + entryRotation(0) + { + } + }; + + // persistent settings + static MOVE_EXACT_OPTIONS m_options; +}; + +#endif // __DIALOG_MOVE_EXACT__ diff --git a/pcbnew/dialogs/dialog_move_exact_base.cpp b/pcbnew/dialogs/dialog_move_exact_base.cpp new file mode 100644 index 0000000000..4f2644ac27 --- /dev/null +++ b/pcbnew/dialogs/dialog_move_exact_base.cpp @@ -0,0 +1,114 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Jun 6 2014) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "dialog_move_exact_base.h" + +/////////////////////////////////////////////////////////////////////////// + +DIALOG_MOVE_EXACT_BASE::DIALOG_MOVE_EXACT_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize ); + + wxBoxSizer* bMainSizer; + bMainSizer = new wxBoxSizer( wxVERTICAL ); + + m_polarCoords = new wxCheckBox( this, wxID_ANY, _("Polar coordinates"), wxDefaultPosition, wxDefaultSize, 0 ); + bMainSizer->Add( m_polarCoords, 0, wxALL|wxEXPAND, 5 ); + + wxFlexGridSizer* fgSizer2; + fgSizer2 = new wxFlexGridSizer( 0, 4, 0, 0 ); + fgSizer2->AddGrowableCol( 1 ); + fgSizer2->SetFlexibleDirection( wxBOTH ); + fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_xLabel = new wxStaticText( this, wxID_ANY, _("x:"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_xLabel->Wrap( -1 ); + fgSizer2->Add( m_xLabel, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); + + m_xEntry = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer2->Add( m_xEntry, 0, wxALL|wxEXPAND, 5 ); + + m_xUnit = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 ); + m_xUnit->Wrap( -1 ); + fgSizer2->Add( m_xUnit, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxALL, 5 ); + + m_clearX = new wxBitmapButton( this, wxID_CLEAR, wxArtProvider::GetBitmap( wxART_DELETE, wxART_BUTTON ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); + fgSizer2->Add( m_clearX, 0, wxALL, 5 ); + + m_yLabel = new wxStaticText( this, wxID_ANY, _("y:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_yLabel->Wrap( -1 ); + fgSizer2->Add( m_yLabel, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); + + m_yEntry = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer2->Add( m_yEntry, 0, wxALL|wxEXPAND, 5 ); + + m_yUnit = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 ); + m_yUnit->Wrap( -1 ); + fgSizer2->Add( m_yUnit, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_clearY = new wxBitmapButton( this, wxID_CLEAR, wxArtProvider::GetBitmap( wxART_DELETE, wxART_BUTTON ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); + fgSizer2->Add( m_clearY, 0, wxALL, 5 ); + + m_rotLabel = new wxStaticText( this, wxID_ANY, _("Rotate:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_rotLabel->Wrap( -1 ); + fgSizer2->Add( m_rotLabel, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); + + m_rotEntry = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer2->Add( m_rotEntry, 0, wxALL|wxEXPAND, 5 ); + + m_rotUnit = new wxStaticText( this, wxID_ANY, _("deg"), wxDefaultPosition, wxDefaultSize, 0 ); + m_rotUnit->Wrap( -1 ); + fgSizer2->Add( m_rotUnit, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_clearRot = new wxBitmapButton( this, wxID_CLEAR, wxArtProvider::GetBitmap( wxART_DELETE, wxART_BUTTON ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); + fgSizer2->Add( m_clearRot, 0, wxALL, 5 ); + + + bMainSizer->Add( fgSizer2, 1, wxEXPAND, 5 ); + + m_stdButtons = new wxStdDialogButtonSizer(); + m_stdButtonsOK = new wxButton( this, wxID_OK ); + m_stdButtons->AddButton( m_stdButtonsOK ); + m_stdButtonsCancel = new wxButton( this, wxID_CANCEL ); + m_stdButtons->AddButton( m_stdButtonsCancel ); + m_stdButtons->Realize(); + + bMainSizer->Add( m_stdButtons, 0, wxALL|wxEXPAND, 5 ); + + + this->SetSizer( bMainSizer ); + this->Layout(); + bMainSizer->Fit( this ); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_MOVE_EXACT_BASE::OnClose ) ); + m_polarCoords->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnPolarChanged ), NULL, this ); + m_xEntry->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextFocusLost ), NULL, this ); + m_clearX->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnClear ), NULL, this ); + m_yEntry->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextFocusLost ), NULL, this ); + m_clearY->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnClear ), NULL, this ); + m_rotEntry->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextFocusLost ), NULL, this ); + m_clearRot->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnClear ), NULL, this ); + m_stdButtonsCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnCancelClick ), NULL, this ); + m_stdButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnOkClick ), NULL, this ); +} + +DIALOG_MOVE_EXACT_BASE::~DIALOG_MOVE_EXACT_BASE() +{ + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_MOVE_EXACT_BASE::OnClose ) ); + m_polarCoords->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnPolarChanged ), NULL, this ); + m_xEntry->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextFocusLost ), NULL, this ); + m_clearX->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnClear ), NULL, this ); + m_yEntry->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextFocusLost ), NULL, this ); + m_clearY->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnClear ), NULL, this ); + m_rotEntry->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextFocusLost ), NULL, this ); + m_clearRot->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnClear ), NULL, this ); + m_stdButtonsCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnCancelClick ), NULL, this ); + m_stdButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnOkClick ), NULL, this ); + +} diff --git a/pcbnew/dialogs/dialog_move_exact_base.h b/pcbnew/dialogs/dialog_move_exact_base.h new file mode 100644 index 0000000000..e8072f8848 --- /dev/null +++ b/pcbnew/dialogs/dialog_move_exact_base.h @@ -0,0 +1,77 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Jun 6 2014) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __DIALOG_MOVE_EXACT_BASE_H__ +#define __DIALOG_MOVE_EXACT_BASE_H__ + +#include +#include +#include +class DIALOG_SHIM; + +#include "dialog_shim.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class DIALOG_MOVE_EXACT_BASE +/////////////////////////////////////////////////////////////////////////////// +class DIALOG_MOVE_EXACT_BASE : public DIALOG_SHIM +{ + private: + + protected: + wxCheckBox* m_polarCoords; + wxStaticText* m_xLabel; + wxTextCtrl* m_xEntry; + wxStaticText* m_xUnit; + wxBitmapButton* m_clearX; + wxStaticText* m_yLabel; + wxTextCtrl* m_yEntry; + wxStaticText* m_yUnit; + wxBitmapButton* m_clearY; + wxStaticText* m_rotLabel; + wxTextCtrl* m_rotEntry; + wxStaticText* m_rotUnit; + wxBitmapButton* m_clearRot; + wxStdDialogButtonSizer* m_stdButtons; + wxButton* m_stdButtonsOK; + wxButton* m_stdButtonsCancel; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnPolarChanged( wxCommandEvent& event ) { event.Skip(); } + virtual void OnTextFocusLost( wxFocusEvent& event ) { event.Skip(); } + virtual void OnClear( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); } + + + public: + + DIALOG_MOVE_EXACT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Move item"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_MOVE_EXACT_BASE(); + +}; + +#endif //__DIALOG_MOVE_EXACT_BASE_H__ diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index 4e79cb43db..25b3d8be0f 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -54,6 +54,9 @@ #include #include +#include +#include + #include #include @@ -1188,6 +1191,19 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) } break; + case ID_POPUP_PCB_MOVE_EXACT: + moveExact(); + break; + + case ID_POPUP_PCB_DUPLICATE_ITEM: + case ID_POPUP_PCB_DUPLICATE_ITEM_AND_INCREMENT: + duplicateItem( id == ID_POPUP_PCB_DUPLICATE_ITEM_AND_INCREMENT ); + break; + + case ID_POPUP_PCB_CREATE_ARRAY: + createArray(); + break; + case ID_MENU_PCB_CLEAN: Clean_Pcb(); break; @@ -1486,3 +1502,196 @@ void PCB_EDIT_FRAME::OnSelectTool( wxCommandEvent& aEvent ) break; } } + + +void PCB_EDIT_FRAME::moveExact() +{ + wxPoint translation; + double rotation = 0; + + DIALOG_MOVE_EXACT dialog( this, translation, rotation ); + int ret = dialog.ShowModal(); + + if( ret == DIALOG_MOVE_EXACT::MOVE_OK ) + { + BOARD_ITEM* item = GetScreen()->GetCurItem(); + + // Could be moved or rotated + SaveCopyInUndoList( item, UR_CHANGED ); + + item->Move( translation ); + item->Rotate( item->GetPosition(), rotation ); + m_canvas->Refresh(); + } + + m_canvas->MoveCursorToCrossHair(); +} + + +void PCB_EDIT_FRAME::duplicateItem( bool aIncrement ) +{ + BOARD_ITEM* item = GetScreen()->GetCurItem(); + + int move_cmd = 0; + + BOARD_ITEM* new_item = GetBoard()->DuplicateAndAddItem( + item, aIncrement ); + + SaveCopyInUndoList( new_item, UR_NEW ); + + if( new_item ) + { + switch( new_item->Type() ) + { + case PCB_MODULE_T: + move_cmd = ID_POPUP_PCB_MOVE_MODULE_REQUEST; + break; + case PCB_TEXT_T: + move_cmd = ID_POPUP_PCB_MOVE_TEXTEPCB_REQUEST; + break; + case PCB_LINE_T: + move_cmd = ID_POPUP_PCB_MOVE_DRAWING_REQUEST; + break; + case PCB_ZONE_AREA_T: + move_cmd = ID_POPUP_PCB_MOVE_ZONE_OUTLINES; + break; + case PCB_TRACE_T: + move_cmd = ID_POPUP_PCB_MOVE_TRACK_SEGMENT; + break; + case PCB_TARGET_T: + move_cmd = ID_POPUP_PCB_MOVE_MIRE_REQUEST; + break; + case PCB_DIMENSION_T: + move_cmd = ID_POPUP_PCB_MOVE_TEXT_DIMENSION_REQUEST; + break; + case PCB_PAD_T: + move_cmd = ID_POPUP_PCB_MOVE_PAD_REQUEST; + break; + default: + break; + } + + if( move_cmd ) + { + SetMsgPanel( new_item ); + SetCurItem( new_item ); + + m_canvas->MoveCursorToCrossHair(); + + // pick up the item and start moving + PostCommandMenuEvent( move_cmd ); + } + } +} + + +void PCB_BASE_EDIT_FRAME::createArray() +{ + BOARD_ITEM* item = GetScreen()->GetCurItem(); + + if( !item ) + return; + + bool editingModule = NULL != dynamic_cast( this ); + + BOARD* board = GetBoard(); + MODULE* module = static_cast( item->GetParent() ); + + DIALOG_CREATE_ARRAY::ARRAY_OPTIONS* array_opts = NULL; + + const wxPoint rotPoint = item->GetCenter(); + + DIALOG_CREATE_ARRAY dialog( this, rotPoint, &array_opts ); + int ret = dialog.ShowModal(); + + if( ret == DIALOG_CREATE_ARRAY::CREATE_ARRAY_OK && array_opts != NULL ) + { + PICKED_ITEMS_LIST newItemsList; + + if( editingModule ) + { + // modedit saves everything upfront + SaveCopyInUndoList( board->m_Modules, UR_MODEDIT ); + } + else + { + // We may also change the original item + SaveCopyInUndoList( item, UR_CHANGED ); + } + + wxString cachedString; + + if( item->Type() == PCB_MODULE_T ) + { + cachedString = static_cast( item )->GetReferencePrefix(); + } + else if( EDA_TEXT* text = dynamic_cast( item ) ) + { + // Copy the text (not just take a reference + cachedString = text->GetText(); + } + + for( int ptN = 0; ptN < array_opts->GetArraySize(); ptN++) + { + BOARD_ITEM* new_item = NULL; + + if( ptN == 0 ) + { + new_item = item; + } + else + { + if( editingModule ) + new_item = module->DuplicateAndAddItem( item, true ); + else + new_item = board->DuplicateAndAddItem( item, true ); + + if( new_item ) + { + array_opts->TransformItem( ptN, new_item, rotPoint ); + newItemsList.PushItem( new_item ); + } + } + + if( !new_item || !array_opts->ShouldRenumberItems() ) + continue; + + // Renumber items + switch( new_item->Type() ) + { + case PCB_MODULE_TEXT_T: + case PCB_TEXT_T: + { + EDA_TEXT* text = dynamic_cast( new_item ); + text->SetText( array_opts->InterpolateNumberIntoString( ptN, cachedString ) ); + + break; + } + case PCB_MODULE_T: + { + const wxString padName = array_opts->GetItemNumber( ptN ); + static_cast( new_item )->SetReference( cachedString + padName ); + + break; + } + case PCB_PAD_T: + { + const wxString padName = array_opts->GetItemNumber( ptN ); + static_cast( new_item )->SetPadName( padName ); + + break; + } + default: + break; + } + } + + if( !editingModule ) + { + // pcbnew saves the new items like this + SaveCopyInUndoList( newItemsList, UR_NEW ); + } + + m_canvas->Refresh(); + } +} diff --git a/pcbnew/hotkeys.cpp b/pcbnew/hotkeys.cpp index 006c0b2651..662c81b1e7 100644 --- a/pcbnew/hotkeys.cpp +++ b/pcbnew/hotkeys.cpp @@ -108,6 +108,11 @@ static EDA_HOTKEY HkEditBoardItem( wxT( "Edit Item" ), HK_EDIT_ITEM, 'E' ); static EDA_HOTKEY HkFlipItem( wxT( "Flip Item" ), HK_FLIP_ITEM, 'F' ); static EDA_HOTKEY HkRotateItem( wxT( "Rotate Item" ), HK_ROTATE_ITEM, 'R' ); static EDA_HOTKEY HkMoveItem( wxT( "Move Item" ), HK_MOVE_ITEM, 'M' ); +static EDA_HOTKEY HkMoveItemExact( wxT( "Move Item Exactly" ), HK_MOVE_ITEM_EXACT, 'M' + GR_KB_CTRL ); +static EDA_HOTKEY HkDuplicateItem( wxT( "Duplicate Item" ), HK_DUPLICATE_ITEM, 'D' + GR_KB_CTRL ); +static EDA_HOTKEY HkDuplicateItemAndIncrement( wxT( "Duplicate Item and Increment" ), + HK_DUPLICATE_ITEM_AND_INCREMENT, 'D' + GR_KB_SHIFTCTRL ); +static EDA_HOTKEY HkCreateArray( wxT( "Create Array" ), HK_CREATE_ARRAY, 'N' + GR_KB_CTRL ); static EDA_HOTKEY HkCopyItem( wxT( "Copy Item" ), HK_COPY_ITEM, 'C' ); static EDA_HOTKEY HkDragFootprint( wxT( "Drag Item" ), HK_DRAG_ITEM, 'G' ); static EDA_HOTKEY HkGetAndMoveFootprint( wxT( "Get and Move Footprint" ), HK_GET_AND_MOVE_FOOTPRINT, 'T' ); @@ -277,7 +282,9 @@ EDA_HOTKEY* board_edit_Hotkey_List[] = &HkPlaceItem, &HkCopyItem, &HkMoveItem, &HkFlipItem, - &HkRotateItem, &HkDragFootprint, + &HkRotateItem, &HkMoveItemExact, + &HkDuplicateItem, &HkDuplicateItemAndIncrement, &HkCreateArray, + &HkDragFootprint, &HkGetAndMoveFootprint, &HkLock_Unlock_Footprint, &HkSavefile, &HkSavefileAs, &HkLoadfile, &HkFindItem, &HkEditBoardItem, &HkSwitch2CopperLayer, &HkSwitch2InnerLayer1, @@ -300,8 +307,8 @@ EDA_HOTKEY* board_edit_Hotkey_List[] = // List of hotkey descriptors for the module editor EDA_HOTKEY* module_edit_Hotkey_List[] = { &HkMoveItem, &HkRotateItem, &HkEditBoardItem, - &HkDelete, - &HkSaveModule, + &HkMoveItemExact, &HkDuplicateItem, &HkDuplicateItemAndIncrement, + &HkCreateArray, &HkDelete, &HkSaveModule, NULL }; diff --git a/pcbnew/hotkeys.h b/pcbnew/hotkeys.h index ca58a7fddd..661514a707 100644 --- a/pcbnew/hotkeys.h +++ b/pcbnew/hotkeys.h @@ -41,6 +41,7 @@ enum hotkey_id_commnand { HK_FLIP_ITEM, HK_COPY_ITEM, HK_MOVE_ITEM, + HK_MOVE_ITEM_EXACT, HK_DRAG_ITEM, HK_GET_AND_MOVE_FOOTPRINT, HK_LOCK_UNLOCK_FOOTPRINT, @@ -60,6 +61,9 @@ enum hotkey_id_commnand { HK_SWITCH_TRACK_DISPLAY_MODE, HK_FIND_ITEM, HK_EDIT_ITEM, + HK_DUPLICATE_ITEM, + HK_DUPLICATE_ITEM_AND_INCREMENT, + HK_CREATE_ARRAY, HK_PLACE_ITEM, HK_SWITCH_TRACK_WIDTH_TO_NEXT, HK_SWITCH_TRACK_WIDTH_TO_PREVIOUS, diff --git a/pcbnew/hotkeys_board_editor.cpp b/pcbnew/hotkeys_board_editor.cpp index 02ecf4ff58..f4477d4432 100644 --- a/pcbnew/hotkeys_board_editor.cpp +++ b/pcbnew/hotkeys_board_editor.cpp @@ -551,6 +551,13 @@ bool PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit OnHotkeyRotateItem( HK_FLIP_ITEM ); break; + case HK_MOVE_ITEM_EXACT: + case HK_DUPLICATE_ITEM: + case HK_DUPLICATE_ITEM_AND_INCREMENT: + case HK_CREATE_ARRAY: + OnHotkeyDuplicateOrArrayItem( HK_Descr->m_Idcommand ); + break; + case HK_SWITCH_HIGHCONTRAST_MODE: // switch to high contrast mode and refresh the canvas displ_opts->m_ContrastModeDisplay = !displ_opts->m_ContrastModeDisplay; m_canvas->Refresh(); @@ -896,7 +903,6 @@ bool PCB_EDIT_FRAME::OnHotkeyMoveItem( int aIdCommand ) return false; } - bool PCB_EDIT_FRAME::OnHotkeyPlaceItem( wxDC* aDC ) { BOARD_ITEM* item = GetCurItem(); @@ -1064,3 +1070,71 @@ bool PCB_EDIT_FRAME::OnHotkeyRotateItem( int aIdCommand ) return false; } + +bool PCB_EDIT_FRAME::OnHotkeyDuplicateOrArrayItem( int aIdCommand ) +{ + BOARD_ITEM* item = GetCurItem(); + bool itemCurrentlyEdited = item && item->GetFlags(); + + if( itemCurrentlyEdited ) + return false; + + item = PcbGeneralLocateAndDisplay(); + + if( item == NULL ) + return false; + + SetCurItem( item ); + + int evt_type = 0; // Used to post a wxCommandEvent on demand + + bool canDuplicate = true; + + switch( item->Type() ) + { + // Only handle items we know we can handle + case PCB_PAD_T: + canDuplicate = false; + // no break + case PCB_MODULE_T: + case PCB_LINE_T: + case PCB_TEXT_T: + case PCB_TRACE_T: + case PCB_ZONE_AREA_T: + case PCB_TARGET_T: + case PCB_DIMENSION_T: + switch( aIdCommand ) + { + case HK_CREATE_ARRAY: + if( canDuplicate ) + evt_type = ID_POPUP_PCB_CREATE_ARRAY; + break; + + case HK_DUPLICATE_ITEM_AND_INCREMENT: + if( canDuplicate ) + evt_type = ID_POPUP_PCB_DUPLICATE_ITEM_AND_INCREMENT; + break; + + case HK_DUPLICATE_ITEM: + if( canDuplicate ) + evt_type = ID_POPUP_PCB_DUPLICATE_ITEM; + break; + + case HK_MOVE_ITEM_EXACT: + evt_type = ID_POPUP_PCB_MOVE_EXACT; + break; + + default: + // We don't handle other commands here + break; + } + break; + + default: + wxASSERT_MSG( false, "Unhandled move, duplicate or array for " + "object type " + item->Type() ); + break; + } + + return PostCommandMenuEvent( evt_type ); +} diff --git a/pcbnew/hotkeys_module_editor.cpp b/pcbnew/hotkeys_module_editor.cpp index 918d8a493c..fb52062d15 100644 --- a/pcbnew/hotkeys_module_editor.cpp +++ b/pcbnew/hotkeys_module_editor.cpp @@ -152,31 +152,72 @@ bool FOOTPRINT_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPos OnHotkeyMoveItem( HK_MOVE_ITEM ); break; + case HK_MOVE_ITEM_EXACT: + if( blockActive ) + { + cmd.SetId( ID_POPUP_MOVE_BLOCK_EXACT ); + GetEventHandler()->ProcessEvent( cmd ); + } + else + { + OnHotkeyMoveItemExact(); + } + break; + case HK_ROTATE_ITEM: OnHotkeyRotateItem( HK_ROTATE_ITEM ); break; + + case HK_DUPLICATE_ITEM: + case HK_DUPLICATE_ITEM_AND_INCREMENT: + OnHotkeyDuplicateItem( HK_Descr->m_Idcommand ); + break; + + case HK_CREATE_ARRAY: + PostCommandMenuEvent( ID_POPUP_PCB_CREATE_ARRAY ); } return true; } -bool FOOTPRINT_EDIT_FRAME::OnHotkeyEditItem( int aIdCommand ) +BOARD_ITEM* FOOTPRINT_EDIT_FRAME::PrepareItemForHotkey( bool aFailIfCurrentlyEdited ) { BOARD_ITEM* item = GetCurItem(); bool itemCurrentlyEdited = item && item->GetFlags(); bool blockActive = GetScreen()->m_BlockLocate.GetCommand() != BLOCK_IDLE; - if( itemCurrentlyEdited || blockActive ) - return false; + if( aFailIfCurrentlyEdited ) + { + if( itemCurrentlyEdited || blockActive ) + return NULL; - item = ModeditLocateAndDisplay(); + item = ModeditLocateAndDisplay(); + } + else + { + if( blockActive ) + return NULL; + + if( !itemCurrentlyEdited ) + item = ModeditLocateAndDisplay(); + } + + // set item if we can, but don't clear if not + if( item ) + SetCurItem( item ); + + return item; +} + + +bool FOOTPRINT_EDIT_FRAME::OnHotkeyEditItem( int aIdCommand ) +{ + BOARD_ITEM* item = PrepareItemForHotkey( true ); if( item == NULL ) return false; - SetCurItem( item ); - int evt_type = 0; // Used to post a wxCommandEvent on demand switch( item->Type() ) @@ -209,35 +250,17 @@ bool FOOTPRINT_EDIT_FRAME::OnHotkeyEditItem( int aIdCommand ) break; } - if( evt_type != 0 ) - { - wxCommandEvent evt( wxEVT_COMMAND_MENU_SELECTED ); - evt.SetEventObject( this ); - evt.SetId( evt_type ); - wxPostEvent( this, evt ); - return true; - } - - return false; + return PostCommandMenuEvent( evt_type ); } bool FOOTPRINT_EDIT_FRAME::OnHotkeyDeleteItem( int aIdCommand ) { - BOARD_ITEM* item = GetCurItem(); - bool itemCurrentlyEdited = item && item->GetFlags(); - bool blockActive = GetScreen()->m_BlockLocate.GetCommand() != BLOCK_IDLE; - - if( itemCurrentlyEdited || blockActive ) - return false; - - item = ModeditLocateAndDisplay(); + BOARD_ITEM* item = PrepareItemForHotkey( true ); if( item == NULL ) return false; - SetCurItem( item ); - int evt_type = 0; // Used to post a wxCommandEvent on demand switch( item->Type() ) @@ -264,35 +287,17 @@ bool FOOTPRINT_EDIT_FRAME::OnHotkeyDeleteItem( int aIdCommand ) break; } - if( evt_type != 0 ) - { - wxCommandEvent evt( wxEVT_COMMAND_MENU_SELECTED ); - evt.SetEventObject( this ); - evt.SetId( evt_type ); - wxPostEvent( this, evt ); - return true; - } - - return false; + return PostCommandMenuEvent( evt_type ); } bool FOOTPRINT_EDIT_FRAME::OnHotkeyMoveItem( int aIdCommand ) { - BOARD_ITEM* item = GetCurItem(); - bool itemCurrentlyEdited = item && item->GetFlags(); - bool blockActive = GetScreen()->m_BlockLocate.GetCommand() != BLOCK_IDLE; - - if( itemCurrentlyEdited || blockActive ) - return false; - - item = ModeditLocateAndDisplay(); + BOARD_ITEM* item = PrepareItemForHotkey( true ); if( item == NULL ) return false; - SetCurItem( item ); - int evt_type = 0; // Used to post a wxCommandEvent on demand switch( item->Type() ) @@ -319,36 +324,71 @@ bool FOOTPRINT_EDIT_FRAME::OnHotkeyMoveItem( int aIdCommand ) break; } - if( evt_type != 0 ) + return PostCommandMenuEvent( evt_type ); +} + + +bool FOOTPRINT_EDIT_FRAME::OnHotkeyMoveItemExact() +{ + BOARD_ITEM* item = PrepareItemForHotkey( false ); + + if( item == NULL ) + return false; + + int evt_type = 0; // Used to post a wxCommandEvent on demand + + switch( item->Type() ) { - wxCommandEvent evt( wxEVT_COMMAND_MENU_SELECTED ); - evt.SetEventObject( this ); - evt.SetId( evt_type ); - wxPostEvent( this, evt ); - return true; + case PCB_PAD_T: + case PCB_MODULE_EDGE_T: + case PCB_MODULE_TEXT_T: + evt_type = ID_POPUP_PCB_MOVE_EXACT; + break; + default: + break; } - return false; + return PostCommandMenuEvent( evt_type ); +} + + +bool FOOTPRINT_EDIT_FRAME::OnHotkeyDuplicateItem( int aIdCommand ) +{ + BOARD_ITEM* item = PrepareItemForHotkey( true ); + + if( item == NULL ) + return false; + + int evt_type = 0; // Used to post a wxCommandEvent on demand + + switch( item->Type() ) + { + case PCB_PAD_T: + case PCB_MODULE_EDGE_T: + case PCB_MODULE_TEXT_T: + if( aIdCommand == HK_DUPLICATE_ITEM ) + evt_type = ID_POPUP_PCB_DUPLICATE_ITEM; + else + evt_type = ID_POPUP_PCB_DUPLICATE_ITEM_AND_INCREMENT; + + break; + + default: + break; + } + + return PostCommandMenuEvent( evt_type ); } bool FOOTPRINT_EDIT_FRAME::OnHotkeyRotateItem( int aIdCommand ) { - BOARD_ITEM* item = GetCurItem(); - bool itemCurrentlyEdited = item && item->GetFlags(); - int evt_type = 0; // Used to post a wxCommandEvent on demand - bool blockActive = GetScreen()->m_BlockLocate.GetCommand() != BLOCK_IDLE; - - if( blockActive ) - return false; - - if( !itemCurrentlyEdited ) - item = ModeditLocateAndDisplay(); + BOARD_ITEM* item = PrepareItemForHotkey( false ); if( item == NULL ) return false; - SetCurItem( item ); + int evt_type = 0; // Used to post a wxCommandEvent on demand switch( item->Type() ) { @@ -362,14 +402,5 @@ bool FOOTPRINT_EDIT_FRAME::OnHotkeyRotateItem( int aIdCommand ) break; } - if( evt_type != 0 ) - { - wxCommandEvent evt( wxEVT_COMMAND_MENU_SELECTED ); - evt.SetEventObject( this ); - evt.SetId( evt_type ); - wxPostEvent( this, evt ); - return true; - } - - return false; + return PostCommandMenuEvent( evt_type ); } diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index 61951c2795..d135cf880e 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -55,6 +55,8 @@ #include #include +#include +#include #include #include #include @@ -64,10 +66,13 @@ // Functions defined in block_module_editor, but used here -// These 2 functions are used in modedit to rotate or mirror the whole footprint -// so they are called with force_all = true +// These 3 functions are used in modedit to rotate, mirror or move the +// whole footprint so they are called with force_all = true void MirrorMarkedItems( MODULE* module, wxPoint offset, bool force_all = false ); void RotateMarkedItems( MODULE* module, wxPoint offset, bool force_all = false ); +void MoveMarkedItemsExactly( MODULE* module, const wxPoint& centre, + const wxPoint& translation, double rotation, + bool force_all = false ); BOARD_ITEM* FOOTPRINT_EDIT_FRAME::ModeditLocateAndDisplay( int aHotKeyCode ) @@ -635,6 +640,22 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) m_canvas->MoveCursorToCrossHair(); break; + case ID_POPUP_PCB_DUPLICATE_ITEM: + duplicateItems( false ); + break; + + case ID_POPUP_PCB_DUPLICATE_ITEM_AND_INCREMENT: + duplicateItems( true ); + break; + + case ID_POPUP_PCB_MOVE_EXACT: + moveExact(); + break; + + case ID_POPUP_PCB_CREATE_ARRAY: + createArray(); + break; + case ID_POPUP_PCB_IMPORT_PAD_SETTINGS: SaveCopyInUndoList( GetBoard()->m_Modules, UR_MODEDIT ); m_canvas->MoveCursorToCrossHair(); @@ -735,6 +756,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_MODEDIT_MODULE_ROTATE: case ID_MODEDIT_MODULE_MIRROR: + case ID_MODEDIT_MODULE_MOVE_EXACT: SaveCopyInUndoList( GetBoard()->m_Modules, UR_MODEDIT ); Transform( (MODULE*) GetScreen()->GetCurItem(), id ); m_canvas->Refresh(); @@ -799,6 +821,12 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) HandleBlockEnd( &dc ); break; + case ID_POPUP_MOVE_BLOCK_EXACT: + GetScreen()->m_BlockLocate.SetCommand( BLOCK_MOVE_EXACT ); + GetScreen()->m_BlockLocate.SetMessageBlock( this ); + HandleBlockEnd( &dc ); + break; + case ID_GEN_IMPORT_DXF_FILE: InvokeDXFDialogModuleImport( this, GetBoard()->m_Modules ); m_canvas->Refresh(); @@ -812,6 +840,72 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) } +void FOOTPRINT_EDIT_FRAME::moveExact() +{ + wxPoint translation; + double rotation = 0; + + DIALOG_MOVE_EXACT dialog( this, translation, rotation ); + int ret = dialog.ShowModal(); + + if( ret == DIALOG_MOVE_EXACT::MOVE_OK ) + { + SaveCopyInUndoList( GetBoard()->m_Modules, UR_MODEDIT ); + + BOARD_ITEM* item = GetScreen()->GetCurItem(); + + item->Move( translation ); + item->Rotate( item->GetPosition(), rotation ); + m_canvas->Refresh(); + } + + m_canvas->MoveCursorToCrossHair(); +} + + +void FOOTPRINT_EDIT_FRAME::duplicateItems( bool aIncrement ) +{ + SaveCopyInUndoList( GetBoard()->m_Modules, UR_MODEDIT ); + + BOARD_ITEM* item = GetScreen()->GetCurItem(); + MODULE* module = static_cast( item->GetParent() ); + + int move_cmd = 0; + + BOARD_ITEM* new_item = module->DuplicateAndAddItem( + item, aIncrement ); + + if( new_item ) + { + switch( new_item->Type() ) + { + case PCB_PAD_T: + move_cmd = ID_POPUP_PCB_MOVE_PAD_REQUEST; + break; + case PCB_MODULE_TEXT_T: + move_cmd = ID_POPUP_PCB_MOVE_TEXTMODULE_REQUEST; + break; + case PCB_MODULE_EDGE_T: + move_cmd = ID_POPUP_PCB_MOVE_EDGE; + break; + default: + break; + } + + if( move_cmd ) + { + SetMsgPanel( new_item ); + SetCurItem( new_item ); + + m_canvas->MoveCursorToCrossHair(); + + // pick up the item and start moving + PostCommandMenuEvent( move_cmd ); + } + } +} + + void FOOTPRINT_EDIT_FRAME::Transform( MODULE* module, int transform ) { switch( transform ) @@ -824,6 +918,23 @@ void FOOTPRINT_EDIT_FRAME::Transform( MODULE* module, int transform ) MirrorMarkedItems( module, wxPoint(0,0), true ); break; + case ID_MODEDIT_MODULE_MOVE_EXACT: + { + wxPoint translation; + double rotation = 0; + + DIALOG_MOVE_EXACT dialog( this, translation, rotation ); + int ret = dialog.ShowModal(); + + if( ret == DIALOG_MOVE_EXACT::MOVE_OK ) + { + MoveMarkedItemsExactly( module, wxPoint(0, 0), + translation, rotation, true ); + } + + break; + } + default: DisplayInfoMessage( this, wxT( "Not available" ) ); break; diff --git a/pcbnew/modedit_onclick.cpp b/pcbnew/modedit_onclick.cpp index edb29d005d..8c2af77fc5 100644 --- a/pcbnew/modedit_onclick.cpp +++ b/pcbnew/modedit_onclick.cpp @@ -173,7 +173,7 @@ void FOOTPRINT_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) // so deselect the active tool SetToolID( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor(), wxEmptyString ); SetCurItem( NULL ); - m_canvas->Refresh(); + m_canvas->Refresh(); } break; @@ -260,6 +260,11 @@ bool FOOTPRINT_EDIT_FRAME::OnRightClick( const wxPoint& MousePos, wxMenu* PopMen AddMenuItem( PopMenu, ID_POPUP_DELETE_BLOCK, _( "Delete Block (shift+ctrl + drag mouse)" ), KiBitmap( delete_xpm ) ); + + msg = AddHotkeyName( _("Move Block Exactly" ), + g_Module_Editor_Hokeys_Descr, HK_MOVE_ITEM_EXACT ); + AddMenuItem( PopMenu, ID_POPUP_MOVE_BLOCK_EXACT, + msg, KiBitmap( move_xpm ) ); } else { @@ -286,10 +291,14 @@ bool FOOTPRINT_EDIT_FRAME::OnRightClick( const wxPoint& MousePos, wxMenu* PopMen KiBitmap( rotate_module_ccw_xpm ) ); AddMenuItem( transform_choice, ID_MODEDIT_MODULE_MIRROR, _( "Mirror" ), KiBitmap( mirror_footprint_axisY_xpm ) ); + AddMenuItem( transform_choice, ID_MODEDIT_MODULE_MOVE_EXACT, _( "Move Exactly" ), + KiBitmap( move_module_xpm ) ); + msg = AddHotkeyName( _( "Edit Footprint" ), g_Module_Editor_Hokeys_Descr, HK_EDIT_ITEM ); AddMenuItem( PopMenu, ID_POPUP_PCB_EDIT_MODULE_PRMS, msg, KiBitmap( edit_module_xpm ) ); AddMenuItem( PopMenu, transform_choice, ID_MODEDIT_TRANSFORM_MODULE, _( "Transform Footprint" ), KiBitmap( edit_xpm ) ); + break; } @@ -309,6 +318,16 @@ bool FOOTPRINT_EDIT_FRAME::OnRightClick( const wxPoint& MousePos, wxMenu* PopMen msg = AddHotkeyName( _("Delete Pad" ), g_Module_Editor_Hokeys_Descr, HK_DELETE ); AddMenuItem( PopMenu, ID_POPUP_PCB_DELETE_PAD, msg, KiBitmap( delete_pad_xpm ) ); + msg = AddHotkeyName( _( "Duplicate Pad" ), g_Module_Editor_Hokeys_Descr, HK_DUPLICATE_ITEM ); + AddMenuItem( PopMenu, ID_POPUP_PCB_DUPLICATE_ITEM, msg, KiBitmap( duplicate_pad_xpm ) ); + + msg = AddHotkeyName( _("Move Pad Exactly" ), g_Module_Editor_Hokeys_Descr, HK_MOVE_ITEM_EXACT ); + AddMenuItem( PopMenu, ID_POPUP_PCB_MOVE_EXACT, msg, KiBitmap( move_pad_xpm ) ); + + msg = AddHotkeyName( _("Create Pad Array" ), g_Module_Editor_Hokeys_Descr, HK_CREATE_ARRAY ); + AddMenuItem( PopMenu, ID_POPUP_PCB_CREATE_ARRAY, msg, KiBitmap( array_pad_xpm ) ); + + if( !flags ) { PopMenu->AppendSeparator(); @@ -331,6 +350,30 @@ bool FOOTPRINT_EDIT_FRAME::OnRightClick( const wxPoint& MousePos, wxMenu* PopMen HK_ROTATE_ITEM ); AddMenuItem( PopMenu, ID_POPUP_PCB_ROTATE_TEXTMODULE, msg, KiBitmap( rotate_field_xpm ) ); + { + // Do not show option to replicate value or reference fields + // (there can only be one of each) + + const MODULE* module = static_cast( item->GetParent() ); + const TEXTE_MODULE* text = static_cast( item ); + + if( &module->Reference() != text && &module->Value() != text ) + { + msg = AddHotkeyName( _( "Duplicate Text" ), + g_Module_Editor_Hokeys_Descr, HK_DUPLICATE_ITEM ); + AddMenuItem( PopMenu, ID_POPUP_PCB_DUPLICATE_ITEM, + msg, KiBitmap( duplicate_text_xpm ) ); + + msg = AddHotkeyName( _("Create Text Array" ), + g_Module_Editor_Hokeys_Descr, HK_CREATE_ARRAY ); + AddMenuItem( PopMenu, ID_POPUP_PCB_CREATE_ARRAY, + msg, KiBitmap( array_text_xpm ) ); + } + } + + msg = AddHotkeyName( _("Move Text Exactly" ), g_Module_Editor_Hokeys_Descr, HK_MOVE_ITEM_EXACT ); + AddMenuItem( PopMenu, ID_POPUP_PCB_MOVE_EXACT, msg, KiBitmap( move_field_xpm ) ); + if( !flags ) { msg = AddHotkeyName( _("Edit Text" ), g_Module_Editor_Hokeys_Descr, @@ -359,6 +402,15 @@ bool FOOTPRINT_EDIT_FRAME::OnRightClick( const wxPoint& MousePos, wxMenu* PopMen AddMenuItem( PopMenu, ID_POPUP_PCB_MOVE_EDGE, msg, KiBitmap( move_line_xpm ) ); } + msg = AddHotkeyName( _( "Duplicate Edge" ), g_Module_Editor_Hokeys_Descr, HK_DUPLICATE_ITEM ); + AddMenuItem( PopMenu, ID_POPUP_PCB_DUPLICATE_ITEM, msg, KiBitmap( duplicate_line_xpm ) ); + + msg = AddHotkeyName( _("Move Edge Exactly" ), g_Module_Editor_Hokeys_Descr, HK_MOVE_ITEM_EXACT ); + AddMenuItem( PopMenu, ID_POPUP_PCB_MOVE_EXACT, msg, KiBitmap( move_line_xpm ) ); + + msg = AddHotkeyName( _("Create Edge Array" ), g_Module_Editor_Hokeys_Descr, HK_CREATE_ARRAY ); + AddMenuItem( PopMenu, ID_POPUP_PCB_CREATE_ARRAY, msg, KiBitmap( array_line_xpm ) ); + if( ( flags & (IS_NEW | IS_MOVED) ) == IS_MOVED ) AddMenuItem( PopMenu, ID_POPUP_PCB_PLACE_EDGE, _( "Place edge" ), KiBitmap( checked_ok_xpm ) ); diff --git a/pcbnew/module_editor_frame.h b/pcbnew/module_editor_frame.h index 1bd3c040d1..389a0ee803 100644 --- a/pcbnew/module_editor_frame.h +++ b/pcbnew/module_editor_frame.h @@ -33,7 +33,7 @@ #include #include - +class PCB_LAYER_WIDGET; class FP_LIB_TABLE; namespace PCB { struct IFACE; } // A KIFACE_I coded in pcbnew.c @@ -145,10 +145,14 @@ public: */ bool OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition, EDA_ITEM* aItem = NULL ); + BOARD_ITEM* PrepareItemForHotkey( bool failIfCurrentlyEdited ); + bool OnHotkeyEditItem( int aIdCommand ); bool OnHotkeyDeleteItem( int aIdCommand ); bool OnHotkeyMoveItem( int aIdCommand ); + bool OnHotkeyMoveItemExact(); bool OnHotkeyRotateItem( int aIdCommand ); + bool OnHotkeyDuplicateItem( int aIdCommand ); /** * Function Show3D_Frame @@ -530,6 +534,22 @@ protected: * @return a pointer to the new text, or NULL if aborted */ TEXTE_MODULE* CreateTextModule( MODULE* aModule, wxDC* aDC ); + +private: + + /** + * Function moveExact + * Move the selected item exactly, popping up a dialog to allow the + * user the enter the move delta + */ + void moveExact(); + + /** + * Function duplicateItems + * Duplicate the item under the cursor + * @param aIncrement increment the number of pad (if that is what is selected) + */ + void duplicateItems( bool aIncrement ); }; #endif // MODULE_EDITOR_FRAME_H_ diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index 55e18b4666..c2b3405c48 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -148,6 +148,7 @@ BEGIN_EVENT_TABLE( FOOTPRINT_EDIT_FRAME, PCB_BASE_FRAME ) // Module transformations EVT_MENU( ID_MODEDIT_MODULE_ROTATE, FOOTPRINT_EDIT_FRAME::Process_Special_Functions ) EVT_MENU( ID_MODEDIT_MODULE_MIRROR, FOOTPRINT_EDIT_FRAME::Process_Special_Functions ) + EVT_MENU( ID_MODEDIT_MODULE_MOVE_EXACT, FOOTPRINT_EDIT_FRAME::Process_Special_Functions ) EVT_MENU( ID_PCB_DRAWINGS_WIDTHS_SETUP, FOOTPRINT_EDIT_FRAME::Process_Special_Functions ) EVT_MENU( ID_PCB_PAD_SETUP, FOOTPRINT_EDIT_FRAME::Process_Special_Functions ) diff --git a/pcbnew/onrightclick.cpp b/pcbnew/onrightclick.cpp index 9de056f34f..7ef2c47d9e 100644 --- a/pcbnew/onrightclick.cpp +++ b/pcbnew/onrightclick.cpp @@ -200,8 +200,27 @@ bool PCB_EDIT_FRAME::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu ) HK_MOVE_ITEM ); AddMenuItem( aPopMenu, ID_POPUP_PCB_MOVE_DRAWING_REQUEST, msg, KiBitmap( move_xpm ) ); - AddMenuItem( aPopMenu, ID_POPUP_PCB_EDIT_DRAWING, _( "Edit Drawing" ), - KiBitmap( edit_xpm ) ); + + msg = AddHotkeyName( _( "Duplicate Drawing" ), g_Module_Editor_Hokeys_Descr, + HK_DUPLICATE_ITEM ); + AddMenuItem( aPopMenu, ID_POPUP_PCB_DUPLICATE_ITEM, + msg, KiBitmap( duplicate_line_xpm ) ); + + msg = AddHotkeyName( _("Move Drawing Exactly" ), g_Module_Editor_Hokeys_Descr, + HK_MOVE_ITEM_EXACT ); + AddMenuItem( aPopMenu, ID_POPUP_PCB_MOVE_EXACT, + msg, KiBitmap( move_line_xpm ) ); + + msg = AddHotkeyName( _("Create Drawing Array" ), g_Module_Editor_Hokeys_Descr, + HK_CREATE_ARRAY ); + AddMenuItem( aPopMenu, ID_POPUP_PCB_CREATE_ARRAY, + msg, KiBitmap( array_line_xpm ) ); + + msg = AddHotkeyName( _( "Edit Drawing" ), g_Module_Editor_Hokeys_Descr, + HK_EDIT_ITEM ); + AddMenuItem( aPopMenu, ID_POPUP_PCB_EDIT_DRAWING, + msg, KiBitmap( edit_xpm ) ); + AddMenuItem( aPopMenu, ID_POPUP_PCB_DELETE_DRAWING, _( "Delete Drawing" ), KiBitmap( delete_xpm ) ); @@ -252,12 +271,30 @@ bool PCB_EDIT_FRAME::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu ) msg = AddHotkeyName( _( "Edit Dimension" ), g_Board_Editor_Hokeys_Descr, HK_EDIT_ITEM ); AddMenuItem( aPopMenu, ID_POPUP_PCB_EDIT_DIMENSION, msg, KiBitmap( edit_xpm ) ); + msg = AddHotkeyName( _( "Move Dimension Text" ), g_Board_Editor_Hokeys_Descr, HK_MOVE_ITEM ); AddMenuItem( aPopMenu, ID_POPUP_PCB_MOVE_TEXT_DIMENSION_REQUEST, msg, KiBitmap( move_text_xpm ) ); + + msg = AddHotkeyName( _( "Duplicate Dimension" ), g_Module_Editor_Hokeys_Descr, + HK_DUPLICATE_ITEM ); + AddMenuItem( aPopMenu, ID_POPUP_PCB_DUPLICATE_ITEM, + msg, KiBitmap( duplicate_text_xpm ) ); + + msg = AddHotkeyName( _("Move Dimension Exactly" ), g_Module_Editor_Hokeys_Descr, + HK_MOVE_ITEM_EXACT ); + AddMenuItem( aPopMenu, ID_POPUP_PCB_MOVE_EXACT, + msg, KiBitmap( move_text_xpm ) ); + + msg = AddHotkeyName( _("Create Dimension Array" ), g_Module_Editor_Hokeys_Descr, + HK_CREATE_ARRAY ); + AddMenuItem( aPopMenu, ID_POPUP_PCB_CREATE_ARRAY, + msg, KiBitmap( array_text_xpm ) ); + msg = AddHotkeyName( _( "Delete Dimension" ), g_Board_Editor_Hokeys_Descr, HK_DELETE ); + AddMenuItem( aPopMenu, ID_POPUP_PCB_DELETE_DIMENSION, msg, KiBitmap( delete_xpm ) ); } @@ -268,10 +305,28 @@ bool PCB_EDIT_FRAME::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu ) { msg = AddHotkeyName( _( "Move Target" ), g_Board_Editor_Hokeys_Descr, HK_MOVE_ITEM ); - AddMenuItem( aPopMenu, ID_POPUP_PCB_MOVE_MIRE_REQUEST, msg, KiBitmap( move_xpm ) ); + AddMenuItem( aPopMenu, ID_POPUP_PCB_MOVE_MIRE_REQUEST, + msg, KiBitmap( move_target_xpm ) ); + + msg = AddHotkeyName( _("Move Target Exactly" ), g_Module_Editor_Hokeys_Descr, + HK_MOVE_ITEM_EXACT ); + AddMenuItem( aPopMenu, ID_POPUP_PCB_MOVE_EXACT, + msg, KiBitmap( move_target_xpm ) ); + + msg = AddHotkeyName( _( "Duplicate Target" ), g_Module_Editor_Hokeys_Descr, + HK_DUPLICATE_ITEM ); + AddMenuItem( aPopMenu, ID_POPUP_PCB_DUPLICATE_ITEM, + msg, KiBitmap( duplicate_target_xpm ) ); + + msg = AddHotkeyName( _("Create Target Array" ), g_Module_Editor_Hokeys_Descr, + HK_CREATE_ARRAY ); + AddMenuItem( aPopMenu, ID_POPUP_PCB_CREATE_ARRAY, + msg, KiBitmap( array_target_xpm ) ); + msg = AddHotkeyName( _( "Edit Target" ), g_Board_Editor_Hokeys_Descr, HK_EDIT_ITEM ); AddMenuItem( aPopMenu, ID_POPUP_PCB_EDIT_MIRE, msg, KiBitmap( edit_xpm ) ); + msg = AddHotkeyName( _( "Delete Target" ), g_Board_Editor_Hokeys_Descr, HK_DELETE ); AddMenuItem( aPopMenu, ID_POPUP_PCB_DELETE_MIRE, msg, KiBitmap( delete_xpm ) ); @@ -500,10 +555,27 @@ void PCB_EDIT_FRAME::createPopupMenuForTracks( TRACK* Track, wxMenu* PopMenu ) HK_DRAG_TRACK_KEEP_SLOPE ); AddMenuItem( PopMenu, ID_POPUP_PCB_DRAG_TRACK_SEGMENT_KEEP_SLOPE, msg, KiBitmap( drag_segment_withslope_xpm ) ); + msg = AddHotkeyName( _( "Drag Segment" ), g_Board_Editor_Hokeys_Descr, HK_DRAG_ITEM ); AddMenuItem( PopMenu, ID_POPUP_PCB_DRAG_TRACK_SEGMENT, msg, KiBitmap( drag_track_segment_xpm ) ); + + msg = AddHotkeyName( _( "Duplicate Track" ), g_Module_Editor_Hokeys_Descr, + HK_DUPLICATE_ITEM ); + AddMenuItem( PopMenu, ID_POPUP_PCB_DUPLICATE_ITEM, + msg, KiBitmap( duplicate_line_xpm ) ); + + msg = AddHotkeyName( _("Move Track Exactly" ), g_Module_Editor_Hokeys_Descr, + HK_MOVE_ITEM_EXACT ); + AddMenuItem( PopMenu, ID_POPUP_PCB_MOVE_EXACT, + msg, KiBitmap( move_line_xpm ) ); + + msg = AddHotkeyName( _("Create Track Array" ), g_Module_Editor_Hokeys_Descr, + HK_CREATE_ARRAY ); + AddMenuItem( PopMenu, ID_POPUP_PCB_CREATE_ARRAY, + msg, KiBitmap( array_line_xpm ) ); + AddMenuItem( PopMenu, ID_POPUP_PCB_BREAK_TRACK, _( "Break Track" ), KiBitmap( break_line_xpm ) ); } @@ -688,7 +760,17 @@ void PCB_EDIT_FRAME::createPopUpMenuForZones( ZONE_CONTAINER* edge_zone, wxMenu* _( "Add Cutout Area" ), KiBitmap( add_zone_cutout_xpm ) ); AddMenuItem( zones_menu, ID_POPUP_PCB_ZONE_DUPLICATE, - _( "Duplicate Zone" ), KiBitmap( zone_duplicate_xpm ) ); + _( "Duplicate Zone Onto Layer" ), KiBitmap( zone_duplicate_xpm ) ); + + msg = AddHotkeyName( _( "Duplicate Zone" ), g_Module_Editor_Hokeys_Descr, + HK_DUPLICATE_ITEM ); + AddMenuItem( zones_menu, ID_POPUP_PCB_DUPLICATE_ITEM, + msg, KiBitmap( zone_duplicate_xpm ) ); + + msg = AddHotkeyName( _("Create Zone Array" ), g_Module_Editor_Hokeys_Descr, + HK_CREATE_ARRAY ); + AddMenuItem( zones_menu, ID_POPUP_PCB_CREATE_ARRAY, + msg, KiBitmap( array_zone_xpm ) ); zones_menu->AppendSeparator(); @@ -705,6 +787,11 @@ void PCB_EDIT_FRAME::createPopUpMenuForZones( ZONE_CONTAINER* edge_zone, wxMenu* msg = AddHotkeyName( _( "Move Zone" ), g_Board_Editor_Hokeys_Descr, HK_MOVE_ITEM ); AddMenuItem( zones_menu, ID_POPUP_PCB_MOVE_ZONE_OUTLINES, msg, KiBitmap( move_xpm ) ); + msg = AddHotkeyName( _("Move Zone Exactly" ), g_Module_Editor_Hokeys_Descr, + HK_MOVE_ITEM_EXACT ); + AddMenuItem( zones_menu, ID_POPUP_PCB_MOVE_EXACT, + msg, KiBitmap( move_zone_xpm ) ); + msg = AddHotkeyName( _( "Edit Zone Properties" ), g_Board_Editor_Hokeys_Descr, HK_EDIT_ITEM ); AddMenuItem( zones_menu, ID_POPUP_PCB_EDIT_ZONE_PARAMS, @@ -741,6 +828,22 @@ void PCB_EDIT_FRAME::createPopUpMenuForFootprints( MODULE* aModule, wxMenu* menu msg = AddHotkeyName( _( "Move" ), g_Board_Editor_Hokeys_Descr, HK_MOVE_ITEM ); AddMenuItem( sub_menu_footprint, ID_POPUP_PCB_MOVE_MODULE_REQUEST, msg, KiBitmap( move_module_xpm ) ); + + msg = AddHotkeyName( _( "Duplicate" ), g_Module_Editor_Hokeys_Descr, + HK_DUPLICATE_ITEM ); + AddMenuItem( menu, ID_POPUP_PCB_DUPLICATE_ITEM, + msg, KiBitmap( duplicate_module_xpm ) ); + + msg = AddHotkeyName( _("Move Exactly" ), g_Module_Editor_Hokeys_Descr, + HK_MOVE_ITEM_EXACT ); + AddMenuItem( menu, ID_POPUP_PCB_MOVE_EXACT, + msg, KiBitmap( move_module_xpm ) ); + + msg = AddHotkeyName( _("Create Array" ), g_Module_Editor_Hokeys_Descr, + HK_CREATE_ARRAY ); + AddMenuItem( menu, ID_POPUP_PCB_CREATE_ARRAY, + msg, KiBitmap( array_module_xpm ) ); + msg = AddHotkeyName( _( "Drag" ), g_Board_Editor_Hokeys_Descr, HK_DRAG_ITEM ); AddMenuItem( sub_menu_footprint, ID_POPUP_PCB_DRAG_MODULE_REQUEST, msg, KiBitmap( drag_module_xpm ) ); @@ -791,6 +894,21 @@ void PCB_EDIT_FRAME::createPopUpMenuForFpTexts( TEXTE_MODULE* FpText, wxMenu* me msg = AddHotkeyName( _( "Move" ), g_Board_Editor_Hokeys_Descr, HK_MOVE_ITEM ); AddMenuItem( sub_menu_Fp_text, ID_POPUP_PCB_MOVE_TEXTMODULE_REQUEST, msg, KiBitmap( move_field_xpm ) ); + + msg = AddHotkeyName( _( "Duplicate" ), g_Module_Editor_Hokeys_Descr, + HK_DUPLICATE_ITEM ); + AddMenuItem( menu, ID_POPUP_PCB_DUPLICATE_ITEM, + msg, KiBitmap( duplicate_text_xpm ) ); + + msg = AddHotkeyName( _("Move Exactly" ), g_Module_Editor_Hokeys_Descr, + HK_MOVE_ITEM_EXACT ); + AddMenuItem( menu, ID_POPUP_PCB_MOVE_EXACT, + msg, KiBitmap( move_text_xpm ) ); + + msg = AddHotkeyName( _("Create Array" ), g_Module_Editor_Hokeys_Descr, + HK_CREATE_ARRAY ); + AddMenuItem( menu, ID_POPUP_PCB_CREATE_ARRAY, + msg, KiBitmap( array_text_xpm ) ); } msg = AddHotkeyName( _( "Rotate" ), g_Board_Editor_Hokeys_Descr, HK_ROTATE_ITEM ); diff --git a/pcbnew/pcb_base_edit_frame.cpp b/pcbnew/pcb_base_edit_frame.cpp index e4aa24108b..22a3ad4041 100644 --- a/pcbnew/pcb_base_edit_frame.cpp +++ b/pcbnew/pcb_base_edit_frame.cpp @@ -31,3 +31,18 @@ void PCB_BASE_EDIT_FRAME::SetRotationAngle( int aRotationAngle ) m_rotationAngle = aRotationAngle; } + + +bool PCB_BASE_EDIT_FRAME::PostCommandMenuEvent( int evt_type ) +{ + if( evt_type != 0 ) + { + wxCommandEvent evt( wxEVT_COMMAND_MENU_SELECTED ); + evt.SetEventObject( this ); + evt.SetId( evt_type ); + wxPostEvent( this, evt ); + return true; + } + + return false; +} diff --git a/pcbnew/pcb_base_edit_frame.h b/pcbnew/pcb_base_edit_frame.h index 3d867874d6..430fbdcab6 100644 --- a/pcbnew/pcb_base_edit_frame.h +++ b/pcbnew/pcb_base_edit_frame.h @@ -69,9 +69,19 @@ public: int GetRotationAngle() const { return m_rotationAngle; } void SetRotationAngle( int aRotationAngle ); + bool PostCommandMenuEvent( int evt_type ); + protected: /// User defined rotation angle (in tenths of a degree). int m_rotationAngle; + + /** + * Function createArray + * Create an array of the selected item (invokes the dialogue) + * This function is shared between pcbnew and modedit, as it is virtually + * the same + */ + void createArray(); }; #endif diff --git a/pcbnew/pcbnew_id.h b/pcbnew/pcbnew_id.h index 830df53a88..6740e42484 100644 --- a/pcbnew/pcbnew_id.h +++ b/pcbnew/pcbnew_id.h @@ -62,6 +62,10 @@ enum pcbnew_ids ID_POPUP_PCB_ROTATE_PAD, ID_POPUP_PCB_MOVE_PAD_REQUEST, ID_POPUP_PCB_DRAG_PAD_REQUEST, + ID_POPUP_PCB_DUPLICATE_ITEM, + ID_POPUP_PCB_DUPLICATE_ITEM_AND_INCREMENT, + ID_POPUP_PCB_MOVE_EXACT, + ID_POPUP_PCB_CREATE_ARRAY, ID_POPUP_PCB_MOVE_TEXTMODULE_REQUEST, ID_POPUP_PCB_ROTATE_TEXTMODULE, @@ -347,6 +351,7 @@ enum pcbnew_ids ID_MODEDIT_TRANSFORM_MODULE, ID_MODEDIT_MODULE_ROTATE, ID_MODEDIT_MODULE_MIRROR, + ID_MODEDIT_MODULE_MOVE_EXACT, ID_MODEDIT_IMPORT_PART, ID_MODEDIT_EXPORT_PART, ID_MODEDIT_CREATE_NEW_LIB_AND_SAVE_CURRENT_PART, diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index c35372ea27..d747e1e5ee 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -64,6 +64,22 @@ TOOL_ACTION COMMON_ACTIONS::editActivate( "pcbnew.InteractiveEdit", AS_GLOBAL, 'M', "Move", "Moves the selected item(s)", AF_ACTIVATE ); +TOOL_ACTION COMMON_ACTIONS::duplicate( "pcbnew.InteractiveEdit.duplicate", + AS_GLOBAL, MD_CTRL + int( 'D' ), + "Duplicate", "Duplicates the selected item(s)" ); + +TOOL_ACTION COMMON_ACTIONS::duplicateIncrement( "pcbnew.InteractiveEdit.duplicateIncrementPads", + AS_GLOBAL, MD_CTRL + MD_SHIFT + int( 'D' ), + "Duplicate", "Duplicates the selected item(s), incrementing pad numbers" ); + +TOOL_ACTION COMMON_ACTIONS::moveExact( "pcbnew.InteractiveEdit.moveExact", + AS_GLOBAL, MD_CTRL + int( 'M' ), + "Move Exactly...", "Moves the selected item(s) by an exact amount" ); + +TOOL_ACTION COMMON_ACTIONS::createArray( "pcbnew.InteractiveEdit.createArray", + AS_GLOBAL, MD_CTRL + int('N'), + "Create array", "Create array", AF_ACTIVATE ); + TOOL_ACTION COMMON_ACTIONS::rotate( "pcbnew.InteractiveEdit.rotate", AS_GLOBAL, 'R', "Rotate", "Rotates selected item(s)" ); diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index 73849a755e..b05e4d3c73 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -65,6 +65,15 @@ public: /// Activation of the edit tool static TOOL_ACTION properties; + /// Activation of the exact move tool + static TOOL_ACTION moveExact; + + /// Activation of the duplication tool + static TOOL_ACTION duplicate; + + /// Activation of the duplication tool with incrementing (e.g. pad number) + static TOOL_ACTION duplicateIncrement; + /// Deleting a BOARD_ITEM static TOOL_ACTION remove; @@ -204,6 +213,9 @@ public: /// Tool for quick pad enumeration static TOOL_ACTION enumeratePads; + /// Tool for creating an array of objects + static TOOL_ACTION createArray; + /// Copying module items to clipboard static TOOL_ACTION copyItems; diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 1747a8be71..740faf3a04 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -26,6 +26,8 @@ #include #include #include +#include +#include #include #include @@ -42,6 +44,9 @@ #include "selection_tool.h" #include "edit_tool.h" +#include +#include + EDIT_TOOL::EDIT_TOOL() : TOOL_INTERACTIVE( "pcbnew.InteractiveEdit" ), m_selectionTool( NULL ), m_dragging( false ), m_editModules( false ), m_updateFlag( KIGFX::VIEW_ITEM::NONE ) @@ -73,6 +78,9 @@ bool EDIT_TOOL::Init() m_selectionTool->AddMenuItem( COMMON_ACTIONS::flip, SELECTION_CONDITIONS::NotEmpty ); m_selectionTool->AddMenuItem( COMMON_ACTIONS::remove, SELECTION_CONDITIONS::NotEmpty ); m_selectionTool->AddMenuItem( COMMON_ACTIONS::properties, SELECTION_CONDITIONS::NotEmpty ); + m_selectionTool->AddMenuItem( COMMON_ACTIONS::moveExact, SELECTION_CONDITIONS::NotEmpty ); + m_selectionTool->AddMenuItem( COMMON_ACTIONS::duplicate, SELECTION_CONDITIONS::NotEmpty ); + m_selectionTool->AddMenuItem( COMMON_ACTIONS::createArray, SELECTION_CONDITIONS::NotEmpty ); m_offset.x = 0; m_offset.y = 0; @@ -112,6 +120,12 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent ) controls->SetSnapping( true ); controls->ForceCursorPosition( false ); + // cumulative translation + wxPoint totalMovement( 0, 0 ); + + // make sure nothing is inhibiting undo points + bool inhibitUndo = m_toolMgr->IsUndoInhibited(); + // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { @@ -147,9 +161,41 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent ) break; // exit the loop, as there is no further processing for removed items } + else if( evt->IsAction( &COMMON_ACTIONS::duplicate ) ) + { + // On duplicate, stop moving this item + // The duplicate tool should then select the new item and start + // a new move procedure + break; + } + else if( evt->IsAction( &COMMON_ACTIONS::moveExact ) ) + { + // Can't do this, because the selection will then contain + // stale pointers and it will all go horribly wrong... + //editFrame->RestoreCopyFromUndoList( dummy ); + // + // So, instead, reset the position manually + for( unsigned int i = 0; i < selection.items.GetCount(); ++i ) + { + BOARD_ITEM* item = selection.Item( i ); + item->SetPosition( item->GetPosition() - totalMovement ); + + // And what about flipping and rotation? + // for now, they won't be undone, but maybe that is how + // it should be, so you can flip and move exact in the + // same action? + } + + // This causes a double event, so we will get the dialogue + // correctly, somehow - why does Rotate not? + //MoveExact( aEvent ); + break; // exit the loop - we move exactly, so we have + // finished moving + } } - else if( evt->IsMotion() || evt->IsDrag( BUT_LEFT ) ) + else if( evt->IsAction( &COMMON_ACTIONS::editActivate ) + || evt->IsMotion() || evt->IsDrag( BUT_LEFT ) ) { m_cursor = controls->GetCursorPosition(); @@ -158,6 +204,8 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent ) wxPoint movement = wxPoint( m_cursor.x, m_cursor.y ) - selection.Item( 0 )->GetPosition(); + totalMovement += movement; + // Drag items to the current cursor position for( unsigned int i = 0; i < selection.items.GetCount(); ++i ) selection.Item( i )->Move( movement + m_offset ); @@ -170,8 +218,11 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent ) break; // Save items, so changes can be undone - editFrame->OnModify(); - editFrame->SaveCopyInUndoList( selection.items, UR_CHANGED ); + if( !inhibitUndo ) + { + editFrame->OnModify(); + editFrame->SaveCopyInUndoList( selection.items, UR_CHANGED ); + } if( selection.Size() == 1 ) { @@ -197,6 +248,7 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent ) controls->SetAutoPan( true ); m_dragging = true; + m_toolMgr->IncUndoInhibit(); } selection.group->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); @@ -207,6 +259,9 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent ) break; // Finish } + if( m_dragging ) + m_toolMgr->DecUndoInhibit(); + m_dragging = false; m_offset.x = 0; m_offset.y = 0; @@ -326,7 +381,8 @@ int EDIT_TOOL::Rotate( const TOOL_EVENT& aEvent ) wxPoint rotatePoint = getModificationPoint( selection ); - if( !m_dragging ) // If it is being dragged, then it is already saved with UR_CHANGED flag + // If it is being dragged, then it is already saved with UR_CHANGED flag + if( !m_toolMgr->IsUndoInhibited() ) { editFrame->OnModify(); editFrame->SaveCopyInUndoList( selection.items, UR_ROTATED, rotatePoint ); @@ -380,7 +436,7 @@ int EDIT_TOOL::Flip( const TOOL_EVENT& aEvent ) wxPoint flipPoint = getModificationPoint( selection ); - if( !m_dragging ) // If it is being dragged, then it is already saved with UR_CHANGED flag + if( !m_toolMgr->IsUndoInhibited() ) // If it is being dragged, then it is already saved with UR_CHANGED flag { editFrame->OnModify(); editFrame->SaveCopyInUndoList( selection.items, UR_FLIPPED, flipPoint ); @@ -534,6 +590,318 @@ void EDIT_TOOL::remove( BOARD_ITEM* aItem ) } +int EDIT_TOOL::MoveExact( const TOOL_EVENT& aEvent ) +{ + const SELECTION& selection = m_selectionTool->GetSelection(); + + // Shall the selection be cleared at the end? + bool unselect = selection.Empty(); + + if( !makeSelection( selection ) || m_selectionTool->CheckLock() ) + { + setTransitions(); + + return 0; + } + + wxPoint translation; + double rotation = 0; + + PCB_BASE_FRAME* editFrame = getEditFrame(); + + DIALOG_MOVE_EXACT dialog( editFrame, translation, rotation ); + int ret = dialog.ShowModal(); + + if( ret == DIALOG_MOVE_EXACT::MOVE_OK ) + { + if( !m_toolMgr->IsUndoInhibited() ) + { + editFrame->OnModify(); + // Record an action of move and rotate + editFrame->SaveCopyInUndoList( selection.items, UR_CHANGED ); + } + + wxPoint rotPoint = selection.GetCenter(); + + for( unsigned int i = 0; i < selection.items.GetCount(); ++i ) + { + BOARD_ITEM* item = selection.Item( i ); + + item->Move( translation ); + item->Rotate( rotPoint, rotation ); + + if( !m_dragging ) + item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + + updateRatsnest( m_dragging ); + + if( m_dragging ) + selection.group->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + else + getModel()->GetRatsnest()->Recalculate(); + + if( unselect ) + m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true ); + + m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate, true ); + } + + setTransitions(); + + return 0; +} + + +int EDIT_TOOL::Duplicate( const TOOL_EVENT& aEvent ) +{ + bool increment = aEvent.IsAction( &COMMON_ACTIONS::duplicateIncrement ); + + // first, check if we have a selection, or try to get one + SELECTION_TOOL* selTool = m_toolMgr->GetTool(); + const SELECTION& selection = selTool->GetSelection(); + + // Be sure that there is at least one item that we can modify + if( !makeSelection( selection ) || selTool->CheckLock() ) + { + setTransitions(); + return 0; + } + + // we have a selection to work on now, so start the tool process + + PCB_BASE_FRAME* editFrame = getEditFrame(); + editFrame->OnModify(); + + // prevent other tools making undo points while the duplicate is going on + // so that if you cancel, you don't get a duplicate object hiding over + // the original + m_toolMgr->IncUndoInhibit(); + + std::vector old_items; + + for( int i = 0; i < selection.Size(); ++i ) + { + BOARD_ITEM* item = selection.Item( i ); + + if( item ) + old_items.push_back( item ); + } + + for( unsigned i = 0; i < old_items.size(); ++i ) + { + BOARD_ITEM* item = old_items[i]; + + // Unselect the item, so we won't pick it up again + // Do this first, so a single-item duplicate will correctly call + // SetCurItem and show the item properties + m_toolMgr->RunAction( COMMON_ACTIONS::unselectItem, true, item ); + + BOARD_ITEM* new_item = NULL; + + if ( PCB_EDIT_FRAME* frame = dynamic_cast( editFrame ) ) + new_item = frame->GetBoard()->DuplicateAndAddItem( item, increment ); + else if ( FOOTPRINT_EDIT_FRAME* frame = dynamic_cast( editFrame ) ) + new_item = frame->GetBoard()->m_Modules->DuplicateAndAddItem( item, increment ); + + if( new_item ) + { + if( new_item->Type() == PCB_MODULE_T ) + { + static_cast( new_item )->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, + getView(), _1 ) ); + } + + editFrame->GetGalCanvas()->GetView()->Add( new_item ); + + // Select the new item, so we can pick it up + m_toolMgr->RunAction( COMMON_ACTIONS::selectItem, true, new_item ); + } + } + + // record the new items as added + editFrame->SaveCopyInUndoList( selection.items, UR_NEW ); + + editFrame->DisplayToolMsg( wxString::Format( _( "Duplicated %d item(s)" ), + (int) old_items.size() ) ); + + // pick up the selected item(s) and start moving + // this works well for "dropping" copies around + TOOL_EVENT evt = COMMON_ACTIONS::editActivate.MakeEvent(); + Main( evt ); + + // and re-enable undos + m_toolMgr->DecUndoInhibit(); + + setTransitions(); + + return 0; +} + + +int EDIT_TOOL::CreateArray( const TOOL_EVENT& aEvent ) +{ + // first, check if we have a selection, or try to get one + SELECTION_TOOL* selTool = m_toolMgr->GetTool(); + const SELECTION& selection = selTool->GetSelection(); + + // Be sure that there is at least one item that we can modify + if( !makeSelection( selection ) || selTool->CheckLock() ) + { + setTransitions(); + return 0; + } + + bool originalItemsModified = false; + + // we have a selection to work on now, so start the tool process + + PCB_BASE_FRAME* editFrame = getEditFrame(); + editFrame->OnModify(); + + const bool editingModule = NULL != dynamic_cast( editFrame ); + + if( editingModule ) + { + // Module editors do their undo point upfront for the whole module + editFrame->SaveCopyInUndoList( editFrame->GetBoard()->m_Modules, UR_MODEDIT ); + } + else + { + // We may also change the original item + editFrame->SaveCopyInUndoList( selection.items, UR_CHANGED ); + } + + DIALOG_CREATE_ARRAY::ARRAY_OPTIONS* array_opts = NULL; + + const wxPoint rotPoint = selection.GetCenter(); + + DIALOG_CREATE_ARRAY dialog( editFrame, rotPoint, &array_opts ); + int ret = dialog.ShowModal(); + + if( ret == DIALOG_CREATE_ARRAY::CREATE_ARRAY_OK && array_opts != NULL ) + { + PICKED_ITEMS_LIST newItemList; + + for( int i = 0; i < selection.Size(); ++i ) + { + BOARD_ITEM* item = selection.Item( i ); + + if( !item ) + continue; + + wxString cachedString; + + if( item->Type() == PCB_MODULE_T ) + { + cachedString = static_cast( item )->GetReferencePrefix(); + } + else if( EDA_TEXT* text = dynamic_cast( item ) ) + { + // Copy the text (not just take a reference + cachedString = text->GetText(); + } + + // iterate across the array, laying out the item at the + // correct position + const unsigned nPoints = array_opts->GetArraySize(); + + for( unsigned ptN = 0; ptN < nPoints; ++ptN ) + { + BOARD_ITEM* newItem = NULL; + + if( ptN == 0 ) + { + newItem = item; + } + else + { + // if renumbering, no need to increment + const bool increment = !array_opts->ShouldRenumberItems(); + + if ( PCB_EDIT_FRAME* frame = dynamic_cast( editFrame ) ) + newItem = frame->GetBoard()->DuplicateAndAddItem( item, increment ); + else if ( FOOTPRINT_EDIT_FRAME* frame = dynamic_cast( editFrame ) ) + newItem = frame->GetBoard()->m_Modules->DuplicateAndAddItem( item, increment ); + + if( newItem ) + { + array_opts->TransformItem( ptN, newItem, rotPoint ); + + m_toolMgr->RunAction( COMMON_ACTIONS::unselectItem, true, newItem ); + + newItemList.PushItem( newItem ); + + if( newItem->Type() == PCB_MODULE_T) + { + static_cast( newItem )->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, + getView(), _1 ) ); + } + + editFrame->GetGalCanvas()->GetView()->Add( newItem ); + } + } + + // set the number if needed: + if( array_opts->ShouldRenumberItems() ) + { + switch( newItem->Type() ) + { + case PCB_PAD_T: + { + const wxString padName = array_opts->GetItemNumber( ptN ); + static_cast( newItem )->SetPadName( padName ); + + originalItemsModified = true; + break; + } + case PCB_MODULE_T: + { + const wxString moduleName = array_opts->GetItemNumber( ptN ); + MODULE* module = static_cast( newItem ); + module->SetReference( cachedString + moduleName ); + + originalItemsModified = true; + break; + } + case PCB_MODULE_TEXT_T: + case PCB_TEXT_T: + { + EDA_TEXT* text = dynamic_cast( newItem ); + text->SetText( array_opts->InterpolateNumberIntoString( ptN, cachedString ) ); + + originalItemsModified = true; + break; + } + default: + // no renumbering of other items + break; + } + } + } + } + + if( !editingModule ) + { + if( originalItemsModified ) + { + // Update the appearance of the original items + selection.group->ItemsViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); + } + + // Add all items as a single undo point for PCB editors + // TODO: Can this be merged into the previous undo point (where + // we saved the original items) + editFrame->SaveCopyInUndoList( newItemList, UR_NEW ); + } + } + + setTransitions(); + + return 0; +} + + void EDIT_TOOL::setTransitions() { Go( &EDIT_TOOL::Main, COMMON_ACTIONS::editActivate.MakeEvent() ); @@ -541,6 +909,10 @@ void EDIT_TOOL::setTransitions() Go( &EDIT_TOOL::Flip, COMMON_ACTIONS::flip.MakeEvent() ); Go( &EDIT_TOOL::Remove, COMMON_ACTIONS::remove.MakeEvent() ); Go( &EDIT_TOOL::Properties, COMMON_ACTIONS::properties.MakeEvent() ); + Go( &EDIT_TOOL::MoveExact, COMMON_ACTIONS::moveExact.MakeEvent() ); + Go( &EDIT_TOOL::Duplicate, COMMON_ACTIONS::duplicate.MakeEvent() ); + Go( &EDIT_TOOL::Duplicate, COMMON_ACTIONS::duplicateIncrement.MakeEvent() ); + Go( &EDIT_TOOL::CreateArray,COMMON_ACTIONS::createArray.MakeEvent() ); } diff --git a/pcbnew/tools/edit_tool.h b/pcbnew/tools/edit_tool.h index ca50fc01ec..5079012434 100644 --- a/pcbnew/tools/edit_tool.h +++ b/pcbnew/tools/edit_tool.h @@ -91,6 +91,28 @@ public: */ int Remove( const TOOL_EVENT& aEvent ); + /** + * Function Duplicate() + * + * Duplicates a selection and starts a move action + */ + int Duplicate( const TOOL_EVENT& aEvent ); + + /** + * Function MoveExact() + * + * Invokes a dialog box to allow moving of the item by an exact amount. + */ + int MoveExact( const TOOL_EVENT& aEvent ); + + /** + * Function CreateArray() + * + * Creates an array of the selected items, invoking the array editor dialog + * to set the array options + */ + int CreateArray( const TOOL_EVENT& aEvent ); + /** * Function EditModules() * diff --git a/pcbnew/tools/module_tools.cpp b/pcbnew/tools/module_tools.cpp index fb05448385..4e91d24234 100644 --- a/pcbnew/tools/module_tools.cpp +++ b/pcbnew/tools/module_tools.cpp @@ -82,44 +82,6 @@ bool MODULE_TOOLS::Init() } -static wxString getNextPadName( MODULE* aModule ) -{ - std::set usedNumbers; - - // Create a set of used pad numbers - for( D_PAD* pad = aModule->Pads(); pad; pad = pad->Next() ) - { - wxString padName = pad->GetPadName(); - int padNumber = 0; - int base = 1; - - // Trim and extract the trailing numeric part - while( padName.Len() && padName.Last() >= '0' && padName.Last() <= '9' ) - { - padNumber += ( padName.Last() - '0' ) * base; - padName.RemoveLast(); - base *= 10; - } - - usedNumbers.insert( padNumber ); - } - - int candidate = *usedNumbers.begin(); - - // Look for a gap in pad numbering - for( std::set::iterator it = usedNumbers.begin(), - itEnd = usedNumbers.end(); it != itEnd; ++it ) - { - if( *it - candidate > 1 ) - break; - - candidate = *it; - } - - return wxString::Format( wxT( "%i" ), ++candidate ); -} - - int MODULE_TOOLS::PlacePad( const TOOL_EVENT& aEvent ) { m_frame->SetToolID( ID_MODEDIT_PAD_TOOL, wxCURSOR_PENCIL, _( "Add pads" ) ); @@ -190,14 +152,8 @@ int MODULE_TOOLS::PlacePad( const TOOL_EVENT& aEvent ) // ( pad position for module orient, 0, and relative to the module position) pad->SetLocalCoord(); - /* NPTH pads take empty pad number (since they can't be connected), - * other pads get incremented from the last one edited */ - wxString padName; - - if( pad->GetAttribute() != PAD_HOLE_NOT_PLATED ) - padName = getNextPadName( module ); - - pad->SetPadName( padName ); + // Take the next available pad number + pad->IncrementPadName( true, true ); // Handle the view aspect preview.Remove( pad ); diff --git a/pcbnew/tools/module_tools.h b/pcbnew/tools/module_tools.h index e969126625..8b001d7518 100644 --- a/pcbnew/tools/module_tools.h +++ b/pcbnew/tools/module_tools.h @@ -77,6 +77,13 @@ public: */ int PasteItems( const TOOL_EVENT& aEvent ); + /** + * Function CreateArray + * + * Creates an array of objects using settings from a dialog + */ + int CreateArray( TOOL_EVENT& aEvent ); + /** * Function ModuleTextOutlines() * diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index fbbec3e43f..d715022136 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -931,6 +931,30 @@ void SELECTION::clear() } +wxPoint SELECTION::GetCenter() const +{ + wxPoint centre; + + if( Size() == 1 ) + { + centre = Item( 0 )->GetCenter(); + } + else + { + EDA_RECT bbox = Item( 0 )->GetBoundingBox(); + for( unsigned int i = 1; i < items.GetCount(); ++i ) + { + BOARD_ITEM* item = Item( i ); + bbox.Merge( item->GetBoundingBox() ); + } + + centre = bbox.Centre(); + } + + return centre; +} + + const TOOL_EVENT SELECTION_TOOL::SelectedEvent( TC_MESSAGE, TA_ACTION, "pcbnew.InteractiveSelection.selected" ); const TOOL_EVENT SELECTION_TOOL::UnselectedEvent( TC_MESSAGE, TA_ACTION, "pcbnew.InteractiveSelection.unselected" ); const TOOL_EVENT SELECTION_TOOL::ClearedEvent( TC_MESSAGE, TA_ACTION, "pcbnew.InteractiveSelection.cleared" ); diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index b90ff268e9..63c7128c7d 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -70,6 +70,8 @@ struct SELECTION return static_cast( items.GetPickedItem( aIndex ) ); } + wxPoint GetCenter() const; + private: /// Clears both the VIEW_GROUP and set of selected items. Please note that it does not /// change properties of selected items (e.g. selection flag).