diff --git a/bitmaps_png/CMakeLists.txt b/bitmaps_png/CMakeLists.txt index 4673c1dc11..d596603f03 100644 --- a/bitmaps_png/CMakeLists.txt +++ b/bitmaps_png/CMakeLists.txt @@ -379,6 +379,7 @@ set( BMAPS_MID pad_sketch pad pad_enumerate + pad_number pads_mask_layers path pagelayout_load @@ -517,6 +518,7 @@ set( BMAPS_MID zone_unfill zoom zoom_area + zoom_auto_fit_in_page zoom_fit_in_page zoom_center_on_screen zoom_in diff --git a/bitmaps_png/cpp_26/pad_number.cpp b/bitmaps_png/cpp_26/pad_number.cpp new file mode 100644 index 0000000000..ac570d9cb9 --- /dev/null +++ b/bitmaps_png/cpp_26/pad_number.cpp @@ -0,0 +1,53 @@ + +/* Do not modify this file, it was automatically generated by the + * PNG2cpp CMake script, using a *.png file as input. + */ + +#include <bitmaps_png/bitmaps_list.h> + +static const unsigned char png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, + 0xce, 0x00, 0x00, 0x02, 0x38, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xed, 0x95, 0xbf, 0x4f, 0xdb, + 0x50, 0x10, 0xc7, 0xdf, 0x88, 0x94, 0x99, 0x9f, 0x5b, 0x16, 0xfe, 0x00, 0x60, 0x25, 0x52, 0xc4, + 0x14, 0xe5, 0x2f, 0x68, 0xbb, 0x44, 0x85, 0x88, 0xc1, 0xff, 0x42, 0xa5, 0x60, 0x44, 0x80, 0x74, + 0xa9, 0xd4, 0x39, 0x52, 0xa7, 0x6c, 0x4c, 0xb8, 0x64, 0x28, 0x0a, 0xc5, 0x84, 0xc5, 0x55, 0x33, + 0x90, 0x08, 0x04, 0xb1, 0x20, 0x94, 0x0c, 0x49, 0xab, 0x4a, 0xad, 0xd2, 0xa6, 0xad, 0x44, 0x52, + 0xf7, 0xee, 0x7c, 0x2f, 0xb5, 0x8d, 0x0b, 0xc6, 0xa0, 0x4e, 0x3c, 0xe9, 0x2b, 0x3f, 0xd9, 0x7e, + 0xf7, 0xf1, 0xfb, 0xde, 0xbd, 0xb3, 0x10, 0x0f, 0xe3, 0xbf, 0x8c, 0x25, 0x31, 0x21, 0x96, 0xc5, + 0x34, 0x29, 0x2b, 0xc6, 0xef, 0x37, 0x78, 0x56, 0x8c, 0x02, 0xe0, 0x39, 0xe8, 0x1c, 0x64, 0x79, + 0xd4, 0x00, 0xe5, 0x40, 0x23, 0x77, 0x83, 0xa8, 0x62, 0x11, 0x82, 0x74, 0xe1, 0xda, 0x83, 0x6b, + 0x0b, 0x54, 0x15, 0x19, 0x61, 0x90, 0x54, 0x98, 0xe3, 0xbd, 0x8c, 0xe8, 0xf3, 0x3b, 0xe9, 0xb0, + 0x36, 0xe5, 0xe8, 0xab, 0x55, 0xd1, 0x86, 0x6b, 0x09, 0xb4, 0x19, 0xcb, 0xc7, 0xf4, 0x7a, 0xab, + 0xde, 0x45, 0xcd, 0xe6, 0x67, 0x75, 0xbc, 0x07, 0x20, 0x7c, 0xf6, 0x91, 0x77, 0xb8, 0x1e, 0x66, + 0x27, 0xb8, 0xf0, 0x0c, 0x02, 0x69, 0x18, 0x70, 0xf2, 0xe5, 0xe4, 0xb6, 0xf9, 0xc1, 0xbc, 0x4c, + 0x24, 0x12, 0x56, 0x32, 0x99, 0xb4, 0x10, 0x46, 0x20, 0x1b, 0xa6, 0x81, 0x1a, 0xfc, 0x61, 0xe9, + 0xdb, 0xe4, 0xa4, 0x4b, 0x3b, 0x71, 0x40, 0x2a, 0xc7, 0x95, 0x6e, 0x2a, 0x95, 0xb2, 0xe2, 0xf1, + 0x38, 0xe9, 0xe2, 0xd3, 0xc5, 0xaf, 0x01, 0xe8, 0x2f, 0x0c, 0x77, 0xf6, 0x3d, 0x58, 0xce, 0x30, + 0xf1, 0x76, 0x4e, 0xc8, 0xae, 0x48, 0x36, 0xf2, 0xba, 0x52, 0x77, 0x43, 0x50, 0xa5, 0x93, 0x52, + 0x1f, 0x02, 0x57, 0x5c, 0x30, 0x7b, 0x4d, 0x2f, 0x98, 0x85, 0x76, 0x25, 0xb5, 0xe4, 0xe2, 0xb9, + 0x57, 0x73, 0x7b, 0x85, 0x42, 0x81, 0x82, 0x3b, 0x61, 0xba, 0xa9, 0x7f, 0x21, 0xab, 0xae, 0xc2, + 0xda, 0x64, 0xf9, 0x8d, 0xe7, 0xc4, 0xce, 0x4d, 0x55, 0x2e, 0x8c, 0xac, 0x44, 0xb6, 0xca, 0x87, + 0xe5, 0xdf, 0x08, 0x6b, 0x36, 0x9b, 0x3f, 0x25, 0xa8, 0xd3, 0xe9, 0xbc, 0x85, 0xe7, 0x58, 0x10, + 0x3f, 0x3c, 0x16, 0xd6, 0x38, 0xc6, 0xd8, 0x75, 0xa0, 0x19, 0x7e, 0xc9, 0x70, 0x2c, 0xde, 0x19, + 0x5a, 0x19, 0xb2, 0x14, 0x4d, 0x79, 0x06, 0xc1, 0x75, 0x0f, 0xe8, 0x31, 0xbf, 0x5f, 0x72, 0xbc, + 0x6f, 0xd0, 0x3d, 0x3c, 0xd4, 0xff, 0x1c, 0xf8, 0xd0, 0xb6, 0xc3, 0xf0, 0xf8, 0x8e, 0xd5, 0xf4, + 0x08, 0x83, 0xbb, 0x40, 0xaa, 0x78, 0xc2, 0xef, 0x3b, 0x41, 0xef, 0x18, 0x3e, 0x75, 0x5d, 0xc5, + 0x8d, 0x73, 0xd0, 0xaa, 0xcb, 0x0e, 0x95, 0xec, 0xd1, 0x7d, 0x40, 0x7b, 0xe1, 0xac, 0xf3, 0x29, + 0x06, 0x5e, 0x8c, 0x09, 0xa7, 0x02, 0x90, 0xa0, 0x5d, 0x73, 0xf7, 0x2b, 0x7f, 0xd4, 0x7b, 0x9f, + 0x62, 0x38, 0x0d, 0xd6, 0x11, 0xb0, 0xad, 0xb8, 0xed, 0x20, 0x58, 0xf1, 0xa8, 0xd8, 0x97, 0x20, + 0x9c, 0xfb, 0x40, 0x64, 0x79, 0xaf, 0x05, 0x01, 0x8d, 0xd0, 0xa1, 0x73, 0x1c, 0x58, 0xa9, 0x7d, + 0x73, 0xff, 0xb3, 0x04, 0xe1, 0xdc, 0x03, 0xd1, 0xb8, 0x15, 0x7d, 0x13, 0xab, 0x62, 0x38, 0x68, + 0x0b, 0x4a, 0x73, 0x92, 0x1b, 0x4e, 0xd8, 0xc6, 0xc1, 0x46, 0x53, 0x51, 0x14, 0x0b, 0x85, 0x73, + 0x0f, 0x44, 0xb6, 0xa0, 0xf9, 0xdb, 0x36, 0xd5, 0x75, 0x6f, 0x53, 0x8d, 0xbe, 0x88, 0xbe, 0x41, + 0x00, 0x0a, 0xe7, 0x03, 0xbb, 0x32, 0x83, 0xa6, 0xba, 0x1a, 0xb6, 0x83, 0x2f, 0x70, 0xef, 0xea, + 0x51, 0x92, 0xed, 0x8a, 0x32, 0x58, 0x35, 0x4e, 0x7c, 0x8f, 0xec, 0x5a, 0x12, 0x4f, 0xef, 0xf6, + 0x4f, 0x42, 0xbf, 0xed, 0xdd, 0x9d, 0xf9, 0xfc, 0xf8, 0x4e, 0x29, 0xf1, 0x81, 0x73, 0x12, 0x7c, + 0x87, 0x63, 0x7c, 0xa8, 0xa7, 0x6e, 0x3e, 0x27, 0x0f, 0xe3, 0x9e, 0xc6, 0x1f, 0x80, 0xd2, 0xc3, + 0x58, 0x34, 0x45, 0x77, 0xa6, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, + 0x82, +}; + +const BITMAP_OPAQUE pad_number_xpm[1] = {{ png, sizeof( png ), "pad_number_xpm" }}; + +//EOF diff --git a/bitmaps_png/cpp_26/zoom_auto_fit_in_page.cpp b/bitmaps_png/cpp_26/zoom_auto_fit_in_page.cpp new file mode 100644 index 0000000000..1ac89355d8 --- /dev/null +++ b/bitmaps_png/cpp_26/zoom_auto_fit_in_page.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 <bitmaps_png/bitmaps_list.h> + +static const unsigned char png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x04, 0x00, 0x00, 0x00, 0x03, 0x43, 0x84, + 0x45, 0x00, 0x00, 0x02, 0xe2, 0x49, 0x44, 0x41, 0x54, 0x38, 0xcb, 0xb5, 0x94, 0x7b, 0x48, 0x53, + 0x71, 0x14, 0xc7, 0xcf, 0xdd, 0xbd, 0x7b, 0xf8, 0x58, 0x9a, 0x62, 0x3e, 0x33, 0x65, 0xe9, 0x7c, + 0x64, 0xfa, 0x47, 0x81, 0x39, 0xaa, 0xa5, 0x21, 0x51, 0x94, 0x28, 0x15, 0x14, 0x98, 0x14, 0xce, + 0x4d, 0xc3, 0x0a, 0x94, 0xec, 0x61, 0x91, 0x29, 0xb2, 0x72, 0x86, 0x94, 0x96, 0x6d, 0x4d, 0xac, + 0x20, 0x14, 0x6b, 0xa8, 0xcb, 0x99, 0x58, 0x9a, 0x69, 0x12, 0x81, 0x86, 0x0f, 0x6a, 0x19, 0xcb, + 0x9c, 0x0f, 0x9a, 0x19, 0xa6, 0x29, 0x98, 0x61, 0xa7, 0xcb, 0x2d, 0x9b, 0xd3, 0xdb, 0xe3, 0x9f, + 0xce, 0xf7, 0x9f, 0xfb, 0xfb, 0x71, 0x3e, 0xf7, 0xfc, 0xce, 0xe3, 0xf7, 0x03, 0x58, 0x62, 0x48, + 0x20, 0x0f, 0x05, 0xc8, 0x45, 0x02, 0xfe, 0xcd, 0xd0, 0x01, 0xbd, 0x31, 0x00, 0x03, 0x19, 0xad, + 0x46, 0x4f, 0x14, 0xfc, 0x0d, 0x20, 0xd1, 0x67, 0x32, 0x48, 0x94, 0xc9, 0x6b, 0x20, 0x5e, 0x13, + 0x83, 0xc4, 0x4b, 0x7e, 0x75, 0x84, 0x8c, 0x46, 0x3d, 0xfe, 0x10, 0x11, 0x29, 0xf4, 0x3f, 0x14, + 0xcb, 0xe9, 0x84, 0xf7, 0x30, 0x00, 0x26, 0xc2, 0x08, 0x26, 0x30, 0x83, 0x85, 0x6a, 0x2e, 0x8c, + 0x42, 0x5f, 0xe4, 0xb0, 0x23, 0x04, 0xfa, 0x26, 0xee, 0x24, 0x4c, 0xd0, 0xe7, 0x7b, 0xb7, 0x28, + 0xeb, 0x83, 0x02, 0xe5, 0xe6, 0xb4, 0x73, 0xd9, 0xae, 0x0f, 0x68, 0xbc, 0x37, 0x5f, 0x82, 0x9e, + 0xec, 0x90, 0x53, 0x7b, 0x18, 0xe7, 0x05, 0x74, 0xed, 0xb8, 0x34, 0x78, 0x64, 0x60, 0xef, 0x2b, + 0x69, 0x4f, 0x94, 0x31, 0xda, 0xbc, 0xcf, 0x74, 0x2c, 0x42, 0x0d, 0x3d, 0x54, 0xd3, 0x8c, 0x18, + 0xed, 0xd9, 0x20, 0x3f, 0xf7, 0x3c, 0xe8, 0x5c, 0xa3, 0xa9, 0x54, 0x9d, 0x9a, 0x50, 0x59, 0x0a, + 0x46, 0x2e, 0x0e, 0x17, 0x8c, 0xa8, 0x2c, 0x19, 0x13, 0x4f, 0xb3, 0x56, 0x54, 0x41, 0x77, 0x58, + 0x0a, 0x7a, 0x2f, 0x45, 0x78, 0x18, 0x48, 0xea, 0xa1, 0xe5, 0x7e, 0x8a, 0xea, 0xa8, 0x61, 0x76, + 0x12, 0xe7, 0xa5, 0x19, 0xd3, 0x25, 0x28, 0x33, 0xa1, 0x45, 0x70, 0x93, 0xae, 0xe8, 0xe2, 0x72, + 0xa0, 0xe3, 0x9b, 0x10, 0x68, 0x73, 0xbc, 0x87, 0x92, 0x3c, 0x45, 0xdd, 0x17, 0x2b, 0xa4, 0x1e, + 0x2d, 0x8f, 0xed, 0xdf, 0x06, 0x0f, 0xc9, 0x5a, 0xba, 0x8a, 0xfc, 0x25, 0x19, 0xa9, 0xd7, 0x43, + 0x83, 0x87, 0x16, 0x83, 0x72, 0x64, 0x0b, 0xa1, 0xeb, 0x16, 0x4d, 0x34, 0x86, 0xf3, 0xab, 0x89, + 0x1a, 0x1a, 0xb2, 0x5b, 0x0c, 0x09, 0x3f, 0x86, 0x12, 0x35, 0xe4, 0x9d, 0x19, 0x71, 0xae, 0xdc, + 0x36, 0xd2, 0x8d, 0x98, 0x5b, 0xeb, 0x40, 0xef, 0x50, 0xce, 0x16, 0x89, 0x87, 0xe2, 0x95, 0xc5, + 0xa0, 0x4f, 0xd8, 0x55, 0x9a, 0x6d, 0xf8, 0x6a, 0x85, 0xb4, 0x93, 0x75, 0xfb, 0x83, 0xd3, 0x40, + 0x17, 0x92, 0xc3, 0x92, 0x13, 0x8d, 0xf9, 0x27, 0x1d, 0x86, 0x0a, 0x9e, 0xc1, 0x71, 0xd8, 0xe7, + 0x9b, 0x08, 0x4b, 0xb0, 0x95, 0x91, 0xf2, 0xb3, 0x3a, 0x9e, 0xd4, 0x41, 0x45, 0x5e, 0x12, 0x7a, + 0xb1, 0x95, 0xdc, 0xf9, 0x53, 0xac, 0xdb, 0x15, 0xe8, 0x23, 0xc7, 0x84, 0x96, 0x65, 0x96, 0x0d, + 0x1d, 0x9a, 0xb2, 0x6b, 0x25, 0xca, 0xdc, 0x9c, 0xbc, 0x65, 0xb7, 0xa1, 0x96, 0x5b, 0x36, 0x2e, + 0x45, 0x21, 0xfb, 0x44, 0x88, 0xda, 0x53, 0x88, 0x21, 0x98, 0x22, 0xc6, 0xb9, 0x03, 0xae, 0xdd, + 0x53, 0xb1, 0xef, 0xb6, 0x84, 0x1f, 0x24, 0x0d, 0xd0, 0x08, 0x65, 0x82, 0xd2, 0xb7, 0x6b, 0xd1, + 0x0b, 0x79, 0xac, 0xb3, 0x77, 0x3a, 0x71, 0xf9, 0x10, 0x39, 0x0a, 0x46, 0x98, 0x86, 0x69, 0xa2, + 0x03, 0x9e, 0xc3, 0x33, 0xd0, 0xd9, 0x5f, 0x76, 0x2e, 0x02, 0x2d, 0xaf, 0x72, 0x7b, 0x1c, 0x3d, + 0xf3, 0x76, 0x2c, 0x18, 0x75, 0xdc, 0xa1, 0xcf, 0xbd, 0xff, 0x42, 0x86, 0xc0, 0xcc, 0x19, 0xe3, + 0x76, 0xf8, 0x14, 0xc7, 0x65, 0x19, 0x52, 0xe7, 0xe4, 0x73, 0xf2, 0xc8, 0x6c, 0xd0, 0x41, 0x5b, + 0x68, 0x32, 0x3b, 0x66, 0x80, 0x2e, 0x27, 0x2d, 0xc6, 0x48, 0x1a, 0xdc, 0x86, 0xfc, 0x8c, 0xb3, + 0x0a, 0x4c, 0x44, 0x09, 0x7d, 0x31, 0x44, 0xad, 0x07, 0xa8, 0x42, 0xb8, 0x0a, 0x8f, 0x42, 0x65, + 0x34, 0xb6, 0x68, 0x06, 0x43, 0xa0, 0x8b, 0xd6, 0x1e, 0x00, 0x32, 0x9e, 0xea, 0xa5, 0x7a, 0x23, + 0x24, 0x3f, 0x8f, 0xcd, 0xc5, 0xc8, 0x5a, 0x39, 0xa5, 0x84, 0x22, 0x68, 0x10, 0xa7, 0xd2, 0xa5, + 0xb7, 0xc1, 0xd2, 0x19, 0x28, 0x15, 0x76, 0x83, 0x8c, 0xf9, 0xca, 0xf8, 0x95, 0x2d, 0x1f, 0xb7, + 0xd6, 0xa7, 0xf0, 0xce, 0x43, 0x01, 0x18, 0x02, 0x14, 0x74, 0x34, 0xae, 0x15, 0xaa, 0x66, 0x5c, + 0xad, 0xaa, 0x07, 0x62, 0x41, 0xf3, 0xa5, 0xcd, 0x72, 0xfb, 0xb3, 0x90, 0x4f, 0xe8, 0x4f, 0x6e, + 0x44, 0x97, 0xf9, 0x7d, 0x11, 0xe3, 0xf8, 0x18, 0xea, 0x18, 0x35, 0x31, 0xab, 0x60, 0x9b, 0x99, + 0x91, 0x3e, 0x49, 0x16, 0x9e, 0x70, 0x39, 0x53, 0xb3, 0x09, 0x9d, 0xe7, 0x77, 0x15, 0x36, 0x6e, + 0x3f, 0x7e, 0x91, 0x6e, 0xd3, 0x12, 0x2e, 0x6e, 0x9e, 0x94, 0x4d, 0xcb, 0x30, 0xd8, 0x7a, 0xf9, + 0xab, 0x68, 0xa7, 0x46, 0xeb, 0x81, 0x40, 0x4f, 0xaf, 0x6b, 0x17, 0x75, 0x92, 0x83, 0xab, 0xd0, + 0xe7, 0x37, 0xef, 0xc5, 0x7f, 0xb2, 0xef, 0x59, 0xf3, 0x82, 0x79, 0x52, 0x11, 0xe0, 0xf4, 0x00, + 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, +}; + +const BITMAP_OPAQUE zoom_auto_fit_in_page_xpm[1] = {{ png, sizeof( png ), "zoom_auto_fit_in_page_xpm" }}; + +//EOF diff --git a/bitmaps_png/include/bitmaps_png/bitmaps_list.h b/bitmaps_png/include/bitmaps_png/bitmaps_list.h index 9d233f2488..449b3de8fe 100644 --- a/bitmaps_png/include/bitmaps_png/bitmaps_list.h +++ b/bitmaps_png/include/bitmaps_png/bitmaps_list.h @@ -319,6 +319,7 @@ EXTERN_BITMAP( opt_show_polygon_xpm ) EXTERN_BITMAP( pad_sketch_xpm ) EXTERN_BITMAP( pad_xpm ) EXTERN_BITMAP( pad_enumerate_xpm ) +EXTERN_BITMAP( pad_number_xpm ) EXTERN_BITMAP( pads_mask_layers_xpm ) EXTERN_BITMAP( pagelayout_load_xpm ) EXTERN_BITMAP( pagelayout_normal_view_mode_xpm ) @@ -492,6 +493,7 @@ EXTERN_BITMAP( zip_xpm ) EXTERN_BITMAP( zone_duplicate_xpm ) EXTERN_BITMAP( zone_unfill_xpm ) EXTERN_BITMAP( zoom_area_xpm ) +EXTERN_BITMAP( zoom_auto_fit_in_page_xpm ) EXTERN_BITMAP( zoom_center_on_screen_xpm ) EXTERN_BITMAP( zoom_redraw_xpm ) EXTERN_BITMAP( zoom_fit_in_page_xpm ) diff --git a/bitmaps_png/sources/pad_number.svg b/bitmaps_png/sources/pad_number.svg new file mode 100644 index 0000000000..0c65e0936d --- /dev/null +++ b/bitmaps_png/sources/pad_number.svg @@ -0,0 +1,106 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + sodipodi:docname="pad_number.svg" + inkscape:version="1.0 (4035a4fb49, 2020-05-01)" + id="svg2" + version="1.1" + width="26" + height="26"> + <metadata + id="metadata40"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <sodipodi:namedview + inkscape:document-rotation="0" + inkscape:snap-nodes="true" + inkscape:current-layer="svg2" + inkscape:window-maximized="1" + inkscape:window-y="0" + inkscape:window-x="0" + inkscape:cy="12.716364" + inkscape:cx="12.752357" + inkscape:zoom="45.923076" + inkscape:snap-grids="true" + inkscape:snap-to-guides="false" + showgrid="true" + id="namedview38" + inkscape:window-height="1052" + inkscape:window-width="1920" + inkscape:pageshadow="2" + inkscape:pageopacity="0" + guidetolerance="10" + gridtolerance="10" + objecttolerance="10" + borderopacity="1" + bordercolor="#666666" + pagecolor="#ffffff"> + <inkscape:grid + originy="0" + originx="0" + spacingy="0.5" + spacingx="0.5" + snapvisiblegridlinesonly="true" + enabled="true" + visible="true" + empspacing="2" + id="grid3017" + type="xygrid" /> + </sodipodi:namedview> + <defs + id="defs4" /> + <g + id="g16" + transform="matrix(1.6382539,0,0,1.5572263,1.2572207,0.36314149)"> + <rect + style="fill-opacity:0" + id="rect18" + x="0" + y="0" + width="16" + height="16" /> + </g> + <path + inkscape:connector-curvature="0" + id="path3763" + d="m 13,4.5 c -4.69442,0 -8.5,3.8055796 -8.5,8.5 0,4.69442 3.80558,8.5 8.5,8.5 4.69442,0 8.5,-3.80558 8.5,-8.5 0,-4.6944204 -3.80558,-8.5 -8.5,-8.5 z m 0,5 c 1.932997,0 3.5,1.567003 3.5,3.5 0,1.932997 -1.567003,3.5 -3.5,3.5 -1.932997,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567003,-3.5 3.5,-3.5 z" + style="fill:#008000;fill-opacity:0.69803922;stroke:#008000;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + sodipodi:nodetypes="cc" + style="fill:none;stroke:#f2f2f2;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 13,18 V 8" + id="path4086" + inkscape:connector-curvature="0" /> + <path + inkscape:connector-curvature="0" + id="path4088" + d="M 10.5,10.5 13,8" + style="fill:none;stroke:#f2f2f2;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + sodipodi:nodetypes="cc" /> + <path + sodipodi:nodetypes="cc" + style="fill:none;stroke:#414141;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 13,18 V 8" + id="path3801" + inkscape:connector-curvature="0" /> + <path + inkscape:connector-curvature="0" + id="path3803" + d="M 10.5,10.5 13,8" + style="fill:none;stroke:#414141;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + sodipodi:nodetypes="cc" /> +</svg> diff --git a/bitmaps_png/sources/zoom_auto_fit_in_page.svg b/bitmaps_png/sources/zoom_auto_fit_in_page.svg new file mode 100644 index 0000000000..60101fb088 --- /dev/null +++ b/bitmaps_png/sources/zoom_auto_fit_in_page.svg @@ -0,0 +1,154 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + inkscape:output_extension="org.inkscape.output.svg.inkscape" + sodipodi:docname="zoom_auto_fit.svg" + version="1.0" + inkscape:version="1.0 (4035a4fb49, 2020-05-01)" + sodipodi:version="0.32" + id="svg2" + height="26" + width="26"> + <defs + id="defs4"> + <linearGradient + gradientUnits="userSpaceOnUse" + y2="19.285688" + x2="10.558969" + y1="3.0148761" + x1="10.558969" + gradientTransform="scale(1.0003344,0.9996657)" + id="StandardGradient"> + <stop + style="stop-color:#000000;stop-opacity:0.86274511;" + offset="0" + id="stop3309" /> + <stop + id="stop3311" + offset="1" + style="stop-color:#000000;stop-opacity:0.47058824;" /> + </linearGradient> + <linearGradient + y2="19.285688" + x2="10.558969" + y1="3.0148761" + x1="10.558969" + gradientTransform="matrix(1.2548423,0,0,1.2400195,0.14050495,-5.6670931)" + gradientUnits="userSpaceOnUse" + id="linearGradient2999" + xlink:href="#StandardGradient" + inkscape:collect="always" /> + </defs> + <sodipodi:namedview + inkscape:document-rotation="0" + inkscape:snap-grids="false" + inkscape:snap-to-guides="false" + inkscape:window-maximized="1" + inkscape:window-y="0" + inkscape:window-x="0" + inkscape:window-height="1052" + inkscape:window-width="1920" + inkscape:guide-bbox="true" + showguides="true" + inkscape:showpageshadow="false" + showgrid="true" + inkscape:current-layer="layer3" + inkscape:document-units="px" + inkscape:cy="12.276533" + inkscape:cx="10.312207" + inkscape:zoom="23.391981" + inkscape:pageshadow="2" + inkscape:pageopacity="0.0" + borderopacity="1" + bordercolor="#9a9a9a" + pagecolor="#ffffff" + id="base"> + <sodipodi:guide + id="guide2383" + position="0,112" + orientation="1,0" /> + <sodipodi:guide + id="guide2385" + position="26.278146,128" + orientation="0,1" /> + <sodipodi:guide + id="guide2387" + position="128,54.082119" + orientation="1,0" /> + <sodipodi:guide + id="guide2389" + position="78.156291,0" + orientation="0,1" /> + <inkscape:grid + snapvisiblegridlinesonly="true" + empspacing="5" + enabled="true" + visible="true" + id="grid3672" + type="xygrid" /> + </sodipodi:namedview> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + transform="translate(0,4)" + style="display:inline" + inkscape:label="Cross" + id="layer3" + inkscape:groupmode="layer"> + <path + inkscape:connector-curvature="0" + id="path4393" + d="m 11.430311,-3.2249884 c -2.272799,2e-7 -4.5578053,0.8632038 -6.2721144,2.55839553 -3.4356178,3.39730547 -3.4356183,8.96827317 0,12.36557787 2.7196488,2.689321 6.8218914,3.24191 10.1137844,1.666833 0.03751,-0.01794 0.0748,-0.05652 0.117602,-0.07753 0.03518,-0.01374 0.107341,-0.02278 0.156804,-0.03877 0.160051,-0.05173 0.349162,-0.103526 0.509608,-0.116291 0.105009,-0.0083 0.144253,-0.0017 0.156803,0 -0.0082,-0.01685 -0.02118,-0.04359 0.0784,0.232581 0.120337,0.333705 0.352186,0.929711 0.862416,1.434252 a 1.3070475,1.2924718 0 0 0 0.0392,0 l 3.998473,3.91512 a 1.3070475,1.2924718 0 0 0 0.0392,0.03877 c 0.0045,0.004 0.01627,0.01902 0.0392,0.03876 0.01797,0.01394 0.03946,0.03893 0.0392,0.03876 -9.4e-5,-6.8e-5 0.04647,0.01938 0.0784,0.03877 0.03013,0.02378 0.04121,0.05064 0.0784,0.07753 0.0065,0.004 0.03923,9e-6 0.0392,0 0.16814,0.119615 0.386998,0.279494 0.705612,0.387635 0.664623,0.225578 1.83589,0.122766 2.587248,-0.620217 0.753587,-0.745171 0.848364,-1.895396 0.627227,-2.558397 -0.221138,-0.663002 -0.542269,-0.960939 -0.54881,-0.96909 a 1.3070475,1.2924718 0 0 0 -0.0784,-0.116291 L 20.83848,11.156296 c -0.501428,-0.495837 -1.083421,-0.73316 -1.411225,-0.852799 -0.288243,-0.105198 -0.249911,-0.124223 -0.235205,-0.116291 -0.0095,-0.0425 -0.02681,-0.120768 0,-0.2713454 0.05055,-0.2840013 0.20669,-0.6004507 0.196004,-0.5814533 -6.46e-4,0.00117 0.0018,-0.042783 0,-0.038763 1.572319,-3.2491642 1.024585,-7.2822472 -1.685628,-9.96223757 -1.71431,-1.69519183 -3.999315,-2.55839553 -6.272115,-2.55839553 z m 0,1.2791978 c 1.926588,0 3.862407,0.7570135 5.331297,2.20952333 2.325743,2.29980727 2.80711,5.71665237 1.450427,8.48922117 -0.04417,0.093233 -0.739321,1.6335001 0,2.3645781 0.448448,0.443446 0.999618,0.290727 1.685631,0.969088 l 3.959272,3.915121 c 0.01308,0.0163 0.900222,0.892941 0,1.783124 -0.896758,0.886757 -1.759277,-0.0047 -1.764032,0 l -3.998473,-3.91512 c -0.686012,-0.678363 -0.531569,-1.262149 -0.980018,-1.705598 -0.6046,-0.597858 -1.740094,-0.255275 -2.19524,-0.07753 -0.07283,0.03782 -0.161419,0.081 -0.235204,0.116291 -2.803837,1.341554 -6.2592143,0.865556 -8.5849572,-1.434251 -2.9377802,-2.9050193 -2.93778,-7.599908 0,-10.50492726 C 7.5679039,-1.1887789 9.5037239,-1.9457926 11.430311,-1.9457927 z m 0,1.89941478 c -3.1159859,0 -5.6449027,2.50071542 -5.6449028,5.58195372 0,3.0812379 2.5289167,5.5819541 5.6449028,5.5819541 3.115987,0 5.644903,-2.5007162 5.644903,-5.5819541 0,-3.0812383 -2.528917,-5.58195394 -5.644903,-5.58195372 z m -1.293623,1.86065132 2.587247,0 0,2.5583954 2.548046,0 0,2.5583954 -2.548046,0 0,2.2870501 -2.587247,0 0,-2.2870501 -2.4696456,0 0,-2.5583954 2.4696456,0 0,-2.5583954 z m -1.2936241,0.3876355 0,0.8915621 -0.8624157,0 C 8.2281095,2.7520729 8.5064679,2.4573947 8.8430639,2.201911 z m 5.1744941,0 c 0.336596,0.2554837 0.614954,0.5501619 0.862416,0.8915621 l -0.862416,0 0,-0.8915621 z m -5.880107,6.008353 0.7056129,0 0,0.6589808 C 8.5812669,8.6705342 8.3466877,8.4622929 8.137451,8.210264 z m 5.880107,0 0.705613,0 c -0.209236,0.2520289 -0.443816,0.4602702 -0.705613,0.6589808 l 0,-0.6589808 z" + style="opacity:0.15;fill:#ffffff;fill-opacity:1;stroke:none;display:inline" /> + <path + sodipodi:nodetypes="sssccsccscsscsssssss" + inkscape:connector-curvature="0" + id="Symbol" + d="m 11.430311,-1.9457906 c -1.9265871,1e-7 -3.8624071,0.7570137 -5.3312972,2.20952333 -2.93778,2.90501937 -2.9377802,7.59990807 0,10.50492727 2.3257429,2.299807 5.7811202,2.775806 8.5849572,1.434251 0.07379,-0.03531 0.162379,-0.07847 0.235204,-0.116291 0.455146,-0.177748 1.59064,-0.520331 2.19524,0.07753 0.448449,0.443448 0.294006,1.027234 0.980018,1.705597 l 3.998473,3.915121 c 0.0048,-0.0047 0.867274,0.886757 1.764032,0 0.900222,-0.890184 0.01308,-1.766824 0,-1.783125 l -3.959272,-3.915125 c -0.686013,-0.678362 -1.237183,-0.525642 -1.685631,-0.969088 -0.739321,-0.731078 -0.04417,-2.2713486 0,-2.3645782 C 19.568718,5.9803851 19.087351,2.56354 16.761608,0.26373273 15.292718,-1.1887771 13.356899,-1.9457906 11.430311,-1.9457906 z m 0,1.89941478 c 3.115986,-2.2e-7 5.644903,2.50071542 5.644903,5.58195372 0,3.0812379 -2.528916,5.5819541 -5.644903,5.5819541 -3.1159861,0 -5.6449028,-2.5007162 -5.6449028,-5.5819541 1e-7,-3.0812383 2.5289169,-5.58195372 5.6449028,-5.58195372 z" + style="fill:url(#linearGradient2999);fill-opacity:1;stroke:none;display:inline" /> + <path + sodipodi:nodetypes="sscssscsscssscsccsscccssc" + inkscape:connector-curvature="0" + id="BevelShadow" + d="m 11.430311,-1.9457906 c -1.9265871,1e-7 -3.8624071,0.7570137 -5.3312972,2.20952333 C 4.4871895,1.8575828 3.7861316,3.9980578 3.9429745,6.0782679 4.1036342,4.4219058 4.813735,2.7751128 6.0990138,1.5041669 7.5679039,0.05165731 9.5037239,-0.7053565 11.430311,-0.7053565 c 1.926588,0 3.862407,0.7570137 5.331297,2.2095234 1.293265,1.2788424 2.00228,2.9073039 2.15604,4.574101 C 19.077923,3.9951049 18.375523,1.8596493 16.761608,0.26373273 15.292718,-1.1887771 13.356899,-1.9457906 11.430311,-1.9457906 z M 5.8638095,6.1557949 c -0.023521,0.2067874 -0.078402,0.4072492 -0.078402,0.6202171 0,3.0812387 2.5289169,5.581954 5.6449035,5.581954 3.115987,0 5.644903,-2.5007153 5.644903,-5.581954 0,-0.2129679 -0.05488,-0.4134297 -0.0784,-0.6202171 -0.316787,2.785029 -2.665885,4.9617371 -5.566502,4.9617371 -2.9006169,0 -5.2497143,-2.1767081 -5.5665025,-4.9617371 z M 17.976831,10.76866 c -0.12596,0.525781 -0.188389,1.170434 0.235204,1.589306 0.448448,0.443446 0.999618,0.290726 1.685631,0.969089 l 3.959272,3.915121 c 0.0041,0.0052 0.100009,0.156441 0.196003,0.310109 0.539869,-0.799711 -0.184123,-1.535741 -0.196003,-1.550544 L 19.897666,12.08662 C 19.211653,11.408259 18.660483,11.560978 18.212035,11.117532 18.100115,11.00686 18.030239,10.908585 17.976831,10.76866 z" + style="opacity:0.5;fill:#000000;fill-opacity:1;stroke:none;display:inline" /> + <path + inkscape:connector-curvature="0" + id="BevelHighlight" + d="m 14.958376,-1.0542286 c 0.341013,0.17949368 0.66436,0.38673795 0.980018,0.62021706 -0.308316,-0.22976633 -0.647179,-0.44214634 -0.980018,-0.62021706 z m -3.528065,1.00785278 c -3.1159859,0 -5.6449027,2.50071542 -5.6449028,5.58195372 0,0.2129679 0.05488,0.4134297 0.078402,0.620217 0.3167875,-2.785029 2.6658851,-4.9617367 5.5665007,-4.9617367 2.900617,-1e-7 5.249714,2.1767081 5.566502,4.9617367 0.02352,-0.2067873 0.0784,-0.4072491 0.0784,-0.620217 0,-3.0812383 -2.528917,-5.58195394 -5.644903,-5.58195372 z M 6.059813,0.26373273 C 5.5001517,0.81715291 5.0892415,1.4250119 4.7661896,2.0856204 5.1104606,1.4386761 5.54818,0.80842379 6.0990138,0.26373273 c -0.00701,0.006892 -0.03221,-0.006913 -0.0392,0 z M 18.956849,5.7293958 c -0.03028,1.0374903 -0.276797,2.067104 -0.744814,3.0235581 -0.03698,0.078048 -0.509316,1.1943772 -0.235204,1.9769421 0.09181,-0.369173 0.217209,-0.69852 0.235204,-0.7365081 0.60228,-1.2308408 0.730177,-2.5834111 0.744814,-3.91512 0.0012,-0.1168279 0.0028,-0.2318067 0,-0.3488721 z M 3.9037737,5.8456864 c -0.00152,0.07749 0,0.1552642 0,0.2325815 1e-7,0.052643 -0.00508,0.1026337 0,0.1550542 0,2.0802402 0.5834157,4.1819219 2.1952401,5.7757709 2.3257429,2.299808 5.7811202,2.775807 8.5849572,1.434252 0.07379,-0.0353 0.162379,-0.07847 0.235204,-0.11629 0.455146,-0.177748 1.59064,-0.52033 2.19524,0.07753 0.448449,0.443448 0.294006,1.027235 0.980018,1.705597 l 3.998473,3.91512 c 0.0048,-0.0047 0.867274,0.886758 1.764032,0 0.437107,-0.432231 0.392008,-1.138027 0.392008,-1.473014 0,-0.159901 0.0044,-0.264831 0,-0.387637 -0.04321,0.207621 -0.166951,0.397671 -0.392008,0.620218 -0.896758,0.886757 -1.759277,-0.0047 -1.764032,0 l -3.998473,-3.91512 c -0.686012,-0.678364 -0.531569,-1.26215 -0.980018,-1.705598 -0.6046,-0.597859 -1.740094,-0.255275 -2.19524,-0.07753 -0.07283,0.03782 -0.161419,0.081 -0.235204,0.116291 C 11.880134,13.544466 8.4247567,13.068467 6.0990138,10.76866 4.7114775,9.3965969 3.9806218,7.6391372 3.9037737,5.8456864 z m 3.7632687,1.0853799 0,1.2404341 2.4696456,0 0,-1.2404341 -2.4696456,0 z m 5.0568926,0 0,1.2404341 2.548046,0 0,-1.2404341 -2.548046,0 z M 6.1382146,7.318702 C 6.2195902,7.5550531 6.3012759,7.7955174 6.4126195,8.0164463 6.3008047,7.7932821 6.2199278,7.5575612 6.1382146,7.318702 z m 3.9984734,1.8994144 0,1.2404356 2.587247,0 0,-1.2404356 -2.587247,0 z" + style="opacity:0.3;fill:#ffffff;fill-opacity:1;stroke:none;display:inline" /> + <rect + y="2.3044744" + x="8.0482569" + height="6.7461538" + width="6.7461538" + id="rect8125" + style="display:inline;fill:#f2f2f2;fill-opacity:1;stroke:#666666;stroke-width:0.749573;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:3;stroke-opacity:1" /> + <g + id="text2996" + style="font-size:47.41636276px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:0.81960784;stroke:none;font-family:Sans" + transform="scale(0.93434702,1.0702662)"> + <path + id="path2998" + style="font-size:15.41031837px;font-weight:bold;fill:#000000;-inkscape-font-specification:Sans Bold" + d="m 11.381565,16.668254 -4.5297905,0 -0.7148341,2.046683 -2.9120084,0 4.161087,-11.2341821 3.453777,0 4.161087,11.2341821 -2.912008,0 -0.70731,-2.046683 m -3.8074318,-2.084305 3.0775488,0 -1.535012,-4.469595 -1.5425368,4.469595" /> + </g> + </g> +</svg> diff --git a/common/settings/app_settings.cpp b/common/settings/app_settings.cpp index 355c85629c..9421837c4b 100644 --- a/common/settings/app_settings.cpp +++ b/common/settings/app_settings.cpp @@ -221,9 +221,6 @@ bool APP_SETTINGS_BASE::migrateWindowConfig( wxConfigBase* aCfg, const std::stri ret &= fromLegacy<int>( aCfg, aFrame + gd + "GridStyle", aJsonPath + ".grid.style" ); ret &= fromLegacyColor( aCfg, aFrame + gd + "GridColor", aJsonPath + ".grid.color" ); - ret &= fromLegacy<bool>( aCfg, aFrame + "AutoZoom", aJsonPath + ".auto_zoom" ); - ret &= fromLegacy<double>( aCfg, aFrame + "Zoom", aJsonPath + ".zoom" ); - return ret; } diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt index b4142f255b..902cd04748 100644 --- a/cvpcb/CMakeLists.txt +++ b/cvpcb/CMakeLists.txt @@ -20,8 +20,6 @@ include_directories( set( CVPCB_DIALOGS dialogs/fp_conflict_assignment_selector_base.cpp dialogs/fp_conflict_assignment_selector.cpp - dialogs/dialog_display_options.cpp - dialogs/dialog_display_options_base.cpp dialogs/dialog_config_equfiles_base.cpp dialogs/dialog_config_equfiles.cpp ) diff --git a/cvpcb/cvpcb_settings.cpp b/cvpcb/cvpcb_settings.cpp index 5dfa4f6f93..ddc6c863fc 100644 --- a/cvpcb/cvpcb_settings.cpp +++ b/cvpcb/cvpcb_settings.cpp @@ -29,15 +29,16 @@ ///! Update the schema version whenever a migration is required const int cvpcbSchemaVersion = 0; -CVPCB_SETTINGS::CVPCB_SETTINGS() : - APP_SETTINGS_BASE( "cvpcb", cvpcbSchemaVersion ) +CVPCB_SETTINGS::CVPCB_SETTINGS() + : APP_SETTINGS_BASE( "cvpcb", cvpcbSchemaVersion ), + m_FootprintViewerAutoZoom( false ), + m_FootprintViewerZoom( 1.0 ), + m_FilterFootprint( 0 ) { - // Make Coverity happy: - m_FilterFootprint = 0; - - m_FootprintViewerMagneticSettings.pads = MAGNETIC_OPTIONS::NO_EFFECT; - m_FootprintViewerMagneticSettings.tracks = MAGNETIC_OPTIONS::NO_EFFECT; - m_FootprintViewerMagneticSettings.graphics = false; + // We always snap and don't let the user configure it + m_FootprintViewerMagneticSettings.pads = MAGNETIC_OPTIONS::CAPTURE_ALWAYS; + m_FootprintViewerMagneticSettings.tracks = MAGNETIC_OPTIONS::CAPTURE_ALWAYS; + m_FootprintViewerMagneticSettings.graphics = true; // Init settings: m_params.emplace_back( new PARAM<int>( "filter_footprint", &m_FilterFootprint, 0 ) ); @@ -57,12 +58,12 @@ CVPCB_SETTINGS::CVPCB_SETTINGS() : m_params.emplace_back( new PARAM<bool>( "footprint_viewer.graphic_items_fill", &m_FootprintViewerDisplayOptions.m_DisplayDrawItemsFill, true ) ); - m_params.emplace_back( new PARAM<bool>( "footprint_viewer.magnetic_graphics", - &m_FootprintViewerMagneticSettings.graphics, false ) ); + m_params.emplace_back( new PARAM<bool>( "footprint_viewer.auto_zoom", + &m_FootprintViewerAutoZoom, false ) ); + + m_params.emplace_back( new PARAM<double>( "footprint_viewer.zoom", + &m_FootprintViewerZoom, 1.0 ) ); - m_params.emplace_back( new PARAM<int>( "footprint_viewer.magnetic_pads", - reinterpret_cast<int*>( &m_FootprintViewerMagneticSettings.pads ), - static_cast<int>( MAGNETIC_OPTIONS::NO_EFFECT ) ) ); } @@ -79,5 +80,8 @@ bool CVPCB_SETTINGS::MigrateFromLegacy( wxConfigBase* aCfg ) ret &= fromLegacy<bool>( aCfg, "FootprintViewerFrameDiModTx", "footprint_viewer.footprint_text_fill" ); + ret &= fromLegacy<bool>( aCfg, "FootprintViewerFrameAutoZoom", "footprint_viewer.auto_zoom" ); + ret &= fromLegacy<double>( aCfg, "FootprintViewerFrameZoom", "footprint_viewer.zoom" ); + return ret; } diff --git a/cvpcb/cvpcb_settings.h b/cvpcb/cvpcb_settings.h index fb689f2967..5cfe182215 100644 --- a/cvpcb/cvpcb_settings.h +++ b/cvpcb/cvpcb_settings.h @@ -43,6 +43,10 @@ public: MAGNETIC_SETTINGS m_FootprintViewerMagneticSettings; + bool m_FootprintViewerAutoZoom; + + double m_FootprintViewerZoom; + int m_FilterFootprint; protected: diff --git a/cvpcb/display_footprints_frame.cpp b/cvpcb/display_footprints_frame.cpp index c45711456f..13859e3d8f 100644 --- a/cvpcb/display_footprints_frame.cpp +++ b/cvpcb/display_footprints_frame.cpp @@ -55,7 +55,6 @@ BEGIN_EVENT_TABLE( DISPLAY_FOOTPRINTS_FRAME, PCB_BASE_FRAME ) EVT_CLOSE( DISPLAY_FOOTPRINTS_FRAME::OnCloseWindow ) - EVT_TOOL( ID_OPTIONS_SETUP, DISPLAY_FOOTPRINTS_FRAME::InstallOptionsDisplay ) EVT_CHOICE( ID_ON_ZOOM_SELECT, DISPLAY_FOOTPRINTS_FRAME::OnSelectZoom ) EVT_CHOICE( ID_ON_GRID_SELECT, DISPLAY_FOOTPRINTS_FRAME::OnSelectGrid ) END_EVENT_TABLE() @@ -145,7 +144,9 @@ DISPLAY_FOOTPRINTS_FRAME::DISPLAY_FOOTPRINTS_FRAME( KIWAY* aKiway, wxWindow* aPa ActivateGalCanvas(); // Restore last zoom. (If auto-zooming we'll adjust when we load the footprint.) - GetCanvas()->GetView()->SetScale( m_lastZoom ); + CVPCB_SETTINGS* cfg = dynamic_cast<CVPCB_SETTINGS*>( config() ); + wxASSERT( cfg ); + GetCanvas()->GetView()->SetScale( cfg->m_FootprintViewerZoom ); updateView(); @@ -192,9 +193,6 @@ void DISPLAY_FOOTPRINTS_FRAME::ReCreateOptToolbar() m_optionsToolBar = new ACTION_TOOLBAR( this, ID_OPT_TOOLBAR, wxDefaultPosition, wxDefaultSize, KICAD_AUI_TB_STYLE | wxAUI_TB_VERTICAL ); - // TODO: these can be moved to the 'proper' right vertical toolbar if and when there are - // actual tools to put there. That, or I'll get around to implementing configurable - // toolbars. m_optionsToolBar->Add( ACTIONS::selectionTool, ACTION_TOOLBAR::TOGGLE ); m_optionsToolBar->Add( ACTIONS::measureTool, ACTION_TOOLBAR::TOGGLE ); @@ -206,6 +204,7 @@ void DISPLAY_FOOTPRINTS_FRAME::ReCreateOptToolbar() m_optionsToolBar->Add( ACTIONS::toggleCursorStyle, ACTION_TOOLBAR::TOGGLE ); m_optionsToolBar->AddSeparator(); + m_optionsToolBar->Add( PCB_ACTIONS::showPadNumbers, ACTION_TOOLBAR::TOGGLE ); m_optionsToolBar->Add( PCB_ACTIONS::padDisplayMode, ACTION_TOOLBAR::TOGGLE ); m_optionsToolBar->Add( PCB_ACTIONS::moduleTextOutlines, ACTION_TOOLBAR::TOGGLE ); m_optionsToolBar->Add( PCB_ACTIONS::moduleEdgeOutlines, ACTION_TOOLBAR::TOGGLE ); @@ -222,15 +221,13 @@ void DISPLAY_FOOTPRINTS_FRAME::ReCreateHToolbar() m_mainToolBar = new ACTION_TOOLBAR( this, ID_H_TOOLBAR, wxDefaultPosition, wxDefaultSize, KICAD_AUI_TB_STYLE | wxAUI_TB_HORZ_LAYOUT ); - m_mainToolBar->AddTool( ID_OPTIONS_SETUP, wxEmptyString, KiScaledBitmap( config_xpm, this ), - _( "Display options" ) ); - m_mainToolBar->AddSeparator(); m_mainToolBar->Add( ACTIONS::zoomRedraw ); m_mainToolBar->Add( ACTIONS::zoomInCenter ); m_mainToolBar->Add( ACTIONS::zoomOutCenter ); m_mainToolBar->Add( ACTIONS::zoomFitScreen ); - m_mainToolBar->Add( ACTIONS::zoomTool, ACTION_TOOLBAR::TOGGLE ); + m_mainToolBar->Add( ACTIONS::zoomTool, ACTION_TOOLBAR::TOGGLE ); + m_mainToolBar->Add( PCB_ACTIONS::zoomFootprintAutomatically, ACTION_TOOLBAR::TOGGLE ); m_mainToolBar->AddSeparator(); m_mainToolBar->Add( ACTIONS::show3DViewer ); @@ -265,9 +262,6 @@ void DISPLAY_FOOTPRINTS_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg ) EDA_DRAW_FRAME::LoadSettings( cfg ); SetDisplayOptions( cfg->m_FootprintViewerDisplayOptions ); - - m_autoZoom = cfg->m_FootprintViewer.auto_zoom; - m_lastZoom = cfg->m_FootprintViewer.zoom; } @@ -280,8 +274,7 @@ void DISPLAY_FOOTPRINTS_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg ) cfg->m_FootprintViewerDisplayOptions = GetDisplayOptions(); - cfg->m_FootprintViewer.auto_zoom = m_autoZoom; - cfg->m_FootprintViewer.zoom = GetCanvas()->GetView()->GetScale(); + cfg->m_FootprintViewerZoom = GetCanvas()->GetView()->GetScale(); } @@ -425,7 +418,7 @@ void DISPLAY_FOOTPRINTS_FRAME::updateView() m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD ); - if( m_autoZoom ) + if( GetAutoZoom() ) m_toolManager->RunAction( ACTIONS::zoomFitScreen, true ); else m_toolManager->RunAction( ACTIONS::centerContents, true ); @@ -449,6 +442,7 @@ void DISPLAY_FOOTPRINTS_FRAME::UpdateMsgPanel() void DISPLAY_FOOTPRINTS_FRAME::SyncToolbars() { m_mainToolBar->Toggle( ACTIONS::zoomTool, IsCurrentTool( ACTIONS::zoomTool ) ); + m_mainToolBar->Toggle( PCB_ACTIONS::zoomFootprintAutomatically, GetAutoZoom() ); m_mainToolBar->Refresh(); m_optionsToolBar->Toggle( ACTIONS::toggleGrid, IsGridVisible() ); @@ -456,6 +450,14 @@ void DISPLAY_FOOTPRINTS_FRAME::SyncToolbars() m_optionsToolBar->Toggle( ACTIONS::measureTool, IsCurrentTool( ACTIONS::measureTool ) ); m_optionsToolBar->Toggle( ACTIONS::metricUnits, GetUserUnits() != EDA_UNITS::INCHES ); m_optionsToolBar->Toggle( ACTIONS::imperialUnits, GetUserUnits() == EDA_UNITS::INCHES ); + + const PCB_DISPLAY_OPTIONS& opts = GetDisplayOptions(); + + m_optionsToolBar->Toggle( PCB_ACTIONS::showPadNumbers, opts.m_DisplayPadNum ); + m_optionsToolBar->Toggle( PCB_ACTIONS::padDisplayMode, !opts.m_DisplayPadFill ); + m_optionsToolBar->Toggle( PCB_ACTIONS::moduleTextOutlines, !opts.m_DisplayModTextFill ); + m_optionsToolBar->Toggle( PCB_ACTIONS::moduleEdgeOutlines, !opts.m_DisplayModEdgeFill ); + m_optionsToolBar->Refresh(); } @@ -475,3 +477,19 @@ BOARD_ITEM_CONTAINER* DISPLAY_FOOTPRINTS_FRAME::GetModel() const { return GetBoard()->GetFirstModule(); } + + +void DISPLAY_FOOTPRINTS_FRAME::SetAutoZoom( bool aAutoZoom ) +{ + CVPCB_SETTINGS* cfg = dynamic_cast<CVPCB_SETTINGS*>( config() ); + wxASSERT( cfg ); + cfg->m_FootprintViewerAutoZoom = aAutoZoom; +} + + +bool DISPLAY_FOOTPRINTS_FRAME::GetAutoZoom() +{ + CVPCB_SETTINGS* cfg = dynamic_cast<CVPCB_SETTINGS*>( config() ); + wxASSERT( cfg ); + return cfg->m_FootprintViewerAutoZoom; +} diff --git a/cvpcb/display_footprints_frame.h b/cvpcb/display_footprints_frame.h index 009e57c559..39f1f9e696 100644 --- a/cvpcb/display_footprints_frame.h +++ b/cvpcb/display_footprints_frame.h @@ -41,9 +41,6 @@ */ class DISPLAY_FOOTPRINTS_FRAME : public PCB_BASE_FRAME { - bool m_autoZoom; - double m_lastZoom; - public: DISPLAY_FOOTPRINTS_FRAME( KIWAY* aKiway, wxWindow* aParent ); ~DISPLAY_FOOTPRINTS_FRAME() override; @@ -83,9 +80,6 @@ public: ///> @copydoc EDA_DRAW_FRAME::UpdateMsgPanel() void UpdateMsgPanel() override; - bool GetAutoZoom() const { return m_autoZoom; } - void SetAutoZoom( bool aEnable ) { m_autoZoom = aEnable; } - COLOR_SETTINGS* GetColorSettings() override; /** @@ -94,7 +88,6 @@ public: */ COLOR4D GetGridColor() override; - void InstallOptionsDisplay( wxCommandEvent& event ); MODULE* Get_Module( const wxString& CmpName ); /* SaveCopyInUndoList() virtual @@ -124,6 +117,20 @@ public: void SyncToolbars() override; + /** + * Set if the canvas should automatically zoom to the footprint on load. + * + * @param aAutoZoom is true if it should automatically zoom + */ + void SetAutoZoom( bool aAutoZoom ) override; + + /** + * Get if the canvas should automatically zoom to the footprint on load. + * + * @return true if it should automatically zoom + */ + bool GetAutoZoom() override; + DECLARE_EVENT_TABLE() }; diff --git a/include/id.h b/include/id.h index 7fd4e28993..f583acaa2d 100644 --- a/include/id.h +++ b/include/id.h @@ -105,8 +105,6 @@ enum main_id ID_GEN_EXPORT_FILE, ID_GEN_IMPORT_FILE, - ID_OPTIONS_SETUP, - // id for toolbars ID_H_TOOLBAR, ID_V_TOOLBAR, diff --git a/include/pcb_base_frame.h b/include/pcb_base_frame.h index fa965b6bed..98334dd33c 100644 --- a/include/pcb_base_frame.h +++ b/include/pcb_base_frame.h @@ -473,6 +473,18 @@ public: ///> @copydoc EDA_DRAW_FRAME::UseGalCanvas virtual void ActivateGalCanvas() override; + /** + * Doesn't do anything. Should be overrided in child classes if they + * support an auto zoom setting. + */ + virtual void SetAutoZoom( bool aAutoZoom ) {} + + /** + * Always returns false. Should be overriden in child classes if they + * support an autozoom setting. + */ + virtual bool GetAutoZoom() { return false; } + DECLARE_EVENT_TABLE() }; diff --git a/include/settings/app_settings.h b/include/settings/app_settings.h index 428f88ae01..885b4a902d 100644 --- a/include/settings/app_settings.h +++ b/include/settings/app_settings.h @@ -61,8 +61,6 @@ struct WINDOW_SETTINGS CURSOR_SETTINGS cursor; GRID_SETTINGS grid; - bool auto_zoom; - double zoom; }; /** diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index f3ad5a8c0f..1c4aaab5f8 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -83,8 +83,6 @@ set( PCBNEW_DIALOGS dialogs/dialog_find_base.cpp dialogs/dialog_footprint_wizard_list.cpp dialogs/dialog_footprint_wizard_list_base.cpp - dialogs/dialog_fp_browser_display_options.cpp - dialogs/dialog_fp_browser_display_options_base.cpp dialogs/dialog_fp_plugin_options.cpp dialogs/dialog_fp_plugin_options_base.cpp dialogs/dialog_gen_footprint_position_file_base.cpp diff --git a/pcbnew/dialogs/dialog_fp_browser_display_options.cpp b/pcbnew/dialogs/dialog_fp_browser_display_options.cpp deleted file mode 100644 index 9722d0779e..0000000000 --- a/pcbnew/dialogs/dialog_fp_browser_display_options.cpp +++ /dev/null @@ -1,94 +0,0 @@ -/* - * This program source code file is part of KiCad, a free EDA CAD application. - * - * Copyright (C) 2018 KiCad Developers, see AUTHORS.txt for contributors. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, you may find one here: - * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * or you may search the http://www.gnu.org website for the version 2 license, - * or you may write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include <fctsys.h> -#include <common.h> -#include <footprint_viewer_frame.h> -#include <dialog_fp_browser_display_options.h> - - -void FOOTPRINT_VIEWER_FRAME::InstallDisplayOptions( wxCommandEvent& event ) -{ - DIALOG_FP_BROWSER_DISPLAY_OPTIONS dlg( this ); - - dlg.ShowModal(); -} - - -DIALOG_FP_BROWSER_DISPLAY_OPTIONS::DIALOG_FP_BROWSER_DISPLAY_OPTIONS( FOOTPRINT_VIEWER_FRAME* aParent ) - : DIALOG_FP_BROWSER_DISPLAY_OPTIONS_BASE( aParent ), - m_frame( aParent ) -{ - initDialog(); - m_sdbSizerOK->SetDefault(); - - FinishDialogSettings();; -} - - -DIALOG_FP_BROWSER_DISPLAY_OPTIONS::~DIALOG_FP_BROWSER_DISPLAY_OPTIONS( ) -{ -} - - -void DIALOG_FP_BROWSER_DISPLAY_OPTIONS::initDialog() -{ - SetFocus(); // mandatory to use escape key as cancel under wxGTK. - - const PCB_DISPLAY_OPTIONS& displ_opts = m_frame->GetDisplayOptions(); - - m_EdgesDisplayOption->SetValue( not displ_opts.m_DisplayModEdgeFill ); - m_TextDisplayOption->SetValue( not displ_opts.m_DisplayModTextFill ); - m_ShowPadSketch->SetValue( not displ_opts.m_DisplayPadFill ); - m_ShowPadNum->SetValue( displ_opts.m_DisplayPadNum ); - - m_autoZoomOption->SetValue( m_frame->GetAutoZoom() ); -} - - -void DIALOG_FP_BROWSER_DISPLAY_OPTIONS::UpdateObjectSettings() -{ - PCB_DISPLAY_OPTIONS displ_opts = m_frame->GetDisplayOptions(); - - displ_opts.m_DisplayModEdgeFill = not m_EdgesDisplayOption->GetValue(); - displ_opts.m_DisplayModTextFill = not m_TextDisplayOption->GetValue(); - displ_opts.m_DisplayPadNum = m_ShowPadNum->GetValue(); - displ_opts.m_DisplayPadFill = not m_ShowPadSketch->GetValue(); - m_frame->SetDisplayOptions( displ_opts ); - m_frame->ApplyDisplaySettingsToGAL(); - - m_frame->SetAutoZoom( m_autoZoomOption->GetValue() ); -} - - -bool DIALOG_FP_BROWSER_DISPLAY_OPTIONS::TransferDataFromWindow() -{ - UpdateObjectSettings(); - return true; -} - - -void DIALOG_FP_BROWSER_DISPLAY_OPTIONS::OnApplyClick( wxCommandEvent& event ) -{ - UpdateObjectSettings(); -} diff --git a/pcbnew/dialogs/dialog_fp_browser_display_options.h b/pcbnew/dialogs/dialog_fp_browser_display_options.h deleted file mode 100644 index 31d721c06c..0000000000 --- a/pcbnew/dialogs/dialog_fp_browser_display_options.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * This program source code file is part of KiCad, a free EDA CAD application. - * - * Copyright (C) 2018 KiCad Developers, see AUTHORS.txt for contributors. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, you may find one here: - * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * or you may search the http://www.gnu.org website for the version 2 license, - * or you may write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef DIALOG_FP_BROWSER_DISPLAY_OPTIONS_H -#define DIALOG_FP_BROWSER_DISPLAY_OPTIONS_H - -#include <dialog_fp_browser_display_options_base.h> - - -class FOOTPRINT_VIEWER_FRAME; - - -class DIALOG_FP_BROWSER_DISPLAY_OPTIONS : public DIALOG_FP_BROWSER_DISPLAY_OPTIONS_BASE -{ -private: - FOOTPRINT_VIEWER_FRAME* m_frame; - -public: - DIALOG_FP_BROWSER_DISPLAY_OPTIONS( FOOTPRINT_VIEWER_FRAME* aParent ); - ~DIALOG_FP_BROWSER_DISPLAY_OPTIONS(); - -private: - void initDialog(); - void UpdateObjectSettings(); - void OnApplyClick( wxCommandEvent& event ) override; - bool TransferDataFromWindow() override; -}; - -#endif // DIALOG_FP_BROWSER_DISPLAY_OPTIONS_H diff --git a/pcbnew/dialogs/dialog_fp_browser_display_options_base.cpp b/pcbnew/dialogs/dialog_fp_browser_display_options_base.cpp deleted file mode 100644 index 723ad73c9c..0000000000 --- a/pcbnew/dialogs/dialog_fp_browser_display_options_base.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Dec 30 2017) -// http://www.wxformbuilder.org/ -// -// PLEASE DO *NOT* EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#include "dialog_fp_browser_display_options_base.h" - -/////////////////////////////////////////////////////////////////////////// - -DIALOG_FP_BROWSER_DISPLAY_OPTIONS_BASE::DIALOG_FP_BROWSER_DISPLAY_OPTIONS_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( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizerMain; - bSizerMain = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bUpperSizer; - bUpperSizer = new wxBoxSizer( wxHORIZONTAL ); - - wxStaticBoxSizer* sbSizerDrawMode; - sbSizerDrawMode = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Drawing Options") ), wxVERTICAL ); - - m_EdgesDisplayOption = new wxCheckBox( sbSizerDrawMode->GetStaticBox(), wxID_ANY, _("Graphic items sketch mode"), wxDefaultPosition, wxDefaultSize, 0 ); - sbSizerDrawMode->Add( m_EdgesDisplayOption, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - m_TextDisplayOption = new wxCheckBox( sbSizerDrawMode->GetStaticBox(), wxID_ANY, _("Texts sketch mode"), wxDefaultPosition, wxDefaultSize, 0 ); - sbSizerDrawMode->Add( m_TextDisplayOption, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 ); - - m_ShowPadSketch = new wxCheckBox( sbSizerDrawMode->GetStaticBox(), ID_PADFILL_OPT, _("Pad sketch mode"), wxDefaultPosition, wxDefaultSize, 0 ); - sbSizerDrawMode->Add( m_ShowPadSketch, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - - sbSizerDrawMode->Add( 0, 0, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 ); - - m_ShowPadNum = new wxCheckBox( sbSizerDrawMode->GetStaticBox(), wxID_ANY, _("Show pad &numbers"), wxDefaultPosition, wxDefaultSize, 0 ); - sbSizerDrawMode->Add( m_ShowPadNum, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - - bUpperSizer->Add( sbSizerDrawMode, 1, wxEXPAND|wxALL, 5 ); - - wxStaticBoxSizer* sbSizerViewOpt; - sbSizerViewOpt = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Auto-zoom") ), wxVERTICAL ); - - m_autoZoomOption = new wxCheckBox( sbSizerViewOpt->GetStaticBox(), wxID_ANY, _("Zoom to fit when changing footprint"), wxDefaultPosition, wxDefaultSize, 0 ); - m_autoZoomOption->SetValue(true); - sbSizerViewOpt->Add( m_autoZoomOption, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - - bUpperSizer->Add( sbSizerViewOpt, 1, wxALL|wxEXPAND, 5 ); - - - bSizerMain->Add( bUpperSizer, 1, wxEXPAND|wxALL, 5 ); - - m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizerMain->Add( m_staticline1, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - m_sdbSizer = new wxStdDialogButtonSizer(); - m_sdbSizerOK = new wxButton( this, wxID_OK ); - m_sdbSizer->AddButton( m_sdbSizerOK ); - m_sdbSizerApply = new wxButton( this, wxID_APPLY ); - m_sdbSizer->AddButton( m_sdbSizerApply ); - m_sdbSizerCancel = new wxButton( this, wxID_CANCEL ); - m_sdbSizer->AddButton( m_sdbSizerCancel ); - m_sdbSizer->Realize(); - - bSizerMain->Add( m_sdbSizer, 0, wxEXPAND|wxALL, 5 ); - - - this->SetSizer( bSizerMain ); - this->Layout(); - bSizerMain->Fit( this ); - - // Connect Events - m_sdbSizerApply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_BROWSER_DISPLAY_OPTIONS_BASE::OnApplyClick ), NULL, this ); -} - -DIALOG_FP_BROWSER_DISPLAY_OPTIONS_BASE::~DIALOG_FP_BROWSER_DISPLAY_OPTIONS_BASE() -{ - // Disconnect Events - m_sdbSizerApply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_BROWSER_DISPLAY_OPTIONS_BASE::OnApplyClick ), NULL, this ); - -} diff --git a/pcbnew/dialogs/dialog_fp_browser_display_options_base.fbp b/pcbnew/dialogs/dialog_fp_browser_display_options_base.fbp deleted file mode 100644 index 7b3fa5bbfd..0000000000 --- a/pcbnew/dialogs/dialog_fp_browser_display_options_base.fbp +++ /dev/null @@ -1,697 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> -<wxFormBuilder_Project> - <FileVersion major="1" minor="13" /> - <object class="Project" expanded="1"> - <property name="class_decoration"></property> - <property name="code_generation">C++</property> - <property name="disconnect_events">1</property> - <property name="disconnect_mode">source_name</property> - <property name="disconnect_php_events">0</property> - <property name="disconnect_python_events">0</property> - <property name="embedded_files_path">res</property> - <property name="encoding">UTF-8</property> - <property name="event_generation">connect</property> - <property name="file">dialog_fp_browser_display_options_base</property> - <property name="first_id">1000</property> - <property name="help_provider">none</property> - <property name="internationalize">1</property> - <property name="name">dialog_fp_browser_display_options_base</property> - <property name="namespace"></property> - <property name="path">.</property> - <property name="precompiled_header"></property> - <property name="relative_path">1</property> - <property name="skip_lua_events">1</property> - <property name="skip_php_events">1</property> - <property name="skip_python_events">1</property> - <property name="ui_table">UI</property> - <property name="use_enum">0</property> - <property name="use_microsoft_bom">0</property> - <object class="Dialog" expanded="1"> - <property name="aui_managed">0</property> - <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property> - <property name="bg"></property> - <property name="center"></property> - <property name="context_help"></property> - <property name="context_menu">1</property> - <property name="enabled">1</property> - <property name="event_handler">impl_virtual</property> - <property name="extra_style"></property> - <property name="fg"></property> - <property name="font"></property> - <property name="hidden">0</property> - <property name="id">wxID_ANY</property> - <property name="maximum_size"></property> - <property name="minimum_size"></property> - <property name="name">DIALOG_FP_BROWSER_DISPLAY_OPTIONS_BASE</property> - <property name="pos"></property> - <property name="size">-1,-1</property> - <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property> - <property name="subclass">DIALOG_SHIM; dialog_shim.h</property> - <property name="title">Display Options</property> - <property name="tooltip"></property> - <property name="window_extra_style"></property> - <property name="window_name"></property> - <property name="window_style"></property> - <event name="OnActivate"></event> - <event name="OnActivateApp"></event> - <event name="OnAuiFindManager"></event> - <event name="OnAuiPaneButton"></event> - <event name="OnAuiPaneClose"></event> - <event name="OnAuiPaneMaximize"></event> - <event name="OnAuiPaneRestore"></event> - <event name="OnAuiRender"></event> - <event name="OnChar"></event> - <event name="OnClose"></event> - <event name="OnEnterWindow"></event> - <event name="OnEraseBackground"></event> - <event name="OnHibernate"></event> - <event name="OnIconize"></event> - <event name="OnIdle"></event> - <event name="OnInitDialog"></event> - <event name="OnKeyDown"></event> - <event name="OnKeyUp"></event> - <event name="OnKillFocus"></event> - <event name="OnLeaveWindow"></event> - <event name="OnLeftDClick"></event> - <event name="OnLeftDown"></event> - <event name="OnLeftUp"></event> - <event name="OnMiddleDClick"></event> - <event name="OnMiddleDown"></event> - <event name="OnMiddleUp"></event> - <event name="OnMotion"></event> - <event name="OnMouseEvents"></event> - <event name="OnMouseWheel"></event> - <event name="OnPaint"></event> - <event name="OnRightDClick"></event> - <event name="OnRightDown"></event> - <event name="OnRightUp"></event> - <event name="OnSetFocus"></event> - <event name="OnSize"></event> - <event name="OnUpdateUI"></event> - <object class="wxBoxSizer" expanded="1"> - <property name="minimum_size"></property> - <property name="name">bSizerMain</property> - <property name="orient">wxVERTICAL</property> - <property name="permission">none</property> - <object class="sizeritem" expanded="1"> - <property name="border">5</property> - <property name="flag">wxEXPAND|wxALL</property> - <property name="proportion">1</property> - <object class="wxBoxSizer" expanded="1"> - <property name="minimum_size"></property> - <property name="name">bUpperSizer</property> - <property name="orient">wxHORIZONTAL</property> - <property name="permission">none</property> - <object class="sizeritem" expanded="1"> - <property name="border">5</property> - <property name="flag">wxEXPAND|wxALL</property> - <property name="proportion">1</property> - <object class="wxStaticBoxSizer" expanded="1"> - <property name="id">wxID_ANY</property> - <property name="label">Drawing Options</property> - <property name="minimum_size"></property> - <property name="name">sbSizerDrawMode</property> - <property name="orient">wxVERTICAL</property> - <property name="parent">1</property> - <property name="permission">none</property> - <event name="OnUpdateUI"></event> - <object class="sizeritem" expanded="1"> - <property name="border">5</property> - <property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property> - <property name="proportion">0</property> - <object class="wxCheckBox" expanded="1"> - <property name="BottomDockable">1</property> - <property name="LeftDockable">1</property> - <property name="RightDockable">1</property> - <property name="TopDockable">1</property> - <property name="aui_layer"></property> - <property name="aui_name"></property> - <property name="aui_position"></property> - <property name="aui_row"></property> - <property name="best_size"></property> - <property name="bg"></property> - <property name="caption"></property> - <property name="caption_visible">1</property> - <property name="center_pane">0</property> - <property name="checked">0</property> - <property name="close_button">1</property> - <property name="context_help"></property> - <property name="context_menu">1</property> - <property name="default_pane">0</property> - <property name="dock">Dock</property> - <property name="dock_fixed">0</property> - <property name="docking">Left</property> - <property name="enabled">1</property> - <property name="fg"></property> - <property name="floatable">1</property> - <property name="font"></property> - <property name="gripper">0</property> - <property name="hidden">0</property> - <property name="id">wxID_ANY</property> - <property name="label">Graphic items sketch mode</property> - <property name="max_size"></property> - <property name="maximize_button">0</property> - <property name="maximum_size"></property> - <property name="min_size"></property> - <property name="minimize_button">0</property> - <property name="minimum_size"></property> - <property name="moveable">1</property> - <property name="name">m_EdgesDisplayOption</property> - <property name="pane_border">1</property> - <property name="pane_position"></property> - <property name="pane_size"></property> - <property name="permission">protected</property> - <property name="pin_button">1</property> - <property name="pos"></property> - <property name="resize">Resizable</property> - <property name="show">1</property> - <property name="size"></property> - <property name="style"></property> - <property name="subclass"></property> - <property name="toolbar_pane">0</property> - <property name="tooltip"></property> - <property name="validator_data_type"></property> - <property name="validator_style">wxFILTER_NONE</property> - <property name="validator_type">wxDefaultValidator</property> - <property name="validator_variable"></property> - <property name="window_extra_style"></property> - <property name="window_name"></property> - <property name="window_style"></property> - <event name="OnChar"></event> - <event name="OnCheckBox"></event> - <event name="OnEnterWindow"></event> - <event name="OnEraseBackground"></event> - <event name="OnKeyDown"></event> - <event name="OnKeyUp"></event> - <event name="OnKillFocus"></event> - <event name="OnLeaveWindow"></event> - <event name="OnLeftDClick"></event> - <event name="OnLeftDown"></event> - <event name="OnLeftUp"></event> - <event name="OnMiddleDClick"></event> - <event name="OnMiddleDown"></event> - <event name="OnMiddleUp"></event> - <event name="OnMotion"></event> - <event name="OnMouseEvents"></event> - <event name="OnMouseWheel"></event> - <event name="OnPaint"></event> - <event name="OnRightDClick"></event> - <event name="OnRightDown"></event> - <event name="OnRightUp"></event> - <event name="OnSetFocus"></event> - <event name="OnSize"></event> - <event name="OnUpdateUI"></event> - </object> - </object> - <object class="sizeritem" expanded="1"> - <property name="border">5</property> - <property name="flag">wxBOTTOM|wxLEFT|wxRIGHT</property> - <property name="proportion">0</property> - <object class="wxCheckBox" expanded="1"> - <property name="BottomDockable">1</property> - <property name="LeftDockable">1</property> - <property name="RightDockable">1</property> - <property name="TopDockable">1</property> - <property name="aui_layer"></property> - <property name="aui_name"></property> - <property name="aui_position"></property> - <property name="aui_row"></property> - <property name="best_size"></property> - <property name="bg"></property> - <property name="caption"></property> - <property name="caption_visible">1</property> - <property name="center_pane">0</property> - <property name="checked">0</property> - <property name="close_button">1</property> - <property name="context_help"></property> - <property name="context_menu">1</property> - <property name="default_pane">0</property> - <property name="dock">Dock</property> - <property name="dock_fixed">0</property> - <property name="docking">Left</property> - <property name="enabled">1</property> - <property name="fg"></property> - <property name="floatable">1</property> - <property name="font"></property> - <property name="gripper">0</property> - <property name="hidden">0</property> - <property name="id">wxID_ANY</property> - <property name="label">Texts sketch mode</property> - <property name="max_size"></property> - <property name="maximize_button">0</property> - <property name="maximum_size"></property> - <property name="min_size"></property> - <property name="minimize_button">0</property> - <property name="minimum_size"></property> - <property name="moveable">1</property> - <property name="name">m_TextDisplayOption</property> - <property name="pane_border">1</property> - <property name="pane_position"></property> - <property name="pane_size"></property> - <property name="permission">protected</property> - <property name="pin_button">1</property> - <property name="pos"></property> - <property name="resize">Resizable</property> - <property name="show">1</property> - <property name="size"></property> - <property name="style"></property> - <property name="subclass"></property> - <property name="toolbar_pane">0</property> - <property name="tooltip"></property> - <property name="validator_data_type"></property> - <property name="validator_style">wxFILTER_NONE</property> - <property name="validator_type">wxDefaultValidator</property> - <property name="validator_variable"></property> - <property name="window_extra_style"></property> - <property name="window_name"></property> - <property name="window_style"></property> - <event name="OnChar"></event> - <event name="OnCheckBox"></event> - <event name="OnEnterWindow"></event> - <event name="OnEraseBackground"></event> - <event name="OnKeyDown"></event> - <event name="OnKeyUp"></event> - <event name="OnKillFocus"></event> - <event name="OnLeaveWindow"></event> - <event name="OnLeftDClick"></event> - <event name="OnLeftDown"></event> - <event name="OnLeftUp"></event> - <event name="OnMiddleDClick"></event> - <event name="OnMiddleDown"></event> - <event name="OnMiddleUp"></event> - <event name="OnMotion"></event> - <event name="OnMouseEvents"></event> - <event name="OnMouseWheel"></event> - <event name="OnPaint"></event> - <event name="OnRightDClick"></event> - <event name="OnRightDown"></event> - <event name="OnRightUp"></event> - <event name="OnSetFocus"></event> - <event name="OnSize"></event> - <event name="OnUpdateUI"></event> - </object> - </object> - <object class="sizeritem" expanded="1"> - <property name="border">5</property> - <property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT</property> - <property name="proportion">0</property> - <object class="wxCheckBox" expanded="1"> - <property name="BottomDockable">1</property> - <property name="LeftDockable">1</property> - <property name="RightDockable">1</property> - <property name="TopDockable">1</property> - <property name="aui_layer"></property> - <property name="aui_name"></property> - <property name="aui_position"></property> - <property name="aui_row"></property> - <property name="best_size"></property> - <property name="bg"></property> - <property name="caption"></property> - <property name="caption_visible">1</property> - <property name="center_pane">0</property> - <property name="checked">0</property> - <property name="close_button">1</property> - <property name="context_help"></property> - <property name="context_menu">1</property> - <property name="default_pane">0</property> - <property name="dock">Dock</property> - <property name="dock_fixed">0</property> - <property name="docking">Left</property> - <property name="enabled">1</property> - <property name="fg"></property> - <property name="floatable">1</property> - <property name="font"></property> - <property name="gripper">0</property> - <property name="hidden">0</property> - <property name="id">ID_PADFILL_OPT</property> - <property name="label">Pad sketch mode</property> - <property name="max_size"></property> - <property name="maximize_button">0</property> - <property name="maximum_size"></property> - <property name="min_size"></property> - <property name="minimize_button">0</property> - <property name="minimum_size"></property> - <property name="moveable">1</property> - <property name="name">m_ShowPadSketch</property> - <property name="pane_border">1</property> - <property name="pane_position"></property> - <property name="pane_size"></property> - <property name="permission">protected</property> - <property name="pin_button">1</property> - <property name="pos"></property> - <property name="resize">Resizable</property> - <property name="show">1</property> - <property name="size"></property> - <property name="style"></property> - <property name="subclass"></property> - <property name="toolbar_pane">0</property> - <property name="tooltip"></property> - <property name="validator_data_type"></property> - <property name="validator_style">wxFILTER_NONE</property> - <property name="validator_type">wxDefaultValidator</property> - <property name="validator_variable"></property> - <property name="window_extra_style"></property> - <property name="window_name"></property> - <property name="window_style"></property> - <event name="OnChar"></event> - <event name="OnCheckBox"></event> - <event name="OnEnterWindow"></event> - <event name="OnEraseBackground"></event> - <event name="OnKeyDown"></event> - <event name="OnKeyUp"></event> - <event name="OnKillFocus"></event> - <event name="OnLeaveWindow"></event> - <event name="OnLeftDClick"></event> - <event name="OnLeftDown"></event> - <event name="OnLeftUp"></event> - <event name="OnMiddleDClick"></event> - <event name="OnMiddleDown"></event> - <event name="OnMiddleUp"></event> - <event name="OnMotion"></event> - <event name="OnMouseEvents"></event> - <event name="OnMouseWheel"></event> - <event name="OnPaint"></event> - <event name="OnRightDClick"></event> - <event name="OnRightDown"></event> - <event name="OnRightUp"></event> - <event name="OnSetFocus"></event> - <event name="OnSize"></event> - <event name="OnUpdateUI"></event> - </object> - </object> - <object class="sizeritem" expanded="1"> - <property name="border">5</property> - <property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property> - <property name="proportion">1</property> - <object class="spacer" expanded="1"> - <property name="height">0</property> - <property name="permission">protected</property> - <property name="width">0</property> - </object> - </object> - <object class="sizeritem" expanded="1"> - <property name="border">5</property> - <property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property> - <property name="proportion">0</property> - <object class="wxCheckBox" expanded="1"> - <property name="BottomDockable">1</property> - <property name="LeftDockable">1</property> - <property name="RightDockable">1</property> - <property name="TopDockable">1</property> - <property name="aui_layer"></property> - <property name="aui_name"></property> - <property name="aui_position"></property> - <property name="aui_row"></property> - <property name="best_size"></property> - <property name="bg"></property> - <property name="caption"></property> - <property name="caption_visible">1</property> - <property name="center_pane">0</property> - <property name="checked">0</property> - <property name="close_button">1</property> - <property name="context_help"></property> - <property name="context_menu">1</property> - <property name="default_pane">0</property> - <property name="dock">Dock</property> - <property name="dock_fixed">0</property> - <property name="docking">Left</property> - <property name="enabled">1</property> - <property name="fg"></property> - <property name="floatable">1</property> - <property name="font"></property> - <property name="gripper">0</property> - <property name="hidden">0</property> - <property name="id">wxID_ANY</property> - <property name="label">Show pad &numbers</property> - <property name="max_size"></property> - <property name="maximize_button">0</property> - <property name="maximum_size"></property> - <property name="min_size"></property> - <property name="minimize_button">0</property> - <property name="minimum_size"></property> - <property name="moveable">1</property> - <property name="name">m_ShowPadNum</property> - <property name="pane_border">1</property> - <property name="pane_position"></property> - <property name="pane_size"></property> - <property name="permission">protected</property> - <property name="pin_button">1</property> - <property name="pos"></property> - <property name="resize">Resizable</property> - <property name="show">1</property> - <property name="size"></property> - <property name="style"></property> - <property name="subclass"></property> - <property name="toolbar_pane">0</property> - <property name="tooltip"></property> - <property name="validator_data_type"></property> - <property name="validator_style">wxFILTER_NONE</property> - <property name="validator_type">wxDefaultValidator</property> - <property name="validator_variable"></property> - <property name="window_extra_style"></property> - <property name="window_name"></property> - <property name="window_style"></property> - <event name="OnChar"></event> - <event name="OnCheckBox"></event> - <event name="OnEnterWindow"></event> - <event name="OnEraseBackground"></event> - <event name="OnKeyDown"></event> - <event name="OnKeyUp"></event> - <event name="OnKillFocus"></event> - <event name="OnLeaveWindow"></event> - <event name="OnLeftDClick"></event> - <event name="OnLeftDown"></event> - <event name="OnLeftUp"></event> - <event name="OnMiddleDClick"></event> - <event name="OnMiddleDown"></event> - <event name="OnMiddleUp"></event> - <event name="OnMotion"></event> - <event name="OnMouseEvents"></event> - <event name="OnMouseWheel"></event> - <event name="OnPaint"></event> - <event name="OnRightDClick"></event> - <event name="OnRightDown"></event> - <event name="OnRightUp"></event> - <event name="OnSetFocus"></event> - <event name="OnSize"></event> - <event name="OnUpdateUI"></event> - </object> - </object> - </object> - </object> - <object class="sizeritem" expanded="1"> - <property name="border">5</property> - <property name="flag">wxALL|wxEXPAND</property> - <property name="proportion">1</property> - <object class="wxStaticBoxSizer" expanded="1"> - <property name="id">wxID_ANY</property> - <property name="label">Auto-zoom</property> - <property name="minimum_size"></property> - <property name="name">sbSizerViewOpt</property> - <property name="orient">wxVERTICAL</property> - <property name="parent">1</property> - <property name="permission">none</property> - <event name="OnUpdateUI"></event> - <object class="sizeritem" expanded="1"> - <property name="border">5</property> - <property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property> - <property name="proportion">0</property> - <object class="wxCheckBox" expanded="1"> - <property name="BottomDockable">1</property> - <property name="LeftDockable">1</property> - <property name="RightDockable">1</property> - <property name="TopDockable">1</property> - <property name="aui_layer"></property> - <property name="aui_name"></property> - <property name="aui_position"></property> - <property name="aui_row"></property> - <property name="best_size"></property> - <property name="bg"></property> - <property name="caption"></property> - <property name="caption_visible">1</property> - <property name="center_pane">0</property> - <property name="checked">1</property> - <property name="close_button">1</property> - <property name="context_help"></property> - <property name="context_menu">1</property> - <property name="default_pane">0</property> - <property name="dock">Dock</property> - <property name="dock_fixed">0</property> - <property name="docking">Left</property> - <property name="enabled">1</property> - <property name="fg"></property> - <property name="floatable">1</property> - <property name="font"></property> - <property name="gripper">0</property> - <property name="hidden">0</property> - <property name="id">wxID_ANY</property> - <property name="label">Zoom to fit when changing footprint</property> - <property name="max_size"></property> - <property name="maximize_button">0</property> - <property name="maximum_size"></property> - <property name="min_size"></property> - <property name="minimize_button">0</property> - <property name="minimum_size"></property> - <property name="moveable">1</property> - <property name="name">m_autoZoomOption</property> - <property name="pane_border">1</property> - <property name="pane_position"></property> - <property name="pane_size"></property> - <property name="permission">protected</property> - <property name="pin_button">1</property> - <property name="pos"></property> - <property name="resize">Resizable</property> - <property name="show">1</property> - <property name="size"></property> - <property name="style"></property> - <property name="subclass">; forward_declare</property> - <property name="toolbar_pane">0</property> - <property name="tooltip"></property> - <property name="validator_data_type"></property> - <property name="validator_style">wxFILTER_NONE</property> - <property name="validator_type">wxDefaultValidator</property> - <property name="validator_variable"></property> - <property name="window_extra_style"></property> - <property name="window_name"></property> - <property name="window_style"></property> - <event name="OnChar"></event> - <event name="OnCheckBox"></event> - <event name="OnEnterWindow"></event> - <event name="OnEraseBackground"></event> - <event name="OnKeyDown"></event> - <event name="OnKeyUp"></event> - <event name="OnKillFocus"></event> - <event name="OnLeaveWindow"></event> - <event name="OnLeftDClick"></event> - <event name="OnLeftDown"></event> - <event name="OnLeftUp"></event> - <event name="OnMiddleDClick"></event> - <event name="OnMiddleDown"></event> - <event name="OnMiddleUp"></event> - <event name="OnMotion"></event> - <event name="OnMouseEvents"></event> - <event name="OnMouseWheel"></event> - <event name="OnPaint"></event> - <event name="OnRightDClick"></event> - <event name="OnRightDown"></event> - <event name="OnRightUp"></event> - <event name="OnSetFocus"></event> - <event name="OnSize"></event> - <event name="OnUpdateUI"></event> - </object> - </object> - </object> - </object> - </object> - </object> - <object class="sizeritem" expanded="1"> - <property name="border">5</property> - <property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property> - <property name="proportion">0</property> - <object class="wxStaticLine" expanded="1"> - <property name="BottomDockable">1</property> - <property name="LeftDockable">1</property> - <property name="RightDockable">1</property> - <property name="TopDockable">1</property> - <property name="aui_layer"></property> - <property name="aui_name"></property> - <property name="aui_position"></property> - <property name="aui_row"></property> - <property name="best_size"></property> - <property name="bg"></property> - <property name="caption"></property> - <property name="caption_visible">1</property> - <property name="center_pane">0</property> - <property name="close_button">1</property> - <property name="context_help"></property> - <property name="context_menu">1</property> - <property name="default_pane">0</property> - <property name="dock">Dock</property> - <property name="dock_fixed">0</property> - <property name="docking">Left</property> - <property name="enabled">1</property> - <property name="fg"></property> - <property name="floatable">1</property> - <property name="font"></property> - <property name="gripper">0</property> - <property name="hidden">0</property> - <property name="id">wxID_ANY</property> - <property name="max_size"></property> - <property name="maximize_button">0</property> - <property name="maximum_size"></property> - <property name="min_size"></property> - <property name="minimize_button">0</property> - <property name="minimum_size"></property> - <property name="moveable">1</property> - <property name="name">m_staticline1</property> - <property name="pane_border">1</property> - <property name="pane_position"></property> - <property name="pane_size"></property> - <property name="permission">protected</property> - <property name="pin_button">1</property> - <property name="pos"></property> - <property name="resize">Resizable</property> - <property name="show">1</property> - <property name="size"></property> - <property name="style">wxLI_HORIZONTAL</property> - <property name="subclass"></property> - <property name="toolbar_pane">0</property> - <property name="tooltip"></property> - <property name="window_extra_style"></property> - <property name="window_name"></property> - <property name="window_style"></property> - <event name="OnChar"></event> - <event name="OnEnterWindow"></event> - <event name="OnEraseBackground"></event> - <event name="OnKeyDown"></event> - <event name="OnKeyUp"></event> - <event name="OnKillFocus"></event> - <event name="OnLeaveWindow"></event> - <event name="OnLeftDClick"></event> - <event name="OnLeftDown"></event> - <event name="OnLeftUp"></event> - <event name="OnMiddleDClick"></event> - <event name="OnMiddleDown"></event> - <event name="OnMiddleUp"></event> - <event name="OnMotion"></event> - <event name="OnMouseEvents"></event> - <event name="OnMouseWheel"></event> - <event name="OnPaint"></event> - <event name="OnRightDClick"></event> - <event name="OnRightDown"></event> - <event name="OnRightUp"></event> - <event name="OnSetFocus"></event> - <event name="OnSize"></event> - <event name="OnUpdateUI"></event> - </object> - </object> - <object class="sizeritem" expanded="1"> - <property name="border">5</property> - <property name="flag">wxEXPAND|wxALL</property> - <property name="proportion">0</property> - <object class="wxStdDialogButtonSizer" expanded="1"> - <property name="Apply">1</property> - <property name="Cancel">1</property> - <property name="ContextHelp">0</property> - <property name="Help">0</property> - <property name="No">0</property> - <property name="OK">1</property> - <property name="Save">0</property> - <property name="Yes">0</property> - <property name="minimum_size"></property> - <property name="name">m_sdbSizer</property> - <property name="permission">protected</property> - <event name="OnApplyButtonClick">OnApplyClick</event> - <event name="OnCancelButtonClick"></event> - <event name="OnContextHelpButtonClick"></event> - <event name="OnHelpButtonClick"></event> - <event name="OnNoButtonClick"></event> - <event name="OnOKButtonClick"></event> - <event name="OnSaveButtonClick"></event> - <event name="OnYesButtonClick"></event> - </object> - </object> - </object> - </object> - </object> -</wxFormBuilder_Project> diff --git a/pcbnew/dialogs/dialog_fp_browser_display_options_base.h b/pcbnew/dialogs/dialog_fp_browser_display_options_base.h deleted file mode 100644 index c0414cf9fb..0000000000 --- a/pcbnew/dialogs/dialog_fp_browser_display_options_base.h +++ /dev/null @@ -1,61 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Dec 30 2017) -// http://www.wxformbuilder.org/ -// -// PLEASE DO *NOT* EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#ifndef __DIALOG_FP_BROWSER_DISPLAY_OPTIONS_BASE_H__ -#define __DIALOG_FP_BROWSER_DISPLAY_OPTIONS_BASE_H__ - -#include <wx/artprov.h> -#include <wx/xrc/xmlres.h> -#include <wx/intl.h> -#include "dialog_shim.h" -#include <wx/string.h> -#include <wx/checkbox.h> -#include <wx/gdicmn.h> -#include <wx/font.h> -#include <wx/colour.h> -#include <wx/settings.h> -#include <wx/sizer.h> -#include <wx/statbox.h> -#include <wx/statline.h> -#include <wx/button.h> -#include <wx/dialog.h> - -/////////////////////////////////////////////////////////////////////////// - -#define ID_PADFILL_OPT 1000 - -/////////////////////////////////////////////////////////////////////////////// -/// Class DIALOG_FP_BROWSER_DISPLAY_OPTIONS_BASE -/////////////////////////////////////////////////////////////////////////////// -class DIALOG_FP_BROWSER_DISPLAY_OPTIONS_BASE : public DIALOG_SHIM -{ - private: - - protected: - wxCheckBox* m_EdgesDisplayOption; - wxCheckBox* m_TextDisplayOption; - wxCheckBox* m_ShowPadSketch; - wxCheckBox* m_ShowPadNum; - wxCheckBox* m_autoZoomOption; - wxStaticLine* m_staticline1; - wxStdDialogButtonSizer* m_sdbSizer; - wxButton* m_sdbSizerOK; - wxButton* m_sdbSizerApply; - wxButton* m_sdbSizerCancel; - - // Virtual event handlers, overide them in your derived class - virtual void OnApplyClick( wxCommandEvent& event ) { event.Skip(); } - - - public: - - DIALOG_FP_BROWSER_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Display Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~DIALOG_FP_BROWSER_DISPLAY_OPTIONS_BASE(); - -}; - -#endif //__DIALOG_FP_BROWSER_DISPLAY_OPTIONS_BASE_H__ diff --git a/pcbnew/footprint_viewer_frame.cpp b/pcbnew/footprint_viewer_frame.cpp index 2bb69520de..439d724e1e 100644 --- a/pcbnew/footprint_viewer_frame.cpp +++ b/pcbnew/footprint_viewer_frame.cpp @@ -52,6 +52,8 @@ #include <tool/common_tools.h> #include <tool/tool_dispatcher.h> #include <tool/tool_manager.h> +#include <tool/zoom_tool.h> +#include <tools/pcb_viewer_tools.h> #include <tools/pcb_actions.h> #include <tools/pcbnew_control.h> #include <tools/pcbnew_picker_tool.h> @@ -77,7 +79,6 @@ BEGIN_EVENT_TABLE( FOOTPRINT_VIEWER_FRAME, EDA_DRAW_FRAME ) EVT_MENU( wxID_CLOSE, FOOTPRINT_VIEWER_FRAME::CloseFootprintViewer ) // Toolbar events - EVT_TOOL( ID_MODVIEW_OPTIONS, FOOTPRINT_VIEWER_FRAME::InstallDisplayOptions ) EVT_TOOL( ID_MODVIEW_NEXT, FOOTPRINT_VIEWER_FRAME::OnIterateFootprintList ) EVT_TOOL( ID_MODVIEW_PREVIOUS, FOOTPRINT_VIEWER_FRAME::OnIterateFootprintList ) EVT_TOOL( ID_ADD_FOOTPRINT_TO_BOARD, FOOTPRINT_VIEWER_FRAME::AddFootprintToPCB ) @@ -127,6 +128,11 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent m_AboutTitle = "Footprint Library Viewer"; + // Force the items to always snap + m_magneticItems.pads = MAGNETIC_OPTIONS::CAPTURE_ALWAYS; + m_magneticItems.tracks = MAGNETIC_OPTIONS::CAPTURE_ALWAYS; + m_magneticItems.graphics = true; + // Force the frame name used in config. the footprint viewer frame has a name // depending on aFrameType (needed to identify the frame by wxWidgets), // but only one configuration is preferable. @@ -210,12 +216,18 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent m_toolManager->RegisterTool( new COMMON_TOOLS ); // for std context menus (zoom & grid) m_toolManager->RegisterTool( new COMMON_CONTROL ); m_toolManager->RegisterTool( new PCBNEW_PICKER_TOOL ); // for setting grid origin + m_toolManager->RegisterTool( new ZOOM_TOOL ); + m_toolManager->RegisterTool( new PCB_VIEWER_TOOLS ); + + m_toolManager->GetTool<PCB_VIEWER_TOOLS>()->SetFootprintFrame( true ); + m_toolManager->InitTools(); m_toolManager->InvokeTool( "pcbnew.InteractiveSelection" ); ReCreateMenuBar(); ReCreateHToolbar(); ReCreateVToolbar(); + ReCreateOptToolbar(); ReCreateLibraryList(); UpdateTitle(); @@ -236,6 +248,7 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent // Horizontal items; layers 4 - 6 m_auimgr.AddPane( m_mainToolBar, EDA_PANE().VToolbar().Name( "MainToolbar" ).Top().Layer(6) ); + m_auimgr.AddPane( m_optionsToolBar, EDA_PANE().VToolbar().Name( "OptToolbar" ).Left().Layer(3) ); m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( "MsgPanel" ).Bottom().Layer(6) ); // Vertical items; layers 1 - 3 @@ -256,7 +269,9 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent ActivateGalCanvas(); // Restore last zoom. (If auto-zooming we'll adjust when we load the footprint.) - GetCanvas()->GetView()->SetScale( m_lastZoom ); + PCBNEW_SETTINGS* cfg = GetPcbNewSettings(); + wxASSERT( cfg ); + GetCanvas()->GetView()->SetScale( cfg->m_FootprintViewerZoom ); updateView(); InitExitKey(); @@ -715,9 +730,6 @@ void FOOTPRINT_VIEWER_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg ) SetGridVisibility( fpedit->m_Window.grid.show ); GetGalDisplayOptions().ReadWindowSettings( fpedit->m_Window ); - - m_autoZoom = cfg->m_FootprintViewer.auto_zoom; - m_lastZoom = cfg->m_FootprintViewer.zoom; } @@ -729,8 +741,7 @@ void FOOTPRINT_VIEWER_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg ) // We don't want to store anything other than the window settings EDA_BASE_FRAME::SaveSettings( cfg ); - cfg->m_FootprintViewer.auto_zoom = m_autoZoom; - cfg->m_FootprintViewer.zoom = GetCanvas()->GetView()->GetScale(); + cfg->m_FootprintViewerZoom = GetCanvas()->GetView()->GetScale(); } @@ -754,6 +765,24 @@ COLOR_SETTINGS* FOOTPRINT_VIEWER_FRAME::GetColorSettings() } +bool FOOTPRINT_VIEWER_FRAME::GetAutoZoom() +{ + // It is stored in pcbnew's settings + PCBNEW_SETTINGS* cfg = GetPcbNewSettings(); + wxCHECK( cfg, false ); + return cfg->m_FootprintViewerAutoZoom; +} + + +void FOOTPRINT_VIEWER_FRAME::SetAutoZoom( bool aAutoZoom ) +{ + // It is stored in pcbnew's settings + PCBNEW_SETTINGS* cfg = GetPcbNewSettings(); + wxASSERT( cfg ); + cfg->m_FootprintViewerAutoZoom = aAutoZoom; +} + + void FOOTPRINT_VIEWER_FRAME::CommonSettingsChanged( bool aEnvVarsChanged ) { PCB_BASE_FRAME::CommonSettingsChanged( aEnvVarsChanged ); @@ -995,7 +1024,7 @@ void FOOTPRINT_VIEWER_FRAME::updateView() m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD ); - if( m_autoZoom ) + if( GetAutoZoom() ) m_toolManager->RunAction( ACTIONS::zoomFitScreen, true ); else m_toolManager->RunAction( ACTIONS::centerContents, true ); @@ -1020,3 +1049,4 @@ BOARD_ITEM_CONTAINER* FOOTPRINT_VIEWER_FRAME::GetModel() const { return GetBoard()->GetFirstModule(); } + diff --git a/pcbnew/footprint_viewer_frame.h b/pcbnew/footprint_viewer_frame.h index 76c6ba6cd3..99df0a6cd0 100644 --- a/pcbnew/footprint_viewer_frame.h +++ b/pcbnew/footprint_viewer_frame.h @@ -28,6 +28,7 @@ #include <wx/gdicmn.h> #include <pcb_base_frame.h> +#include <pcbnew_settings.h> class wxSashLayoutWindow; class wxListBox; @@ -46,6 +47,8 @@ class FOOTPRINT_VIEWER_FRAME : public PCB_BASE_FRAME protected: FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType ); + MAGNETIC_SETTINGS m_magneticItems; + public: ~FOOTPRINT_VIEWER_FRAME(); @@ -58,8 +61,13 @@ public: virtual COLOR4D GetGridColor() override; - bool GetAutoZoom() const { return m_autoZoom; } - void SetAutoZoom( bool aEnable ) { m_autoZoom = aEnable; } + bool GetAutoZoom() override; + void SetAutoZoom( bool aAutoZoom ) override; + + MAGNETIC_SETTINGS* GetMagneticItemsSettings() override + { + return &m_magneticItems; + } /** * Function ReCreateLibraryList @@ -117,7 +125,9 @@ private: void ReCreateHToolbar() override; void ReCreateVToolbar() override; + void ReCreateOptToolbar() override; void ReCreateMenuBar() override; + void SyncToolbars() override; void OnLibFilter( wxCommandEvent& aEvent ); void OnFPFilter( wxCommandEvent& aEvent ); @@ -129,8 +139,6 @@ private: void ClickOnFootprintList( wxCommandEvent& aEvent ); void DClickOnFootprintList( wxCommandEvent& aEvent ); - void InstallDisplayOptions( wxCommandEvent& aEvent ); - void LoadSettings( APP_SETTINGS_BASE* aCfg ) override; void SaveSettings( APP_SETTINGS_BASE* aCfg ) override; diff --git a/pcbnew/pcbnew_id.h b/pcbnew/pcbnew_id.h index 8fbda367d6..d753200b15 100644 --- a/pcbnew/pcbnew_id.h +++ b/pcbnew/pcbnew_id.h @@ -112,7 +112,6 @@ enum pcbnew_ids ID_MODVIEW_LIB_LIST, ID_MODVIEW_FOOTPRINT_FILTER, ID_MODVIEW_FOOTPRINT_LIST, - ID_MODVIEW_OPTIONS, ID_MODVIEW_PREVIOUS, ID_MODVIEW_NEXT, diff --git a/pcbnew/pcbnew_settings.cpp b/pcbnew/pcbnew_settings.cpp index 39cddab644..71ed475eba 100644 --- a/pcbnew/pcbnew_settings.cpp +++ b/pcbnew/pcbnew_settings.cpp @@ -43,11 +43,14 @@ const int pcbnewSchemaVersion = 0; -PCBNEW_SETTINGS::PCBNEW_SETTINGS() : APP_SETTINGS_BASE( "pcbnew", pcbnewSchemaVersion ), - m_Use45DegreeGraphicSegments( false ), - m_FlipLeftRight( false ), - m_ShowPageLimits( true ), - m_PnsSettings( nullptr ) +PCBNEW_SETTINGS::PCBNEW_SETTINGS() + : APP_SETTINGS_BASE( "pcbnew", pcbnewSchemaVersion ), + m_Use45DegreeGraphicSegments( false ), + m_FlipLeftRight( false ), + m_ShowPageLimits( true ), + m_PnsSettings( nullptr ), + m_FootprintViewerAutoZoom( false ), + m_FootprintViewerZoom( 1.0 ) { m_MagneticItems.pads = MAGNETIC_OPTIONS::CAPTURE_CURSOR_IN_TRACK_TOOL; m_MagneticItems.tracks = MAGNETIC_OPTIONS::CAPTURE_CURSOR_IN_TRACK_TOOL; @@ -75,10 +78,6 @@ PCBNEW_SETTINGS::PCBNEW_SETTINGS() : APP_SETTINGS_BASE( "pcbnew", pcbnewSchemaVe m_params.emplace_back( new PARAM<int>( "grid.fast_grid_2", &m_FastGrid2, 0 ) ); - m_params.emplace_back( new PARAM<bool>( "window.auto_zoom", &m_Window.auto_zoom, true ) ); - - m_params.emplace_back( new PARAM<double>( "window.zoom", &m_Window.zoom, 10.0 ) ); - m_params.emplace_back( new PARAM<bool>( "editing.flip_left_right", &m_FlipLeftRight, true ) ); m_params.emplace_back( @@ -396,6 +395,12 @@ PCBNEW_SETTINGS::PCBNEW_SETTINGS() : APP_SETTINGS_BASE( "pcbnew", pcbnewSchemaVe addParamsForWindow( &m_FootprintViewer, "footprint_viewer" ); + m_params.emplace_back( new PARAM<bool>( "footprint_viewer.auto_zoom", + &m_FootprintViewerAutoZoom, false ) ); + + m_params.emplace_back( new PARAM<double>( "footprint_viewer.zoom", + &m_FootprintViewerZoom, 1.0 ) ); + addParamsForWindow( &m_FootprintWizard, "footprint_wizard" ); } @@ -596,6 +601,9 @@ bool PCBNEW_SETTINGS::MigrateFromLegacy( wxConfigBase* aCfg ) migrateWindowConfig( aCfg, "ModViewFrame", "footprint_viewer" ); + ret &= fromLegacy<bool>( aCfg, "ModViewFrameAutoZoom", "footprint_viewer.auto_zoom" ); + ret &= fromLegacy<double>( aCfg, "ModViewFrameZoom", "footprint_viewer.zoom" ); + migrateWindowConfig( aCfg, "FootprintWizard", "footprint_wizard" ); ret &= fromLegacyString( aCfg, "Fpwizard_auiPerspective", "footprint_wizard.perspective" ); diff --git a/pcbnew/pcbnew_settings.h b/pcbnew/pcbnew_settings.h index ca3b61dcde..a10315e407 100644 --- a/pcbnew/pcbnew_settings.h +++ b/pcbnew/pcbnew_settings.h @@ -272,6 +272,10 @@ public: std::unique_ptr<PNS::ROUTING_SETTINGS> m_PnsSettings; + bool m_FootprintViewerAutoZoom; ///< Should the footprint viewer auto zoom on select + + double m_FootprintViewerZoom; ///< The last zoom level in the footprint viewer + #if defined(KICAD_SCRIPTING) && defined(KICAD_SCRIPTING_ACTION_MENU) ACTION_PLUGIN_SETTINGS_LIST m_VisibleActionPlugins; #endif diff --git a/pcbnew/toolbars_footprint_viewer.cpp b/pcbnew/toolbars_footprint_viewer.cpp index da9afab1fb..d935fbf66e 100644 --- a/pcbnew/toolbars_footprint_viewer.cpp +++ b/pcbnew/toolbars_footprint_viewer.cpp @@ -50,11 +50,6 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateHToolbar() KICAD_AUI_TB_STYLE | wxAUI_TB_HORZ_LAYOUT ); // Set up toolbar - m_mainToolBar->AddTool( ID_MODVIEW_OPTIONS, wxEmptyString, - KiScaledBitmap( config_xpm, this ), - _( "Display options" ) ); - - m_mainToolBar->AddSeparator(); m_mainToolBar->AddTool( ID_MODVIEW_PREVIOUS, wxEmptyString, KiScaledBitmap( lib_previous_xpm, this ), _( "Display previous footprint" ) ); @@ -67,6 +62,8 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateHToolbar() m_mainToolBar->Add( ACTIONS::zoomInCenter ); m_mainToolBar->Add( ACTIONS::zoomOutCenter ); m_mainToolBar->Add( ACTIONS::zoomFitScreen ); + m_mainToolBar->Add( ACTIONS::zoomTool, ACTION_TOOLBAR::TOGGLE ); + m_mainToolBar->Add( PCB_ACTIONS::zoomFootprintAutomatically, ACTION_TOOLBAR::TOGGLE ); KiScaledSeparator( m_mainToolBar, this ); m_mainToolBar->Add( ACTIONS::show3DViewer ); @@ -101,11 +98,63 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateHToolbar() } +void FOOTPRINT_VIEWER_FRAME::ReCreateOptToolbar() +{ + if( m_optionsToolBar ) + return; + + // Create options tool bar. + m_optionsToolBar = new ACTION_TOOLBAR( this, ID_OPT_TOOLBAR, wxDefaultPosition, wxDefaultSize, + KICAD_AUI_TB_STYLE | wxAUI_TB_VERTICAL ); + + m_optionsToolBar->Add( ACTIONS::selectionTool, ACTION_TOOLBAR::TOGGLE ); + m_optionsToolBar->Add( ACTIONS::measureTool, ACTION_TOOLBAR::TOGGLE ); + + m_optionsToolBar->AddSeparator(); + m_optionsToolBar->Add( ACTIONS::toggleGrid, ACTION_TOOLBAR::TOGGLE ); + m_optionsToolBar->Add( ACTIONS::togglePolarCoords, ACTION_TOOLBAR::TOGGLE ); + m_optionsToolBar->Add( ACTIONS::imperialUnits, ACTION_TOOLBAR::TOGGLE ); + m_optionsToolBar->Add( ACTIONS::metricUnits, ACTION_TOOLBAR::TOGGLE ); + m_optionsToolBar->Add( ACTIONS::toggleCursorStyle, ACTION_TOOLBAR::TOGGLE ); + + m_optionsToolBar->AddSeparator(); + m_optionsToolBar->Add( PCB_ACTIONS::showPadNumbers, ACTION_TOOLBAR::TOGGLE ); + m_optionsToolBar->Add( PCB_ACTIONS::padDisplayMode, ACTION_TOOLBAR::TOGGLE ); + m_optionsToolBar->Add( PCB_ACTIONS::moduleTextOutlines, ACTION_TOOLBAR::TOGGLE ); + m_optionsToolBar->Add( PCB_ACTIONS::moduleEdgeOutlines, ACTION_TOOLBAR::TOGGLE ); + + m_optionsToolBar->Realize(); +} + + void FOOTPRINT_VIEWER_FRAME::ReCreateVToolbar() { } +void FOOTPRINT_VIEWER_FRAME::SyncToolbars() +{ + m_mainToolBar->Toggle( ACTIONS::zoomTool, IsCurrentTool( ACTIONS::zoomTool ) ); + m_mainToolBar->Toggle( PCB_ACTIONS::zoomFootprintAutomatically, GetAutoZoom() ); + m_mainToolBar->Refresh(); + + m_optionsToolBar->Toggle( ACTIONS::toggleGrid, IsGridVisible() ); + m_optionsToolBar->Toggle( ACTIONS::selectionTool, IsCurrentTool( ACTIONS::selectionTool ) ); + m_optionsToolBar->Toggle( ACTIONS::measureTool, IsCurrentTool( ACTIONS::measureTool ) ); + m_optionsToolBar->Toggle( ACTIONS::metricUnits, GetUserUnits() != EDA_UNITS::INCHES ); + m_optionsToolBar->Toggle( ACTIONS::imperialUnits, GetUserUnits() == EDA_UNITS::INCHES ); + + const PCB_DISPLAY_OPTIONS& opts = GetDisplayOptions(); + + m_optionsToolBar->Toggle( PCB_ACTIONS::showPadNumbers, opts.m_DisplayPadNum ); + m_optionsToolBar->Toggle( PCB_ACTIONS::padDisplayMode, !opts.m_DisplayPadFill ); + m_optionsToolBar->Toggle( PCB_ACTIONS::moduleTextOutlines, !opts.m_DisplayModTextFill ); + m_optionsToolBar->Toggle( PCB_ACTIONS::moduleEdgeOutlines, !opts.m_DisplayModEdgeFill ); + + m_optionsToolBar->Refresh(); +} + + void FOOTPRINT_VIEWER_FRAME::ReCreateMenuBar() { SELECTION_TOOL* selTool = m_toolManager->GetTool<SELECTION_TOOL>(); diff --git a/pcbnew/tools/pcb_actions.cpp b/pcbnew/tools/pcb_actions.cpp index c5fbb1fa87..bd623d9259 100644 --- a/pcbnew/tools/pcb_actions.cpp +++ b/pcbnew/tools/pcb_actions.cpp @@ -698,6 +698,16 @@ TOOL_ACTION PCB_ACTIONS::moduleTextOutlines( "pcbnew.Control.fpTextOutlines", _( "Line Mode Footprint Text Items" ), _( "Show footprint texts in line mode" ), text_sketch_xpm ); +TOOL_ACTION PCB_ACTIONS::showPadNumbers( "pcbnew.Control.showPadNumbers", + AS_GLOBAL, 0, "", + _( "Show pad numbers" ), _( "Show pad numbers" ), + pad_number_xpm ); + +TOOL_ACTION PCB_ACTIONS::zoomFootprintAutomatically( "pcbnew.Control.zoomFootprintAutomatically", + AS_GLOBAL, 0, "", + _( "Automatically zoom to fit" ), _( "Zoom to fit when changing footprint" ), + zoom_auto_fit_in_page_xpm ); + TOOL_ACTION PCB_ACTIONS::zoneDisplayEnable( "pcbnew.Control.zoneDisplayEnable", AS_GLOBAL, 0, "", _( "Fill Zones" ), _( "Show filled areas of zones" ), diff --git a/pcbnew/tools/pcb_actions.h b/pcbnew/tools/pcb_actions.h index 08447e7e29..7fa5c97a0a 100644 --- a/pcbnew/tools/pcb_actions.h +++ b/pcbnew/tools/pcb_actions.h @@ -227,6 +227,8 @@ public: static TOOL_ACTION zoneDisplayDisable; static TOOL_ACTION zoneDisplayOutlines; static TOOL_ACTION zoneDisplayToggle; + static TOOL_ACTION showPadNumbers; + static TOOL_ACTION zoomFootprintAutomatically; // Layer control static TOOL_ACTION layerTop; diff --git a/pcbnew/tools/pcb_viewer_tools.cpp b/pcbnew/tools/pcb_viewer_tools.cpp index dc0025a66c..6c2984a0b3 100644 --- a/pcbnew/tools/pcb_viewer_tools.cpp +++ b/pcbnew/tools/pcb_viewer_tools.cpp @@ -86,6 +86,34 @@ template<class T> void Flip( T& aValue ) } +int PCB_VIEWER_TOOLS::ZoomAutomatically( const TOOL_EVENT& aEvent ) +{ + frame()->SetAutoZoom( !frame()->GetAutoZoom() ); + + return 0; +} + + +int PCB_VIEWER_TOOLS::ShowPadNumbers( const TOOL_EVENT& aEvent ) +{ + auto opts = displayOptions(); + + Flip( opts.m_DisplayPadNum ); + frame()->SetDisplayOptions( opts ); + view()->UpdateDisplayOptions( opts ); + + for( auto module : board()->Modules() ) + { + for( auto pad : module->Pads() ) + view()->Update( pad, KIGFX::GEOMETRY ); + } + + canvas()->Refresh(); + + return 0; +} + + int PCB_VIEWER_TOOLS::PadDisplayMode( const TOOL_EVENT& aEvent ) { auto opts = displayOptions(); @@ -292,9 +320,12 @@ void PCB_VIEWER_TOOLS::setTransitions() Go( &PCB_VIEWER_TOOLS::Show3DViewer, ACTIONS::show3DViewer.MakeEvent() ); // Display modes + Go( &PCB_VIEWER_TOOLS::ShowPadNumbers, PCB_ACTIONS::showPadNumbers.MakeEvent() ); Go( &PCB_VIEWER_TOOLS::PadDisplayMode, PCB_ACTIONS::padDisplayMode.MakeEvent() ); Go( &PCB_VIEWER_TOOLS::ModuleEdgeOutlines, PCB_ACTIONS::moduleEdgeOutlines.MakeEvent() ); Go( &PCB_VIEWER_TOOLS::ModuleTextOutlines, PCB_ACTIONS::moduleTextOutlines.MakeEvent() ); + Go( &PCB_VIEWER_TOOLS::ZoomAutomatically, + PCB_ACTIONS::zoomFootprintAutomatically.MakeEvent() ); Go( &PCB_VIEWER_TOOLS::MeasureTool, ACTIONS::measureTool.MakeEvent() ); } diff --git a/pcbnew/tools/pcb_viewer_tools.h b/pcbnew/tools/pcb_viewer_tools.h index 7c74aab4fb..6d4adca3b6 100644 --- a/pcbnew/tools/pcb_viewer_tools.h +++ b/pcbnew/tools/pcb_viewer_tools.h @@ -55,9 +55,11 @@ public: int MeasureTool( const TOOL_EVENT& aEvent ); // Display modes + int ShowPadNumbers( const TOOL_EVENT& aEvent ); int PadDisplayMode( const TOOL_EVENT& aEvent ); int ModuleEdgeOutlines( const TOOL_EVENT& aEvent ); int ModuleTextOutlines( const TOOL_EVENT& aEvent ); + int ZoomAutomatically( const TOOL_EVENT& aEvent ); /// Show the 3D viewer int Show3DViewer( const TOOL_EVENT& aEvent );