Compare commits
724 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| da418dfe2e | |||
| 7ea013b96c | |||
| 021f251efd | |||
| d21eba4021 | |||
| 9f4dfe77cb | |||
| db9f0a0358 | |||
| 8cddd40fc9 | |||
| b2588e0bbf | |||
| 0f8d543172 | |||
| ac576d7e0a | |||
| a2cbd1ff21 | |||
| c633ac26eb | |||
| 4eb048bba2 | |||
| 300313ce73 | |||
| 5a3bad51d0 | |||
| 7b63429fe1 | |||
| d778cb6647 | |||
| 7fef6e8d83 | |||
| c9ddcd618d | |||
| ccc76aad2f | |||
| 44a33eedf4 | |||
| f0e9f9f15a | |||
| 52daf14c78 | |||
| 9d0ee029bc | |||
| e49d233923 | |||
| a5e2615251 | |||
| 0c45f85bc0 | |||
| 0ca7a81181 | |||
| b7161181e8 | |||
| 73a3b880a6 | |||
| 694a7db457 | |||
| 63cd110720 | |||
| 896f56772f | |||
| 5fc0f1f51e | |||
| 4aab9f59aa | |||
| 2a37580839 | |||
| d865bda4f2 | |||
| 74070afbc6 | |||
| 9bf0b479ed | |||
| 44fd13af47 | |||
| 8dd93501cf | |||
| 37191720ca | |||
| 439c25fca9 | |||
| 35d60598d5 | |||
| 9d9028c979 | |||
| 1325701956 | |||
| de2fbbd11a | |||
| 4e133ae83b | |||
| a02cb75656 | |||
| 0826c10a20 | |||
| d40bbed591 | |||
| 5e048bc64c | |||
| 889931505b | |||
| e0e837189d | |||
| 012d3f098f | |||
| 2e38fa84bf | |||
| 0d2838518b | |||
| 82c2bda52b | |||
| 0b187e7122 | |||
| aa1fb0604a | |||
| 43dab2a8b5 | |||
| ca54eb422b | |||
| ee8b74d688 | |||
| 74517856ca | |||
| 76b2741a92 | |||
| 80b7f5fcbf | |||
| 7bca6cdea7 | |||
| fb3730a9c0 | |||
| 3bb7b3722c | |||
| f5e7c705db | |||
| b20a32f2fd | |||
| 4b96bb5d8f | |||
| ed0869aa0c | |||
| 832393b07c | |||
| 8f8a68229c | |||
| 8e90063258 | |||
| 31a0652c58 | |||
| 90652a741d | |||
| ff188450e6 | |||
| d7b743a896 | |||
| cb7d51dbe4 | |||
| d8c2929163 | |||
| c0ee987e8b | |||
| dc6b211227 | |||
| 8b1e971f29 | |||
| 360d185e3b | |||
| 6dcb9bb664 | |||
| edc7603d2a | |||
| 616510aca2 | |||
| cbfc692e24 | |||
| 758974f5aa | |||
| a6e8cfe35f | |||
| 44c588f122 | |||
| e543ff0578 | |||
| 68fbe98b1d | |||
| 9b8f1109e6 | |||
| 10922a194c | |||
| f3d2f4af01 | |||
| 82b310f666 | |||
| 9fb07d886e | |||
| 944835eefc | |||
| 34f0fb8f21 | |||
| 8e855156c8 | |||
| 08f181115b | |||
| 7679f40b2b | |||
| 0b0a37aaf7 | |||
| 4f4311ba57 | |||
| 42caceb799 | |||
| e5bad195b6 | |||
| 26fc2bd071 | |||
| a74e834b33 | |||
| 855c972156 | |||
| bc3ae8ca51 | |||
| ca18112041 | |||
| 590bd6237d | |||
| 18e33a0957 | |||
| 9f2c9636f0 | |||
| 74998790e8 | |||
| d44bf89b98 | |||
| 32289ffce7 | |||
| 549ea93be2 | |||
| 4dffa6f9e8 | |||
| ec0fdfffff | |||
| 5e1a16e821 | |||
| aca73b699c | |||
| 6aab0d66c2 | |||
| 900c7e0257 | |||
| 40854cec0e | |||
| 63d828d5ff | |||
| aee7680a6c | |||
| 1f69680d91 | |||
| efd3cb115b | |||
| d163a72d49 | |||
| 14f3a22f3d | |||
| 86d7cf5d96 | |||
| c7ad5efbed | |||
| 4a01f322ff | |||
| dc8fd0996d | |||
| 53ec5d2c19 | |||
| 11193d2cda | |||
| 878a795be1 | |||
| 5742ba2ef1 | |||
| e1a8e53d07 | |||
| 2bc6e5a856 | |||
| 5b70983692 | |||
| 6d6f6f384e | |||
| cf7ad330e9 | |||
| 0336fdbd54 | |||
| bc07efc076 | |||
| b6f1748bb3 | |||
| 3335ab3918 | |||
| 4dece7334e | |||
| d66f7da2d7 | |||
| 2205149034 | |||
| e685e5ac14 | |||
| c9e751d896 | |||
| 6704e1a87f | |||
| 9377241c58 | |||
| e704e71ede | |||
| 490d6359b9 | |||
| 2086add8e1 | |||
| 1ae43f5485 | |||
| dfea8b306c | |||
| 9ea2c4182a | |||
| d686d608c1 | |||
| 83f32f390c | |||
| 352b73d307 | |||
| e7526f9a87 | |||
| 5f17993a9f | |||
| eced442053 | |||
| cc80649014 | |||
| ae232054f7 | |||
| e8c96a8a20 | |||
| 382477c622 | |||
| 8b4253cda4 | |||
| 2f9b10e379 | |||
| 5d62345cbd | |||
| 79a354bf0e | |||
| c6499cf5db | |||
| e83ca5e91d | |||
| a9ae86eefd | |||
| 931de12072 | |||
| e3f77cd410 | |||
| 1322e0bc73 | |||
| 3cc653b6ff | |||
| f907b58d17 | |||
| 2681461992 | |||
| f3d5d4afdd | |||
| 3be6d5c5de | |||
| 6f0a1ade01 | |||
| b567e4d521 | |||
| c60796aa4f | |||
| 7151f9a131 | |||
| 1eb26b439a | |||
| 015b93b474 | |||
| 0354345963 | |||
| 75ab3d9e8b | |||
| bffbdad9c0 | |||
| 429625e311 | |||
| 1c9e96c89a | |||
| f84b66b985 | |||
| 652c1d4006 | |||
| c0635f222d | |||
| 16ae81abb3 | |||
| 4c5b4cd99f | |||
| 7a0d75a5c4 | |||
| 3cf424d929 | |||
| ac59a65d8d | |||
| d82522304c | |||
| c828deee35 | |||
| ec89d2c22e | |||
| 15d4e114e0 | |||
| cc350cf279 | |||
| a8daa38e83 | |||
| 8165ec66e9 | |||
| f7b971ecb7 | |||
| 139d356065 | |||
| 51004e42f4 | |||
| bab97f91cc | |||
| 11b72c294b | |||
| 43a622cadf | |||
| e3e63fb1b8 | |||
| 68fa45dea0 | |||
| b88d3b13ac | |||
| 0881fc8aa9 | |||
| 54efd32f7a | |||
| 5ff61ae561 | |||
| 513e68a04a | |||
| 4901ffd935 | |||
| 9c24a39156 | |||
| f3b57c20af | |||
| bc14a841cb | |||
| 2925d63c44 | |||
| e9a1c3032d | |||
| 233ebb3e09 | |||
| 20e2dddc0b | |||
| 41b30e6ac6 | |||
| d451d2f548 | |||
| b6aa01a572 | |||
| 284cda1fca | |||
| 07470efc0b | |||
| c401e3d24b | |||
| 2c73f74112 | |||
| 5e64bd6256 | |||
| 2a5903cd9b | |||
| df3eaf0e03 | |||
| e400d49af6 | |||
| 8204577fba | |||
| becc0232b4 | |||
| ab0426d620 | |||
| b2e0c2606f | |||
| aeadec40b7 | |||
| 30b5adde17 | |||
| 7774a43762 | |||
| b64a30f44b | |||
| 296630d484 | |||
| 72bd0c583f | |||
| e55da55e04 | |||
| eff4b899bb | |||
| 1afbcb04db | |||
| 696b86ab7d | |||
| 6eb8bf3d39 | |||
| 0e66adbca1 | |||
| 1ae9749429 | |||
| 067e9c308d | |||
| 0b4ff7b859 | |||
| f1aea810cb | |||
| b0dddb6d95 | |||
| 34dbee0693 | |||
| 9a1b3471fd | |||
| b89d4a7f20 | |||
| 6170151cbc | |||
| 7dee29f70a | |||
| 3065ae1f01 | |||
| 808517dd74 | |||
| ba65231f6b | |||
| 1c77e087a7 | |||
| 17308e821f | |||
| 26fe4c05e1 | |||
| 89fa83bcc2 | |||
| 894bf45480 | |||
| e9fde0051f | |||
| 1971faa81e | |||
| bda0a73c63 | |||
| a678d0d710 | |||
| ecb7cd6b84 | |||
| 6baceedea4 | |||
| 397ae3bafd | |||
| 132ecee665 | |||
| 032b5a6d65 | |||
| 884051fae1 | |||
| f7c7791b6c | |||
| 98496dfa60 | |||
| d5c3a4036c | |||
| 81efc7778a | |||
| 3f4c82b39b | |||
| 8d8fa155f7 | |||
| 39f355e71d | |||
| 5b3b0ff836 | |||
| 795a9eea60 | |||
| edae328ca6 | |||
| 0bcd5e5795 | |||
| 5a69b163a3 | |||
| e817f68f8e | |||
| ef148d372d | |||
| fd4c15517f | |||
| cd83666b72 | |||
| c2a80092d7 | |||
| f74d1060d4 | |||
| bce560d05f | |||
| 85f5b8849e | |||
| 492ce600a4 | |||
| 77b285c8ce | |||
| 856d03dbe2 | |||
| 3944d8abc9 | |||
| f88f6a053b | |||
| 76cb7cf54a | |||
| 47e4ebb32a | |||
| debc94ff49 | |||
| 6fc662188f | |||
| 882c766493 | |||
| af74d2a746 | |||
| f4f3f52fd4 | |||
| 560f6f87e5 | |||
| ab2fdfb9cc | |||
| 819bdf4372 | |||
| ee3533baeb | |||
| a53dd998b9 | |||
| 3aa5c1885f | |||
| dbf74a4be1 | |||
| 930c6acb33 | |||
| 30a5c8bb55 | |||
| c249ac0506 | |||
| 3406915b51 | |||
| 5087244ca6 | |||
| 08a9d66ab3 | |||
| 91a71b45a7 | |||
| 81705edb0f | |||
| bebdc54d24 | |||
| 3c0d050e97 | |||
| 3fe8851e29 | |||
| cbd39e65e2 | |||
| 44e9a173e6 | |||
| c697aa450b | |||
| f9871a21ad | |||
| 975034486c | |||
| f865a0ae23 | |||
| 99e8eac2c1 | |||
| 1c9a7250a4 | |||
| 528f59e188 | |||
| a70ed9c644 | |||
| 6952016bf9 | |||
| 024c4d357a | |||
| 35f9b79f87 | |||
| 1ecb58058a | |||
| b1c2833b5d | |||
| 5d1a2ed968 | |||
| e097f88d56 | |||
| 4a800adffc | |||
| 64e3e17143 | |||
| f22c904352 | |||
| 8147527437 | |||
| be0e058807 | |||
| 83ad0d5fad | |||
| 57c0953c39 | |||
| a5436c92d1 | |||
| ee81d1d880 | |||
| c36efec4b2 | |||
| e332320108 | |||
| 4cc29184c2 | |||
| ba5e4b613f | |||
| f941123519 | |||
| 73e0498768 | |||
| 5f153eef7f | |||
| 4e306a7d76 | |||
| cb76ad3206 | |||
| 59a2de7408 | |||
| 0ff59bc60e | |||
| 826b72c499 | |||
| 52f9060b3b | |||
| a81891053e | |||
| 8e286d44fc | |||
| 21022b4fa4 | |||
| ce758adca3 | |||
| caee430761 | |||
| 6992afeb38 | |||
| 6313b58ad6 | |||
| d3e03c51bf | |||
| 615f216ef6 | |||
| 1a0ce67155 | |||
| 6dd5c7d733 | |||
| 90ee5e097a | |||
| 7a3db2d176 | |||
| 3f704cb1f1 | |||
| e00219f459 | |||
| aaf3142e9a | |||
| d82b149f29 | |||
| 4f3117aea0 | |||
| af5ed5a118 | |||
| ea72beb2f7 | |||
| 7f03666f96 | |||
| 25bb3f77fa | |||
| 0772739cf1 | |||
| 4c42f5dae0 | |||
| 26906f383c | |||
| c5162f5483 | |||
| 7e02f1254e | |||
| 2836025402 | |||
| fd438cb8e0 | |||
| 8fd12d8b7e | |||
| 5e5741edd3 | |||
| 9fbda137cb | |||
| f61ee3ff4b | |||
| f7bef5e09b | |||
| 87d3d38552 | |||
| ea013f3ca3 | |||
| 2179685dd2 | |||
| a4583fdbc1 | |||
| e2294a769a | |||
| 98f4e60b90 | |||
| f735c9bdc2 | |||
| f17b13655b | |||
| 498d2c9db1 | |||
| e0e9321ea9 | |||
| 18fde2b9cb | |||
| 20b2e11f21 | |||
| 02bc093b55 | |||
| 9e1330184c | |||
| fa78c24a16 | |||
| ea4ade7350 | |||
| e16130a02c | |||
| c800fb790d | |||
| 0e58f1bad4 | |||
| e71789bab0 | |||
| c3360d8c43 | |||
| 798db3b5c7 | |||
| 8aaca0509c | |||
| 4920c6b00b | |||
| 086e609c3d | |||
| 2921d47fb3 | |||
| 8bb807f170 | |||
| 3e0c598500 | |||
| c659b46d5e | |||
| 255a7d6f06 | |||
| b934914c59 | |||
| cae3be6bac | |||
| d9a6b2aec2 | |||
| 667fedd9a9 | |||
| c8d1c1f1a4 | |||
| 662a6d24e7 | |||
| 6cc534182a | |||
| 20cde51b43 | |||
| e73d2a32dc | |||
| 0008991f02 | |||
| a44c106f62 | |||
| 21b6b5efbb | |||
| 3ade85bc8d | |||
| 0890594f75 | |||
| 01892ab98f | |||
| 4aca6ba294 | |||
| 3a2b960f62 | |||
| 03459723b3 | |||
| d9ff3c4485 | |||
| 5ba4900170 | |||
| e51316a932 | |||
| 814e54af9b | |||
| 05ee635420 | |||
| 29360b1aef | |||
| 6537f9fa15 | |||
| a0a368f47b | |||
| d9f0c8e1f3 | |||
| 93bd2c73ff | |||
| 55b2c4dbf4 | |||
| 737a4ce925 | |||
| a20a6e0787 | |||
| 7aa3892ba3 | |||
| 695493fc3d | |||
| 42ebf0eca5 | |||
| 68c0be1097 | |||
| 7acd057c86 | |||
| 3024a7c569 | |||
| 4218664d88 | |||
| 81281f7e74 | |||
| a99377c1ec | |||
| dc8822b421 | |||
| 0f06d9c9e8 | |||
| 8d13e0ea78 | |||
| 1bde100ff7 | |||
| 482cf659a7 | |||
| d22d32697f | |||
| 546b2e3b91 | |||
| 20bb82a011 | |||
| 25ebf99b9a | |||
| 72eee002aa | |||
| f87bd91d61 | |||
| f1e8495dc9 | |||
| 9e1a5eb1bd | |||
| d3f69a11f2 | |||
| e1f6d82a34 | |||
| 67f717b56a | |||
| 87ba1e18bf | |||
| 8aab764c33 | |||
| b425c54071 | |||
| ebbfaeaeb7 | |||
| eda65f5fa8 | |||
| 0402c03468 | |||
| a508f2e716 | |||
| 59e34dcbec | |||
| b9b19cb5fb | |||
| 6c41354da5 | |||
| 8184ed64e7 | |||
| 24f02e72d0 | |||
| 91f6c534b9 | |||
| c8375c151c | |||
| 73681d08c5 | |||
| 3620887a22 | |||
| 5156229da7 | |||
| 8a306eecb6 | |||
| ba5ad70b68 | |||
| cb71f2f207 | |||
| 1db236c7fd | |||
| 0f3d14df38 | |||
| 030a251090 | |||
| 05b2b3c26e | |||
| 0e9b547f94 | |||
| 39835fe82a | |||
| f6d0e17c8b | |||
| 5475359d00 | |||
| 4ecca01392 | |||
| 03fa632526 | |||
| a835ba0715 | |||
| e0b0fb27b0 | |||
| 2ad05e34ea | |||
| 8e40482451 | |||
| a9e4b1c56a | |||
| 1290228fbf | |||
| 5e14ae9698 | |||
| 658eb1d338 | |||
| 89433afb47 | |||
| 62d4bd7c1d | |||
| 5bd94f118d | |||
| 4c0fd6e791 | |||
| 0476b6c72d | |||
| 0e0432d194 | |||
| 39d9aba576 | |||
| 10aec91075 | |||
| afcdfd85a7 | |||
| c2fae3768c | |||
| 4dd049ee8f | |||
| f73c190da8 | |||
| fa7e842c8c | |||
| ce32dfd077 | |||
| 6b145b2830 | |||
| 2d1bcbd222 | |||
| 8ec1016ccf | |||
| e82b8f6fda | |||
| 691c492d1e | |||
| 0c835b7c30 | |||
| c998234dec | |||
| 65554943e0 | |||
| 3351da9906 | |||
| 94223ca794 | |||
| ba4974749c | |||
| 44717f927c | |||
| 8463bd59b7 | |||
| 2139789c4c | |||
| 71b020eb14 | |||
| eb13dec265 | |||
| e3d2f338de | |||
| aeb029ea6e | |||
| 651cc5c838 | |||
| b8ccaae403 | |||
| 053a764cf2 | |||
| fd44ee6aa6 | |||
| 893d178439 | |||
| 13735050da | |||
| eb0708d48d | |||
| ac8bd587dc | |||
| 639f59839e | |||
| 09c5b9df1d | |||
| e7f4e29dd1 | |||
| 6b0a20eac0 | |||
| 3781682a89 | |||
| ce1404df79 | |||
| f00a1ab517 | |||
| 9f87598772 | |||
| b5b65d0846 | |||
| 1a1be2d542 | |||
| cb81de5a74 | |||
| 022dce2d1b | |||
| 2a889f03fc | |||
| ae610bbe85 | |||
| f8c8dcde13 | |||
| 60f59ae851 | |||
| b649932dbf | |||
| b0c9df3ff4 | |||
| b211625e53 | |||
| 5bede7bddb | |||
| 416033e8e5 | |||
| 1882445b40 | |||
| a95a3fa5c9 | |||
| d6a54a98b2 | |||
| dffb2c1994 | |||
| 62936b7e01 | |||
| cd74ebe9cc | |||
| 9a6efd43e1 | |||
| 1280b3d379 | |||
| 129c61a742 | |||
| 2f3196c18c | |||
| 678a64f97c | |||
| 6b797420d5 | |||
| 58ddffe3dd | |||
| aaf776db9e | |||
| e973c15087 | |||
| 339cf3f2e2 | |||
| d92db68597 | |||
| 966051ff4a | |||
| 17891f7a1d | |||
| 7ed755ac61 | |||
| 2f0ff4e557 | |||
| 7fdb5e98a2 | |||
| 8b5564629a | |||
| 9e83a7bcb3 | |||
| 10c0bba9cc | |||
| 85a9d9e9ec | |||
| 15e5eabb91 | |||
| e5a17b96a3 | |||
| 3d56494652 | |||
| 9ffa5db667 | |||
| 4a60c3b71e | |||
| 43e6006306 | |||
| b5fb7b7ace | |||
| a5bd97da11 | |||
| 7d37cebfdf | |||
| b12043a612 | |||
| 6c5ac9e269 | |||
| c45c80f083 | |||
| 352463dfeb | |||
| 67737ea0b2 | |||
| a24eada8b1 | |||
| 1db8b322da | |||
| 6fdeca7c56 | |||
| 16e3692e71 | |||
| 16f3237983 | |||
| 11ba59b690 | |||
| a565db58c5 | |||
| d8d816236c | |||
| e26778c599 | |||
| c59ed0bbb7 | |||
| 3b3de58e5e | |||
| e478c4db2e | |||
| 4ad48c79dd | |||
| cba8c95c83 | |||
| dda71df996 | |||
| 1edc1e163e | |||
| 65b1371e5d | |||
| 958d8a0327 | |||
| 8fb550893d | |||
| df61c99b74 | |||
| 8a6c4887fe | |||
| 6b63c3bf8c | |||
| a556ec328a | |||
| 5f0982a345 | |||
| 4da1dd67eb | |||
| 7acc21e397 | |||
| 5888292e42 | |||
| d6fad425c3 | |||
| 7583f305fc | |||
| 9f8de0df01 | |||
| edb5d5df47 | |||
| 9dcd1c7d64 | |||
| b63fab46b4 | |||
| 0f5c561afd | |||
| 86e0315feb | |||
| ec83776256 | |||
| 2e5a6123bb | |||
| a8ca5d8e19 | |||
| 43feb1d2fd | |||
| 94894b1e30 | |||
| d8ec8bd506 | |||
| 3e21d887c1 | |||
| 7caa9eb9da | |||
| 615f84e567 | |||
| 02c1eef3be | |||
| 9be60cb45d | |||
| 4596a11da2 | |||
| b3bc352c57 | |||
| 01ce6111ff | |||
| 28f48cbec1 | |||
| b22bc2737e | |||
| 60d5780c1c | |||
| c8db8d087e | |||
| 9e673bb891 | |||
| 1ae9e9b676 | |||
| 22c4fa29f1 | |||
| ef62b01dd1 | |||
| eeee63186d | |||
| be8744176c | |||
| da1926d723 | |||
| d058e12cb5 | |||
| cd64630661 | |||
| 0984af1676 | |||
| 058b337b00 | |||
| 315ad0e071 | |||
| 5f81e01f43 | |||
| 33869dbb61 | |||
| 61be2ea048 | |||
| 8a1347d2c8 | |||
| 978ef352d0 | |||
| a8972f54c4 | |||
| 0cd3e17db7 | |||
| 1c1bdb4f4a | |||
| 045f65608a | |||
| cf6d30706b | |||
| 124b511037 | |||
| fc93c63a19 | |||
| b1180d9377 | |||
| 865e3a9f3c | |||
| 3f32f0c2d8 | |||
| 5e70883ef6 | |||
| fcdaa4a59e | |||
| 9dab855f8d | |||
| 53a9bdb3af | |||
| f51d227dc7 |
@@ -17,8 +17,6 @@ include/fp_lib_table_lexer.h
|
||||
include/lib_table_lexer.h
|
||||
include/netlist_lexer.h
|
||||
include/page_layout_reader_lexer.h
|
||||
eeschema/cmp_library_lexer.h
|
||||
eeschema/cmp_library_keywords.*
|
||||
eeschema/dialogs/dialog_bom_cfg_keywords.cpp
|
||||
eeschema/dialogs/dialog_bom_cfg_lexer.h
|
||||
common/template_fieldnames_keywords.cpp
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ build_doxygen_docker:
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_JOB_NAME == "doxygen"
|
||||
tags:
|
||||
- docker
|
||||
- gitlab-org-docker
|
||||
before_script:
|
||||
- docker info
|
||||
- docker login -u gitlab-ci-token -p "$CI_JOB_TOKEN" "$CI_REGISTRY"
|
||||
|
||||
+1
-19
@@ -15,25 +15,7 @@ macos_build:
|
||||
- cd build/macos
|
||||
- cmake
|
||||
-G Ninja
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
-DDEFAULT_INSTALL_PATH=/Library/Application\ Support /kicad
|
||||
-DOCC_INCLUDE_DIR=/opt/homebrew/Cellar/opencascade/7.7.2_2/include/opencascade
|
||||
-DOCC_LIBRARY_DIR=/opt/homebrew/Cellar/opencascade/7.7.2_2/Lib
|
||||
-DCMAKE_INSTALL_PREFIX=/Users/ci/kicad-mac-builder/build/kicad-dest
|
||||
-DCMAKE_C_COMPILER=/usr/bin/clang
|
||||
-DCMAKE_CXX_COMPILER=/usr/bin/clang++
|
||||
-DwxWidgets_CONFIG_EXECUTABLE=/Users/ci/kicad-mac-builder/build/wxwidgets-dest/bin/wx-config
|
||||
-DKICAD_BUILD_I18N=ON
|
||||
-DKICAD_SCRIPTING_WXPYTHON=ON
|
||||
-DKICAD_BUILD_PNS_DEBUG_TOOL=ON
|
||||
-DPYTHON_EXECUTABLE=/Users/ci/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework/Versions/Current/bin/python3
|
||||
-DPYTHON_INCLUDE_DIR=/Users/ci/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework/Versions/Current/include/python3.9/
|
||||
-DPYTHON_LIBRARY=/Users/ci/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework/Versions/Current/lib/libpython3.9.dylib
|
||||
-DPYTHON_SITE_PACKAGE_PATH=/Users/ci/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework/Versions/Current/lib/python3.9/site-packages
|
||||
-DPYTHON_FRAMEWORK=/Users/ci/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework
|
||||
-DNGSPICE_INCLUDE_DIR=/Users/ci/kicad-mac-builder/build/ngspice-dest/include
|
||||
-DNGSPICE_LIBRARY=/Users/ci/kicad-mac-builder/build/ngspice-dest/lib/libngspice.dylib
|
||||
-DKICAD_USE_3DCONNEXION=ON
|
||||
-DCMAKE_TOOLCHAIN_FILE=/Users/ci/kicad-mac-builder/toolchain/kicad-mac-builder.cmake
|
||||
../../
|
||||
- cmake --build . 2>&1 | tee compilation_log.txt
|
||||
- cd ../../
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
stage: test
|
||||
when: on_success
|
||||
variables:
|
||||
BOOST_TEST_LOGGER: 'JUNIT,warning,test_results.${TEST}.xml:HRF,warning'
|
||||
BOOST_TEST_LOGGER: 'JUNIT,warning,test_results.${TEST}.xml:HRF,message'
|
||||
CTEST_OUTPUT_ON_FAILURE: 1
|
||||
script:
|
||||
- cd build/linux/qa
|
||||
|
||||
@@ -236,7 +236,7 @@ void S3D_PLUGIN_MANAGER::loadPlugins( void )
|
||||
char const* cp = pp->GetFileFilter( i );
|
||||
|
||||
if( cp )
|
||||
addFilterString( wxString::FromUTF8Unchecked( cp ) );
|
||||
addFilterString( cp );
|
||||
}
|
||||
|
||||
addExtensionMap( pp );
|
||||
@@ -328,7 +328,7 @@ void S3D_PLUGIN_MANAGER::checkPluginName( const wxString& aPath,
|
||||
++bl;
|
||||
}
|
||||
|
||||
// prevent loading non-plugin dlls
|
||||
// prevent loading non-plugin dlls
|
||||
if( wxGetEnv( wxT( "KICAD_RUN_FROM_BUILD_DIR" ), nullptr ) )
|
||||
{
|
||||
if( !path.GetName().StartsWith( "s3d_plugin" )
|
||||
@@ -416,7 +416,7 @@ void S3D_PLUGIN_MANAGER::addExtensionMap( KICAD_PLUGIN_LDR_3D* aPlugin )
|
||||
wxString ws;
|
||||
|
||||
if( cp )
|
||||
ws = wxString::FromUTF8Unchecked( cp );
|
||||
ws = wxString( cp );
|
||||
|
||||
if( !ws.empty() )
|
||||
{
|
||||
|
||||
@@ -476,7 +476,7 @@ SGVECTOR S3D::CalcTriNorm( const SGPOINT& p1, const SGPOINT& p2, const SGPOINT&
|
||||
|
||||
// normal
|
||||
tri = glm::cross( pts[1] - pts[0], pts[2] - pts[0] );
|
||||
glm::normalize( tri );
|
||||
(void)glm::normalize( tri );
|
||||
|
||||
return SGVECTOR( tri.x, tri.y, tri.z );
|
||||
}
|
||||
|
||||
@@ -344,7 +344,7 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
|
||||
BOX2I bbbox;
|
||||
|
||||
if( m_board )
|
||||
bbbox = m_board->ComputeBoundingBox( !m_board->IsFootprintHolder() && haveOutline );
|
||||
bbbox = m_board->ComputeBoundingBox( !m_board->IsFootprintHolder() && haveOutline, false );
|
||||
|
||||
// Gives a non null size to avoid issues in zoom / scale calculations
|
||||
if( ( bbbox.GetWidth() == 0 ) && ( bbbox.GetHeight() == 0 ) )
|
||||
@@ -698,6 +698,10 @@ std::map<int, COLOR4D> BOARD_ADAPTER::GetLayerColors() const
|
||||
}
|
||||
|
||||
colors[ LAYER_3D_COPPER_BOTTOM ] = colors[ LAYER_3D_COPPER_TOP ];
|
||||
|
||||
for( const auto& [layer, val] : m_ColorOverrides )
|
||||
colors[layer] = val;
|
||||
|
||||
return colors;
|
||||
}
|
||||
|
||||
@@ -708,6 +712,8 @@ void BOARD_ADAPTER::SetLayerColors( const std::map<int, COLOR4D>& aColors )
|
||||
|
||||
for( const auto& [ layer, color ] : aColors )
|
||||
settings->SetColor( layer, color );
|
||||
|
||||
Pgm().GetSettingsManager().SaveColorSettings( settings, "3d_viewer" );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -430,6 +430,8 @@ public:
|
||||
SFVEC4F m_ECO1Color;
|
||||
SFVEC4F m_ECO2Color;
|
||||
|
||||
std::map<int, COLOR4D> m_ColorOverrides; ///< allows to override color scheme colors
|
||||
|
||||
private:
|
||||
BOARD* m_board;
|
||||
S3D_CACHE* m_3dModelManager;
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "../3d_rendering/raytracing/shapes2D/round_segment_2d.h"
|
||||
#include "../3d_rendering/raytracing/shapes2D/triangle_2d.h"
|
||||
#include <board_adapter.h>
|
||||
#include <board.h>
|
||||
#include <footprint.h>
|
||||
#include <pad.h>
|
||||
#include <pcb_text.h>
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "../3d_rendering/raytracing/shapes2D/filled_circle_2d.h"
|
||||
#include "raytracing/shapes2D/triangle_2d.h"
|
||||
#include <board_design_settings.h>
|
||||
#include <board.h>
|
||||
#include <footprint.h>
|
||||
#include <pad.h>
|
||||
#include <pcb_text.h>
|
||||
@@ -874,14 +875,15 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
|
||||
}
|
||||
|
||||
// Add via tech layers
|
||||
if( ( layer == F_Mask || layer == B_Mask ) && !m_board->GetTentVias() )
|
||||
if( ( layer == F_Mask || layer == B_Mask ) )
|
||||
{
|
||||
int maskExpansion = GetBoard()->GetDesignSettings().m_SolderMaskExpansion;
|
||||
|
||||
for( PCB_TRACK* track : m_board->Tracks() )
|
||||
{
|
||||
if( track->Type() == PCB_VIA_T
|
||||
&& static_cast<const PCB_VIA*>( track )->FlashLayer( layer ) )
|
||||
&& static_cast<const PCB_VIA*>( track )->FlashLayer( layer )
|
||||
&& !static_cast<const PCB_VIA*>( track )->IsTented( layer ) )
|
||||
{
|
||||
createViaWithMargin( track, layerContainer, maskExpansion );
|
||||
}
|
||||
@@ -965,14 +967,15 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
|
||||
}
|
||||
|
||||
// NON-TENTED VIAS
|
||||
if( ( layer == F_Mask || layer == B_Mask ) && !m_board->GetTentVias() )
|
||||
if( ( layer == F_Mask || layer == B_Mask ) )
|
||||
{
|
||||
int maskExpansion = GetBoard()->GetDesignSettings().m_SolderMaskExpansion;
|
||||
|
||||
for( PCB_TRACK* track : m_board->Tracks() )
|
||||
{
|
||||
if( track->Type() == PCB_VIA_T
|
||||
&& static_cast<const PCB_VIA*>( track )->FlashLayer( layer ) )
|
||||
&& static_cast<const PCB_VIA*>( track )->FlashLayer( layer )
|
||||
&& !static_cast<const PCB_VIA*>( track )->IsTented( layer ) )
|
||||
{
|
||||
track->TransformShapeToPolygon( *layerPoly, layer, maskExpansion, maxError,
|
||||
ERROR_INSIDE );
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <3d_rendering/opengl/render_3d_opengl.h>
|
||||
#include <3d_viewer_id.h>
|
||||
#include <advanced_config.h>
|
||||
#include <build_version.h>
|
||||
#include <board.h>
|
||||
#include <reporter.h>
|
||||
#include <gal/opengl/gl_context_mgr.h>
|
||||
@@ -72,6 +73,11 @@ BEGIN_EVENT_TABLE( EDA_3D_CANVAS, HIDPI_GL_3D_CANVAS )
|
||||
EVT_MOTION( EDA_3D_CANVAS::OnMouseMove )
|
||||
EVT_MAGNIFY( EDA_3D_CANVAS::OnMagnify )
|
||||
|
||||
// touch gesture events
|
||||
EVT_GESTURE_ZOOM( wxID_ANY, EDA_3D_CANVAS::OnZoomGesture )
|
||||
EVT_GESTURE_PAN( wxID_ANY, EDA_3D_CANVAS::OnPanGesture )
|
||||
EVT_GESTURE_ROTATE( wxID_ANY, EDA_3D_CANVAS::OnRotateGesture )
|
||||
|
||||
// other events
|
||||
EVT_ERASE_BACKGROUND( EDA_3D_CANVAS::OnEraseBackground )
|
||||
EVT_CUSTOM(wxEVT_REFRESH_CUSTOM_COMMAND, ID_CUSTOM_EVENT_1, EDA_3D_CANVAS::OnRefreshRequest )
|
||||
@@ -143,6 +149,10 @@ EDA_3D_CANVAS::EDA_3D_CANVAS( wxWindow* aParent, const wxGLAttributes& aGLAttrib
|
||||
wxASSERT( a3DCachePointer != nullptr );
|
||||
m_boardAdapter.Set3dCacheManager( a3DCachePointer );
|
||||
|
||||
#ifdef __WXMSW__
|
||||
EnableTouchEvents( wxTOUCH_ZOOM_GESTURE | wxTOUCH_PAN_GESTURES | wxTOUCH_ROTATE_GESTURE );
|
||||
#endif
|
||||
|
||||
const wxEventType events[] =
|
||||
{
|
||||
// Binding both EVT_CHAR and EVT_CHAR_HOOK ensures that all key events,
|
||||
@@ -229,6 +239,9 @@ bool EDA_3D_CANVAS::initializeOpenGL()
|
||||
From_UTF8( (char*) glewGetString( GLEW_VERSION ) ) );
|
||||
}
|
||||
|
||||
SetOpenGLInfo( (const char*) glGetString( GL_VENDOR ), (const char*) glGetString( GL_RENDERER ),
|
||||
(const char*) glGetString( GL_VERSION ) );
|
||||
|
||||
wxString version = From_UTF8( (char *) glGetString( GL_VERSION ) );
|
||||
|
||||
wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::%s OpenGL version string %s." ),
|
||||
@@ -627,6 +640,75 @@ void EDA_3D_CANVAS::OnMagnify( wxMouseEvent& event )
|
||||
}
|
||||
|
||||
|
||||
void EDA_3D_CANVAS::OnZoomGesture( wxZoomGestureEvent& aEvent )
|
||||
{
|
||||
SetFocus();
|
||||
|
||||
if( aEvent.IsGestureStart() )
|
||||
{
|
||||
m_gestureLastZoomFactor = 1.0;
|
||||
m_camera.SetCurMousePosition( aEvent.GetPosition() );
|
||||
}
|
||||
|
||||
if( m_camera_is_moving )
|
||||
return;
|
||||
|
||||
restart_editingTimeOut_Timer();
|
||||
|
||||
m_camera.Pan( aEvent.GetPosition() );
|
||||
m_camera.SetCurMousePosition( aEvent.GetPosition() );
|
||||
|
||||
m_camera.Zoom( aEvent.GetZoomFactor() / m_gestureLastZoomFactor );
|
||||
|
||||
m_gestureLastZoomFactor = aEvent.GetZoomFactor();
|
||||
|
||||
DisplayStatus();
|
||||
Request_refresh();
|
||||
}
|
||||
|
||||
|
||||
void EDA_3D_CANVAS::OnPanGesture( wxPanGestureEvent& aEvent )
|
||||
{
|
||||
SetFocus();
|
||||
|
||||
if( aEvent.IsGestureStart() )
|
||||
m_camera.SetCurMousePosition( aEvent.GetPosition() );
|
||||
|
||||
if( m_camera_is_moving )
|
||||
return;
|
||||
|
||||
m_camera.Pan( aEvent.GetPosition() );
|
||||
m_camera.SetCurMousePosition( aEvent.GetPosition() );
|
||||
|
||||
DisplayStatus();
|
||||
Request_refresh();
|
||||
}
|
||||
|
||||
|
||||
void EDA_3D_CANVAS::OnRotateGesture( wxRotateGestureEvent& aEvent )
|
||||
{
|
||||
SetFocus();
|
||||
|
||||
if( aEvent.IsGestureStart() )
|
||||
{
|
||||
m_gestureLastAngle = 0;
|
||||
m_camera.SetCurMousePosition( aEvent.GetPosition() );
|
||||
|
||||
// We don't want to process the first angle
|
||||
return;
|
||||
}
|
||||
|
||||
if( m_camera_is_moving )
|
||||
return;
|
||||
|
||||
m_camera.RotateScreen( m_gestureLastAngle - aEvent.GetRotationAngle() );
|
||||
m_gestureLastAngle = aEvent.GetRotationAngle();
|
||||
|
||||
DisplayStatus();
|
||||
Request_refresh();
|
||||
}
|
||||
|
||||
|
||||
void EDA_3D_CANVAS::OnMouseMove( wxMouseEvent& event )
|
||||
{
|
||||
if( m_3d_render && m_3d_render->IsReloadRequestPending() )
|
||||
|
||||
@@ -237,6 +237,10 @@ private:
|
||||
void OnResize( wxSizeEvent& event );
|
||||
void OnTimerTimeout_Redraw( wxTimerEvent& event );
|
||||
|
||||
void OnZoomGesture( wxZoomGestureEvent& event );
|
||||
void OnPanGesture( wxPanGestureEvent& event );
|
||||
void OnRotateGesture( wxRotateGestureEvent& event );
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
/**
|
||||
@@ -324,6 +328,10 @@ private:
|
||||
bool m_render3dmousePivot = false; // Render the 3dmouse pivot
|
||||
SFVEC3F m_3dmousePivotPos; // The position of the 3dmouse pivot
|
||||
|
||||
///< Used to track gesture events.
|
||||
double m_gestureLastZoomFactor = 1.0;
|
||||
double m_gestureLastAngle = 0.0;
|
||||
|
||||
/**
|
||||
* Trace mask used to enable or disable the trace output of this class.
|
||||
* The debug output can be turned on by setting the WXTRACE environment variable to
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2015-2016 Mario Luzeiro <mrluzeiro@ua.pt>
|
||||
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2024 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
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "../3d_cache/3d_cache.h"
|
||||
#include <wx/dcclient.h>
|
||||
#include <base_units.h>
|
||||
#include <build_version.h>
|
||||
#include <gal/opengl/gl_context_mgr.h>
|
||||
#include <settings/common_settings.h>
|
||||
#include <pgm_base.h>
|
||||
@@ -102,11 +103,6 @@ EDA_3D_MODEL_VIEWER::EDA_3D_MODEL_VIEWER( wxWindow* aParent, const wxGLAttribute
|
||||
m_BiuTo3dUnits = 1.0;
|
||||
|
||||
m_glRC = nullptr;
|
||||
|
||||
COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
|
||||
|
||||
const DPI_SCALING_COMMON dpi{ settings, this };
|
||||
SetScaleFactor( dpi.GetScaleFactor() );
|
||||
}
|
||||
|
||||
|
||||
@@ -200,6 +196,9 @@ void EDA_3D_MODEL_VIEWER::ogl_initialize()
|
||||
From_UTF8( (char*) glewGetString( GLEW_VERSION ) ) );
|
||||
}
|
||||
|
||||
SetOpenGLInfo( (const char*) glGetString( GL_VENDOR ), (const char*) glGetString( GL_RENDERER ),
|
||||
(const char*) glGetString( GL_VERSION ) );
|
||||
|
||||
glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST );
|
||||
glHint( GL_LINE_SMOOTH_HINT, GL_NICEST );
|
||||
glHint( GL_POLYGON_SMOOTH_HINT, GL_NICEST );
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "render_3d_opengl.h"
|
||||
#include "opengl_utils.h"
|
||||
#include "common_ogl/ogl_utils.h"
|
||||
#include <board.h>
|
||||
#include <footprint.h>
|
||||
#include <3d_math.h>
|
||||
#include <glm/geometric.hpp>
|
||||
|
||||
@@ -1570,10 +1570,6 @@ SFVEC4F RENDER_3D_RAYTRACE_BASE::shadeHit( const SFVEC4F& aBgColor, const RAY& a
|
||||
|
||||
sum_color += add;
|
||||
}
|
||||
else
|
||||
{
|
||||
sum_color += aBgColor;
|
||||
}
|
||||
}
|
||||
|
||||
outColor += (sum_color / SFVEC4F( (float)reflection_number_of_samples) );
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#define _BBOX_3D_H_
|
||||
|
||||
#include <plugins/3dapi/xv3d_types.h> // SFVEC2F
|
||||
#include <glm/mat4x4.hpp>
|
||||
|
||||
struct RAY;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2013 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
* Copyright (C) 2023 CERN
|
||||
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2024 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
|
||||
@@ -54,16 +54,17 @@ void EDA_3D_VIEWER_FRAME::ReCreateMainToolbar()
|
||||
|
||||
// Set up toolbar
|
||||
m_mainToolBar->AddTool( ID_RELOAD3D_BOARD, wxEmptyString,
|
||||
KiScaledBitmap( BITMAPS::import3d, this ), _( "Reload board" ) );
|
||||
KiBitmapBundle( BITMAPS::import3d ),
|
||||
_( "Reload board" ) );
|
||||
|
||||
m_mainToolBar->AddScaledSeparator( this );
|
||||
m_mainToolBar->AddTool( ID_TOOL_SCREENCOPY_TOCLIBBOARD, wxEmptyString,
|
||||
KiScaledBitmap( BITMAPS::copy, this ),
|
||||
KiBitmapBundle( BITMAPS::copy ),
|
||||
_( "Copy 3D image to clipboard" ) );
|
||||
|
||||
m_mainToolBar->AddScaledSeparator( this );
|
||||
m_mainToolBar->AddTool( ID_RENDER_CURRENT_VIEW, wxEmptyString,
|
||||
KiScaledBitmap( BITMAPS::render_mode, this ),
|
||||
KiBitmapBundle( BITMAPS::render_mode ),
|
||||
_( "Render current view using Raytracing" ), wxITEM_CHECK );
|
||||
|
||||
m_mainToolBar->AddScaledSeparator( this );
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <3d_viewer/tools/eda_3d_actions.h>
|
||||
#include <3d_viewer/tools/eda_3d_controller.h>
|
||||
#include <3d_viewer/tools/eda_3d_conditions.h>
|
||||
#include <board.h>
|
||||
#include <advanced_config.h>
|
||||
#include <bitmaps.h>
|
||||
#include <board_design_settings.h>
|
||||
@@ -810,9 +811,6 @@ void EDA_3D_VIEWER_FRAME::loadCommonSettings()
|
||||
|
||||
COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
|
||||
|
||||
const DPI_SCALING_COMMON dpi{ settings, this };
|
||||
m_canvas->SetScaleFactor( dpi.GetScaleFactor() );
|
||||
|
||||
// TODO(JE) use all control options
|
||||
m_boardAdapter.m_MousewheelPanning = settings->m_Input.scroll_modifier_zoom != 0;
|
||||
}
|
||||
|
||||
@@ -382,7 +382,7 @@ EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS() :
|
||||
m_params.emplace_back( new PARAM_LAYER_PRESET_3D( "layer_presets",
|
||||
&m_LayerPresets ) );
|
||||
m_params.emplace_back( new PARAM<wxString>( "current_layer_preset",
|
||||
&m_CurrentPreset, LEGACY_PRESET_FLAG ) );
|
||||
&m_CurrentPreset, FOLLOW_PLOT_SETTINGS ) );
|
||||
|
||||
registerMigration( 0, 1, std::bind( &EDA_3D_VIEWER_SETTINGS::migrateSchema0to1, this ) );
|
||||
|
||||
|
||||
@@ -100,7 +100,6 @@ APPEARANCE_CONTROLS_3D::APPEARANCE_CONTROLS_3D( EDA_3D_VIEWER_FRAME* aParent,
|
||||
{
|
||||
DPI_SCALING_COMMON dpi( nullptr, m_frame );
|
||||
|
||||
int indicatorSize = ConvertDialogToPixels( wxSize( 6, 6 ) ).x / dpi.GetContentScaleFactor();
|
||||
int screenHeight = wxSystemSettings::GetMetric( wxSYS_SCREEN_Y );
|
||||
m_pointSize = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT ).GetPointSize();
|
||||
|
||||
@@ -153,13 +152,13 @@ APPEARANCE_CONTROLS_3D::APPEARANCE_CONTROLS_3D( EDA_3D_VIEWER_FRAME* aParent,
|
||||
KeyNameFromKeyCode( VIEWPORT_SWITCH_KEY ),
|
||||
KeyNameFromKeyCode( VIEWPORT_SWITCH_KEY ) ) );
|
||||
|
||||
if( screenHeight <= 900 && m_pointSize >= indicatorSize )
|
||||
if( screenHeight <= 900 && m_pointSize >= FromDIP( KIUI::c_IndicatorSizeDIP ) )
|
||||
m_pointSize = m_pointSize * 8 / 10;
|
||||
|
||||
m_cbLayerPresets->Bind( wxEVT_CHOICE, &APPEARANCE_CONTROLS_3D::onLayerPresetChanged, this );
|
||||
|
||||
m_toggleGridRenderer = new GRID_BITMAP_TOGGLE_RENDERER( KiBitmap( BITMAPS::visibility ),
|
||||
KiBitmap( BITMAPS::visibility_off ) );
|
||||
m_toggleGridRenderer = new GRID_BITMAP_TOGGLE_RENDERER(
|
||||
KiBitmapBundle( BITMAPS::visibility ), KiBitmapBundle( BITMAPS::visibility_off ) );
|
||||
|
||||
m_frame->Bind( EDA_LANG_CHANGED, &APPEARANCE_CONTROLS_3D::OnLanguageChanged, this );
|
||||
}
|
||||
@@ -521,10 +520,9 @@ void APPEARANCE_CONTROLS_3D::rebuildLayers()
|
||||
}
|
||||
else
|
||||
{
|
||||
BITMAP_TOGGLE* btn_visible = new BITMAP_TOGGLE( m_windowLayers, layer,
|
||||
KiBitmap( BITMAPS::visibility ),
|
||||
KiBitmap( BITMAPS::visibility_off ),
|
||||
aSetting->m_Visible );
|
||||
BITMAP_TOGGLE* btn_visible = new BITMAP_TOGGLE(
|
||||
m_windowLayers, layer, KiBitmapBundle( BITMAPS::visibility ),
|
||||
KiBitmapBundle( BITMAPS::visibility_off ), aSetting->m_Visible );
|
||||
|
||||
btn_visible->Bind( TOGGLE_CHANGED,
|
||||
[this]( wxCommandEvent& aEvent )
|
||||
|
||||
@@ -192,9 +192,6 @@ void PANEL_PREVIEW_3D_MODEL::loadSettings()
|
||||
|
||||
COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
|
||||
|
||||
const DPI_SCALING_COMMON dpi{ settings, this };
|
||||
m_previewPane->SetScaleFactor( dpi.GetScaleFactor() );
|
||||
|
||||
// TODO(JE) use all control options
|
||||
m_boardAdapter.m_MousewheelPanning = settings->m_Input.scroll_modifier_zoom != 0;
|
||||
|
||||
@@ -256,6 +253,10 @@ wxString PANEL_PREVIEW_3D_MODEL::formatScaleValue( double aValue )
|
||||
|
||||
wxString PANEL_PREVIEW_3D_MODEL::formatRotationValue( double aValue )
|
||||
{
|
||||
// Sigh. Did we really need differentiated +/- 0.0?
|
||||
if( aValue == -0.0 )
|
||||
aValue = 0.0;
|
||||
|
||||
return wxString::Format( wxT( "%.2f%s" ),
|
||||
aValue,
|
||||
EDA_UNIT_UTILS::GetText( EDA_UNITS::DEGREES ) );
|
||||
@@ -289,9 +290,11 @@ void PANEL_PREVIEW_3D_MODEL::SetSelectedModel( int idx )
|
||||
yscale->ChangeValue( formatScaleValue( modelInfo.m_Scale.y ) );
|
||||
zscale->ChangeValue( formatScaleValue( modelInfo.m_Scale.z ) );
|
||||
|
||||
xrot->ChangeValue( formatRotationValue( modelInfo.m_Rotation.x ) );
|
||||
yrot->ChangeValue( formatRotationValue( modelInfo.m_Rotation.y ) );
|
||||
zrot->ChangeValue( formatRotationValue( modelInfo.m_Rotation.z ) );
|
||||
// Rotation is stored in the file as postive-is-CW, but we use postive-is-CCW in the GUI
|
||||
// to match the rest of KiCad
|
||||
xrot->ChangeValue( formatRotationValue( -modelInfo.m_Rotation.x ) );
|
||||
yrot->ChangeValue( formatRotationValue( -modelInfo.m_Rotation.y ) );
|
||||
zrot->ChangeValue( formatRotationValue( -modelInfo.m_Rotation.z ) );
|
||||
|
||||
xoff->ChangeValue( formatOffsetValue( modelInfo.m_Offset.x ) );
|
||||
yoff->ChangeValue( formatOffsetValue( modelInfo.m_Offset.y ) );
|
||||
@@ -334,9 +337,11 @@ void PANEL_PREVIEW_3D_MODEL::updateOrientation( wxCommandEvent &event )
|
||||
modelInfo->m_Scale.z = EDA_UNIT_UTILS::UI::DoubleValueFromString(
|
||||
pcbIUScale, EDA_UNITS::UNSCALED, zscale->GetValue() );
|
||||
|
||||
modelInfo->m_Rotation.x = rotationFromString( xrot->GetValue() );
|
||||
modelInfo->m_Rotation.y = rotationFromString( yrot->GetValue() );
|
||||
modelInfo->m_Rotation.z = rotationFromString( zrot->GetValue() );
|
||||
// Rotation is stored in the file as postive-is-CW, but we use postive-is-CCW in the GUI
|
||||
// to match the rest of KiCad
|
||||
modelInfo->m_Rotation.x = -rotationFromString( xrot->GetValue() );
|
||||
modelInfo->m_Rotation.y = -rotationFromString( yrot->GetValue() );
|
||||
modelInfo->m_Rotation.z = -rotationFromString( zrot->GetValue() );
|
||||
|
||||
modelInfo->m_Offset.x = EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, m_userUnits,
|
||||
xoff->GetValue() )
|
||||
@@ -426,10 +431,15 @@ void PANEL_PREVIEW_3D_MODEL::doIncrementScale( wxSpinEvent& event, double aSign
|
||||
else if( spinCtrl == m_spinZscale )
|
||||
textCtrl = zscale;
|
||||
|
||||
double step = SCALE_INCREMENT;
|
||||
|
||||
if( wxGetMouseState().ShiftDown( ) )
|
||||
step = SCALE_INCREMENT_FINE;
|
||||
|
||||
double curr_value = EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, EDA_UNITS::UNSCALED,
|
||||
textCtrl->GetValue() );
|
||||
|
||||
curr_value += ( SCALE_INCREMENT * aSign );
|
||||
curr_value += ( step * aSign );
|
||||
curr_value = std::max( 1/MAX_SCALE, curr_value );
|
||||
curr_value = std::min( curr_value, MAX_SCALE );
|
||||
|
||||
@@ -447,10 +457,15 @@ void PANEL_PREVIEW_3D_MODEL::doIncrementRotation( wxSpinEvent& aEvent, double aS
|
||||
else if( spinCtrl == m_spinZrot )
|
||||
textCtrl = zrot;
|
||||
|
||||
double step = ROTATION_INCREMENT;
|
||||
|
||||
if( wxGetMouseState().ShiftDown( ) )
|
||||
step = ROTATION_INCREMENT_FINE;
|
||||
|
||||
double curr_value = EDA_UNIT_UTILS::UI::DoubleValueFromString( unityScale, EDA_UNITS::DEGREES,
|
||||
textCtrl->GetValue() );
|
||||
|
||||
curr_value += ( ROTATION_INCREMENT * aSign );
|
||||
curr_value += ( step * aSign );
|
||||
curr_value = std::max( -MAX_ROTATION, curr_value );
|
||||
curr_value = std::min( curr_value, MAX_ROTATION );
|
||||
|
||||
@@ -470,16 +485,22 @@ void PANEL_PREVIEW_3D_MODEL::doIncrementOffset( wxSpinEvent& event, double aSign
|
||||
textCtrl = zoff;
|
||||
|
||||
double step_mm = OFFSET_INCREMENT_MM;
|
||||
double curr_value_mm =
|
||||
EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, m_userUnits,
|
||||
textCtrl->GetValue() )
|
||||
/ pcbIUScale.IU_PER_MM;
|
||||
|
||||
if( wxGetMouseState().ShiftDown( ) )
|
||||
step_mm = OFFSET_INCREMENT_MM_FINE;
|
||||
|
||||
if( m_userUnits == EDA_UNITS::MILS || m_userUnits == EDA_UNITS::INCHES )
|
||||
{
|
||||
step_mm = 25.4*OFFSET_INCREMENT_MIL/1000;
|
||||
|
||||
if( wxGetMouseState().ShiftDown( ) )
|
||||
step_mm = 25.4*OFFSET_INCREMENT_MIL_FINE/1000;;
|
||||
}
|
||||
|
||||
double curr_value_mm = EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, m_userUnits,
|
||||
textCtrl->GetValue() )
|
||||
/ pcbIUScale.IU_PER_MM;
|
||||
|
||||
curr_value_mm += ( step_mm * aSign );
|
||||
curr_value_mm = std::max( -MAX_OFFSET, curr_value_mm );
|
||||
curr_value_mm = std::min( curr_value_mm, MAX_OFFSET );
|
||||
@@ -515,10 +536,10 @@ void PANEL_PREVIEW_3D_MODEL::onMouseWheelRot( wxMouseEvent& event )
|
||||
{
|
||||
wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject();
|
||||
|
||||
double step = ROTATION_INCREMENT_WHEEL;
|
||||
double step = ROTATION_INCREMENT;
|
||||
|
||||
if( event.ShiftDown( ) )
|
||||
step = ROTATION_INCREMENT_WHEEL_FINE;
|
||||
step = ROTATION_INCREMENT_FINE;
|
||||
|
||||
if( event.GetWheelRotation() >= 0 )
|
||||
step = -step;
|
||||
|
||||
@@ -43,9 +43,8 @@
|
||||
#define SCALE_INCREMENT_FINE 0.02
|
||||
#define SCALE_INCREMENT 0.1
|
||||
|
||||
#define ROTATION_INCREMENT 90 // in degrees, for spin button command
|
||||
#define ROTATION_INCREMENT_WHEEL 90 // in degrees, for mouse wheel command
|
||||
#define ROTATION_INCREMENT_WHEEL_FINE 1 // in degrees, for mouse wheel command
|
||||
#define ROTATION_INCREMENT 90 // in degrees
|
||||
#define ROTATION_INCREMENT_FINE 1 // in degrees
|
||||
|
||||
#define OFFSET_INCREMENT_MM 0.5
|
||||
#define OFFSET_INCREMENT_MM_FINE 0.1
|
||||
|
||||
+46
-12
@@ -31,6 +31,11 @@ cmake_policy( SET CMP0116 OLD )
|
||||
# The current structure requires the add_custom_command to get called twice, the NEW behavior deduplicates it
|
||||
cmake_policy( SET CMP0113 OLD )
|
||||
|
||||
# Enable CMAKE_MSVC_DEBUG_INFORMATION_FORMAT to override the cmake pdb flags easily
|
||||
if (POLICY CMP0141)
|
||||
cmake_policy(SET CMP0141 NEW)
|
||||
endif (POLICY CMP0141)
|
||||
|
||||
# Default to CMAKE_BUILD_TYPE = Release unless overridden on command line
|
||||
# http://www.cmake.org/pipermail/cmake/2008-September/023808.html
|
||||
if( DEFINED CMAKE_BUILD_TYPE )
|
||||
@@ -262,6 +267,10 @@ option( KICAD_IPC_API
|
||||
"Enable experimental IPC API"
|
||||
OFF )
|
||||
|
||||
option( KICAD_IDF_TOOLS
|
||||
"Build additional idf tools"
|
||||
ON )
|
||||
|
||||
# Global setting: exports are explicit
|
||||
set( CMAKE_CXX_VISIBILITY_PRESET "hidden" )
|
||||
set( CMAKE_VISIBILITY_INLINES_HIDDEN ON )
|
||||
@@ -350,13 +359,9 @@ add_compile_definitions( $<$<BOOL:${KICAD_BUILD_ARCH_ARM64}>:KICAD_BUILD_ARCH_AR
|
||||
if (USE_CCACHE)
|
||||
find_program(CCACHE_FOUND ccache)
|
||||
if(CCACHE_FOUND)
|
||||
get_property(RULE_LAUNCH_COMPILE GLOBAL PROPERTY RULE_LAUNCH_COMPILE)
|
||||
set(RULE_LAUNCH_COMPILE "${RULE_LAUNCH_COMPILE} ${CCACHE_FOUND}")
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${RULE_LAUNCH_COMPILE})
|
||||
|
||||
get_property(RULE_LAUNCH_LINK GLOBAL PROPERTY RULE_LAUNCH_LINK)
|
||||
set(RULE_LAUNCH_LINK "${RULE_LAUNCH_LINK} ${CCACHE_FOUND}")
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${RULE_LAUNCH_LINK})
|
||||
# Set ccache on the actual lang
|
||||
list(PREPEND CMAKE_C_COMPILER_LAUNCHER ${CCACHE_FOUND})
|
||||
list(PREPEND CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_FOUND})
|
||||
|
||||
message(STATUS "Used ${CCACHE_FOUND} for compilation.")
|
||||
else(CCACHE_FOUND)
|
||||
@@ -371,9 +376,9 @@ endif(USE_CCACHE)
|
||||
if (USE_DISTCC)
|
||||
find_program(DISTCC_FOUND distcc)
|
||||
if(DISTCC_FOUND)
|
||||
get_property(RULE_LAUNCH_COMPILE GLOBAL PROPERTY RULE_LAUNCH_COMPILE)
|
||||
set(RULE_LAUNCH_COMPILE "${RULE_LAUNCH_COMPILE} ${DISTCC_FOUND}")
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${RULE_LAUNCH_COMPILE})
|
||||
list(APPEND CMAKE_C_COMPILER_LAUNCHER ${DISTCC_FOUND})
|
||||
list(APPEND CMAKE_CXX_COMPILER_LAUNCHER ${DISTCC_FOUND})
|
||||
|
||||
message(STATUS "Using ${DISTCC_FOUND} for distributed build.")
|
||||
else(DISTCC_FOUND)
|
||||
message(INFO "Distcc was requested but not found.")
|
||||
@@ -531,8 +536,18 @@ if( MSVC )
|
||||
string( APPEND CMAKE_CXX_FLAGS " /wd4290" )
|
||||
# C4800: non-bool is explicitly cast to bool, forcing value of 0 or 1
|
||||
string( APPEND CMAKE_CXX_FLAGS " /wd4800" )
|
||||
# /Zi: create PDB
|
||||
string( APPEND CMAKE_CXX_FLAGS " /Zi" )
|
||||
|
||||
# cmake 3.25 or higher requried for MSVC, should be fine
|
||||
if( USE_CCACHE AND CCACHE_FOUND )
|
||||
# Equivalent to /Z7, ensures cmake doesn't fight over the default
|
||||
# ccache may encounter external PDB file write errors due to paralleism
|
||||
# Using the embedded PDB mode is ok for development use of ccache
|
||||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "Embedded")
|
||||
else()
|
||||
# Equivalent to /Zi, ensures cmake doesn't fight over the default
|
||||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "ProgramDatabase")
|
||||
endif()
|
||||
|
||||
# /Zc:__cplusplus: define this macro according to C++ standard version
|
||||
string( APPEND CMAKE_CXX_FLAGS " /Zc:__cplusplus" )
|
||||
# /GF: enable string pooling
|
||||
@@ -1043,6 +1058,25 @@ find_package( wxWidgets ${wxWidgets_REQ_VERSION} COMPONENTS gl aui adv html core
|
||||
# Include wxWidgets macros.
|
||||
include( ${wxWidgets_USE_FILE} )
|
||||
|
||||
# Detect wxWidgets port being used
|
||||
if( wxWidgets_FIND_STYLE STREQUAL "win32" )
|
||||
string(REGEX MATCH "^[msw|qt|gtk]*" KICAD_WX_PORT "${WX_CONFIGURATION}")
|
||||
|
||||
if( KICAD_WX_PORT STREQUAL "qt" )
|
||||
add_compile_definitions( __WXQT__ )
|
||||
elseif( KICAD_WX_PORT STREQUAL "gtk" )
|
||||
add_compile_definitions( __WXGTK__ )
|
||||
endif()
|
||||
elseif( _wx_selected_config )
|
||||
string(REGEX MATCH "^[msw|qt|gtk|osx]*" KICAD_WX_PORT "${_wx_selected_config}")
|
||||
endif()
|
||||
|
||||
if( KICAD_WX_PORT )
|
||||
message( STATUS "Detected wxWidgets port: ${KICAD_WX_PORT}")
|
||||
else()
|
||||
message( FATAL_ERROR "Unable to detect wxWidgets port")
|
||||
endif()
|
||||
|
||||
if( NOT MSVC )
|
||||
if( ${wxWidgets_VERSION_STRING} VERSION_LESS 3.2 )
|
||||
message( FATAL_ERROR "wxWidgets 3.2.0 or greater is required" )
|
||||
|
||||
@@ -132,11 +132,19 @@ message Arc
|
||||
Net net = 8;
|
||||
}
|
||||
|
||||
// What copper layer shape mode the padstack uses
|
||||
enum PadStackType
|
||||
{
|
||||
PST_UNKNOWN = 0;
|
||||
PST_THROUGH = 1; // Through all layers; same shape on all layers
|
||||
PST_BLIND_BURIED = 2; // From a start layer to end layer (inclusive); same shape on all included layers
|
||||
PST_UNKNOWN = 0;
|
||||
|
||||
// The same shape is used on all copper layers
|
||||
PST_NORMAL = 1;
|
||||
|
||||
// The padstack uses up to three different shapes (F_Cu, inner layers, B_Cu)
|
||||
PST_TOP_INNER_BOTTOM = 2;
|
||||
|
||||
// The padstack's shape may differ on arbitrary copper layers
|
||||
PST_CUSTOM = 3;
|
||||
}
|
||||
|
||||
enum UnconnectedLayerRemoval
|
||||
@@ -189,15 +197,18 @@ message PadStackLayer
|
||||
|
||||
// How much to round the corners of the shape by, as a fraction of min(size.x, size.y)
|
||||
// Only used for PSS_ROUNDRECT or PSS_CHAMFEREDRECT
|
||||
float corner_rounding_ratio = 4;
|
||||
double corner_rounding_ratio = 4;
|
||||
|
||||
// How much to round the corners of the shape by, as a fraction of min(size.x, size.y)
|
||||
// Only used for PSS_CHAMFEREDRECT
|
||||
float chamfer_ratio = 5;
|
||||
double chamfer_ratio = 5;
|
||||
|
||||
ChamferedRectCorners chamfered_corners = 6;
|
||||
|
||||
repeated GraphicShape custom_shapes = 7;
|
||||
|
||||
// If shape == PSS_CUSTOM, defines the shape of the anchor (only PSS_CIRCLE and PSS_RECTANGLE supported at present)
|
||||
PadStackShape custom_anchor_shape = 8;
|
||||
}
|
||||
|
||||
// A pad stack definition for a multilayer pad or via.
|
||||
@@ -225,6 +236,21 @@ message PadStack
|
||||
kiapi.common.types.Angle angle = 7;
|
||||
}
|
||||
|
||||
enum ViaType
|
||||
{
|
||||
VT_UNKNOWN = 0;
|
||||
|
||||
// Through vias always start on F_Cu and end on B_Cu
|
||||
VT_THROUGH = 1;
|
||||
|
||||
// Blind/buried vias can have arbitrary start and end layers
|
||||
VT_BLIND_BURIED = 2;
|
||||
|
||||
// Microvias, blind/buried vias, can have arbitrary start and end layers, but also have different
|
||||
// size defaults and design rules
|
||||
VT_MICRO = 3;
|
||||
}
|
||||
|
||||
// Represents a via
|
||||
message Via
|
||||
{
|
||||
@@ -234,12 +260,14 @@ message Via
|
||||
// The location of the via's center point
|
||||
kiapi.common.types.Vector2 position = 2;
|
||||
|
||||
// The pad stack definition for this via. The via's VIATYPE (blind/buried/normal) is inferred from this.
|
||||
// The pad stack definition for this via.
|
||||
PadStack pad_stack = 3;
|
||||
|
||||
kiapi.common.types.LockedState locked = 4;
|
||||
|
||||
Net net = 5;
|
||||
|
||||
ViaType type = 6;
|
||||
}
|
||||
|
||||
message GraphicSegmentAttributes
|
||||
|
||||
@@ -138,7 +138,7 @@ void IMAGE_SIZE::SetUnit( EDA_UNITS aUnit )
|
||||
}
|
||||
|
||||
|
||||
BEGIN_EVENT_TABLE( BITMAP2CMP_FRAME, EDA_BASE_FRAME )
|
||||
BEGIN_EVENT_TABLE( BITMAP2CMP_FRAME, KIWAY_PLAYER )
|
||||
EVT_MENU( wxID_CLOSE, BITMAP2CMP_FRAME::OnExit )
|
||||
EVT_MENU( wxID_EXIT, BITMAP2CMP_FRAME::OnExit )
|
||||
|
||||
@@ -193,6 +193,7 @@ BITMAP2CMP_FRAME::BITMAP2CMP_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||
m_toolManager->InitTools();
|
||||
|
||||
ReCreateMenuBar();
|
||||
setupUIConditions();
|
||||
|
||||
GetSizer()->SetSizeHints( this );
|
||||
|
||||
|
||||
@@ -36,7 +36,9 @@ endfunction()
|
||||
get_kicad_doc_version(KICAD_DOC_VERSION)
|
||||
|
||||
# copy and modify the "normal" Doxyfile
|
||||
file(COPY ${SRC_DOXYFILE} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||
cmake_path(GET DOCSET_DOXYFILE PARENT_PATH OUTPUT_DIR)
|
||||
file(MAKE_DIRECTORY ${OUTPUT_DIR})
|
||||
file(COPY_FILE ${SRC_DOXYFILE} ${DOCSET_DOXYFILE})
|
||||
file(APPEND ${DOCSET_DOXYFILE} "
|
||||
|
||||
# Added for DocSet generation
|
||||
|
||||
@@ -53,6 +53,9 @@ if( MSVC )
|
||||
# This is a workaround borrowed from https://github.com/dotnet/runtime/blob/main/eng/native/configurecompiler.cmake
|
||||
# CMake currently cannot handle the fact that "armasm" is used in combination with standard MSVC "cl" for ARM targets
|
||||
# So this is basically a hack (incombination with the MSVCAssemblyHelper.cmake) to make this all work
|
||||
|
||||
# This workaround can be removed when https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9326 is finally part of a
|
||||
# cmake release AND when MSVC ships said cmake release
|
||||
if(KICAD_BUILD_ARCH_ARM)
|
||||
message( "Configuring ARM assembler" )
|
||||
# Explicitly specify the assembler to be used for Arm32 compile
|
||||
|
||||
@@ -86,6 +86,7 @@ set( OCC_LIBS_POST_78
|
||||
TKDEGLTF
|
||||
TKDESTEP
|
||||
TKDESTL
|
||||
TKDEVRML
|
||||
)
|
||||
|
||||
set(OCC_TYPE "OpenCASCADE Standard Edition")
|
||||
|
||||
@@ -37,7 +37,7 @@ unset(_Python_NAMES)
|
||||
|
||||
set(_PYTHON1_VERSIONS 1.6 1.5)
|
||||
set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
|
||||
set(_PYTHON3_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
|
||||
set(_PYTHON3_VERSIONS 3.13 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
|
||||
|
||||
# Disabling the "search every possible place" code for now
|
||||
# see https://gitlab.com/kicad/code/kicad/-/issues/8553
|
||||
|
||||
@@ -44,7 +44,7 @@ cmake_find_frameworks(Python)
|
||||
|
||||
set(_PYTHON1_VERSIONS 1.6 1.5)
|
||||
set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
|
||||
set(_PYTHON3_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
|
||||
set(_PYTHON3_VERSIONS 3.13 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
|
||||
|
||||
if(PythonLibs_FIND_VERSION)
|
||||
if(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
|
||||
|
||||
@@ -523,6 +523,8 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
|
||||
if(BUILD_SHARED_LIBS)
|
||||
find_path(wxWidgets_LIB_DIR
|
||||
NAMES
|
||||
qtu/wx/setup.h
|
||||
qtud/wx/setup.h
|
||||
msw/wx/setup.h
|
||||
mswd/wx/setup.h
|
||||
mswu/wx/setup.h
|
||||
@@ -540,6 +542,8 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
|
||||
else()
|
||||
find_path(wxWidgets_LIB_DIR
|
||||
NAMES
|
||||
qtu/wx/setup.h
|
||||
qtud/wx/setup.h
|
||||
msw/wx/setup.h
|
||||
mswd/wx/setup.h
|
||||
mswu/wx/setup.h
|
||||
@@ -571,7 +575,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
|
||||
endif()
|
||||
|
||||
# Search for available configuration types.
|
||||
foreach(CFG mswunivud mswunivd mswud mswd mswunivu mswuniv mswu msw)
|
||||
foreach(CFG mswunivud mswunivd mswud mswd mswunivu mswuniv mswu msw qt qtd qtu qtud)
|
||||
set(WX_${CFG}_FOUND FALSE)
|
||||
if(EXISTS ${WX_LIB_DIR}/${CFG})
|
||||
list(APPEND WX_CONFIGURATION_LIST ${CFG})
|
||||
|
||||
@@ -62,7 +62,7 @@ if( KICAD_TEST_XML_OUTPUT )
|
||||
# Due to Boost issue in 1.62, have to use the --logger parameter, rather than
|
||||
# separate --log_format, --log_sink, etc parameter
|
||||
# https://svn.boost.org/trac10/ticket/12507
|
||||
set(BOOST_TEST_PARAMS --logger=JUNIT,warning,${TEST_NAME}.boost-results.xml:HRF,warning)
|
||||
set(BOOST_TEST_PARAMS --logger=JUNIT,warning,${TEST_NAME}.boost-results.xml:HRF,message)
|
||||
endif()
|
||||
|
||||
# Add the test to the CTest registry
|
||||
|
||||
@@ -133,6 +133,7 @@ set( KICOMMON_SRCS
|
||||
exceptions.cpp
|
||||
gestfich.cpp
|
||||
json_conversions.cpp
|
||||
kidialog.cpp
|
||||
kiid.cpp
|
||||
kiway.cpp
|
||||
kiway_express.cpp
|
||||
@@ -581,6 +582,7 @@ set( COMMON_SRCS
|
||||
tool/action_toolbar.cpp
|
||||
tool/actions.cpp
|
||||
tool/common_control.cpp
|
||||
tool/library_editor_control.cpp
|
||||
tool/common_tools.cpp
|
||||
tool/conditional_menu.cpp
|
||||
tool/edit_constraints.cpp
|
||||
@@ -717,6 +719,7 @@ set( PCB_COMMON_SRCS
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/netinfo_item.cpp
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/netinfo_list.cpp
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/pad.cpp
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/padstack.cpp
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/pcb_target.cpp
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/pcb_reference_image.cpp
|
||||
${CMAKE_SOURCE_DIR}/pcbnew/pcb_field.cpp
|
||||
@@ -814,7 +817,7 @@ add_dependencies( pcbcommon delaunator )
|
||||
|
||||
# The lemon grammar for the numeric evaluator
|
||||
generate_lemon_grammar(
|
||||
common
|
||||
kicommon
|
||||
libeval
|
||||
libeval/numeric_evaluator.cpp
|
||||
libeval/grammar.lemon
|
||||
@@ -822,7 +825,7 @@ generate_lemon_grammar(
|
||||
|
||||
# The lemon grammar for the expression compiler
|
||||
generate_lemon_grammar(
|
||||
common
|
||||
kicommon
|
||||
libeval_compiler
|
||||
libeval_compiler/libeval_compiler.cpp
|
||||
libeval_compiler/grammar.lemon
|
||||
|
||||
@@ -111,6 +111,8 @@ static const wxChar TriangulateSimplificationLevel[] = wxT( "TriangulateSimplifi
|
||||
static const wxChar TriangulateMinimumArea[] = wxT( "TriangulateMinimumArea" );
|
||||
static const wxChar EnableCacheFriendlyFracture[] = wxT( "EnableCacheFriendlyFracture" );
|
||||
static const wxChar EnableAPILogging[] = wxT( "EnableAPILogging" );
|
||||
static const wxChar MaxFileSystemWatchers[] = wxT( "MaxFileSystemWatchers" );
|
||||
static const wxChar MinorSchematicGraphSize[] = wxT( "MinorSchematicGraphSize" );
|
||||
} // namespace KEYS
|
||||
|
||||
|
||||
@@ -265,6 +267,10 @@ ADVANCED_CFG::ADVANCED_CFG()
|
||||
|
||||
m_EnableCacheFriendlyFracture = true;
|
||||
|
||||
m_MaxFilesystemWatchers = 16384;
|
||||
|
||||
m_MinorSchematicGraphSize = 10000;
|
||||
|
||||
loadFromConfigFile();
|
||||
}
|
||||
|
||||
@@ -487,6 +493,14 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
|
||||
&m_EnableCacheFriendlyFracture,
|
||||
m_EnableCacheFriendlyFracture ) );
|
||||
|
||||
configParams.push_back( new PARAM_CFG_INT( true, AC_KEYS::MaxFileSystemWatchers,
|
||||
&m_MaxFilesystemWatchers, m_MaxFilesystemWatchers,
|
||||
0, 2147483647 ) );
|
||||
|
||||
configParams.push_back( new PARAM_CFG_INT( true, AC_KEYS::MinorSchematicGraphSize,
|
||||
&m_MinorSchematicGraphSize, m_MinorSchematicGraphSize,
|
||||
0, 2147483647 ) );
|
||||
|
||||
// Special case for trace mask setting...we just grab them and set them immediately
|
||||
// Because we even use wxLogTrace inside of advanced config
|
||||
wxString traceMasks;
|
||||
|
||||
@@ -455,7 +455,7 @@ void BITMAP_BASE::Rotate( bool aRotateCCW )
|
||||
m_image->SetOption( wxIMAGE_OPTION_RESOLUTIONX, resX);
|
||||
m_image->SetOption( wxIMAGE_OPTION_RESOLUTIONY, resY);
|
||||
|
||||
m_rotation += ( aRotateCCW ? -ANGLE_90 : ANGLE_90 );
|
||||
m_rotation += ( aRotateCCW ? ANGLE_90 : -ANGLE_90 );
|
||||
rebuildBitmap( false );
|
||||
UpdateImageDataBuffer();
|
||||
}
|
||||
|
||||
+131
-42
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2022 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2024 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
|
||||
@@ -17,9 +17,10 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* This file is auto-generated by CMake when MAINTAIN_PNGS is on. Do not edit by hand!
|
||||
*/
|
||||
/***************************************************************************************
|
||||
* This file is auto-generated by CMake when MAINTAIN_PNGS is on. Do not edit by hand! *
|
||||
* See resources/bitmap.png/CMakeLists.txt to build/see/edit the actual list of icons *
|
||||
***************************************************************************************/
|
||||
|
||||
#include <bitmaps/bitmaps_list.h>
|
||||
#include <bitmaps/bitmap_info.h>
|
||||
@@ -446,8 +447,10 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::directory].emplace_back( BITMAPS::directory, wxT( "directory_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::directory_browser].emplace_back( BITMAPS::directory_browser, wxT( "directory_browser_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::directory_open].emplace_back( BITMAPS::directory_open, wxT( "directory_open_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_horizontal].emplace_back( BITMAPS::distribute_horizontal, wxT( "distribute_horizontal_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_vertical].emplace_back( BITMAPS::distribute_vertical, wxT( "distribute_vertical_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_horizontal_centers].emplace_back( BITMAPS::distribute_horizontal_centers, wxT( "distribute_horizontal_centers_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_horizontal_gaps].emplace_back( BITMAPS::distribute_horizontal_gaps, wxT( "distribute_horizontal_gaps_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_vertical_centers].emplace_back( BITMAPS::distribute_vertical_centers, wxT( "distribute_vertical_centers_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_vertical_gaps].emplace_back( BITMAPS::distribute_vertical_gaps, wxT( "distribute_vertical_gaps_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::down].emplace_back( BITMAPS::down, wxT( "down_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::drag].emplace_back( BITMAPS::drag, wxT( "drag_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::drag_segment].emplace_back( BITMAPS::drag_segment, wxT( "drag_segment_24.png" ), 24, wxT( "light" ) );
|
||||
@@ -524,9 +527,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_24.png" ), 24, wxT( "light" ) );
|
||||
@@ -852,8 +863,10 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::directory].emplace_back( BITMAPS::directory, wxT( "directory_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::directory_browser].emplace_back( BITMAPS::directory_browser, wxT( "directory_browser_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::directory_open].emplace_back( BITMAPS::directory_open, wxT( "directory_open_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_horizontal].emplace_back( BITMAPS::distribute_horizontal, wxT( "distribute_horizontal_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_vertical].emplace_back( BITMAPS::distribute_vertical, wxT( "distribute_vertical_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_horizontal_centers].emplace_back( BITMAPS::distribute_horizontal_centers, wxT( "distribute_horizontal_centers_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_horizontal_gaps].emplace_back( BITMAPS::distribute_horizontal_gaps, wxT( "distribute_horizontal_gaps_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_vertical_centers].emplace_back( BITMAPS::distribute_vertical_centers, wxT( "distribute_vertical_centers_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_vertical_gaps].emplace_back( BITMAPS::distribute_vertical_gaps, wxT( "distribute_vertical_gaps_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::down].emplace_back( BITMAPS::down, wxT( "down_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::drag].emplace_back( BITMAPS::drag, wxT( "drag_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::drag_segment].emplace_back( BITMAPS::drag_segment, wxT( "drag_segment_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
@@ -930,9 +943,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
@@ -1258,8 +1279,10 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::directory].emplace_back( BITMAPS::directory, wxT( "directory_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::directory_browser].emplace_back( BITMAPS::directory_browser, wxT( "directory_browser_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::directory_open].emplace_back( BITMAPS::directory_open, wxT( "directory_open_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_horizontal].emplace_back( BITMAPS::distribute_horizontal, wxT( "distribute_horizontal_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_vertical].emplace_back( BITMAPS::distribute_vertical, wxT( "distribute_vertical_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_horizontal_centers].emplace_back( BITMAPS::distribute_horizontal_centers, wxT( "distribute_horizontal_centers_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_horizontal_gaps].emplace_back( BITMAPS::distribute_horizontal_gaps, wxT( "distribute_horizontal_gaps_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_vertical_centers].emplace_back( BITMAPS::distribute_vertical_centers, wxT( "distribute_vertical_centers_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_vertical_gaps].emplace_back( BITMAPS::distribute_vertical_gaps, wxT( "distribute_vertical_gaps_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::down].emplace_back( BITMAPS::down, wxT( "down_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::drag].emplace_back( BITMAPS::drag, wxT( "drag_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::drag_segment].emplace_back( BITMAPS::drag_segment, wxT( "drag_segment_16.png" ), 16, wxT( "light" ) );
|
||||
@@ -1336,9 +1359,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_16.png" ), 16, wxT( "light" ) );
|
||||
@@ -1664,8 +1695,10 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::directory].emplace_back( BITMAPS::directory, wxT( "directory_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::directory_browser].emplace_back( BITMAPS::directory_browser, wxT( "directory_browser_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::directory_open].emplace_back( BITMAPS::directory_open, wxT( "directory_open_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_horizontal].emplace_back( BITMAPS::distribute_horizontal, wxT( "distribute_horizontal_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_vertical].emplace_back( BITMAPS::distribute_vertical, wxT( "distribute_vertical_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_horizontal_centers].emplace_back( BITMAPS::distribute_horizontal_centers, wxT( "distribute_horizontal_centers_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_horizontal_gaps].emplace_back( BITMAPS::distribute_horizontal_gaps, wxT( "distribute_horizontal_gaps_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_vertical_centers].emplace_back( BITMAPS::distribute_vertical_centers, wxT( "distribute_vertical_centers_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_vertical_gaps].emplace_back( BITMAPS::distribute_vertical_gaps, wxT( "distribute_vertical_gaps_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::down].emplace_back( BITMAPS::down, wxT( "down_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::drag].emplace_back( BITMAPS::drag, wxT( "drag_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::drag_segment].emplace_back( BITMAPS::drag_segment, wxT( "drag_segment_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
@@ -1742,9 +1775,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
@@ -2070,8 +2111,10 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::directory].emplace_back( BITMAPS::directory, wxT( "directory_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::directory_browser].emplace_back( BITMAPS::directory_browser, wxT( "directory_browser_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::directory_open].emplace_back( BITMAPS::directory_open, wxT( "directory_open_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_horizontal].emplace_back( BITMAPS::distribute_horizontal, wxT( "distribute_horizontal_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_vertical].emplace_back( BITMAPS::distribute_vertical, wxT( "distribute_vertical_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_horizontal_centers].emplace_back( BITMAPS::distribute_horizontal_centers, wxT( "distribute_horizontal_centers_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_horizontal_gaps].emplace_back( BITMAPS::distribute_horizontal_gaps, wxT( "distribute_horizontal_gaps_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_vertical_centers].emplace_back( BITMAPS::distribute_vertical_centers, wxT( "distribute_vertical_centers_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_vertical_gaps].emplace_back( BITMAPS::distribute_vertical_gaps, wxT( "distribute_vertical_gaps_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::down].emplace_back( BITMAPS::down, wxT( "down_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::drag].emplace_back( BITMAPS::drag, wxT( "drag_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::drag_segment].emplace_back( BITMAPS::drag_segment, wxT( "drag_segment_32.png" ), 32, wxT( "light" ) );
|
||||
@@ -2148,9 +2191,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_32.png" ), 32, wxT( "light" ) );
|
||||
@@ -2476,8 +2527,10 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::directory].emplace_back( BITMAPS::directory, wxT( "directory_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::directory_browser].emplace_back( BITMAPS::directory_browser, wxT( "directory_browser_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::directory_open].emplace_back( BITMAPS::directory_open, wxT( "directory_open_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_horizontal].emplace_back( BITMAPS::distribute_horizontal, wxT( "distribute_horizontal_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_vertical].emplace_back( BITMAPS::distribute_vertical, wxT( "distribute_vertical_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_horizontal_centers].emplace_back( BITMAPS::distribute_horizontal_centers, wxT( "distribute_horizontal_centers_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_horizontal_gaps].emplace_back( BITMAPS::distribute_horizontal_gaps, wxT( "distribute_horizontal_gaps_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_vertical_centers].emplace_back( BITMAPS::distribute_vertical_centers, wxT( "distribute_vertical_centers_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_vertical_gaps].emplace_back( BITMAPS::distribute_vertical_gaps, wxT( "distribute_vertical_gaps_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::down].emplace_back( BITMAPS::down, wxT( "down_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::drag].emplace_back( BITMAPS::drag, wxT( "drag_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::drag_segment].emplace_back( BITMAPS::drag_segment, wxT( "drag_segment_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
@@ -2554,9 +2607,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
@@ -2882,8 +2943,10 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::directory].emplace_back( BITMAPS::directory, wxT( "directory_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::directory_browser].emplace_back( BITMAPS::directory_browser, wxT( "directory_browser_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::directory_open].emplace_back( BITMAPS::directory_open, wxT( "directory_open_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_horizontal].emplace_back( BITMAPS::distribute_horizontal, wxT( "distribute_horizontal_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_vertical].emplace_back( BITMAPS::distribute_vertical, wxT( "distribute_vertical_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_horizontal_centers].emplace_back( BITMAPS::distribute_horizontal_centers, wxT( "distribute_horizontal_centers_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_horizontal_gaps].emplace_back( BITMAPS::distribute_horizontal_gaps, wxT( "distribute_horizontal_gaps_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_vertical_centers].emplace_back( BITMAPS::distribute_vertical_centers, wxT( "distribute_vertical_centers_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_vertical_gaps].emplace_back( BITMAPS::distribute_vertical_gaps, wxT( "distribute_vertical_gaps_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::down].emplace_back( BITMAPS::down, wxT( "down_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::drag].emplace_back( BITMAPS::drag, wxT( "drag_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::drag_segment].emplace_back( BITMAPS::drag_segment, wxT( "drag_segment_48.png" ), 48, wxT( "light" ) );
|
||||
@@ -2960,9 +3023,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_48.png" ), 48, wxT( "light" ) );
|
||||
@@ -3288,8 +3359,10 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::directory].emplace_back( BITMAPS::directory, wxT( "directory_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::directory_browser].emplace_back( BITMAPS::directory_browser, wxT( "directory_browser_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::directory_open].emplace_back( BITMAPS::directory_open, wxT( "directory_open_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_horizontal].emplace_back( BITMAPS::distribute_horizontal, wxT( "distribute_horizontal_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_vertical].emplace_back( BITMAPS::distribute_vertical, wxT( "distribute_vertical_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_horizontal_centers].emplace_back( BITMAPS::distribute_horizontal_centers, wxT( "distribute_horizontal_centers_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_horizontal_gaps].emplace_back( BITMAPS::distribute_horizontal_gaps, wxT( "distribute_horizontal_gaps_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_vertical_centers].emplace_back( BITMAPS::distribute_vertical_centers, wxT( "distribute_vertical_centers_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_vertical_gaps].emplace_back( BITMAPS::distribute_vertical_gaps, wxT( "distribute_vertical_gaps_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::down].emplace_back( BITMAPS::down, wxT( "down_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::drag].emplace_back( BITMAPS::drag, wxT( "drag_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::drag_segment].emplace_back( BITMAPS::drag_segment, wxT( "drag_segment_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
@@ -3366,9 +3439,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
@@ -3694,8 +3775,10 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::directory].emplace_back( BITMAPS::directory, wxT( "directory_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::directory_browser].emplace_back( BITMAPS::directory_browser, wxT( "directory_browser_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::directory_open].emplace_back( BITMAPS::directory_open, wxT( "directory_open_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_horizontal].emplace_back( BITMAPS::distribute_horizontal, wxT( "distribute_horizontal_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_vertical].emplace_back( BITMAPS::distribute_vertical, wxT( "distribute_vertical_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_horizontal_centers].emplace_back( BITMAPS::distribute_horizontal_centers, wxT( "distribute_horizontal_centers_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_horizontal_gaps].emplace_back( BITMAPS::distribute_horizontal_gaps, wxT( "distribute_horizontal_gaps_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_vertical_centers].emplace_back( BITMAPS::distribute_vertical_centers, wxT( "distribute_vertical_centers_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_vertical_gaps].emplace_back( BITMAPS::distribute_vertical_gaps, wxT( "distribute_vertical_gaps_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::down].emplace_back( BITMAPS::down, wxT( "down_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::drag].emplace_back( BITMAPS::drag, wxT( "drag_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::drag_segment].emplace_back( BITMAPS::drag_segment, wxT( "drag_segment_64.png" ), 64, wxT( "light" ) );
|
||||
@@ -3772,9 +3855,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_64.png" ), 64, wxT( "light" ) );
|
||||
@@ -4100,8 +4191,10 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::directory].emplace_back( BITMAPS::directory, wxT( "directory_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::directory_browser].emplace_back( BITMAPS::directory_browser, wxT( "directory_browser_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::directory_open].emplace_back( BITMAPS::directory_open, wxT( "directory_open_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_horizontal].emplace_back( BITMAPS::distribute_horizontal, wxT( "distribute_horizontal_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_vertical].emplace_back( BITMAPS::distribute_vertical, wxT( "distribute_vertical_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_horizontal_centers].emplace_back( BITMAPS::distribute_horizontal_centers, wxT( "distribute_horizontal_centers_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_horizontal_gaps].emplace_back( BITMAPS::distribute_horizontal_gaps, wxT( "distribute_horizontal_gaps_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_vertical_centers].emplace_back( BITMAPS::distribute_vertical_centers, wxT( "distribute_vertical_centers_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::distribute_vertical_gaps].emplace_back( BITMAPS::distribute_vertical_gaps, wxT( "distribute_vertical_gaps_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::down].emplace_back( BITMAPS::down, wxT( "down_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::drag].emplace_back( BITMAPS::drag, wxT( "drag_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::drag_segment].emplace_back( BITMAPS::drag_segment, wxT( "drag_segment_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
@@ -4178,9 +4271,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
@@ -4434,24 +4535,6 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_32].emplace_back( BITMAPS::icon_pagelayout_editor_32, wxT( "icon_pagelayout_editor_32_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_32].emplace_back( BITMAPS::icon_pcbcalculator_32, wxT( "icon_pcbcalculator_32_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbnew_32].emplace_back( BITMAPS::icon_pcbnew_32, wxT( "icon_pcbnew_32_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_cvpcb].emplace_back( BITMAPS::icon_cvpcb, wxT( "icon_cvpcb_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_eeschema].emplace_back( BITMAPS::icon_eeschema, wxT( "icon_eeschema_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_gerbview].emplace_back( BITMAPS::icon_gerbview, wxT( "icon_gerbview_64.png" ), 64, wxT( "light" ) );
|
||||
@@ -4463,6 +4546,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor].emplace_back( BITMAPS::icon_pagelayout_editor, wxT( "icon_pagelayout_editor_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_bitmap2component].emplace_back( BITMAPS::icon_bitmap2component, wxT( "icon_bitmap2component_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator].emplace_back( BITMAPS::icon_pcbcalculator, wxT( "icon_pcbcalculator_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcm].emplace_back( BITMAPS::icon_pcm, wxT( "icon_pcm_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_cvpcb].emplace_back( BITMAPS::icon_cvpcb, wxT( "icon_cvpcb_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_eeschema].emplace_back( BITMAPS::icon_eeschema, wxT( "icon_eeschema_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_gerbview].emplace_back( BITMAPS::icon_gerbview, wxT( "icon_gerbview_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
@@ -4474,6 +4558,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor].emplace_back( BITMAPS::icon_pagelayout_editor, wxT( "icon_pagelayout_editor_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_bitmap2component].emplace_back( BITMAPS::icon_bitmap2component, wxT( "icon_bitmap2component_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator].emplace_back( BITMAPS::icon_pcbcalculator, wxT( "icon_pcbcalculator_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcm].emplace_back( BITMAPS::icon_pcm, wxT( "icon_pcm_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_cvpcb].emplace_back( BITMAPS::icon_cvpcb, wxT( "icon_cvpcb_128.png" ), 128, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_eeschema].emplace_back( BITMAPS::icon_eeschema, wxT( "icon_eeschema_128.png" ), 128, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_gerbview].emplace_back( BITMAPS::icon_gerbview, wxT( "icon_gerbview_128.png" ), 128, wxT( "light" ) );
|
||||
@@ -4485,6 +4570,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor].emplace_back( BITMAPS::icon_pagelayout_editor, wxT( "icon_pagelayout_editor_128.png" ), 128, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_bitmap2component].emplace_back( BITMAPS::icon_bitmap2component, wxT( "icon_bitmap2component_128.png" ), 128, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator].emplace_back( BITMAPS::icon_pcbcalculator, wxT( "icon_pcbcalculator_128.png" ), 128, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcm].emplace_back( BITMAPS::icon_pcm, wxT( "icon_pcm_128.png" ), 128, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_cvpcb].emplace_back( BITMAPS::icon_cvpcb, wxT( "icon_cvpcb_dark_128.png" ), 128, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_eeschema].emplace_back( BITMAPS::icon_eeschema, wxT( "icon_eeschema_dark_128.png" ), 128, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_gerbview].emplace_back( BITMAPS::icon_gerbview, wxT( "icon_gerbview_dark_128.png" ), 128, wxT( "dark" ) );
|
||||
@@ -4496,6 +4582,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor].emplace_back( BITMAPS::icon_pagelayout_editor, wxT( "icon_pagelayout_editor_dark_128.png" ), 128, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_bitmap2component].emplace_back( BITMAPS::icon_bitmap2component, wxT( "icon_bitmap2component_dark_128.png" ), 128, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator].emplace_back( BITMAPS::icon_pcbcalculator, wxT( "icon_pcbcalculator_dark_128.png" ), 128, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcm].emplace_back( BITMAPS::icon_pcm, wxT( "icon_pcm_dark_128.png" ), 128, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_cvpcb].emplace_back( BITMAPS::icon_cvpcb, wxT( "icon_cvpcb_256.png" ), 256, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_eeschema].emplace_back( BITMAPS::icon_eeschema, wxT( "icon_eeschema_256.png" ), 256, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_gerbview].emplace_back( BITMAPS::icon_gerbview, wxT( "icon_gerbview_256.png" ), 256, wxT( "light" ) );
|
||||
@@ -4507,6 +4594,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor].emplace_back( BITMAPS::icon_pagelayout_editor, wxT( "icon_pagelayout_editor_256.png" ), 256, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_bitmap2component].emplace_back( BITMAPS::icon_bitmap2component, wxT( "icon_bitmap2component_256.png" ), 256, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator].emplace_back( BITMAPS::icon_pcbcalculator, wxT( "icon_pcbcalculator_256.png" ), 256, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcm].emplace_back( BITMAPS::icon_pcm, wxT( "icon_pcm_256.png" ), 256, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_cvpcb].emplace_back( BITMAPS::icon_cvpcb, wxT( "icon_cvpcb_dark_256.png" ), 256, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_eeschema].emplace_back( BITMAPS::icon_eeschema, wxT( "icon_eeschema_dark_256.png" ), 256, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_gerbview].emplace_back( BITMAPS::icon_gerbview, wxT( "icon_gerbview_dark_256.png" ), 256, wxT( "dark" ) );
|
||||
@@ -4518,6 +4606,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor].emplace_back( BITMAPS::icon_pagelayout_editor, wxT( "icon_pagelayout_editor_dark_256.png" ), 256, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_bitmap2component].emplace_back( BITMAPS::icon_bitmap2component, wxT( "icon_bitmap2component_dark_256.png" ), 256, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator].emplace_back( BITMAPS::icon_pcbcalculator, wxT( "icon_pcbcalculator_dark_256.png" ), 256, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcm].emplace_back( BITMAPS::icon_pcm, wxT( "icon_pcm_dark_256.png" ), 256, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::dialog_warning].emplace_back( BITMAPS::dialog_warning, wxT( "dialog_warning_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_3d].emplace_back( BITMAPS::icon_3d, wxT( "icon_3d_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_cvpcb].emplace_back( BITMAPS::icon_cvpcb, wxT( "icon_cvpcb_48.png" ), 48, wxT( "light" ) );
|
||||
|
||||
@@ -51,6 +51,19 @@ extern std::string GetCurlLibVersion();
|
||||
#include <kicad_build_version.h>
|
||||
#undef INCLUDE_KICAD_VERSION
|
||||
|
||||
// Remember OpenGL info
|
||||
static wxString s_glVendor;
|
||||
static wxString s_glRenderer;
|
||||
static wxString s_glVersion;
|
||||
|
||||
void SetOpenGLInfo( const char* aVendor, const char* aRenderer, const char* aVersion )
|
||||
{
|
||||
s_glVendor = wxString::FromUTF8( aVendor );
|
||||
s_glRenderer = wxString::FromUTF8( aRenderer );
|
||||
s_glVersion = wxString::FromUTF8( aVersion );
|
||||
}
|
||||
|
||||
|
||||
wxString GetPlatformGetBitnessName()
|
||||
{
|
||||
wxPlatformInfo platform;
|
||||
@@ -200,6 +213,12 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief )
|
||||
<< ", " << wxGetenv( "XDG_SESSION_TYPE" );
|
||||
#endif
|
||||
|
||||
if( !s_glVendor.empty() || !s_glRenderer.empty() || !s_glVersion.empty() )
|
||||
{
|
||||
aMsg << eol;
|
||||
aMsg << "OpenGL: " << s_glVendor << ", " << s_glRenderer << ", " << s_glVersion;
|
||||
}
|
||||
|
||||
aMsg << eol << eol;
|
||||
|
||||
if( !aBrief )
|
||||
|
||||
+14
-124
@@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2007 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2023, 2024 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
|
||||
@@ -22,134 +22,23 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <confirm.h>
|
||||
|
||||
#include <functional>
|
||||
#include <wx/app.h>
|
||||
#include <wx/stockitem.h>
|
||||
#include <wx/richmsgdlg.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/choicdlg.h>
|
||||
#include <wx/crt.h>
|
||||
#include <confirm.h>
|
||||
#include <functional>
|
||||
#include <unordered_map>
|
||||
|
||||
// Set of dialogs that have been chosen not to be shown again
|
||||
static std::unordered_map<unsigned long, int> doNotShowAgainDlgs;
|
||||
|
||||
|
||||
KIDIALOG::KIDIALOG( wxWindow* aParent, const wxString& aMessage, const wxString& aCaption,
|
||||
long aStyle )
|
||||
: wxRichMessageDialog( aParent, aMessage, aCaption, aStyle | wxCENTRE | wxSTAY_ON_TOP ),
|
||||
m_hash( 0 ),
|
||||
m_cancelMeansCancel( true )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
KIDIALOG::KIDIALOG( wxWindow* aParent, const wxString& aMessage, KD_TYPE aType,
|
||||
const wxString& aCaption )
|
||||
: wxRichMessageDialog( aParent, aMessage, getCaption( aType, aCaption ), getStyle( aType ) ),
|
||||
m_hash( 0 ),
|
||||
m_cancelMeansCancel( true )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void KIDIALOG::DoNotShowCheckbox( wxString aUniqueId, int line )
|
||||
{
|
||||
ShowCheckBox( _( "Do not show again" ), false );
|
||||
|
||||
m_hash = std::hash<wxString>{}( aUniqueId ) + line;
|
||||
}
|
||||
|
||||
|
||||
bool KIDIALOG::DoNotShowAgain() const
|
||||
{
|
||||
return doNotShowAgainDlgs.count( m_hash ) > 0;
|
||||
}
|
||||
|
||||
|
||||
void KIDIALOG::ForceShowAgain()
|
||||
{
|
||||
doNotShowAgainDlgs.erase( m_hash );
|
||||
}
|
||||
|
||||
|
||||
bool KIDIALOG::Show( bool aShow )
|
||||
{
|
||||
// We should check the do-not-show-again setting only when the dialog is displayed
|
||||
if( aShow )
|
||||
{
|
||||
// Check if this dialog should be shown to the user
|
||||
auto it = doNotShowAgainDlgs.find( m_hash );
|
||||
|
||||
if( it != doNotShowAgainDlgs.end() )
|
||||
return it->second;
|
||||
}
|
||||
|
||||
int ret = wxRichMessageDialog::Show( aShow );
|
||||
|
||||
// Has the user asked not to show the dialog again?
|
||||
// Note that we don't save a Cancel value unless the Cancel button is being used for some
|
||||
// other function (which is actually more common than it being used for Cancel).
|
||||
if( IsCheckBoxChecked() && (!m_cancelMeansCancel || ret != wxID_CANCEL ) )
|
||||
doNotShowAgainDlgs[m_hash] = ret;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
int KIDIALOG::ShowModal()
|
||||
{
|
||||
// Check if this dialog should be shown to the user
|
||||
auto it = doNotShowAgainDlgs.find( m_hash );
|
||||
|
||||
if( it != doNotShowAgainDlgs.end() )
|
||||
return it->second;
|
||||
|
||||
int ret = wxRichMessageDialog::ShowModal();
|
||||
|
||||
// Has the user asked not to show the dialog again?
|
||||
// Note that we don't save a Cancel value unless the Cancel button is being used for some
|
||||
// other function (which is actually more common than it being used for Cancel).
|
||||
if( IsCheckBoxChecked() && (!m_cancelMeansCancel || ret != wxID_CANCEL ) )
|
||||
doNotShowAgainDlgs[m_hash] = ret;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
wxString KIDIALOG::getCaption( KD_TYPE aType, const wxString& aCaption )
|
||||
{
|
||||
if( !aCaption.IsEmpty() )
|
||||
return aCaption;
|
||||
|
||||
switch( aType )
|
||||
{
|
||||
case KD_NONE: /* fall through */
|
||||
case KD_INFO: return _( "Message" );
|
||||
case KD_QUESTION: return _( "Question" );
|
||||
case KD_WARNING: return _( "Warning" );
|
||||
case KD_ERROR: return _( "Error" );
|
||||
}
|
||||
|
||||
return wxEmptyString;
|
||||
}
|
||||
|
||||
|
||||
long KIDIALOG::getStyle( KD_TYPE aType )
|
||||
{
|
||||
long style = wxOK | wxCENTRE | wxSTAY_ON_TOP;
|
||||
|
||||
switch( aType )
|
||||
{
|
||||
case KD_NONE: break;
|
||||
case KD_INFO: style |= wxICON_INFORMATION; break;
|
||||
case KD_QUESTION: style |= wxICON_QUESTION; break;
|
||||
case KD_WARNING: style |= wxICON_WARNING; break;
|
||||
case KD_ERROR: style |= wxICON_ERROR; break;
|
||||
}
|
||||
|
||||
return style;
|
||||
}
|
||||
/**
|
||||
* Flag to enable confirmation dialog debugging output.
|
||||
*
|
||||
* @ingroup trace_env_vars
|
||||
*/
|
||||
static const wxChar traceConfirm[] = wxT( "KICAD_CONFIRM" );
|
||||
|
||||
|
||||
bool AskOverrideLock( wxWindow* aParent, const wxString& aMessage )
|
||||
@@ -211,7 +100,8 @@ int UnsavedChangesDialog( wxWindow* parent, const wxString& aMessage )
|
||||
// wxMessageDialog on windows invokes TaskDialogIndirect which is a native function for a dialog
|
||||
// As a result it skips wxWidgets for modal management...and we don't parent frames properly
|
||||
// among other things for Windows to do the right thing by default
|
||||
// Disable all the windows manually to avoid being able to hit this dialog from the tool frame and kicad frame at the same time
|
||||
// Disable all the windows manually to avoid being able to hit this dialog from the tool frame
|
||||
// and kicad frame at the same time.
|
||||
wxWindowDisabler disable( true );
|
||||
#endif
|
||||
|
||||
@@ -333,7 +223,7 @@ void DisplayInfoMessage( wxWindow* aParent, const wxString& aMessage, const wxSt
|
||||
{
|
||||
if( !wxTheApp || !wxTheApp->GetTopWindow() )
|
||||
{
|
||||
wxLogDebug( "%s %s", aMessage, aExtraInfo );
|
||||
wxLogTrace( traceConfirm, wxS( "%s %s" ), aMessage, aExtraInfo );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -347,6 +347,24 @@ bool DATABASE_CONNECTION::SelectOne( const std::string& aTable,
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogTrace( traceDatabase, wxT( "SelectOne: table `%s` not in row cache; will SelectAll" ),
|
||||
tableName, aWhere.second );
|
||||
|
||||
selectAllAndCache( tableName, aWhere.first );
|
||||
|
||||
if( m_cache->Get( tableName, cacheEntry ) )
|
||||
{
|
||||
if( cacheEntry.count( aWhere.second ) )
|
||||
{
|
||||
wxLogTrace( traceDatabase, wxT( "SelectOne: `%s` with parameter `%s` - cache hit" ),
|
||||
tableName, aWhere.second );
|
||||
aResult = cacheEntry.at( aWhere.second );
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( !m_columnCache.count( tableName ) )
|
||||
{
|
||||
@@ -372,15 +390,14 @@ bool DATABASE_CONNECTION::SelectOne( const std::string& aTable,
|
||||
columnsFor( tableName ),
|
||||
m_quoteChar, tableName, m_quoteChar,
|
||||
m_quoteChar, columnName, m_quoteChar );
|
||||
|
||||
nanodbc::statement statement( *m_conn );
|
||||
nanodbc::string query = fromUTF8( queryStr );
|
||||
|
||||
PROF_TIMER timer;
|
||||
nanodbc::statement statement;
|
||||
|
||||
try
|
||||
{
|
||||
statement.prepare( query );
|
||||
statement.prepare( *m_conn, query );
|
||||
statement.bind( 0, aWhere.second.c_str() );
|
||||
}
|
||||
catch( nanodbc::database_error& e )
|
||||
@@ -474,44 +491,14 @@ bool DATABASE_CONNECTION::SelectOne( const std::string& aTable,
|
||||
}
|
||||
|
||||
|
||||
bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, const std::string& aKey,
|
||||
std::vector<ROW>& aResults )
|
||||
bool DATABASE_CONNECTION::selectAllAndCache( const std::string& aTable, const std::string& aKey )
|
||||
{
|
||||
if( !m_conn )
|
||||
{
|
||||
wxLogTrace( traceDatabase, wxT( "Called SelectAll without valid connection!" ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
auto tableMapIter = m_tables.find( aTable );
|
||||
|
||||
if( tableMapIter == m_tables.end() )
|
||||
{
|
||||
wxLogTrace( traceDatabase, wxT( "SelectAll: requested table %s not found in cache" ),
|
||||
aTable );
|
||||
return false;
|
||||
}
|
||||
|
||||
DB_CACHE_TYPE::CACHE_VALUE cacheEntry;
|
||||
|
||||
if( m_cache->Get( aTable, cacheEntry ) )
|
||||
{
|
||||
wxLogTrace( traceDatabase, wxT( "SelectAll: `%s` - cache hit" ), aTable );
|
||||
|
||||
aResults.reserve( cacheEntry.size() );
|
||||
|
||||
for( auto &[ key, row ] : cacheEntry )
|
||||
aResults.emplace_back( row );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
nanodbc::statement statement( *m_conn );
|
||||
|
||||
nanodbc::string query = fromUTF8( fmt::format( "SELECT {} FROM {}{}{}", columnsFor( aTable ),
|
||||
m_quoteChar, aTable, m_quoteChar ) );
|
||||
|
||||
wxLogTrace( traceDatabase, wxT( "SelectAll: `%s`" ), toUTF8( query ) );
|
||||
wxLogTrace( traceDatabase, wxT( "selectAllAndCache: `%s`" ), toUTF8( query ) );
|
||||
|
||||
PROF_TIMER timer;
|
||||
|
||||
@@ -522,7 +509,8 @@ bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, const std::strin
|
||||
catch( nanodbc::database_error& e )
|
||||
{
|
||||
m_lastError = e.what();
|
||||
wxLogTrace( traceDatabase, wxT( "Exception while preparing query for SelectAll: %s" ),
|
||||
wxLogTrace( traceDatabase,
|
||||
wxT( "Exception while preparing query for selectAllAndCache: %s" ),
|
||||
m_lastError );
|
||||
|
||||
// Exception may be due to a connection error; nanodbc won't auto-reconnect
|
||||
@@ -540,7 +528,8 @@ bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, const std::strin
|
||||
catch( nanodbc::database_error& e )
|
||||
{
|
||||
m_lastError = e.what();
|
||||
wxLogTrace( traceDatabase, wxT( "Exception while executing query for SelectAll: %s" ),
|
||||
wxLogTrace( traceDatabase,
|
||||
wxT( "Exception while executing query for selectAllAndCache: %s" ),
|
||||
m_lastError );
|
||||
|
||||
// Exception may be due to a connection error; nanodbc won't auto-reconnect
|
||||
@@ -551,15 +540,17 @@ bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, const std::strin
|
||||
|
||||
timer.Stop();
|
||||
|
||||
DB_CACHE_TYPE::CACHE_VALUE cacheEntry;
|
||||
|
||||
auto handleException =
|
||||
[&]( std::runtime_error& aException, const std::string& aExtraContext = "" )
|
||||
{
|
||||
m_lastError = aException.what();
|
||||
std::string extra = aExtraContext.empty() ? "" : ": " + aExtraContext;
|
||||
wxLogTrace( traceDatabase,
|
||||
wxT( "Exception while parsing result %d from SelectAll: %s%s" ),
|
||||
aResults.size(), m_lastError, extra );
|
||||
};
|
||||
{
|
||||
m_lastError = aException.what();
|
||||
std::string extra = aExtraContext.empty() ? "" : ": " + aExtraContext;
|
||||
wxLogTrace( traceDatabase,
|
||||
wxT( "Exception while parsing result %d from selectAllAndCache: %s%s" ),
|
||||
cacheEntry.size(), m_lastError, extra );
|
||||
};
|
||||
|
||||
while( results.next() )
|
||||
{
|
||||
@@ -636,20 +627,64 @@ bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, const std::strin
|
||||
}
|
||||
}
|
||||
|
||||
aResults.emplace_back( std::move( result ) );
|
||||
wxASSERT( result.count( aKey ) );
|
||||
std::string keyStr = std::any_cast<std::string>( result.at( aKey ) );
|
||||
cacheEntry[keyStr] = result;
|
||||
}
|
||||
|
||||
wxLogTrace( traceDatabase, wxT( "SelectAll from %s completed in %0.1f ms" ), aTable,
|
||||
wxLogTrace( traceDatabase, wxT( "selectAllAndCache from %s completed in %0.1f ms" ), aTable,
|
||||
timer.msecs() );
|
||||
|
||||
for( const ROW& row : aResults )
|
||||
m_cache->Put( aTable, cacheEntry );
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, const std::string& aKey,
|
||||
std::vector<ROW>& aResults )
|
||||
{
|
||||
if( !m_conn )
|
||||
{
|
||||
wxASSERT( row.count( aKey ) );
|
||||
std::string keyStr = std::any_cast<std::string>( row.at( aKey ) );
|
||||
cacheEntry[keyStr] = row;
|
||||
wxLogTrace( traceDatabase, wxT( "Called SelectAll without valid connection!" ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
m_cache->Put( aTable, cacheEntry );
|
||||
auto tableMapIter = m_tables.find( aTable );
|
||||
|
||||
if( tableMapIter == m_tables.end() )
|
||||
{
|
||||
wxLogTrace( traceDatabase, wxT( "SelectAll: requested table %s not found in cache" ),
|
||||
aTable );
|
||||
return false;
|
||||
}
|
||||
|
||||
DB_CACHE_TYPE::CACHE_VALUE cacheEntry;
|
||||
|
||||
if( !m_cache->Get( aTable, cacheEntry ) )
|
||||
{
|
||||
if( !selectAllAndCache( aTable, aKey ) )
|
||||
{
|
||||
wxLogTrace( traceDatabase, wxT( "SelectAll: `%s` cache fill failed" ), aTable );
|
||||
return false;
|
||||
}
|
||||
|
||||
// Now it should be filled
|
||||
m_cache->Get( aTable, cacheEntry );
|
||||
}
|
||||
|
||||
if( !m_cache->Get( aTable, cacheEntry ) )
|
||||
{
|
||||
wxLogTrace( traceDatabase, wxT( "SelectAll: `%s` failed to get results from cache!" ),
|
||||
aTable );
|
||||
return false;
|
||||
}
|
||||
|
||||
wxLogTrace( traceDatabase, wxT( "SelectAll: `%s` - returning cached results" ), aTable );
|
||||
|
||||
aResults.reserve( cacheEntry.size() );
|
||||
|
||||
for( auto &[ key, row ] : cacheEntry )
|
||||
aResults.emplace_back( row );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
|
||||
#include <build_version.h>
|
||||
#include <eda_base_frame.h>
|
||||
#include <wx/clipbrd.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/hyperlink.h>
|
||||
|
||||
@@ -526,7 +526,7 @@ int DIALOG_SHIM::ShowQuasiModal()
|
||||
|
||||
m_qmodal_showing = true;
|
||||
|
||||
WX_EVENT_LOOP event_loop;
|
||||
wxGUIEventLoop event_loop;
|
||||
|
||||
m_qmodal_loop = &event_loop;
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <project.h>
|
||||
#include <project/project_file.h>
|
||||
#include <project/net_settings.h>
|
||||
#include <eda_base_frame.h>
|
||||
|
||||
|
||||
DIALOG_ASSIGN_NETCLASS::DIALOG_ASSIGN_NETCLASS( EDA_BASE_FRAME* aParent, const wxString aNetName,
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
|
||||
#include <dialogs/dialog_book_reporter.h>
|
||||
#include <widgets/wx_html_report_box.h>
|
||||
#include <wx/wxhtml.h>
|
||||
#include <wx/event.h>
|
||||
#include <kiway_player.h>
|
||||
|
||||
|
||||
wxDEFINE_EVENT( EDA_EVT_CLOSE_DIALOG_BOOK_REPORTER, wxCommandEvent );
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2018-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2018-2024 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
|
||||
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <kiplatform/ui.h>
|
||||
#include <dialogs/dialog_color_picker.h>
|
||||
#include <cmath>
|
||||
#include <algorithm>
|
||||
@@ -28,6 +29,7 @@
|
||||
#include <wx/dcmemory.h>
|
||||
|
||||
#define ALPHA_MAX 100 // the max value returned by the alpha (opacity) slider
|
||||
#define SLOPE_AXIS ( bmsize.y / 5.28 ) // was 50 at 264 size
|
||||
|
||||
using KIGFX::COLOR4D;
|
||||
|
||||
@@ -52,13 +54,19 @@ DIALOG_COLOR_PICKER::DIALOG_COLOR_PICKER( wxWindow* aParent, const COLOR4D& aCur
|
||||
m_allowOpacityCtrl = aAllowOpacityControl;
|
||||
m_previousColor4D = aCurrentColor;
|
||||
m_newColor4D = aCurrentColor;
|
||||
m_cursorsSize = 8; // Size of square cursors drawn on color bitmaps
|
||||
m_newColor4D.ToHSV( m_hue, m_sat, m_val, true );
|
||||
m_bitmapRGB = nullptr;
|
||||
m_bitmapHSV = nullptr;
|
||||
m_selectedCursor = nullptr;
|
||||
m_defaultColor = aDefaultColor;
|
||||
|
||||
updateHandleSize();
|
||||
|
||||
m_OldColorRect->SetMinSize( FromDIP( wxSize( 20, 20 ) ) );
|
||||
m_NewColorRect->SetMinSize( FromDIP( wxSize( 20, 20 ) ) );
|
||||
|
||||
m_colorValue->SetMinSize( wxSize( GetTextExtent( wxS( "#DDDDDDDD" ) ).x + FromDIP( 8 ), -1 ) );
|
||||
|
||||
if( !m_allowOpacityCtrl )
|
||||
{
|
||||
m_SizerTransparency->Show( false );
|
||||
@@ -118,19 +126,22 @@ DIALOG_COLOR_PICKER::~DIALOG_COLOR_PICKER()
|
||||
|
||||
void DIALOG_COLOR_PICKER::updatePreview( wxStaticBitmap* aStaticBitmap, COLOR4D& aColor4D )
|
||||
{
|
||||
wxBitmap newBm = COLOR_SWATCH::MakeBitmap( aColor4D, COLOR4D::WHITE, aStaticBitmap->GetSize(),
|
||||
ConvertDialogToPixels( CHECKERBOARD_SIZE_DU ),
|
||||
wxSize swatchSize = aStaticBitmap->GetSize();
|
||||
wxSize checkerboardSize = ConvertDialogToPixels( CHECKERBOARD_SIZE_DU );
|
||||
|
||||
wxBitmap newBm = COLOR_SWATCH::MakeBitmap( aColor4D, COLOR4D::WHITE,
|
||||
ToPhys( swatchSize ),
|
||||
ToPhys( checkerboardSize ),
|
||||
aStaticBitmap->GetParent()->GetBackgroundColour() );
|
||||
|
||||
newBm.SetScaleFactor( GetDPIScaleFactor() );
|
||||
aStaticBitmap->SetBitmap( newBm );
|
||||
}
|
||||
|
||||
|
||||
bool DIALOG_COLOR_PICKER::TransferDataToWindow()
|
||||
{
|
||||
// Draw all bitmaps, with colors according to the color 4D
|
||||
updatePreview( m_OldColorRect, m_previousColor4D );
|
||||
SetEditVals( ALL_CHANGED, false );
|
||||
drawAll();
|
||||
|
||||
// Configure the spin control sizes
|
||||
configureSpinCtrl( m_spinCtrlGreen );
|
||||
@@ -144,6 +155,10 @@ bool DIALOG_COLOR_PICKER::TransferDataToWindow()
|
||||
|
||||
finishDialogSettings();
|
||||
|
||||
// Draw all bitmaps, with colors according to the color 4D
|
||||
updatePreview( m_OldColorRect, m_previousColor4D );
|
||||
drawAll();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -169,8 +184,12 @@ void DIALOG_COLOR_PICKER::initDefinedColors( CUSTOM_COLORS_LIST* aPredefinedColo
|
||||
auto addSwatch =
|
||||
[&]( int aId, COLOR4D aColor, const wxString& aColorName )
|
||||
{
|
||||
wxBitmap bm = COLOR_SWATCH::MakeBitmap( aColor, COLOR4D::WHITE, swatchSize,
|
||||
checkerboardSize, checkboardBackground );
|
||||
wxBitmap bm = COLOR_SWATCH::MakeBitmap( aColor, COLOR4D::WHITE,
|
||||
ToPhys( swatchSize ),
|
||||
ToPhys( checkerboardSize ),
|
||||
checkboardBackground );
|
||||
|
||||
bm.SetScaleFactor( GetDPIScaleFactor() );
|
||||
wxStaticBitmap* swatch = new wxStaticBitmap( m_panelDefinedColors, aId, bm );
|
||||
|
||||
m_fgridColor->Add( swatch, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
@@ -227,7 +246,7 @@ void DIALOG_COLOR_PICKER::initDefinedColors( CUSTOM_COLORS_LIST* aPredefinedColo
|
||||
|
||||
void DIALOG_COLOR_PICKER::createRGBBitmap()
|
||||
{
|
||||
wxSize bmsize = m_RgbBitmap->GetSize();
|
||||
wxSize bmsize = ToPhys( m_RgbBitmap->GetSize() );
|
||||
int half_size = std::min( bmsize.x, bmsize.y )/2;
|
||||
|
||||
// We use here a Y axis from bottom to top and origin to center, So we need to map
|
||||
@@ -245,7 +264,6 @@ void DIALOG_COLOR_PICKER::createRGBBitmap()
|
||||
|
||||
// Red blue area in X Z 3d axis
|
||||
double inc = 255.0 / half_size;
|
||||
#define SLOPE_AXIS 50.0
|
||||
double slope = SLOPE_AXIS/half_size;
|
||||
color.g = 0.0;
|
||||
|
||||
@@ -315,13 +333,15 @@ void DIALOG_COLOR_PICKER::createRGBBitmap()
|
||||
|
||||
delete m_bitmapRGB;
|
||||
m_bitmapRGB = new wxBitmap( img, 24 );
|
||||
|
||||
m_bitmapRGB->SetScaleFactor( GetDPIScaleFactor() );
|
||||
m_RgbBitmap->SetBitmap( *m_bitmapRGB );
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_COLOR_PICKER::createHSVBitmap()
|
||||
{
|
||||
wxSize bmsize = m_HsvBitmap->GetSize();
|
||||
wxSize bmsize = ToPhys( m_HsvBitmap->GetSize() );
|
||||
int half_size = std::min( bmsize.x, bmsize.y )/2;
|
||||
|
||||
// We use here a Y axis from bottom to top and origin to center, So we need to map
|
||||
@@ -379,19 +399,24 @@ void DIALOG_COLOR_PICKER::createHSVBitmap()
|
||||
|
||||
delete m_bitmapHSV;
|
||||
m_bitmapHSV = new wxBitmap( img, 24 );
|
||||
|
||||
m_bitmapHSV->SetScaleFactor( GetDPIScaleFactor() );
|
||||
m_HsvBitmap->SetBitmap( *m_bitmapHSV );
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_COLOR_PICKER::drawRGBPalette()
|
||||
{
|
||||
if( !m_bitmapRGB || m_bitmapRGB->GetSize() != m_RgbBitmap->GetSize() )
|
||||
if( !m_bitmapRGB || m_bitmapRGB->GetSize() != ToPhys( m_RgbBitmap->GetSize() ) )
|
||||
createRGBBitmap();
|
||||
|
||||
wxMemoryDC bitmapDC;
|
||||
wxSize bmsize = m_bitmapRGB->GetSize();
|
||||
int half_size = std::min( bmsize.x, bmsize.y )/2;
|
||||
wxSize bmsize = m_bitmapRGB->GetSize();
|
||||
int half_size = std::min( bmsize.x, bmsize.y ) / 2;
|
||||
|
||||
wxBitmap newBm( *m_bitmapRGB );
|
||||
newBm.SetScaleFactor( 1.0 );
|
||||
|
||||
bitmapDC.SelectObject( newBm );
|
||||
|
||||
// Use Y axis from bottom to top and origin to center
|
||||
@@ -413,7 +438,6 @@ void DIALOG_COLOR_PICKER::drawRGBPalette()
|
||||
bitmapDC.SetBrush( brush );
|
||||
int half_csize = m_cursorsSize / 2;
|
||||
|
||||
#define SLOPE_AXIS 50.0
|
||||
double slope = SLOPE_AXIS / half_size;
|
||||
|
||||
// Red axis cursor (Z 3Daxis):
|
||||
@@ -445,6 +469,7 @@ void DIALOG_COLOR_PICKER::drawRGBPalette()
|
||||
bitmapDC.DrawLine( 0, 0, half_size, - half_size*slope ); // Blue axis (X 3D axis)
|
||||
bitmapDC.DrawLine( 0, 0, -half_size, - half_size*slope ); // green axis (Y 3D axis)
|
||||
|
||||
newBm.SetScaleFactor( GetDPIScaleFactor() );
|
||||
m_RgbBitmap->SetBitmap( newBm );
|
||||
|
||||
/* Deselect the Tool Bitmap from DC,
|
||||
@@ -455,13 +480,16 @@ void DIALOG_COLOR_PICKER::drawRGBPalette()
|
||||
|
||||
void DIALOG_COLOR_PICKER::drawHSVPalette()
|
||||
{
|
||||
if( !m_bitmapHSV || m_bitmapHSV->GetSize() != m_HsvBitmap->GetSize() )
|
||||
if( !m_bitmapHSV || m_bitmapHSV->GetSize() != ToPhys( m_HsvBitmap->GetSize() ) )
|
||||
createHSVBitmap();
|
||||
|
||||
wxMemoryDC bitmapDC;
|
||||
wxSize bmsize = m_bitmapHSV->GetSize();
|
||||
int half_size = std::min( bmsize.x, bmsize.y ) / 2;
|
||||
wxSize bmsize = m_bitmapHSV->GetSize();
|
||||
int half_size = std::min( bmsize.x, bmsize.y ) / 2;
|
||||
|
||||
wxBitmap newBm( *m_bitmapHSV );
|
||||
newBm.SetScaleFactor( 1.0 );
|
||||
|
||||
bitmapDC.SelectObject( newBm );
|
||||
|
||||
// Use Y axis from bottom to top and origin to center
|
||||
@@ -485,11 +513,11 @@ void DIALOG_COLOR_PICKER::drawHSVPalette()
|
||||
bitmapDC.SetPen( pen );
|
||||
bitmapDC.SetBrush( brush );
|
||||
|
||||
int half_csize = m_cursorsSize/2;
|
||||
bitmapDC.DrawRectangle( m_cursorBitmapHSV.x- half_csize,
|
||||
m_cursorBitmapHSV.y-half_csize,
|
||||
bitmapDC.DrawRectangle( m_cursorBitmapHSV.x - ( m_cursorsSize / 2 ),
|
||||
m_cursorBitmapHSV.y - ( m_cursorsSize / 2 ),
|
||||
m_cursorsSize, m_cursorsSize );
|
||||
|
||||
newBm.SetScaleFactor( GetDPIScaleFactor() );
|
||||
m_HsvBitmap->SetBitmap( newBm );
|
||||
|
||||
/* Deselect the Tool Bitmap from DC,
|
||||
@@ -539,8 +567,15 @@ void DIALOG_COLOR_PICKER::SetEditVals( CHANGED_COLOR aChanged, bool aCheckTransp
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_COLOR_PICKER::updateHandleSize()
|
||||
{
|
||||
m_cursorsSize = ToPhys( FromDIP( 8 ) ); // Size of square cursors drawn on color bitmaps
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_COLOR_PICKER::drawAll()
|
||||
{
|
||||
updateHandleSize();
|
||||
m_NewColorRect->Freeze(); // Avoid flicker
|
||||
m_HsvBitmap->Freeze();
|
||||
m_RgbBitmap->Freeze();
|
||||
@@ -583,11 +618,12 @@ void DIALOG_COLOR_PICKER::buttColorClick( wxMouseEvent& event )
|
||||
void DIALOG_COLOR_PICKER::onRGBMouseClick( wxMouseEvent& event )
|
||||
{
|
||||
m_allowMouseEvents = true;
|
||||
wxPoint mousePos = event.GetPosition();
|
||||
|
||||
// The cursor position is relative to the m_bitmapHSV wxBitmap center
|
||||
wxSize bmsize = m_bitmapRGB->GetSize();
|
||||
int half_size = std::min( bmsize.x, bmsize.y ) / 2;
|
||||
wxPoint mousePos = ToPhys( event.GetPosition() );
|
||||
wxSize bmsize = m_bitmapRGB->GetSize();
|
||||
int half_size = std::min( bmsize.x, bmsize.y ) / 2;
|
||||
|
||||
mousePos.x -= half_size;
|
||||
mousePos.y -= half_size;
|
||||
mousePos.y = -mousePos.y; // Use the bottom to top vertical axis
|
||||
@@ -637,9 +673,10 @@ void DIALOG_COLOR_PICKER::onRGBMouseDrag( wxMouseEvent& event )
|
||||
|
||||
// Adjust the HSV cursor position to follow the mouse cursor
|
||||
// The cursor position is relative to the m_bitmapHSV wxBitmap center
|
||||
wxPoint mousePos = event.GetPosition();
|
||||
wxSize bmsize = m_bitmapRGB->GetSize();
|
||||
int half_size = std::min( bmsize.x, bmsize.y ) / 2;
|
||||
wxPoint mousePos = ToPhys( event.GetPosition() );
|
||||
wxSize bmsize = m_bitmapRGB->GetSize();
|
||||
int half_size = std::min( bmsize.x, bmsize.y ) / 2;
|
||||
|
||||
mousePos.x -= half_size;
|
||||
mousePos.y -= half_size;
|
||||
mousePos.y = -mousePos.y; // Use the bottom to top vertical axis
|
||||
@@ -699,6 +736,14 @@ void DIALOG_COLOR_PICKER::onHSVMouseDrag( wxMouseEvent& event )
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_COLOR_PICKER::onSize( wxSizeEvent& event )
|
||||
{
|
||||
drawAll();
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_COLOR_PICKER::OnColorValueText( wxCommandEvent& event )
|
||||
{
|
||||
if( m_newColor4D.SetFromHexString( m_colorValue->GetValue() ) )
|
||||
@@ -713,9 +758,9 @@ void DIALOG_COLOR_PICKER::OnColorValueText( wxCommandEvent& event )
|
||||
|
||||
bool DIALOG_COLOR_PICKER::setHSvaluesFromCursor( const wxPoint& aMouseCursor )
|
||||
{
|
||||
wxPoint mousePos = aMouseCursor;
|
||||
wxSize bmsize = m_bitmapHSV->GetSize();
|
||||
int half_size = std::min( bmsize.x, bmsize.y )/2;
|
||||
wxPoint mousePos = ToPhys( aMouseCursor );
|
||||
wxSize bmsize = m_bitmapHSV->GetSize();
|
||||
int half_size = std::min( bmsize.x, bmsize.y ) / 2;
|
||||
|
||||
// Make the cursor position relative to the m_bitmapHSV wxBitmap center
|
||||
mousePos.x -= half_size;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
|
||||
// C++ code generated with wxFormBuilder (version 4.1.0-0-g733bf3d)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@@ -33,7 +33,10 @@ DIALOG_COLOR_PICKER_BASE::DIALOG_COLOR_PICKER_BASE( wxWindow* parent, wxWindowID
|
||||
m_RgbBitmap = new wxStaticBitmap( sbSizerViewRGB->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 264,264 ), 0 );
|
||||
m_RgbBitmap->SetMinSize( wxSize( 264,264 ) );
|
||||
|
||||
sbSizerViewRGB->Add( m_RgbBitmap, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||
sbSizerViewRGB->Add( m_RgbBitmap, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND|wxSHAPED, 5 );
|
||||
|
||||
|
||||
sbSizerViewRGB->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
wxFlexGridSizer* fgSizerRGB;
|
||||
fgSizerRGB = new wxFlexGridSizer( 0, 3, 0, 0 );
|
||||
@@ -68,18 +71,18 @@ DIALOG_COLOR_PICKER_BASE::DIALOG_COLOR_PICKER_BASE( wxWindow* parent, wxWindowID
|
||||
sbSizerViewRGB->Add( fgSizerRGB, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerPanels->Add( sbSizerViewRGB, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
bSizerPanels->Add( sbSizerViewRGB, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
wxStaticBoxSizer* sbSizerViewHSV;
|
||||
sbSizerViewHSV = new wxStaticBoxSizer( new wxStaticBox( m_panelFreeColors, wxID_ANY, _("HSV") ), wxHORIZONTAL );
|
||||
|
||||
wxBoxSizer* bSizer10;
|
||||
bSizer10 = new wxBoxSizer( wxVERTICAL );
|
||||
sbSizerViewHSV = new wxStaticBoxSizer( new wxStaticBox( m_panelFreeColors, wxID_ANY, _("HSV") ), wxVERTICAL );
|
||||
|
||||
m_HsvBitmap = new wxStaticBitmap( sbSizerViewHSV->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 264,264 ), 0 );
|
||||
m_HsvBitmap->SetMinSize( wxSize( 264,264 ) );
|
||||
|
||||
bSizer10->Add( m_HsvBitmap, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||
sbSizerViewHSV->Add( m_HsvBitmap, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND|wxSHAPED, 5 );
|
||||
|
||||
|
||||
sbSizerViewHSV->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
wxFlexGridSizer* fgSizerHSV;
|
||||
fgSizerHSV = new wxFlexGridSizer( 0, 2, 0, 0 );
|
||||
@@ -103,26 +106,23 @@ DIALOG_COLOR_PICKER_BASE::DIALOG_COLOR_PICKER_BASE( wxWindow* parent, wxWindowID
|
||||
fgSizerHSV->Add( m_spinCtrlSaturation, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bSizer10->Add( fgSizerHSV, 0, wxEXPAND, 5 );
|
||||
sbSizerViewHSV->Add( fgSizerHSV, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
sbSizerViewHSV->Add( bSizer10, 0, wxEXPAND, 5 );
|
||||
bSizerPanels->Add( sbSizerViewHSV, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxBoxSizer* bSizerBright;
|
||||
bSizerBright = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_staticTextBright = new wxStaticText( sbSizerViewHSV->GetStaticBox(), wxID_ANY, _("Value:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextBright = new wxStaticText( m_panelFreeColors, wxID_ANY, _("Value:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextBright->Wrap( -1 );
|
||||
bSizerBright->Add( m_staticTextBright, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||
|
||||
m_sliderBrightness = new wxSlider( sbSizerViewHSV->GetStaticBox(), wxID_ANY, 255, 0, 255, wxDefaultPosition, wxDefaultSize, wxSL_INVERSE|wxSL_LABELS|wxSL_LEFT|wxSL_VERTICAL );
|
||||
m_sliderBrightness = new wxSlider( m_panelFreeColors, wxID_ANY, 255, 0, 255, wxDefaultPosition, wxDefaultSize, wxSL_INVERSE|wxSL_LABELS|wxSL_LEFT|wxSL_VERTICAL );
|
||||
bSizerBright->Add( m_sliderBrightness, 1, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxTOP, 5 );
|
||||
|
||||
|
||||
sbSizerViewHSV->Add( bSizerBright, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerPanels->Add( sbSizerViewHSV, 0, wxEXPAND|wxBOTTOM|wxRIGHT, 5 );
|
||||
bSizerPanels->Add( bSizerBright, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerUpperFreeColors->Add( bSizerPanels, 1, wxEXPAND, 5 );
|
||||
@@ -153,7 +153,7 @@ DIALOG_COLOR_PICKER_BASE::DIALOG_COLOR_PICKER_BASE( wxWindow* parent, wxWindowID
|
||||
m_SizerDefinedColors->Fit( m_panelDefinedColors );
|
||||
m_notebook->AddPage( m_panelDefinedColors, _("Defined Colors"), false );
|
||||
|
||||
bSizerUpperMain->Add( m_notebook, 0, wxEXPAND | wxALL, 5 );
|
||||
bSizerUpperMain->Add( m_notebook, 1, wxEXPAND | wxALL, 5 );
|
||||
|
||||
m_SizerTransparency = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
@@ -171,35 +171,29 @@ DIALOG_COLOR_PICKER_BASE::DIALOG_COLOR_PICKER_BASE( wxWindow* parent, wxWindowID
|
||||
bSizerUpperMain->Add( m_SizerTransparency, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bSizerUpperMain->Add( 0, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bSizerMain->Add( bSizerUpperMain, 0, wxEXPAND, 5 );
|
||||
bSizerMain->Add( bSizerUpperMain, 1, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bButtonsSizer;
|
||||
bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_staticTextOldColor = new wxStaticText( this, wxID_ANY, _("Preview (old/new):"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextOldColor->Wrap( -1 );
|
||||
bButtonsSizer->Add( m_staticTextOldColor, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
bButtonsSizer->Add( m_staticTextOldColor, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_OldColorRect = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
|
||||
m_OldColorRect->SetMinSize( wxSize( 24,24 ) );
|
||||
|
||||
bButtonsSizer->Add( m_OldColorRect, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
bButtonsSizer->Add( m_OldColorRect, 0, wxALIGN_CENTER_VERTICAL|wxSHAPED, 5 );
|
||||
|
||||
m_NewColorRect = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
|
||||
m_NewColorRect->SetMinSize( wxSize( 24,24 ) );
|
||||
|
||||
bButtonsSizer->Add( m_NewColorRect, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
bButtonsSizer->Add( 10, 0, 0, wxEXPAND, 5 );
|
||||
bButtonsSizer->Add( m_NewColorRect, 0, wxALIGN_CENTER_VERTICAL|wxSHAPED, 5 );
|
||||
|
||||
m_colorValue = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_colorValue->SetMinSize( wxSize( 176,-1 ) );
|
||||
|
||||
bButtonsSizer->Add( m_colorValue, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
bButtonsSizer->Add( m_colorValue, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
|
||||
bButtonsSizer->Add( 20, 0, 0, wxEXPAND, 5 );
|
||||
@@ -217,7 +211,7 @@ DIALOG_COLOR_PICKER_BASE::DIALOG_COLOR_PICKER_BASE( wxWindow* parent, wxWindowID
|
||||
bButtonsSizer->Add( m_sdbSizer, 1, wxALL, 5 );
|
||||
|
||||
|
||||
bSizerMain->Add( bButtonsSizer, 1, wxEXPAND|wxLEFT, 10 );
|
||||
bSizerMain->Add( bButtonsSizer, 0, wxEXPAND|wxLEFT, 10 );
|
||||
|
||||
|
||||
this->SetSizer( bSizerMain );
|
||||
@@ -234,6 +228,7 @@ DIALOG_COLOR_PICKER_BASE::DIALOG_COLOR_PICKER_BASE( wxWindow* parent, wxWindowID
|
||||
m_spinCtrlBlue->Connect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( DIALOG_COLOR_PICKER_BASE::OnChangeEditBlue ), NULL, this );
|
||||
m_HsvBitmap->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_COLOR_PICKER_BASE::onHSVMouseClick ), NULL, this );
|
||||
m_HsvBitmap->Connect( wxEVT_MOTION, wxMouseEventHandler( DIALOG_COLOR_PICKER_BASE::onHSVMouseDrag ), NULL, this );
|
||||
m_HsvBitmap->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_COLOR_PICKER_BASE::onSize ), NULL, this );
|
||||
m_spinCtrlHue->Connect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( DIALOG_COLOR_PICKER_BASE::OnChangeEditHue ), NULL, this );
|
||||
m_spinCtrlSaturation->Connect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( DIALOG_COLOR_PICKER_BASE::OnChangeEditSat ), NULL, this );
|
||||
m_sliderBrightness->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( DIALOG_COLOR_PICKER_BASE::OnChangeBrightness ), NULL, this );
|
||||
@@ -268,6 +263,7 @@ DIALOG_COLOR_PICKER_BASE::~DIALOG_COLOR_PICKER_BASE()
|
||||
m_spinCtrlBlue->Disconnect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( DIALOG_COLOR_PICKER_BASE::OnChangeEditBlue ), NULL, this );
|
||||
m_HsvBitmap->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_COLOR_PICKER_BASE::onHSVMouseClick ), NULL, this );
|
||||
m_HsvBitmap->Disconnect( wxEVT_MOTION, wxMouseEventHandler( DIALOG_COLOR_PICKER_BASE::onHSVMouseDrag ), NULL, this );
|
||||
m_HsvBitmap->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_COLOR_PICKER_BASE::onSize ), NULL, this );
|
||||
m_spinCtrlHue->Disconnect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( DIALOG_COLOR_PICKER_BASE::OnChangeEditHue ), NULL, this );
|
||||
m_spinCtrlSaturation->Disconnect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( DIALOG_COLOR_PICKER_BASE::OnChangeEditSat ), NULL, this );
|
||||
m_sliderBrightness->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( DIALOG_COLOR_PICKER_BASE::OnChangeBrightness ), NULL, this );
|
||||
|
||||
+1767
-1752
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
|
||||
// C++ code generated with wxFormBuilder (version 4.1.0-0-g733bf3d)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@@ -81,6 +81,7 @@ class DIALOG_COLOR_PICKER_BASE : public DIALOG_SHIM
|
||||
virtual void OnChangeEditBlue( wxSpinEvent& event ) { event.Skip(); }
|
||||
virtual void onHSVMouseClick( wxMouseEvent& event ) { event.Skip(); }
|
||||
virtual void onHSVMouseDrag( wxMouseEvent& event ) { event.Skip(); }
|
||||
virtual void onSize( wxSizeEvent& event ) { event.Skip(); }
|
||||
virtual void OnChangeEditHue( wxSpinEvent& event ) { event.Skip(); }
|
||||
virtual void OnChangeEditSat( wxSpinEvent& event ) { event.Skip(); }
|
||||
virtual void OnChangeBrightness( wxScrollEvent& event ) { event.Skip(); }
|
||||
|
||||
@@ -26,8 +26,10 @@
|
||||
|
||||
#include <bitmaps.h>
|
||||
#include <confirm.h>
|
||||
#include <kidialog.h>
|
||||
#include <validators.h>
|
||||
#include <dialogs/html_message_box.h>
|
||||
#include <settings/common_settings.h>
|
||||
#include <filename_resolver.h>
|
||||
#include <env_vars.h>
|
||||
#include <grid_tricks.h>
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <wx/statline.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/sizer.h>
|
||||
|
||||
#include <dialogs/dialog_edit_library_tables.h>
|
||||
|
||||
@@ -43,6 +43,9 @@ void DIALOG_EDIT_LIBRARY_TABLES::InstallPanel( wxPanel* aPanel )
|
||||
auto mainSizer = new wxBoxSizer( wxVERTICAL );
|
||||
SetSizer( mainSizer );
|
||||
|
||||
m_infoBar = new WX_INFOBAR( this );
|
||||
mainSizer->Add( m_infoBar, 0, wxEXPAND, 0 );
|
||||
|
||||
mainSizer->Add( m_contentPanel, 1, wxEXPAND|wxLEFT|wxTOP|wxRIGHT, 5 );
|
||||
m_contentPanel->SetMinSize( FromDIP( wxSize( 1000, 600 ) ) );
|
||||
|
||||
|
||||
@@ -22,8 +22,7 @@
|
||||
*/
|
||||
|
||||
#include <bitmaps.h>
|
||||
#include <confirm.h>
|
||||
#include <wx/textdlg.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <dialogs/dialog_grid_settings.h>
|
||||
#include <widgets/std_bitmap_button.h>
|
||||
#include <common.h>
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <dialogs/dialog_hotkey_list.h>
|
||||
#include <kiface_base.h>
|
||||
#include <eda_base_frame.h>
|
||||
#include <panel_hotkeys_editor.h>
|
||||
#include <widgets/ui_common.h>
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include <bitmaps.h>
|
||||
#include <base_screen.h>
|
||||
#include <common.h> // ExpandEnvVarSubstitutions
|
||||
#include <confirm.h>
|
||||
#include <core/arraydim.h>
|
||||
#include <dialogs/dialog_page_settings.h>
|
||||
#include <eda_draw_frame.h>
|
||||
@@ -43,6 +42,7 @@
|
||||
#include <wx/tokenzr.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/dcmemory.h>
|
||||
#include <wx/msgdlg.h>
|
||||
|
||||
#define MAX_PAGE_EXAMPLE_SIZE 200
|
||||
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
|
||||
#include <dialogs/dialog_print_generic.h>
|
||||
|
||||
#include <confirm.h>
|
||||
#include <eda_draw_frame.h>
|
||||
#include <printout.h>
|
||||
#include <pgm_base.h>
|
||||
#include <confirm.h>
|
||||
|
||||
#include <wx/print.h>
|
||||
#include <wx/printdlg.h>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.0-4761b0c5)
|
||||
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@@ -15,17 +15,16 @@ WX_TEXT_ENTRY_DIALOG_BASE::WX_TEXT_ENTRY_DIALOG_BASE( wxWindow* parent, wxWindow
|
||||
|
||||
m_mainSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxBoxSizer* bSizerContent;
|
||||
bSizerContent = new wxBoxSizer( wxVERTICAL );
|
||||
m_ContentSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_label = new wxStaticText( this, wxID_ANY, _("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_label->Wrap( -1 );
|
||||
bSizerContent->Add( m_label, 0, wxALL|wxEXPAND, 5 );
|
||||
m_ContentSizer->Add( m_label, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_textCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_textCtrl->SetMinSize( wxSize( 300,-1 ) );
|
||||
|
||||
bSizerContent->Add( m_textCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
m_ContentSizer->Add( m_textCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bSizer3;
|
||||
bSizer3 = new wxBoxSizer( wxHORIZONTAL );
|
||||
@@ -44,10 +43,10 @@ WX_TEXT_ENTRY_DIALOG_BASE::WX_TEXT_ENTRY_DIALOG_BASE( wxWindow* parent, wxWindow
|
||||
bSizer3->Add( m_choice, 3, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
|
||||
bSizerContent->Add( bSizer3, 1, wxEXPAND, 5 );
|
||||
m_ContentSizer->Add( bSizer3, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_mainSizer->Add( bSizerContent, 1, wxALL|wxEXPAND, 5 );
|
||||
m_mainSizer->Add( m_ContentSizer, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_sdbSizer1 = new wxStdDialogButtonSizer();
|
||||
m_sdbSizer1OK = new wxButton( this, wxID_OK );
|
||||
|
||||
@@ -1,357 +1,362 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<wxFormBuilder_Project>
|
||||
<FileVersion major="1" minor="16" />
|
||||
<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_text_entry_base</property>
|
||||
<property name="first_id">1000</property>
|
||||
<property name="help_provider">none</property>
|
||||
<property name="image_path_wrapper_function_name"></property>
|
||||
<property name="indent_with_spaces"></property>
|
||||
<property name="internationalize">1</property>
|
||||
<property name="name">dialog_text_entry_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_array_enum">0</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">wxBOTH</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>
|
||||
<FileVersion major="1" minor="17"/>
|
||||
<object class="Project" expanded="true">
|
||||
<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_text_entry_base</property>
|
||||
<property name="first_id">1000</property>
|
||||
<property name="help_provider">none</property>
|
||||
<property name="image_path_wrapper_function_name"></property>
|
||||
<property name="indent_with_spaces"></property>
|
||||
<property name="internationalize">1</property>
|
||||
<property name="name">dialog_text_entry_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_array_enum">0</property>
|
||||
<property name="use_enum">0</property>
|
||||
<property name="use_microsoft_bom">0</property>
|
||||
<object class="Dialog" expanded="true">
|
||||
<property name="aui_managed">0</property>
|
||||
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
|
||||
<property name="bg"></property>
|
||||
<property name="center">wxBOTH</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="drag_accept_files">0</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">WX_TEXT_ENTRY_DIALOG_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"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="two_step_creation">0</property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<object class="wxBoxSizer" expanded="true">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_mainSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">protected</property>
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="true">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">WX_TEXT_ENTRY_DIALOG_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"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="two_step_creation">0</property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="name">m_ContentSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">public</property>
|
||||
<object class="sizeritem" expanded="false">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="false">
|
||||
<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="drag_accept_files">0</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">MyLabel</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_mainSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_label</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizerContent</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">MyLabel</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_label</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="0">
|
||||
<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="maxlength"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size">300,-1</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_textCtrl</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="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer3</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">1</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">MyLabel</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_choiceLabel</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">3</property>
|
||||
<object class="wxChoice" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="choices"></property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">1</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_choice</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="selection">0</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>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStdDialogButtonSizer" expanded="0">
|
||||
<property name="Apply">0</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_sdbSizer1</property>
|
||||
<property name="permission">protected</property>
|
||||
</object>
|
||||
</object>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="false">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="false">
|
||||
<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="drag_accept_files">0</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="maxlength"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size">300,-1</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_textCtrl</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="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="true">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer3</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="true">
|
||||
<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="drag_accept_files">0</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">1</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">MyLabel</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_choiceLabel</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">3</property>
|
||||
<object class="wxChoice" expanded="true">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="choices"></property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</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">1</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_choice</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="selection">0</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>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="false">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStdDialogButtonSizer" expanded="false">
|
||||
<property name="Apply">0</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_sdbSizer1</property>
|
||||
<property name="permission">protected</property>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</wxFormBuilder_Project>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.0-4761b0c5)
|
||||
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@@ -44,6 +44,7 @@ class WX_TEXT_ENTRY_DIALOG_BASE : public DIALOG_SHIM
|
||||
wxButton* m_sdbSizer1Cancel;
|
||||
|
||||
public:
|
||||
wxBoxSizer* m_ContentSizer;
|
||||
|
||||
WX_TEXT_ENTRY_DIALOG_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include <algorithm>
|
||||
#include <set>
|
||||
#include <bitmaps.h>
|
||||
#include <string_utils.h>
|
||||
#include <dialogs/eda_reorderable_list_dialog.h>
|
||||
|
||||
@@ -26,9 +26,13 @@
|
||||
|
||||
#include <dialog_shim.h>
|
||||
#include <git2.h>
|
||||
#include <vector>
|
||||
|
||||
class wxCheckBox;
|
||||
class wxTextCtrl;
|
||||
class wxListCtrl;
|
||||
class wxButton;
|
||||
|
||||
class DIALOG_GIT_COMMIT : public DIALOG_SHIM
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -45,8 +45,7 @@ DIALOG_GIT_REPOSITORY::DIALOG_GIT_REPOSITORY( wxWindow* aParent, git_repository*
|
||||
m_tested( 0 ),
|
||||
m_failedTest( false ),
|
||||
m_testError( wxEmptyString ),
|
||||
m_tempRepo( false ),
|
||||
m_repoType( KIGIT_COMMON::GIT_CONN_TYPE::GIT_CONN_LOCAL )
|
||||
m_tempRepo( false )
|
||||
{
|
||||
m_txtURL->SetFocus();
|
||||
|
||||
@@ -56,7 +55,8 @@ DIALOG_GIT_REPOSITORY::DIALOG_GIT_REPOSITORY( wxWindow* aParent, git_repository*
|
||||
m_tempRepo = true;
|
||||
m_tempPath = wxFileName::CreateTempFileName( "kicadtestrepo" );
|
||||
|
||||
git_repository_init_options options = GIT_REPOSITORY_INIT_OPTIONS_INIT;
|
||||
git_repository_init_options options;
|
||||
git_repository_init_init_options( &options, GIT_REPOSITORY_INIT_OPTIONS_VERSION );
|
||||
options.flags = GIT_REPOSITORY_INIT_MKPATH | GIT_REPOSITORY_INIT_NO_REINIT;
|
||||
git_repository_init_ext( &m_repository, m_tempPath.ToStdString().c_str(), &options );
|
||||
}
|
||||
@@ -260,7 +260,8 @@ void DIALOG_GIT_REPOSITORY::updateURLData()
|
||||
void DIALOG_GIT_REPOSITORY::OnTestClick( wxCommandEvent& event )
|
||||
{
|
||||
git_remote* remote = nullptr;
|
||||
git_remote_callbacks callbacks = GIT_REMOTE_CALLBACKS_INIT;
|
||||
git_remote_callbacks callbacks;
|
||||
git_remote_init_callbacks( &callbacks, GIT_REMOTE_CALLBACKS_VERSION );
|
||||
|
||||
// We track if we have already tried to connect.
|
||||
// If we have, the server may come back to offer another connection
|
||||
|
||||
@@ -121,8 +121,6 @@ private:
|
||||
|
||||
bool m_tempRepo;
|
||||
wxString m_tempPath;
|
||||
|
||||
KIGIT_COMMON::GIT_CONN_TYPE m_repoType;
|
||||
};
|
||||
|
||||
#endif /* DIALOG_GIT_REPOSITORY_H_ */
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <wx/listctrl.h>
|
||||
#include <wx/event.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/timer.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/textctrl.h>
|
||||
|
||||
|
||||
@@ -26,12 +26,12 @@
|
||||
#define DIALOG_GIT_SWITCH_H
|
||||
|
||||
#include <dialog_shim.h>
|
||||
#include <wx/timer.h>
|
||||
#include <git2.h>
|
||||
|
||||
class wxButton;
|
||||
class wxListView;
|
||||
class wxTextCtrl;
|
||||
class wxTimer;
|
||||
class wxListEvent;
|
||||
|
||||
struct BranchData
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <wx/bmpbuttn.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/log.h>
|
||||
|
||||
|
||||
PANEL_GIT_REPOS::PANEL_GIT_REPOS( wxWindow* aParent ) : PANEL_GIT_REPOS_BASE( aParent)
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <eda_view_switcher_base.h>
|
||||
|
||||
class EDA_DRAW_FRAME;
|
||||
class wxTimer;
|
||||
|
||||
/**
|
||||
* Similar to EDA_VIEW_SWITCHER, this dialog is a popup that shows feedback when using a hotkey to
|
||||
|
||||
@@ -27,10 +27,12 @@
|
||||
#include <settings/common_settings.h>
|
||||
#include <settings/settings_manager.h>
|
||||
#include <validators.h>
|
||||
#include <widgets/ui_common.h>
|
||||
#include <widgets/color_swatch.h>
|
||||
#include <widgets/wx_panel.h>
|
||||
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/menu.h>
|
||||
#include <wx/textdlg.h>
|
||||
|
||||
// Button ID starting point
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf-dirty)
|
||||
// C++ code generated with wxFormBuilder (version 4.1.0-0-g733bf3d)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@@ -396,7 +396,7 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
|
||||
m_staticText9->Wrap( -1 );
|
||||
m_staticText9->SetToolTip( _("How many backup files total to keep (set to 0 for no limit)") );
|
||||
|
||||
gbSizer3->Add( m_staticText9, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
|
||||
gbSizer3->Add( m_staticText9, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
m_backupLimitTotalFiles = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 1000, 0 );
|
||||
gbSizer3->Add( m_backupLimitTotalFiles, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
@@ -408,7 +408,7 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
|
||||
gbSizer3->Add( m_staticText10, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
m_backupLimitDailyFiles = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 1000, 0 );
|
||||
gbSizer3->Add( m_backupLimitDailyFiles, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
gbSizer3->Add( m_backupLimitDailyFiles, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_staticText11 = new wxStaticText( this, wxID_ANY, _("Minimum time between backups:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText11->Wrap( -1 );
|
||||
@@ -427,7 +427,7 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
|
||||
m_staticText16->Wrap( -1 );
|
||||
m_staticText16->SetToolTip( _("If the total size of backup files grows above this limit, old backups will be deleted (set to 0 for no limit)") );
|
||||
|
||||
gbSizer3->Add( m_staticText16, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||
gbSizer3->Add( m_staticText16, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
m_backupLimitTotalSize = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 1000, 0 );
|
||||
gbSizer3->Add( m_backupLimitTotalSize, wxGBPosition( 5, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
|
||||
@@ -4036,7 +4036,7 @@
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">1</property>
|
||||
<property name="column">0</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT</property>
|
||||
<property name="row">2</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxStaticText" expanded="false">
|
||||
@@ -4232,7 +4232,7 @@
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">1</property>
|
||||
<property name="column">1</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="row">3</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxSpinCtrl" expanded="false">
|
||||
@@ -4494,7 +4494,7 @@
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">1</property>
|
||||
<property name="column">0</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT</property>
|
||||
<property name="row">5</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxStaticText" expanded="false">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf-dirty)
|
||||
// C++ code generated with wxFormBuilder (version 4.1.0-0-g733bf3d)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
||||
@@ -22,12 +22,12 @@
|
||||
*/
|
||||
|
||||
#include <bitmaps.h>
|
||||
#include <confirm.h>
|
||||
#include <wx/textdlg.h>
|
||||
#include <dialogs/panel_grid_settings.h>
|
||||
#include <dialogs/dialog_grid_settings.h>
|
||||
#include <widgets/std_bitmap_button.h>
|
||||
#include <common.h>
|
||||
#include <confirm.h>
|
||||
#include <settings/app_settings.h>
|
||||
#include <eda_draw_frame.h>
|
||||
#include <tool/tool_manager.h>
|
||||
|
||||
@@ -23,11 +23,12 @@
|
||||
*/
|
||||
|
||||
#include <wx/dcclient.h>
|
||||
#include <confirm.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <bitmap_base.h>
|
||||
#include <pcb_base_edit_frame.h>
|
||||
#include <tool/tool_manager.h>
|
||||
#include <tool/actions.h>
|
||||
#include <confirm.h>
|
||||
|
||||
#include <dialogs/panel_image_editor.h>
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include <eda_draw_frame.h>
|
||||
#include <bitmaps.h>
|
||||
#include <netclass.h>
|
||||
#include <confirm.h>
|
||||
#include <gal/painter.h>
|
||||
#include <grid_tricks.h>
|
||||
#include <dialogs/panel_setup_netclasses.h>
|
||||
@@ -43,6 +42,7 @@
|
||||
#include <widgets/wx_panel.h>
|
||||
#include <widgets/std_bitmap_button.h>
|
||||
#include <project/net_settings.h>
|
||||
#include <confirm.h>
|
||||
|
||||
|
||||
// columns of netclasses grid
|
||||
@@ -119,6 +119,8 @@ PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( wxWindow* aParentWindow, EDA_DRA
|
||||
|
||||
m_splitter->SetMinimumPaneSize( FromDIP( m_splitter->GetMinimumPaneSize() ) );
|
||||
|
||||
wxASSERT( m_netclassGrid->GetNumberCols() == GRID_END );
|
||||
|
||||
// Calculate a min best size to handle longest usual numeric values:
|
||||
int const min_best_width = m_netclassGrid->GetTextExtent( "555,555555 mils" ).x;
|
||||
|
||||
@@ -131,37 +133,25 @@ PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( wxWindow* aParentWindow, EDA_DRA
|
||||
int const weighted_min_best_width = ( i == GRID_LINESTYLE ) ? min_best_width * 3 / 2
|
||||
: min_best_width;
|
||||
|
||||
m_netclassGrid->SetColMinimalWidth( i, min_width );
|
||||
|
||||
// We use a "best size" >= min_best_width
|
||||
m_originalColWidths[ i ] = std::max( min_width, weighted_min_best_width );
|
||||
m_netclassGrid->SetColSize( i, m_originalColWidths[ i ] );
|
||||
}
|
||||
|
||||
for( int i = GRID_FIRST_PCBNEW; i < GRID_END; ++i )
|
||||
{
|
||||
if( i >= GRID_FIRST_EESCHEMA )
|
||||
{
|
||||
m_netclassGrid->SetUnitsProvider( m_schUnitsProvider.get(), i );
|
||||
|
||||
if( !m_isEEschema )
|
||||
{
|
||||
m_netclassGrid->HideCol( i );
|
||||
m_originalColWidths[ i ] = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_netclassGrid->SetUnitsProvider( m_pcbUnitsProvider.get(), i );
|
||||
|
||||
if( m_isEEschema )
|
||||
{
|
||||
m_netclassGrid->HideCol( i );
|
||||
m_originalColWidths[ i ] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
COMMON_SETTINGS* cfg = Pgm().GetCommonSettings();
|
||||
|
||||
if( m_isEEschema )
|
||||
m_netclassGrid->ShowHideColumns( cfg->m_NetclassPanel.eeschema_visible_columns );
|
||||
else
|
||||
m_netclassGrid->ShowHideColumns( cfg->m_NetclassPanel.pcbnew_visible_columns );
|
||||
|
||||
m_shownColumns = m_netclassGrid->GetShownColumns();
|
||||
|
||||
wxGridCellAttr* attr = new wxGridCellAttr;
|
||||
attr->SetRenderer( new GRID_CELL_COLOR_RENDERER( PAGED_DIALOG::GetDialog( this ) ) );
|
||||
attr->SetEditor( new GRID_CELL_COLOR_SELECTOR( PAGED_DIALOG::GetDialog( this ),
|
||||
@@ -170,8 +160,8 @@ PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( wxWindow* aParentWindow, EDA_DRA
|
||||
|
||||
attr = new wxGridCellAttr;
|
||||
attr->SetRenderer( new GRID_CELL_COLOR_RENDERER( PAGED_DIALOG::GetDialog( this ) ) );
|
||||
attr->SetEditor(
|
||||
new GRID_CELL_COLOR_SELECTOR( PAGED_DIALOG::GetDialog( this ), m_netclassGrid ) );
|
||||
attr->SetEditor( new GRID_CELL_COLOR_SELECTOR( PAGED_DIALOG::GetDialog( this ),
|
||||
m_netclassGrid ) );
|
||||
m_netclassGrid->SetColAttr( GRID_PCB_COLOR, attr );
|
||||
|
||||
attr = new wxGridCellAttr;
|
||||
@@ -218,7 +208,6 @@ PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( wxWindow* aParentWindow, EDA_DRA
|
||||
m_netclassGrid->SetSelectionMode( wxGrid::wxGridSelectRows );
|
||||
m_assignmentGrid->SetSelectionMode( wxGrid::wxGridSelectRows );
|
||||
|
||||
COMMON_SETTINGS* cfg = Pgm().GetCommonSettings();
|
||||
m_splitter->SetSashPosition( cfg->m_NetclassPanel.sash_pos );
|
||||
|
||||
m_addButton->SetBitmap( KiBitmapBundle( BITMAPS::small_plus ) );
|
||||
@@ -267,6 +256,11 @@ PANEL_SETUP_NETCLASSES::~PANEL_SETUP_NETCLASSES()
|
||||
COMMON_SETTINGS* cfg = Pgm().GetCommonSettings();
|
||||
cfg->m_NetclassPanel.sash_pos = m_splitter->GetSashPosition();
|
||||
|
||||
if( m_isEEschema )
|
||||
cfg->m_NetclassPanel.eeschema_visible_columns = m_netclassGrid->GetShownColumnsAsString();
|
||||
else
|
||||
cfg->m_NetclassPanel.pcbnew_visible_columns = m_netclassGrid->GetShownColumnsAsString();
|
||||
|
||||
// Delete the GRID_TRICKS.
|
||||
m_netclassGrid->PopEventHandler( true );
|
||||
m_assignmentGrid->PopEventHandler( true );
|
||||
@@ -282,6 +276,7 @@ PANEL_SETUP_NETCLASSES::~PANEL_SETUP_NETCLASSES()
|
||||
void PANEL_SETUP_NETCLASSES::loadNetclasses()
|
||||
{
|
||||
KIGFX::PCB_RENDER_SETTINGS* rs = nullptr;
|
||||
|
||||
if( !m_isEEschema )
|
||||
{
|
||||
rs = static_cast<KIGFX::PCB_RENDER_SETTINGS*>(
|
||||
@@ -290,55 +285,53 @@ void PANEL_SETUP_NETCLASSES::loadNetclasses()
|
||||
|
||||
int row = 0;
|
||||
|
||||
auto netclassToGridRow = [&]( int aRow, const std::shared_ptr<NETCLASS>& nc, bool isDefault )
|
||||
{
|
||||
m_netclassGrid->SetCellValue( aRow, GRID_NAME, nc->GetName() );
|
||||
|
||||
m_netclassGrid->SetUnitValue( aRow, GRID_WIREWIDTH, nc->GetWireWidth() );
|
||||
m_netclassGrid->SetUnitValue( aRow, GRID_BUSWIDTH, nc->GetBusWidth() );
|
||||
|
||||
wxString colorAsString = nc->GetSchematicColor().ToCSSString();
|
||||
m_netclassGrid->SetCellValue( aRow, GRID_SCHEMATIC_COLOR, colorAsString );
|
||||
|
||||
int lineStyleIdx = std::max( 0, nc->GetLineStyle() );
|
||||
|
||||
if( lineStyleIdx >= (int) g_lineStyleNames.size() )
|
||||
lineStyleIdx = 0;
|
||||
|
||||
m_netclassGrid->SetCellValue( aRow, GRID_LINESTYLE, g_lineStyleNames[lineStyleIdx] );
|
||||
m_netclassGrid->SetUnitValue( aRow, GRID_CLEARANCE, nc->GetClearance() );
|
||||
m_netclassGrid->SetUnitValue( aRow, GRID_TRACKSIZE, nc->GetTrackWidth() );
|
||||
m_netclassGrid->SetUnitValue( aRow, GRID_VIASIZE, nc->GetViaDiameter() );
|
||||
m_netclassGrid->SetUnitValue( aRow, GRID_VIADRILL, nc->GetViaDrill() );
|
||||
m_netclassGrid->SetUnitValue( aRow, GRID_uVIASIZE, nc->GetuViaDiameter() );
|
||||
m_netclassGrid->SetUnitValue( aRow, GRID_uVIADRILL, nc->GetuViaDrill() );
|
||||
m_netclassGrid->SetUnitValue( aRow, GRID_DIFF_PAIR_WIDTH, nc->GetDiffPairWidth() );
|
||||
m_netclassGrid->SetUnitValue( aRow, GRID_DIFF_PAIR_GAP, nc->GetDiffPairGap() );
|
||||
|
||||
colorAsString = KIGFX::COLOR4D( 0.0, 0.0, 0.0, 0.0 ).ToCSSString();
|
||||
|
||||
if( m_isEEschema )
|
||||
{
|
||||
colorAsString = nc->GetPcbColor().ToCSSString();
|
||||
}
|
||||
|
||||
if( rs )
|
||||
{
|
||||
std::map<wxString, KIGFX::COLOR4D>& netclassColors = rs->GetNetclassColorMap();
|
||||
if( netclassColors.find( nc->GetName() ) != netclassColors.end() )
|
||||
auto netclassToGridRow =
|
||||
[&]( int aRow, const std::shared_ptr<NETCLASS>& nc, bool isDefault )
|
||||
{
|
||||
colorAsString = netclassColors[nc->GetName()].ToCSSString();
|
||||
}
|
||||
}
|
||||
m_netclassGrid->SetCellValue( aRow, GRID_NAME, nc->GetName() );
|
||||
|
||||
if( isDefault )
|
||||
{
|
||||
colorAsString = KIGFX::COLOR4D( 0.0, 0.0, 0.0, 0.0 ).ToCSSString();
|
||||
m_netclassGrid->SetReadOnly( aRow, GRID_PCB_COLOR );
|
||||
}
|
||||
m_netclassGrid->SetUnitValue( aRow, GRID_WIREWIDTH, nc->GetWireWidth() );
|
||||
m_netclassGrid->SetUnitValue( aRow, GRID_BUSWIDTH, nc->GetBusWidth() );
|
||||
|
||||
m_netclassGrid->SetCellValue( aRow, GRID_PCB_COLOR, colorAsString );
|
||||
};
|
||||
wxString colorAsString = nc->GetSchematicColor().ToCSSString();
|
||||
m_netclassGrid->SetCellValue( aRow, GRID_SCHEMATIC_COLOR, colorAsString );
|
||||
|
||||
int lineStyleIdx = std::max( 0, nc->GetLineStyle() );
|
||||
|
||||
if( lineStyleIdx >= (int) g_lineStyleNames.size() )
|
||||
lineStyleIdx = 0;
|
||||
|
||||
m_netclassGrid->SetCellValue( aRow, GRID_LINESTYLE, g_lineStyleNames[lineStyleIdx] );
|
||||
m_netclassGrid->SetUnitValue( aRow, GRID_CLEARANCE, nc->GetClearance() );
|
||||
m_netclassGrid->SetUnitValue( aRow, GRID_TRACKSIZE, nc->GetTrackWidth() );
|
||||
m_netclassGrid->SetUnitValue( aRow, GRID_VIASIZE, nc->GetViaDiameter() );
|
||||
m_netclassGrid->SetUnitValue( aRow, GRID_VIADRILL, nc->GetViaDrill() );
|
||||
m_netclassGrid->SetUnitValue( aRow, GRID_uVIASIZE, nc->GetuViaDiameter() );
|
||||
m_netclassGrid->SetUnitValue( aRow, GRID_uVIADRILL, nc->GetuViaDrill() );
|
||||
m_netclassGrid->SetUnitValue( aRow, GRID_DIFF_PAIR_WIDTH, nc->GetDiffPairWidth() );
|
||||
m_netclassGrid->SetUnitValue( aRow, GRID_DIFF_PAIR_GAP, nc->GetDiffPairGap() );
|
||||
|
||||
colorAsString = KIGFX::COLOR4D( 0.0, 0.0, 0.0, 0.0 ).ToCSSString();
|
||||
|
||||
if( m_isEEschema )
|
||||
colorAsString = nc->GetPcbColor().ToCSSString();
|
||||
|
||||
if( rs )
|
||||
{
|
||||
std::map<wxString, KIGFX::COLOR4D>& netclassColors = rs->GetNetclassColorMap();
|
||||
|
||||
if( netclassColors.find( nc->GetName() ) != netclassColors.end() )
|
||||
colorAsString = netclassColors[nc->GetName()].ToCSSString();
|
||||
}
|
||||
|
||||
if( isDefault )
|
||||
{
|
||||
colorAsString = KIGFX::COLOR4D( 0.0, 0.0, 0.0, 0.0 ).ToCSSString();
|
||||
m_netclassGrid->SetReadOnly( aRow, GRID_PCB_COLOR );
|
||||
}
|
||||
|
||||
m_netclassGrid->SetCellValue( aRow, GRID_PCB_COLOR, colorAsString );
|
||||
};
|
||||
|
||||
m_netclassGrid->ClearRows();
|
||||
|
||||
@@ -444,56 +437,51 @@ bool PANEL_SETUP_NETCLASSES::TransferDataFromWindow()
|
||||
|
||||
int row = 0;
|
||||
|
||||
auto gridRowToNetclass = [&]( int aRow, const std::shared_ptr<NETCLASS>& nc, bool isDefault )
|
||||
{
|
||||
nc->SetName( m_netclassGrid->GetCellValue( aRow, GRID_NAME ) );
|
||||
|
||||
nc->SetWireWidth( m_netclassGrid->GetUnitValue( aRow, GRID_WIREWIDTH ) );
|
||||
nc->SetBusWidth( m_netclassGrid->GetUnitValue( aRow, GRID_BUSWIDTH ) );
|
||||
|
||||
wxString color = m_netclassGrid->GetCellValue( aRow, GRID_SCHEMATIC_COLOR );
|
||||
nc->SetSchematicColor( wxColour( color ) );
|
||||
|
||||
wxString lineStyle = m_netclassGrid->GetCellValue( aRow, GRID_LINESTYLE );
|
||||
nc->SetLineStyle( g_lineStyleNames.Index( lineStyle ) );
|
||||
wxASSERT_MSG( nc->GetLineStyle() >= 0, "Line style name not found." );
|
||||
|
||||
nc->SetClearance( m_netclassGrid->GetUnitValue( aRow, GRID_CLEARANCE ) );
|
||||
nc->SetTrackWidth( m_netclassGrid->GetUnitValue( aRow, GRID_TRACKSIZE ) );
|
||||
nc->SetViaDiameter( m_netclassGrid->GetUnitValue( aRow, GRID_VIASIZE ) );
|
||||
nc->SetViaDrill( m_netclassGrid->GetUnitValue( aRow, GRID_VIADRILL ) );
|
||||
nc->SetuViaDiameter( m_netclassGrid->GetUnitValue( aRow, GRID_uVIASIZE ) );
|
||||
nc->SetuViaDrill( m_netclassGrid->GetUnitValue( aRow, GRID_uVIADRILL ) );
|
||||
nc->SetDiffPairWidth( m_netclassGrid->GetUnitValue( aRow, GRID_DIFF_PAIR_WIDTH ) );
|
||||
nc->SetDiffPairGap( m_netclassGrid->GetUnitValue( aRow, GRID_DIFF_PAIR_GAP ) );
|
||||
|
||||
if( !isDefault )
|
||||
{
|
||||
color = m_netclassGrid->GetCellValue( aRow, GRID_PCB_COLOR );
|
||||
KIGFX::COLOR4D newPcbColor( color );
|
||||
|
||||
if( newPcbColor != KIGFX::COLOR4D::UNSPECIFIED )
|
||||
auto gridRowToNetclass =
|
||||
[&]( int aRow, const std::shared_ptr<NETCLASS>& nc, bool isDefault )
|
||||
{
|
||||
nc->SetPcbColor( newPcbColor );
|
||||
}
|
||||
nc->SetName( m_netclassGrid->GetCellValue( aRow, GRID_NAME ) );
|
||||
|
||||
if( !m_isEEschema )
|
||||
{
|
||||
KIGFX::PCB_RENDER_SETTINGS* rs = static_cast<KIGFX::PCB_RENDER_SETTINGS*>(
|
||||
m_frame->GetCanvas()->GetView()->GetPainter()->GetSettings() );
|
||||
std::map<wxString, KIGFX::COLOR4D>& netclassColors = rs->GetNetclassColorMap();
|
||||
nc->SetWireWidth( m_netclassGrid->GetUnitValue( aRow, GRID_WIREWIDTH ) );
|
||||
nc->SetBusWidth( m_netclassGrid->GetUnitValue( aRow, GRID_BUSWIDTH ) );
|
||||
|
||||
if( newPcbColor != COLOR4D::UNSPECIFIED )
|
||||
wxString color = m_netclassGrid->GetCellValue( aRow, GRID_SCHEMATIC_COLOR );
|
||||
nc->SetSchematicColor( wxColour( color ) );
|
||||
|
||||
wxString lineStyle = m_netclassGrid->GetCellValue( aRow, GRID_LINESTYLE );
|
||||
nc->SetLineStyle( g_lineStyleNames.Index( lineStyle ) );
|
||||
wxASSERT_MSG( nc->GetLineStyle() >= 0, "Line style name not found." );
|
||||
|
||||
nc->SetClearance( m_netclassGrid->GetUnitValue( aRow, GRID_CLEARANCE ) );
|
||||
nc->SetTrackWidth( m_netclassGrid->GetUnitValue( aRow, GRID_TRACKSIZE ) );
|
||||
nc->SetViaDiameter( m_netclassGrid->GetUnitValue( aRow, GRID_VIASIZE ) );
|
||||
nc->SetViaDrill( m_netclassGrid->GetUnitValue( aRow, GRID_VIADRILL ) );
|
||||
nc->SetuViaDiameter( m_netclassGrid->GetUnitValue( aRow, GRID_uVIASIZE ) );
|
||||
nc->SetuViaDrill( m_netclassGrid->GetUnitValue( aRow, GRID_uVIADRILL ) );
|
||||
nc->SetDiffPairWidth( m_netclassGrid->GetUnitValue( aRow, GRID_DIFF_PAIR_WIDTH ) );
|
||||
nc->SetDiffPairGap( m_netclassGrid->GetUnitValue( aRow, GRID_DIFF_PAIR_GAP ) );
|
||||
|
||||
if( !isDefault )
|
||||
{
|
||||
netclassColors[nc->GetName()] = newPcbColor;
|
||||
color = m_netclassGrid->GetCellValue( aRow, GRID_PCB_COLOR );
|
||||
KIGFX::COLOR4D newPcbColor( color );
|
||||
|
||||
if( newPcbColor != KIGFX::COLOR4D::UNSPECIFIED )
|
||||
nc->SetPcbColor( newPcbColor );
|
||||
|
||||
if( !m_isEEschema )
|
||||
{
|
||||
KIGFX::PCB_RENDER_SETTINGS* rs = static_cast<KIGFX::PCB_RENDER_SETTINGS*>(
|
||||
m_frame->GetCanvas()->GetView()->GetPainter()->GetSettings() );
|
||||
std::map<wxString, KIGFX::COLOR4D>& netclassColors = rs->GetNetclassColorMap();
|
||||
|
||||
if( newPcbColor != COLOR4D::UNSPECIFIED )
|
||||
netclassColors[nc->GetName()] = newPcbColor;
|
||||
else
|
||||
netclassColors.erase( nc->GetName() );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
netclassColors.erase( nc->GetName() );
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
m_netSettings->m_NetClasses.clear();
|
||||
|
||||
@@ -516,14 +504,11 @@ bool PANEL_SETUP_NETCLASSES::TransferDataFromWindow()
|
||||
wxString netclass = m_assignmentGrid->GetCellValue( row, 1 );
|
||||
|
||||
m_netSettings->m_NetClassPatternAssignments.push_back(
|
||||
{
|
||||
std::make_unique<EDA_COMBINED_MATCHER>( pattern, CTX_NETCLASS ),
|
||||
netclass
|
||||
} );
|
||||
|
||||
m_netSettings->m_NetClassPatternAssignmentCache.clear();
|
||||
{ std::make_unique<EDA_COMBINED_MATCHER>( pattern, CTX_NETCLASS ), netclass } );
|
||||
}
|
||||
|
||||
m_netSettings->m_NetClassPatternAssignmentCache.clear();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -707,8 +692,11 @@ void PANEL_SETUP_NETCLASSES::AdjustNetclassGridColumns( int aWidth )
|
||||
|
||||
for( int i = 1; i < m_netclassGrid->GetNumberCols(); i++ )
|
||||
{
|
||||
m_netclassGrid->SetColSize( i, m_originalColWidths[ i ] );
|
||||
aWidth -= m_originalColWidths[ i ];
|
||||
if( m_netclassGrid->GetColSize( i ) > 0 )
|
||||
{
|
||||
m_netclassGrid->SetColSize( i, m_originalColWidths[ i ] );
|
||||
aWidth -= m_originalColWidths[ i ];
|
||||
}
|
||||
}
|
||||
|
||||
m_netclassGrid->SetColSize( 0, std::max( aWidth - 2, m_originalColWidths[ 0 ] ) );
|
||||
@@ -806,6 +794,12 @@ void PANEL_SETUP_NETCLASSES::OnUpdateUI( wxUpdateUIEvent& event )
|
||||
m_netclassesDirty = false;
|
||||
}
|
||||
|
||||
if( m_shownColumns != m_netclassGrid->GetShownColumns() )
|
||||
{
|
||||
AdjustNetclassGridColumns( GetSize().x - 1 );
|
||||
m_shownColumns = m_netclassGrid->GetShownColumns();
|
||||
}
|
||||
|
||||
if( m_assignmentGrid->GetNumberRows() == 0 )
|
||||
return;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
|
||||
// C++ code generated with wxFormBuilder (version 4.1.0-3-g43bf300c)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@@ -89,16 +89,17 @@ PANEL_SETUP_NETCLASSES_BASE::PANEL_SETUP_NETCLASSES_BASE( wxWindow* parent, wxWi
|
||||
m_removeButton = new STD_BITMAP_BUTTON( m_netclassesPane, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
||||
buttonBoxSizer->Add( m_removeButton, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
buttonBoxSizer->Add( 60, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
m_colorDefaultHelpText = new wxStaticText( m_netclassesPane, wxID_ANY, _("Set color to transparent to use KiCad default color."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_colorDefaultHelpText->Wrap( -1 );
|
||||
buttonBoxSizer->Add( m_colorDefaultHelpText, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 10 );
|
||||
|
||||
m_importColorsButton = new wxButton( m_netclassesPane, wxID_ANY, _("Import colors from schematic") );
|
||||
m_importColorsButton = new wxButton( m_netclassesPane, wxID_ANY, _("Import colors from schematic"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
buttonBoxSizer->Add( m_importColorsButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bUpperSizer->Add( buttonBoxSizer, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
|
||||
// C++ code generated with wxFormBuilder (version 4.1.0-3-g43bf300c)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@@ -48,8 +48,8 @@ class PANEL_SETUP_NETCLASSES_BASE : public wxPanel
|
||||
WX_GRID* m_netclassGrid;
|
||||
STD_BITMAP_BUTTON* m_addButton;
|
||||
STD_BITMAP_BUTTON* m_removeButton;
|
||||
wxButton* m_importColorsButton;
|
||||
wxStaticText* m_colorDefaultHelpText;
|
||||
wxButton* m_importColorsButton;
|
||||
WX_PANEL* m_membershipPane;
|
||||
wxStaticText* m_staticText5;
|
||||
WX_GRID* m_assignmentGrid;
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <dialogs/panel_setup_severities.h>
|
||||
#include <wx/radiobut.h>
|
||||
#include <wx/scrolwin.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/stattext.h>
|
||||
#include "confirm.h"
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ const wxChar* const traceHiDpi = wxT( "KICAD_TRACE_HIGH_DPI" );
|
||||
static std::optional<double> getKiCadConfiguredScale( const COMMON_SETTINGS& aConfig )
|
||||
{
|
||||
std::optional<double> scale;
|
||||
double canvas_scale = aConfig.m_Appearance.canvas_scale;
|
||||
double canvas_scale = aConfig.m_Appearance.canvas_scale;
|
||||
|
||||
if( canvas_scale > 0.0 )
|
||||
{
|
||||
@@ -70,8 +70,8 @@ static std::optional<double> getKiCadConfiguredScale( const COMMON_SETTINGS& aCo
|
||||
*/
|
||||
static std::optional<double> getEnvironmentScale()
|
||||
{
|
||||
const wxPortId port_id = wxPlatformInfo::Get().GetPortId();
|
||||
std::optional<double> scale;
|
||||
const wxPortId port_id = wxPlatformInfo::Get().GetPortId();
|
||||
std::optional<double> scale;
|
||||
|
||||
if( port_id == wxPORT_GTK )
|
||||
{
|
||||
@@ -83,8 +83,9 @@ static std::optional<double> getEnvironmentScale()
|
||||
}
|
||||
|
||||
|
||||
DPI_SCALING_COMMON::DPI_SCALING_COMMON( COMMON_SETTINGS* aConfig, const wxWindow* aWindow )
|
||||
: m_config( aConfig ), m_window( aWindow )
|
||||
DPI_SCALING_COMMON::DPI_SCALING_COMMON( COMMON_SETTINGS* aConfig, const wxWindow* aWindow ) :
|
||||
m_config( aConfig ),
|
||||
m_window( aWindow )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
+39
-21
@@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2013-2017 CERN
|
||||
* Copyright (C) 2013-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2013-2024, 2024 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
|
||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||
@@ -24,7 +24,6 @@
|
||||
* or you may write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
#include <confirm.h>
|
||||
#include <eda_draw_frame.h>
|
||||
#include <kiface_base.h>
|
||||
#include <macros.h>
|
||||
@@ -54,6 +53,16 @@
|
||||
#include <core/profile.h>
|
||||
|
||||
#include <pgm_base.h>
|
||||
#include <confirm.h>
|
||||
|
||||
|
||||
/**
|
||||
* Flag to enable drawing panel debugging output.
|
||||
*
|
||||
* @ingroup trace_env_vars
|
||||
*/
|
||||
static const wxChar traceDrawPanel[] = wxT( "KICAD_DRAW_PANEL" );
|
||||
|
||||
|
||||
EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWindowId,
|
||||
const wxPoint& aPosition, const wxSize& aSize,
|
||||
@@ -177,6 +186,7 @@ EDA_DRAW_PANEL_GAL::~EDA_DRAW_PANEL_GAL()
|
||||
|
||||
void EDA_DRAW_PANEL_GAL::SetFocus()
|
||||
{
|
||||
KIPLATFORM::UI::ImeNotifyCancelComposition( this );
|
||||
wxScrolledCanvas::SetFocus();
|
||||
m_lostFocus = false;
|
||||
}
|
||||
@@ -236,6 +246,7 @@ bool EDA_DRAW_PANEL_GAL::DoRePaint()
|
||||
bool isDirty = false;
|
||||
|
||||
cntTotal.Start();
|
||||
|
||||
try
|
||||
{
|
||||
cntUpd.Start();
|
||||
@@ -248,9 +259,7 @@ bool EDA_DRAW_PANEL_GAL::DoRePaint()
|
||||
{
|
||||
// Don't do anything here but don't fail
|
||||
// This can happen when we don't catch `at()` calls
|
||||
wxString msg;
|
||||
msg.Printf( wxT( "Out of Range error: %s" ), err.what() );
|
||||
wxLogDebug( msg );
|
||||
wxLogTrace( traceDrawPanel, wxS( "Out of Range error: %s" ), err.what() );
|
||||
}
|
||||
|
||||
cntUpd.Stop();
|
||||
@@ -272,20 +281,10 @@ bool EDA_DRAW_PANEL_GAL::DoRePaint()
|
||||
m_gal->SetGridColor( settings->GetGridColor() );
|
||||
m_gal->SetCursorColor( settings->GetCursorColor() );
|
||||
|
||||
// TODO: find why ClearScreen() must be called here in opengl mode
|
||||
// and only if m_view->IsDirty() in Cairo mode to avoid display artifacts
|
||||
// when moving the mouse cursor
|
||||
if( m_backend == GAL_TYPE_OPENGL )
|
||||
m_gal->ClearScreen();
|
||||
m_gal->ClearScreen();
|
||||
|
||||
if( m_view->IsDirty() )
|
||||
{
|
||||
if( m_backend != GAL_TYPE_OPENGL // Already called in opengl
|
||||
&& m_view->IsTargetDirty( KIGFX::TARGET_NONCACHED ) )
|
||||
{
|
||||
m_gal->ClearScreen();
|
||||
}
|
||||
|
||||
m_view->ClearTargets();
|
||||
|
||||
// Grid has to be redrawn only when the NONCACHED target is redrawn
|
||||
@@ -382,10 +381,16 @@ void EDA_DRAW_PANEL_GAL::onSize( wxSizeEvent& aEvent )
|
||||
}
|
||||
|
||||
|
||||
void EDA_DRAW_PANEL_GAL::RequestRefresh()
|
||||
{
|
||||
m_needIdleRefresh = true;
|
||||
}
|
||||
|
||||
|
||||
void EDA_DRAW_PANEL_GAL::Refresh( bool aEraseBackground, const wxRect* aRect )
|
||||
{
|
||||
if( !DoRePaint() )
|
||||
m_needIdleRefresh = true;
|
||||
RequestRefresh();
|
||||
}
|
||||
|
||||
|
||||
@@ -589,7 +594,7 @@ void EDA_DRAW_PANEL_GAL::OnEvent( wxEvent& aEvent )
|
||||
if( endDelta > timeLimit )
|
||||
Refresh();
|
||||
else
|
||||
m_needIdleRefresh = true;
|
||||
RequestRefresh();
|
||||
}
|
||||
|
||||
|
||||
@@ -648,8 +653,21 @@ void EDA_DRAW_PANEL_GAL::onShowTimer( wxTimerEvent& aEvent )
|
||||
|
||||
void EDA_DRAW_PANEL_GAL::SetCurrentCursor( KICURSOR aCursor )
|
||||
{
|
||||
if( m_gal )
|
||||
m_gal->SetNativeCursorStyle( aCursor );
|
||||
if( !m_gal )
|
||||
return;
|
||||
|
||||
DPI_SCALING_COMMON dpi( nullptr, m_parent );
|
||||
|
||||
bool hidpi = false;
|
||||
|
||||
// Cursor scaling factor cannot be set for a wxCursor on GTK and OSX (at least before wx 3.3),
|
||||
// resulting in 4x rendered size on 2x window scale.
|
||||
// MSW renders the bitmap as-is, without scaling, so this works here.
|
||||
#ifdef __WXMSW__
|
||||
hidpi = dpi.GetContentScaleFactor() >= 2.0;
|
||||
#endif
|
||||
|
||||
m_gal->SetNativeCursorStyle( aCursor, hidpi );
|
||||
}
|
||||
|
||||
|
||||
@@ -697,4 +715,4 @@ KIGFX::VC_SETTINGS EDA_DRAW_PANEL_GAL::GetVcSettings()
|
||||
vcSettings.m_scrollReversePanH = cfg->m_Input.reverse_scroll_pan_h;
|
||||
|
||||
return vcSettings;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -681,6 +681,35 @@ void DS_DATA_ITEM_TEXT::SetConstrainedTextSize()
|
||||
|
||||
if( m_ConstrainedTextSize.y == 0 )
|
||||
m_ConstrainedTextSize.y = DS_DATA_MODEL::GetTheInstance().m_DefaultTextSize.y;
|
||||
|
||||
if( m_BoundingBoxSize.x > 0 || m_BoundingBoxSize.y > 0 )
|
||||
{
|
||||
// to know the X and Y size of the line, we should use EDA_TEXT::GetTextBox()
|
||||
// but this function uses integers
|
||||
// So, to avoid truncations with our unit in mm, use microns.
|
||||
VECTOR2I size_micron;
|
||||
#define FSCALE 1000.0
|
||||
int linewidth = 0;
|
||||
size_micron.x = KiROUND( m_ConstrainedTextSize.x * FSCALE );
|
||||
size_micron.y = KiROUND( m_ConstrainedTextSize.y * FSCALE );
|
||||
DS_DRAW_ITEM_TEXT dummy( unityScale, this, 0, m_FullText, VECTOR2I( 0, 0 ), size_micron,
|
||||
linewidth, m_Font, m_Italic, m_Bold, m_TextColor );
|
||||
dummy.SetMultilineAllowed( true );
|
||||
dummy.SetHorizJustify( m_Hjustify ) ;
|
||||
dummy.SetVertJustify( m_Vjustify );
|
||||
dummy.SetTextAngle( EDA_ANGLE( m_Orient, DEGREES_T ) );
|
||||
|
||||
BOX2I rect = dummy.GetTextBox();
|
||||
VECTOR2D size;
|
||||
size.x = KiROUND( (int) rect.GetWidth() / FSCALE );
|
||||
size.y = KiROUND( (int) rect.GetHeight() / FSCALE );
|
||||
|
||||
if( m_BoundingBoxSize.x > 0 && size.x > m_BoundingBoxSize.x )
|
||||
m_ConstrainedTextSize.x *= m_BoundingBoxSize.x / size.x;
|
||||
|
||||
if( m_BoundingBoxSize.y > 0 && size.y > m_BoundingBoxSize.y )
|
||||
m_ConstrainedTextSize.y *= m_BoundingBoxSize.y / size.y;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -191,14 +191,14 @@ const BOX2I DS_DRAW_ITEM_TEXT::GetApproxBBox()
|
||||
const wxString text = GetShownText( true );
|
||||
BOX2I bbox( GetTextPos() );
|
||||
|
||||
bbox.SetWidth( (int) text.length() * attrs.m_Size.x * 1.3 );
|
||||
bbox.SetWidth( KiROUND( (int) text.length() * attrs.m_Size.x * 1.3 ) );
|
||||
bbox.SetHeight( attrs.m_Size.y );
|
||||
|
||||
switch( attrs.m_Halign )
|
||||
{
|
||||
case GR_TEXT_H_ALIGN_LEFT: break;
|
||||
case GR_TEXT_H_ALIGN_CENTER: bbox.Offset( -bbox.GetWidth() / 2, 0 ); break;
|
||||
case GR_TEXT_H_ALIGN_RIGHT: bbox.Offset( -bbox.GetWidth(), 0 ); break;
|
||||
case GR_TEXT_H_ALIGN_LEFT: break;
|
||||
case GR_TEXT_H_ALIGN_CENTER: bbox.Offset( - (int) bbox.GetWidth() / 2, 0 ); break;
|
||||
case GR_TEXT_H_ALIGN_RIGHT: bbox.Offset( - (int) bbox.GetWidth(), 0 ); break;
|
||||
case GR_TEXT_H_ALIGN_INDETERMINATE:
|
||||
wxFAIL_MSG( wxT( "Indeterminate state legal only in dialogs." ) );
|
||||
break;
|
||||
@@ -206,9 +206,9 @@ const BOX2I DS_DRAW_ITEM_TEXT::GetApproxBBox()
|
||||
|
||||
switch( GetAttributes().m_Valign )
|
||||
{
|
||||
case GR_TEXT_V_ALIGN_TOP: break;
|
||||
case GR_TEXT_V_ALIGN_CENTER: bbox.Offset( 0, -bbox.GetHeight() / 2 ); break;
|
||||
case GR_TEXT_V_ALIGN_BOTTOM: bbox.Offset( 0, -bbox.GetHeight() ); break;
|
||||
case GR_TEXT_V_ALIGN_TOP: break;
|
||||
case GR_TEXT_V_ALIGN_CENTER: bbox.Offset( 0, - (int) bbox.GetHeight() / 2 ); break;
|
||||
case GR_TEXT_V_ALIGN_BOTTOM: bbox.Offset( 0, - (int) bbox.GetHeight() ); break;
|
||||
case GR_TEXT_V_ALIGN_INDETERMINATE:
|
||||
wxFAIL_MSG( wxT( "Indeterminate state legal only in dialogs." ) );
|
||||
break;
|
||||
@@ -265,7 +265,7 @@ void DS_DRAW_ITEM_POLYPOLYGONS::PrintWsItem( const RENDER_SETTINGS* aSettings,
|
||||
outline.CPoint( ii ).y + aOffset.y );
|
||||
}
|
||||
|
||||
GRPoly( DC, points_moved.size(), &points_moved[0], true, penWidth, color, color );
|
||||
GRPoly( DC, (int) points_moved.size(), &points_moved[0], true, penWidth, color, color );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -371,18 +371,21 @@ bool DS_DRAW_ITEM_RECT::HitTest( const VECTOR2I& aPosition, int aAccuracy ) cons
|
||||
// Right line
|
||||
start = end;
|
||||
end.y = GetEnd().y;
|
||||
|
||||
if( TestSegmentHit( aPosition, start, end, dist ) )
|
||||
return true;
|
||||
|
||||
// lower line
|
||||
start = end;
|
||||
end.x = GetStart().x;
|
||||
|
||||
if( TestSegmentHit( aPosition, start, end, dist ) )
|
||||
return true;
|
||||
|
||||
// left line
|
||||
start = end;
|
||||
end = GetStart();
|
||||
|
||||
if( TestSegmentHit( aPosition, start, end, dist ) )
|
||||
return true;
|
||||
|
||||
@@ -464,7 +467,7 @@ bool DS_DRAW_ITEM_LINE::HitTest( const VECTOR2I& aPosition, int aAccuracy ) cons
|
||||
wxString DS_DRAW_ITEM_LINE::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
|
||||
{
|
||||
return wxString::Format( _( "Line, length %s" ),
|
||||
aUnitsProvider->MessageTextFromValue( EuclideanNorm( GetStart() - GetEnd() ) ) );
|
||||
aUnitsProvider->MessageTextFromValue( GetStart().Distance( GetEnd() ) ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ void DS_PROXY_VIEW_ITEM::ViewDraw( int aLayer, VIEW* aView ) const
|
||||
|
||||
buildDrawList( aView, m_properties, &drawList );
|
||||
|
||||
BOX2I viewport( aView->GetViewport().GetOrigin(), aView->GetViewport().GetSize() );
|
||||
BOX2I viewport = BOX2ISafe( aView->GetViewport() );
|
||||
|
||||
// Draw the title block normally even if the view is flipped
|
||||
bool flipped = gal->IsFlippedX();
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <eda_base_frame.h>
|
||||
|
||||
#include <advanced_config.h>
|
||||
#include <bitmaps.h>
|
||||
#include <bitmap_store.h>
|
||||
@@ -66,6 +68,7 @@
|
||||
#include <wx/display.h>
|
||||
#include <wx/stdpaths.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <kiplatform/app.h>
|
||||
#include <kiplatform/io.h>
|
||||
#include <kiplatform/ui.h>
|
||||
@@ -1608,7 +1611,7 @@ void EDA_BASE_FRAME::onIconize( wxIconizeEvent& aEvent )
|
||||
}
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef __WXMSW__
|
||||
WXLRESULT EDA_BASE_FRAME::MSWWindowProc( WXUINT message, WXWPARAM wParam, WXLPARAM lParam )
|
||||
{
|
||||
// This will help avoid the menu keeping focus when the alt key is released
|
||||
|
||||
+9
-19
@@ -28,10 +28,11 @@
|
||||
#include <gestfich.h>
|
||||
#include <settings/common_settings.h>
|
||||
|
||||
#include <wx/mimetype.h>
|
||||
#include <wx/filename.h>
|
||||
#include <wx/uri.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/filename.h>
|
||||
#include <wx/log.h>
|
||||
#include <wx/mimetype.h>
|
||||
#include <wx/uri.h>
|
||||
|
||||
|
||||
// Mime type extensions (PDF files are not considered here)
|
||||
@@ -65,27 +66,16 @@ bool GetAssociatedDocument( wxWindow* aParent, const wxString& aDocName, PROJECT
|
||||
wxString command;
|
||||
bool success = false;
|
||||
|
||||
// Is an internet url
|
||||
static const std::vector<wxString> url_header =
|
||||
{
|
||||
wxT( "http:" ),
|
||||
wxT( "https:" ),
|
||||
wxT( "ftp:" ),
|
||||
wxT( "www." ),
|
||||
wxT( "file:" )
|
||||
};
|
||||
|
||||
// Replace before resolving as we might have a URL in a variable
|
||||
docname = ResolveUriByEnvVars( aDocName, aProject );
|
||||
|
||||
for( const wxString& proc : url_header)
|
||||
// We don't want the wx error message about not being able to open the URI
|
||||
{
|
||||
if( docname.StartsWith( proc ) ) // looks like an internet url
|
||||
{
|
||||
wxURI uri( docname );
|
||||
wxLaunchDefaultBrowser( uri.BuildURI() );
|
||||
wxURI uri( docname );
|
||||
wxLogNull logNo; // Disable log messages
|
||||
|
||||
if( uri.HasScheme() && wxLaunchDefaultBrowser( docname ) )
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
|
||||
+56
-45
@@ -61,6 +61,7 @@
|
||||
#include <trace_helpers.h>
|
||||
#include <view/view.h>
|
||||
#include <drawing_sheet/ds_draw_item.h>
|
||||
#include <view/view_controls.h>
|
||||
#include <widgets/msgpanel.h>
|
||||
#include <widgets/properties_panel.h>
|
||||
#include <widgets/net_inspector_panel.h>
|
||||
@@ -117,7 +118,6 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame
|
||||
m_drawBgColor = COLOR4D( BLACK ); // the background color of the draw canvas:
|
||||
// BLACK for Pcbnew, BLACK or WHITE for Eeschema
|
||||
m_colorSettings = nullptr;
|
||||
m_msgFrameHeight = EDA_MSG_PANEL::GetRequiredHeight( this );
|
||||
m_polarCoords = false;
|
||||
m_findReplaceData = std::make_unique<EDA_SEARCH_DATA>();
|
||||
m_hotkeyPopup = nullptr;
|
||||
@@ -132,61 +132,29 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame
|
||||
{
|
||||
CreateStatusBar( 8 )->SetDoubleBuffered( true );
|
||||
|
||||
// set the size of the status bar subwindows:
|
||||
GetStatusBar()->SetFont( KIUI::GetStatusFont( this ) );
|
||||
|
||||
wxWindow* stsbar = GetStatusBar();
|
||||
int spacer = KIUI::GetTextSize( wxT( "M" ), stsbar ).x * 2;
|
||||
|
||||
int dims[] =
|
||||
{
|
||||
// remainder of status bar on far left is set to a default or whatever is left over.
|
||||
-1,
|
||||
|
||||
// When using GetTextSize() remember the width of character '1' is not the same
|
||||
// as the width of '0' unless the font is fixed width, and it usually won't be.
|
||||
|
||||
// zoom:
|
||||
KIUI::GetTextSize( wxT( "Z 762000" ), stsbar ).x,
|
||||
|
||||
// cursor coords
|
||||
KIUI::GetTextSize( wxT( "X 1234.1234 Y 1234.1234" ), stsbar ).x,
|
||||
|
||||
// delta distances
|
||||
KIUI::GetTextSize( wxT( "dx 1234.1234 dy 1234.1234 dist 1234.1234" ), stsbar ).x,
|
||||
|
||||
// grid size
|
||||
KIUI::GetTextSize( wxT( "grid X 1234.1234 Y 1234.1234" ), stsbar ).x,
|
||||
|
||||
// units display, Inches is bigger than mm
|
||||
KIUI::GetTextSize( _( "Inches" ), stsbar ).x,
|
||||
|
||||
// Size for the "Current Tool" panel; longest string from SetTool()
|
||||
KIUI::GetTextSize( wxT( "Add layer alignment target" ), stsbar ).x,
|
||||
|
||||
// constraint mode
|
||||
KIUI::GetTextSize( _( "Constrain to H, V, 45" ), stsbar ).x
|
||||
};
|
||||
|
||||
for( size_t ii = 1; ii < arrayDim( dims ); ii++ )
|
||||
dims[ii] += spacer;
|
||||
|
||||
SetStatusWidths( arrayDim( dims ), dims );
|
||||
stsbar->SetFont( KIUI::GetStatusFont( this ) );
|
||||
// set the size of the status bar subwindows:
|
||||
updateStatusBarWidths();
|
||||
}
|
||||
|
||||
m_messagePanel = new EDA_MSG_PANEL( this, -1, wxPoint( 0, m_frameSize.y ), wxDefaultSize );
|
||||
m_messagePanel->SetBackgroundColour( COLOR4D( LIGHTGRAY ).ToColour() );
|
||||
m_msgFrameHeight = m_messagePanel->GetBestSize().y;
|
||||
|
||||
// Create child subwindows.
|
||||
GetClientSize( &m_frameSize.x, &m_frameSize.y );
|
||||
m_framePos.x = m_framePos.y = 0;
|
||||
m_frameSize.y -= m_msgFrameHeight;
|
||||
|
||||
m_messagePanel = new EDA_MSG_PANEL( this, -1, wxPoint( 0, m_frameSize.y ),
|
||||
wxSize( m_frameSize.x, m_msgFrameHeight ) );
|
||||
|
||||
m_messagePanel->SetBackgroundColour( COLOR4D( LIGHTGRAY ).ToColour() );
|
||||
m_messagePanel->SetSize( m_frameSize.x, m_msgFrameHeight );
|
||||
|
||||
Bind( wxEVT_DPI_CHANGED,
|
||||
[&]( wxDPIChangedEvent& )
|
||||
{
|
||||
if( ( GetWindowStyle() & wxFRAME_NO_TASKBAR ) == 0 )
|
||||
updateStatusBarWidths();
|
||||
|
||||
wxMoveEvent dummy;
|
||||
OnMove( dummy );
|
||||
|
||||
@@ -194,11 +162,13 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame
|
||||
// especially important even for first launches as the constructor of the window
|
||||
// here usually doesn't have the correct dpi awareness yet
|
||||
m_frameSize.y += m_msgFrameHeight;
|
||||
m_msgFrameHeight = EDA_MSG_PANEL::GetRequiredHeight( this );
|
||||
m_msgFrameHeight = m_messagePanel->GetBestSize().y;
|
||||
m_frameSize.y -= m_msgFrameHeight;
|
||||
|
||||
m_messagePanel->SetPosition( wxPoint( 0, m_frameSize.y ) );
|
||||
m_messagePanel->SetSize( m_frameSize.x, m_msgFrameHeight );
|
||||
|
||||
// Don't skip, otherwise the frame gets too big
|
||||
} );
|
||||
}
|
||||
|
||||
@@ -687,6 +657,47 @@ void EDA_DRAW_FRAME::OnSize( wxSizeEvent& SizeEv )
|
||||
}
|
||||
|
||||
|
||||
void EDA_DRAW_FRAME::updateStatusBarWidths()
|
||||
{
|
||||
wxWindow* stsbar = GetStatusBar();
|
||||
int spacer = KIUI::GetTextSize( wxT( "M" ), stsbar ).x * 2;
|
||||
|
||||
int dims[] = {
|
||||
// remainder of status bar on far left is set to a default or whatever is left over.
|
||||
-1,
|
||||
|
||||
// When using GetTextSize() remember the width of character '1' is not the same
|
||||
// as the width of '0' unless the font is fixed width, and it usually won't be.
|
||||
|
||||
// zoom:
|
||||
KIUI::GetTextSize( wxT( "Z 762000" ), stsbar ).x,
|
||||
|
||||
// cursor coords
|
||||
KIUI::GetTextSize( wxT( "X 1234.1234 Y 1234.1234" ), stsbar ).x,
|
||||
|
||||
// delta distances
|
||||
KIUI::GetTextSize( wxT( "dx 1234.1234 dy 1234.1234 dist 1234.1234" ), stsbar ).x,
|
||||
|
||||
// grid size
|
||||
KIUI::GetTextSize( wxT( "grid X 1234.1234 Y 1234.1234" ), stsbar ).x,
|
||||
|
||||
// units display, Inches is bigger than mm
|
||||
KIUI::GetTextSize( _( "Inches" ), stsbar ).x,
|
||||
|
||||
// Size for the "Current Tool" panel; longest string from SetTool()
|
||||
KIUI::GetTextSize( wxT( "Add layer alignment target" ), stsbar ).x,
|
||||
|
||||
// constraint mode
|
||||
KIUI::GetTextSize( _( "Constrain to H, V, 45" ), stsbar ).x
|
||||
};
|
||||
|
||||
for( size_t ii = 1; ii < arrayDim( dims ); ii++ )
|
||||
dims[ii] += spacer;
|
||||
|
||||
SetStatusWidths( arrayDim( dims ), dims );
|
||||
}
|
||||
|
||||
|
||||
void EDA_DRAW_FRAME::UpdateStatusBar()
|
||||
{
|
||||
SetStatusText( GetZoomLevelIndicator(), 1 );
|
||||
|
||||
@@ -374,6 +374,7 @@ static struct EDA_ITEM_DESC
|
||||
.Map( SCH_LINE_T, _HKI( "Line" ) )
|
||||
.Map( SCH_BITMAP_T, _HKI( "Bitmap" ) )
|
||||
.Map( SCH_SHAPE_T, _HKI( "Graphic" ) )
|
||||
.Map( SCH_RULE_AREA_T, _HKI( "Rule Area" ) )
|
||||
.Map( SCH_TEXT_T, _HKI( "Text" ) )
|
||||
.Map( SCH_TEXTBOX_T, _HKI( "Text Box" ) )
|
||||
.Map( SCH_TABLE_T, _HKI( "Table" ) )
|
||||
|
||||
@@ -401,6 +401,12 @@ EDA_COMBINED_MATCHER::EDA_COMBINED_MATCHER( const wxString& aPattern,
|
||||
AddMatcher( aPattern, std::make_unique<EDA_PATTERN_MATCH_SUBSTR>() );
|
||||
break;
|
||||
|
||||
case CTX_NET:
|
||||
AddMatcher( aPattern, std::make_unique<EDA_PATTERN_MATCH_REGEX>() );
|
||||
AddMatcher( aPattern, std::make_unique<EDA_PATTERN_MATCH_WILDCARD>() );
|
||||
AddMatcher( aPattern, std::make_unique<EDA_PATTERN_MATCH_SUBSTR>() );
|
||||
break;
|
||||
|
||||
case CTX_NETCLASS:
|
||||
AddMatcher( aPattern, std::make_unique<EDA_PATTERN_MATCH_REGEX_ANCHORED>() );
|
||||
AddMatcher( aPattern, std::make_unique<EDA_PATTERN_MATCH_WILDCARD_ANCHORED>() );
|
||||
|
||||
+78
-33
@@ -25,6 +25,8 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <eda_shape.h>
|
||||
|
||||
#include <bezier_curves.h>
|
||||
#include <convert_basic_shapes_to_polygon.h>
|
||||
#include <eda_draw_frame.h>
|
||||
@@ -33,7 +35,7 @@
|
||||
#include <geometry/shape_circle.h>
|
||||
#include <macros.h>
|
||||
#include <math/util.h> // for KiROUND
|
||||
#include <eda_shape.h>
|
||||
#include <eda_item.h>
|
||||
#include <plotters/plotter.h>
|
||||
|
||||
|
||||
@@ -126,12 +128,12 @@ double EDA_SHAPE::GetLength() const
|
||||
{
|
||||
case SHAPE_T::BEZIER:
|
||||
for( size_t ii = 1; ii < m_bezierPoints.size(); ++ii )
|
||||
length += GetLineLength( m_bezierPoints[ ii - 1], m_bezierPoints[ii] );
|
||||
length += m_bezierPoints[ ii - 1].Distance( m_bezierPoints[ii] );
|
||||
|
||||
return length;
|
||||
|
||||
case SHAPE_T::SEGMENT:
|
||||
return GetLineLength( GetStart(), GetEnd() );
|
||||
return GetStart().Distance( GetEnd() );
|
||||
|
||||
case SHAPE_T::POLY:
|
||||
for( int ii = 0; ii < m_poly.COutline( 0 ).SegmentCount(); ii++ )
|
||||
@@ -183,6 +185,32 @@ void EDA_SHAPE::SetLength( const double& aLength )
|
||||
}
|
||||
}
|
||||
|
||||
void EDA_SHAPE::SetRectangleHeight( const int& aHeight )
|
||||
{
|
||||
switch ( m_shape )
|
||||
{
|
||||
case SHAPE_T::RECTANGLE:
|
||||
m_rectangleHeight = aHeight;
|
||||
SetEndY( GetStartY() + m_rectangleHeight );
|
||||
break;
|
||||
|
||||
default: UNIMPLEMENTED_FOR( SHAPE_T_asString() );
|
||||
}
|
||||
}
|
||||
|
||||
void EDA_SHAPE::SetRectangleWidth( const int& aWidth )
|
||||
{
|
||||
switch ( m_shape )
|
||||
{
|
||||
case SHAPE_T::RECTANGLE:
|
||||
m_rectangleWidth = aWidth;
|
||||
SetEndX( GetStartX() + m_rectangleWidth );
|
||||
break;
|
||||
|
||||
default: UNIMPLEMENTED_FOR( SHAPE_T_asString() );
|
||||
}
|
||||
}
|
||||
|
||||
void EDA_SHAPE::SetRectangle( const long long int& aHeight, const long long int& aWidth )
|
||||
{
|
||||
switch ( m_shape )
|
||||
@@ -595,11 +623,11 @@ int EDA_SHAPE::GetRadius() const
|
||||
switch( m_shape )
|
||||
{
|
||||
case SHAPE_T::ARC:
|
||||
radius = GetLineLength( m_arcCenter, m_start );
|
||||
radius = m_arcCenter.Distance( m_start );
|
||||
break;
|
||||
|
||||
case SHAPE_T::CIRCLE:
|
||||
radius = GetLineLength( m_start, m_end );
|
||||
radius = m_start.Distance( m_end );
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -768,7 +796,7 @@ void EDA_SHAPE::ShapeGetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PA
|
||||
case SHAPE_T::SEGMENT:
|
||||
{
|
||||
aList.emplace_back( _( "Length" ),
|
||||
aFrame->MessageTextFromValue( GetLineLength( GetStart(), GetEnd() ) ));
|
||||
aFrame->MessageTextFromValue( GetStart().Distance( GetEnd() ) ));
|
||||
|
||||
// angle counter-clockwise from 3'o-clock
|
||||
EDA_ANGLE angle( atan2( (double)( GetStart().y - GetEnd().y ),
|
||||
@@ -841,21 +869,19 @@ const BOX2I EDA_SHAPE::getBoundingBox() const
|
||||
|
||||
bool EDA_SHAPE::hitTest( const VECTOR2I& aPosition, int aAccuracy ) const
|
||||
{
|
||||
int maxdist = aAccuracy;
|
||||
double maxdist = aAccuracy;
|
||||
|
||||
if( GetWidth() > 0 )
|
||||
maxdist += GetWidth() / 2;
|
||||
maxdist += GetWidth() / 2.0;
|
||||
|
||||
switch( m_shape )
|
||||
{
|
||||
case SHAPE_T::CIRCLE:
|
||||
{
|
||||
int radius = GetRadius();
|
||||
double radius = GetRadius();
|
||||
double dist = aPosition.Distance( getCenter() );
|
||||
|
||||
VECTOR2I::extended_type dist = KiROUND<double, VECTOR2I::extended_type>(
|
||||
EuclideanNorm( aPosition - getCenter() ) );
|
||||
|
||||
if( IsFilled() )
|
||||
if( IsFilledForHitTesting() )
|
||||
return dist <= radius + maxdist; // Filled circle hit-test
|
||||
else
|
||||
return abs( radius - dist ) <= maxdist; // Ring hit-test
|
||||
@@ -863,19 +889,17 @@ bool EDA_SHAPE::hitTest( const VECTOR2I& aPosition, int aAccuracy ) const
|
||||
|
||||
case SHAPE_T::ARC:
|
||||
{
|
||||
if( EuclideanNorm( aPosition - m_start ) <= maxdist )
|
||||
if( aPosition.Distance( m_start ) <= maxdist )
|
||||
return true;
|
||||
|
||||
if( EuclideanNorm( aPosition - m_end ) <= maxdist )
|
||||
if( aPosition.Distance( m_end ) <= maxdist )
|
||||
return true;
|
||||
|
||||
VECTOR2I relPos = aPosition - getCenter();
|
||||
int radius = GetRadius();
|
||||
double radius = GetRadius();
|
||||
VECTOR2D relPos( VECTOR2D( aPosition ) - getCenter() );
|
||||
double dist = relPos.EuclideanNorm();
|
||||
|
||||
VECTOR2I::extended_type dist =
|
||||
KiROUND<double, VECTOR2I::extended_type>( EuclideanNorm( relPos ) );
|
||||
|
||||
if( IsFilled() )
|
||||
if( IsFilledForHitTesting() )
|
||||
{
|
||||
// Check distance from arc center
|
||||
if( dist > radius + maxdist )
|
||||
@@ -920,7 +944,7 @@ bool EDA_SHAPE::hitTest( const VECTOR2I& aPosition, int aAccuracy ) const
|
||||
return TestSegmentHit( aPosition, GetStart(), GetEnd(), maxdist );
|
||||
|
||||
case SHAPE_T::RECTANGLE:
|
||||
if( IsProxyItem() || IsFilled() ) // Filled rect hit-test
|
||||
if( IsProxyItem() || IsFilledForHitTesting() ) // Filled rect hit-test
|
||||
{
|
||||
SHAPE_POLY_SET poly;
|
||||
poly.NewOutline();
|
||||
@@ -941,7 +965,7 @@ bool EDA_SHAPE::hitTest( const VECTOR2I& aPosition, int aAccuracy ) const
|
||||
}
|
||||
|
||||
case SHAPE_T::POLY:
|
||||
if( IsFilled() )
|
||||
if( IsFilledForHitTesting() )
|
||||
{
|
||||
if( !m_poly.COutline( 0 ).IsClosed() )
|
||||
{
|
||||
@@ -1463,14 +1487,14 @@ void EDA_SHAPE::calcEdit( const VECTOR2I& aPosition )
|
||||
|
||||
case 1:
|
||||
m_end = aPosition;
|
||||
radius = sqrt( sq( GetLineLength( m_start, m_end ) ) / 2.0 );
|
||||
radius = m_start.Distance( m_end ) * M_SQRT1_2;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
case 3:
|
||||
{
|
||||
VECTOR2I v = m_start - m_end;
|
||||
double chordBefore = sq( v.x ) + sq( v.y );
|
||||
double chordBefore = v.SquaredEuclideanNorm();
|
||||
|
||||
if( m_editState == 2 )
|
||||
m_start = aPosition;
|
||||
@@ -1479,7 +1503,7 @@ void EDA_SHAPE::calcEdit( const VECTOR2I& aPosition )
|
||||
|
||||
v = m_start - m_end;
|
||||
|
||||
double chordAfter = sq( v.x ) + sq( v.y );
|
||||
double chordAfter = v.SquaredEuclideanNorm();
|
||||
double ratio = 0.0;
|
||||
|
||||
if( chordBefore > 0 )
|
||||
@@ -1492,8 +1516,8 @@ void EDA_SHAPE::calcEdit( const VECTOR2I& aPosition )
|
||||
|
||||
case 4:
|
||||
{
|
||||
double radialA = GetLineLength( m_start, aPosition );
|
||||
double radialB = GetLineLength( m_end, aPosition );
|
||||
double radialA = m_start.Distance( aPosition );
|
||||
double radialB = m_end.Distance( aPosition );
|
||||
radius = ( radialA + radialB ) / 2.0;
|
||||
}
|
||||
break;
|
||||
@@ -1506,9 +1530,9 @@ void EDA_SHAPE::calcEdit( const VECTOR2I& aPosition )
|
||||
// Calculate center based on start, end, and radius
|
||||
//
|
||||
// Let 'l' be the length of the chord and 'm' the middle point of the chord
|
||||
double l = GetLineLength( m_start, m_end );
|
||||
double l = m_start.Distance( m_end );
|
||||
VECTOR2D m = ( m_start + m_end ) / 2;
|
||||
double sqRadDiff = sq( radius ) - sq( l / 2 );
|
||||
double sqRadDiff = ( radius * radius ) - ( l * l ) / 4.0;
|
||||
|
||||
// Calculate 'd', the vector from the chord midpoint to the center
|
||||
VECTOR2D d;
|
||||
@@ -1547,7 +1571,7 @@ void EDA_SHAPE::calcEdit( const VECTOR2I& aPosition )
|
||||
|
||||
case 4:
|
||||
// Pick the one closer to the mouse position
|
||||
m_arcCenter = GetLineLength( c1, aPosition ) < GetLineLength( c2, aPosition ) ? c1 : c2;
|
||||
m_arcCenter = c1.Distance( aPosition ) < c2.Distance( aPosition ) ? c1 : c2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1970,6 +1994,15 @@ static struct EDA_SHAPE_DESC
|
||||
return false;
|
||||
};
|
||||
|
||||
auto isRectangle = []( INSPECTABLE* aItem ) -> bool
|
||||
{
|
||||
// Polygons, unlike other shapes, have no meaningful start or end coordinates
|
||||
if( EDA_SHAPE* shape = dynamic_cast<EDA_SHAPE*>( aItem ) )
|
||||
return shape->GetShape() == SHAPE_T::RECTANGLE;
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
const wxString shapeProps = _HKI( "Shape Properties" );
|
||||
|
||||
auto shape = new PROPERTY_ENUM<EDA_SHAPE, SHAPE_T>( _HKI( "Shape" ),
|
||||
@@ -1988,13 +2021,13 @@ static struct EDA_SHAPE_DESC
|
||||
.SetAvailableFunc( isNotPolygonOrCircle );
|
||||
|
||||
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, int>( _HKI( "Center X" ),
|
||||
&EDA_SHAPE::SetStartX, &EDA_SHAPE::GetStartX, PROPERTY_DISPLAY::PT_COORD,
|
||||
&EDA_SHAPE::SetCenterX, &EDA_SHAPE::GetStartX, PROPERTY_DISPLAY::PT_COORD,
|
||||
ORIGIN_TRANSFORMS::ABS_X_COORD ),
|
||||
shapeProps )
|
||||
.SetAvailableFunc( isCircle );
|
||||
|
||||
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, int>( _HKI( "Center Y" ),
|
||||
&EDA_SHAPE::SetStartY, &EDA_SHAPE::GetStartY, PROPERTY_DISPLAY::PT_COORD,
|
||||
&EDA_SHAPE::SetCenterY, &EDA_SHAPE::GetStartY, PROPERTY_DISPLAY::PT_COORD,
|
||||
ORIGIN_TRANSFORMS::ABS_Y_COORD ),
|
||||
shapeProps )
|
||||
.SetAvailableFunc( isCircle );
|
||||
@@ -2017,6 +2050,18 @@ static struct EDA_SHAPE_DESC
|
||||
shapeProps )
|
||||
.SetAvailableFunc( isNotPolygonOrCircle );
|
||||
|
||||
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, int>( _HKI( "Width" ),
|
||||
&EDA_SHAPE::SetRectangleWidth, &EDA_SHAPE::GetRectangleWidth, PROPERTY_DISPLAY::PT_COORD,
|
||||
ORIGIN_TRANSFORMS::ABS_Y_COORD ),
|
||||
shapeProps )
|
||||
.SetAvailableFunc( isRectangle );
|
||||
|
||||
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, int>( _HKI( "Height" ),
|
||||
&EDA_SHAPE::SetRectangleHeight, &EDA_SHAPE::GetRectangleHeight, PROPERTY_DISPLAY::PT_COORD,
|
||||
ORIGIN_TRANSFORMS::ABS_Y_COORD ),
|
||||
shapeProps )
|
||||
.SetAvailableFunc( isRectangle );
|
||||
|
||||
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, int>( _HKI( "Line Width" ),
|
||||
&EDA_SHAPE::SetWidth, &EDA_SHAPE::GetWidth, PROPERTY_DISPLAY::PT_SIZE ),
|
||||
shapeProps );
|
||||
|
||||
+26
-17
@@ -542,10 +542,13 @@ EDA_TEXT::GetRenderCache( const KIFONT::FONT* aFont, const wxString& forResolved
|
||||
}
|
||||
|
||||
|
||||
void EDA_TEXT::SetupRenderCache( const wxString& aResolvedText, const EDA_ANGLE& aAngle )
|
||||
void EDA_TEXT::SetupRenderCache( const wxString& aResolvedText, const KIFONT::FONT* aFont,
|
||||
const EDA_ANGLE& aAngle, const VECTOR2I& aOffset )
|
||||
{
|
||||
m_render_cache_text = aResolvedText;
|
||||
m_render_cache_font = aFont;
|
||||
m_render_cache_angle = aAngle;
|
||||
m_render_cache_offset = aOffset;
|
||||
m_render_cache.clear();
|
||||
}
|
||||
|
||||
@@ -553,6 +556,7 @@ void EDA_TEXT::SetupRenderCache( const wxString& aResolvedText, const EDA_ANGLE&
|
||||
void EDA_TEXT::AddRenderCacheGlyph( const SHAPE_POLY_SET& aPoly )
|
||||
{
|
||||
m_render_cache.emplace_back( std::make_unique<KIFONT::OUTLINE_GLYPH>( aPoly ) );
|
||||
static_cast<KIFONT::OUTLINE_GLYPH*>( m_render_cache.back().get() )->CacheTriangulation();
|
||||
}
|
||||
|
||||
|
||||
@@ -1083,16 +1087,9 @@ bool EDA_TEXT::ValidateHyperlink( const wxString& aURL )
|
||||
if( aURL.IsEmpty() || IsGotoPageHref( aURL ) )
|
||||
return true;
|
||||
|
||||
// Limit valid urls to file, http and https for now. Note wxURL doesn't support https
|
||||
wxURI uri;
|
||||
|
||||
if( uri.Create( aURL ) && uri.HasScheme() )
|
||||
{
|
||||
const wxString& scheme = uri.GetScheme();
|
||||
return scheme == wxT( "file" ) || scheme == wxT( "http" ) || scheme == wxT( "https" );
|
||||
}
|
||||
|
||||
return false;
|
||||
return( uri.Create( aURL ) && uri.HasScheme() );
|
||||
}
|
||||
|
||||
double EDA_TEXT::Levenshtein( const EDA_TEXT& aOther ) const
|
||||
@@ -1181,14 +1178,26 @@ static struct EDA_TEXT_DESC
|
||||
{
|
||||
EDA_TEXT_DESC()
|
||||
{
|
||||
ENUM_MAP<GR_TEXT_H_ALIGN_T>::Instance()
|
||||
.Map( GR_TEXT_H_ALIGN_LEFT, _HKI( "Left" ) )
|
||||
.Map( GR_TEXT_H_ALIGN_CENTER, _HKI( "Center" ) )
|
||||
.Map( GR_TEXT_H_ALIGN_RIGHT, _HKI( "Right" ) );
|
||||
ENUM_MAP<GR_TEXT_V_ALIGN_T>::Instance()
|
||||
.Map( GR_TEXT_V_ALIGN_TOP, _HKI( "Top" ) )
|
||||
.Map( GR_TEXT_V_ALIGN_CENTER, _HKI( "Center" ) )
|
||||
.Map( GR_TEXT_V_ALIGN_BOTTOM, _HKI( "Bottom" ) );
|
||||
// These are defined in SCH_FIELD as well but initialization order is
|
||||
// not defined, so this needs to be conditional. Defining in both
|
||||
// places leads to duplicate symbols.
|
||||
auto& h_inst = ENUM_MAP<GR_TEXT_H_ALIGN_T>::Instance();
|
||||
|
||||
if( h_inst.Choices().GetCount() == 0)
|
||||
{
|
||||
h_inst.Map( GR_TEXT_H_ALIGN_LEFT, _( "Left" ) );
|
||||
h_inst.Map( GR_TEXT_H_ALIGN_CENTER, _( "Center" ) );
|
||||
h_inst.Map( GR_TEXT_H_ALIGN_RIGHT, _( "Right" ) );
|
||||
}
|
||||
|
||||
auto& v_inst = ENUM_MAP<GR_TEXT_V_ALIGN_T>::Instance();
|
||||
|
||||
if( v_inst.Choices().GetCount() == 0)
|
||||
{
|
||||
v_inst.Map( GR_TEXT_V_ALIGN_TOP, _( "Top" ) );
|
||||
v_inst.Map( GR_TEXT_V_ALIGN_CENTER, _( "Center" ) );
|
||||
v_inst.Map( GR_TEXT_V_ALIGN_BOTTOM, _( "Bottom" ) );
|
||||
}
|
||||
|
||||
PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance();
|
||||
REGISTER_TYPE( EDA_TEXT );
|
||||
|
||||
@@ -335,6 +335,10 @@ wxString EDA_UNIT_UTILS::UI::StringFromValue( const EDA_IU_SCALE& aIuScale, EDA_
|
||||
format = is_eeschema ? wxT( "%.6f" ) : wxT( "%.8f" );
|
||||
break;
|
||||
|
||||
case EDA_UNITS::DEGREES:
|
||||
format = wxT( "%.4f" );
|
||||
break;
|
||||
|
||||
default:
|
||||
format = wxT( "%.10f" );
|
||||
break;
|
||||
@@ -464,13 +468,6 @@ wxString EDA_UNIT_UTILS::UI::MessageTextFromValue( const EDA_IU_SCALE& aIuScale,
|
||||
}
|
||||
|
||||
text.Printf( format, value );
|
||||
removeTrailingZeros( text );
|
||||
|
||||
if( value != 0.0 && ( text == wxS( "0" ) || text == wxS( "-0" ) ) )
|
||||
{
|
||||
text.Printf( wxS( "%.10f" ), value );
|
||||
removeTrailingZeros( text );
|
||||
}
|
||||
|
||||
if( aAddUnitsText )
|
||||
text += EDA_UNIT_UTILS::GetText( aUnits, aType );
|
||||
|
||||
@@ -259,6 +259,7 @@ VECTOR2I OUTLINE_FONT::getTextAsGlyphs( BOX2I* aBBox, std::vector<std::unique_pt
|
||||
struct GLYPH_CACHE_KEY {
|
||||
FT_Face face;
|
||||
hb_codepoint_t codepoint;
|
||||
double scaler;
|
||||
bool fakeItalic;
|
||||
bool fakeBold;
|
||||
bool mirror;
|
||||
@@ -266,7 +267,7 @@ struct GLYPH_CACHE_KEY {
|
||||
|
||||
bool operator==(const GLYPH_CACHE_KEY& rhs ) const
|
||||
{
|
||||
return face == rhs.face && codepoint == rhs.codepoint
|
||||
return face == rhs.face && codepoint == rhs.codepoint && scaler == rhs.scaler
|
||||
&& fakeItalic == rhs.fakeItalic && fakeBold == rhs.fakeBold
|
||||
&& mirror == rhs.mirror && angle == rhs.angle;
|
||||
}
|
||||
@@ -280,6 +281,7 @@ namespace std
|
||||
std::size_t operator()( const GLYPH_CACHE_KEY& k ) const
|
||||
{
|
||||
return hash<const void*>()( k.face ) ^ hash<unsigned>()( k.codepoint )
|
||||
^ hash<double>()( k.scaler )
|
||||
^ hash<int>()( k.fakeItalic ) ^ hash<int>()( k.fakeBold )
|
||||
^ hash<int>()( k.mirror ) ^ hash<int>()( k.angle.AsTenthsOfADegree() );
|
||||
}
|
||||
@@ -339,7 +341,7 @@ VECTOR2I OUTLINE_FONT::getTextAsGlyphsUnlocked( BOX2I* aBBox,
|
||||
|
||||
if( aGlyphs )
|
||||
{
|
||||
GLYPH_CACHE_KEY key = { face, glyphInfo[i].codepoint, m_fakeItal, m_fakeBold,
|
||||
GLYPH_CACHE_KEY key = { face, glyphInfo[i].codepoint, scaler, m_fakeItal, m_fakeBold,
|
||||
aMirror, aAngle };
|
||||
GLYPH_DATA& glyphData = s_glyphCache[ key ];
|
||||
|
||||
|
||||
@@ -320,10 +320,7 @@ void FP_LIB_TABLE::PrefetchLib( const wxString& aNickname )
|
||||
|
||||
const FP_LIB_TABLE_ROW* FP_LIB_TABLE::FindRow( const wxString& aNickname, bool aCheckIfEnabled )
|
||||
{
|
||||
// Do not optimize this code. Is done this way specifically to fix a runtime
|
||||
// error with clang 4.0.1.
|
||||
LIB_TABLE_ROW* ltrow = findRow( aNickname, aCheckIfEnabled );
|
||||
FP_LIB_TABLE_ROW* row = dynamic_cast< FP_LIB_TABLE_ROW* >( ltrow );
|
||||
FP_LIB_TABLE_ROW* row = static_cast<FP_LIB_TABLE_ROW*>( findRow( aNickname, aCheckIfEnabled ) );
|
||||
|
||||
if( !row )
|
||||
{
|
||||
@@ -333,9 +330,8 @@ const FP_LIB_TABLE_ROW* FP_LIB_TABLE::FindRow( const wxString& aNickname, bool a
|
||||
THROW_IO_ERROR( msg );
|
||||
}
|
||||
|
||||
// We've been 'lazy' up until now, but it cannot be deferred any longer,
|
||||
// instantiate a PCB_IO of the proper kind if it is not already in this
|
||||
// FP_LIB_TABLE_ROW.
|
||||
// We've been 'lazy' up until now, but it cannot be deferred any longer; instantiate a
|
||||
// PCB_IO of the proper kind if it is not already in this FP_LIB_TABLE_ROW.
|
||||
if( !row->plugin )
|
||||
row->setPlugin( PCB_IO_MGR::PluginFind( row->type ) );
|
||||
|
||||
|
||||
@@ -647,6 +647,14 @@ bool CAMERA::Zoom_T1( float aFactor )
|
||||
}
|
||||
|
||||
|
||||
void CAMERA::RotateScreen( float aAngleInRadians )
|
||||
{
|
||||
glm::mat4 matrix = GetRotationMatrix();
|
||||
SetRotationMatrix( glm::rotate( matrix, aAngleInRadians, GetDir() ) );
|
||||
updateRotationMatrix();
|
||||
}
|
||||
|
||||
|
||||
void CAMERA::RotateX( float aAngleInRadians )
|
||||
{
|
||||
m_rotate_aux.x += aAngleInRadians;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KICAD, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2012 Torsten Hueter, torstenhtr <at> gmx.de
|
||||
* Copyright (C) 2012-2023 Kicad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2012-2024 Kicad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2017-2018 CERN
|
||||
*
|
||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
#include <wx/image.h>
|
||||
#include <wx/log.h>
|
||||
#include <wx/rawbmp.h>
|
||||
|
||||
#include <gal/cairo/cairo_gal.h>
|
||||
#include <gal/cairo/cairo_compositor.h>
|
||||
@@ -190,7 +191,7 @@ static double roundp( double x )
|
||||
|
||||
const VECTOR2D CAIRO_GAL_BASE::roundp( const VECTOR2D& v )
|
||||
{
|
||||
if( m_lineWidthIsOdd && m_isStrokeEnabled )
|
||||
if( m_lineWidthIsOdd )
|
||||
return VECTOR2D( ::roundp( v.x ), ::roundp( v.y ) );
|
||||
else
|
||||
return VECTOR2D( floor( v.x + 0.5 ), floor( v.y + 0.5 ) );
|
||||
@@ -352,13 +353,18 @@ void CAIRO_GAL_BASE::DrawArc( const VECTOR2D& aCenterPoint, double aRadius,
|
||||
|
||||
double r = xform( aRadius );
|
||||
|
||||
// N.B. This is backwards. We set this because we want to adjust the center
|
||||
// point that changes both endpoints. In the worst case, this is twice as far.
|
||||
// We cannot adjust radius or center based on the other because this causes the
|
||||
// whole arc to change position/size
|
||||
m_lineWidthIsOdd = !( static_cast<int>( aRadius ) % 2 );
|
||||
// Adjust center and radius slightly to better match the rounding of endpoints.
|
||||
VECTOR2D mid = roundp( xform( aCenterPoint ) );
|
||||
|
||||
auto mid = roundp( xform( aCenterPoint ) );
|
||||
VECTOR2D startPointS = VECTOR2D( r, 0.0 );
|
||||
VECTOR2D endPointS = VECTOR2D( r, 0.0 );
|
||||
RotatePoint( startPointS, -EDA_ANGLE( startAngle, RADIANS_T ) );
|
||||
RotatePoint( endPointS, -EDA_ANGLE( endAngle, RADIANS_T ) );
|
||||
|
||||
VECTOR2D refStart = roundp( xform( aCenterPoint ) + startPointS );
|
||||
VECTOR2D refEnd = roundp( xform( aCenterPoint ) + endPointS );
|
||||
|
||||
r = ( ( refStart - mid ).EuclideanNorm() + ( refEnd - mid ).EuclideanNorm() ) / 2.0;
|
||||
|
||||
cairo_set_line_width( m_currentContext, m_lineWidthInPixels );
|
||||
cairo_new_sub_path( m_currentContext );
|
||||
@@ -403,13 +409,7 @@ void CAIRO_GAL_BASE::DrawArcSegment( const VECTOR2D& aCenterPoint, double aRadiu
|
||||
|
||||
double r = xform( aRadius );
|
||||
|
||||
// N.B. This is backwards. We set this because we want to adjust the center
|
||||
// point that changes both endpoints. In the worst case, this is twice as far.
|
||||
// We cannot adjust radius or center based on the other because this causes the
|
||||
// whole arc to change position/size
|
||||
m_lineWidthIsOdd = !( static_cast<int>( aRadius ) % 2 );
|
||||
|
||||
VECTOR2D mid = roundp( xform( aCenterPoint ) );
|
||||
VECTOR2D mid = xform( aCenterPoint );
|
||||
double width = xform( aWidth / 2.0 );
|
||||
VECTOR2D startPointS = VECTOR2D( r, 0.0 );
|
||||
VECTOR2D endPointS = VECTOR2D( r, 0.0 );
|
||||
@@ -583,6 +583,9 @@ void CAIRO_GAL_BASE::DrawBitmap( const BITMAP_BASE& aBitmap, double alphaBlend )
|
||||
void CAIRO_GAL_BASE::ResizeScreen( int aWidth, int aHeight )
|
||||
{
|
||||
m_screenSize = VECTOR2I( aWidth, aHeight );
|
||||
|
||||
m_bitmapSize = VECTOR2I( std::ceil( m_screenSize.x * getScalingFactor() ),
|
||||
std::ceil( m_screenSize.y * getScalingFactor() ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -594,9 +597,9 @@ void CAIRO_GAL_BASE::Flush()
|
||||
|
||||
void CAIRO_GAL_BASE::ClearScreen()
|
||||
{
|
||||
cairo_set_source_rgb( m_currentContext, m_clearColor.r, m_clearColor.g, m_clearColor.b );
|
||||
cairo_rectangle( m_currentContext, 0.0, 0.0, m_screenSize.x, m_screenSize.y );
|
||||
cairo_fill( m_currentContext );
|
||||
cairo_set_source_rgb( m_context, m_clearColor.r, m_clearColor.g, m_clearColor.b );
|
||||
cairo_rectangle( m_context, 0.0, 0.0, m_bitmapSize.x, m_bitmapSize.y );
|
||||
cairo_fill( m_context );
|
||||
}
|
||||
|
||||
|
||||
@@ -1021,15 +1024,15 @@ void CAIRO_GAL_BASE::resetContext()
|
||||
|
||||
m_imageSurfaces.clear();
|
||||
|
||||
ClearScreen();
|
||||
|
||||
// Compute the world <-> screen transformations
|
||||
ComputeWorldScreenMatrix();
|
||||
|
||||
cairo_matrix_init( &m_cairoWorldScreenMatrix, m_worldScreenMatrix.m_data[0][0],
|
||||
m_worldScreenMatrix.m_data[1][0], m_worldScreenMatrix.m_data[0][1],
|
||||
m_worldScreenMatrix.m_data[1][1], m_worldScreenMatrix.m_data[0][2],
|
||||
m_worldScreenMatrix.m_data[1][2] );
|
||||
double sf = getScalingFactor();
|
||||
|
||||
cairo_matrix_init( &m_cairoWorldScreenMatrix,
|
||||
m_worldScreenMatrix.m_data[0][0] * sf, m_worldScreenMatrix.m_data[1][0] * sf,
|
||||
m_worldScreenMatrix.m_data[0][1] * sf, m_worldScreenMatrix.m_data[1][1] * sf,
|
||||
m_worldScreenMatrix.m_data[0][2] * sf, m_worldScreenMatrix.m_data[1][2] * sf );
|
||||
|
||||
// we work in screen-space coordinates and do the transforms outside.
|
||||
cairo_identity_matrix( m_context );
|
||||
@@ -1337,8 +1340,10 @@ CAIRO_GAL::CAIRO_GAL( GAL_DISPLAY_OPTIONS& aDisplayOptions, wxWindow* aParent,
|
||||
m_currentTarget = TARGET_NONCACHED;
|
||||
SetTarget( TARGET_NONCACHED );
|
||||
|
||||
SetBackgroundStyle( wxBG_STYLE_PAINT );
|
||||
|
||||
m_bitmapBuffer = nullptr;
|
||||
m_wxOutput = nullptr;
|
||||
m_wxBitmap = nullptr;
|
||||
|
||||
m_parentWindow = aParent;
|
||||
m_mouseListener = aMouseListener;
|
||||
@@ -1373,11 +1378,10 @@ CAIRO_GAL::CAIRO_GAL( GAL_DISPLAY_OPTIONS& aDisplayOptions, wxWindow* aParent,
|
||||
Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) );
|
||||
#endif
|
||||
|
||||
SetSize( aParent->GetClientSize() );
|
||||
m_screenSize = ToVECTOR2I( aParent->GetClientSize() );
|
||||
Bind( wxEVT_GESTURE_ZOOM, &CAIRO_GAL::skipGestureEvent, this );
|
||||
Bind( wxEVT_GESTURE_PAN, &CAIRO_GAL::skipGestureEvent, this );
|
||||
|
||||
// Allocate memory for pixel storage
|
||||
allocateBitmaps();
|
||||
SetSize( aParent->GetClientSize() );
|
||||
|
||||
m_isInitialized = false;
|
||||
}
|
||||
@@ -1413,45 +1417,44 @@ void CAIRO_GAL::EndDrawing()
|
||||
|
||||
// Now translate the raw context data from the format stored
|
||||
// by cairo into a format understood by wxImage.
|
||||
int height = m_screenSize.y;
|
||||
int height = m_bitmapSize.y;
|
||||
int stride = m_stride;
|
||||
|
||||
unsigned char* srcRow = m_bitmapBuffer;
|
||||
unsigned char* dst = m_wxOutput;
|
||||
|
||||
wxNativePixelData dstData( *m_wxBitmap );
|
||||
wxNativePixelData::Iterator di( dstData );
|
||||
|
||||
for( int y = 0; y < height; y++ )
|
||||
{
|
||||
for( int x = 0; x < stride; x += 4 )
|
||||
wxNativePixelData::Iterator rowStart = di;
|
||||
|
||||
for( int x = 0; x < stride; x += 4, ++di )
|
||||
{
|
||||
const unsigned char* src = srcRow + x;
|
||||
|
||||
#if defined( __BYTE_ORDER__ ) && ( __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ )
|
||||
// XRGB
|
||||
dst[0] = src[1];
|
||||
dst[1] = src[2];
|
||||
dst[2] = src[3];
|
||||
di.Red() = src[1];
|
||||
di.Green() = src[2];
|
||||
di.Blue() = src[3];
|
||||
#else
|
||||
// BGRX
|
||||
dst[0] = src[2];
|
||||
dst[1] = src[1];
|
||||
dst[2] = src[0];
|
||||
di.Red() = src[2];
|
||||
di.Green() = src[1];
|
||||
di.Blue() = src[0];
|
||||
#endif
|
||||
dst += 3;
|
||||
}
|
||||
|
||||
srcRow += stride;
|
||||
|
||||
di = rowStart;
|
||||
di.OffsetY( dstData, 1 );
|
||||
}
|
||||
|
||||
wxImage img( m_wxBufferWidth, m_screenSize.y, m_wxOutput, true );
|
||||
wxBitmap bmp( img );
|
||||
wxMemoryDC mdc( bmp );
|
||||
wxClientDC clientDC( this );
|
||||
|
||||
// Now it is the time to blit the mouse cursor
|
||||
blitCursor( mdc );
|
||||
clientDC.Blit( 0, 0, m_screenSize.x, m_screenSize.y, &mdc, 0, 0, wxCOPY );
|
||||
|
||||
deinitSurface();
|
||||
|
||||
Refresh(); // Trigger repaint
|
||||
}
|
||||
|
||||
|
||||
@@ -1472,7 +1475,7 @@ void CAIRO_GAL::ResizeScreen( int aWidth, int aHeight )
|
||||
allocateBitmaps();
|
||||
|
||||
if( m_validCompositor )
|
||||
m_compositor->Resize( aWidth, aHeight );
|
||||
m_compositor->Resize( m_bitmapSize.x, m_bitmapSize.y );
|
||||
|
||||
m_validCompositor = false;
|
||||
|
||||
@@ -1563,7 +1566,7 @@ void CAIRO_GAL::initSurface()
|
||||
return;
|
||||
|
||||
m_surface = cairo_image_surface_create_for_data( m_bitmapBuffer, GAL_FORMAT, m_wxBufferWidth,
|
||||
m_screenSize.y, m_stride );
|
||||
m_bitmapSize.y, m_stride );
|
||||
|
||||
m_context = cairo_create( m_surface );
|
||||
|
||||
@@ -1594,17 +1597,18 @@ void CAIRO_GAL::deinitSurface()
|
||||
|
||||
void CAIRO_GAL::allocateBitmaps()
|
||||
{
|
||||
m_wxBufferWidth = m_screenSize.x;
|
||||
m_wxBufferWidth = m_bitmapSize.x;
|
||||
|
||||
// Create buffer, use the system independent Cairo context backend
|
||||
m_stride = cairo_format_stride_for_width( GAL_FORMAT, m_wxBufferWidth );
|
||||
m_bufferSize = m_stride * m_screenSize.y;
|
||||
m_bufferSize = m_stride * m_bitmapSize.y;
|
||||
|
||||
wxASSERT( m_bitmapBuffer == nullptr );
|
||||
m_bitmapBuffer = new unsigned char[m_bufferSize];
|
||||
|
||||
wxASSERT( m_wxOutput == nullptr );
|
||||
m_wxOutput = new unsigned char[m_wxBufferWidth * 3 * m_screenSize.y];
|
||||
wxASSERT( m_wxBitmap == nullptr );
|
||||
m_wxBitmap = new wxBitmap( m_wxBufferWidth, m_bitmapSize.y, 24 );
|
||||
m_wxBitmap->SetScaleFactor( getScalingFactor() );
|
||||
}
|
||||
|
||||
|
||||
@@ -1613,8 +1617,8 @@ void CAIRO_GAL::deleteBitmaps()
|
||||
delete[] m_bitmapBuffer;
|
||||
m_bitmapBuffer = nullptr;
|
||||
|
||||
delete[] m_wxOutput;
|
||||
m_wxOutput = nullptr;
|
||||
delete m_wxBitmap;
|
||||
m_wxBitmap = nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -1622,7 +1626,7 @@ void CAIRO_GAL::setCompositor()
|
||||
{
|
||||
// Recreate the compositor with the new Cairo context
|
||||
m_compositor.reset( new CAIRO_COMPOSITOR( &m_currentContext ) );
|
||||
m_compositor->Resize( m_screenSize.x, m_screenSize.y );
|
||||
m_compositor->Resize( m_bitmapSize.x, m_bitmapSize.y );
|
||||
m_compositor->SetAntialiasingMode( m_options.cairo_antialiasing_mode );
|
||||
|
||||
// Prepare buffers
|
||||
@@ -1636,7 +1640,22 @@ void CAIRO_GAL::setCompositor()
|
||||
|
||||
void CAIRO_GAL::onPaint( wxPaintEvent& aEvent )
|
||||
{
|
||||
PostPaint( aEvent );
|
||||
// We should have the rendered image in m_wxBitmap after EDA_DRAW_PANEL_GAL::onPaint
|
||||
|
||||
if( !m_wxBitmap )
|
||||
{
|
||||
wxLogDebug( "CAIRO_GAL::onPaint null output bitmap buffer" );
|
||||
return;
|
||||
}
|
||||
|
||||
{
|
||||
// Now it is the time to blit the mouse cursor
|
||||
wxMemoryDC mdc( *m_wxBitmap );
|
||||
blitCursor( mdc );
|
||||
}
|
||||
|
||||
wxPaintDC paintDC( this );
|
||||
paintDC.DrawBitmap( *m_wxBitmap, 0, 0 );
|
||||
}
|
||||
|
||||
|
||||
@@ -1648,6 +1667,14 @@ void CAIRO_GAL::skipMouseEvent( wxMouseEvent& aEvent )
|
||||
}
|
||||
|
||||
|
||||
void CAIRO_GAL::skipGestureEvent( wxGestureEvent& aEvent )
|
||||
{
|
||||
// Post the gesture event to the event listener registered in constructor, if any
|
||||
if( m_mouseListener )
|
||||
wxPostEvent( m_mouseListener, aEvent );
|
||||
}
|
||||
|
||||
|
||||
bool CAIRO_GAL::updatedGalDisplayOptions( const GAL_DISPLAY_OPTIONS& aOptions )
|
||||
{
|
||||
bool refresh = false;
|
||||
@@ -1672,13 +1699,22 @@ bool CAIRO_GAL::updatedGalDisplayOptions( const GAL_DISPLAY_OPTIONS& aOptions )
|
||||
}
|
||||
|
||||
|
||||
bool CAIRO_GAL::SetNativeCursorStyle( KICURSOR aCursor )
|
||||
double CAIRO_GAL::getScalingFactor()
|
||||
{
|
||||
return GetContentScaleFactor();
|
||||
};
|
||||
|
||||
|
||||
bool CAIRO_GAL::SetNativeCursorStyle( KICURSOR aCursor, bool aHiDPI )
|
||||
{
|
||||
// Store the current cursor type and get the wxCursor for it
|
||||
if( !GAL::SetNativeCursorStyle( aCursor ) )
|
||||
if( !GAL::SetNativeCursorStyle( aCursor, aHiDPI ) )
|
||||
return false;
|
||||
|
||||
m_currentwxCursor = CURSOR_STORE::GetCursor( m_currentNativeCursor );
|
||||
if( aHiDPI )
|
||||
m_currentwxCursor = CURSOR_STORE::GetHiDPICursor( m_currentNativeCursor );
|
||||
else
|
||||
m_currentwxCursor = CURSOR_STORE::GetCursor( m_currentNativeCursor );
|
||||
|
||||
// Update the cursor in the wx control
|
||||
wxWindow::SetCursor( m_currentwxCursor );
|
||||
|
||||
+259
-51
@@ -44,85 +44,76 @@
|
||||
#include <cursors/cursor-subtract.xpm>
|
||||
#include <cursors/cursor-text.xpm>
|
||||
#include <cursors/cursor-xor.xpm>
|
||||
#include <cursors/cursor-zoom.xpm>
|
||||
#include <cursors/cursor-zoom-in.xpm>
|
||||
#include <cursors/cursor-zoom-out.xpm>
|
||||
#include <cursors/cursor_tune.xpm>
|
||||
#include <cursors/voltage_probe.xpm>
|
||||
#include <cursors/current_probe.xpm>
|
||||
|
||||
// HiDPI cursor files
|
||||
#include <cursors/cursor-add64.xpm>
|
||||
#include <cursors/cursor-component64.xpm>
|
||||
#include <cursors/cursor-eraser64.xpm>
|
||||
#include <cursors/cursor-label-global64.xpm>
|
||||
#include <cursors/cursor-label-hier64.xpm>
|
||||
#include <cursors/cursor-label-net64.xpm>
|
||||
#include <cursors/cursor-line-bus64.xpm>
|
||||
#include <cursors/cursor-line-graphic64.xpm>
|
||||
#include <cursors/cursor-line-wire64.xpm>
|
||||
#include <cursors/cursor-line-wire-add64.xpm>
|
||||
#include <cursors/cursor-measure64.xpm>
|
||||
#include <cursors/cursor-pencil64.xpm>
|
||||
#include <cursors/cursor-select-lasso64.xpm>
|
||||
#include <cursors/cursor-select-window64.xpm>
|
||||
#include <cursors/cursor-subtract64.xpm>
|
||||
#include <cursors/cursor-text64.xpm>
|
||||
#include <cursors/cursor-xor64.xpm>
|
||||
#include <cursors/cursor-zoom-in64.xpm>
|
||||
#include <cursors/cursor-zoom-out64.xpm>
|
||||
#include <cursors/cursor_tune64.xpm>
|
||||
#include <cursors/voltage_probe64.xpm>
|
||||
#include <cursors/current_probe64.xpm>
|
||||
|
||||
|
||||
// Under MSW, the standard cursor is white on black. Elsewhere it is black on white
|
||||
#ifdef __WINDOWS__
|
||||
#include <cursors/cursor-place.xpm>
|
||||
#include <cursors/cursor-place64.xpm>
|
||||
#include <cursors/cursor-select-m.xpm>
|
||||
#include <cursors/cursor-select-m64.xpm>
|
||||
#else
|
||||
#include <cursors/cursor-place-black.xpm>
|
||||
#include <cursors/cursor-place-black64.xpm>
|
||||
#include <cursors/cursor-select-m-black.xpm>
|
||||
#include <cursors/cursor-select-m-black64.xpm>
|
||||
#endif
|
||||
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/debug.h>
|
||||
|
||||
|
||||
static const unsigned char voltage_probe[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00,
|
||||
0x00, 0x30, 0x06, 0x00, 0x00, 0x18, 0x0c, 0x00, 0x00, 0x0e, 0x08, 0x00, 0x80, 0x07, 0x08, 0x00,
|
||||
0xc0, 0x07, 0x18, 0x00, 0xe0, 0x07, 0x30, 0x00, 0xf0, 0x03, 0x60, 0x00, 0xf8, 0x01, 0x00, 0x00,
|
||||
0xfc, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, 0xc0,
|
||||
0x0f, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0xf0,
|
||||
0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
|
||||
static const unsigned char current_probe[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x60, 0x06, 0x00,
|
||||
0x00, 0x30, 0x0c, 0x00, 0x00, 0x1c, 0x08, 0x00, 0x00, 0x0f, 0x08, 0x00, 0x80, 0x0f, 0x18, 0x00,
|
||||
0xc0, 0x0f, 0x30, 0x80, 0xe1, 0x07, 0x60, 0x80, 0xf1, 0x03, 0x00, 0x80, 0xf9, 0x01, 0x00, 0x80,
|
||||
0xfd, 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, 0xc0,
|
||||
0x0f, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0xc6, 0x01, 0x00, 0x00, 0x83,
|
||||
0x01, 0x00, 0x00, 0x83, 0x01, 0x00, 0x00, 0x83, 0x01, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0xfc,
|
||||
0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00 };
|
||||
|
||||
static const unsigned char cursor_tune[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xc0, 0x0f, 0x00,
|
||||
0x00, 0xe0, 0x1f, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xfc, 0x07, 0x00,
|
||||
0x00, 0xfe, 0x03, 0x00, 0x00, 0xff, 0x01, 0x00, 0x80, 0xff, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00,
|
||||
0xe0, 0x3f, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00,
|
||||
0xfc, 0x03, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0xea, 0x00, 0x00, 0x00,
|
||||
0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x50,
|
||||
0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x0a,
|
||||
0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00 };
|
||||
|
||||
static const unsigned char cursor_tune_mask[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xc0, 0x0f,
|
||||
0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xfc, 0x07,
|
||||
0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0xff, 0x01, 0x00, 0x80, 0xff, 0x00, 0x00, 0xc0, 0x7f, 0x00,
|
||||
0x00, 0xe0, 0x3f, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, 0xfc, 0x07, 0x00,
|
||||
0x00, 0xfc, 0x03, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xee, 0x00, 0x00,
|
||||
0x00, 0x07, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00,
|
||||
0x70, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00,
|
||||
0x0e, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00 };
|
||||
|
||||
|
||||
static const std::vector<CURSOR_STORE::CURSOR_DEF> standard_cursors = {
|
||||
{
|
||||
KICURSOR::VOLTAGE_PROBE,
|
||||
voltage_probe,
|
||||
voltage_probe,
|
||||
nullptr,
|
||||
nullptr,
|
||||
voltage_probe_xpm,
|
||||
{ 32, 32 },
|
||||
{ 1, 31 },
|
||||
},
|
||||
{
|
||||
KICURSOR::CURRENT_PROBE,
|
||||
current_probe,
|
||||
current_probe,
|
||||
nullptr,
|
||||
nullptr,
|
||||
current_probe_xpm,
|
||||
{ 32, 32 },
|
||||
{ 4, 27 },
|
||||
},
|
||||
{
|
||||
KICURSOR::TUNE,
|
||||
cursor_tune,
|
||||
cursor_tune_mask,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_tune_xpm,
|
||||
{ 32, 32 },
|
||||
{ 1, 30 },
|
||||
},
|
||||
@@ -198,7 +189,7 @@ static const std::vector<CURSOR_STORE::CURSOR_DEF> standard_cursors = {
|
||||
KICURSOR::ZOOM_IN,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_zoom_xpm,
|
||||
cursor_zoom_in_xpm,
|
||||
{ 32, 32 },
|
||||
{ 6, 6 },
|
||||
},
|
||||
@@ -305,6 +296,209 @@ static const std::vector<CURSOR_STORE::CURSOR_DEF> standard_cursors = {
|
||||
};
|
||||
|
||||
|
||||
static const std::vector<CURSOR_STORE::CURSOR_DEF> hidpi_cursors = {
|
||||
{
|
||||
KICURSOR::VOLTAGE_PROBE,
|
||||
nullptr,
|
||||
nullptr,
|
||||
voltage_probe64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 1, 62 },
|
||||
},
|
||||
{
|
||||
KICURSOR::CURRENT_PROBE,
|
||||
nullptr,
|
||||
nullptr,
|
||||
current_probe64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 8, 54 },
|
||||
},
|
||||
{
|
||||
KICURSOR::TUNE,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_tune64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 2, 60 },
|
||||
},
|
||||
{
|
||||
KICURSOR::PENCIL,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_pencil64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 8, 54 },
|
||||
},
|
||||
{
|
||||
KICURSOR::MOVING,
|
||||
nullptr,
|
||||
nullptr,
|
||||
#ifdef __WINDOWS__
|
||||
cursor_select_m64_xpm,
|
||||
#else
|
||||
cursor_select_m_black64_xpm,
|
||||
#endif
|
||||
{ 64, 64 },
|
||||
{ 2, 2 },
|
||||
},
|
||||
{
|
||||
KICURSOR::REMOVE,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_eraser64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 8, 8 },
|
||||
},
|
||||
{
|
||||
KICURSOR::TEXT,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_text64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 14, 14 },
|
||||
},
|
||||
{
|
||||
KICURSOR::MEASURE,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_measure64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 8, 8 },
|
||||
},
|
||||
{
|
||||
KICURSOR::ADD,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_add64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 14, 14 },
|
||||
},
|
||||
{
|
||||
KICURSOR::SUBTRACT,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_subtract64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 14, 14 },
|
||||
},
|
||||
{
|
||||
KICURSOR::XOR,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_xor64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 14, 14 },
|
||||
},
|
||||
{
|
||||
KICURSOR::ZOOM_IN,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_zoom_in64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 12, 12 },
|
||||
},
|
||||
{
|
||||
KICURSOR::ZOOM_OUT,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_zoom_out64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 12, 12 },
|
||||
},
|
||||
{
|
||||
KICURSOR::LABEL_NET,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_label_net64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 14, 14 },
|
||||
},
|
||||
{
|
||||
KICURSOR::LABEL_GLOBAL,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_label_global64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 14, 14 },
|
||||
},
|
||||
{
|
||||
KICURSOR::COMPONENT,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_component64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 14, 14 },
|
||||
},
|
||||
{
|
||||
KICURSOR::SELECT_LASSO,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_select_lasso64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 14, 14 },
|
||||
},
|
||||
{
|
||||
KICURSOR::SELECT_WINDOW,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_select_window64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 14, 20 },
|
||||
},
|
||||
{
|
||||
KICURSOR::LINE_BUS,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_line_bus64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 10, 52 },
|
||||
},
|
||||
{
|
||||
KICURSOR::LINE_WIRE,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_line_wire64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 10, 52 },
|
||||
},
|
||||
{
|
||||
KICURSOR::LINE_WIRE_ADD,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_line_wire_add64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 10, 52 },
|
||||
},
|
||||
{
|
||||
KICURSOR::LINE_GRAPHIC,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_line_graphic64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 10, 52 },
|
||||
},
|
||||
{
|
||||
KICURSOR::LABEL_HIER,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_label_hier64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 14, 14 },
|
||||
},
|
||||
{
|
||||
KICURSOR::PLACE,
|
||||
nullptr,
|
||||
nullptr,
|
||||
#ifdef __WINDOWS__
|
||||
cursor_place64_xpm,
|
||||
#else
|
||||
cursor_place_black64_xpm,
|
||||
#endif
|
||||
{ 64, 64 },
|
||||
{ 2, 2 },
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Construct a cursor for the given definition.
|
||||
*
|
||||
@@ -393,8 +587,8 @@ const wxCursor& CURSOR_STORE::Get( KICURSOR aIdKey ) const
|
||||
|
||||
const wxCursor CURSOR_STORE::GetCursor( KICURSOR aCursorType )
|
||||
{
|
||||
wxStockCursor stock =
|
||||
GetStockCursor( aCursorType );
|
||||
wxStockCursor stock = GetStockCursor( aCursorType );
|
||||
|
||||
if( stock != wxCURSOR_MAX )
|
||||
{
|
||||
return wxCursor( stock );
|
||||
@@ -405,6 +599,20 @@ const wxCursor CURSOR_STORE::GetCursor( KICURSOR aCursorType )
|
||||
}
|
||||
|
||||
|
||||
const wxCursor CURSOR_STORE::GetHiDPICursor( KICURSOR aCursorType )
|
||||
{
|
||||
wxStockCursor stock = GetStockCursor( aCursorType );
|
||||
|
||||
if( stock != wxCURSOR_MAX )
|
||||
{
|
||||
return wxCursor( stock );
|
||||
}
|
||||
|
||||
static CURSOR_STORE store( hidpi_cursors );
|
||||
return store.Get( aCursorType );
|
||||
}
|
||||
|
||||
|
||||
wxStockCursor CURSOR_STORE::GetStockCursor( KICURSOR aCursorType )
|
||||
{
|
||||
wxStockCursor stockCursor;
|
||||
|
||||
@@ -81,7 +81,7 @@ GAL::GAL( GAL_DISPLAY_OPTIONS& aDisplayOptions ) :
|
||||
SetCursorEnabled( false );
|
||||
|
||||
// Initialize the native widget to an arrow cursor
|
||||
SetNativeCursorStyle( KICURSOR::ARROW );
|
||||
SetNativeCursorStyle( KICURSOR::ARROW, false );
|
||||
|
||||
// Initialize text properties
|
||||
ResetTextAttributes();
|
||||
@@ -277,7 +277,7 @@ void GAL::BitmapText( const wxString& aText, const VECTOR2I& aPosition, const ED
|
||||
}
|
||||
|
||||
|
||||
bool GAL::SetNativeCursorStyle( KICURSOR aCursor )
|
||||
bool GAL::SetNativeCursorStyle( KICURSOR aCursor, bool aHiDPI )
|
||||
{
|
||||
if( m_currentNativeCursor == aCursor )
|
||||
return false;
|
||||
|
||||
@@ -34,8 +34,7 @@ HIDPI_GL_CANVAS::HIDPI_GL_CANVAS( const KIGFX::VC_SETTINGS& aSettings, wxWindow*
|
||||
const wxPoint& aPos, const wxSize& aSize, long aStyle,
|
||||
const wxString& aName, const wxPalette& aPalette ) :
|
||||
wxGLCanvas( aParent, aGLAttribs, aId, aPos, aSize, aStyle, aName, aPalette ),
|
||||
m_settings( aSettings ),
|
||||
m_scale_factor( DPI_SCALING::GetDefaultScaleFactor() )
|
||||
m_settings( aSettings )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -64,13 +63,7 @@ wxPoint HIDPI_GL_CANVAS::GetNativePosition( const wxPoint& aPoint ) const
|
||||
}
|
||||
|
||||
|
||||
void HIDPI_GL_CANVAS::SetScaleFactor( double aNewScaleFactor )
|
||||
{
|
||||
m_scale_factor = aNewScaleFactor;
|
||||
}
|
||||
|
||||
|
||||
double HIDPI_GL_CANVAS::GetScaleFactor() const
|
||||
{
|
||||
return m_scale_factor;
|
||||
return GetContentScaleFactor();
|
||||
}
|
||||
@@ -113,26 +113,30 @@ void GPU_CACHED_MANAGER::BeginDrawing()
|
||||
}
|
||||
|
||||
|
||||
void GPU_CACHED_MANAGER::DrawIndices( const VERTEX_ITEM *aItem )
|
||||
void GPU_CACHED_MANAGER::DrawIndices( const VERTEX_ITEM* aItem )
|
||||
{
|
||||
wxASSERT( m_isDrawing );
|
||||
// Hot path: don't use wxASSERT
|
||||
assert( m_isDrawing );
|
||||
|
||||
unsigned int offset = aItem->GetOffset();
|
||||
unsigned int size = aItem->GetSize();
|
||||
|
||||
if( size > 1000 )
|
||||
if( size == 0 )
|
||||
return;
|
||||
|
||||
if( size <= 1000 )
|
||||
{
|
||||
m_totalNormal += size;
|
||||
m_vranges.emplace_back( offset, offset + size - 1, false );
|
||||
m_curVrangeSize += size;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_totalHuge += size;
|
||||
m_vranges.emplace_back( offset, offset + size - 1, true );
|
||||
m_indexBufSize = std::max( m_curVrangeSize, m_indexBufSize );
|
||||
m_curVrangeSize = 0;
|
||||
}
|
||||
else if ( size > 0 )
|
||||
{
|
||||
m_totalNormal += size;
|
||||
m_vranges.emplace_back( offset, offset + size - 1, false );
|
||||
m_curVrangeSize += size;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KICAD, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2012 Torsten Hueter, torstenhtr <at> gmx.de
|
||||
* Copyright (C) 2012-2023 Kicad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2012-2024 Kicad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2013-2017 CERN
|
||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||
*
|
||||
@@ -33,6 +33,7 @@
|
||||
#endif
|
||||
|
||||
#include <advanced_config.h>
|
||||
#include <build_version.h>
|
||||
#include <gal/opengl/opengl_gal.h>
|
||||
#include <gal/opengl/utils.h>
|
||||
#include <gal/definitions.h>
|
||||
@@ -390,6 +391,9 @@ OPENGL_GAL::OPENGL_GAL( const KIGFX::VC_SETTINGS& aVcSettings, GAL_DISPLAY_OPTIO
|
||||
Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) );
|
||||
#endif
|
||||
|
||||
Bind( wxEVT_GESTURE_ZOOM, &OPENGL_GAL::skipGestureEvent, this );
|
||||
Bind( wxEVT_GESTURE_PAN, &OPENGL_GAL::skipGestureEvent, this );
|
||||
|
||||
SetSize( aParent->GetClientSize() );
|
||||
m_screenSize = ToVECTOR2I( GetNativePixelSize() );
|
||||
|
||||
@@ -514,13 +518,6 @@ bool OPENGL_GAL::updatedGalDisplayOptions( const GAL_DISPLAY_OPTIONS& aOptions )
|
||||
refresh = true;
|
||||
}
|
||||
|
||||
if( m_options.m_scaleFactor != GetScaleFactor() )
|
||||
{
|
||||
SetScaleFactor( m_options.m_scaleFactor );
|
||||
m_gridLineWidth = m_options.m_scaleFactor * ( m_options.m_gridLineWidth + 0.25 );
|
||||
refresh = true;
|
||||
}
|
||||
|
||||
if( super::updatedGalDisplayOptions( aOptions ) || refresh )
|
||||
{
|
||||
Refresh();
|
||||
@@ -2149,13 +2146,16 @@ void OPENGL_GAL::EndDiffLayer()
|
||||
}
|
||||
|
||||
|
||||
bool OPENGL_GAL::SetNativeCursorStyle( KICURSOR aCursor )
|
||||
bool OPENGL_GAL::SetNativeCursorStyle( KICURSOR aCursor, bool aHiDPI )
|
||||
{
|
||||
// Store the current cursor type and get the wxCursor for it
|
||||
if( !GAL::SetNativeCursorStyle( aCursor ) )
|
||||
if( !GAL::SetNativeCursorStyle( aCursor, aHiDPI ) )
|
||||
return false;
|
||||
|
||||
m_currentwxCursor = CURSOR_STORE::GetCursor( m_currentNativeCursor );
|
||||
if( aHiDPI )
|
||||
m_currentwxCursor = CURSOR_STORE::GetHiDPICursor( m_currentNativeCursor );
|
||||
else
|
||||
m_currentwxCursor = CURSOR_STORE::GetCursor( m_currentNativeCursor );
|
||||
|
||||
// Update the cursor in the wx control
|
||||
HIDPI_GL_CANVAS::SetCursor( m_currentwxCursor );
|
||||
@@ -2623,6 +2623,14 @@ void OPENGL_GAL::skipMouseEvent( wxMouseEvent& aEvent )
|
||||
}
|
||||
|
||||
|
||||
void OPENGL_GAL::skipGestureEvent( wxGestureEvent& aEvent )
|
||||
{
|
||||
// Post the gesture event to the event listener registered in constructor, if any
|
||||
if( m_mouseListener )
|
||||
wxPostEvent( m_mouseListener, aEvent );
|
||||
}
|
||||
|
||||
|
||||
void OPENGL_GAL::blitCursor()
|
||||
{
|
||||
if( !IsCursorEnabled() )
|
||||
@@ -2694,6 +2702,9 @@ void OPENGL_GAL::init()
|
||||
|
||||
#endif // KICAD_USE_EGL
|
||||
|
||||
SetOpenGLInfo( (const char*) glGetString( GL_VENDOR ), (const char*) glGetString( GL_RENDERER ),
|
||||
(const char*) glGetString( GL_VERSION ) );
|
||||
|
||||
if( GLEW_OK != err )
|
||||
throw std::runtime_error( (const char*) glewGetErrorString( err ) );
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2016-2017 CERN
|
||||
* Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2021, 2024 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||
*
|
||||
@@ -170,13 +170,18 @@ static void GLAPIENTRY debugMsgCallback( GLenum aSource, GLenum aType, GLuint aI
|
||||
{
|
||||
switch( aSeverity )
|
||||
{
|
||||
case GL_DEBUG_SEVERITY_HIGH: wxLogDebug( "OpenGL ERROR: " ); break;
|
||||
case GL_DEBUG_SEVERITY_MEDIUM: wxLogDebug( "OpenGL WARNING: " ); break;
|
||||
case GL_DEBUG_SEVERITY_LOW: wxLogDebug( "OpenGL INFO: " ); break;
|
||||
case GL_DEBUG_SEVERITY_NOTIFICATION: return;
|
||||
case GL_DEBUG_SEVERITY_HIGH:
|
||||
wxLogTrace( traceGalOpenGlError, wxS( "OpenGL ERROR: %s" ), aMessage );
|
||||
break;
|
||||
case GL_DEBUG_SEVERITY_MEDIUM:
|
||||
wxLogTrace( traceGalOpenGlError, wxS( "OpenGL WARNING: %s" ), aMessage );
|
||||
break;
|
||||
case GL_DEBUG_SEVERITY_LOW:
|
||||
wxLogTrace( traceGalOpenGlError, wxS( "OpenGL INFO: %s" ), aMessage );
|
||||
break;
|
||||
case GL_DEBUG_SEVERITY_NOTIFICATION:
|
||||
return;
|
||||
}
|
||||
|
||||
wxLogDebug( "%s\n", aMessage );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2013-2016 CERN
|
||||
* Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2021, 2024 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||
*
|
||||
@@ -38,6 +38,15 @@
|
||||
#include <confirm.h>
|
||||
#include <wx/log.h>
|
||||
|
||||
|
||||
/**
|
||||
* Flag to enable #VERTEX_MANAGER debugging output.
|
||||
*
|
||||
* @ingroup trace_env_vars
|
||||
*/
|
||||
static const wxChar traceVertexManager[] = wxT( "KICAD_VERTEX_MANAGER" );
|
||||
|
||||
|
||||
using namespace KIGFX;
|
||||
|
||||
VERTEX_MANAGER::VERTEX_MANAGER( bool aCached ) :
|
||||
@@ -73,7 +82,7 @@ bool VERTEX_MANAGER::Reserve( unsigned int aSize )
|
||||
return true;
|
||||
|
||||
if( m_reservedSpace != 0 || m_reserved )
|
||||
wxLogDebug( wxT( "Did not use all previous vertices allocated" ) );
|
||||
wxLogTrace( traceVertexManager, wxS( "Did not use all previous vertices allocated" ) );
|
||||
|
||||
// flag to avoid hanging by calling DisplayError too many times:
|
||||
static bool show_err = true;
|
||||
@@ -173,7 +182,7 @@ void VERTEX_MANAGER::SetItem( VERTEX_ITEM& aItem ) const
|
||||
void VERTEX_MANAGER::FinishItem() const
|
||||
{
|
||||
if( m_reservedSpace != 0 || m_reserved )
|
||||
wxLogDebug( wxT( "Did not use all previous vertices allocated" ) );
|
||||
wxLogTrace( traceVertexManager, wxS( "Did not use all previous vertices allocated" ) );
|
||||
|
||||
m_container->FinishItem();
|
||||
}
|
||||
@@ -295,6 +304,7 @@ void VERTEX_MANAGER::putVertex( VERTEX& aTarget, GLfloat aX, GLfloat aY, GLfloat
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void VERTEX_MANAGER::EnableDepthTest( bool aEnabled )
|
||||
{
|
||||
m_gpu->EnableDepthTest( aEnabled );
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
#include "git_add_to_index_handler.h"
|
||||
|
||||
#include <iterator>
|
||||
|
||||
#include <wx/string.h>
|
||||
#include <wx/log.h>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user