Compare commits
839 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9a01cf1b35 | |||
| 0f6f30b26e | |||
| 8219334806 | |||
| e6997d87b3 | |||
| 13b453c21e | |||
| 4ec3f18fda | |||
| fc8ffd8421 | |||
| 4551651777 | |||
| 82f2e8c344 | |||
| b76c5c9433 | |||
| 1737927814 | |||
| 38d7ac6d9c | |||
| db1bf4351b | |||
| 2d491f9cbd | |||
| a58d0f8a67 | |||
| 42cd6ca4ca | |||
| f292f1628b | |||
| 20909d4948 | |||
| 1f6ff4a519 | |||
| 07568f87c3 | |||
| 267e510071 | |||
| 73b921d591 | |||
| 8677035989 | |||
| a179893d70 | |||
| 540fb91d34 | |||
| 591a07d2d9 | |||
| f607e913d5 | |||
| 3d57de91e8 | |||
| 9fbceaa458 | |||
| 281180512f | |||
| 50fa1937f9 | |||
| d79aee3f78 | |||
| f599185e2d | |||
| fd79c7ae46 | |||
| 9de0846f3e | |||
| f168ece461 | |||
| 4100650ce1 | |||
| 87bb437fd3 | |||
| 626c671448 | |||
| b532c4a2b8 | |||
| 276cb7590d | |||
| f66aae2213 | |||
| 17c4e21f34 | |||
| 3613bca5ea | |||
| eff9c46e59 | |||
| c186a42a54 | |||
| 676d35f559 | |||
| e8bc4632b4 | |||
| 222158e954 | |||
| dde87b2f45 | |||
| 789284f519 | |||
| 19576ae167 | |||
| be8fe7bdd6 | |||
| d7a6a2cc71 | |||
| 7eea344f91 | |||
| 2bd0b67591 | |||
| d9307a174d | |||
| 59c5b30f3f | |||
| 938859f10a | |||
| a9b53d94e8 | |||
| a33e2ed9b1 | |||
| 7687ca2080 | |||
| 2a1a6e8cbe | |||
| 45fa9e8448 | |||
| 0ca66d1af3 | |||
| 63baa69342 | |||
| 894291faba | |||
| 51708bab49 | |||
| 4497a754fb | |||
| 6223e7475c | |||
| bf97378168 | |||
| 5a6f291c72 | |||
| 3404f4e86b | |||
| 6c07ebe5f2 | |||
| 24a4f06013 | |||
| 73bf4cbce7 | |||
| 67c8071bf4 | |||
| 9b163cb444 | |||
| 83d6a77617 | |||
| e5e174a20e | |||
| 8aede85214 | |||
| c625b9e3cc | |||
| 222d44a8d8 | |||
| 386f827d38 | |||
| 831c51c875 | |||
| 2d25d37112 | |||
| a3172d643f | |||
| 02787784a4 | |||
| 967f390aec | |||
| 89951b01ff | |||
| ca8f026bc3 | |||
| 4c14d7ef5a | |||
| 8234c20e28 | |||
| 52e272954f | |||
| 77caf50265 | |||
| 2ab8751fd4 | |||
| 54589c0828 | |||
| 1fdb247167 | |||
| 49cc47afd1 | |||
| 673677c831 | |||
| c30dc04571 | |||
| f58de79ceb | |||
| 8d9bb7a63e | |||
| 18490162f7 | |||
| bf71a4e012 | |||
| d29edf6381 | |||
| b087b7743e | |||
| 8ee1a7f67f | |||
| 475385d876 | |||
| 1b967a07e5 | |||
| 1088d613d5 | |||
| 1b2d4d6522 | |||
| 0fd1214dea | |||
| 00547b7aac | |||
| 621bfe36a8 | |||
| c1849f7e00 | |||
| b23db7c4cb | |||
| b3525bc642 | |||
| 589951eaea | |||
| 74adbbcc5d | |||
| bab61dd249 | |||
| 5c3bcb09fa | |||
| f0b94dd0d4 | |||
| ba5ab99a03 | |||
| 9bc3028eb7 | |||
| 5ef9db6d67 | |||
| 86a710e175 | |||
| 1797a9c61a | |||
| fd49bc5d8d | |||
| de4c6c6fab | |||
| 78a7dd3269 | |||
| 0cf53da0fe | |||
| 13b8708e58 | |||
| b6d91bd28a | |||
| 5bdc78e3ba | |||
| bce8fb31ab | |||
| 77d7d21130 | |||
| fed1520a8e | |||
| 284d5861dd | |||
| ee6154c842 | |||
| 709197c294 | |||
| fd55b7b4ed | |||
| 5bca5e2d77 | |||
| ee96937fd4 | |||
| a370d69542 | |||
| 24aad2eed4 | |||
| 910605cc7d | |||
| 7194e25bba | |||
| 7f287cb8f9 | |||
| a0ce1491d9 | |||
| 26035d23fe | |||
| 835debe75e | |||
| b482deb8b0 | |||
| 76fd1e6f5a | |||
| abb45fbe45 | |||
| 567ce48cc1 | |||
| 56a17b4e68 | |||
| c027e72439 | |||
| 25b8da8e3b | |||
| 5b47d1a910 | |||
| a844c3043c | |||
| e099a82d15 | |||
| b681af4556 | |||
| 78d66a9ac3 | |||
| bfe4d9f3f4 | |||
| a02ee3719c | |||
| 542f713678 | |||
| 2395c6fdaa | |||
| c7f02d5e51 | |||
| 55a726e933 | |||
| 601633347c | |||
| 182973c0ee | |||
| a16e9ac76a | |||
| 66f70e5da6 | |||
| 5a187c6ca8 | |||
| c6042100f9 | |||
| fde7ae4d19 | |||
| e37e13e700 | |||
| d22003578e | |||
| 52139cf0c4 | |||
| 37b723d8ae | |||
| aec3649524 | |||
| 36d716bb50 | |||
| f61c692929 | |||
| 3f717f3baf | |||
| ffc95090aa | |||
| 2eaa9236f2 | |||
| e4bab37b62 | |||
| 105c9c71ee | |||
| e135229ca6 | |||
| 97dea6ede5 | |||
| d871a92d1c | |||
| a152aa125b | |||
| 4e217d4028 | |||
| e5da7a4606 | |||
| faace3090c | |||
| d3e2345f94 | |||
| a3e087ab51 | |||
| 3a614a8ea1 | |||
| 9cb60dcdf5 | |||
| af6db68816 | |||
| 305ed0b65a | |||
| 263efb41e8 | |||
| d6312c7b92 | |||
| b31af4891d | |||
| 0ba08f57f2 | |||
| a2d7881afe | |||
| d79e598bf8 | |||
| a6a39cb842 | |||
| 5d0883c0e4 | |||
| e6d49424cf | |||
| 72abcd5991 | |||
| 9c2bb85858 | |||
| e9b059ee94 | |||
| 7a913844e2 | |||
| f8be7e1f57 | |||
| d5c43c4675 | |||
| 85fa6d8025 | |||
| 6b2a8f54a1 | |||
| bd1fb845b1 | |||
| 9c64c9af5d | |||
| 1057eceb2f | |||
| 445bc75319 | |||
| 4fb7ee02cd | |||
| ad11b7ebd0 | |||
| 5d9bda6f97 | |||
| 54be07c17d | |||
| 2c7ab3a28e | |||
| 3cc3c1bbd3 | |||
| ddedf2e046 | |||
| a60c339f85 | |||
| ce2c5d6528 | |||
| fd81f70355 | |||
| 100bb7c6ca | |||
| 1ffcedd9d4 | |||
| fc1f713106 | |||
| 83c3a78e6d | |||
| e6a3e7024d | |||
| d62fde0d79 | |||
| a70cf464d6 | |||
| 546260348d | |||
| 693aec949c | |||
| 5c7ac1bb7e | |||
| 8862752523 | |||
| 201c380925 | |||
| c7230a6f77 | |||
| 6b78fdf822 | |||
| 3cb326e426 | |||
| d3f9332372 | |||
| be0f6a6af2 | |||
| 25aa233cef | |||
| 5fdc424202 | |||
| 9b74bb5c92 | |||
| 8bf8a649c8 | |||
| 7ba8d8b608 | |||
| e35328fece | |||
| 366d4d7b0b | |||
| 3af1e75084 | |||
| dabd80fe4c | |||
| cb711a648f | |||
| 5b58dbc980 | |||
| 8b3c0a941c | |||
| 3ce29a3d7e | |||
| dc3c6b2f39 | |||
| 1cbee4c504 | |||
| 798e4c288a | |||
| ac39e32bc9 | |||
| 52da7f931b | |||
| fcb6f814de | |||
| 9e6b56d783 | |||
| 923dad6ca8 | |||
| 9f17d91b32 | |||
| 2bcb04a3b1 | |||
| a530b600b8 | |||
| d494a2bee2 | |||
| 6a027662ae | |||
| 577bb7bf31 | |||
| df664bd55f | |||
| 8a2705f81f | |||
| fcaf11422a | |||
| 3444409554 | |||
| 683c01b301 | |||
| e2492f773d | |||
| 1f3a2dcd1d | |||
| 4205cb32c5 | |||
| 6ab9bdb346 | |||
| a4aec1919c | |||
| 5b97d70d57 | |||
| eeeb4596c3 | |||
| 23853cae14 | |||
| 87f6f33b37 | |||
| 8c03d1bdde | |||
| 7f1c7d808d | |||
| be12aece5b | |||
| d7605f1449 | |||
| ef80642dec | |||
| a5622c93d4 | |||
| b6f9bfe9a5 | |||
| 79954657e2 | |||
| 35d3f1f72a | |||
| 388d74faf4 | |||
| 0f8747e194 | |||
| 93f16ba9e3 | |||
| bea2d42e8c | |||
| 68d644fd28 | |||
| f6e33450ff | |||
| 65008c5c0b | |||
| dbfaf568fc | |||
| 58fd6ac03e | |||
| 1e64524afb | |||
| 20a5d8effd | |||
| 8c7e0bcb0a | |||
| c69080f11e | |||
| 5a48c800ee | |||
| c6eff4d373 | |||
| 5c056c2a3e | |||
| 61f593f350 | |||
| 6cc7dc7aaa | |||
| 239f040a98 | |||
| 3827c16fde | |||
| e299343807 | |||
| 4130ce2b93 | |||
| d6acb64514 | |||
| 8e233e2591 | |||
| 9cda16220e | |||
| 36acadbd52 | |||
| 37b6552c42 | |||
| 1903052d79 | |||
| 2b4cfd9a60 | |||
| decbb65f09 | |||
| 8e2ca37edc | |||
| 8fb6bcc8b1 | |||
| 2f36c670ff | |||
| d701c3a480 | |||
| cd7f3375b2 | |||
| 46cd185524 | |||
| e04d82e940 | |||
| 26d0863921 | |||
| 37f23fa537 | |||
| 167d408b5e | |||
| d4a8ff4872 | |||
| fb9b12a982 | |||
| 88a03f1a1d | |||
| ba7e400e13 | |||
| 57f0f88552 | |||
| 42a0cf6283 | |||
| b67acd5ea1 | |||
| 5e2721d2f5 | |||
| 2cd43aee0a | |||
| fb1570d290 | |||
| 79972ad4db | |||
| 61934c285c | |||
| a7d554971c | |||
| e54ea90607 | |||
| fda403a079 | |||
| f2e75c96be | |||
| 322eb2b8a8 | |||
| 6f71183d0e | |||
| 5d852cf6ae | |||
| 2d1ea1618b | |||
| 50723d07a6 | |||
| 1161562bc8 | |||
| 0c8b3aaced | |||
| b81b7decf6 | |||
| e5463330ef | |||
| 17c0b3e460 | |||
| 3bc3193805 | |||
| d6db6dedca | |||
| d931bc72c7 | |||
| 6506f77689 | |||
| 0d64b38dbc | |||
| 7856061cf0 | |||
| 0210e414d2 | |||
| 41231e8ae2 | |||
| ba2e34682e | |||
| b234ff9234 | |||
| 3442cc3d1a | |||
| e618e34c94 | |||
| 105c3b0a4c | |||
| 69d0446019 | |||
| 078045f73b | |||
| 78af1daa2e | |||
| 0bd0d57a81 | |||
| 9dd5b6ce37 | |||
| d862cdaa72 | |||
| 4f57de9688 | |||
| 92b6e05909 | |||
| 2bd0bae2f7 | |||
| 69b5d24f28 | |||
| e5dcb9d9da | |||
| 4db8638f7e | |||
| cec885daf9 | |||
| 90fbf27114 | |||
| f1436cec9b | |||
| cf968cb6b5 | |||
| 2278f40051 | |||
| 18a76d3a87 | |||
| 6a65461ec7 | |||
| a5a0a7c4f3 | |||
| f1e6f8042c | |||
| 848873d87e | |||
| 75bb864237 | |||
| d5275b16aa | |||
| 15d1b6cef0 | |||
| 6d4dd3e17a | |||
| 649c22a34e | |||
| 8d04d39036 | |||
| 0e90c719b0 | |||
| a79526cad8 | |||
| d05d8b6100 | |||
| 9856867954 | |||
| 19064b680e | |||
| 95265c765b | |||
| 1ed8912f57 | |||
| 82a0eb4413 | |||
| be7215402b | |||
| 4500b064d8 | |||
| 93d191d7c9 | |||
| 1607ceaf3e | |||
| 5b24ea9dd9 | |||
| c879dcaf7d | |||
| 86691dabbf | |||
| fe71a66bb9 | |||
| 80e0d848f2 | |||
| 8b3a2984bf | |||
| fccce265aa | |||
| a43a228f78 | |||
| dd8610fd5c | |||
| b991beb712 | |||
| 25f6483488 | |||
| efc0325e14 | |||
| d19ec021fe | |||
| b34a307936 | |||
| fb565caf7b | |||
| 6796e8fff6 | |||
| 213547f545 | |||
| 73851e962b | |||
| de22204514 | |||
| ebba15fe67 | |||
| c1cd3339fa | |||
| 713a296a59 | |||
| 06bde527d5 | |||
| dcd31f5701 | |||
| 65f2af5849 | |||
| 2dd7a8637c | |||
| 211d056728 | |||
| dc0aed5b16 | |||
| 5064df4ba2 | |||
| 469c31da97 | |||
| 5fb41e6ecc | |||
| a68a442bbb | |||
| 84db5644d6 | |||
| fc1fb7a590 | |||
| dc91d4eca8 | |||
| f6a42a36d6 | |||
| 2a769dc0b0 | |||
| 3475bfb2aa | |||
| f9f8fade89 | |||
| e404fb772b | |||
| 2a9412042c | |||
| e8ab661504 | |||
| 3f91db25d4 | |||
| 300381ba4d | |||
| 4363e6a213 | |||
| 450dac4b1e | |||
| 278127fe29 | |||
| 23d71de75f | |||
| d86789898d | |||
| c3dc1f65d4 | |||
| 238fb00727 | |||
| 2d48c81d58 | |||
| 0893e0043f | |||
| 72c0267fe6 | |||
| c9956def36 | |||
| 5d60fe6812 | |||
| 6051dfae30 | |||
| 3518153d5b | |||
| cf949609b2 | |||
| d482a8805c | |||
| 161dc9ce7e | |||
| 090073cc3b | |||
| 6ae718e4d6 | |||
| 783b1cb611 | |||
| 4b01f80e8d | |||
| c8278f377b | |||
| d34b664933 | |||
| c8f40e1d26 | |||
| 185a8d7582 | |||
| 8373e91a1b | |||
| 6aeedfb70c | |||
| e7f3851212 | |||
| 7df05ade4c | |||
| 24b032ce5b | |||
| b6fe4ff637 | |||
| 8f1aa28b37 | |||
| 55c1e22a67 | |||
| ca0d4511a9 | |||
| b56855c542 | |||
| 72e8eb3b94 | |||
| 281a1cdc2c | |||
| 3c8f901a1f | |||
| e0589d2908 | |||
| dfd53976d4 | |||
| 02d43be93c | |||
| 2e8bceb676 | |||
| 16f9e697ab | |||
| 269f88ee28 | |||
| f11d950448 | |||
| 6ba2c44e88 | |||
| d1ed4665de | |||
| 5b68cfa018 | |||
| 85f88b6b05 | |||
| ea467441d2 | |||
| 40ba502853 | |||
| 09d7d0f1bc | |||
| 3418d53a6d | |||
| d5440d60ab | |||
| 2ba237ec12 | |||
| 01a343f28e | |||
| 85220591e2 | |||
| ecadc8bbba | |||
| 26c92eaf0f | |||
| d129abb9c9 | |||
| 3b98b00d6f | |||
| ce329e13fb | |||
| be9cd98cb1 | |||
| 216acd98d6 | |||
| 10fd8a59b2 | |||
| 3974c6fd89 | |||
| f82962e42c | |||
| bf1ced4184 | |||
| cabfcbc73c | |||
| 574473c480 | |||
| 17143fd53f | |||
| b8fff99e68 | |||
| 3b038feae0 | |||
| 032bda223e | |||
| b16d4d18e0 | |||
| df3a57dcda | |||
| 3bf7ab910f | |||
| e8ce0ba6ef | |||
| d8fff5c820 | |||
| aa9897d932 | |||
| f265a52c96 | |||
| f214cfae12 | |||
| febc8cd6aa | |||
| 463e061740 | |||
| d80759efb8 | |||
| 1d66aad4df | |||
| f5284ced54 | |||
| c951ca6f47 | |||
| f25ae373bb | |||
| 845833e8fd | |||
| f0ac61a8fd | |||
| 8f7278e34f | |||
| b124599de3 | |||
| 697234dd51 | |||
| ba97494d6f | |||
| 1996fba8a6 | |||
| a6bbe907ee | |||
| 43579f4c02 | |||
| 909a25c147 | |||
| aa3aafc4ff | |||
| b32439a694 | |||
| ddbc25077c | |||
| b075886b19 | |||
| eae999a85a | |||
| 77f0799750 | |||
| 8de93ad8b4 | |||
| b377b5bbed | |||
| 75b5324762 | |||
| 610d200e8a | |||
| 8002692f3e | |||
| 9496b57b01 | |||
| a5cd5844ec | |||
| da16b479a0 | |||
| 44f1059000 | |||
| cf4b41f7d9 | |||
| a84ca5b147 | |||
| 71f5f96e64 | |||
| 2aa8e444ee | |||
| cfa187f477 | |||
| 1ed411e431 | |||
| 9233ae97d0 | |||
| 0ee38653f7 | |||
| df89b5bf8a | |||
| cca4037fec | |||
| e015da8d95 | |||
| 4ceb186251 | |||
| 370109b868 | |||
| 3b3165ad51 | |||
| 98e68cd66a | |||
| 407301a28c | |||
| 5ce0e7265b | |||
| f1704fd61a | |||
| 35e87128f5 | |||
| dd93f89931 | |||
| fb85612f81 | |||
| 966173c129 | |||
| 55757039fa | |||
| 1113e18c40 | |||
| 02947345e8 | |||
| 63f18f0b03 | |||
| cd6da987cc | |||
| 006d7ddd31 | |||
| 81842fc9d0 | |||
| ec9e0b2086 | |||
| 64b71644bb | |||
| 1e58b09d96 | |||
| 455136ee50 | |||
| 1058ba6a0f | |||
| f8c541c0d7 | |||
| b485e78030 | |||
| d8e7892081 | |||
| 1638c3b1c2 | |||
| 2d0e92d412 | |||
| f1a43f4977 | |||
| 18f7d0129a | |||
| 356ccd0314 | |||
| 4adf89b40b | |||
| eb4aded5d6 | |||
| 5230f45658 | |||
| b4e70e56a6 | |||
| cb3edf2607 | |||
| 720b26d11e | |||
| e35be13b23 | |||
| ba19d93df9 | |||
| 5d1dcb4387 | |||
| f101934909 | |||
| ede2575018 | |||
| fb80ee5a0e | |||
| 44fc69398c | |||
| c162337cab | |||
| 821faaf3c0 | |||
| bf85eb9b4e | |||
| 691c6614a8 | |||
| 6db7cb8937 | |||
| 6afc572eae | |||
| 2a932a2176 | |||
| b2bcde1bfc | |||
| ec6fd23636 | |||
| 6f34f95c52 | |||
| 94e5b36279 | |||
| f0ce4d6336 | |||
| d06b42b917 | |||
| 764986a9b0 | |||
| c4efa95b4a | |||
| 5a655779d7 | |||
| 0403437ad0 | |||
| b62f94f5c2 | |||
| daf09ed9fe | |||
| 72794f1416 | |||
| b00e20b23f | |||
| e99a2181ff | |||
| 65b38e8dcf | |||
| 9b8780a2fd | |||
| 9c0e4cae74 | |||
| deb387f54c | |||
| 5d5422b4c5 | |||
| 85b8dd8b34 | |||
| b93d34dff4 | |||
| e997a7db9a | |||
| d1a065119e | |||
| 1dab468e20 | |||
| c5cd0c73a3 | |||
| ae139403e4 | |||
| d3c9154f9a | |||
| caba60968a | |||
| 2e0def8670 | |||
| 8c3d16a395 | |||
| 3f48531da7 | |||
| 128cdca068 | |||
| bd997a3900 | |||
| 8e93eda449 | |||
| a6674ecd56 | |||
| 654651856f | |||
| c489659a20 | |||
| 18377e0c9f | |||
| cebba6c0b9 | |||
| 89f9bf545d | |||
| 055d36abd7 | |||
| 7bafc5fa8b | |||
| 6946c0bedb | |||
| bb40f86daa | |||
| 89d198659c | |||
| c56e540e5d | |||
| d3fd74246f | |||
| 616061a6ca | |||
| d94b8b9c0e | |||
| 89d39cf8ff | |||
| 0ba130dbd3 | |||
| 434935613c | |||
| 454585d3d2 | |||
| 65a6e341ad | |||
| fc933034db | |||
| 20c8b094d6 | |||
| 552ddfbdfa | |||
| 9743eec3ab | |||
| b3ad1dc26e | |||
| b6c9d4a88c | |||
| 25b6ac61cb | |||
| 9c9252e8a3 | |||
| 3a744ad72f | |||
| 554e2a4bce | |||
| 6e8979d8d8 | |||
| 583d416640 | |||
| 03b50b4f85 | |||
| 440e135e3a | |||
| ab39f06003 | |||
| 98f78f534c | |||
| d18b12c1a3 | |||
| 6a7b1aa39a | |||
| c4be74a9d0 | |||
| 9092048dbc | |||
| bb419f1201 | |||
| d505fd2b60 | |||
| a771e0eccb | |||
| 593a5181d7 | |||
| c29274e760 | |||
| 216573bf48 | |||
| 1c235a5c89 | |||
| f90049dd9e | |||
| 90787e84bf | |||
| c36c80a077 | |||
| 227333239f | |||
| 2d43fcf9ee | |||
| 3edad56e6b | |||
| 4e2d900775 | |||
| 4dae82054e | |||
| cb5948d3a5 | |||
| 9fc7281fab | |||
| bb779b237a | |||
| 1294b4fec8 | |||
| 0b754562f6 | |||
| 15cb032ab7 | |||
| c85d2fd3bf | |||
| bc821ff47d | |||
| 42d9f42807 | |||
| 7ceff4cf5d | |||
| 4147da312b | |||
| 439891c31f | |||
| 322524101d | |||
| fd698653d9 | |||
| 8b503a06fa | |||
| 4a201df556 | |||
| 577b9f478b | |||
| f5a2eb1ab0 | |||
| 4379480d4b | |||
| dfa4afa826 | |||
| a533514763 | |||
| 952aaef52a | |||
| a54016a6f7 | |||
| 0c8a95c44b | |||
| 403633d21f | |||
| cc6f1d784d | |||
| e07ef3be9c | |||
| f35f534ff4 | |||
| 3899ec136b | |||
| 91ee809558 | |||
| 4c94e2729f | |||
| 2a5a207148 | |||
| c75bd89d63 | |||
| f58844bf8b | |||
| 07ac3499f3 | |||
| 050b64b822 | |||
| 43aa94dcfc | |||
| b2e54a432b | |||
| e766732020 | |||
| 3a5e01c44a | |||
| d4883da98b | |||
| 7cc3e9a16d | |||
| 9ad352d4bd | |||
| 031173bc47 | |||
| 658820a25e | |||
| 17fdce01a9 | |||
| bc4cc00332 | |||
| b57e9492b1 | |||
| 712bdc9d8d | |||
| 33a7c95455 | |||
| f054dcc77d | |||
| 95858b77c1 | |||
| 4afbce5ad6 | |||
| 93956002ac | |||
| 006dd290e9 | |||
| fb875145aa | |||
| 77993ced7e | |||
| e1f64d6283 | |||
| 2b60ce484e | |||
| a21b336138 | |||
| 0655280f2c | |||
| 2793578dcb | |||
| f1a70662c5 | |||
| 8a7e501fe6 | |||
| 86fc2dc2ba | |||
| 9cff42b4ed | |||
| 55546126a1 | |||
| 5a11dacd9e | |||
| bb5873bf20 | |||
| 20eda54349 | |||
| c98461f59e | |||
| b154c9a5c4 | |||
| 12255e3680 | |||
| 473c41ddbf | |||
| b93382831c | |||
| 5ee61f5ae7 | |||
| 082bbd49e7 | |||
| 4e2e69c9cb | |||
| 6f78bb6960 | |||
| a00caac789 | |||
| 4e8f191f43 | |||
| b1c5afd72f | |||
| aa5a2225e7 | |||
| 4c7672b581 | |||
| 5f9fa05e21 | |||
| ee92fa51bc | |||
| 63b3960120 | |||
| e5c76ddf3e | |||
| 4b07979008 | |||
| 168fa09f5f | |||
| 4facd57cb7 | |||
| e999636048 | |||
| 5bd769ea40 | |||
| bd693f97a1 | |||
| af0cb68c1b | |||
| 761d7fd438 | |||
| c537e8a892 | |||
| 702e85cd96 | |||
| c93e0b6c5e | |||
| f7b4a20066 | |||
| 49ac89bfed | |||
| 16e62b29f9 | |||
| b8180b0459 | |||
| 37f250b384 | |||
| 5685ec525b | |||
| 5be59ea8dd | |||
| 5855f2d909 | |||
| 5424223949 | |||
| de22148b44 | |||
| 73664e610b |
@@ -0,0 +1,31 @@
|
||||
|
||||
# Custom attribute to mark source files using KiCad C++ formatting
|
||||
[attr]kicad-cpp-source whitepace=tab-in-indent format.clang-format-kicad
|
||||
|
||||
# Custom attribute to mark KiCad's own CMake files
|
||||
[attr]kicad-cmake-source whitespace=tab-in-indent
|
||||
|
||||
# Custom attribute for auto-generated sources:
|
||||
# * Do not perform whitespace checking
|
||||
# * Do not format
|
||||
[attr]generated whitespace=-tab-in-indent,-indent-with-non-tab -format.clang-format-kicad
|
||||
|
||||
# By default, all C and C++ files conform to KiCad formatting,
|
||||
# unless overridden
|
||||
*.c kicad-cpp-source
|
||||
*.cpp kicad-cpp-source
|
||||
*.h kicad-cpp-source
|
||||
|
||||
*.cmake kicad-cmake-source
|
||||
*.txt kicad-cmake-source
|
||||
|
||||
# Compiled bitmap sources
|
||||
bitmaps_png/cpp_*/*.cpp generated
|
||||
|
||||
# wxFormBuilder-generated files
|
||||
**/dialog*/*_base.cpp generated
|
||||
**/dialog*/*_base.h generated
|
||||
|
||||
# Lemon grammars
|
||||
common/libeval/grammar.c generated
|
||||
common/libeval/grammar.h generated
|
||||
@@ -7,10 +7,24 @@
|
||||
# Based on clang-format pre-commit hook by Alex Eagle
|
||||
# https://gist.github.com/alexeagle/c8ed91b14a407342d9a8e112b5ac7dab
|
||||
|
||||
# Set KICAD_CHECK_FORMAT to allow this hook to run
|
||||
# if not set, the hook always succeeds.
|
||||
if [ -z "$KICAD_CHECK_FORMAT" ]; then
|
||||
exit 0
|
||||
# Set kicad.check-format to allow this hook to run
|
||||
# If not set, the hook always succeeds.
|
||||
|
||||
do_format=false
|
||||
|
||||
# Check if formatting is configured
|
||||
if [ "$(git config --get kicad.check-format)" = true ]; then
|
||||
do_format=true
|
||||
fi
|
||||
|
||||
# Older env variable method
|
||||
if [ ! -z "$KICAD_CHECK_FORMAT" ]; then
|
||||
do_format=true
|
||||
fi
|
||||
|
||||
if [ ! ${do_format} = true ]; then
|
||||
# No formatting required
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
check_clang_format() {
|
||||
@@ -30,20 +44,48 @@ check_git_config() {
|
||||
fi
|
||||
}
|
||||
|
||||
get_filtered_filenames()
|
||||
{
|
||||
format_attr='clang-format-kicad'
|
||||
|
||||
# command to get list of candidate files
|
||||
git_list_files='git diff --cached --name-only --diff-filter=ACM'
|
||||
|
||||
files=$(${git_list_files} |
|
||||
|
||||
# Filter for format-controlled files
|
||||
git check-attr --stdin format.${format_attr} |
|
||||
|
||||
# output only the file names
|
||||
grep ": set$" |
|
||||
cut -d: -f1)
|
||||
|
||||
echo ${files}
|
||||
}
|
||||
|
||||
check_clang_format
|
||||
check_git_config
|
||||
|
||||
readonly out=$(git clang-format -v --diff)
|
||||
files_to_check=$(get_filtered_filenames)
|
||||
|
||||
if [ -z "${files_to_check}" ]; then
|
||||
# No controlled files to check
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
git_clang_format_cmd="git clang-format -v --diff -- ${files_to_check}"
|
||||
|
||||
readonly out=$(${git_clang_format_cmd})
|
||||
|
||||
# In these cases, there is no formatting issues, so we succeed
|
||||
if [[ "$out" == *"no modified files to format"* ]]; then exit 0; fi
|
||||
if [[ "$out" == *"clang-format did not modify any files"* ]]; then exit 0; fi
|
||||
|
||||
# Any other case implies formatting results
|
||||
echo "ERROR: you need to run git clang-format on your commit"
|
||||
echo "ERROR: you need to run clang-format (e.g. using tools/check_coding.sh) on your commit"
|
||||
|
||||
# print the errors to show what's the issue
|
||||
git clang-format -v --diff
|
||||
${git_clang_format_cmd}
|
||||
|
||||
# fail the pre-commit
|
||||
exit 1
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
boost_root
|
||||
.downloads-by-cmake
|
||||
.gdb_history
|
||||
boost_root
|
||||
Build*
|
||||
build*
|
||||
common/fp_lib_table_keywords.cpp
|
||||
@@ -59,6 +60,16 @@ demos/**/*-bak
|
||||
demos/**/_autosave-*
|
||||
demos/**/fp-info-cache
|
||||
|
||||
# MacOS package info created by CMake
|
||||
bitmap2component/Info.plist
|
||||
cvpcb/Info.plist
|
||||
eeschema/Info.plist
|
||||
gerbview/Info.plist
|
||||
kicad/Info.plist
|
||||
pagelayout_editor/Info.plist
|
||||
pcb_calculator/Info.plist
|
||||
pcbnew/Info.plist
|
||||
|
||||
# editor/OS fluff
|
||||
.*.swp
|
||||
*~
|
||||
@@ -76,3 +87,29 @@ demos/**/fp-info-cache
|
||||
*.gch
|
||||
*.orig
|
||||
*.patch
|
||||
|
||||
# These CMake files are wanted
|
||||
!CMakeModules/*.cmake
|
||||
|
||||
# Eclipse IDE
|
||||
.project
|
||||
.cproject
|
||||
.pydevproject
|
||||
__pycache__
|
||||
|
||||
# Visual Studio
|
||||
.vs/
|
||||
.editorconfig
|
||||
CMakeSettings.json
|
||||
|
||||
# Sublime Text
|
||||
*.sublime-*
|
||||
|
||||
# KDevelop
|
||||
.kdev4/
|
||||
*.kdev4
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
i18n_status.svg
|
||||
i18n_status.csv
|
||||
|
||||
@@ -221,7 +221,7 @@ void DLG_SELECT_3DMODEL::OnFileActivated( wxTreeEvent& event )
|
||||
|
||||
void DLG_SELECT_3DMODEL::SetRootDir( wxCommandEvent& event )
|
||||
{
|
||||
if( m_FileTree )
|
||||
if( m_FileTree && dirChoices->GetSelection() > 0 )
|
||||
m_FileTree->SetPath( dirChoices->GetString( dirChoices->GetSelection() ) );
|
||||
|
||||
return;
|
||||
@@ -263,21 +263,31 @@ void DLG_SELECT_3DMODEL::updateDirChoiceList( void )
|
||||
|
||||
if( !cl.empty() )
|
||||
{
|
||||
unsigned int choice = 0;
|
||||
dirChoices->Clear();
|
||||
dirChoices->Append( "" ); //Insert a blank string at the beginning to allow selection
|
||||
|
||||
if( !prjDir.empty() )
|
||||
{
|
||||
dirChoices->Append( prjDir );
|
||||
|
||||
if( prjDir == m_FileTree->GetPath() )
|
||||
choice = 1;
|
||||
}
|
||||
|
||||
std::set< wxString >::const_iterator sI = cl.begin();
|
||||
std::set< wxString >::const_iterator eI = cl.end();
|
||||
|
||||
while( sI != eI )
|
||||
{
|
||||
if( *sI == m_FileTree->GetPath() )
|
||||
choice = dirChoices->GetCount();
|
||||
|
||||
dirChoices->Append( *sI );
|
||||
++sI;
|
||||
}
|
||||
|
||||
dirChoices->Select( 0 );
|
||||
dirChoices->Select( choice );
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jun 5 2018)
|
||||
// C++ code generated with wxFormBuilder (version 3.9.0 Nov 1 2020)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@@ -9,209 +9,209 @@
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
PANEL_PREV_3D_BASE::PANEL_PREV_3D_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
|
||||
PANEL_PREV_3D_BASE::PANEL_PREV_3D_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
|
||||
{
|
||||
wxBoxSizer* bSizermain;
|
||||
bSizermain = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
|
||||
wxBoxSizer* bSizerLeft;
|
||||
bSizerLeft = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
wxStaticBoxSizer* sbSizerScale;
|
||||
sbSizerScale = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Scale") ), wxVERTICAL );
|
||||
|
||||
|
||||
wxFlexGridSizer* fgSizerScale;
|
||||
fgSizerScale = new wxFlexGridSizer( 0, 3, 0, 0 );
|
||||
fgSizerScale->SetFlexibleDirection( wxBOTH );
|
||||
fgSizerScale->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
|
||||
m_staticText1 = new wxStaticText( sbSizerScale->GetStaticBox(), wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText1->Wrap( -1 );
|
||||
fgSizerScale->Add( m_staticText1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
|
||||
xscale = new wxTextCtrl( sbSizerScale->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerScale->Add( xscale, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_spinXscale = new wxSpinButton( sbSizerScale->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
|
||||
fgSizerScale->Add( m_spinXscale, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
m_staticText2 = new wxStaticText( sbSizerScale->GetStaticBox(), wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText2->Wrap( -1 );
|
||||
fgSizerScale->Add( m_staticText2, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
|
||||
yscale = new wxTextCtrl( sbSizerScale->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerScale->Add( yscale, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_spinYscale = new wxSpinButton( sbSizerScale->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
|
||||
fgSizerScale->Add( m_spinYscale, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
m_staticText3 = new wxStaticText( sbSizerScale->GetStaticBox(), wxID_ANY, _("Z:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText3->Wrap( -1 );
|
||||
fgSizerScale->Add( m_staticText3, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
|
||||
|
||||
|
||||
zscale = new wxTextCtrl( sbSizerScale->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerScale->Add( zscale, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_spinZscale = new wxSpinButton( sbSizerScale->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
|
||||
fgSizerScale->Add( m_spinZscale, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
sbSizerScale->Add( fgSizerScale, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerLeft->Add( sbSizerScale, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
wxStaticBoxSizer* sbSizerRotation;
|
||||
sbSizerRotation = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Rotation") ), wxVERTICAL );
|
||||
|
||||
|
||||
wxFlexGridSizer* fgSizerRotate;
|
||||
fgSizerRotate = new wxFlexGridSizer( 0, 3, 0, 0 );
|
||||
fgSizerRotate->SetFlexibleDirection( wxBOTH );
|
||||
fgSizerRotate->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
|
||||
m_staticText11 = new wxStaticText( sbSizerRotation->GetStaticBox(), wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText11->Wrap( -1 );
|
||||
fgSizerRotate->Add( m_staticText11, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
|
||||
xrot = new wxTextCtrl( sbSizerRotation->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerRotate->Add( xrot, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_spinXrot = new wxSpinButton( sbSizerRotation->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
|
||||
fgSizerRotate->Add( m_spinXrot, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
m_staticText21 = new wxStaticText( sbSizerRotation->GetStaticBox(), wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText21->Wrap( -1 );
|
||||
fgSizerRotate->Add( m_staticText21, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
|
||||
yrot = new wxTextCtrl( sbSizerRotation->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerRotate->Add( yrot, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_spinYrot = new wxSpinButton( sbSizerRotation->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
|
||||
fgSizerRotate->Add( m_spinYrot, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
m_staticText31 = new wxStaticText( sbSizerRotation->GetStaticBox(), wxID_ANY, _("Z:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText31->Wrap( -1 );
|
||||
fgSizerRotate->Add( m_staticText31, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
|
||||
|
||||
|
||||
zrot = new wxTextCtrl( sbSizerRotation->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerRotate->Add( zrot, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_spinZrot = new wxSpinButton( sbSizerRotation->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
|
||||
fgSizerRotate->Add( m_spinZrot, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
sbSizerRotation->Add( fgSizerRotate, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerLeft->Add( sbSizerRotation, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
wxStaticBoxSizer* sbSizerOffset;
|
||||
sbSizerOffset = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Offset") ), wxVERTICAL );
|
||||
|
||||
|
||||
wxFlexGridSizer* fgSizerOffset;
|
||||
fgSizerOffset = new wxFlexGridSizer( 0, 3, 0, 0 );
|
||||
fgSizerOffset->SetFlexibleDirection( wxBOTH );
|
||||
fgSizerOffset->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
|
||||
m_staticText12 = new wxStaticText( sbSizerOffset->GetStaticBox(), wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText12->Wrap( -1 );
|
||||
fgSizerOffset->Add( m_staticText12, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
|
||||
xoff = new wxTextCtrl( sbSizerOffset->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerOffset->Add( xoff, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_spinXoffset = new wxSpinButton( sbSizerOffset->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
|
||||
fgSizerOffset->Add( m_spinXoffset, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
m_staticText22 = new wxStaticText( sbSizerOffset->GetStaticBox(), wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText22->Wrap( -1 );
|
||||
fgSizerOffset->Add( m_staticText22, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
|
||||
yoff = new wxTextCtrl( sbSizerOffset->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerOffset->Add( yoff, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_spinYoffset = new wxSpinButton( sbSizerOffset->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
|
||||
fgSizerOffset->Add( m_spinYoffset, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
m_staticText32 = new wxStaticText( sbSizerOffset->GetStaticBox(), wxID_ANY, _("Z:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText32->Wrap( -1 );
|
||||
fgSizerOffset->Add( m_staticText32, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
|
||||
|
||||
|
||||
zoff = new wxTextCtrl( sbSizerOffset->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerOffset->Add( zoff, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_spinZoffset = new wxSpinButton( sbSizerOffset->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
|
||||
fgSizerOffset->Add( m_spinZoffset, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
sbSizerOffset->Add( fgSizerOffset, 0, wxEXPAND|wxLEFT|wxRIGHT, 10 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerLeft->Add( sbSizerOffset, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizermain->Add( bSizerLeft, 0, 0, 5 );
|
||||
|
||||
|
||||
wxBoxSizer* bSizerRight;
|
||||
bSizerRight = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
wxStaticText* staticPreviewLabel;
|
||||
staticPreviewLabel = new wxStaticText( this, wxID_ANY, _("Preview"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
staticPreviewLabel->Wrap( -1 );
|
||||
staticPreviewLabel->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
|
||||
|
||||
bSizerRight->Add( staticPreviewLabel, 0, wxLEFT, 15 );
|
||||
|
||||
|
||||
bSizerRight->Add( staticPreviewLabel, 0, wxALL, 5 );
|
||||
|
||||
m_SizerPanelView = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
bSizerRight->Add( m_SizerPanelView, 1, wxEXPAND|wxBOTTOM, 8 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerRight->Add( m_SizerPanelView, 1, wxEXPAND|wxBOTTOM, 5 );
|
||||
|
||||
|
||||
bSizermain->Add( bSizerRight, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 4 );
|
||||
|
||||
|
||||
wxBoxSizer* bSizer3DButtons;
|
||||
bSizer3DButtons = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizer3DButtons->Add( 0, 0, 0, wxEXPAND|wxTOP, 4 );
|
||||
|
||||
m_bpvISO = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
|
||||
|
||||
m_bpvISO = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
||||
m_bpvISO->SetToolTip( _("Change to isometric perspective") );
|
||||
|
||||
|
||||
bSizer3DButtons->Add( m_bpvISO, 0, wxTOP|wxBOTTOM, 5 );
|
||||
|
||||
m_bpvLeft = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
|
||||
|
||||
m_bpvLeft = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
||||
bSizer3DButtons->Add( m_bpvLeft, 0, 0, 5 );
|
||||
|
||||
m_bpvRight = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
|
||||
bSizer3DButtons->Add( m_bpvRight, 0, 0, 5 );
|
||||
|
||||
m_bpvFront = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
|
||||
bSizer3DButtons->Add( m_bpvFront, 0, 0, 5 );
|
||||
|
||||
m_bpvBack = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
|
||||
bSizer3DButtons->Add( m_bpvBack, 0, 0, 5 );
|
||||
|
||||
m_bpvTop = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
|
||||
bSizer3DButtons->Add( m_bpvTop, 0, 0, 5 );
|
||||
|
||||
m_bpvBottom = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
|
||||
bSizer3DButtons->Add( m_bpvBottom, 0, 0, 5 );
|
||||
|
||||
m_bpUpdate = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
|
||||
|
||||
m_bpvRight = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
||||
bSizer3DButtons->Add( m_bpvRight, 0, wxTOP, 5 );
|
||||
|
||||
m_bpvFront = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
||||
bSizer3DButtons->Add( m_bpvFront, 0, wxTOP, 5 );
|
||||
|
||||
m_bpvBack = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
||||
bSizer3DButtons->Add( m_bpvBack, 0, wxTOP, 5 );
|
||||
|
||||
m_bpvTop = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
||||
bSizer3DButtons->Add( m_bpvTop, 0, wxTOP, 5 );
|
||||
|
||||
m_bpvBottom = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
||||
bSizer3DButtons->Add( m_bpvBottom, 0, wxTOP, 5 );
|
||||
|
||||
m_bpUpdate = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
||||
m_bpUpdate->SetToolTip( _("Reload board and 3D models") );
|
||||
|
||||
|
||||
bSizer3DButtons->Add( m_bpUpdate, 0, wxTOP, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizermain->Add( bSizer3DButtons, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
this->SetSizer( bSizermain );
|
||||
this->Layout();
|
||||
bSizermain->Fit( this );
|
||||
|
||||
|
||||
// Connect Events
|
||||
xscale->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelScale ), NULL, this );
|
||||
xscale->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
|
||||
@@ -306,5 +306,5 @@ PANEL_PREV_3D_BASE::~PANEL_PREV_3D_BASE()
|
||||
m_bpvTop->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DTop ), NULL, this );
|
||||
m_bpvBottom->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DBottom ), NULL, this );
|
||||
m_bpUpdate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DUpdate ), NULL, this );
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jun 5 2018)
|
||||
// C++ code generated with wxFormBuilder (version 3.9.0 Nov 1 2020)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __PANEL_PREV_3D_BASE_H__
|
||||
#define __PANEL_PREV_3D_BASE_H__
|
||||
#pragma once
|
||||
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
@@ -21,10 +20,10 @@
|
||||
#include <wx/spinbutt.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/bmpbuttn.h>
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/image.h>
|
||||
#include <wx/icon.h>
|
||||
#include <wx/bmpbuttn.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/panel.h>
|
||||
|
||||
@@ -34,10 +33,10 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class PANEL_PREV_3D_BASE
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class PANEL_PREV_3D_BASE : public wxPanel
|
||||
class PANEL_PREV_3D_BASE : public wxPanel
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxStaticText* m_staticText1;
|
||||
wxTextCtrl* xscale;
|
||||
@@ -74,7 +73,7 @@ class PANEL_PREV_3D_BASE : public wxPanel
|
||||
wxBitmapButton* m_bpvTop;
|
||||
wxBitmapButton* m_bpvBottom;
|
||||
wxBitmapButton* m_bpUpdate;
|
||||
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void onMouseWheelScale( wxMouseEvent& event ) { event.Skip(); }
|
||||
virtual void updateOrientation( wxCommandEvent& event ) { event.Skip(); }
|
||||
@@ -94,14 +93,13 @@ class PANEL_PREV_3D_BASE : public wxPanel
|
||||
virtual void View3DTop( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void View3DBottom( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void View3DUpdate( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
wxTextCtrl* yoff;
|
||||
|
||||
PANEL_PREV_3D_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL );
|
||||
|
||||
PANEL_PREV_3D_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
|
||||
~PANEL_PREV_3D_BASE();
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif //__PANEL_PREV_3D_BASE_H__
|
||||
|
||||
@@ -28,16 +28,20 @@
|
||||
* @file panel_prev_model.cpp
|
||||
*/
|
||||
|
||||
#include "panel_prev_model.h"
|
||||
|
||||
#include <3d_canvas/eda_3d_canvas.h>
|
||||
#include <common_ogl/cogl_att_list.h>
|
||||
#include <bitmaps.h>
|
||||
#include <base_units.h>
|
||||
|
||||
#include "project.h"
|
||||
#include "panel_prev_model.h"
|
||||
#include <class_board.h>
|
||||
|
||||
#include <base_units.h>
|
||||
#include <bitmaps.h>
|
||||
#include <class_drawpanel.h>
|
||||
#include <dpi_scaling.h>
|
||||
#include <pgm_base.h>
|
||||
#include <project.h>
|
||||
|
||||
|
||||
PANEL_PREV_3D::PANEL_PREV_3D( wxWindow* aParent, PCB_BASE_FRAME* aFrame, MODULE* aModule,
|
||||
std::vector<MODULE_3D_SETTINGS> *aParentModelList ) :
|
||||
@@ -58,15 +62,13 @@ PANEL_PREV_3D::PANEL_PREV_3D( wxWindow* aParent, PCB_BASE_FRAME* aFrame, MODULE*
|
||||
// Set 3d viewer configuration for preview
|
||||
m_settings3Dviewer = new CINFO3D_VISU();
|
||||
|
||||
bool option;
|
||||
Pgm().CommonSettings()->Read( ENBL_MOUSEWHEEL_PAN_KEY, &option, false );
|
||||
m_settings3Dviewer->SetFlag( FL_MOUSEWHEEL_PANNING, option );
|
||||
|
||||
// Create the 3D canvas
|
||||
m_previewPane = new EDA_3D_CANVAS( this, COGL_ATT_LIST::GetAttributesList( true ),
|
||||
m_dummyBoard, *m_settings3Dviewer,
|
||||
aFrame->Prj().Get3DCacheManager() );
|
||||
|
||||
loadCommonSettings();
|
||||
|
||||
m_SizerPanelView->Add( m_previewPane, 1, wxEXPAND, 5 );
|
||||
}
|
||||
|
||||
@@ -111,6 +113,25 @@ void PANEL_PREV_3D::initPanel()
|
||||
}
|
||||
|
||||
|
||||
void PANEL_PREV_3D::loadCommonSettings()
|
||||
{
|
||||
wxCHECK_RET( m_previewPane, "Cannot load settings to null canvas" );
|
||||
|
||||
wxConfigBase& cmnCfg = *Pgm().CommonSettings();
|
||||
|
||||
{
|
||||
const DPI_SCALING dpi{ &cmnCfg, this };
|
||||
m_previewPane->SetScaleFactor( dpi.GetScaleFactor() );
|
||||
}
|
||||
|
||||
{
|
||||
bool option;
|
||||
cmnCfg.Read( ENBL_MOUSEWHEEL_PAN_KEY, &option, false );
|
||||
m_settings3Dviewer->SetFlag( FL_MOUSEWHEEL_PANNING, option );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief rotationFromString
|
||||
* Ensure -MAX_ROTATION <= rotation <= MAX_ROTATION
|
||||
|
||||
@@ -93,6 +93,11 @@ private:
|
||||
private:
|
||||
void initPanel();
|
||||
|
||||
/**
|
||||
* Load 3D relevant settings from the user configuration
|
||||
*/
|
||||
void loadCommonSettings();
|
||||
|
||||
/**
|
||||
* @brief updateOrientation - it will receive the events from editing the fields
|
||||
* @param event
|
||||
|
||||
@@ -44,7 +44,7 @@ if( APPLE )
|
||||
endif()
|
||||
|
||||
find_file( S3DSG_VERSION_FILE sg_version.h
|
||||
PATHS ${CMAKE_SOURCE_DIR}/include/plugins/3dapi NO_DEFAULT_PATH )
|
||||
PATHS ${CMAKE_SOURCE_DIR}/include/plugins/3dapi NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
|
||||
|
||||
if( NOT ${S3DSG_VERSION_FILE} STREQUAL "S3DSG_VERSION_FILE-NOTFOUND" )
|
||||
|
||||
|
||||
@@ -66,7 +66,6 @@ CINFO3D_VISU::CINFO3D_VISU() :
|
||||
m_boardCenter = SFVEC3F( 0.0f );
|
||||
|
||||
m_boardBoudingBox.Reset();
|
||||
m_board2dBBox3DU.Reset();
|
||||
|
||||
m_layers_container2D.clear();
|
||||
m_layers_holes2D.clear();
|
||||
@@ -273,13 +272,9 @@ void CINFO3D_VISU::InitSettings( REPORTER *aStatusTextReporter )
|
||||
{
|
||||
wxLogTrace( m_logTrace, wxT( "CINFO3D_VISU::InitSettings" ) );
|
||||
|
||||
// Calculates the board bounding box
|
||||
// First, use only the board outlines
|
||||
EDA_RECT bbbox = m_board->ComputeBoundingBox( true );
|
||||
|
||||
// If no outlines, use the board with items
|
||||
if( ( bbbox.GetWidth() == 0 ) && ( bbbox.GetHeight() == 0 ) )
|
||||
bbbox = m_board->ComputeBoundingBox( false );
|
||||
// Calculates the board bounding box (board outlines + items)
|
||||
// to ensure any item, even outside the board outlines can be seen
|
||||
EDA_RECT bbbox = m_board->ComputeBoundingBox( false );
|
||||
|
||||
// Gives a non null size to avoid issues in zoom / scale calculations
|
||||
if( ( bbbox.GetWidth() == 0 ) && ( bbbox.GetHeight() == 0 ) )
|
||||
@@ -462,8 +457,6 @@ void CINFO3D_VISU::createBoardPolygon()
|
||||
errmsg.append( _( "Cannot determine the board outline." ) );
|
||||
wxLogMessage( errmsg );
|
||||
}
|
||||
|
||||
Polygon_Calc_BBox_3DU( m_board_poly, m_board2dBBox3DU, m_biuTo3Dunits );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -550,9 +550,6 @@ class CINFO3D_VISU
|
||||
/// 3d bouding box of the pcb board in 3d units
|
||||
CBBOX m_boardBoudingBox;
|
||||
|
||||
/// 2d bouding box of the pcb board in 3d units
|
||||
CBBOX2D m_board2dBBox3DU;
|
||||
|
||||
/// It contains polygon contours for each layer
|
||||
MAP_POLY m_layers_poly;
|
||||
|
||||
|
||||
@@ -62,13 +62,11 @@
|
||||
static int s_textWidth;
|
||||
static CGENERICCONTAINER2D *s_dstcontainer = NULL;
|
||||
static float s_biuTo3Dunits;
|
||||
static const CBBOX2D *s_boardBBox3DU = NULL;
|
||||
static const BOARD_ITEM *s_boardItem = NULL;
|
||||
|
||||
// This is a call back function, used by DrawGraphicText to draw the 3D text shape:
|
||||
void addTextSegmToContainer( int x0, int y0, int xf, int yf, void* aData )
|
||||
{
|
||||
wxASSERT( s_boardBBox3DU != NULL );
|
||||
wxASSERT( s_dstcontainer != NULL );
|
||||
|
||||
const SFVEC2F start3DU( x0 * s_biuTo3Dunits, -y0 * s_biuTo3Dunits );
|
||||
@@ -76,7 +74,7 @@ void addTextSegmToContainer( int x0, int y0, int xf, int yf, void* aData )
|
||||
|
||||
if( Is_segment_a_circle( start3DU, end3DU ) )
|
||||
s_dstcontainer->Add( new CFILLEDCIRCLE2D( start3DU,
|
||||
s_textWidth * s_biuTo3Dunits,
|
||||
( s_textWidth / 2 ) * s_biuTo3Dunits,
|
||||
*s_boardItem) );
|
||||
else
|
||||
s_dstcontainer->Add( new CROUNDSEGMENT2D( start3DU,
|
||||
@@ -103,7 +101,6 @@ void CINFO3D_VISU::AddShapeWithClearanceToContainer( const TEXTE_PCB* aTextPCB,
|
||||
s_dstcontainer = aDstContainer;
|
||||
s_textWidth = aTextPCB->GetThickness() + ( 2 * aClearanceValue );
|
||||
s_biuTo3Dunits = m_biuTo3Dunits;
|
||||
s_boardBBox3DU = &m_board2dBBox3DU;
|
||||
|
||||
// not actually used, but needed by DrawGraphicText
|
||||
const COLOR4D dummy_color = COLOR4D::BLACK;
|
||||
@@ -228,7 +225,6 @@ void CINFO3D_VISU::AddGraphicsShapesWithClearanceToContainer( const MODULE* aMod
|
||||
s_boardItem = (const BOARD_ITEM *)&aModule->Value();
|
||||
s_dstcontainer = aDstContainer;
|
||||
s_biuTo3Dunits = m_biuTo3Dunits;
|
||||
s_boardBBox3DU = &m_board2dBBox3DU;
|
||||
|
||||
for( unsigned ii = 0; ii < texts.size(); ++ii )
|
||||
{
|
||||
@@ -390,9 +386,22 @@ void CINFO3D_VISU::createNewPadWithClearance( const D_PAD* aPad,
|
||||
case PAD_SHAPE_RECT:
|
||||
{
|
||||
// see pcbnew/board_items_to_polygon_shape_transform.cpp
|
||||
|
||||
wxPoint corners[4];
|
||||
aPad->BuildPadPolygon( corners, wxSize( 0, 0), aPad->GetOrientation() );
|
||||
bool drawOutline;
|
||||
|
||||
// For aClearanceValue.x == aClearanceValue.y and > 0 we use the pad shape
|
||||
// and draw outlines with thicknes = aClearanceValue.
|
||||
// Otherwise we draw only the inflated/deflated shape
|
||||
if( aClearanceValue.x > 0 && aClearanceValue.x == aClearanceValue.y )
|
||||
{
|
||||
drawOutline = true;
|
||||
aPad->BuildPadPolygon( corners, wxSize( 0, 0 ), aPad->GetOrientation() );
|
||||
}
|
||||
else
|
||||
{
|
||||
drawOutline = false;
|
||||
aPad->BuildPadPolygon( corners, aClearanceValue, aPad->GetOrientation() );
|
||||
}
|
||||
|
||||
SFVEC2F corners3DU[4];
|
||||
|
||||
@@ -420,20 +429,23 @@ void CINFO3D_VISU::createNewPadWithClearance( const D_PAD* aPad,
|
||||
// Add the PAD contours
|
||||
// Round segments cannot have 0-length elements, so we approximate them
|
||||
// as a small circle
|
||||
for( int i = 1; i <= 4; i++ )
|
||||
if( drawOutline )
|
||||
{
|
||||
if( Is_segment_a_circle( corners3DU[i - 1], corners3DU[i & 3] ) )
|
||||
for( int i = 1; i <= 4; i++ )
|
||||
{
|
||||
aDstContainer->Add( new CFILLEDCIRCLE2D( corners3DU[i - 1],
|
||||
aClearanceValue.x * m_biuTo3Dunits,
|
||||
*aPad ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
aDstContainer->Add( new CROUNDSEGMENT2D( corners3DU[i - 1],
|
||||
corners3DU[i & 3],
|
||||
aClearanceValue.x * 2.0f * m_biuTo3Dunits,
|
||||
*aPad ) );
|
||||
if( Is_segment_a_circle( corners3DU[i - 1], corners3DU[i & 3] ) )
|
||||
{
|
||||
aDstContainer->Add( new CFILLEDCIRCLE2D( corners3DU[i - 1],
|
||||
aClearanceValue.x * m_biuTo3Dunits,
|
||||
*aPad ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
aDstContainer->Add( new CROUNDSEGMENT2D( corners3DU[i - 1],
|
||||
corners3DU[i & 3],
|
||||
aClearanceValue.x * 2.0f * m_biuTo3Dunits,
|
||||
*aPad ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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-2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -57,6 +57,9 @@ const wxChar * EDA_3D_CANVAS::m_logTrace = wxT( "KI_TRACE_EDA_3D_CANVAS" );
|
||||
|
||||
const float EDA_3D_CANVAS::m_delta_move_step_factor = 0.7f;
|
||||
|
||||
// A custom event, used to call DoRePaint during an idle time
|
||||
wxDEFINE_EVENT( wxEVT_REFRESH_CUSTOM_COMMAND, wxEvent);
|
||||
|
||||
|
||||
BEGIN_EVENT_TABLE( EDA_3D_CANVAS, wxGLCanvas )
|
||||
EVT_PAINT( EDA_3D_CANVAS::OnPaint )
|
||||
@@ -78,6 +81,7 @@ BEGIN_EVENT_TABLE( EDA_3D_CANVAS, wxGLCanvas )
|
||||
|
||||
// other events
|
||||
EVT_ERASE_BACKGROUND( EDA_3D_CANVAS::OnEraseBackground )
|
||||
EVT_CUSTOM(wxEVT_REFRESH_CUSTOM_COMMAND, ID_CUSTOM_EVENT_1, EDA_3D_CANVAS::OnRefreshRequest )
|
||||
EVT_MENU_RANGE( ID_POPUP_3D_VIEW_START,
|
||||
ID_POPUP_3D_VIEW_END, EDA_3D_CANVAS::OnPopUpMenu )
|
||||
|
||||
@@ -312,17 +316,22 @@ void EDA_3D_CANVAS::DisplayStatus()
|
||||
}
|
||||
|
||||
|
||||
void EDA_3D_CANVAS::OnPaint( wxPaintEvent &event )
|
||||
void EDA_3D_CANVAS::OnPaint( wxPaintEvent& aEvent )
|
||||
{
|
||||
// Please have a look at:
|
||||
// https://lists.launchpad.net/kicad-developers/msg25149.html
|
||||
// wxPaintDC( this );
|
||||
// event.Skip( false );
|
||||
// aEvent.Skip( false );
|
||||
DoRePaint();
|
||||
}
|
||||
|
||||
|
||||
void EDA_3D_CANVAS::DoRePaint()
|
||||
{
|
||||
// SwapBuffer requires the window to be shown before calling
|
||||
if( !IsShownOnScreen() )
|
||||
{
|
||||
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::OnPaint !IsShown" );
|
||||
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::DoRePaint !IsShown" );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -856,13 +865,13 @@ void EDA_3D_CANVAS::restart_editingTimeOut_Timer()
|
||||
|
||||
void EDA_3D_CANVAS::OnTimerTimeout_Redraw( wxTimerEvent &event )
|
||||
{
|
||||
(void)event;
|
||||
Request_refresh( true );
|
||||
}
|
||||
|
||||
//Refresh();
|
||||
//Update();
|
||||
|
||||
wxPaintEvent redrawEvent;
|
||||
wxPostEvent( this, redrawEvent );
|
||||
void EDA_3D_CANVAS::OnRefreshRequest( wxEvent& aEvent )
|
||||
{
|
||||
DoRePaint();
|
||||
}
|
||||
|
||||
|
||||
@@ -870,22 +879,12 @@ void EDA_3D_CANVAS::Request_refresh( bool aRedrawImmediately )
|
||||
{
|
||||
if( aRedrawImmediately )
|
||||
{
|
||||
// On some systems, just calling Refresh does not work always
|
||||
// (Issue experienced on Win7 MSYS2)
|
||||
//Refresh();
|
||||
//Update();
|
||||
|
||||
// Using PostEvent will take priority to other events, like
|
||||
// mouse movements, keys, etc.
|
||||
wxPaintEvent redrawEvent;
|
||||
// Just calling Refresh() does not work always
|
||||
// Using an event to call DoRepaint ensure the repaint code will be executed,
|
||||
// and PostEvent will take priority to other events like mouse movements, keys, etc.
|
||||
// and is executed during the next idle time
|
||||
wxCommandEvent redrawEvent( wxEVT_REFRESH_CUSTOM_COMMAND, ID_CUSTOM_EVENT_1 );
|
||||
wxPostEvent( this, redrawEvent );
|
||||
|
||||
// This behaves the same
|
||||
// wxQueueEvent( this,
|
||||
// From wxWidget documentation: "The heap-allocated and
|
||||
// non-NULL event to queue, the function takes ownership of it."
|
||||
// new wxPaintEvent()
|
||||
// );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1085,7 +1084,10 @@ bool EDA_3D_CANVAS::SetView3D( int aKeycode )
|
||||
m_settings.CameraGet().SetT0_and_T1_current_T();
|
||||
m_settings.CameraGet().Reset_T1();
|
||||
m_settings.CameraGet().RotateX_T1( glm::radians( -90.0f ) );
|
||||
m_settings.CameraGet().RotateZ_T1( glm::radians( -180.0f ) );
|
||||
// The rotation angle should be 180.
|
||||
// We use 179.999 (180 - epsilon) to avoid a full 360 deg rotation when
|
||||
// using 180 deg if the previous rotated position was already 180 deg
|
||||
m_settings.CameraGet().RotateZ_T1( glm::radians( -179.999f ) );
|
||||
request_start_moving_camera();
|
||||
return true;
|
||||
|
||||
@@ -1101,7 +1103,7 @@ bool EDA_3D_CANVAS::SetView3D( int aKeycode )
|
||||
m_settings.CameraGet().SetInterpolateMode( INTERPOLATION_BEZIER );
|
||||
m_settings.CameraGet().SetT0_and_T1_current_T();
|
||||
m_settings.CameraGet().Reset_T1();
|
||||
m_settings.CameraGet().RotateY_T1( glm::radians( 180.0f ) );
|
||||
m_settings.CameraGet().RotateY_T1( glm::radians( 179.999f ) ); // Rotation = 180-epsilon
|
||||
request_start_moving_camera(
|
||||
glm::min( glm::max( m_settings.CameraGet().ZoomGet(), 0.5f ), 1.125f ) );
|
||||
return true;
|
||||
|
||||
@@ -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-2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -135,10 +135,21 @@ class EDA_3D_CANVAS : public HIDPI_GL_CANVAS
|
||||
|
||||
private:
|
||||
|
||||
void OnPaint( wxPaintEvent &event );
|
||||
/** Called by a wxPaintEvent event
|
||||
*/
|
||||
void OnPaint( wxPaintEvent& aEvent );
|
||||
|
||||
/**
|
||||
* The actual function to repaint the canvas.
|
||||
* It is usually called by OnPaint() but because it does not use a wxPaintDC
|
||||
* it can be called outside a wxPaintEvent
|
||||
*/
|
||||
void DoRePaint();
|
||||
|
||||
void OnEraseBackground( wxEraseEvent &event );
|
||||
|
||||
void OnRefreshRequest( wxEvent& aEvent );
|
||||
|
||||
void OnMouseWheel( wxMouseEvent &event );
|
||||
|
||||
#if wxCHECK_VERSION( 3, 1, 0 ) || defined( USE_OSX_MAGNIFY_EVENT )
|
||||
|
||||
@@ -198,6 +198,7 @@ void C3D_RENDER_OGL_LEGACY::setupMaterials()
|
||||
0.00f, 0.30f );
|
||||
|
||||
m_materials.m_Copper.m_Shininess = shininessfactor * 128.0f;
|
||||
m_materials.m_Copper.m_Emissive = SFVEC3F( 0.0f, 0.0f, 0.0f );
|
||||
|
||||
|
||||
// Paste material mixed with paste color
|
||||
@@ -213,6 +214,7 @@ void C3D_RENDER_OGL_LEGACY::setupMaterials()
|
||||
m_settings.m_SolderPasteColor.b );
|
||||
|
||||
m_materials.m_Paste.m_Shininess = 0.1f * 128.0f;
|
||||
m_materials.m_Paste.m_Emissive = SFVEC3F( 0.0f, 0.0f, 0.0f );
|
||||
|
||||
|
||||
// Silk screen material mixed with silk screen color
|
||||
@@ -228,6 +230,7 @@ void C3D_RENDER_OGL_LEGACY::setupMaterials()
|
||||
m_settings.m_SilkScreenColor.b + 0.10f );
|
||||
|
||||
m_materials.m_SilkS.m_Shininess = 0.078125f * 128.0f;
|
||||
m_materials.m_SilkS.m_Emissive = SFVEC3F( 0.0f, 0.0f, 0.0f );
|
||||
|
||||
|
||||
// Solder mask material mixed with solder mask color
|
||||
@@ -244,6 +247,7 @@ void C3D_RENDER_OGL_LEGACY::setupMaterials()
|
||||
|
||||
m_materials.m_SolderMask.m_Shininess = 0.8f * 128.0f;
|
||||
m_materials.m_SolderMask.m_Transparency = 0.17f;
|
||||
m_materials.m_SolderMask.m_Emissive = SFVEC3F( 0.0f, 0.0f, 0.0f );
|
||||
|
||||
|
||||
// Epoxy material
|
||||
@@ -258,6 +262,7 @@ void C3D_RENDER_OGL_LEGACY::setupMaterials()
|
||||
20.0f / 255.0f );
|
||||
|
||||
m_materials.m_EpoxyBoard.m_Shininess = 0.1f * 128.0f;
|
||||
m_materials.m_EpoxyBoard.m_Emissive = SFVEC3F( 0.0f, 0.0f, 0.0f );
|
||||
}
|
||||
else // Technical Mode
|
||||
{
|
||||
@@ -269,34 +274,40 @@ void C3D_RENDER_OGL_LEGACY::setupMaterials()
|
||||
m_materials.m_Copper.m_Ambient = matAmbientColor;
|
||||
m_materials.m_Copper.m_Specular = matSpecularColor;
|
||||
m_materials.m_Copper.m_Shininess = matShininess;
|
||||
m_materials.m_Copper.m_Emissive = SFVEC3F( 0.0f, 0.0f, 0.0f );
|
||||
|
||||
// Paste material
|
||||
m_materials.m_Paste.m_Ambient = matAmbientColor;
|
||||
m_materials.m_Paste.m_Specular = matSpecularColor;
|
||||
m_materials.m_Paste.m_Shininess = matShininess;
|
||||
m_materials.m_Paste.m_Emissive = SFVEC3F( 0.0f, 0.0f, 0.0f );
|
||||
|
||||
// Silk screen material
|
||||
m_materials.m_SilkS.m_Ambient = matAmbientColor;
|
||||
m_materials.m_SilkS.m_Specular = matSpecularColor;
|
||||
m_materials.m_SilkS.m_Shininess = matShininess;
|
||||
m_materials.m_SilkS.m_Emissive = SFVEC3F( 0.0f, 0.0f, 0.0f );
|
||||
|
||||
// Solder mask material
|
||||
m_materials.m_SolderMask.m_Ambient = matAmbientColor;
|
||||
m_materials.m_SolderMask.m_Specular = matSpecularColor;
|
||||
m_materials.m_SolderMask.m_Shininess = matShininess;
|
||||
m_materials.m_SolderMask.m_Transparency = 0.17f;
|
||||
m_materials.m_SolderMask.m_Emissive = SFVEC3F( 0.0f, 0.0f, 0.0f );
|
||||
|
||||
// Epoxy material
|
||||
m_materials.m_EpoxyBoard.m_Ambient = matAmbientColor;
|
||||
m_materials.m_EpoxyBoard.m_Diffuse = m_settings.m_BoardBodyColor;
|
||||
m_materials.m_EpoxyBoard.m_Specular = matSpecularColor;
|
||||
m_materials.m_EpoxyBoard.m_Shininess = matShininess;
|
||||
m_materials.m_EpoxyBoard.m_Emissive = SFVEC3F( 0.0f, 0.0f, 0.0f );
|
||||
|
||||
// Gray material (used for example in technical vias and pad holes)
|
||||
m_materials.m_GrayMaterial.m_Ambient = SFVEC3F( 0.8f, 0.8f, 0.8f );
|
||||
m_materials.m_GrayMaterial.m_Diffuse = SFVEC3F( 0.3f, 0.3f, 0.3f );
|
||||
m_materials.m_GrayMaterial.m_Specular = SFVEC3F( 0.4f, 0.4f, 0.4f );
|
||||
m_materials.m_GrayMaterial.m_Shininess = 0.01f * 128.0f;
|
||||
m_materials.m_GrayMaterial.m_Emissive = SFVEC3F( 0.0f, 0.0f, 0.0f );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -347,6 +358,7 @@ void C3D_RENDER_OGL_LEGACY::set_layer_material( PCB_LAYER_ID aLayerID )
|
||||
m_materials.m_Plastic.m_Diffuse.b * 0.7f );
|
||||
|
||||
m_materials.m_Plastic.m_Shininess = 0.078125f * 128.0f;
|
||||
m_materials.m_Plastic.m_Emissive = SFVEC3F( 0.0f, 0.0f, 0.0f );
|
||||
OGL_SetMaterial( m_materials.m_Plastic );
|
||||
break;
|
||||
|
||||
|
||||
@@ -286,7 +286,9 @@ void C3D_RENDER_RAYTRACING::reload( REPORTER *aStatusTextReporter )
|
||||
|
||||
m_outlineBoard2dObjects = new CCONTAINER2D;
|
||||
|
||||
if( ((const SHAPE_POLY_SET &)m_settings.GetBoardPoly()).OutlineCount() == 1 )
|
||||
const int outlineCount = m_settings.GetBoardPoly().OutlineCount();
|
||||
|
||||
if( outlineCount > 0 )
|
||||
{
|
||||
float divFactor = 0.0f;
|
||||
|
||||
@@ -299,12 +301,16 @@ void C3D_RENDER_RAYTRACING::reload( REPORTER *aStatusTextReporter )
|
||||
SHAPE_POLY_SET boardPolyCopy = m_settings.GetBoardPoly();
|
||||
boardPolyCopy.Fracture( SHAPE_POLY_SET::PM_FAST );
|
||||
|
||||
Convert_path_polygon_to_polygon_blocks_and_dummy_blocks(
|
||||
boardPolyCopy,
|
||||
*m_outlineBoard2dObjects,
|
||||
m_settings.BiuTo3Dunits(),
|
||||
divFactor,
|
||||
(const BOARD_ITEM &)*m_settings.GetBoard() );
|
||||
for( int iOutlinePolyIdx = 0; iOutlinePolyIdx < outlineCount; iOutlinePolyIdx++ )
|
||||
{
|
||||
Convert_path_polygon_to_polygon_blocks_and_dummy_blocks(
|
||||
boardPolyCopy,
|
||||
*m_outlineBoard2dObjects,
|
||||
m_settings.BiuTo3Dunits(),
|
||||
divFactor,
|
||||
*dynamic_cast<const BOARD_ITEM*>( m_settings.GetBoard() ),
|
||||
iOutlinePolyIdx );
|
||||
}
|
||||
|
||||
if( m_settings.GetFlag( FL_SHOW_BOARD_BODY ) )
|
||||
{
|
||||
|
||||
@@ -28,10 +28,11 @@
|
||||
*/
|
||||
|
||||
#include <GL/glew.h>
|
||||
#include <climits>
|
||||
#include <algorithm>
|
||||
#include <atomic>
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
#include <climits>
|
||||
#include <thread>
|
||||
|
||||
#include "c3d_render_raytracing.h"
|
||||
#include "mortoncodes.h"
|
||||
@@ -2074,6 +2075,13 @@ bool C3D_RENDER_RAYTRACING::initializeOpenGL()
|
||||
}
|
||||
|
||||
|
||||
static float distance( const SFVEC2UI& a, const SFVEC2UI& b )
|
||||
{
|
||||
const float dx = (float) a.x - (float) b.x;
|
||||
const float dy = (float) a.y - (float) b.y;
|
||||
return hypotf( dx, dy );
|
||||
}
|
||||
|
||||
void C3D_RENDER_RAYTRACING::initialize_block_positions()
|
||||
{
|
||||
|
||||
@@ -2123,26 +2131,24 @@ void C3D_RENDER_RAYTRACING::initialize_block_positions()
|
||||
m_postshader_ssao.UpdateSize( m_realBufferSize );
|
||||
|
||||
|
||||
// Calc block positions
|
||||
// Calc block positions for regular rendering. Choose an 'inside out'
|
||||
// style of rendering
|
||||
// /////////////////////////////////////////////////////////////////////
|
||||
m_blockPositions.clear();
|
||||
m_blockPositions.reserve( (m_realBufferSize.x / RAYPACKET_DIM) *
|
||||
(m_realBufferSize.y / RAYPACKET_DIM) );
|
||||
const int blocks_x = m_realBufferSize.x / RAYPACKET_DIM;
|
||||
const int blocks_y = m_realBufferSize.y / RAYPACKET_DIM;
|
||||
m_blockPositions.reserve( blocks_x * blocks_y );
|
||||
|
||||
i = 0;
|
||||
for( int x = 0; x < blocks_x; ++x )
|
||||
for( int y = 0; y < blocks_y; ++y )
|
||||
m_blockPositions.push_back( SFVEC2UI( x * RAYPACKET_DIM, y * RAYPACKET_DIM ) );
|
||||
|
||||
while(1)
|
||||
{
|
||||
SFVEC2UI blockPos( DecodeMorton2X(i) * RAYPACKET_DIM,
|
||||
DecodeMorton2Y(i) * RAYPACKET_DIM );
|
||||
i++;
|
||||
|
||||
if( (blockPos.x >= m_realBufferSize.x) && (blockPos.y >= m_realBufferSize.y) )
|
||||
break;
|
||||
|
||||
if( (blockPos.x < m_realBufferSize.x) && (blockPos.y < m_realBufferSize.y) )
|
||||
m_blockPositions.push_back( blockPos );
|
||||
}
|
||||
const SFVEC2UI center( m_realBufferSize.x / 2, m_realBufferSize.y / 2 );
|
||||
std::sort( m_blockPositions.begin(), m_blockPositions.end(),
|
||||
[&]( const SFVEC2UI& a, const SFVEC2UI& b ) {
|
||||
// Sort order: inside out.
|
||||
return distance( a, center ) < distance( b, center );
|
||||
} );
|
||||
|
||||
// Create m_shader buffer
|
||||
delete[] m_shaderBuffer;
|
||||
|
||||
@@ -408,17 +408,16 @@ void Convert_path_polygon_to_polygon_blocks_and_dummy_blocks(
|
||||
CGENERICCONTAINER2D &aDstContainer,
|
||||
float aBiuTo3DunitsScale,
|
||||
float aDivFactor,
|
||||
const BOARD_ITEM &aBoardItem )
|
||||
const BOARD_ITEM &aBoardItem,
|
||||
int aPolyIndex )
|
||||
{
|
||||
BOX2I pathBounds = aMainPath.BBox();
|
||||
|
||||
// Get the path
|
||||
|
||||
wxASSERT( aMainPath.OutlineCount() == 1 );
|
||||
const SHAPE_POLY_SET::POLYGON& curr_polywithholes = aMainPath.CPolygon( 0 );
|
||||
wxASSERT( aPolyIndex < aMainPath.OutlineCount() );
|
||||
|
||||
wxASSERT( curr_polywithholes.size() == 1 );
|
||||
const SHAPE_LINE_CHAIN& path = curr_polywithholes[0]; // a simple polygon
|
||||
const SHAPE_LINE_CHAIN& path = aMainPath.COutline( aPolyIndex );
|
||||
|
||||
BOX2I pathBounds = path.BBox();
|
||||
|
||||
// Convert the points to segments class
|
||||
CBBOX2D bbox;
|
||||
@@ -430,8 +429,10 @@ void Convert_path_polygon_to_polygon_blocks_and_dummy_blocks(
|
||||
// Contains a closed polygon used to calc if points are inside
|
||||
SEGMENTS segments;
|
||||
|
||||
segments_and_normals.resize( path.PointCount() );
|
||||
segments.resize( path.PointCount() );
|
||||
segments_and_normals.reserve( path.PointCount() );
|
||||
segments.reserve( path.PointCount() );
|
||||
|
||||
SFVEC2F prevPoint;
|
||||
|
||||
for( int i = 0; i < path.PointCount(); i++ )
|
||||
{
|
||||
@@ -440,9 +441,23 @@ void Convert_path_polygon_to_polygon_blocks_and_dummy_blocks(
|
||||
const SFVEC2F point ( (float)( a.x) * aBiuTo3DunitsScale,
|
||||
(float)(-a.y) * aBiuTo3DunitsScale );
|
||||
|
||||
bbox.Union( point );
|
||||
segments_and_normals[i].m_Start = point;
|
||||
segments[i].m_Start = point;
|
||||
// Only add points that are not coincident
|
||||
if( (i == 0) ||
|
||||
(fabs(prevPoint.x - point.x) > FLT_EPSILON) ||
|
||||
(fabs(prevPoint.y - point.y) > FLT_EPSILON) )
|
||||
{
|
||||
prevPoint = point;
|
||||
|
||||
bbox.Union( point );
|
||||
|
||||
SEGMENT_WITH_NORMALS sn;
|
||||
sn.m_Start = point;
|
||||
segments_and_normals.push_back( sn );
|
||||
|
||||
POLYSEGMENT ps;
|
||||
ps.m_Start = point;
|
||||
segments.push_back( ps );
|
||||
}
|
||||
}
|
||||
|
||||
bbox.ScaleNextUp();
|
||||
@@ -518,13 +533,13 @@ void Convert_path_polygon_to_polygon_blocks_and_dummy_blocks(
|
||||
segments_and_normals[i].m_Normals.m_Start = normalSeg;
|
||||
else
|
||||
segments_and_normals[i].m_Normals.m_Start =
|
||||
glm::normalize( (((normalBeforeSeg * dotBefore ) + normalSeg) * 0.5f) );
|
||||
glm::normalize( (normalBeforeSeg * dotBefore ) + normalSeg );
|
||||
|
||||
if( dotAfter < 0.7f )
|
||||
segments_and_normals[i].m_Normals.m_End = normalSeg;
|
||||
else
|
||||
segments_and_normals[i].m_Normals.m_End =
|
||||
glm::normalize( (((normalAfterSeg * dotAfter ) + normalSeg) * 0.5f) );
|
||||
glm::normalize( (normalAfterSeg * dotAfter ) + normalSeg );
|
||||
}
|
||||
|
||||
if( aDivFactor == 0.0f )
|
||||
@@ -711,35 +726,6 @@ void Convert_path_polygon_to_polygon_blocks_and_dummy_blocks(
|
||||
}
|
||||
|
||||
|
||||
void Polygon_Calc_BBox_3DU( const SHAPE_POLY_SET &aPolysList,
|
||||
CBBOX2D &aOutBBox ,
|
||||
float aBiuTo3DunitsScale )
|
||||
{
|
||||
aOutBBox.Reset();
|
||||
|
||||
for( int idx = 0; idx < aPolysList.OutlineCount(); ++idx )
|
||||
{
|
||||
// Each polygon in aPolysList is a polygon with holes
|
||||
const SHAPE_POLY_SET::POLYGON& curr_polywithholes = aPolysList.CPolygon( idx );
|
||||
|
||||
for( unsigned ipoly = 0; ipoly < curr_polywithholes.size(); ++ipoly )
|
||||
{
|
||||
const SHAPE_LINE_CHAIN& path = curr_polywithholes[ipoly]; // a simple polygon
|
||||
|
||||
for( int jj = 0; jj < path.PointCount(); jj++ )
|
||||
{
|
||||
const VECTOR2I& a = path.CPoint( jj );
|
||||
|
||||
aOutBBox.Union( SFVEC2F( (float) a.x * aBiuTo3DunitsScale,
|
||||
(float)-a.y * aBiuTo3DunitsScale ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
aOutBBox.ScaleNextUp();
|
||||
}
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
static void polygon_Convert( const ClipperLib::Path &aPath,
|
||||
SEGMENTS &aOutSegment,
|
||||
|
||||
@@ -148,11 +148,8 @@ void Convert_path_polygon_to_polygon_blocks_and_dummy_blocks(
|
||||
CGENERICCONTAINER2D &aDstContainer,
|
||||
float aBiuTo3DunitsScale,
|
||||
float aDivFactor,
|
||||
const BOARD_ITEM &aBoardItem );
|
||||
|
||||
void Polygon_Calc_BBox_3DU( const SHAPE_POLY_SET &aPolysList,
|
||||
CBBOX2D &aOutBBox,
|
||||
float aBiuTo3DunitsScale );
|
||||
const BOARD_ITEM &aBoardItem,
|
||||
int aPolyIndex );
|
||||
|
||||
void Polygon2d_TestModule();
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ public:
|
||||
bool IsPointInside( const SFVEC2F &aPoint ) const override;
|
||||
};
|
||||
|
||||
static const float s_min_dot = (FLT_EPSILON * 4.0f) ;
|
||||
static const float s_min_dot = (FLT_EPSILON * 4.0f * FLT_EPSILON * 4.0f) ;
|
||||
|
||||
/**
|
||||
* @brief Segment_is_a_circle - check if segment start and end is very close to each other
|
||||
|
||||
@@ -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-2017 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2019 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
|
||||
@@ -31,6 +31,17 @@
|
||||
#include <wx/log.h>
|
||||
|
||||
|
||||
// A helper function to normalize aAngle between -2PI and +2PI
|
||||
inline void normalise2PI( float& aAngle )
|
||||
{
|
||||
while( aAngle > 0.0 )
|
||||
aAngle -= M_PI*2;
|
||||
|
||||
while( aAngle < 0.0 )
|
||||
aAngle += M_PI*2;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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
|
||||
@@ -95,6 +106,20 @@ void CCAMERA::Reset_T1()
|
||||
m_zoom_t1 = 1.0f;
|
||||
m_rotate_aux_t1 = SFVEC3F( 0.0f );
|
||||
m_lookat_pos_t1 = m_board_lookat_pos_init;
|
||||
|
||||
|
||||
// Since 0 = 2pi, we want to reset the angle to be the closest
|
||||
// one to where we currently are. That ensures that we rotate
|
||||
// the board around the smallest distance getting there.
|
||||
if( m_rotate_aux_t0.x > M_PI )
|
||||
m_rotate_aux_t1.x = 2*M_PI;
|
||||
|
||||
if( m_rotate_aux_t0.y > M_PI )
|
||||
m_rotate_aux_t1.y = 2*M_PI;
|
||||
|
||||
if( m_rotate_aux_t0.z > M_PI )
|
||||
m_rotate_aux_t1.z = 2*M_PI;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -111,14 +136,17 @@ void CCAMERA::updateRotationMatrix()
|
||||
m_rotationMatrixAux = glm::rotate( glm::mat4( 1.0f ),
|
||||
m_rotate_aux.x,
|
||||
SFVEC3F( 1.0f, 0.0f, 0.0f ) );
|
||||
normalise2PI( m_rotate_aux.x );
|
||||
|
||||
m_rotationMatrixAux = glm::rotate( m_rotationMatrixAux,
|
||||
m_rotate_aux.y,
|
||||
SFVEC3F( 0.0f, 1.0f, 0.0f ) );
|
||||
normalise2PI( m_rotate_aux.y );
|
||||
|
||||
m_rotationMatrixAux = glm::rotate( m_rotationMatrixAux,
|
||||
m_rotate_aux.z,
|
||||
SFVEC3F( 0.0f, 0.0f, 1.0f ) );
|
||||
normalise2PI( m_rotate_aux.z );
|
||||
|
||||
m_parametersChanged = true;
|
||||
|
||||
@@ -163,7 +191,7 @@ void CCAMERA::rebuildProjection()
|
||||
|
||||
m_projectionMatrixInv = glm::inverse( m_projectionMatrix );
|
||||
|
||||
m_frustum.tang = glm::tan( glm::radians( m_frustum.angle ) * 0.5f ) ;
|
||||
m_frustum.tang = glm::tan( glm::radians( m_frustum.angle ) * 0.5f );
|
||||
|
||||
m_focalLen.x = ( (float)m_windowSize.y / (float)m_windowSize.x ) / m_frustum.tang;
|
||||
m_focalLen.y = 1.0f / m_frustum.tang;
|
||||
@@ -178,19 +206,21 @@ void CCAMERA::rebuildProjection()
|
||||
|
||||
m_frustum.nearD = -m_frustum.farD; // Use a symmetrical clip plane for ortho projection
|
||||
|
||||
const float orthoReductionFactor = m_zoom / 75.0f;
|
||||
// This formula was found by trial and error
|
||||
const float orthoReductionFactor = glm::length( m_camera_pos_init ) *
|
||||
m_zoom * m_zoom * 0.5f;
|
||||
|
||||
// Initialize Projection Matrix for Ortographic View
|
||||
m_projectionMatrix = glm::ortho( -m_windowSize.x * orthoReductionFactor,
|
||||
m_windowSize.x * orthoReductionFactor,
|
||||
-m_windowSize.y * orthoReductionFactor,
|
||||
m_windowSize.y * orthoReductionFactor,
|
||||
m_projectionMatrix = glm::ortho( -m_frustum.ratio * orthoReductionFactor,
|
||||
m_frustum.ratio * orthoReductionFactor,
|
||||
-orthoReductionFactor,
|
||||
orthoReductionFactor,
|
||||
m_frustum.nearD, m_frustum.farD );
|
||||
|
||||
m_projectionMatrixInv = glm::inverse( m_projectionMatrix );
|
||||
|
||||
m_frustum.nw = m_windowSize.x * orthoReductionFactor * 2.0f;
|
||||
m_frustum.nh = m_windowSize.y * orthoReductionFactor * 2.0f;
|
||||
m_frustum.nw = orthoReductionFactor * 2.0f * m_frustum.ratio;
|
||||
m_frustum.nh = orthoReductionFactor * 2.0f;
|
||||
m_frustum.fw = m_frustum.nw;
|
||||
m_frustum.fh = m_frustum.nh;
|
||||
|
||||
@@ -310,7 +340,7 @@ void CCAMERA::MakeRay( const SFVEC2I &aWindowPos,
|
||||
|
||||
case PROJECTION_ORTHO:
|
||||
aOutOrigin = up_plus_right * 0.5f + m_frustum.nc;
|
||||
aOutDirection = -m_dir;
|
||||
aOutDirection = -m_dir + SFVEC3F( FLT_EPSILON );
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -341,7 +371,7 @@ void CCAMERA::MakeRay( const SFVEC2F &aWindowPos, SFVEC3F &aOutOrigin, SFVEC3F &
|
||||
|
||||
case PROJECTION_ORTHO:
|
||||
aOutOrigin = up_plus_right * 0.5f + m_frustum.nc;
|
||||
aOutDirection = -m_dir;
|
||||
aOutDirection = -m_dir + SFVEC3F( FLT_EPSILON );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,100 +40,111 @@ void EDA_3D_VIEWER::ReCreateMainToolbar()
|
||||
{
|
||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER::ReCreateMainToolbar" );
|
||||
|
||||
if( m_mainToolBar != NULL )
|
||||
{
|
||||
// Simple update to the list of old files.
|
||||
SetToolbars();
|
||||
return;
|
||||
}
|
||||
wxWindowUpdateLocker dummy( this );
|
||||
|
||||
m_mainToolBar = new wxAuiToolBar( this, ID_H_TOOLBAR, wxDefaultPosition, wxDefaultSize,
|
||||
KICAD_AUI_TB_STYLE | wxAUI_TB_HORZ_LAYOUT );
|
||||
if( m_mainToolBar )
|
||||
{
|
||||
m_mainToolBar->Clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_mainToolBar = new wxAuiToolBar( this, ID_H_TOOLBAR, wxDefaultPosition, wxDefaultSize,
|
||||
KICAD_AUI_TB_STYLE | wxAUI_TB_HORZ_LAYOUT );
|
||||
}
|
||||
|
||||
// Set up toolbar
|
||||
m_mainToolBar->AddTool( ID_RELOAD3D_BOARD, wxEmptyString,
|
||||
KiBitmap( import3d_xpm ), _( "Reload board" ) );
|
||||
KiScaledBitmap( import3d_xpm, this ), _( "Reload board" ) );
|
||||
|
||||
m_mainToolBar->AddSeparator();
|
||||
KiScaledSeparator( m_mainToolBar, this );
|
||||
|
||||
m_mainToolBar->AddTool( ID_TOOL_SCREENCOPY_TOCLIBBOARD, wxEmptyString,
|
||||
KiBitmap( copy_xpm ),
|
||||
KiScaledBitmap( copy_xpm, this ),
|
||||
_( "Copy 3D image to clipboard" ) );
|
||||
|
||||
m_mainToolBar->AddSeparator();
|
||||
KiScaledSeparator( m_mainToolBar, this );
|
||||
|
||||
m_mainToolBar->AddTool( ID_TOOL_SET_VISIBLE_ITEMS, wxEmptyString,
|
||||
KiBitmap( read_setup_xpm ),
|
||||
KiScaledBitmap( read_setup_xpm, this ),
|
||||
_( "Set display options, and some layers visibility" ) );
|
||||
m_mainToolBar->AddSeparator();
|
||||
|
||||
m_mainToolBar->AddTool( ID_RENDER_CURRENT_VIEW, wxEmptyString, KiBitmap( render_mode_xpm ),
|
||||
m_mainToolBar->AddTool( ID_RENDER_CURRENT_VIEW, wxEmptyString,
|
||||
KiScaledBitmap( render_mode_xpm, this ),
|
||||
_( "Render current view using Raytracing" ), wxITEM_CHECK );
|
||||
|
||||
m_mainToolBar->AddSeparator();
|
||||
KiScaledSeparator( m_mainToolBar, this );
|
||||
|
||||
m_mainToolBar->AddTool( ID_ZOOM_IN, wxEmptyString, KiBitmap( zoom_in_xpm ),
|
||||
m_mainToolBar->AddTool( ID_ZOOM_IN, wxEmptyString,
|
||||
KiScaledBitmap( zoom_in_xpm, this ),
|
||||
_( "Zoom in" ) );
|
||||
|
||||
m_mainToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString, KiBitmap( zoom_out_xpm ),
|
||||
m_mainToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString,
|
||||
KiScaledBitmap( zoom_out_xpm, this ),
|
||||
_( "Zoom out" ) );
|
||||
|
||||
m_mainToolBar->AddTool( ID_ZOOM_REDRAW, wxEmptyString,
|
||||
KiBitmap( zoom_redraw_xpm ),
|
||||
KiScaledBitmap( zoom_redraw_xpm, this ),
|
||||
_( "Redraw view" ) );
|
||||
|
||||
m_mainToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, KiBitmap( zoom_fit_in_page_xpm ),
|
||||
m_mainToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString,
|
||||
KiScaledBitmap( zoom_fit_in_page_xpm, this ),
|
||||
_( "Zoom to fit 3D model" ) );
|
||||
|
||||
m_mainToolBar->AddSeparator();
|
||||
KiScaledSeparator( m_mainToolBar, this );
|
||||
|
||||
m_mainToolBar->AddTool( ID_ROTATE3D_X_NEG, wxEmptyString,
|
||||
KiBitmap( rotate_neg_x_xpm ),
|
||||
KiScaledBitmap( rotate_neg_x_xpm, this ),
|
||||
_( "Rotate X Clockwise" ) );
|
||||
|
||||
m_mainToolBar->AddTool( ID_ROTATE3D_X_POS, wxEmptyString,
|
||||
KiBitmap( rotate_pos_x_xpm ),
|
||||
KiScaledBitmap( rotate_pos_x_xpm, this ),
|
||||
_( "Rotate X Counterclockwise" ) );
|
||||
|
||||
m_mainToolBar->AddSeparator();
|
||||
KiScaledSeparator( m_mainToolBar, this );
|
||||
|
||||
m_mainToolBar->AddTool( ID_ROTATE3D_Y_NEG, wxEmptyString,
|
||||
KiBitmap( rotate_neg_y_xpm ),
|
||||
KiScaledBitmap( rotate_neg_y_xpm, this ),
|
||||
_( "Rotate Y Clockwise" ) );
|
||||
|
||||
m_mainToolBar->AddTool( ID_ROTATE3D_Y_POS, wxEmptyString,
|
||||
KiBitmap( rotate_pos_y_xpm ),
|
||||
KiScaledBitmap( rotate_pos_y_xpm, this ),
|
||||
_( "Rotate Y Counterclockwise" ) );
|
||||
|
||||
m_mainToolBar->AddSeparator();
|
||||
KiScaledSeparator( m_mainToolBar, this );
|
||||
|
||||
m_mainToolBar->AddTool( ID_ROTATE3D_Z_NEG, wxEmptyString,
|
||||
KiBitmap( rotate_neg_z_xpm ),
|
||||
KiScaledBitmap( rotate_neg_z_xpm, this ),
|
||||
_( "Rotate Z Clockwise" ) );
|
||||
|
||||
m_mainToolBar->AddTool( ID_ROTATE3D_Z_POS, wxEmptyString,
|
||||
KiBitmap( rotate_pos_z_xpm ),
|
||||
KiScaledBitmap( rotate_pos_z_xpm, this ),
|
||||
_( "Rotate Z Counterclockwise" ) );
|
||||
|
||||
m_mainToolBar->AddSeparator();
|
||||
m_mainToolBar->AddTool( ID_MOVE3D_LEFT, wxEmptyString, KiBitmap( left_xpm ),
|
||||
KiScaledSeparator( m_mainToolBar, this );
|
||||
|
||||
m_mainToolBar->AddTool( ID_MOVE3D_LEFT, wxEmptyString,
|
||||
KiScaledBitmap( left_xpm, this ),
|
||||
_( "Move left" ) );
|
||||
|
||||
m_mainToolBar->AddTool( ID_MOVE3D_RIGHT, wxEmptyString, KiBitmap( right_xpm ),
|
||||
m_mainToolBar->AddTool( ID_MOVE3D_RIGHT, wxEmptyString,
|
||||
KiScaledBitmap( right_xpm, this ),
|
||||
_( "Move right" ) );
|
||||
|
||||
m_mainToolBar->AddTool( ID_MOVE3D_UP, wxEmptyString, KiBitmap( up_xpm ),
|
||||
m_mainToolBar->AddTool( ID_MOVE3D_UP, wxEmptyString,
|
||||
KiScaledBitmap( up_xpm, this ),
|
||||
_( "Move up" ) );
|
||||
|
||||
m_mainToolBar->AddTool( ID_MOVE3D_DOWN, wxEmptyString, KiBitmap( down_xpm ),
|
||||
m_mainToolBar->AddTool( ID_MOVE3D_DOWN, wxEmptyString,
|
||||
KiScaledBitmap( down_xpm, this ),
|
||||
_( "Move down" ) );
|
||||
|
||||
m_mainToolBar->AddSeparator();
|
||||
m_mainToolBar->AddTool( ID_ORTHO, wxEmptyString, KiBitmap( ortho_xpm ),
|
||||
KiScaledSeparator( m_mainToolBar, this );
|
||||
|
||||
m_mainToolBar->AddTool( ID_ORTHO, wxEmptyString,
|
||||
KiScaledBitmap( ortho_xpm, this ),
|
||||
_( "Enable/Disable orthographic projection" ),
|
||||
wxITEM_CHECK );
|
||||
|
||||
m_mainToolBar->Realize();
|
||||
}
|
||||
|
||||
|
||||
void EDA_3D_VIEWER::SetToolbars()
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jul 11 2018)
|
||||
// C++ code generated with wxFormBuilder (version 3.9.0 Nov 1 2020)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@@ -12,251 +12,252 @@
|
||||
DIALOG_3D_VIEW_OPTIONS_BASE::DIALOG_3D_VIEW_OPTIONS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
||||
{
|
||||
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
||||
|
||||
|
||||
wxBoxSizer* bSizerMain;
|
||||
bSizerMain = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
wxBoxSizer* bSizerUpper;
|
||||
bSizerUpper = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
|
||||
wxBoxSizer* bSizeLeft;
|
||||
bSizeLeft = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
m_staticText3DRenderOpts = new wxStaticText( this, wxID_ANY, _("Render options:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText3DRenderOpts->Wrap( -1 );
|
||||
m_staticText3DRenderOpts->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
|
||||
|
||||
|
||||
bSizeLeft->Add( m_staticText3DRenderOpts, 0, wxALL, 5 );
|
||||
|
||||
|
||||
wxFlexGridSizer* fgSizerRenderOptions;
|
||||
fgSizerRenderOptions = new wxFlexGridSizer( 0, 3, 0, 0 );
|
||||
fgSizerRenderOptions->SetFlexibleDirection( wxBOTH );
|
||||
fgSizerRenderOptions->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
|
||||
|
||||
|
||||
fgSizerRenderOptions->Add( 0, 0, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
|
||||
m_bitmapRealisticMode = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerRenderOptions->Add( m_bitmapRealisticMode, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
m_checkBoxRealisticMode = new wxCheckBox( this, wxID_ANY, _("Realistic mode"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerRenderOptions->Add( m_checkBoxRealisticMode, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
fgSizerRenderOptions->Add( 0, 0, 0, wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
|
||||
m_bitmapBoardBody = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerRenderOptions->Add( m_bitmapBoardBody, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
m_checkBoxBoardBody = new wxCheckBox( this, wxID_ANY, _("Show board body"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerRenderOptions->Add( m_checkBoxBoardBody, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
fgSizerRenderOptions->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_bitmapCuThickness = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerRenderOptions->Add( m_bitmapCuThickness, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
m_checkBoxCuThickness = new wxCheckBox( this, wxID_ANY, _("Show copper thickness"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerRenderOptions->Add( m_checkBoxCuThickness, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
fgSizerRenderOptions->Add( 0, 0, 0, wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
|
||||
m_bitmapBoundingBoxes = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerRenderOptions->Add( m_bitmapBoundingBoxes, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
m_checkBoxBoundingBoxes = new wxCheckBox( this, wxID_ANY, _("Show model bounding boxes"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerRenderOptions->Add( m_checkBoxBoundingBoxes, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
fgSizerRenderOptions->Add( 0, 0, 0, wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
|
||||
m_bitmapAreas = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerRenderOptions->Add( m_bitmapAreas, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
m_checkBoxAreas = new wxCheckBox( this, wxID_ANY, _("Show filled areas in zones"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerRenderOptions->Add( m_checkBoxAreas, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
wxFlexGridSizer* fgSizer3;
|
||||
fgSizer3 = new wxFlexGridSizer( 0, 2, 0, 0 );
|
||||
fgSizer3->SetFlexibleDirection( wxBOTH );
|
||||
fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
|
||||
|
||||
|
||||
fgSizerRenderOptions->Add( fgSizer3, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizeLeft->Add( fgSizerRenderOptions, 0, wxEXPAND|wxBOTTOM, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizeLeft->Add( 0, 10, 0, 0, 5 );
|
||||
|
||||
|
||||
m_staticText3DmodelVisibility = new wxStaticText( this, wxID_ANY, _("3D model visibility:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText3DmodelVisibility->Wrap( -1 );
|
||||
m_staticText3DmodelVisibility->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
|
||||
|
||||
|
||||
bSizeLeft->Add( m_staticText3DmodelVisibility, 0, wxALL, 5 );
|
||||
|
||||
|
||||
wxFlexGridSizer* fgSizer3DVisibility;
|
||||
fgSizer3DVisibility = new wxFlexGridSizer( 0, 3, 0, 0 );
|
||||
fgSizer3DVisibility->SetFlexibleDirection( wxBOTH );
|
||||
fgSizer3DVisibility->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
|
||||
|
||||
|
||||
fgSizer3DVisibility->Add( 0, 0, 1, wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
|
||||
m_bitmap3DshapesTH = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer3DVisibility->Add( m_bitmap3DshapesTH, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
m_checkBox3DshapesTH = new wxCheckBox( this, wxID_ANY, _("Show 3D through hole models"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer3DVisibility->Add( m_checkBox3DshapesTH, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
fgSizer3DVisibility->Add( 0, 0, 0, wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
|
||||
m_bitmap3DshapesSMD = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer3DVisibility->Add( m_bitmap3DshapesSMD, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
m_checkBox3DshapesSMD = new wxCheckBox( this, wxID_ANY, _("Show 3D SMD models"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer3DVisibility->Add( m_checkBox3DshapesSMD, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
fgSizer3DVisibility->Add( 0, 0, 0, wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
|
||||
m_bitmap3DshapesVirtual = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer3DVisibility->Add( m_bitmap3DshapesVirtual, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
m_checkBox3DshapesVirtual = new wxCheckBox( this, wxID_ANY, _("Show 3D virtual models"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer3DVisibility->Add( m_checkBox3DshapesVirtual, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizeLeft->Add( fgSizer3DVisibility, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerUpper->Add( bSizeLeft, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_staticlineVertical = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
|
||||
bSizerUpper->Add( m_staticlineVertical, 0, wxEXPAND | wxALL, 5 );
|
||||
|
||||
|
||||
wxBoxSizer* bSizerRight;
|
||||
bSizerRight = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
|
||||
wxBoxSizer* bSizeLayer;
|
||||
bSizeLayer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
m_staticTextBoardLayers = new wxStaticText( this, wxID_ANY, _("Board layers:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextBoardLayers->Wrap( -1 );
|
||||
m_staticTextBoardLayers->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
|
||||
|
||||
|
||||
bSizeLayer->Add( m_staticTextBoardLayers, 0, wxALL, 5 );
|
||||
|
||||
|
||||
wxFlexGridSizer* fgSizerShowBrdLayersOpts;
|
||||
fgSizerShowBrdLayersOpts = new wxFlexGridSizer( 0, 3, 0, 0 );
|
||||
fgSizerShowBrdLayersOpts->SetFlexibleDirection( wxBOTH );
|
||||
fgSizerShowBrdLayersOpts->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
|
||||
|
||||
|
||||
fgSizerShowBrdLayersOpts->Add( 0, 0, 0, wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
|
||||
m_bitmapSilkscreen = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerShowBrdLayersOpts->Add( m_bitmapSilkscreen, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
m_checkBoxSilkscreen = new wxCheckBox( this, wxID_ANY, _("Show silkscreen layers"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerShowBrdLayersOpts->Add( m_checkBoxSilkscreen, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
fgSizerShowBrdLayersOpts->Add( 0, 0, 0, wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
|
||||
m_bitmapSolderMask = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerShowBrdLayersOpts->Add( m_bitmapSolderMask, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
m_checkBoxSolderMask = new wxCheckBox( this, wxID_ANY, _("Show solder mask layers"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerShowBrdLayersOpts->Add( m_checkBoxSolderMask, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
fgSizerShowBrdLayersOpts->Add( 0, 0, 0, wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
|
||||
m_bitmapSolderPaste = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerShowBrdLayersOpts->Add( m_bitmapSolderPaste, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
m_checkBoxSolderpaste = new wxCheckBox( this, wxID_ANY, _("Show solder paste layers"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerShowBrdLayersOpts->Add( m_checkBoxSolderpaste, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
fgSizerShowBrdLayersOpts->Add( 0, 0, 0, wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
|
||||
m_bitmapAdhesive = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerShowBrdLayersOpts->Add( m_bitmapAdhesive, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
m_checkBoxAdhesive = new wxCheckBox( this, wxID_ANY, _("Show adhesive layers"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerShowBrdLayersOpts->Add( m_checkBoxAdhesive, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizeLayer->Add( fgSizerShowBrdLayersOpts, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizeLayer->Add( 0, 10, 0, 0, 5 );
|
||||
|
||||
|
||||
m_staticTextUserLayers = new wxStaticText( this, wxID_ANY, _("User layers (not shown in realistic mode):"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextUserLayers->Wrap( -1 );
|
||||
m_staticTextUserLayers->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
|
||||
|
||||
|
||||
bSizeLayer->Add( m_staticTextUserLayers, 0, wxALL, 5 );
|
||||
|
||||
|
||||
wxFlexGridSizer* fgSizerShowUserLayersOpts;
|
||||
fgSizerShowUserLayersOpts = new wxFlexGridSizer( 0, 3, 0, 0 );
|
||||
fgSizerShowUserLayersOpts->SetFlexibleDirection( wxBOTH );
|
||||
fgSizerShowUserLayersOpts->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
|
||||
|
||||
|
||||
fgSizerShowUserLayersOpts->Add( 0, 0, 0, wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
|
||||
m_bitmapComments = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerShowUserLayersOpts->Add( m_bitmapComments, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
m_checkBoxComments = new wxCheckBox( this, wxID_ANY, _("Show comments and drawings layers"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerShowUserLayersOpts->Add( m_checkBoxComments, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
fgSizerShowUserLayersOpts->Add( 0, 0, 0, wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
|
||||
m_bitmapECO = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerShowUserLayersOpts->Add( m_bitmapECO, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
m_checkBoxECO = new wxCheckBox( this, wxID_ANY, _("Show ECO layers"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerShowUserLayersOpts->Add( m_checkBoxECO, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizeLayer->Add( fgSizerShowUserLayersOpts, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerRight->Add( bSizeLayer, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerUpper->Add( bSizerRight, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerMain->Add( bSizerUpper, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_staticlineH = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
bSizerMain->Add( m_staticlineH, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_sdbSizer = new wxStdDialogButtonSizer();
|
||||
m_sdbSizerOK = new wxButton( this, wxID_OK );
|
||||
m_sdbSizer->AddButton( m_sdbSizerOK );
|
||||
m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
|
||||
m_sdbSizer->AddButton( m_sdbSizerCancel );
|
||||
m_sdbSizer->Realize();
|
||||
|
||||
|
||||
bSizerMain->Add( m_sdbSizer, 0, wxALL|wxALIGN_RIGHT, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
this->SetSizer( bSizerMain );
|
||||
this->Layout();
|
||||
|
||||
bSizerMain->Fit( this );
|
||||
|
||||
this->Centre( wxBOTH );
|
||||
|
||||
|
||||
// Connect Events
|
||||
m_checkBoxRealisticMode->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_3D_VIEW_OPTIONS_BASE::OnCheckRealisticMode ), NULL, this );
|
||||
}
|
||||
@@ -265,5 +266,5 @@ DIALOG_3D_VIEW_OPTIONS_BASE::~DIALOG_3D_VIEW_OPTIONS_BASE()
|
||||
{
|
||||
// Disconnect Events
|
||||
m_checkBoxRealisticMode->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_3D_VIEW_OPTIONS_BASE::OnCheckRealisticMode ), NULL, this );
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jul 11 2018)
|
||||
// C++ code generated with wxFormBuilder (version 3.9.0 Nov 1 2020)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __DIALOG_3D_VIEW_OPTION_BASE_H__
|
||||
#define __DIALOG_3D_VIEW_OPTION_BASE_H__
|
||||
#pragma once
|
||||
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
@@ -37,7 +36,7 @@
|
||||
class DIALOG_3D_VIEW_OPTIONS_BASE : public DIALOG_SHIM
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxStaticText* m_staticText3DRenderOpts;
|
||||
wxStaticBitmap* m_bitmapRealisticMode;
|
||||
@@ -76,16 +75,15 @@ class DIALOG_3D_VIEW_OPTIONS_BASE : public DIALOG_SHIM
|
||||
wxStdDialogButtonSizer* m_sdbSizer;
|
||||
wxButton* m_sdbSizerOK;
|
||||
wxButton* m_sdbSizerCancel;
|
||||
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnCheckRealisticMode( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
DIALOG_3D_VIEW_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("3D Display Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 571,372 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
|
||||
DIALOG_3D_VIEW_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("3D Display Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_3D_VIEW_OPTIONS_BASE();
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif //__DIALOG_3D_VIEW_OPTION_BASE_H__
|
||||
|
||||
@@ -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-2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -22,24 +22,29 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file eda_3d_viewer.cpp
|
||||
* @brief Implements a 3d viewer windows GUI
|
||||
*/
|
||||
|
||||
#include <wx/colordlg.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/filename.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/wupdlock.h>
|
||||
#include <wx/clipbrd.h>
|
||||
#include "eda_3d_viewer.h"
|
||||
|
||||
#include "../3d_viewer_id.h"
|
||||
#include <project.h>
|
||||
#include "../common_ogl/cogl_att_list.h"
|
||||
|
||||
#include <bitmaps.h>
|
||||
#include <dpi_scaling.h>
|
||||
#include <gestfich.h>
|
||||
#include <lru_cache.h>
|
||||
#include <pgm_base.h>
|
||||
#include <project.h>
|
||||
#include <wildcards_and_files_ext.h>
|
||||
|
||||
#include <hotkeys_basic.h>
|
||||
#include <wx/colordlg.h>
|
||||
#include <wx/colourdata.h>
|
||||
#include <lru_cache.h>
|
||||
#include "../common_ogl/cogl_att_list.h"
|
||||
#include <hotkeys_basic.h>
|
||||
#include <wx/toolbar.h>
|
||||
#include <bitmaps.h>
|
||||
#include <pgm_base.h>
|
||||
|
||||
|
||||
/**
|
||||
@@ -162,16 +167,14 @@ EDA_3D_VIEWER::EDA_3D_VIEWER( KIWAY *aKiway, PCB_BASE_FRAME *aParent,
|
||||
|
||||
m_canvas = NULL;
|
||||
m_disable_ray_tracing = false;
|
||||
m_mainToolBar = nullptr;
|
||||
m_AboutTitle = "3D Viewer";
|
||||
|
||||
// Give it an icon
|
||||
wxIcon icon;
|
||||
icon.CopyFromBitmap( KiBitmap( icon_3d_xpm ) );
|
||||
SetIcon( icon );
|
||||
|
||||
bool option;
|
||||
Pgm().CommonSettings()->Read( ENBL_MOUSEWHEEL_PAN_KEY, &option, false );
|
||||
m_settings.SetFlag( FL_MOUSEWHEEL_PANNING, option );
|
||||
|
||||
LoadSettings( config() );
|
||||
SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );
|
||||
|
||||
@@ -190,6 +193,9 @@ EDA_3D_VIEWER::EDA_3D_VIEWER( KIWAY *aKiway, PCB_BASE_FRAME *aParent,
|
||||
if( m_canvas )
|
||||
m_canvas->SetStatusBar( status_bar );
|
||||
|
||||
// Some settings need the canvas
|
||||
loadCommonSettings();
|
||||
|
||||
CreateMenuBar();
|
||||
ReCreateMainToolbar();
|
||||
|
||||
@@ -266,6 +272,7 @@ void EDA_3D_VIEWER::OnCloseWindow( wxCloseEvent &event )
|
||||
event.Skip( true );
|
||||
}
|
||||
|
||||
|
||||
#define ROT_ANGLE 10.0
|
||||
|
||||
void EDA_3D_VIEWER::Process_Special_Functions( wxCommandEvent &event )
|
||||
@@ -287,33 +294,63 @@ void EDA_3D_VIEWER::Process_Special_Functions( wxCommandEvent &event )
|
||||
break;
|
||||
|
||||
case ID_ROTATE3D_X_POS:
|
||||
m_settings.CameraGet().RotateX( glm::radians(ROT_ANGLE) );
|
||||
m_canvas->Request_refresh();
|
||||
m_settings.CameraGet().RotateX( glm::radians( ROT_ANGLE ) );
|
||||
|
||||
if( m_settings.RenderEngineGet() == RENDER_ENGINE_OPENGL_LEGACY )
|
||||
m_canvas->Request_refresh();
|
||||
else
|
||||
m_canvas->RenderRaytracingRequest();
|
||||
|
||||
break;
|
||||
|
||||
case ID_ROTATE3D_X_NEG:
|
||||
m_settings.CameraGet().RotateX( -glm::radians(ROT_ANGLE) );
|
||||
m_canvas->Request_refresh();
|
||||
m_settings.CameraGet().RotateX( -glm::radians( ROT_ANGLE ) );
|
||||
|
||||
if( m_settings.RenderEngineGet() == RENDER_ENGINE_OPENGL_LEGACY )
|
||||
m_canvas->Request_refresh();
|
||||
else
|
||||
m_canvas->RenderRaytracingRequest();
|
||||
|
||||
break;
|
||||
|
||||
case ID_ROTATE3D_Y_POS:
|
||||
m_settings.CameraGet().RotateY( glm::radians(ROT_ANGLE) );
|
||||
m_canvas->Request_refresh();
|
||||
|
||||
if( m_settings.RenderEngineGet() == RENDER_ENGINE_OPENGL_LEGACY )
|
||||
m_canvas->Request_refresh();
|
||||
else
|
||||
m_canvas->RenderRaytracingRequest();
|
||||
|
||||
break;
|
||||
|
||||
case ID_ROTATE3D_Y_NEG:
|
||||
m_settings.CameraGet().RotateY( -glm::radians(ROT_ANGLE) );
|
||||
m_canvas->Request_refresh();
|
||||
|
||||
if( m_settings.RenderEngineGet() == RENDER_ENGINE_OPENGL_LEGACY )
|
||||
m_canvas->Request_refresh();
|
||||
else
|
||||
m_canvas->RenderRaytracingRequest();
|
||||
|
||||
break;
|
||||
|
||||
case ID_ROTATE3D_Z_POS:
|
||||
m_settings.CameraGet().RotateZ( glm::radians(ROT_ANGLE) );
|
||||
m_canvas->Request_refresh();
|
||||
|
||||
if( m_settings.RenderEngineGet() == RENDER_ENGINE_OPENGL_LEGACY )
|
||||
m_canvas->Request_refresh();
|
||||
else
|
||||
m_canvas->RenderRaytracingRequest();
|
||||
|
||||
break;
|
||||
|
||||
case ID_ROTATE3D_Z_NEG:
|
||||
m_settings.CameraGet().RotateZ( -glm::radians(ROT_ANGLE) );
|
||||
m_canvas->Request_refresh();
|
||||
|
||||
if( m_settings.RenderEngineGet() == RENDER_ENGINE_OPENGL_LEGACY )
|
||||
m_canvas->Request_refresh();
|
||||
else
|
||||
m_canvas->RenderRaytracingRequest();
|
||||
|
||||
break;
|
||||
|
||||
case ID_MOVE3D_LEFT:
|
||||
@@ -334,7 +371,11 @@ void EDA_3D_VIEWER::Process_Special_Functions( wxCommandEvent &event )
|
||||
|
||||
case ID_ORTHO:
|
||||
m_settings.CameraGet().ToggleProjection();
|
||||
m_canvas->Request_refresh();
|
||||
|
||||
if( m_settings.RenderEngineGet() == RENDER_ENGINE_OPENGL_LEGACY )
|
||||
m_canvas->Request_refresh();
|
||||
else
|
||||
m_canvas->RenderRaytracingRequest();
|
||||
return;
|
||||
|
||||
case ID_TOOL_SCREENCOPY_TOCLIBBOARD:
|
||||
@@ -642,11 +683,11 @@ void EDA_3D_VIEWER::OnDisableRayTracing( wxCommandEvent& aEvent )
|
||||
}
|
||||
|
||||
|
||||
void EDA_3D_VIEWER::OnActivate( wxActivateEvent &event )
|
||||
void EDA_3D_VIEWER::OnActivate( wxActivateEvent &aEvent )
|
||||
{
|
||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER::OnActivate" );
|
||||
|
||||
if( m_canvas )
|
||||
if( aEvent.GetActive() && m_canvas )
|
||||
{
|
||||
// Reload data if 3D frame shows a board,
|
||||
// because it can be changed since last frame activation
|
||||
@@ -657,17 +698,17 @@ void EDA_3D_VIEWER::OnActivate( wxActivateEvent &event )
|
||||
m_canvas->SetFocus();
|
||||
}
|
||||
|
||||
event.Skip(); // required under wxMAC
|
||||
aEvent.Skip(); // required under wxMAC
|
||||
}
|
||||
|
||||
|
||||
void EDA_3D_VIEWER::OnSetFocus(wxFocusEvent &event)
|
||||
void EDA_3D_VIEWER::OnSetFocus( wxFocusEvent& aEvent )
|
||||
{
|
||||
// Activates again the focus of the canvas so it will catch mouse and key events
|
||||
if( m_canvas )
|
||||
m_canvas->SetFocus();
|
||||
|
||||
event.Skip();
|
||||
aEvent.Skip();
|
||||
}
|
||||
|
||||
|
||||
@@ -726,7 +767,7 @@ void EDA_3D_VIEWER::LoadSettings( wxConfigBase *aCfg )
|
||||
aCfg->Read( keyRenderRAY_Shadows, &tmp, true );
|
||||
m_settings.SetFlag( FL_RENDER_RAYTRACING_SHADOWS, tmp );
|
||||
|
||||
aCfg->Read( keyRenderRAY_Backfloor, &tmp, true );
|
||||
aCfg->Read( keyRenderRAY_Backfloor, &tmp, false );
|
||||
m_settings.SetFlag( FL_RENDER_RAYTRACING_BACKFLOOR, tmp );
|
||||
|
||||
aCfg->Read( keyRenderRAY_Refractions, &tmp, true );
|
||||
@@ -869,6 +910,22 @@ void EDA_3D_VIEWER::SaveSettings( wxConfigBase *aCfg )
|
||||
}
|
||||
|
||||
|
||||
void EDA_3D_VIEWER::CommonSettingsChanged()
|
||||
{
|
||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER::CommonSettingsChanged" );
|
||||
|
||||
// Regen menu bars, etc
|
||||
EDA_BASE_FRAME::CommonSettingsChanged();
|
||||
|
||||
// There is no base class that handles toolbars for this frame
|
||||
ReCreateMainToolbar();
|
||||
|
||||
loadCommonSettings();
|
||||
|
||||
NewDisplay( true );
|
||||
}
|
||||
|
||||
|
||||
void EDA_3D_VIEWER::OnLeftClick( wxDC *DC, const wxPoint &MousePos )
|
||||
{
|
||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER::OnLeftClick" );
|
||||
@@ -934,6 +991,17 @@ void EDA_3D_VIEWER::takeScreenshot( wxCommandEvent& event )
|
||||
|
||||
fullFileName = m_defaultSaveScreenshotFileName.GetFullPath();
|
||||
|
||||
wxFileName fn = fullFileName;
|
||||
|
||||
if( !fn.IsDirWritable() )
|
||||
{
|
||||
wxString msg;
|
||||
|
||||
msg.Printf( _( "Insufficient permissions required to save file\n%s" ), fullFileName );
|
||||
wxMessageBox( msg, _( "Error" ), wxOK | wxICON_ERROR, this );
|
||||
return;
|
||||
}
|
||||
|
||||
// Be sure the screen area destroyed by the file dialog is redrawn
|
||||
// before making a screen copy.
|
||||
// Without this call, under Linux the screen refresh is made to late.
|
||||
@@ -941,7 +1009,7 @@ void EDA_3D_VIEWER::takeScreenshot( wxCommandEvent& event )
|
||||
}
|
||||
|
||||
// Be sure we have the latest 3D view (remember 3D view is buffered)
|
||||
Refresh();
|
||||
m_canvas->Request_refresh( true );
|
||||
wxYield();
|
||||
|
||||
// Build image from the 3D buffer
|
||||
@@ -1225,3 +1293,22 @@ void EDA_3D_VIEWER::OnUpdateUIAxis( wxUpdateUIEvent& aEvent )
|
||||
{
|
||||
aEvent.Check( m_settings.GetFlag( FL_AXIS ) );
|
||||
}
|
||||
|
||||
|
||||
void EDA_3D_VIEWER::loadCommonSettings()
|
||||
{
|
||||
wxCHECK_RET( m_canvas, "Cannot load settings to null canvas" );
|
||||
|
||||
wxConfigBase& cmnCfg = *Pgm().CommonSettings();
|
||||
|
||||
{
|
||||
const DPI_SCALING dpi{ &cmnCfg, this };
|
||||
m_canvas->SetScaleFactor( dpi.GetScaleFactor() );
|
||||
}
|
||||
|
||||
{
|
||||
bool option;
|
||||
cmnCfg.Read( ENBL_MOUSEWHEEL_PAN_KEY, &option, false );
|
||||
m_settings.SetFlag( FL_MOUSEWHEEL_PANNING, option );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,6 +154,15 @@ class EDA_3D_VIEWER : public KIWAY_PLAYER
|
||||
*/
|
||||
bool Set3DSilkScreenColorFromUser();
|
||||
|
||||
/**
|
||||
* Notification that common settings are updated.
|
||||
*
|
||||
* This would be private (and only called by the Kiway), but we
|
||||
* need to do this manually from the PCB frame because the 3D viewer isn't
|
||||
* updated via the #KIWAY.
|
||||
*/
|
||||
void CommonSettingsChanged() override;
|
||||
|
||||
private:
|
||||
/// Called when user press the File->Exit
|
||||
void Exit3DFrame( wxCommandEvent &event );
|
||||
@@ -188,6 +197,9 @@ class EDA_3D_VIEWER : public KIWAY_PLAYER
|
||||
DisplayHotkeyList( this, GetHotkeyConfig() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Equivalent of EDA_DRAW_FRAME::ReCreateHToolbar
|
||||
*/
|
||||
void ReCreateMainToolbar();
|
||||
|
||||
void SetToolbars();
|
||||
@@ -217,6 +229,11 @@ class EDA_3D_VIEWER : public KIWAY_PLAYER
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* Load configuration from common settings.
|
||||
*/
|
||||
void loadCommonSettings();
|
||||
|
||||
/**
|
||||
* Filename to propose for save a screenshot
|
||||
*/
|
||||
|
||||
@@ -103,6 +103,8 @@ enum id_3dview_frm
|
||||
|
||||
ID_DISABLE_RAY_TRACING,
|
||||
|
||||
ID_CUSTOM_EVENT_1, // A id for a custom event (canvas refresh request)
|
||||
|
||||
ID_POPUP_3D_VIEW_START,
|
||||
ID_POPUP_ZOOMIN,
|
||||
ID_POPUP_ZOOMOUT,
|
||||
|
||||
@@ -46,9 +46,10 @@ Russell Oliver <roliver8143[at]gmail-dot-com>
|
||||
Seth Hillbrand <hillbrand[at]ucdavis-dot-edu>
|
||||
Jeff Young <jeff[at]rokeby-dot-ie>
|
||||
Kevin Cozens <kevin[at]ve3syb-dot-ca>
|
||||
Ian McInerney <ian.s.mcinerney[at]ieee-dot-org>
|
||||
|
||||
See git repo on launchpad for contributors at
|
||||
https://code.launchpad.net/~kicad-product-committers/kicad/+git/product-git/+ref/master.
|
||||
See git repo on GitLab for contributors at
|
||||
https://gitlab.com/kicad/code/kicad/-/graphs/master
|
||||
|
||||
|
||||
== Document Writers
|
||||
@@ -75,6 +76,7 @@ Spanish (ES) Pedro Martin del Valle <pkicad[at]yahoo-dot-es>
|
||||
Spanish (ES) Iñigo Zuluaga <inigo_zuluaga[at]yahoo-dot-es>
|
||||
German (DE) Rafael Sokolowski <Rafael.Sokolowski[at]web-dot-de
|
||||
Japanese (JA) Kenta Yonekura <yoneken[at]kicad-dot-jp>
|
||||
Simplified Chinese (zh_CN) taotieren <admin[at]taotieren-dot-com>
|
||||
|
||||
Remy Halvick, David Briscoe, Dominique Laigle, Paul Burke
|
||||
|
||||
|
||||
@@ -21,14 +21,7 @@
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
#
|
||||
|
||||
cmake_minimum_required( VERSION 2.8.12 FATAL_ERROR )
|
||||
# because of http://public.kitware.com/Bug/view.php?id=10395
|
||||
|
||||
# See https://gitlab.kitware.com/cmake/cmake/issues/15943
|
||||
# Remove as soon as 3.1 is minimum required version
|
||||
if(POLICY CMP0025)
|
||||
cmake_policy(SET CMP0025 NEW) # CMake 3.0
|
||||
endif()
|
||||
cmake_minimum_required( VERSION 3.2 FATAL_ERROR )
|
||||
|
||||
# Default to CMAKE_BUILD_TYPE = Release unless overridden on command line
|
||||
# http://www.cmake.org/pipermail/cmake/2008-September/023808.html
|
||||
@@ -102,28 +95,43 @@ option( KICAD_INSTALL_DEMOS
|
||||
"Install KiCad demos and examples (default ON)"
|
||||
ON )
|
||||
|
||||
option( KICAD_BUILD_QA_TESTS
|
||||
"Build software Quality assurance unit tests (default ON)"
|
||||
ON )
|
||||
|
||||
option( BUILD_GITHUB_PLUGIN
|
||||
"Build the GITHUB_PLUGIN for pcbnew."
|
||||
ON )
|
||||
|
||||
option( KICAD_SPICE
|
||||
"Build KiCad with internal Spice simulator."
|
||||
ON )
|
||||
|
||||
# when option KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES is enabled:
|
||||
# PYTHON_EXECUTABLE can be defined when invoking cmake
|
||||
# ( use -DPYTHON_EXECUTABLE=<python path>/python.exe or python2 )
|
||||
# when not defined by user, the default is python.exe under Windows and python2 for others
|
||||
# python binary file should be in exec path.
|
||||
|
||||
# KICAD_SCRIPTING_MODULES requires KICAD_SCRIPTING enable it here if KICAD_SCRIPTING_MODULES is ON
|
||||
if ( KICAD_SCRIPTING_MODULES AND NOT KICAD_SCRIPTING )
|
||||
message(STATUS "Changing KICAD_SCRIPTING to ON as needed by KICAD_SCRIPTING_MODULES")
|
||||
set ( KICAD_SCRIPTING ON )
|
||||
# KICAD_SCRIPTING controls the entire python scripting system. If it is off, no other scripting
|
||||
# functions are available.
|
||||
if ( NOT KICAD_SCRIPTING )
|
||||
message( STATUS "KICAD_SCRIPTING is OFF: Disabling all python scripting support" )
|
||||
set( KICAD_SCRIPTING_MODULES OFF )
|
||||
set( KICAD_SCRIPTING_ACTION_MENU OFF )
|
||||
set( KICAD_SCRIPTING_PYTHON3 OFF )
|
||||
set( KICAD_SCRIPTING_WXPYTHON OFF )
|
||||
set( KICAD_SCRIPTING_WXPYTHON_PHOENIX OFF)
|
||||
endif()
|
||||
|
||||
# same with KICAD_SCRIPTING_ACTION_MENUS
|
||||
if ( KICAD_SCRIPTING_ACTION_MENU AND NOT KICAD_SCRIPTING )
|
||||
message(STATUS "Changing KICAD_SCRIPTING to ON as needed by KICAD_SCRIPTING_ACTION_MENU")
|
||||
set ( KICAD_SCRIPTING ON )
|
||||
# KICAD_SCRIPTING_WXPYTHON_PHOENIX requires enabling the KICAD_SCRIPTING_WXPYTHON flag
|
||||
# so that the wxWidgets library is properly versioned
|
||||
if ( KICAD_SCRIPTING AND NOT KICAD_SCRIPTING_WXPYTHON AND KICAD_SCRIPTING_WXPYTHON_PHOENIX )
|
||||
message( STATUS
|
||||
"KICAD_SCRIPTING_WXPYTHON_PHOENIX has been requested, setting KICAD_SCRIPTING_WXPYTHON to ON")
|
||||
set( KICAD_SCRIPTING_WXPYTHON ON)
|
||||
endif()
|
||||
|
||||
option( BUILD_GITHUB_PLUGIN "Build the GITHUB_PLUGIN for pcbnew." ON )
|
||||
|
||||
option( KICAD_SPICE "Build KiCad with internal Spice simulator." ON )
|
||||
|
||||
# Global setting: exports are explicit
|
||||
set( CMAKE_CXX_VISIBILITY_PRESET "hidden" )
|
||||
set( CMAKE_VISIBILITY_INLINES_HIDDEN ON )
|
||||
@@ -185,24 +193,6 @@ include( PerformFeatureChecks )
|
||||
perform_feature_checks()
|
||||
|
||||
|
||||
# Workaround: CMake < 3.1 does not support CMAKE_CXX_STANDARD
|
||||
if( NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 3.1 )
|
||||
message( FATAL_ERROR "Remove compatibility code" )
|
||||
endif()
|
||||
|
||||
if( CMAKE_VERSION VERSION_LESS 3.1 AND ( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) )
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
|
||||
|
||||
if(COMPILER_SUPPORTS_CXX11)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
else()
|
||||
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
# Warn about missing override specifiers, if supported
|
||||
if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
|
||||
include(CheckCXXCompilerFlag)
|
||||
@@ -398,7 +388,7 @@ endif()
|
||||
if( KICAD_USE_OCC )
|
||||
add_definitions( -DKICAD_USE_OCC )
|
||||
remove_definitions( -DKICAD_USE_OCE )
|
||||
unset( KICAD_USE_OCE )
|
||||
unset( KICAD_USE_OCE CACHE )
|
||||
endif()
|
||||
|
||||
if( KICAD_USE_CUSTOM_PADS )
|
||||
@@ -655,8 +645,9 @@ set( INC_AFTER
|
||||
${CMAKE_BINARY_DIR}
|
||||
)
|
||||
|
||||
|
||||
#
|
||||
# Find Python and other scripting resources
|
||||
#
|
||||
if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES )
|
||||
|
||||
# SWIG 3.0 or later require for C++11 support.
|
||||
@@ -714,19 +705,36 @@ if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES )
|
||||
find_package( PythonLibs 2.6 REQUIRED )
|
||||
endif()
|
||||
|
||||
if( KICAD_SCRIPTING_WXPYTHON )
|
||||
find_package( wxPython REQUIRED )
|
||||
message( STATUS "Found ${WXPYTHON_FLAVOR} "
|
||||
"${WXPYTHON_VERSION}/${WXPYTHON_TOOLKIT} "
|
||||
"(wxWidgets ${WXPYTHON_WXVERSION})" )
|
||||
endif()
|
||||
|
||||
# Infrequently needed headers go at end of search paths, append to INC_AFTER which
|
||||
# although is used for all components, should be a harmless hit for something like eeschema
|
||||
# so long as unused search paths are at the end like this.
|
||||
set( INC_AFTER ${INC_AFTER} ${PYTHON_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/scripting )
|
||||
endif()
|
||||
|
||||
# Find the wxPython installation if requested
|
||||
if( KICAD_SCRIPTING_WXPYTHON )
|
||||
find_package( wxPython REQUIRED )
|
||||
|
||||
if( KICAD_SCRIPTING_WXPYTHON_PHOENIX AND WXPYTHON_VERSION VERSION_LESS 4.0.0 )
|
||||
message( FATAL_ERROR
|
||||
"Unable to find wxPython Phoenix,"
|
||||
" instead found wxPython Classic ${WXPYTHON_VERSION}" )
|
||||
endif()
|
||||
|
||||
# The test VERSION_GREATER_EQUAL is only available in cmake >3.7, so use the max possible
|
||||
# version for the 3.0 line as the basis of the comparison
|
||||
if( NOT KICAD_SCRIPTING_WXPYTHON_PHOENIX AND WXPYTHON_VERSION VERSION_GREATER 3.9.999 )
|
||||
message( FATAL_ERROR
|
||||
"Unable to find wxPython Classic,"
|
||||
" instead found wxPython Phoenix ${WXPYTHON_VERSION}" )
|
||||
endif()
|
||||
|
||||
message( STATUS "Found ${WXPYTHON_FLAVOR} "
|
||||
"${WXPYTHON_VERSION}/${WXPYTHON_TOOLKIT} "
|
||||
"(wxWidgets ${WXPYTHON_WXVERSION})" )
|
||||
endif()
|
||||
|
||||
|
||||
#
|
||||
# Find wxWidgets library, required
|
||||
#
|
||||
@@ -861,6 +869,16 @@ add_custom_target( uninstall
|
||||
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" )
|
||||
|
||||
|
||||
#################################################
|
||||
# Generate platform metadata files
|
||||
#################################################
|
||||
if( APPLE )
|
||||
include( ${CMAKE_MODULE_PATH}/WritePlatformMetadata_macos.cmake )
|
||||
elseif( UNIX )
|
||||
include( ${CMAKE_MODULE_PATH}/WritePlatformMetadata_linux.cmake )
|
||||
endif()
|
||||
|
||||
|
||||
#================================================
|
||||
# Installation
|
||||
#================================================
|
||||
@@ -886,7 +904,7 @@ if( UNIX AND NOT APPLE )
|
||||
set( UNIX_MIME_FILES ${UNIX_MIME_DIR}/mime )
|
||||
set( UNIX_ICON_FILES ${UNIX_MIME_DIR}/icons )
|
||||
set( UNIX_APPLICATIONS_FILES ${UNIX_MIME_DIR}/applications )
|
||||
set( UNIX_APPDATA_FILES resources/linux/appdata )
|
||||
set( UNIX_APPDATA_FILES ${PROJECT_BINARY_DIR}/resources/linux/appdata )
|
||||
|
||||
# Install Mime directory
|
||||
install( DIRECTORY ${UNIX_ICON_FILES}
|
||||
@@ -910,6 +928,9 @@ if( UNIX AND NOT APPLE )
|
||||
install( DIRECTORY ${UNIX_APPDATA_FILES}
|
||||
DESTINATION share
|
||||
COMPONENT resources
|
||||
FILES_MATCHING
|
||||
PATTERN "*appdata.xml"
|
||||
PATTERN "*.in" EXCLUDE
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -955,7 +976,10 @@ add_subdirectory( plugins ) # 3D plugins must be built before kicad
|
||||
add_subdirectory( kicad ) # should follow pcbnew, eeschema
|
||||
add_subdirectory( tools )
|
||||
add_subdirectory( utils )
|
||||
add_subdirectory( qa )
|
||||
|
||||
if( KICAD_BUILD_QA_TESTS )
|
||||
add_subdirectory( qa )
|
||||
endif()
|
||||
|
||||
# Resources
|
||||
if ( KICAD_INSTALL_DEMOS )
|
||||
|
||||
@@ -27,6 +27,8 @@ macro( create_git_version_header _git_src_path )
|
||||
find_package( Git )
|
||||
|
||||
if( GIT_FOUND )
|
||||
message( STATUS "Using Git to determine build version string." )
|
||||
|
||||
set( _Git_SAVED_LC_ALL "$ENV{LC_ALL}" )
|
||||
set( ENV{LC_ALL} C )
|
||||
|
||||
|
||||
@@ -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.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
|
||||
set(_PYTHON3_VERSIONS 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
|
||||
|
||||
if(PythonInterp_FIND_VERSION)
|
||||
if(PythonInterp_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
|
||||
|
||||
@@ -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.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
|
||||
set(_PYTHON3_VERSIONS 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]+.*)?$")
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
find_program(SWIG_EXECUTABLE NAMES swig3.0 swig2.0 swig)
|
||||
find_program(SWIG_EXECUTABLE NAMES swig4.0 swig3.0 swig2.0 swig)
|
||||
|
||||
if(SWIG_EXECUTABLE)
|
||||
execute_process(COMMAND ${SWIG_EXECUTABLE} -swiglib
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
# CMake script for finding libngspice
|
||||
|
||||
# Copyright (C) 2016 CERN
|
||||
# Copyright (C) 2020 Kicad Developers, see AUTHORS.txt for contributors.
|
||||
#
|
||||
# Author: Maciej Suminski <maciej.suminski@cern.ch>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
@@ -20,20 +22,103 @@
|
||||
# or you may write to the Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
# Usage:
|
||||
#
|
||||
# ngspice uses pkg-config to gather the configuration information so the pkg-config
|
||||
# information is used to populate the CMake find_* commands. When pkg-config is not
|
||||
# available, the fallback is the default platform search paths set up by CMake. The
|
||||
# default search paths can be overridden by user. The order of precedence is as
|
||||
# follows:
|
||||
#
|
||||
# User defined root path NGSPICE_ROOT_DIR on CMake command line.
|
||||
# User defined root path environment variable NGSPICE_ROOT_DIR.
|
||||
# Paths generated by pkg-config.
|
||||
# The default system paths configured by CMake
|
||||
#
|
||||
# For a specific ngspice include path not defined above set NGSPICE_INCLUDE_PATH.
|
||||
#
|
||||
# For a specific ngspice library path not defined above set NGSPICE_LIBRARY_PATH.
|
||||
|
||||
# Use pkg-config if it's available.
|
||||
find_package(PkgConfig)
|
||||
|
||||
if( PKG_CONFIG_FOUND )
|
||||
pkg_check_modules( _NGSPICE ngspice )
|
||||
|
||||
if( _NGSPICE_FOUND )
|
||||
set( NGSPICE_BUILD_VERSION "${_NGSPICE_VERSION}" CACHE STRING
|
||||
"ngspice version returned by pkg-config" )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
find_path( NGSPICE_INCLUDE_DIR ngspice/sharedspice.h
|
||||
PATHS ${NGSPICE_ROOT_DIR} $ENV{NGSPICE_ROOT_DIR} ${NGSPICE_INCLUDE_PATH}
|
||||
PATH_SUFFIXES src/include share/ngspice/include share/ngspice/include/ngspice
|
||||
PATHS
|
||||
${NGSPICE_ROOT_DIR}
|
||||
$ENV{NGSPICE_ROOT_DIR}
|
||||
${NGSPICE_INCLUDE_PATH}
|
||||
${_NGSPICE_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
src/include
|
||||
share/ngspice/include
|
||||
share/ngspice/include/ngspice
|
||||
)
|
||||
|
||||
find_library( NGSPICE_LIBRARY ngspice
|
||||
PATHS ${NGSPICE_ROOT_DIR} $ENV{NGSPICE_ROOT_DIR} ${NGSPICE_LIBRARY_PATH}
|
||||
PATH_SUFFIXES src/.libs lib
|
||||
PATHS
|
||||
${NGSPICE_ROOT_DIR}
|
||||
$ENV{NGSPICE_ROOT_DIR}
|
||||
${NGSPICE_LIBRARY_PATH}
|
||||
${_NGSPICE_LIBRARY_DIRS}
|
||||
PATH_SUFFIXES
|
||||
src/.libs
|
||||
lib
|
||||
)
|
||||
|
||||
# If the ngspice version is not set by pkg-config, see if ngspice/config.h is available.
|
||||
if( NOT NGSPICE_BUILD_VERSION )
|
||||
find_file( NGSPICE_CONFIG_H ngspice/config.h
|
||||
PATHS
|
||||
${NGSPICE_ROOT_DIR}
|
||||
$ENV{NGSPICE_ROOT_DIR}
|
||||
${NGSPICE_INCLUDE_PATH}
|
||||
${_NGSPICE_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
src/include
|
||||
share/ngspice/include
|
||||
share/ngspice/include/ngspice
|
||||
)
|
||||
|
||||
if( NOT NGSPICE_CONFIG_H-NOTFOUND )
|
||||
message( STATUS "ngspice configuration file ${NGSPICE_CONFIG_H} found." )
|
||||
set( NGSPICE_HAVE_CONFIG_H "1" CACHE STRING "ngspice/config.h header found." )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if( WIN32 AND MSYS )
|
||||
# NGSPICE_LIBRARY points to libngspice.dll.a on Windows,
|
||||
# but the goal is to find out the DLL name.
|
||||
find_library( NGSPICE_DLL NAMES libngspice-0.dll libngspice-1.dll )
|
||||
|
||||
# Some msys versions do not find xxx.dll lib files, only xxx.dll.a files
|
||||
# so try a find_file in exec paths
|
||||
if( NGSPICE_DLL STREQUAL "NGSPICE_DLL-NOTFOUND" )
|
||||
find_file( NGSPICE_DLL NAMES libngspice-0.dll libngspice-1.dll
|
||||
PATHS
|
||||
${NGSPICE_ROOT_DIR}
|
||||
PATH_SUFFIXES
|
||||
bin
|
||||
lib
|
||||
)
|
||||
endif()
|
||||
|
||||
if( NGSPICE_DLL STREQUAL "NGSPICE_DLL-NOTFOUND" )
|
||||
message( ERROR ":\n***** libngspice-x.dll not found in any executable path *****\n\n" )
|
||||
else()
|
||||
message( STATUS ": libngspice shared lib found: ${NGSPICE_DLL}\n" )
|
||||
endif()
|
||||
else()
|
||||
set( NGSPICE_DLL "${NGSPICE_LIBRARY}" )
|
||||
endif()
|
||||
@@ -61,4 +146,6 @@ mark_as_advanced(
|
||||
NGSPICE_INCLUDE_DIR
|
||||
NGSPICE_LIBRARY
|
||||
NGSPICE_DLL
|
||||
NGSPICE_BUILD_VERSION
|
||||
NGSPIC_HAVE_CONFIG_H
|
||||
)
|
||||
|
||||
@@ -25,9 +25,13 @@
|
||||
# Function make_lexer
|
||||
# is a standard way to invoke TokenList2DsnLexer.cmake.
|
||||
# Extra arguments are treated as source files which depend on the generated
|
||||
# outHeaderFile
|
||||
# files. Some detail here on the indirection:
|
||||
# - Parallel builds all depend on the same files, and CMake will generate the same file multiple times in the same location.
|
||||
# This can be problematic if the files are generated at the same time and overwrite each other.
|
||||
# - To fix this, we create a custom target (outputTarget) that the parallel builds depend on.
|
||||
# AND build dependencies. This creates the needed rebuild for appropriate source object changes.
|
||||
function( make_lexer outputTarget inputFile outHeaderFile outCppFile enum )
|
||||
|
||||
function( make_lexer inputFile outHeaderFile outCppFile enum )
|
||||
add_custom_command(
|
||||
OUTPUT ${outHeaderFile}
|
||||
${outCppFile}
|
||||
@@ -37,14 +41,17 @@ function( make_lexer inputFile outHeaderFile outCppFile enum )
|
||||
-DoutHeaderFile=${outHeaderFile}
|
||||
-DoutCppFile=${outCppFile}
|
||||
-P ${CMAKE_MODULE_PATH}/TokenList2DsnLexer.cmake
|
||||
DEPENDS ${inputFile}
|
||||
${CMAKE_MODULE_PATH}/TokenList2DsnLexer.cmake
|
||||
COMMENT "TokenList2DsnLexer.cmake creating:
|
||||
${outHeaderFile} and
|
||||
${outCppFile} from
|
||||
${inputFile}"
|
||||
)
|
||||
|
||||
add_custom_target( ${outputTarget}
|
||||
DEPENDS ${outHeaderFile} ${outCppFile}
|
||||
${CMAKE_MODULE_PATH}/TokenList2DsnLexer.cmake
|
||||
)
|
||||
|
||||
# extra_args, if any, are treated as source files (typically headers) which
|
||||
# are known to depend on the generated outHeader.
|
||||
foreach( extra_arg ${ARGN} )
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
#
|
||||
# This program source code file is part of KICAD, a free EDA CAD application.
|
||||
#
|
||||
# Copyright (C) 2019 Ian McInerney <Ian.S.McInerney@ieee.org>
|
||||
# Copyright (C) 2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, you may find one here:
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
# or you may search the http://www.gnu.org website for the version 2 license,
|
||||
# or you may write to the Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
#
|
||||
|
||||
# This file will create the full KiCad version string. The base of this string
|
||||
# will be either the git tag followed by the commit hash (if built inside a git
|
||||
# repository), or the version from KiCadVersion.cmake. The user-provided
|
||||
# KICAD_VERSION_EXTRA is then appended to the base version string.
|
||||
|
||||
# Use git to determine the version string if it's available.
|
||||
include( ${CMAKE_MODULE_PATH}/CreateGitVersionHeader.cmake )
|
||||
create_git_version_header( ${SRC_PATH} )
|
||||
|
||||
# $KICAD_VERSION is set in KiCadVersion.cmake or by git (if it is available).
|
||||
set( KICAD_VERSION_FULL "${KICAD_VERSION}" )
|
||||
|
||||
# Optional user version information defined at configuration.
|
||||
if( KICAD_VERSION_EXTRA )
|
||||
set( KICAD_VERSION_FULL "${KICAD_VERSION_FULL}-${KICAD_VERSION_EXTRA}" )
|
||||
endif()
|
||||
@@ -1,38 +1,38 @@
|
||||
#
|
||||
# This program source code file is part of KICAD, a free EDA CAD application.
|
||||
#
|
||||
#
|
||||
# This program source code file is part of KICAD, a free EDA CAD application.
|
||||
#
|
||||
# Copyright (C) 2016 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
# Copyright (C) 2016 - 2018 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, you may find one here:
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
# or you may search the http://www.gnu.org website for the version 2 license,
|
||||
# or you may write to the Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
#
|
||||
|
||||
# Note: unless you are the person responsible for creating releases,
|
||||
# do *not* change these variables. This way the KiCad project
|
||||
# can maintain control over what is an official KiCad build and
|
||||
# what is not. Setting these variable that conflict with KiCad
|
||||
# releases is a shooting offense.
|
||||
#
|
||||
# This file gets included in the WriteVersionHeader.cmake file to set
|
||||
# Copyright (C) 2016 - 2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, you may find one here:
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
# or you may search the http://www.gnu.org website for the version 2 license,
|
||||
# or you may write to the Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
#
|
||||
|
||||
# Note: unless you are the person responsible for creating releases,
|
||||
# do *not* change these variables. This way the KiCad project
|
||||
# can maintain control over what is an official KiCad build and
|
||||
# what is not. Setting these variable that conflict with KiCad
|
||||
# releases is a shooting offense.
|
||||
#
|
||||
# This file gets included in the WriteVersionHeader.cmake file to set
|
||||
# the default KiCad version when the source is provided in an archive
|
||||
# file or git is not available on the build system. When KiCad is
|
||||
# cloned using git, the git version is used. This version string should
|
||||
# be set after each version tag is added to the git repo. This will
|
||||
# give developers a reasonable idea where which branch was used to build
|
||||
# KiCad.
|
||||
set( KICAD_VERSION "5.1.0" )
|
||||
set( KICAD_VERSION "5.1.10" )
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
#
|
||||
# This program source code file is part of KICAD, a free EDA CAD application.
|
||||
#
|
||||
# Copyright (C) 2019 Ian McInerney <Ian.S.McInerney@ieee.org>
|
||||
# Copyright (C) 2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, you may find one here:
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
# or you may search the http://www.gnu.org website for the version 2 license,
|
||||
# or you may write to the Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
#
|
||||
|
||||
# This file will configure the linux appdata.xml file to include the version
|
||||
# and build date.
|
||||
|
||||
message( STATUS "Creating linux metadata" )
|
||||
|
||||
# Create the KiCad version strings
|
||||
set( SRC_PATH ${PROJECT_SOURCE_DIR} )
|
||||
include( ${CMAKE_MODULE_PATH}/KiCadVersion.cmake )
|
||||
include( ${CMAKE_MODULE_PATH}/KiCadFullVersion.cmake )
|
||||
|
||||
# Create the date of the configure
|
||||
string( TIMESTAMP KICAD_CONFIG_TIMESTAMP "%Y-%m-%d" )
|
||||
|
||||
# Configure the KiCad appdata file
|
||||
configure_file( ${PROJECT_SOURCE_DIR}/resources/linux/appdata/kicad.appdata.xml.in
|
||||
${PROJECT_BINARY_DIR}/resources/linux/appdata/kicad.appdata.xml
|
||||
@ONLY )
|
||||
|
||||
# Ensure the file was configured successfully
|
||||
if( NOT EXISTS ${PROJECT_BINARY_DIR}/resources/linux/appdata/kicad.appdata.xml )
|
||||
message( FATAL_ERROR "Configuration failed to write file kicad.appdata.xml." )
|
||||
endif()
|
||||
@@ -0,0 +1,63 @@
|
||||
#
|
||||
# This program source code file is part of KICAD, a free EDA CAD application.
|
||||
#
|
||||
# Copyright (C) 2019 Ian McInerney <Ian.S.McInerney@ieee.org>
|
||||
# Copyright (C) 2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, you may find one here:
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
# or you may search the http://www.gnu.org website for the version 2 license,
|
||||
# or you may write to the Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
#
|
||||
|
||||
# This file will configure the MacOS info.plist files to include the version
|
||||
# and build date.
|
||||
|
||||
message( STATUS "Creating MacOS metadata" )
|
||||
|
||||
# Create the KiCad version strings
|
||||
set( SRC_PATH ${PROJECT_SOURCE_DIR} )
|
||||
include( ${CMAKE_MODULE_PATH}/KiCadVersion.cmake )
|
||||
include( ${CMAKE_MODULE_PATH}/KiCadFullVersion.cmake )
|
||||
|
||||
|
||||
# Configure each plist file from the respurces directory and store it in the build directory
|
||||
configure_file( ${PROJECT_SOURCE_DIR}/resources/macos/plist/bitmap2component.Info.plist.in
|
||||
${PROJECT_BINARY_DIR}/bitmap2component/Info.plist
|
||||
@ONLY )
|
||||
|
||||
configure_file( ${PROJECT_SOURCE_DIR}/resources/macos/plist/eeschema.Info.plist.in
|
||||
${PROJECT_BINARY_DIR}/eeschema/Info.plist
|
||||
@ONLY )
|
||||
|
||||
configure_file( ${PROJECT_SOURCE_DIR}/resources/macos/plist/gerbview.Info.plist.in
|
||||
${PROJECT_BINARY_DIR}/gerbview/Info.plist
|
||||
@ONLY )
|
||||
|
||||
configure_file( ${PROJECT_SOURCE_DIR}/resources/macos/plist/kicad.Info.plist.in
|
||||
${PROJECT_BINARY_DIR}/kicad/Info.plist
|
||||
@ONLY )
|
||||
|
||||
configure_file( ${PROJECT_SOURCE_DIR}/resources/macos/plist/pcb_calculator.Info.plist.in
|
||||
${PROJECT_BINARY_DIR}/pcb_calculator/Info.plist
|
||||
@ONLY )
|
||||
|
||||
configure_file( ${PROJECT_SOURCE_DIR}/resources/macos/plist/pcbnew.Info.plist.in
|
||||
${PROJECT_BINARY_DIR}/pcbnew/Info.plist
|
||||
@ONLY )
|
||||
|
||||
configure_file( ${PROJECT_SOURCE_DIR}/resources/macos/plist/pleditor.Info.plist.in
|
||||
${PROJECT_BINARY_DIR}/pagelayout_editor/Info.plist
|
||||
@ONLY )
|
||||
@@ -22,25 +22,9 @@
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
#
|
||||
|
||||
# Automagically create version header file if the version string was
|
||||
# not defined during the build configuration. If CreateGitVersionHeader
|
||||
# cannot determine the current repo version, a version.h file is still
|
||||
# created with KICAD_VERSION set in KiCadVersion.cmake.
|
||||
# Create the KiCad version strings
|
||||
include( ${CMAKE_MODULE_PATH}/KiCadVersion.cmake )
|
||||
|
||||
# Always use git if it's available to determine the version string.
|
||||
message( STATUS "Using Git to determine build version string." )
|
||||
include( ${CMAKE_MODULE_PATH}/CreateGitVersionHeader.cmake )
|
||||
create_git_version_header( ${SRC_PATH} )
|
||||
|
||||
# $KICAD_VERSION will always be set to something. Even if it is the default
|
||||
# value set in KiCadVersion.cmake
|
||||
set( KICAD_VERSION_FULL "${KICAD_VERSION}" )
|
||||
|
||||
# Optional user version information defined at configuration.
|
||||
if( KICAD_VERSION_EXTRA )
|
||||
set( KICAD_VERSION_FULL "${KICAD_VERSION_FULL}-${KICAD_VERSION_EXTRA}" )
|
||||
endif()
|
||||
include( ${CMAKE_MODULE_PATH}/KiCadFullVersion.cmake )
|
||||
|
||||
set( _wvh_new_version_text
|
||||
"/* Do not modify this file, it was automatically generated by CMake. */
|
||||
|
||||
@@ -75,4 +75,10 @@
|
||||
/// Allows scripts install directory to be referenced by the program code.
|
||||
#define PYTHON_DEST "@PYTHON_DEST@"
|
||||
|
||||
/// ngspice version string detected by pkg-config when available.
|
||||
#cmakedefine NGSPICE_BUILD_VERSION "@NGSPICE_BUILD_VERSION@"
|
||||
|
||||
/// When pkg-config config is not available for ngspice, use ngspice/config.h for version.
|
||||
#cmakedefine NGSPICE_HAVE_CONFIG_H
|
||||
|
||||
#endif // CONFIG_H_
|
||||
|
||||
@@ -70,20 +70,43 @@ Set the `git clang-format` tool to use the provided `_clang-format` file:
|
||||
|
||||
git config clangFormat.style file
|
||||
|
||||
Then, to enable the format checker, set the `KICAD_CHECK_FORMAT` environment
|
||||
variable in your shell. Without this variable, the format checker will not
|
||||
run on commit, but you can still use `git clang-format --diff` to check manually.
|
||||
Then, to enable the format checker, set the `kicad.check-format` Git config
|
||||
to "true" for the KiCad repo:
|
||||
|
||||
If enabled, when you commit a change, you will be told if you have caused any
|
||||
style violations (only in your changed code). You can fix them automatically
|
||||
with:
|
||||
git config kicad.check-format true
|
||||
|
||||
git clang-format
|
||||
Without this config, the format checker will not run on commit, but you can
|
||||
still check files staged for commit manually (see below).
|
||||
|
||||
Or you can proceed anyway, if you are sure your style is correct:
|
||||
If the hook is enabled, when you commit a change, you will be told if you
|
||||
have caused any style violations (only in your changed code). You can then fix
|
||||
the errors, either manually, or with the tools below.
|
||||
|
||||
If you are warned about formatting errors, but you are sure your style is correct,
|
||||
you can still commit:
|
||||
|
||||
git commit --no-verify
|
||||
|
||||
### Correcting Formatting Errors ## {#correcting-formatting-errors}
|
||||
|
||||
There is a Git aliases file that provides the right commands to show and correct
|
||||
formatting errors. Add to your repository config by running this command from
|
||||
the source directory:
|
||||
|
||||
git config --add include.path $(pwd)/helpers/git/format_alias
|
||||
|
||||
Then you can use the following aliases:
|
||||
|
||||
* `git check-format`: show any formatting warnings (but make no changes)
|
||||
* `git fix-format`: correct formatting (you will need to `git add` afterwards)
|
||||
|
||||
These aliases use a script, `tools/check-coding.sh`, which takes care of only
|
||||
checking the formatting for files that should be formatted. This script has
|
||||
other uses:
|
||||
|
||||
* Make (or see only) violations in files modified in the previous commit (useful
|
||||
when interactive-rebasing):
|
||||
* `check_coding.sh --amend [--diff]`
|
||||
|
||||
# 2. Naming Conventions # {#naming_conventions}
|
||||
Before delving into anything as esoteric as indentation and formatting,
|
||||
@@ -456,6 +479,20 @@ The case statement is to be indented to the same level as the switch.
|
||||
}
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
It is permitted to place all cases on a single line each, if that makes the
|
||||
code more readable. This is often done for look-ups or translation functions. In
|
||||
this case, you will have to manually align for readability as appropriate and
|
||||
reject clang-format's suggested changes, if you use it:
|
||||
|
||||
~~~~~~~~~~~~~{.cpp}
|
||||
switch( m_orientation )
|
||||
{
|
||||
case PIN_RIGHT: m_orientation = PIN_UP; break;
|
||||
case PIN_UP: m_orientation = PIN_LEFT; break;
|
||||
case PIN_LEFT: m_orientation = PIN_DOWN; break;
|
||||
case PIN_DOWN: m_orientation = PIN_RIGHT; break;
|
||||
}
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
# 5. License Statement # {#license_statement}
|
||||
There is a the file copyright.h which you can copy into the top of
|
||||
@@ -824,6 +861,6 @@ learn something new.
|
||||
|
||||
[clang-format]: https://clang.llvm.org/docs/ClangFormat.html
|
||||
[cppstandard]:http://www.possibility.com/Cpp/CppCodingStandard.html
|
||||
[kernel]:http://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/Documentation/CodingStyle
|
||||
[kernel]:https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/process/coding-style.rst
|
||||
[overloading]:http://www.cs.caltech.edu/courses/cs11/material/cpp/donnie/cpp-ops.html
|
||||
[style]:http://en.wikipedia.org/wiki/Programming_style
|
||||
|
||||
@@ -149,27 +149,40 @@ on macOS. This is enabled on macOS by default and disabled on all other platfor
|
||||
## Scripting Support ## {#scripting_opt}
|
||||
|
||||
The KICAD_SCRIPTING option is used to enable building the Python scripting support into Pcbnew.
|
||||
This options is enabled by default.
|
||||
This options is enabled by default, and will disable all other KICAD_SCRIPTING_* options when
|
||||
it is disabled.
|
||||
|
||||
## Python 3 Scripting Support ## {#python3}
|
||||
|
||||
The KICAD_SCRIPTING_PYTHON3 option is used to enable using Python 3 for the scripting support
|
||||
instead of Python 2. This option is disabled by default and only is relevant if
|
||||
[KICAD_SCRIPTING](#scripting_opt) is enabled.
|
||||
|
||||
## Scripting Module Support ## {#scripting_mod_opt}
|
||||
|
||||
The KICAD_SCRIPTING_MODULES option is used to enable building and installing the Python modules
|
||||
supplied by KiCad. This option is enabled by default.
|
||||
|
||||
## Python 3 Scripting Support ## {#python3}
|
||||
|
||||
The KICAD_SCRIPTING_PYTHON3 option is used to enable building of the Python 3 interface instead
|
||||
of Python 2. This option is disabled by default.
|
||||
supplied by KiCad. This option is enabled by default, but will be disabled if
|
||||
[KICAD_SCRIPTING](#scripting_opt) is disabled.
|
||||
|
||||
## wxPython Scripting Support ## {#wxpython_opt}
|
||||
|
||||
The KICAD_SCRIPTING_WXPYTHON option is used to enable building the wxPython interface into
|
||||
Pcbnew including the wxPython console. This option is enabled by default.
|
||||
Pcbnew including the wxPython console. This option is enabled by default, but will be disabled if
|
||||
[KICAD_SCRIPTING](#scripting_opt) is disabled.
|
||||
|
||||
## wxPython Phoenix Scripting Support ## {#wxpython_phoenix}
|
||||
|
||||
The KICAD_SCRIPTING_WXPYTHON_PHOENIX option is used to enable building the wxPython interface with
|
||||
the new Phoenix binding instead of the legacy one. This option is disabled by default.
|
||||
the new Phoenix binding instead of the legacy one. This option is disabled by default, and
|
||||
enabling it requires [KICAD_SCRIPTING](#scripting_opt) to be enabled.
|
||||
|
||||
## Python Scripting Action Menu Support ## {#python_action_menu_opt}
|
||||
|
||||
The KICAD_SCRIPTING_ACTION_MENU option allows Python scripts to be added directly to the Pcbnew
|
||||
menu. This option is enabled by default, but will be disabled if
|
||||
[KICAD_SCRIPTING](#scripting_opt) is disabled. Please note that this option is highly
|
||||
experimental and can cause Pcbnew to crash if Python scripts create an invalid object state
|
||||
within Pcbnew.
|
||||
|
||||
## GitHub Plugin ## {#github_opt}
|
||||
|
||||
@@ -209,7 +222,7 @@ and can cause Pcbnew to crash if Python scripts create an invalid object state w
|
||||
|
||||
The KiCad version string is defined by the output of `git describe --dirty` when git is available
|
||||
or the version string defined in CMakeModules/KiCadVersion.cmake with the value of
|
||||
KICAD_VERSION_EXTRA appended to the former. If the KICAD_VERSION_EXTRA variable is not define,
|
||||
KICAD_VERSION_EXTRA appended to the former. If the KICAD_VERSION_EXTRA variable is not defined,
|
||||
it is not appended to the version string. If the KICAD_VERSION_EXTRA variable is defined it
|
||||
is appended along with a leading '-' to the full version string as follows:
|
||||
|
||||
@@ -336,6 +349,12 @@ configure pacman to prevent upgrading the 64-bit Boost package by adding:
|
||||
|
||||
to your /etc/pacman.conf file.
|
||||
|
||||
### Building with Boost 1.70 ### {#ki_msys2_boost_1_70}
|
||||
|
||||
There is an issue building KiCad with Boost version 1.70 due to CMake not defining the proper
|
||||
link libraries during configuration. Boost 1.70 can be used but `-DBoost_NO_BOOST_CMAKE=ON`
|
||||
needs to be added during CMake configuration to insure the link libraries are properly generated.
|
||||
|
||||
### Building OCE from source
|
||||
|
||||
KiCad requires OCE by default, and the version installed by `pacman` can cause build errors in
|
||||
|
||||
@@ -1,461 +0,0 @@
|
||||
# Version 5 Road Map # {#v5_road_map}
|
||||
|
||||
This document is the KiCad version 5 Developer's road map document. It is
|
||||
living document that should be maintained during the version 5 development
|
||||
cycle. The goal of this document is to provide an overview for developers
|
||||
of the goals for the project for the version 5 release of KiCad. It is
|
||||
broken into sections for each major component of the KiCad source code and
|
||||
documentation. It defines tasks that developers an use to contribute to the
|
||||
project and provides updated status information. Tasks should define clear
|
||||
objectives and avoid vague generalizations so that a new developer can complete
|
||||
the task. It is not a place for developers to add their own personal wish.
|
||||
list. It should only be updated with approval of the project manager after
|
||||
discussion with the lead developers.
|
||||
|
||||
Each entry in the road map is made up of four sections. The goal should
|
||||
be a brief description of the what the road map entry will accomplish. The
|
||||
task section should be a list of deliverable items that are specific enough
|
||||
hat they can be documented as completed. The dependencies sections is a list
|
||||
of requirements that must be completed before work can begin on any of the
|
||||
tasks. The status section should include a list of completed tasks or marked
|
||||
as complete as when the goal is met.
|
||||
|
||||
[TOC]
|
||||
|
||||
# Project # {#v5_project}
|
||||
This section defines the tasks for the project related goals that are not
|
||||
related to coding or documentation. It is a catch all for issues such as
|
||||
developer and user relations, dissemination of information on websites,
|
||||
policies, etc.
|
||||
|
||||
|
||||
# General # {#v5_general}
|
||||
This section defines the tasks that affect all or most of KiCad or do not
|
||||
fit under as specific part of the code such as the board editor or the
|
||||
schematic editor.
|
||||
|
||||
## Search Tree Control ## {#v5_re_search_control}
|
||||
|
||||
**Goal:**
|
||||
Create a user interface element that allows searching through a list of
|
||||
items in a tree control for library searching.
|
||||
|
||||
**Task:**
|
||||
- Create hybrid tree control with search text control for displaying filtered
|
||||
objects (both symbol and footprint libraries) in a parent window.
|
||||
|
||||
**Dependencies:**
|
||||
- None
|
||||
|
||||
**Status:**
|
||||
- Initial container searching code completed.
|
||||
- Wildcard and regular expression container searching completed.
|
||||
- Control code in progress.
|
||||
|
||||
# Common Library # {#v5_common_lib}
|
||||
This section covers the source code shared between all of the KiCad
|
||||
applications
|
||||
|
||||
## Unified Rendering Framework ## {#v5_unified_rendering}
|
||||
**Goal:**
|
||||
|
||||
Provide a single framework for developing new tools. Port existing tools
|
||||
to the new framework and remove the legacy framework tools.
|
||||
|
||||
**Task:**
|
||||
- Port wxDC to GAL or get Cairo rendering to nearly the performance of the
|
||||
current wxDC rendering so that we have a single framework to develop new
|
||||
tools and we can continue to support systems that don't have a complete
|
||||
OpenGL stack.
|
||||
|
||||
**Dependencies**
|
||||
- [Tool framework](http://www.ohwr.org/projects/cern-kicad/wiki/WorkPackages)
|
||||
|
||||
**Status**
|
||||
- In progress
|
||||
|
||||
## Printing Improvements ## {#v5_print}
|
||||
**Goal:**
|
||||
|
||||
Make printing quality consistent across platforms.
|
||||
|
||||
**Task:**
|
||||
- Resolve printing issues on all platforms.
|
||||
|
||||
**Dependencies**
|
||||
- None
|
||||
|
||||
**Status**
|
||||
- No progress.
|
||||
|
||||
## Object Properties and Introspection ## {#v5_object_props}
|
||||
**Goal:**
|
||||
|
||||
Provide an object introspection system using properties.
|
||||
|
||||
**Task:**
|
||||
- Select existing or develop property system.
|
||||
- Add definable properties to base objects.
|
||||
- Create introspection framework for manipulating object properties.
|
||||
- Serialization of properties to and from files and/or other I/O structures.
|
||||
- Create tool to edit property namespace/object name/name/type/value table.
|
||||
|
||||
**Dependencies:**
|
||||
- None
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
|
||||
## 3D Viewer Dynamic Library Plugin ## {#v5_plugin_base}
|
||||
**Goal:**
|
||||
|
||||
Create a base library plugin for handling external file I/O for the 3D viewer.
|
||||
This will allow plugins to be provided that are external to the project such
|
||||
as providing solid model file support (STEP, IGES, etc.) using OpenCascade
|
||||
without making it a project dependency.
|
||||
|
||||
**Task:**
|
||||
- Create a plugin to handle dynamically registered plugins for loading and
|
||||
saving file formats.
|
||||
- This object should be flexible enough to be extended for handling all file
|
||||
plugin types including schematic, board, footprint library, component
|
||||
library, etc. (optional)
|
||||
- See [blueprint](https://blueprints.launchpad.net/kicad/+spec/pluggable-file-io)
|
||||
on Launchpad for more information.
|
||||
|
||||
**Dependencies:**
|
||||
- None
|
||||
|
||||
**Status:**
|
||||
- 3D plugin code complete and legacy formats implemented.
|
||||
|
||||
|
||||
# Eeschema: Schematic Editor # {#v5_eeschema}
|
||||
This section applies to the source code for the Eeschema schematic editor.
|
||||
|
||||
## Coherent SCHEMATIC Object ## {#v5_sch_object}
|
||||
**Goal:**
|
||||
|
||||
Clean up the code related to the schematic object(s) into a coherent object for
|
||||
managing and manipulating the schematic that can be used by third party tools
|
||||
and Python scripting.
|
||||
|
||||
**Task:**
|
||||
- Move handling of root sheet object to SCHEMATIC object.
|
||||
- Move SCH_SCREENS code into SCH_OBJECT.
|
||||
- Build and maintain schematic hierarchy in SCHEMATIC object rather than
|
||||
recreating on the fly every time the hierarchical information is required.
|
||||
- Optionally build and maintain netlist during editing for extended editing
|
||||
features.
|
||||
- Add any missing functionality to the SCHEMATIC object.
|
||||
|
||||
**Dependencies:**
|
||||
- [Schematic and Component Library Plugin](#v5_sch_plugin)
|
||||
|
||||
**Status:**
|
||||
- In progress.
|
||||
|
||||
## Schematic and Component Library I/O Manager Plugin ## {#v5_sch_plugin}
|
||||
**Goal:**
|
||||
Create a plugin manager for loading and saving schematics and component
|
||||
libraries similar to the board plugin manager.
|
||||
|
||||
**Task:**
|
||||
- Design plugin manager for schematics and component libraries.
|
||||
- Port the current schematic and component library file formats to use the
|
||||
plugin.
|
||||
|
||||
**Dependencies:**
|
||||
- None
|
||||
|
||||
**Status:**
|
||||
- I/O manager and plugin objects are complete.
|
||||
- Legacy schematic file parser almost ready to commit.
|
||||
|
||||
|
||||
## S-Expression File Format ## {#v5_sch_sexpr}
|
||||
**Goal:**
|
||||
|
||||
Make schematic file format more readable, add new features, and take advantage
|
||||
of the s-expression parser and formatter capability used in Pcbnew.
|
||||
|
||||
**Task:**
|
||||
- Finalize feature set and file format.
|
||||
- Discuss the possibility of dropping the unit-less proposal temporarily to get
|
||||
the s-expression file format and SWEET library format implemented without
|
||||
completely rewriting Eeschema.
|
||||
- Add new s-expression file format to plugin.
|
||||
|
||||
**Dependencies:**
|
||||
- [Schematic and component I/O manager plugin](#v5_sch_plugin)
|
||||
|
||||
**Status:**
|
||||
- File format document nearly complete.
|
||||
|
||||
## Implement Sweet Component Libraries ## {#v5_sch_sweet}
|
||||
**Goal:**
|
||||
|
||||
Make component library design more robust and feature rich. Use s-expressions
|
||||
to make component library files more readable.
|
||||
|
||||
**Task:**
|
||||
- Use sweet component file format for component libraries.
|
||||
|
||||
**Dependencies:**
|
||||
- [S-expression file format](#v5_sch_sexpr).
|
||||
[Schematic and component I/O manager plugin](#v5_sch_plugin)
|
||||
|
||||
**Status:**
|
||||
- Initial SWEET library file format document written.
|
||||
|
||||
## Component Library Editor Usability Improvements ## {#v5_lib_editor_usability}
|
||||
**Goal:**
|
||||
|
||||
Make editing schematic symbol libraries easier to manage.
|
||||
|
||||
**Task:**
|
||||
- Determine usability improvements in the library editor for components with
|
||||
multiple units and/or alternate graphical representations.
|
||||
- Replace current library/symbols selection process with new hybrid tree search
|
||||
widget in new window pain for selection libraries and symbols. Provide drag
|
||||
and drop symbol copy/move between libraries.
|
||||
- Allow editing of symbol libraries not defined in footprint library table(s)
|
||||
using the file/path dialog to open a library.
|
||||
|
||||
**Dependencies:**
|
||||
- [Search Tree Control](#v5_re_search_control)
|
||||
|
||||
**Status:**
|
||||
- Determined alternate UI designs using new hybrid search tree control.
|
||||
|
||||
## Component and Netlist Attributes ## {#v5_netlist_attributes}
|
||||
**Goal:**
|
||||
|
||||
Provide a method of passing information to other tools via the net list.
|
||||
|
||||
**Task:**
|
||||
- Add virtual components and attributes to netlist to define properties that
|
||||
can be used by other tools besides the board editor.
|
||||
- Attributes (properties) are automatically included as part of the new file
|
||||
format.
|
||||
|
||||
**Dependencies:**
|
||||
- [S-expression schematic file format](#v5_sch_sexpr).
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
|
||||
|
||||
# Circuit Simulation # {#simulation}
|
||||
**Goal:**
|
||||
|
||||
Provide quality circuit simulation capabilities similar to commercial products.
|
||||
|
||||
**Task:**
|
||||
- Evaluate and select simulation library (ngspice, gnucap, qucs, etc).
|
||||
- Evaluate and select plotting library with wxWidgets support.
|
||||
- Confirm current spice netlist export is up to the task and add missing
|
||||
support for simulations.
|
||||
- Use plotting library to handle simulator output in a consistent manor similar
|
||||
to LTSpice.
|
||||
- Develop a tool that allows fine tuning of components on the fly.
|
||||
- Use plugin for the simulation code to allow support of different simulation
|
||||
libraries.
|
||||
- Create dialogs for configuring of simulation of Spice primitive components
|
||||
such as voltage sources, current sources, etc.
|
||||
- Create dialog(s) for configuration of simulation types transient, DC operating
|
||||
point, AC analysis, etc.
|
||||
|
||||
**Dependencies:**
|
||||
- None
|
||||
|
||||
**Status:**
|
||||
- Complete ([announcement message](https://lists.launchpad.net/kicad-developers/msg25483.html))
|
||||
|
||||
|
||||
# Pcbnew: Circuit Board Editor # {#v5_pcbnew}
|
||||
This section covers the source code of the board editing application Pcbnew.
|
||||
|
||||
## Tool Framework ## {#v5_pcb_tool_framework}
|
||||
**Goal:**
|
||||
|
||||
Unify all board editing tools under a single framework.
|
||||
|
||||
**Task:**
|
||||
- Drop footprint edit mode.
|
||||
- Port auto-router to GAL.
|
||||
- Complete porting of all board editing tools to new tool framework so they
|
||||
are available in the OpenGL and Cairo canvases.
|
||||
- Remove all duplicate legacy editing tools.
|
||||
|
||||
**Dependencies:**
|
||||
- In progress.
|
||||
|
||||
**Status:**
|
||||
- Initial porting work in progress.
|
||||
|
||||
## Modeling ## {#v5_modeling}
|
||||
|
||||
**Goal:**
|
||||
|
||||
Provide improved solid modeling support for KiCad including the file formats
|
||||
available in OpenCascade.
|
||||
|
||||
**Task:**
|
||||
- Improve low level code design.
|
||||
- Design plugin architecture to handle loading and saving 3D models.
|
||||
- Back port existing 3D formats (IDF and S3D) to plugin
|
||||
|
||||
**Dependencies:**
|
||||
- [Dynamic library plugin](#v5_plugin_base).
|
||||
|
||||
**Status:**
|
||||
- Completed.
|
||||
|
||||
## Push and Shove Router Improvements ## {#v5_ps_router_improvements}
|
||||
|
||||
**Goal:**
|
||||
|
||||
Add finishing touches to push and shove router.
|
||||
|
||||
**Task:**
|
||||
- Determine which features are feasible.
|
||||
- Factor out KiCad-specific code from PNS_ROUTER class.
|
||||
- Delete and backspace in idle mode
|
||||
- Differential pair clearance fixes.
|
||||
- Differential pair optimizer improvements (recognize differential pairs)
|
||||
- Persistent differential pair gap/width setting.
|
||||
- Walk around in drag mode.
|
||||
- Optimize trace being dragged too. (currently no optimization)
|
||||
- Backspace to erase last routed segment.
|
||||
- Auto-finish traces (if time permits)
|
||||
- Additional optimization pass for spring back algorithm using area-minimization
|
||||
strategy. (improves tightness of routing)
|
||||
- Restrict optimization area to view port (if user wants to)
|
||||
- Support 45 degree tuning meanders.
|
||||
- Respect trace/via locking!
|
||||
- Keep out zone support.
|
||||
|
||||
**Dependencies:**
|
||||
- None
|
||||
|
||||
**Status:**
|
||||
- Feature feasibility determined.
|
||||
- In Progress.
|
||||
|
||||
## Selection Filtering ## {#v5_pcb_selection_filtering}
|
||||
**Goal:**
|
||||
|
||||
Make the selection tool easier for the user to determine which object(s) are
|
||||
being selected by filtering.
|
||||
|
||||
**Task:**
|
||||
- Provide filtered object selection by adding a third tab to the layer manager
|
||||
or possibly some other UI element to provide filtered selection options.
|
||||
|
||||
**Dependencies:**
|
||||
- None
|
||||
|
||||
**Status:**
|
||||
- Initial design concept discussed.
|
||||
|
||||
## Segment End Point Snapping. ## {#v5_segment_snapping}
|
||||
**Goal:**
|
||||
|
||||
It is not uncommon for board edge segment end points to inadvertently not
|
||||
be closed causing issues for the 3D viewer and exporting to different file
|
||||
formats due the board outline not being a fully enclosed polygon. This
|
||||
feature would add segment end snapping support to allow the board outline
|
||||
to be fully enclosed. This feature would only need to be supported by the
|
||||
GAL rendering.
|
||||
|
||||
**Tasks**
|
||||
- Mark board edge segment ends with a drag indicator to make it visible to the
|
||||
user that the segment end does not have an endpoint with any other board edge
|
||||
segment.
|
||||
- Allow the user to snap the unconnected segment end to the nearest segment end
|
||||
point.
|
||||
- Automatically connect unconnected segments with and additional segment when
|
||||
opening the 3D viewer or exporting the board to another format. Warn the
|
||||
user that an addition segment has be added and should be verified.
|
||||
|
||||
**Dependencies:**
|
||||
- None
|
||||
|
||||
**Progress:**
|
||||
- Initial discussion.
|
||||
|
||||
## Stitching Via Support ## {#v5_pcb_stitching_vias}
|
||||
**Goal:**
|
||||
|
||||
Add capability to add vias for stitching and thermal transfer purposes
|
||||
that do not require being attached to tracks.
|
||||
|
||||
**Task:**
|
||||
- Develop more robust connectivity checking algorithm.
|
||||
- Create a UI element to allow the user to select a net from the list of
|
||||
valid nets.
|
||||
- Connection propagation fix for the current issue of vias that are not
|
||||
connected to tracks being tagged as unassigned and removed.
|
||||
- Manual via placement tool.
|
||||
- Improve the DRC to handle cases of orphaned vias.
|
||||
|
||||
**Dependencies:**
|
||||
- None
|
||||
|
||||
**Progress:**
|
||||
- Patch available to fix via propagation issue.
|
||||
|
||||
|
||||
# Documentation # {#v5_documentation}
|
||||
This section defines the tasks for both the user and developer documentation.
|
||||
|
||||
## Grammar Check ## {#v5_doc_grammar}
|
||||
**Goal:**
|
||||
|
||||
Improve user documentation readability and make life easier to for translators.
|
||||
|
||||
**Task:**
|
||||
- Review and revise all of the English documentation so that it is update with
|
||||
the current functionality of the code.
|
||||
- Translate the update documentation into other languages.
|
||||
|
||||
**Dependencies:**
|
||||
- None
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
|
||||
## Maintenance ## {#v5_doc_maintenance}
|
||||
**Task:**
|
||||
- Keep screen shots current with the source changes.
|
||||
|
||||
**Dependencies:**
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
|
||||
## Convert Developer Documentation to Markup/down Format ## {#v5_dev_doc_format}
|
||||
**Goal:**
|
||||
|
||||
Improve developers documentation to make life easier for new developers to get
|
||||
involved with the project.
|
||||
|
||||
**Task:**
|
||||
- Convert platform build instructions from plain text to new format to be
|
||||
merged with the developer documentation.
|
||||
- Convert how to contribute to KiCad instructions from plain text to the new
|
||||
format to merged with the developer documentation.
|
||||
|
||||
**Dependencies:**
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- In progress. Most of the developer documentation has been converted to
|
||||
[Doxygen markdown](http://www.doxygen.nl/manual/markdown.html)
|
||||
and the [output][kicad-docs] is rebuilt automatically when a commit is
|
||||
made to the KiCad repo.
|
||||
|
||||
[kicad-website]:http://kicad-pcb.org/
|
||||
[kicad-docs]:http://ci.kicad-pcb.org/job/kicad-doxygen/ws/Documentation/doxygen/html/index.html
|
||||
@@ -54,10 +54,84 @@ Create perspectives to allow users to arrange dockable windows as they prefer.
|
||||
**Status:**
|
||||
- No progress.
|
||||
|
||||
## Object Properties and Introspection ## {#v6_object_props}
|
||||
**Goal:**
|
||||
|
||||
Provide an object introspection system using properties.
|
||||
|
||||
**Task:**
|
||||
- Select existing or develop property system.
|
||||
- Add definable properties to base objects.
|
||||
- Create introspection framework for manipulating object properties.
|
||||
- Serialization of properties to and from files and/or other I/O structures.
|
||||
- Create tool to edit property namespace/object name/name/type/value table.
|
||||
|
||||
**Dependencies:**
|
||||
- None
|
||||
|
||||
**Status:**
|
||||
- In progress.
|
||||
|
||||
|
||||
# Eeschema: Schematic Editor # {#v6_eeschema}
|
||||
This section applies to the source code for the Eeschema schematic editor.
|
||||
|
||||
## Coherent SCHEMATIC Object ## {#v6_sch_object}
|
||||
**Goal:**
|
||||
|
||||
Clean up the code related to the schematic object(s) into a coherent object for
|
||||
managing and manipulating the schematic that can be used by third party tools
|
||||
and Python scripting.
|
||||
|
||||
**Task:**
|
||||
- Move handling of root sheet object to SCHEMATIC object.
|
||||
- Move SCH_SCREENS code into SCH_OBJECT.
|
||||
- Build and maintain schematic hierarchy in SCHEMATIC object rather than
|
||||
recreating on the fly every time the hierarchical information is required.
|
||||
- Optionally build and maintain netlist during editing for extended editing
|
||||
features.
|
||||
- Add any missing functionality to the SCHEMATIC object.
|
||||
|
||||
**Dependencies:**
|
||||
- None
|
||||
|
||||
**Status:**
|
||||
- In progress.
|
||||
|
||||
## Implement Sweet (S-Expression) Symbol Libraries ## {#v6_sch_sweet}
|
||||
**Goal:**
|
||||
|
||||
Make symbol library design more robust and feature rich. Use s-expressions
|
||||
to make component library files more readable.
|
||||
|
||||
**Task:**
|
||||
- Use sweet component file format for component libraries.
|
||||
|
||||
**Dependencies:**
|
||||
- None
|
||||
|
||||
**Status:**
|
||||
- Initial SWEET library file format document written.
|
||||
|
||||
## S-Expression File Format ## {#v6_sch_sexpr}
|
||||
**Goal:**
|
||||
|
||||
Make schematic file format more readable, add new features, and take advantage
|
||||
of the s-expression parser and formatter capability used in Pcbnew.
|
||||
|
||||
**Task:**
|
||||
- Finalize feature set and file format.
|
||||
- Discuss the possibility of dropping the unit-less proposal temporarily to get
|
||||
the s-expression file format and SWEET library format implemented without
|
||||
completely rewriting Eeschema.
|
||||
- Add new s-expression file format to plugin.
|
||||
|
||||
**Dependencies:**
|
||||
- [S-expression file format](#v6_sch_sweet).
|
||||
|
||||
**Status:**
|
||||
- File format document initial draft complete.
|
||||
|
||||
## Move Common Schematic Code into a Shared Object ## {#v6_sch_shared_object}
|
||||
**Goal:**
|
||||
|
||||
@@ -93,37 +167,22 @@ Improve the coverage and usability of the electrical rules checker (ERC).
|
||||
**Status:**
|
||||
- No progress.
|
||||
|
||||
## Implement GAL and New Tool Framework ## {#v6_sch_gal}
|
||||
**Goal:**
|
||||
|
||||
Implement the GAL and the tool framework used by Pcbnew in Eechema to
|
||||
provide advanced graphics and tool capabilities.
|
||||
|
||||
**Task:**
|
||||
- Implement graphics abstraction layer along side current legacy rendering
|
||||
framework.
|
||||
|
||||
**Dependencies:**
|
||||
- None
|
||||
|
||||
**Status:**
|
||||
- Initial Discussion..
|
||||
|
||||
## Port Editing Tools ## {#v6_sch_tool_framework}
|
||||
## Port Editing Tools to New Tool Framework ## {#v6_sch_tool_framework}
|
||||
**Goal:**
|
||||
|
||||
Convert all editing tool to new tool framework.
|
||||
|
||||
-**Task:**
|
||||
**Task:**
|
||||
- Rewrite existing editing tools using the new tool framework.
|
||||
- Add new capabilities supported by the new tool framework to existing
|
||||
editing tools.
|
||||
- Remove legacy tool framework.
|
||||
|
||||
-**Dependencies:**
|
||||
- [GAL and new tool framework port](#v6_sch_gal).
|
||||
**Dependencies:**
|
||||
- None.
|
||||
|
||||
-**Status:**
|
||||
- Initial Discussion..
|
||||
**Status:**
|
||||
- Schematic editor complete.
|
||||
|
||||
## Net Highlighting ## {#v6_sch_net_highlight}
|
||||
**Goal:**
|
||||
@@ -134,28 +193,11 @@ Highlight wires, buses, and junctions when corresponding net in Pcbnew is select
|
||||
- Implement highlight algorithm for net objects.
|
||||
- Highlight objects connected to net selected in Pcbnew.
|
||||
|
||||
**Dependencies:**
|
||||
- [GAL and new tool framework port, maybe](#v6_sch_gal).
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
|
||||
## Component Library Editor Improvements ## {#lib_editor_usability}
|
||||
**Goal:**
|
||||
|
||||
Make editing components with multiple units and/or alternate graphical
|
||||
representations easier.
|
||||
|
||||
**Task:**
|
||||
- Determine usability improvements in the library editor for components with
|
||||
multiple units and/or alternate graphical representations.
|
||||
- Implement said usability improvements.
|
||||
|
||||
**Dependencies:**
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
- Complete.
|
||||
|
||||
## Allow Use of System Fonts ## {#v6_sch_sys_fonts}
|
||||
**Goal:**
|
||||
@@ -170,33 +212,112 @@ for schematic text.
|
||||
- Add support for selecting text object fonts.
|
||||
|
||||
**Dependencies:**
|
||||
- [S-expression schematic file format](#sch_sexpr).
|
||||
- [S-expression schematic file format](#v6_sch_sexpr).
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
|
||||
## Symbol and Netlist Attributes ## {#v6_netlist_attributes}
|
||||
**Goal:**
|
||||
|
||||
Provide a method of passing information to other tools via the net list.
|
||||
|
||||
**Task:**
|
||||
- Add virtual components and attributes to netlist to define properties that
|
||||
can be used by other tools besides the board editor.
|
||||
- Attributes (properties) are automatically included as part of the new file
|
||||
format.
|
||||
|
||||
**Dependencies:**
|
||||
- [S-expression schematic file format](#v6_sch_sexpr).
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
|
||||
## Orthogonal Wire Drag ## {#v6_orthogonal_drag}
|
||||
**Goal:**
|
||||
|
||||
Keep wires and buses orthogonal when dragging a symbol.
|
||||
|
||||
**Task:**
|
||||
- Add code to new tool framework to allow for orthogonal dragging of symbols.
|
||||
|
||||
**Dependencies:**
|
||||
- [New tool framework](#v6_sch_tool_framework).
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
|
||||
## Custom Wire and Bus Attributes ## {#v6_sch_bus_wire_attr}
|
||||
**Goal:**
|
||||
|
||||
Allow for wires and buses to have different widths, colors, and line types.
|
||||
|
||||
**Task:**
|
||||
- Add code to support custom wire and bus attributes.
|
||||
- Add user interface element to support changing wire and bus attributes.
|
||||
|
||||
**Dependencies:**
|
||||
- [S-Expression File Format](#v6_sch_sexpr).
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
|
||||
## Connectivity Improvements ## {#v6_sch_connectivity}
|
||||
**Goal:**
|
||||
|
||||
Support structured buses, real time netlist calculations, and other
|
||||
connectivity improvements.
|
||||
|
||||
**Task:**
|
||||
- Keep netlist up to date real time.
|
||||
- Add support for structured bus definitions.
|
||||
- Possible real time ERC checking.
|
||||
|
||||
**Dependencies:**
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- Real time netlist and structured bus support complete.
|
||||
|
||||
## ERC Improvements ## {#v6_sch_erc}
|
||||
**Goal:**
|
||||
|
||||
Improve ERC test coverage and other ERC usability features.
|
||||
|
||||
**Task:**
|
||||
- Add missing ERC tests to improve coverage.
|
||||
- Save ERC settings in project file.
|
||||
- Add mechanism to allow import and export of ERC settings.
|
||||
- ERC user interface improvements.
|
||||
|
||||
**Dependencies:**
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- Preliminary specification draft complete.
|
||||
|
||||
## Python Support ## {#v6_sch_python}
|
||||
**Goal:**
|
||||
|
||||
SWIG all schematic low level objects and coherent schematic object to
|
||||
provide Python interface for manipulating schematic objects.
|
||||
|
||||
**Task:**-
|
||||
- Create SWIG wrappers for all low level schematic, symbol library, and
|
||||
coherent schematic object code.
|
||||
- Add Python interpreter launcher.
|
||||
|
||||
**Dependencies:**
|
||||
- [Coherent Schematic Object](#v6_sch_object).
|
||||
|
||||
**Status:**
|
||||
- No Progress.
|
||||
|
||||
|
||||
# CvPcb: Footprint Association Tool # {#v6_cvpcb}
|
||||
This section covers the source code of the footprint assignment tool CvPcb.
|
||||
|
||||
## Improved Footprint Search Tool ## {#v6_cvpcb_search}
|
||||
|
||||
**Goal:**
|
||||
|
||||
Provide advanced search features such as wild card and regular expression
|
||||
searches using the type as you go feature of the current search dialog.
|
||||
|
||||
**Task:**
|
||||
- Add code for wild card and regular expression pattern matching to search
|
||||
container objects.
|
||||
- Add search dialog to CvPcb to search container of footprint names.
|
||||
|
||||
**Dependencies:**
|
||||
- [Search Tree Control](#v6_re_search_control)
|
||||
|
||||
**Status:**
|
||||
- Pattern matching added to search container objects.
|
||||
|
||||
|
||||
# Pcbnew: Circuit Board Editor # {#v6_pcbnew}
|
||||
This section covers the source code of the board editing application Pcbnew.
|
||||
@@ -208,14 +329,45 @@ This section covers the source code of the board editing application Pcbnew.
|
||||
Add finishing touches to push and shove router.
|
||||
|
||||
**Task:**
|
||||
- Microwave tools to be added as parametrized shapes generated by Python
|
||||
- Delete and backspace in idle mode
|
||||
- Differential pair clearance fixes.
|
||||
- Differential pair optimizer improvements (recognize differential pairs)
|
||||
- Persistent differential pair gap/width setting.
|
||||
- Walk around in drag mode.
|
||||
- Optimize trace being dragged too. (currently no optimization)
|
||||
- Auto-finish traces (if time permits)
|
||||
- Additional optimization pass for spring back algorithm using area-minimization
|
||||
strategy. (improves tightness of routing)
|
||||
- Restrict optimization area to view port (if user wants to)
|
||||
- Support 45 degree tuning meanders.
|
||||
- Respect trace/via locking!
|
||||
- Keep out zone support.
|
||||
- Microwave tools to be added as parameterized shapes generated by Python
|
||||
scripts.
|
||||
- BGA fan out support.
|
||||
- Drag footprints with traces connected.
|
||||
|
||||
**Dependencies:**
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- In progress.
|
||||
|
||||
## Selection Filtering ## {#v6_pcb_selection_filtering}
|
||||
**Goal:**
|
||||
|
||||
Make the selection tool easier for the user to determine which object(s) are
|
||||
being selected by filtering.
|
||||
|
||||
**Task:**
|
||||
- Provide filtered object selection by adding a third tab to the layer manager
|
||||
or possibly some other UI element to provide filtered selection options.
|
||||
|
||||
**Dependencies:**
|
||||
- None
|
||||
|
||||
**Status:**
|
||||
- None
|
||||
- In progress.
|
||||
|
||||
## Design Rule Check (DRC) Improvements. ## {#v6_drc_improvements}
|
||||
**Goal:**
|
||||
@@ -223,7 +375,6 @@ Add finishing touches to push and shove router.
|
||||
Create additional DRC tests for improved error checking.
|
||||
|
||||
**Task:**
|
||||
- Replace geometry code with [unified geometry library](#v6_geometry_lib).
|
||||
- Remove floating point code from clearance calculations to prevent rounding
|
||||
errors.
|
||||
- Add checks for component, silk screen, and mask clearances.
|
||||
@@ -232,7 +383,7 @@ Create additional DRC tests for improved error checking.
|
||||
- Add option for saving and loading DRC options.
|
||||
|
||||
**Dependencies:**
|
||||
- [Unified geometry library.](#v6_geometry_lib)
|
||||
- [Constraint Management System](#v6_pcb_constraint).
|
||||
|
||||
**Progress:**
|
||||
- In progress.
|
||||
@@ -273,7 +424,7 @@ does not have to do it in Eeschema and re-import the net list.
|
||||
- Add support to handle net label back annotation changes.
|
||||
|
||||
**Dependencies:**
|
||||
- None
|
||||
- [S-Expression File Format](#v6_sch_sexpr).
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
@@ -292,7 +443,7 @@ Add support for keepout zones on boards and footprints.
|
||||
- [DRC Improvements.](#v6_drc_improvements)
|
||||
|
||||
**Progress:**
|
||||
- Planning
|
||||
- In progress.
|
||||
|
||||
## Clipboard Support ## {#v6_fp_edit_clipboard}
|
||||
**Goal:**
|
||||
@@ -307,7 +458,7 @@ Provide clipboard cut and paste for footprints.
|
||||
- None
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
- Complete.
|
||||
|
||||
## Net Highlighting ## {#v6_pcb_net_highlight}
|
||||
**Goal:**
|
||||
@@ -323,7 +474,7 @@ Highlight rats nest links and/or traces when corresponding net in Eeschema is se
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
- Complete.
|
||||
|
||||
## Hatched Zone Filling ## {#v6_pcb_hatched_zones}
|
||||
**Goal:**
|
||||
@@ -339,7 +490,7 @@ with hatching.
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
- Complete.
|
||||
|
||||
## Board Stack Up Impedance Calculator ## {#v6_pcb_impedance_calc}
|
||||
**Goal:**
|
||||
@@ -354,7 +505,7 @@ Maybe this should be included in the PCB calculator application.
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
- In progress.
|
||||
|
||||
## Net Class Improvements ## {#v6_pcb_net_class_improvements}
|
||||
**Goal:**
|
||||
@@ -378,9 +529,10 @@ Add support for route impedance, color selection, etc in net class object.
|
||||
## Ratsnest Improvements ## {#v6_pcb_ratsnest_improvements}
|
||||
**Goal:**
|
||||
|
||||
Add support for per net color and visibility settings.
|
||||
Add support for curved rats and per net color and visibility settings.
|
||||
|
||||
**Task:**
|
||||
- Implement rat curving to minimize overlapped rats.
|
||||
- Implement UI code to configure ratsnest color and visibility.
|
||||
- Update ratsnest code to handle per net color and visibility.
|
||||
|
||||
@@ -388,23 +540,312 @@ Add support for per net color and visibility settings.
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
- Curved rat support complete.
|
||||
|
||||
|
||||
# GerbView: Gerber File Viewer # {#v6_gerbview}
|
||||
|
||||
This section covers the source code for the GerbView gerber file viewer.
|
||||
|
||||
## Graphics Abstraction Layer ## {#v6_gerbview_gal}
|
||||
## DXF Improvements ## {#v6_pcb_dxf_import}
|
||||
**Goal:**
|
||||
|
||||
Graphics rendering unification.
|
||||
- Allow for anchor point setting and layer mapping support on DXF import and
|
||||
export multiple board layers to a single DXF file.
|
||||
|
||||
**Task:**
|
||||
- Port graphics rendering layer to GAL.
|
||||
- Provide method to select DXF import anchor point.
|
||||
- Add user interface to allow mapping DXF layers to board layers.
|
||||
- Modify DXF plotting to export multiple layers to a single file.
|
||||
|
||||
**Dependencies:**
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
|
||||
## Improve Dimension Tool ## {#v6_pcb_dim_tool}
|
||||
**Goal:**
|
||||
|
||||
Make dimensions link to objects and change when objects are modified and add
|
||||
basic mechanical constraints.
|
||||
|
||||
**Task:**
|
||||
- Add code to link dimension to objects.
|
||||
- Add basic mechanical constraints like linear distance and angle.
|
||||
|
||||
**Dependencies:**
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- In progress.
|
||||
|
||||
## Constraint Management System ## {#v6_pcb_constraint}
|
||||
**Goal:**
|
||||
|
||||
Implement full featured constraint management system to allow for complex
|
||||
board constraints instead of netclass only constraints.
|
||||
|
||||
**Task:**
|
||||
- Write specification to define requirement of new constraint system.
|
||||
- Implement new constraint system including file format changes.
|
||||
- Allow constraints to be defined in schematic editor and passed to board
|
||||
editor via netlist.
|
||||
- Update netlist file format to support constraints.
|
||||
- Update DRC to test new constraints.
|
||||
|
||||
**Dependencies:**
|
||||
- None.
|
||||
|
||||
**Status**
|
||||
- No Progress.
|
||||
|
||||
## Append Board in Project Mode ## {#v6_pcb_append}
|
||||
**Goal:**
|
||||
|
||||
Allow appending to the board when running Pcbnew in the project mode.
|
||||
|
||||
**Task:**
|
||||
- Enable append board feature in project mode.
|
||||
- Extend copy/paste feature to introduce paste special tool to add prefix
|
||||
and/or suffix to nets of pasted/appended objects.
|
||||
|
||||
**Dependencies:**
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
|
||||
## Grid and Auxiliary Origin Improvements ## {#v6_pcb_origin}
|
||||
**Goal:**
|
||||
|
||||
Allow reset grid and auxiliary origin without hotkey only. Add support to
|
||||
make all coordinates relative to the plot origin.
|
||||
|
||||
**Task:**
|
||||
- Add reset grid and auxiliary origin commands to menu entry and/or toolbar
|
||||
button.
|
||||
- Add code to dialogs to allow coordinates to be specified relative to the
|
||||
plot origin.
|
||||
|
||||
**Dependencies:**
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- Relative coordinate entry in progress.
|
||||
|
||||
## Addition Mechanical Layers ## {#v6_pcb_mech_layers}
|
||||
**Goal:**
|
||||
|
||||
Add more mechanical layers.
|
||||
|
||||
**Task:**
|
||||
- Add remaining mechanical layers for a total of 32.
|
||||
|
||||
**Dependencies:**
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
|
||||
## Layer Renaming ## {#v6_pcb_layer_rename}
|
||||
**Goal:**
|
||||
|
||||
Allow mechanical layers to be renamed.
|
||||
|
||||
**Task:**
|
||||
- Quote layer names in file format to support any printable characters in
|
||||
layer names.
|
||||
- Add user interface to allow mechanical layers to be renamed.
|
||||
|
||||
**Dependencies:**
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- Quoted layer names complete.
|
||||
|
||||
## Stable Python API ## {#v6_pcb_python_api}
|
||||
**Goal:**
|
||||
|
||||
Create a Python wrapper to hide the SWIG generated API.
|
||||
|
||||
**Task:**
|
||||
- Document new Python API.
|
||||
- Write Python API.
|
||||
|
||||
**Dependencies:**
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- Initial technical specification drafted.
|
||||
|
||||
## Track Refining ## {#v6_pcb_track_refine}
|
||||
**Goal:**
|
||||
|
||||
Add support for teardrops and automatically updating length tuning
|
||||
meandering.
|
||||
|
||||
**Task:**
|
||||
- Draft specification for track refining.
|
||||
- Implement support for teardrops.
|
||||
- Implement support for changing tuned length meandering.
|
||||
|
||||
**Dependencies:**
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- Initial technical specification drafted.
|
||||
|
||||
## Groups and Rooms ## {#v6_pcb_groups}
|
||||
**Goal:**
|
||||
|
||||
Support grouping board objects into reusable snippets.
|
||||
|
||||
**Task:**
|
||||
- Write design specification.
|
||||
- Update board file format to support grouped objects.
|
||||
- Add user interface code to support grouped board objects.
|
||||
|
||||
**Dependencies:**
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- Initial technical specification drafted.
|
||||
|
||||
## Pad Stack Support ## {#v6_pcb_padstack}
|
||||
**Goal:**
|
||||
|
||||
Add padstack support.
|
||||
|
||||
**Task:**
|
||||
- Write pad stack design specification.
|
||||
- Update board file format to support pad stacks.
|
||||
- Add user interface code to support designing pad stack objects.
|
||||
- Update push and shove router to handle pad stacks.
|
||||
- Update zone filling to handle pad stacks.
|
||||
- Update DRC to handle pad stacks.
|
||||
|
||||
**Dependencies:**
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- Initial technical specification drafted.
|
||||
|
||||
## Net Ties ## {#v6_pcb_net_ties}
|
||||
**Goal:**
|
||||
|
||||
Add support for net ties.
|
||||
|
||||
**Task:**
|
||||
- Write net tie design specification.
|
||||
- Implement board file support for net ties.
|
||||
- Implement schematic file support for net ties.
|
||||
- Update ERC and DRC to handle net ties.
|
||||
- Update netlist to pass net tie information from schematic to board.
|
||||
- Add user interface support for net ties to editors.
|
||||
|
||||
**Dependencies:**
|
||||
- [S-Expression File Format](#v6_sch_sexpr).
|
||||
|
||||
**Status:**
|
||||
- No Progress.
|
||||
|
||||
## Anti-pad Improvements ## {#v6_pcb_anti_pad}
|
||||
**Goal:**
|
||||
|
||||
Use anti-pads on vias and through hold pads on internal layers as required.
|
||||
|
||||
**Task:**-
|
||||
- Revise zone filling algorithm to create anti-pad on internal layers.
|
||||
|
||||
**Dependencies:**
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- No Progress.
|
||||
|
||||
## Thermal Relief Improvements ## {#v6_pcb_thermal_relief}
|
||||
**Goal:**
|
||||
|
||||
Allow for custom thermal reliefs in zones and custom pad shapes.
|
||||
|
||||
**Task:**-
|
||||
- Write technical specification to define requirements, alternate unions,
|
||||
knockouts, union spokes, etc.
|
||||
- Revise zone filling thermal relief support to handle new requirements.
|
||||
- Update board file format for new thermal relief requirements.
|
||||
- Add user interface support for thermal relief definitions.
|
||||
|
||||
**Dependencies:**
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- No Progress.
|
||||
|
||||
## Merge KiCad2Step ## {#v6_pcb_kicad2step}
|
||||
**Goal:**
|
||||
|
||||
Merge export to STEP file code from KiCad2Step so that conversion does
|
||||
not run in a separate process.
|
||||
|
||||
**Task:**-
|
||||
- Merge KiCad2Step code into Pcbnew code base.
|
||||
- Remove unused parser code.
|
||||
|
||||
**Dependencies:**
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- No Progress.
|
||||
|
||||
## 3D Model Improvements ## {#v6_pcb_3d_model_opacity}
|
||||
**Goal:**
|
||||
|
||||
Add opacity to 3D model support and convert from path look up to library
|
||||
table to access 3D models.
|
||||
|
||||
**Task:**-
|
||||
- Add opacity support to footprint library file format.
|
||||
- Add library table 3D model support to footprint library file format.
|
||||
- Create remapping utility to map from path look up to library table look up.
|
||||
- Add user interface support for 3D model opacity.
|
||||
- Add user interface support accessing 3D models via library table.
|
||||
|
||||
**Dependencies:**
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- No Progress.
|
||||
|
||||
## IPC-2581 Support ## {#v6_pcb_ipc_2581}
|
||||
**Goal:**
|
||||
|
||||
Add support for exporting to and importing from IPC-2581.
|
||||
|
||||
**Task:**-
|
||||
- Add IPC-2581 export code.
|
||||
- Add IPC-2581 import code.
|
||||
|
||||
**Dependencies:**
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- No Progress.
|
||||
|
||||
## Curved Trace Support ## {#v6_pcb}
|
||||
**Goal:**
|
||||
|
||||
Add curved trace support to the board editor.
|
||||
|
||||
**Task:**-
|
||||
- Add curved trace support to track object code.
|
||||
- Add support to board file format for curved traces.
|
||||
- Update zone fill algorithm to support curved fills.
|
||||
- Update router to support curved traces.
|
||||
- Update DRC to handle curved traces and fills.
|
||||
|
||||
**Dependencies:**
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- No Progress.
|
||||
|
||||
|
||||
# GerbView: Gerber File Viewer # {#v6_gerbview}
|
||||
|
||||
This section covers the source code for the GerbView gerber file viewer.
|
||||
|
||||
@@ -3,14 +3,16 @@
|
||||
This document is the KiCad Developer's road map document. It is a living
|
||||
document that should be maintained as the project progresses. The goal of
|
||||
this document is to provide an overview for developers of where the project
|
||||
is headed to prevent resource conflicts and endless rehashing of previously
|
||||
discussed topics. It is broken into sections for each major component of
|
||||
the KiCad source code and documentation. It defines tasks that developers
|
||||
an use to contribute to the project and provides updated status information.
|
||||
Tasks should define clear objective and avoid vague generalizations so that
|
||||
a new developer can complete the task. It is not a place for developers to
|
||||
add their own personal wish list It should only be updated with approval
|
||||
of the project manager after discussion with the lead developers.
|
||||
is headed beyond the current development cycle road map (currently
|
||||
[version 6](./v6_road_map.html) to prevent resource conflicts and endless
|
||||
rehashing of previously discussed topics. It is broken into sections for
|
||||
each major component of the KiCad source code and documentation. It defines
|
||||
tasks that developers an use to contribute to the project and provides updated
|
||||
status information. Tasks should define clear objectives and avoid vague
|
||||
generalizations so that a new developer can complete the task. It is not a
|
||||
place for developers to add their own personal wish list It should only be
|
||||
updated with approval of the project manager after discussion with the lead
|
||||
developers.
|
||||
|
||||
Each entry in the road map is made up of four sections. The goal should
|
||||
be a brief description of the what the road map entry will accomplish. The
|
||||
@@ -34,59 +36,16 @@ This section defines the tasks that affect all or most of KiCad or do not
|
||||
fit under as specific part of the code such as the board editor or the
|
||||
schematic editor.
|
||||
|
||||
## User Interface Modernization ## {#wxaui}
|
||||
**Goal:**
|
||||
|
||||
Give KiCad a more modern user interface with dockable tool bars and windows.
|
||||
Create perspectives to allow users to arrange dockable windows as they prefer.
|
||||
|
||||
**Task:**
|
||||
- Take advantage of the advanced UI features in wxAui such as detaching and
|
||||
hiding.
|
||||
- Study ergonomics of various commercial/proprietary PCB applications (when
|
||||
in doubt about any particular UI solution, check how it has been done in a
|
||||
certain proprietary app that is very popular among OSHW folks and do exactly
|
||||
opposite).
|
||||
- Clean up menu structure. Menus must allow access to all features of the
|
||||
program in a clear and logical way. Currently some functions of Pcbnew are
|
||||
accessible only through tool bars
|
||||
- Redesign dialogs, make sure they are following same style rules.
|
||||
- Check quality of translations. Either fix or remove bad quality translations.
|
||||
- Develop a global shortcut manager that allows the user assign arbitrary
|
||||
shortcuts for any tool or action.
|
||||
|
||||
**Dependencies:**
|
||||
- [wxWidgets 3](#wxwidgets3)
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
|
||||
|
||||
# Build Tools # {#build_tools}
|
||||
This section covers build tools for both the KiCad source as well as the
|
||||
custom dependency builds required to build KiCad.
|
||||
|
||||
|
||||
# Common Library # {#common_lib}
|
||||
This section covers the source code shared between all of the KiCad
|
||||
applications
|
||||
|
||||
## Unified Rendering Framework ## {#unified_rendering}
|
||||
**Goal:**
|
||||
|
||||
Provide a single framework for developing new tools. Port existing tools
|
||||
to the new framework and remove the legacy framework tools.
|
||||
|
||||
**Task:**
|
||||
- Port wxDC to GAL or get Cairo rendering to nearly the performance of the
|
||||
current wxDC rendering so that we have a single framework to develop new
|
||||
tools and we can continue to support systems that don't have a complete
|
||||
OpenGL stack.
|
||||
|
||||
**Dependencies**
|
||||
- [Tool framework](http://www.ohwr.org/projects/cern-kicad/wiki/WorkPackages)
|
||||
|
||||
**Status**
|
||||
- No progress
|
||||
|
||||
# KiCad: Application Launcher # {#kicad}
|
||||
This section applies to the source code for the KiCad application launcher.
|
||||
@@ -95,277 +54,19 @@ This section applies to the source code for the KiCad application launcher.
|
||||
# Eeschema: Schematic Editor # {#eeschema}
|
||||
This section applies to the source code for the Eeschema schematic editor.
|
||||
|
||||
## Graphics Abstraction Layer Conversion ## {#sch_gal}
|
||||
**Goal:**
|
||||
|
||||
Take advantage of advanced graphics rendering in Eeschema.
|
||||
|
||||
**Task:**
|
||||
- Port graphics rendering to GAL.
|
||||
|
||||
**Dependencies:**
|
||||
- None
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
|
||||
## Port Editing Tools ## {#sch_tool_framework}
|
||||
**Goal:**
|
||||
|
||||
Use standard tool framework across all applications.
|
||||
|
||||
**Task:**
|
||||
- Rewrite editing tools using the new tool framework.
|
||||
|
||||
**Dependencies:**
|
||||
- [GAL port](#sch_gal).
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
|
||||
## Allow Use of System Fonts ## {#sch_sys_fonts}
|
||||
**Goal:**
|
||||
|
||||
Currently the schematic editor uses the stroke drawn fonts which aren't really
|
||||
necessary for accurated printing of schematics. Allow the use of system fonts
|
||||
for schematic text.
|
||||
|
||||
**Task:**
|
||||
- Determine which library for font handling makes the most sense, wxWidgets or
|
||||
freetype.
|
||||
- Add support for selecting text object fonts.
|
||||
|
||||
**Dependencies:**
|
||||
- [S-expression schematic file format](#sch_sexpr).
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
|
||||
# CvPcb: Footprint Association Tool # {#cvpcb}
|
||||
This section covers the source code of the footprint assignment tool CvPcb.
|
||||
|
||||
|
||||
# Pcbnew: Circuit Board Editor # {#pcbnew}
|
||||
This section covers the source code of the board editing application Pcbnew.
|
||||
|
||||
## Model Export ## {#model_export}
|
||||
|
||||
**Goal:**
|
||||
|
||||
Provide improved solid modeling export to the file formats available in
|
||||
OpenCascade.
|
||||
|
||||
**Task:**
|
||||
- Add STEP 3D modeling capability.
|
||||
- Add IGES 3D modeling capability.
|
||||
- Add any other file formats supported by OpenCascade that make sense for
|
||||
KiCad.
|
||||
|
||||
**Dependencies:**
|
||||
- None
|
||||
|
||||
**Status:**
|
||||
- None
|
||||
|
||||
## Linked Objects ## {#pcb_linked_objects}
|
||||
**Goal:**
|
||||
|
||||
Provide a way to allow external objects such as footprints to be externally
|
||||
linked in the board file so that changes in the footprint are automatically
|
||||
updated. This will all a one to many object relationship which can pave the
|
||||
way for real board modules.
|
||||
|
||||
**Task:**
|
||||
- Add externally and internally linked objects to the file format to allow for
|
||||
footprints and/or other board objects to be shared (one to many relationship)
|
||||
instead of only supporting embedded objects (one to one relationship) that
|
||||
can only be edited in place.
|
||||
|
||||
**Dependencies:**
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
|
||||
## Pin and Part Swapping ## {#pcb_drc}
|
||||
**Goal:**
|
||||
|
||||
Allow Pcbnew to perform pin and/or part swapping during layout so the user
|
||||
does not have to do it in Eeschema and re-import the net list.
|
||||
|
||||
**Task:**
|
||||
- Provide forward and back annotation between the schematic and board editors.
|
||||
- Define netlist file format changes required to handle pin/part swapping.
|
||||
- Update netlist file formatter and parser to handle file format changes.
|
||||
- Develop a netlist comparison engine that will produce a netlist diff that
|
||||
can be passed between the schematic and board editors.
|
||||
- Create pin/part swap dialog to manipulate swappable pins and parts.
|
||||
- Add support to handle net label back annotation changes.
|
||||
|
||||
**Dependencies:**
|
||||
- [S-expression schematic file format](#sch_sexpr).
|
||||
- [Convert to a single process application](#kiway).
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
|
||||
## Clipboard Support ## {#fp_edit_clipboard}
|
||||
**Goal:**
|
||||
|
||||
Provide clipboard cut and paste for footprints..
|
||||
|
||||
**Task:**
|
||||
- Clipboard cut and paste to and from clipboard of footprints in footprint
|
||||
editor.
|
||||
|
||||
**Dependencies:**
|
||||
- None
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
|
||||
## Segment End Point Snapping. ## {#segment_snapping}
|
||||
**Goal:**
|
||||
|
||||
It is not uncommon for board edge segment end points to inadvertently not
|
||||
be closed causing issues for the 3D viewer and exporting to different file
|
||||
formats due the board outline not being a fully enclosed polygon. This
|
||||
feature would add segment end snapping support to allow the board outline
|
||||
to be fully enclosed. This feature would only need to be supported by the
|
||||
GAL rendering.
|
||||
|
||||
**Tasks**
|
||||
- Mark board edge segment ends with a drag indicator to make it visible to the
|
||||
user that the segment end does not have an endpoint with any other board edge
|
||||
segment.
|
||||
- Allow the user to smap the unconnected segment end to the nearest segment end
|
||||
point.
|
||||
- Automatically connect unconnected segments with and additional segment when
|
||||
opening the 3D viewer or exporting the board to another format. Warn the
|
||||
user that an addition segment has be added and should be verified.
|
||||
|
||||
**Dependencies:**
|
||||
- None
|
||||
|
||||
**Progress:**
|
||||
- Initial discussion.
|
||||
|
||||
## Keepout Zones. ## {#keepout_zones}
|
||||
**Goal:**
|
||||
|
||||
Add support for keepout zones on boards and footprints.
|
||||
|
||||
**Task:**
|
||||
- Add keepout support to zone classes.
|
||||
- Add keepout zone support to board editor.
|
||||
- Add keepout zone support to library editor.
|
||||
|
||||
**Dependencies:**
|
||||
- [DRC Improvements.](#drc_improvements)
|
||||
|
||||
**Progress:**
|
||||
- Planning
|
||||
|
||||
|
||||
## Net Highlighting ## {#pcb_net_highlight}
|
||||
**Goal:**
|
||||
|
||||
Highlight rats nest links and/or traces when corresponding net in Eeschema is selected.
|
||||
|
||||
**Task:**
|
||||
- Add communications link to handle net selection from Eeschema.
|
||||
- Implement highlight algorithm for objects connected to the selected net.
|
||||
- Highlight objects connected to net selected in Eeschema
|
||||
|
||||
**Dependencies:**
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
|
||||
## Hatched Zone Filling ## {#pcb_hatched_zones}
|
||||
**Goal:**
|
||||
|
||||
Currently Pcbnew only supports solid zone files. Add option to fill zones
|
||||
with hatching.
|
||||
|
||||
**Task:**
|
||||
- Determine zone fill method, required filling code, and file format requirements.
|
||||
- Add hatch option and hatch configuration to zone dialog.
|
||||
|
||||
**Dependencies:**
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
|
||||
|
||||
## Board Stack Up Impedance Calculator ## {#pcb_impedance_calc}
|
||||
**Goal:**
|
||||
|
||||
Provide a calculator to compute trace impedances using a full board stackup.
|
||||
Maybe this should be included in the PCB calculator application.
|
||||
|
||||
**Task:**
|
||||
- Design a trace impedance calculator that includes full board stackup.
|
||||
|
||||
**Dependencies:**
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
|
||||
## Net Class Improvements ## {#pcb_net_class_improvements}
|
||||
**Goal:**
|
||||
|
||||
Add support for route impedance, color selection, etc in net class object.
|
||||
|
||||
**Task:**
|
||||
- Determine parameters to add to net class object.
|
||||
- Implement file parser and formatter changes to support net class object
|
||||
changes.
|
||||
- Implement tools to work with new net class parameters.
|
||||
- Create UI elements to configure new net class parameters.
|
||||
- Update the render tab UI code to view traces by net class.
|
||||
|
||||
**Dependencies:**
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
|
||||
## Ratsnest Improvements ## {#pcb_ratsnest_improvements}
|
||||
**Goal:**
|
||||
|
||||
Add support for per net color and visibility settings.
|
||||
|
||||
**Task:**
|
||||
- Implement UI code to configure ratsnest color and visibility.
|
||||
- Update ratsnest code to handle per net color and visibility.
|
||||
|
||||
**Dependencies:**
|
||||
- None.
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
|
||||
|
||||
# GerbView: Gerber File Viewer # {#gerbview}
|
||||
|
||||
This section covers the source code for the GerbView gerber file viewer.
|
||||
|
||||
## Graphics Abstraction Layer ## {#gerbview_gal}
|
||||
**Goal:**
|
||||
|
||||
Graphics rendering unification.
|
||||
|
||||
**Task:**
|
||||
- Port graphics rendering layer to GAL.
|
||||
|
||||
**Dependencies:**
|
||||
- None.
|
||||
|
||||
**Status**
|
||||
- No progress.
|
||||
|
||||
# Documentation # {#documentation}
|
||||
This section defines the tasks for both the user and developer documentation.
|
||||
@@ -380,6 +81,7 @@ This section defines the tasks for both the user and developer documentation.
|
||||
**Status:**
|
||||
- No progress.
|
||||
|
||||
|
||||
# Unit Testing # {#unittest}
|
||||
**Goal:**
|
||||
|
||||
|
||||
@@ -105,18 +105,18 @@ The major parts of tool's implementation are the functions used by the
|
||||
when the GAL canvas is switched, and also just after tool registration.
|
||||
Any resource claimed from the GAL view or the model must be released
|
||||
in this function, as they could become invalid.
|
||||
* `SetTransitions()` function, which maps tool actions to functions
|
||||
* `setTransitions()` function, which maps tool actions to functions
|
||||
within the tool class.
|
||||
* One or more functions to call when actions are invoked. Many actions
|
||||
can invoke the same function if desired. The functions have the
|
||||
following signature:
|
||||
* int TOOL_CLASS::FunctionName( const TOOL_EVENT& aEvent )
|
||||
* Returning 0 means success.
|
||||
* Returning 0 means success.
|
||||
* These functions are called by the `TOOL_MANAGER` in case an associated
|
||||
event arrives (association is created with TOOL_INTERACTIVE::Go() function).
|
||||
* These can generally be private, as they are not called directly
|
||||
by any other code, but are invoked by the tool manager's coroutine
|
||||
framework according to the `SetTransitions()` map.
|
||||
framework according to the `setTransitions()` map.
|
||||
|
||||
### Interactive actions {#interactive-actions}
|
||||
|
||||
@@ -171,7 +171,7 @@ provide their own context menu. Tools that are called only from other
|
||||
tools' interactive modes add their menu items to those tools' menus.
|
||||
|
||||
To use a `TOOL_MENU` in a top level tool, simply add one as a member
|
||||
and initialise it with a reference to the tools at construction time:
|
||||
and initialize it with a reference to the tools at construction time:
|
||||
|
||||
TOOL_NAME: public PCB_TOOL
|
||||
{
|
||||
@@ -215,7 +215,7 @@ The procedure of a commit is:
|
||||
unless you are going to abort the commit.
|
||||
* When removing an item, call `Remove( item )`. You should not delete the
|
||||
removed item, it will be stored in the undo buffer.
|
||||
* Finalise the commit with `Push( "Description" )`. If you performed
|
||||
* Finalize the commit with `Push( "Description" )`. If you performed
|
||||
no modifications, additions or removals, this is a no-op, so you
|
||||
don't need to check if you made any changes before pushing.
|
||||
|
||||
@@ -284,7 +284,7 @@ In `pcbnew/tools/pcb_actions.h`, we add the following to the
|
||||
static TOOL_ACTION uselessFixedCircle;
|
||||
|
||||
Definitions of actions generally happen in the .cpp of the relevant tool.
|
||||
It doesn't actually matter where the defintion occurs (the declaration
|
||||
It doesn't actually matter where the definition occurs (the declaration
|
||||
is enough to use the action), as long as it's linked in the end.
|
||||
Similar tools should always be defined together.
|
||||
|
||||
@@ -337,11 +337,11 @@ the following class:
|
||||
///> React to model/view changes
|
||||
void Reset( RESET_REASON aReason ) override;
|
||||
|
||||
///> Basic initalization
|
||||
///> Basic initialization
|
||||
bool Init() override;
|
||||
|
||||
///> Bind handlers to corresponding TOOL_ACTIONs
|
||||
void SetTransitions() override;
|
||||
void setTransitions() override;
|
||||
|
||||
private:
|
||||
///> 'Move selected left' interactive tool
|
||||
@@ -392,7 +392,7 @@ Below you will find the contents of useless_tool.cpp:
|
||||
|
||||
|
||||
/*
|
||||
* Tool-specific action defintions
|
||||
* Tool-specific action definitions
|
||||
*/
|
||||
TOOL_ACTION PCB_ACTIONS::uselessMoveItemLeft(
|
||||
"pcbnew.UselessTool.MoveItemLeft",
|
||||
@@ -443,7 +443,7 @@ Below you will find the contents of useless_tool.cpp:
|
||||
void USELESS_TOOL::moveLeftInt()
|
||||
{
|
||||
// we will call actions on the selection tool to get the current
|
||||
// selection. The selection tools will handle item deisambiguation
|
||||
// selection. The selection tools will handle item disambiguation
|
||||
SELECTION_TOOL* selectionTool = m_toolMgr->GetTool<SELECTION_TOOL>();
|
||||
assert( selectionTool );
|
||||
|
||||
@@ -535,7 +535,7 @@ Below you will find the contents of useless_tool.cpp:
|
||||
}
|
||||
|
||||
|
||||
void USELESS_TOOL::SetTransitions()
|
||||
void USELESS_TOOL::setTransitions()
|
||||
{
|
||||
Go( &USELESS_TOOL::fixedCircle, PCB_ACTIONS::uselessFixedCircle.MakeEvent() );
|
||||
Go( &USELESS_TOOL::moveLeft, PCB_ACTIONS::uselessMoveItemLeft.MakeEvent() );
|
||||
|
||||
@@ -0,0 +1,255 @@
|
||||
Creative Commons Attribution-ShareAlike 4.0 International Public License
|
||||
|
||||
By exercising the Licensed Rights (defined below), You accept and agree to
|
||||
be bound by the terms and conditions of this Creative Commons
|
||||
Attribution-ShareAlike 4.0 International Public License ("Public License").
|
||||
To the extent this Public License may be interpreted as a contract, You are
|
||||
granted the Licensed Rights in consideration of Your acceptance of these
|
||||
terms and conditions, and the Licensor grants You such rights in
|
||||
consideration of benefits the Licensor receives from making the Licensed
|
||||
Material available under these terms and conditions.
|
||||
|
||||
Section 1 – Definitions.
|
||||
|
||||
a. Adapted Material means material subject to Copyright and Similar Rights
|
||||
that is derived from or based upon the Licensed Material and in which the
|
||||
Licensed Material is translated, altered, arranged, transformed, or
|
||||
otherwise modified in a manner requiring permission under the Copyright
|
||||
and Similar Rights held by the Licensor. For purposes of this Public
|
||||
License, where the Licensed Material is a musical work, performance, or
|
||||
sound recording, Adapted Material is always produced where the Licensed
|
||||
Material is synched in timed relation with a moving image.
|
||||
b. Adapter's License means the license You apply to Your Copyright and
|
||||
Similar Rights in Your contributions to Adapted Material in accordance
|
||||
with the terms and conditions of this Public License.
|
||||
c. BY-SA Compatible License means a license listed at
|
||||
creativecommons.org/compatiblelicenses, approved by Creative Commons as
|
||||
essentially the equivalent of this Public License.
|
||||
d. Copyright and Similar Rights means copyright and/or similar rights closely
|
||||
related to copyright including, without limitation, performance,
|
||||
broadcast, sound recording, and Sui Generis Database Rights, without
|
||||
regard to how the rights are labeled or categorized. For purposes of this
|
||||
Public License, the rights specified in Section 2(b)(1)-(2) are not
|
||||
Copyright and Similar Rights.
|
||||
e. Effective Technological Measures means those measures that, in the absence
|
||||
of proper authority, may not be circumvented under laws fulfilling
|
||||
obligations under Article 11 of the WIPO Copyright Treaty adopted on
|
||||
December 20, 1996, and/or similar international agreements.
|
||||
f. Exceptions and Limitations means fair use, fair dealing, and/or any other
|
||||
exception or limitation to Copyright and Similar Rights that applies to
|
||||
Your use of the Licensed Material.
|
||||
g. License Elements means the license attributes listed in the name of a
|
||||
Creative Commons Public License. The License Elements of this Public
|
||||
License are Attribution and ShareAlike.
|
||||
h. Licensed Material means the artistic or literary work, database, or other
|
||||
material to which the Licensor applied this Public License.
|
||||
i. Licensed Rights means the rights granted to You subject to the terms and
|
||||
conditions of this Public License, which are limited to all Copyright and
|
||||
Similar Rights that apply to Your use of the Licensed Material and that
|
||||
the Licensor has authority to license.
|
||||
j. Licensor means the individual(s) or entity(ies) granting rights under this
|
||||
Public License.
|
||||
k. Share means to provide material to the public by any means or process thati
|
||||
requires permission under the Licensed Rights, such as reproduction,
|
||||
public display, public performance, distribution, dissemination,
|
||||
communication, or importation, and to make material available to the
|
||||
public including in ways that members of the public may access the
|
||||
material from a place and at a time individually chosen by them.
|
||||
l. Sui Generis Database Rights means rights other than copyright resulting
|
||||
from Directive 96/9/EC of the European Parliament and of the Council of 11
|
||||
March 1996 on the legal protection of databases, as amended and/or
|
||||
succeeded, as well as other essentially equivalent rights anywhere in the
|
||||
world.
|
||||
m. You means the individual or entity exercising the Licensed Rights under
|
||||
this Public License. Your has a corresponding meaning.
|
||||
|
||||
Section 2 – Scope.
|
||||
|
||||
a. License grant.
|
||||
1. Subject to the terms and conditions of this Public License, the
|
||||
Licensor hereby grants You a worldwide, royalty-free,
|
||||
non-sublicensable, non-exclusive, irrevocable license to exercise the
|
||||
Licensed Rights in the Licensed Material to:
|
||||
A. reproduce and Share the Licensed Material, in whole or in part; and
|
||||
B. produce, reproduce, and Share Adapted Material.
|
||||
2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions
|
||||
and Limitations apply to Your use, this Public License does not apply,
|
||||
and you do not need to comply with its terms and conditions.
|
||||
3. Term. The term of this Public License is specified in Section 6(a).
|
||||
4. Media and formats; technical modifications allowed. The Licensor
|
||||
authorizes You to exercise the Licensed Rights in all media and formats
|
||||
whether now known or hereafter created, and to make technical
|
||||
modifications necessary to do so. The Licensor waives and/or agrees not
|
||||
to assert any right or authority to forbid You from making technical
|
||||
modifications necessary to exercise the Licensed Rights, including
|
||||
technical modifications necessary to circumvent Effective Technological
|
||||
Measures. For purposes of this Public License, simply making
|
||||
modifications authorized by this Section 2(a)(4) never produces Adapted
|
||||
Material.
|
||||
5. Downstream recipients.
|
||||
A. Offer from the Licensor – Licensed Material. Every recipient of the
|
||||
Licensed Material automatically receives an offer from the Licensor
|
||||
to exercise the Licensed Rights under the terms and conditions of
|
||||
this Public License.
|
||||
B. Additional offer from the Licensor – Adapted Material. Every
|
||||
recipient of Adapted Material from You automatically receives an
|
||||
offer from the Licensor to exercise the Licensed Rights in the
|
||||
Adapted Material under the conditions of the Adapter’s License You
|
||||
apply.
|
||||
C. No downstream restrictions. You may not offer or impose any
|
||||
additional or different terms or conditions on, or apply any
|
||||
Effective Technological Measures to, the Licensed Material if doing
|
||||
so restricts exercise of the Licensed Rights by any recipient of
|
||||
the Licensed Material.
|
||||
6. No endorsement. Nothing in this Public License constitutes or may be
|
||||
construed as permission to assert or imply that You are, or that Your
|
||||
use of the Licensed Material is, connected with, or sponsored,
|
||||
endorsed, or granted official status by, the Licensor or others
|
||||
designated to receive attribution as provided in Section 3(a)(1)(A)(i).
|
||||
|
||||
b. Other rights.
|
||||
1. Moral rights, such as the right of integrity, are not licensed under
|
||||
this Public License, nor are publicity, privacy, and/or other similar
|
||||
personality rights; however, to the extent possible, the Licensor
|
||||
waives and/or agrees not to assert any such rights held by the Licensor
|
||||
to the limited extent necessary to allow You to exercise the Licensed
|
||||
Rights, but not otherwise.
|
||||
2. Patent and trademark rights are not licensed under this Public License.
|
||||
3. To the extent possible, the Licensor waives any right to collect
|
||||
royalties from You for the exercise of the Licensed Rights, whether
|
||||
directly or through a collecting society under any voluntary or
|
||||
waivable statutory or compulsory licensing scheme. In all other cases
|
||||
the Licensor expressly reserves any right to collect such royalties.
|
||||
|
||||
Section 3 – License Conditions.
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the
|
||||
following conditions.
|
||||
|
||||
a. Attribution.
|
||||
1. If You Share the Licensed Material (including in modified form), You
|
||||
must:
|
||||
A. retain the following if it is supplied by the Licensor with the
|
||||
Licensed Material:
|
||||
i. identification of the creator(s) of the Licensed Material and any
|
||||
others designated to receive attribution, in any reasonable manner
|
||||
requested by the Licensor (including by pseudonym if designated);
|
||||
ii. a copyright notice;
|
||||
iii. a notice that refers to this Public License;
|
||||
iv. a notice that refers to the disclaimer of warranties;
|
||||
v. a URI or hyperlink to the Licensed Material to the extent
|
||||
reasonably practicable;
|
||||
B. indicate if You modified the Licensed Material and retain an
|
||||
indication of any previous modifications; and
|
||||
C. indicate the Licensed Material is licensed under this Public
|
||||
License, and include the text of, or the URI or hyperlink to, this
|
||||
Public License.
|
||||
2. You may satisfy the conditions in Section 3(a)(1) in any reasonable
|
||||
manner based on the medium, means, and context in which You Share the
|
||||
Licensed Material. For example, it may be reasonable to satisfy the
|
||||
conditions by providing a URI or hyperlink to a resource that includes
|
||||
the required information.
|
||||
3. If requested by the Licensor, You must remove any of the information
|
||||
required by Section 3(a)(1)(A) to the extent reasonably practicable.
|
||||
|
||||
b. ShareAlike.
|
||||
In addition to the conditions in Section 3(a), if You Share Adapted
|
||||
Material You produce, the following conditions also apply.
|
||||
1. The Adapter’s License You apply must be a Creative Commons license with
|
||||
the same License Elements, this version or later, or a BY-SA Compatible
|
||||
License.
|
||||
2. You must include the text of, or the URI or hyperlink to, the Adapter's
|
||||
License You apply. You may satisfy this condition in any reasonable
|
||||
manner based on the medium, means, and context in which You Share
|
||||
Adapted Material.
|
||||
3. You may not offer or impose any additional or different terms or
|
||||
conditions on, or apply any Effective Technological Measures to,
|
||||
Adapted Material that restrict exercise of the rights granted under the
|
||||
Adapter's License You apply.
|
||||
|
||||
Section 4 – Sui Generis Database Rights.
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that apply to
|
||||
Your use of the Licensed Material:
|
||||
a. for the avoidance of doubt, Section 2(a)(1) grants You the right to
|
||||
extract, reuse, reproduce, and Share all or a substantial portion of the
|
||||
contents of the database;
|
||||
b. if You include all or a substantial portion of the database contents in a
|
||||
database in which You have Sui Generis Database Rights, then the database
|
||||
in which You have Sui Generis Database Rights (but not its individual
|
||||
contents) is Adapted Material, including for purposes of Section 3(b); and
|
||||
c. You must comply with the conditions in Section 3(a) if You Share all or a
|
||||
substantial portion of the contents of the database.
|
||||
|
||||
For the avoidance of doubt, this Section 4 supplements and does not replace
|
||||
Your obligations under this Public License where the Licensed Rights include
|
||||
other Copyright and Similar Rights.
|
||||
|
||||
Section 5 – Disclaimer of Warranties and Limitation of Liability.
|
||||
|
||||
a. Unless otherwise separately undertaken by the Licensor, to the extent
|
||||
possible, the Licensor offers the Licensed Material as-is and as-available,
|
||||
and makes no representations or warranties of any kind concerning the
|
||||
Licensed Material, whether express, implied, statutory, or other. This
|
||||
includes, without limitation, warranties of title, merchantability, fitness
|
||||
for a particular purpose, non-infringement, absence of latent or other
|
||||
defects, accuracy, or the presence or absence of errors, whether or not
|
||||
known or discoverable. Where disclaimers of warranties are not allowed in
|
||||
full or in part, this disclaimer may not apply to You.
|
||||
b. To the extent possible, in no event will the Licensor be liable to You on
|
||||
any legal theory (including, without limitation, negligence) or otherwise
|
||||
for any direct, special, indirect, incidental, consequential, punitive,
|
||||
exemplary, or other losses, costs, expenses, or damages arising out of
|
||||
this Public License or use of the Licensed Material, even if the Licensor
|
||||
has been advised of the possibility of such losses, costs, expenses, or
|
||||
damages. Where a limitation of liability is not allowed in full or in
|
||||
part, this limitation may not apply to You.
|
||||
c. The disclaimer of warranties and limitation of liability provided above
|
||||
shall be interpreted in a manner that, to the extent possible, most
|
||||
closely approximates an absolute disclaimer and waiver of all liability.
|
||||
|
||||
Section 6 – Term and Termination.
|
||||
|
||||
a. This Public License applies for the term of the Copyright and Similar
|
||||
Rights licensed here. However, if You fail to comply with this Public
|
||||
License, then Your rights under this Public License terminate
|
||||
automatically.
|
||||
b. Where Your right to use the Licensed Material has terminated under
|
||||
Section 6(a), it reinstates:
|
||||
1. automatically as of the date the violation is cured, provided it is
|
||||
cured within 30 days of Your discovery of the violation; or
|
||||
2. upon express reinstatement by the Licensor.
|
||||
For the avoidance of doubt, this Section 6(b) does not affect any right
|
||||
the Licensor may have to seek remedies for Your violations of this Public
|
||||
License.
|
||||
c. For the avoidance of doubt, the Licensor may also offer the Licensed
|
||||
Material under separate terms or conditions or stop distributing the
|
||||
Licensed Material at any time; however, doing so will not terminate this
|
||||
Public License.
|
||||
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
|
||||
|
||||
Section 7 – Other Terms and Conditions.
|
||||
|
||||
a. The Licensor shall not be bound by any additional or different terms or
|
||||
conditions communicated by You unless expressly agreed.
|
||||
b. Any arrangements, understandings, or agreements regarding the Licensed
|
||||
Material not stated herein are separate from and independent of the terms
|
||||
and conditions of this Public License.
|
||||
|
||||
Section 8 – Interpretation.
|
||||
|
||||
a. For the avoidance of doubt, this Public License does not, and shall not
|
||||
be interpreted to, reduce, limit, restrict, or impose conditions on any use
|
||||
of the Licensed Material that could lawfully be made without permission
|
||||
under this Public License.
|
||||
b. To the extent possible, if any provision of this Public License is deemed
|
||||
unenforceable, it shall be automatically reformed to the minimum extent
|
||||
necessary to make it enforceable. If the provision cannot be reformed, it
|
||||
shall be severed from this Public License without affecting the
|
||||
enforceability of the remaining terms and conditions.
|
||||
c. No term or condition of this Public License will be waived and no failure
|
||||
to comply consented to unless expressly agreed to by the Licensor.
|
||||
d. Nothing in this Public License constitutes or may be interpreted as a
|
||||
limitation upon, or waiver of, any privileges and immunities that apply to
|
||||
the Licensor or You, including from the legal processes of any jurisdiction
|
||||
or authority.
|
||||
@@ -0,0 +1,17 @@
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -1,19 +1,23 @@
|
||||
The majority of KiCad's source code is developed and distributed under the terms
|
||||
of the GPLv3 or later. However, It does include some third-party code licensed
|
||||
under AGPLv3 or later as well as sections licensed under the BOOST license v1.0
|
||||
and portions licensed under the ISC license.
|
||||
|
||||
These licenses are compatible, but a combined works as is will be governed under
|
||||
the terms of the AGPLv3 (or later). This includes any binary distribution of the
|
||||
KiCad EDA suite by the KiCad project or any third party, e.g. Linux distributor.
|
||||
|
||||
You are free to use the *sources* under the terms of their respective licenses.
|
||||
|
||||
Licensed under AGPLv3 (or later):
|
||||
- TTL [https://www.sintef.no/projectweb/geometry-toolkits/ttl/], sources in include/ttl/*
|
||||
Licensed under BOOSTv1:
|
||||
- libcontext [https://github.com/boostorg/context], sources in common/system/libcontext.cpp
|
||||
Licensed under ISC:
|
||||
- portions of code in include/geometry/polygon_triangulation.h
|
||||
Licensed under GPLv3 (or later):
|
||||
- All remaining code not listed above
|
||||
The majority of KiCad's source code is developed and distributed under the terms
|
||||
of the GPLv3 or later. However, It does include some third-party code licensed
|
||||
under AGPLv3 or later as well as sections licensed under the BOOST license v1.0,
|
||||
the ISC license and the MIT license.
|
||||
|
||||
These licenses are compatible, but a combined works as is will be governed under
|
||||
the terms of the AGPLv3 (or later). This includes any binary distribution of the
|
||||
KiCad EDA suite by the KiCad project or any third party, e.g. Linux distributor.
|
||||
|
||||
You are free to use the *sources* under the terms of their respective licenses.
|
||||
|
||||
Licensed under AGPLv3 (or later):
|
||||
- TTL [https://www.sintef.no/projectweb/geometry-toolkits/ttl/], sources in include/ttl/*
|
||||
Licensed under BOOSTv1:
|
||||
- libcontext [https://github.com/boostorg/context], sources in common/system/libcontext.cpp
|
||||
Licensed under ISC:
|
||||
- portions of code in include/geometry/polygon_triangulation.h
|
||||
Licensed under MIT:
|
||||
- tinyspline_lib in dxflib_qcad/tinyspline_lib
|
||||
Licensed under CC-BY-SA-4.0:
|
||||
- All the demo files provided in demos/*
|
||||
Licensed under GPLv3 (or later):
|
||||
- All remaining code not listed above
|
||||
|
||||
@@ -7,13 +7,13 @@ AlignOperands: true
|
||||
AlignTrailingComments: true
|
||||
AllowAllParametersOfDeclarationOnNextLine: true
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
AllowShortCaseLabelsOnASingleLine: true
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: false
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: true
|
||||
AlwaysBreakTemplateDeclarations: false
|
||||
AlwaysBreakTemplateDeclarations: true
|
||||
BinPackArguments: true
|
||||
BinPackParameters: true
|
||||
BreakBeforeBinaryOperators: NonAssignment
|
||||
|
||||
@@ -55,7 +55,7 @@ target_link_libraries( bitmap2component
|
||||
|
||||
if( APPLE )
|
||||
set_target_properties( bitmap2component PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist
|
||||
MACOSX_BUNDLE_INFO_PLIST ${PROJECT_BINARY_DIR}/bitmap2component/Info.plist
|
||||
)
|
||||
|
||||
# put individual bundle outside of main bundle as a first step
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array/>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>bitmap2component</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string></string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>bitmap2component.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.kicad-pcb.bitmap2component</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleLongVersionString</key>
|
||||
<string></string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Bitmap 2 Component</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string></string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string></string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
<key>LSRequiresCarbon</key>
|
||||
<true/>
|
||||
<key>NSRequiresAquaSystemAppearance</key>
|
||||
<true/>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string></string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<string>True</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -450,7 +450,7 @@ void BM2CMP_FRAME::Binarize( double aThreshold )
|
||||
auto alpha = m_Greyscale_Image.HasAlpha() ?
|
||||
m_Greyscale_Image.GetAlpha( x, y ) : wxALPHA_OPAQUE;
|
||||
|
||||
if( pixin < threshold || alpha < alpha_thresh )
|
||||
if( pixin < threshold && alpha > alpha_thresh )
|
||||
pixout = 0;
|
||||
else
|
||||
pixout = 255;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jan 17 2019)
|
||||
// C++ code generated with wxFormBuilder (version 3.9.0 Nov 1 2020)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@@ -38,7 +38,7 @@ BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxS
|
||||
brightSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxStaticBoxSizer* sbSizerInfo;
|
||||
sbSizerInfo = new wxStaticBoxSizer( new wxStaticBox( m_panelRight, wxID_ANY, _("Bitmap Info:") ), wxVERTICAL );
|
||||
sbSizerInfo = new wxStaticBoxSizer( new wxStaticBox( m_panelRight, wxID_ANY, _("Bitmap Info") ), wxVERTICAL );
|
||||
|
||||
wxFlexGridSizer* fgSizerInfo;
|
||||
fgSizerInfo = new wxFlexGridSizer( 0, 4, 0, 0 );
|
||||
@@ -99,12 +99,12 @@ BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxS
|
||||
fgSizerInfo->Add( m_staticTextBPI, 0, wxALIGN_RIGHT|wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_DPIValueX = new wxTextCtrl( sbSizerInfo->GetStaticBox(), wxID_ANY, _("300"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_DPIValueX->SetMinSize( wxSize( 40,-1 ) );
|
||||
m_DPIValueX->SetMinSize( wxSize( 45,-1 ) );
|
||||
|
||||
fgSizerInfo->Add( m_DPIValueX, 0, wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
m_DPIValueY = new wxTextCtrl( sbSizerInfo->GetStaticBox(), wxID_ANY, _("300"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_DPIValueY->SetMinSize( wxSize( 40,-1 ) );
|
||||
m_DPIValueY->SetMinSize( wxSize( 45,-1 ) );
|
||||
|
||||
fgSizerInfo->Add( m_DPIValueY, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
@@ -128,12 +128,12 @@ BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxS
|
||||
|
||||
wxString m_radioBoxFormatChoices[] = { _("Eeschema (.lib file)"), _("Pcbnew (.kicad_mod file)"), _("Postscript (.ps file)"), _("Logo for title block (.kicad_wks file)") };
|
||||
int m_radioBoxFormatNChoices = sizeof( m_radioBoxFormatChoices ) / sizeof( wxString );
|
||||
m_radioBoxFormat = new wxRadioBox( m_panelRight, wxID_ANY, _("Format:"), wxDefaultPosition, wxDefaultSize, m_radioBoxFormatNChoices, m_radioBoxFormatChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_radioBoxFormat = new wxRadioBox( m_panelRight, wxID_ANY, _("Format"), wxDefaultPosition, wxDefaultSize, m_radioBoxFormatNChoices, m_radioBoxFormatChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_radioBoxFormat->SetSelection( 1 );
|
||||
brightSizer->Add( m_radioBoxFormat, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
wxStaticBoxSizer* sbSizer2;
|
||||
sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( m_panelRight, wxID_ANY, _("Image Options:") ), wxVERTICAL );
|
||||
sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( m_panelRight, wxID_ANY, _("Image Options") ), wxVERTICAL );
|
||||
|
||||
m_ThresholdText = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("Black / White Threshold:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_ThresholdText->Wrap( -1 );
|
||||
@@ -152,7 +152,7 @@ BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxS
|
||||
|
||||
wxString m_radio_PCBLayerChoices[] = { _("Front silk screen"), _("Front solder mask"), _("User layer Eco1"), _("User layer Eco2") };
|
||||
int m_radio_PCBLayerNChoices = sizeof( m_radio_PCBLayerChoices ) / sizeof( wxString );
|
||||
m_radio_PCBLayer = new wxRadioBox( m_panelRight, wxID_ANY, _("Board Layer for Outline:"), wxDefaultPosition, wxDefaultSize, m_radio_PCBLayerNChoices, m_radio_PCBLayerChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_radio_PCBLayer = new wxRadioBox( m_panelRight, wxID_ANY, _("Board Layer for Outline"), wxDefaultPosition, wxDefaultSize, m_radio_PCBLayerNChoices, m_radio_PCBLayerChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_radio_PCBLayer->SetSelection( 3 );
|
||||
m_radio_PCBLayer->SetToolTip( _("Choose the board layer to place the outline.\nThe 2 invisible fields reference and value are always placed on the silk screen layer.") );
|
||||
|
||||
@@ -167,6 +167,7 @@ BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxS
|
||||
|
||||
this->SetSizer( bMainSizer );
|
||||
this->Layout();
|
||||
bMainSizer->Fit( this );
|
||||
m_statusBar = this->CreateStatusBar( 1, wxSTB_SIZEGRIP, wxID_ANY );
|
||||
|
||||
// Connect Events
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<property name="file">bitmap2cmp_gui_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">bitmap2cmp_gui</property>
|
||||
@@ -25,6 +26,7 @@
|
||||
<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="Frame" expanded="1">
|
||||
@@ -45,7 +47,7 @@
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">BM2CMP_FRAME_BASE</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size">733,634</property>
|
||||
<property name="size">-1,-1</property>
|
||||
<property name="style">wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER</property>
|
||||
<property name="subclass">KIWAY_PLAYER; kiway_player.h</property>
|
||||
<property name="title">Bitmap to Component Converter</property>
|
||||
@@ -364,7 +366,7 @@
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Bitmap Info:</property>
|
||||
<property name="label">Bitmap Info</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">sbSizerInfo</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
@@ -1166,7 +1168,7 @@
|
||||
<property name="maxlength"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size">40,-1</property>
|
||||
<property name="minimum_size">45,-1</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_DPIValueX</property>
|
||||
<property name="pane_border">1</property>
|
||||
@@ -1232,7 +1234,7 @@
|
||||
<property name="maxlength"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size">40,-1</property>
|
||||
<property name="minimum_size">45,-1</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_DPIValueY</property>
|
||||
<property name="pane_border">1</property>
|
||||
@@ -1338,6 +1340,7 @@
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="auth_needed">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmap"></property>
|
||||
@@ -1411,6 +1414,7 @@
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="auth_needed">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmap"></property>
|
||||
@@ -1504,7 +1508,7 @@
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Format:</property>
|
||||
<property name="label">Format</property>
|
||||
<property name="majorDimension">1</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
@@ -1544,7 +1548,7 @@
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Image Options:</property>
|
||||
<property name="label">Image Options</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">sbSizer2</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
@@ -1777,7 +1781,7 @@
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Board Layer for Outline:</property>
|
||||
<property name="label">Board Layer for Outline</property>
|
||||
<property name="majorDimension">1</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jan 17 2019)
|
||||
// C++ code generated with wxFormBuilder (version 3.9.0 Nov 1 2020)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@@ -89,7 +89,7 @@ class BM2CMP_FRAME_BASE : public KIWAY_PLAYER
|
||||
|
||||
public:
|
||||
|
||||
BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Bitmap to Component Converter"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 733,634 ), long style = wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER|wxTAB_TRAVERSAL );
|
||||
BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Bitmap to Component Converter"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER|wxTAB_TRAVERSAL );
|
||||
|
||||
~BM2CMP_FRAME_BASE();
|
||||
|
||||
|
||||
@@ -155,7 +155,6 @@ int bitmap2component( potrace_bitmap_t* aPotrace_bitmap, FILE* aOutfile,
|
||||
return 1;
|
||||
}
|
||||
|
||||
printf("Step 1\n");
|
||||
BITMAPCONV_INFO info;
|
||||
info.m_PixmapWidth = aPotrace_bitmap->w;
|
||||
info.m_PixmapHeight = aPotrace_bitmap->h; // the bitmap size in pixels
|
||||
@@ -491,9 +490,9 @@ void BITMAPCONV_INFO::CreateOutputFile( BMP2CMP_MOD_LAYER aModLayer )
|
||||
if( paths->next == NULL || paths->next->sign == '+' )
|
||||
{
|
||||
// Substract holes to main polygon:
|
||||
polyset_areas.Simplify( SHAPE_POLY_SET::PM_FAST );
|
||||
polyset_holes.Simplify( SHAPE_POLY_SET::PM_FAST );
|
||||
polyset_areas.BooleanSubtract( polyset_holes, SHAPE_POLY_SET::PM_FAST );
|
||||
polyset_areas.Simplify( SHAPE_POLY_SET::PM_STRICTLY_SIMPLE );
|
||||
polyset_holes.Simplify( SHAPE_POLY_SET::PM_STRICTLY_SIMPLE );
|
||||
polyset_areas.BooleanSubtract( polyset_holes, SHAPE_POLY_SET::PM_STRICTLY_SIMPLE );
|
||||
polyset_areas.Fracture( SHAPE_POLY_SET::PM_STRICTLY_SIMPLE );
|
||||
|
||||
// Output current resulting polygon(s)
|
||||
|
||||
@@ -8,14 +8,20 @@
|
||||
static const unsigned char png[] = {
|
||||
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
|
||||
0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x08, 0x06, 0x00, 0x00, 0x00, 0x1f, 0xf3, 0xff,
|
||||
0x61, 0x00, 0x00, 0x00, 0x60, 0x49, 0x44, 0x41, 0x54, 0x38, 0xcb, 0x63, 0x90, 0x92, 0x92, 0xfa,
|
||||
0x0f, 0xc2, 0x0c, 0xe4, 0x02, 0xaa, 0x19, 0x20, 0x2e, 0x2e, 0x2e, 0x46, 0x91, 0x01, 0xd2, 0xd2,
|
||||
0xd2, 0x97, 0xc9, 0x32, 0x04, 0x66, 0x00, 0x14, 0x5f, 0x97, 0x97, 0x97, 0x97, 0x24, 0xd7, 0x80,
|
||||
0x4b, 0x64, 0x19, 0x02, 0x33, 0x40, 0x42, 0x42, 0x42, 0x94, 0x2c, 0x43, 0x90, 0x63, 0x01, 0x14,
|
||||
0x06, 0xa0, 0xb0, 0x40, 0xf3, 0x16, 0x5e, 0x4c, 0x3d, 0x03, 0xd0, 0xbd, 0x20, 0x2a, 0x2a, 0x2a,
|
||||
0x41, 0x76, 0x20, 0x12, 0xad, 0x19, 0x5b, 0x34, 0x92, 0xa4, 0x99, 0xaa, 0x09, 0x89, 0xe2, 0xa4,
|
||||
0x3c, 0x60, 0xb9, 0x11, 0x00, 0xd8, 0xbd, 0x63, 0x3e, 0x86, 0xe5, 0x97, 0x0f, 0x00, 0x00, 0x00,
|
||||
0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
|
||||
0x61, 0x00, 0x00, 0x00, 0xb9, 0x49, 0x44, 0x41, 0x54, 0x38, 0xcb, 0x63, 0x60, 0x40, 0x03, 0x52,
|
||||
0x52, 0x52, 0xff, 0x41, 0x98, 0x01, 0x0b, 0x10, 0x11, 0x11, 0xe1, 0x95, 0x94, 0x94, 0xdc, 0xca,
|
||||
0x80, 0x0f, 0xe0, 0x32, 0x40, 0x5a, 0x5a, 0x5a, 0x06, 0x28, 0x7e, 0x1e, 0x97, 0xe1, 0x70, 0x1b,
|
||||
0xb0, 0x19, 0x20, 0x23, 0x23, 0x63, 0x06, 0x14, 0x7b, 0x81, 0xcf, 0x75, 0x20, 0xc0, 0x08, 0xb4,
|
||||
0x65, 0x2d, 0xba, 0x22, 0xa0, 0x93, 0x83, 0x80, 0xfc, 0xaf, 0x30, 0x71, 0x9c, 0x06, 0x00, 0x35,
|
||||
0xd7, 0xa0, 0x2b, 0x02, 0xd2, 0x65, 0x40, 0xfc, 0x17, 0x2a, 0x36, 0x0b, 0xa7, 0x01, 0x40, 0x41,
|
||||
0x37, 0x20, 0xfe, 0x83, 0xa4, 0x18, 0x84, 0xa7, 0x42, 0xe9, 0x7f, 0x40, 0xdc, 0x80, 0x33, 0x7c,
|
||||
0x80, 0xfe, 0x53, 0x05, 0x0a, 0xbe, 0x07, 0x49, 0x00, 0x9d, 0x5b, 0x85, 0xec, 0x0a, 0x20, 0xfe,
|
||||
0x0e, 0xc4, 0x11, 0x78, 0x03, 0x18, 0x28, 0x70, 0x05, 0x24, 0x08, 0xf2, 0x3f, 0x28, 0x1c, 0xd0,
|
||||
0x0c, 0x20, 0x88, 0x29, 0x37, 0x40, 0x5c, 0x5c, 0x5c, 0x11, 0xc8, 0x78, 0x03, 0x35, 0xa4, 0x9a,
|
||||
0x50, 0x54, 0xe1, 0x4a, 0x3c, 0xae, 0xe8, 0x81, 0xc8, 0x40, 0x2a, 0x40, 0xb6, 0x9d, 0x2c, 0x03,
|
||||
0x70, 0x25, 0x24, 0x92, 0x00, 0xae, 0xa4, 0x4c, 0x6a, 0x78, 0xd0, 0xd7, 0x00, 0x00, 0xe0, 0x1c,
|
||||
0x80, 0xeb, 0x37, 0x41, 0x6c, 0xd9, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42,
|
||||
0x60, 0x82,
|
||||
};
|
||||
|
||||
const BITMAP_OPAQUE pinshape_clock_fall_xpm[1] = {{ png, sizeof( png ), "pinshape_clock_fall_xpm" }};
|
||||
|
||||
@@ -7,30 +7,23 @@
|
||||
|
||||
static const unsigned char png[] = {
|
||||
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
|
||||
0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c,
|
||||
0xce, 0x00, 0x00, 0x01, 0x4b, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xed, 0xd5, 0xbf, 0x4b, 0x02,
|
||||
0x61, 0x00, 0x87, 0xf1, 0x77, 0x51, 0x9c, 0x0c, 0x91, 0xa0, 0x25, 0x30, 0xc2, 0xa0, 0x6c, 0x15,
|
||||
0x22, 0xa4, 0xa8, 0x21, 0xa7, 0xa2, 0x21, 0xb2, 0x74, 0x09, 0x49, 0x73, 0x13, 0x13, 0xd4, 0x6a,
|
||||
0x13, 0x5c, 0x0c, 0x44, 0xa4, 0x1f, 0xc4, 0x21, 0x35, 0xa4, 0x21, 0x18, 0x05, 0x81, 0x24, 0x38,
|
||||
0x35, 0x34, 0x49, 0x4b, 0xfd, 0x07, 0x81, 0xe0, 0x12, 0xb7, 0x1c, 0x0d, 0x05, 0x4f, 0xc3, 0x91,
|
||||
0x60, 0x5a, 0x17, 0x62, 0x11, 0xe1, 0xc1, 0x03, 0x77, 0xf0, 0x85, 0x0f, 0xef, 0xbb, 0x9c, 0xa8,
|
||||
0xd5, 0x6a, 0xfc, 0x46, 0xa2, 0x07, 0xfd, 0x7d, 0x48, 0x96, 0x65, 0x7e, 0xfa, 0x51, 0x14, 0xa5,
|
||||
0x07, 0x75, 0x1b, 0xaa, 0xd7, 0xc1, 0xef, 0x57, 0x8b, 0xc7, 0x21, 0x12, 0x51, 0xdf, 0xc3, 0xe1,
|
||||
0xce, 0xa1, 0xeb, 0xca, 0x03, 0xa9, 0x83, 0xdb, 0xa6, 0xaa, 0xa7, 0x65, 0x10, 0x02, 0xec, 0x76,
|
||||
0xc8, 0x64, 0x20, 0x10, 0x00, 0xab, 0x15, 0x8c, 0x46, 0xce, 0xce, 0xef, 0x5b, 0xf6, 0x5a, 0xe5,
|
||||
0x8b, 0x77, 0x88, 0xf4, 0xe1, 0x0d, 0x7d, 0x43, 0xbb, 0x4d, 0x1d, 0x87, 0x24, 0x15, 0x72, 0xb9,
|
||||
0x20, 0x97, 0x83, 0x44, 0x02, 0x1c, 0x0e, 0xd0, 0xeb, 0x99, 0x77, 0x17, 0x5a, 0xf6, 0x5a, 0xad,
|
||||
0x07, 0x2f, 0xda, 0x43, 0x85, 0xf0, 0x11, 0xe8, 0x74, 0x50, 0x2a, 0xa9, 0x65, 0xb3, 0x20, 0xa9,
|
||||
0xf8, 0xaa, 0xb7, 0xd8, 0x3d, 0x68, 0x7f, 0xf3, 0x44, 0x3d, 0x91, 0x10, 0x3c, 0x7b, 0x7d, 0xbc,
|
||||
0x8e, 0xda, 0xd4, 0x6f, 0x93, 0x09, 0xe7, 0x52, 0xbe, 0x7b, 0xd0, 0xc4, 0x5c, 0x96, 0xaa, 0x6d,
|
||||
0x86, 0x84, 0xc9, 0xc9, 0xd8, 0xe0, 0x0e, 0x8b, 0x03, 0x3e, 0x62, 0xe6, 0x05, 0x1e, 0xdd, 0x1b,
|
||||
0xf4, 0x8f, 0xa4, 0x3a, 0x83, 0xca, 0xd2, 0x15, 0xe9, 0xd9, 0x50, 0x4b, 0x95, 0xe8, 0x1e, 0x16,
|
||||
0x4b, 0xbc, 0x31, 0x9e, 0x1c, 0xde, 0xe6, 0x32, 0x98, 0x6e, 0xbb, 0xd5, 0x2a, 0xbf, 0x25, 0x21,
|
||||
0xe4, 0x64, 0xb2, 0x71, 0x4d, 0x1f, 0x7b, 0x5a, 0x59, 0x63, 0x79, 0x3c, 0x4a, 0xcc, 0x11, 0xe5,
|
||||
0x65, 0x6a, 0xfa, 0xd3, 0x9d, 0x56, 0x8a, 0xc7, 0xf3, 0x35, 0x84, 0x10, 0x60, 0x36, 0x83, 0xc1,
|
||||
0xd0, 0x31, 0xf2, 0x7d, 0xa8, 0x0b, 0xfd, 0x53, 0xa8, 0xf7, 0x2b, 0xef, 0x41, 0xef, 0xbd, 0x01,
|
||||
0xd4, 0x13, 0x20, 0xa3, 0x03, 0x4f, 0x86, 0x07, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44,
|
||||
0xae, 0x42, 0x60, 0x82,
|
||||
0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x02, 0x00, 0x00, 0x00, 0x26, 0x28, 0xdb,
|
||||
0x99, 0x00, 0x00, 0x00, 0xdc, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0x63, 0x78, 0x46, 0x55, 0xc0,
|
||||
0x30, 0x6a, 0x1c, 0xf9, 0xc6, 0x7d, 0xf8, 0xf0, 0xe1, 0x3f, 0x95, 0xc0, 0xd7, 0xaf, 0x5f, 0x69,
|
||||
0x6c, 0xdc, 0xdd, 0xbb, 0xdf, 0x96, 0x2e, 0xbe, 0x3d, 0x73, 0xfa, 0x8d, 0xbd, 0x7b, 0xdf, 0xfd,
|
||||
0xfe, 0xfd, 0x8f, 0x32, 0xe3, 0x7e, 0xff, 0x51, 0x55, 0x38, 0xcc, 0xcb, 0xbd, 0x55, 0x5d, 0x71,
|
||||
0x11, 0x03, 0xc3, 0xfe, 0xed, 0xf3, 0xaf, 0x50, 0xea, 0x3a, 0x13, 0xdd, 0xa3, 0x2c, 0x2c, 0x07,
|
||||
0x0c, 0x0d, 0x4f, 0x33, 0x32, 0xee, 0x3f, 0xbe, 0xe6, 0x2a, 0xc9, 0xc6, 0x6d, 0xd9, 0xf2, 0xb0,
|
||||
0xa3, 0xe3, 0x2e, 0x1c, 0xb9, 0xd9, 0x1f, 0xbf, 0x71, 0xe3, 0xeb, 0x8b, 0x17, 0x3f, 0x6b, 0x6b,
|
||||
0xef, 0x35, 0xa7, 0xed, 0x47, 0x96, 0x22, 0x88, 0x16, 0x2e, 0xbc, 0xc7, 0xd0, 0xd5, 0x75, 0x0d,
|
||||
0xe8, 0x2f, 0x38, 0xf2, 0xb5, 0x3d, 0x34, 0x7f, 0xfe, 0x73, 0x20, 0x6a, 0x6a, 0xbc, 0x2f, 0xca,
|
||||
0xbc, 0x11, 0x59, 0x8a, 0x20, 0x8a, 0x8e, 0x3e, 0x87, 0x6e, 0x9c, 0x08, 0xf3, 0xa6, 0x86, 0x9a,
|
||||
0xdb, 0x3b, 0x76, 0xbc, 0xb5, 0x50, 0xd8, 0x4c, 0x92, 0x59, 0xd8, 0x8d, 0x03, 0x22, 0x1e, 0xc6,
|
||||
0xed, 0x32, 0xcc, 0x6b, 0x48, 0x35, 0x0b, 0xa7, 0x71, 0x64, 0x23, 0x90, 0x71, 0x5b, 0x27, 0xef,
|
||||
0xef, 0x34, 0x6e, 0xa7, 0x0a, 0x5a, 0x98, 0xb7, 0x9a, 0xe1, 0x43, 0x57, 0xd7, 0x7f, 0x06, 0x06,
|
||||
0xaa, 0xa0, 0xaf, 0xd1, 0xd1, 0xa3, 0xc6, 0x51, 0x60, 0xdc, 0x68, 0x5d, 0x31, 0x58, 0x8c, 0x03,
|
||||
0x00, 0x7a, 0x13, 0x67, 0x71, 0xe0, 0xcc, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e,
|
||||
0x44, 0xae, 0x42, 0x60, 0x82,
|
||||
};
|
||||
|
||||
const BITMAP_OPAQUE lang_sl_xpm[1] = {{ png, sizeof( png ), "lang_sl_xpm" }};
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
version="1.1"
|
||||
viewBox="-2100 -1470 151.66666 151.66666"
|
||||
id="svg2"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
inkscape:version="0.92.4 5da689c313, 2019-01-14"
|
||||
sodipodi:docname="lang_sl.svg">
|
||||
<metadata
|
||||
id="metadata37">
|
||||
@@ -22,6 +22,7 @@
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>Flag of Brazil</dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
@@ -34,29 +35,23 @@
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="744"
|
||||
inkscape:window-width="1015"
|
||||
inkscape:window-height="938"
|
||||
id="namedview35"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.921875"
|
||||
inkscape:cx="-38.508475"
|
||||
inkscape:cy="128"
|
||||
inkscape:zoom="5.6568542"
|
||||
inkscape:cx="5.7280975"
|
||||
inkscape:cy="9.0111021"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg2" />
|
||||
inkscape:window-y="90"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="g918"
|
||||
showguides="true"
|
||||
inkscape:guide-bbox="true" />
|
||||
<title
|
||||
id="title4">Flag of Brazil</title>
|
||||
<defs
|
||||
id="defs6">
|
||||
<clipPath
|
||||
id="a">
|
||||
<path
|
||||
d="m 171.82,258.25 c -26.762,-12.893 -65.044,-38.479 -65.044,-89.094 0,-50.614 2.42,-73.633 2.42,-73.633 h 125.25 c 0,0 2.422,23.019 2.422,73.633 -0.001,50.616 -38.286,76.201 -65.05,89.094 z"
|
||||
id="path9"
|
||||
inkscape:connector-curvature="0" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
id="defs6" />
|
||||
<clipPath
|
||||
id="clipPath11">
|
||||
<circle
|
||||
@@ -86,7 +81,7 @@
|
||||
y="-540.56"
|
||||
x="-116.67"
|
||||
id="rect19"
|
||||
style="fill:#0f218b" />
|
||||
style="fill:#0000bf;fill-opacity:1" />
|
||||
<rect
|
||||
height="252.78"
|
||||
width="1225"
|
||||
@@ -101,30 +96,49 @@
|
||||
x="-116.67"
|
||||
id="rect23"
|
||||
style="fill:#ff0000" />
|
||||
<path
|
||||
d="m 121.41,-423.58 c 0,-111.98 7.1462,-174.77 7.1462,-174.77 h 321.57 c 0,0 7.1486,62.786 7.1486,174.77 0,119.2 -97.529,178.65 -161.74,207.37 l -6.1942,2.7706 -6.1871,-2.7706 c -64.207,-28.717 -161.74,-88.167 -161.74,-207.37 z"
|
||||
id="path25"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff;fill-rule:evenodd" />
|
||||
<path
|
||||
d="m 289.34,-228.14 c -63.222,-28.283 -153.66,-84.409 -153.66,-195.44 0,-111.031 5.717,-161.52 5.717,-161.52 h 295.89 c 0,0 5.7217,50.495 5.7217,161.52 -0.002,111.03 -90.446,167.16 -153.67,195.44 z"
|
||||
id="path27"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ff0000" />
|
||||
<path
|
||||
d="m 302.86,-452.69 c 17.118,0.25665 50.522,0.87964 80.262,-8.3622 0,0 -0.78666,9.8824 -0.78666,21.395 0,11.514 0.78666,21.397 0.78666,21.397 -27.281,-8.4762 -60.971,-8.6539 -80.262,-8.4258 v 61.325 h -27.04 v -61.325 c -19.294,-0.22801 -52.979,-0.0506 -80.262,8.4258 0,0 0.78666,-9.8824 0.78666,-21.397 0,-11.512 -0.78666,-21.395 -0.78666,-21.395 29.74,9.2418 63.142,8.6188 80.262,8.3622 v -38.514 c -15.604,-0.12944 -38.089,0.56377 -63.51,8.4631 0,0 0.7867,-9.8824 0.7867,-21.397 0,-11.512 -0.7867,-21.395 -0.7867,-21.395 25.386,7.8862 47.841,8.5903 63.439,8.4631 -0.80085,-24.389 -8.4526,-55.126 -8.4526,-55.126 0,0 15.748,1.1429 22.041,1.1429 6.3028,0 22.046,-1.1429 22.046,-1.1429 0,0 -7.6495,30.74 -8.4526,55.126 15.601,0.1251 38.056,-0.57694 63.442,-8.4631 0,0 -0.7867,9.8823 -0.7867,21.395 0,11.514 0.7867,21.397 0.7867,21.397 -25.424,-7.8993 -47.909,-8.5925 -63.513,-8.4631 v 38.514 z"
|
||||
id="path29"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff" />
|
||||
<g
|
||||
transform="matrix(2.3624,0,0,2.1936,-116.57,-794.65)"
|
||||
clip-path="url(#a)"
|
||||
id="g31">
|
||||
transform="matrix(2.9274818,0,0,2.8240134,133.11513,-26.272245)"
|
||||
id="g918">
|
||||
<path
|
||||
d="m 170.64,274.85 -55.454,-49.43 c 0,0 7.089,-22.927 20.927,-22.927 10.996,0 15.009,8.865 15.009,8.865 0,0 7.22,-18.689 20.696,-18.689 13.479,0 20.699,18.689 20.699,18.689 0,0 4.013,-8.865 15.01,-8.865 13.838,0 20.927,22.927 20.927,22.927 l -57.814,49.43 z"
|
||||
id="path33"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#0f218b;fill-rule:evenodd" />
|
||||
id="path13"
|
||||
style="fill:#ed1c24;fill-opacity:1"
|
||||
d="m -9.8011001,-221.38606 c -0.8919999,0.39333 -1.7773329,0.80166 -2.6559999,1.22466 l 2.7679999,43.79933 c 0.754,11.94066 5.831999,23.241 14.3419982,31.75066 5.8193329,5.819 12.9433319,10.034 20.6849979,12.358 h 6.67e-4 c 7.741666,-2.32433 14.865998,-6.539 20.684998,-12.358 8.509666,-8.50966 13.587999,-19.81 14.341665,-31.75066 l 2.768333,-43.79933 c -0.879,-0.423 -1.763666,-0.83133 -2.656333,-1.22466 l 6.67e-4,3.3e-4 -2.833333,44.83632 c -0.709,11.28567 -5.507,21.96667 -13.549332,30.009 -5.3,5.30067 -11.746666,9.19133 -18.756332,11.43167 h -10e-4 c -7.009999,-2.24034 -13.455998,-6.131 -18.7559979,-11.43167 -8.0426662,-8.04233 -12.8406652,-18.72333 -13.5493322,-30.009 l -2.833666,-44.83665 h 6.66e-4" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path15"
|
||||
style="fill:#0000bf;fill-opacity:1"
|
||||
d="m 60.477893,-221.38573 c -10.967666,-4.83567 -22.921331,-7.403 -35.139663,-7.403 -12.218666,0 -24.1723311,2.56733 -35.1399971,7.403 l 2.834,44.83632 c 0.708666,11.28567 5.506666,21.96667 13.5493322,30.009 5.3003329,5.30067 11.7463319,9.19133 18.7559979,11.43167 h 0.001 c 7.009666,-2.24034 13.456332,-6.131 18.755665,-11.43167 8.042999,-8.04233 12.840998,-18.72333 13.549332,-30.009" />
|
||||
<polyline
|
||||
transform="matrix(0.3333333,0,0,0.3333333,-12.4571,-228.78873)"
|
||||
points="119.764,62.917 124.434,56.539 116.574,57.394 113.386,50.161 110.197,57.394 102.338,56.539 107.008,62.917 102.338,69.295 110.197,68.44 113.386,75.673 116.574,68.44 124.434,69.295 "
|
||||
id="polyline17"
|
||||
style="fill:#ffdd00;fill-opacity:1" />
|
||||
<polyline
|
||||
transform="matrix(0.3333333,0,0,0.3333333,-12.4571,-228.78873)"
|
||||
points="90,23.232 94.669,16.854 86.811,17.709 83.622,10.476 80.433,17.709 72.575,16.854 77.244,23.232 72.575,29.61 80.433,28.755 83.622,35.988 86.811,28.755 94.669,29.61 "
|
||||
id="polyline19"
|
||||
style="fill:#ffdd00;fill-opacity:1" />
|
||||
<polyline
|
||||
transform="matrix(0.3333333,0,0,0.3333333,-12.4571,-228.78873)"
|
||||
points="149.527,23.232 154.195,16.854 146.338,17.709 143.148,10.476 139.959,17.709 132.102,16.854 136.771,23.232 132.102,29.61 139.959,28.755 143.148,35.988 146.338,28.755 154.195,29.61 "
|
||||
id="polyline21"
|
||||
style="fill:#ffdd00;fill-opacity:1" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path23"
|
||||
style="fill:#ffffff"
|
||||
d="m 53.684893,-170.02074 -14.173665,-18.89799 -5.669333,7.55933 -8.503999,-17.008 -8.503999,17.008 -5.669333,-7.55933 -14.1733321,18.89799 c 0,2.506 0.995667,4.909 2.76766698,6.681 1.77200002,1.77133 4.17499922,2.76767 6.68133222,2.76767 1.673334,0 3.301,-0.444 4.7249999,-1.26634 0.0093,-0.006 -0.01133,0.007 -0.0023,0.001 0.709666,-0.41 1.475333,-0.72934 2.280333,-0.94467 2.420666,-0.64833 4.999666,-0.30933 7.169999,0.94333 1.449,0.83667 3.080666,1.26634 4.725333,1.26634 0.007,0 -0.0087,0 -0.0017,0 1.645,0 3.276333,-0.42967 4.725666,-1.26634 2.17,-1.25266 4.749333,-1.59233 7.17,-0.94333 0.804666,0.21533 1.570333,0.53467 2.279999,0.94467 0.0097,0.005 -0.011,-0.007 -0.002,-0.001 1.424334,0.82234 3.051333,1.26634 4.724667,1.26634 2.506666,0 4.909666,-0.996 6.681666,-2.76767 1.771999,-1.772 2.767666,-4.175 2.767666,-6.681" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path25-4"
|
||||
style="fill:#ffffff"
|
||||
d="m 0.34889888,-159.76041 c 0.650333,1.29234 1.36533322,2.55334 2.14233322,3.778 0,0 -3.33e-4,6.7e-4 0,10e-4 1.994666,0.91733 4.256333,1.11533 6.394666,0.54233 0.805333,-0.21533 1.5706659,-0.535 2.2803329,-0.94467 0.0093,-0.005 -0.01133,0.007 -0.002,0.001 1.424,-0.823 3.051666,-1.26634 4.724999,-1.26634 0.0033,0 -0.0043,0 -10e-4,0 1.644667,-6.6e-4 3.276334,0.429 4.725333,1.26634 2.170333,1.25266 4.749333,1.59166 7.170333,0.94333 0.804667,-0.21533 1.570333,-0.535 2.28,-0.94467 0.0097,-0.005 -0.011,0.007 -0.002,10e-4 1.423666,-0.823 3.051333,-1.26634 4.725333,-1.26634 0.0033,0 -0.0047,0 -0.0013,0 1.644667,-6.6e-4 3.276667,0.429 4.725333,1.26634 2.170667,1.25266 4.749333,1.59166 7.169999,0.94333 0.519667,-0.13867 1.022,-0.32167 1.504,-0.543 v 0 c 0.777333,-1.22533 1.492334,-2.48633 2.142667,-3.778 0,-6.7e-4 0,0 0,0 -0.472,0.17967 -0.929667,0.397 -1.368334,0.65033 -0.009,0.005 0.01167,-0.007 0.0027,-0.001 -0.709666,0.40967 -1.475333,0.72867 -2.280666,0.94467 -2.420667,0.64833 -4.999333,0.30933 -7.17,-0.944 -1.448666,-0.83667 -3.080666,-1.26567 -4.725332,-1.26567 -0.0033,0 0.0047,0 0.0013,0 -1.673667,0 -3.301333,0.444 -4.725333,1.26633 -0.009,0.005 0.01167,-0.007 0.002,-0.001 -0.709667,0.41 -1.475333,0.72933 -2.28,0.94467 -2.420999,0.649 -4.999999,0.31 -7.170332,-0.94334 -1.449,-0.83666 -3.080667,-1.26633 -4.725333,-1.26633 -0.0037,0 0.0043,0 10e-4,0 -1.673333,0 -3.301,0.444 -4.725,1.267 -0.0093,0.005 0.01133,-0.007 0.002,-10e-4 -0.709666,0.40966 -1.4749999,0.72866 -2.2803329,0.94466 -2.420666,0.64834 -4.999666,0.30934 -7.169999,-0.944 -0.4403332,-0.254 -0.89766722,-0.47066 -1.36700022,-0.649 -3.33e-4,0 0,-6.6e-4 0,0" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path27-3"
|
||||
style="fill:#ffffff"
|
||||
d="m 45.737561,-152.50907 c -1.101,1.41066 -2.293,2.76099 -3.572333,4.03966 -4.78,4.78 -10.549332,8.34233 -16.827332,10.48833 h -3.33e-4 c -6.277999,-2.146 -12.047666,-5.70766 -16.8276649,-10.48833 -1.279,-1.27867 -2.471,-2.629 -3.572,-4.03966 0,0 -3.33e-4,0 0,0 1.303,0.20966 2.648333,0.146 3.947667,-0.20167 0.805333,-0.216 1.5706659,-0.535 2.2803329,-0.94467 0.0093,-0.005 -0.01133,0.007 -0.002,10e-4 1.423999,-0.823 3.051666,-1.26634 4.724999,-1.26634 0.0033,0 -0.0043,0 -10e-4,0 1.644667,-6.6e-4 3.276333,0.429 4.725333,1.26567 2.170333,1.25333 4.749333,1.59233 7.169999,0.944 0.805334,-0.216 1.571,-0.535 2.280667,-0.94467 0.009,-0.005 -0.01167,0.007 -0.002,0.001 1.423666,-0.823 3.051333,-1.26634 4.724666,-1.26634 0.0033,0 -0.004,0 -6.67e-4,0 1.644667,-6.6e-4 3.276,0.429 4.725333,1.26567 1.89,1.09167 4.091,1.48967 6.226666,1.14533 6.67e-4,0 0,0 -6.66e-4,6.7e-4" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 8.6 KiB |
@@ -11,7 +11,7 @@
|
||||
width="16"
|
||||
version="1.1"
|
||||
id="svg2"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
inkscape:version="0.92.0 r15299"
|
||||
sodipodi:docname="pinshape_clock_active_low.svg">
|
||||
<metadata
|
||||
id="metadata22">
|
||||
@@ -21,8 +21,23 @@
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
<dc:title></dc:title>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
@@ -36,15 +51,15 @@
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="744"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1033"
|
||||
id="namedview18"
|
||||
showgrid="true"
|
||||
inkscape:zoom="24.969708"
|
||||
inkscape:cx="4.4578733"
|
||||
inkscape:cy="9.2981956"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-x="-4"
|
||||
inkscape:window-y="-4"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg2">
|
||||
<inkscape:grid
|
||||
|
||||
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 3.2 KiB |
@@ -11,8 +11,8 @@
|
||||
width="16"
|
||||
version="1.1"
|
||||
id="svg2"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="pinshape_clock_fall.svg">
|
||||
inkscape:version="0.92.0 r15299"
|
||||
sodipodi:docname="pinshape_clock_active_low.svg">
|
||||
<metadata
|
||||
id="metadata22">
|
||||
<rdf:RDF>
|
||||
@@ -21,8 +21,23 @@
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
<dc:title></dc:title>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
@@ -36,15 +51,15 @@
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="744"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1033"
|
||||
id="namedview18"
|
||||
showgrid="true"
|
||||
inkscape:zoom="24.969708"
|
||||
inkscape:cx="4.4578733"
|
||||
inkscape:cy="9.2981956"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-x="-4"
|
||||
inkscape:window-y="-4"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg2">
|
||||
<inkscape:grid
|
||||
@@ -56,19 +71,25 @@
|
||||
snapvisiblegridlinesonly="true" />
|
||||
</sodipodi:namedview>
|
||||
<path
|
||||
d="M 1,0 1,16"
|
||||
d="M 5,0 5,16"
|
||||
id="path12"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:none;stroke:#1a1a1a;stroke-width:2;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
d="M 6,8 16,8"
|
||||
d="M 5,8 16,8"
|
||||
id="path14"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:none;stroke:#1a1a1a;stroke-width:2;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
d="M 1,13 6,8 1,3"
|
||||
sodipodi:nodetypes="ccc"
|
||||
style="fill:none;stroke:#1a1a1a;stroke-width:2;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4010"
|
||||
d="m 5,8 7,-6 0,6" />
|
||||
<path
|
||||
d="M 5,13 1,8 5,3"
|
||||
id="path4094"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:none;stroke:#1a1a1a;stroke-width:2;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 3.2 KiB |
@@ -11,8 +11,8 @@
|
||||
width="16"
|
||||
version="1.1"
|
||||
id="svg2"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="pinshape_clock_normal.svg">
|
||||
inkscape:version="0.92.0 r15299"
|
||||
sodipodi:docname="pinshape_clock_invert.svg">
|
||||
<metadata
|
||||
id="metadata22">
|
||||
<rdf:RDF>
|
||||
@@ -22,7 +22,22 @@
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
@@ -36,15 +51,15 @@
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="744"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1033"
|
||||
id="namedview18"
|
||||
showgrid="true"
|
||||
inkscape:zoom="24.969708"
|
||||
inkscape:cx="18.434809"
|
||||
inkscape:cy="9.4183412"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-x="-4"
|
||||
inkscape:window-y="-4"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg2">
|
||||
<inkscape:grid
|
||||
|
||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 3.3 KiB |
@@ -153,10 +153,10 @@ install( TARGETS lib_kicad
|
||||
endif()
|
||||
|
||||
|
||||
# KiCad build version string defaults to "no-vcs-found" which forces the build version header
|
||||
# command to look for git to create the version string header when the .git path is found in
|
||||
# the source path.
|
||||
set( KICAD_BRANCH_NAME "" CACHE STRING "KiCad repository name." )
|
||||
# The build version string defaults to the value in the KiCadVersion.cmake file.
|
||||
# If being built inside a git repository, the git tag and commit hash are used to create
|
||||
# a new version string instead. The user can supply an additional string to be appended
|
||||
# to the end inside the KICAD_VERSION_EXTRA variable
|
||||
set( KICAD_VERSION_EXTRA "" CACHE STRING
|
||||
"User defined configuration string to append to KiCad version." )
|
||||
|
||||
@@ -164,14 +164,13 @@ set( KICAD_VERSION_EXTRA "" CACHE STRING
|
||||
add_custom_target(
|
||||
version_header ALL
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DKICAD_VERSION=${KICAD_VERSION}
|
||||
-DKICAD_BRANCH_NAME=${KICAD_BRANCH_NAME}
|
||||
-DKICAD_VERSION_EXTRA=${KICAD_VERSION_EXTRA}
|
||||
-DOUTPUT_FILE=${CMAKE_BINARY_DIR}/kicad_build_version.h
|
||||
-DSRC_PATH=${PROJECT_SOURCE_DIR}
|
||||
-DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH}
|
||||
-P ${CMAKE_MODULE_PATH}/WriteVersionHeader.cmake
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
BYPRODUCTS ${CMAKE_BINARY_DIR}/kicad_build_version.h
|
||||
COMMENT "Generating version string header"
|
||||
)
|
||||
|
||||
@@ -188,7 +187,6 @@ set( COMMON_DLG_SRCS
|
||||
dialogs/dialog_configure_paths_base.cpp
|
||||
dialogs/dialog_display_info_HTML_base.cpp
|
||||
dialogs/dialog_edit_library_tables.cpp
|
||||
dialogs/dialog_exit_base.cpp
|
||||
dialogs/dialog_file_dir_picker.cpp
|
||||
dialogs/dialog_global_lib_table_config.cpp
|
||||
dialogs/dialog_global_lib_table_config_base.cpp
|
||||
@@ -279,6 +277,7 @@ set( COMMON_SRCS
|
||||
${PLOTTERS_CONTROL_SRCS}
|
||||
advanced_config.cpp
|
||||
array_options.cpp
|
||||
base64.cpp
|
||||
base_struct.cpp
|
||||
bezier_curves.cpp
|
||||
bin_mod.cpp
|
||||
@@ -293,8 +292,10 @@ set( COMMON_SRCS
|
||||
config_params.cpp
|
||||
confirm.cpp
|
||||
convert_basic_shapes_to_polygon.cpp
|
||||
cursor_store.cpp
|
||||
dialog_shim.cpp
|
||||
displlst.cpp
|
||||
dpi_scaling.cpp
|
||||
draw_graphic_text.cpp
|
||||
dsnlexer.cpp
|
||||
eagle_parser.cpp
|
||||
@@ -321,7 +322,6 @@ set( COMMON_SRCS
|
||||
hotkey_store.cpp
|
||||
hotkeys_basic.cpp
|
||||
html_messagebox.cpp
|
||||
incremental_text_ctrl.cpp
|
||||
kiface_i.cpp
|
||||
kiway.cpp
|
||||
kiway_express.cpp
|
||||
@@ -380,6 +380,14 @@ if( BUILD_GITHUB_PLUGIN )
|
||||
)
|
||||
endif()
|
||||
|
||||
# Link-time optimization (LTO) on GCC conflicts with embedded assembly (__asm),
|
||||
# following GCC's recommendation to disable LTO per translation unit.
|
||||
if( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
set_source_files_properties( system/libcontext.cpp PROPERTIES
|
||||
COMPILE_FLAGS "-fno-lto"
|
||||
)
|
||||
endif()
|
||||
|
||||
set( COMMON_SRCS
|
||||
${COMMON_SRCS}
|
||||
system/libcontext.cpp
|
||||
@@ -429,6 +437,7 @@ target_link_libraries( common
|
||||
${Boost_LIBRARIES}
|
||||
${CURL_LIBRARIES}
|
||||
${OPENSSL_LIBRARIES} # empty on Apple
|
||||
${wxWidgets_LIBRARIES}
|
||||
)
|
||||
|
||||
|
||||
@@ -513,6 +522,7 @@ target_link_libraries( pcbcommon PUBLIC
|
||||
|
||||
# auto-generate netlist_lexer.h and netlist_keywords.cpp
|
||||
make_lexer(
|
||||
netlist_lexer_source_files
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/netlist.keywords
|
||||
${PROJECT_SOURCE_DIR}/include/netlist_lexer.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/netlist_keywords.cpp
|
||||
@@ -522,18 +532,12 @@ make_lexer(
|
||||
${CMAKE_PROJECT_SOURCE_DIR}/pcbnew/netlist_reader.h
|
||||
)
|
||||
|
||||
add_custom_target(
|
||||
netlist_lexer_source_files ALL
|
||||
DEPENDS
|
||||
${PROJECT_SOURCE_DIR}/include/netlist_lexer.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/netlist_keywords.cpp
|
||||
)
|
||||
|
||||
add_dependencies( common netlist_lexer_source_files )
|
||||
add_dependencies( pcbcommon netlist_lexer_source_files )
|
||||
|
||||
# auto-generate pcb_plot_params_lexer.h and pcb_plot_params_keywords.cpp
|
||||
make_lexer(
|
||||
pcb_plot_lexer_source_files
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/pcb_plot_params.keywords
|
||||
${PROJECT_SOURCE_DIR}/include/pcb_plot_params_lexer.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/pcb_plot_params_keywords.cpp
|
||||
@@ -543,17 +547,11 @@ make_lexer(
|
||||
${PROJECT_SOURCE_DIR}/pcbnew/pcb_plot_params.h
|
||||
)
|
||||
|
||||
add_custom_target(
|
||||
pcb_plot_lexer_source_files ALL
|
||||
DEPENDS
|
||||
${PROJECT_SOURCE_DIR}/include/pcb_plot_params_lexer.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/pcb_plot_params_keywords.cpp
|
||||
)
|
||||
|
||||
add_dependencies( pcbcommon pcb_plot_lexer_source_files )
|
||||
|
||||
# auto-generate pcbnew_sexpr.h and pcbnew_sexpr.cpp
|
||||
make_lexer(
|
||||
pcb_lexer_source_files
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/pcb.keywords
|
||||
${PROJECT_SOURCE_DIR}/include/pcb_lexer.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/pcb_keywords.cpp
|
||||
@@ -563,28 +561,22 @@ make_lexer(
|
||||
${PROJECT_SOURCE_DIR}/pcbnew/pcb_parser.h
|
||||
)
|
||||
|
||||
add_custom_target(
|
||||
pcb_lexer_source_files ALL
|
||||
DEPENDS
|
||||
${PROJECT_SOURCE_DIR}/include/pcb_lexer.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/pcb_keywords.cpp
|
||||
)
|
||||
|
||||
add_dependencies( pcbcommon pcb_lexer_source_files )
|
||||
|
||||
# auto-generate s-expression library table code.
|
||||
make_lexer(
|
||||
lib_table_lexer_source_files
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lib_table.keywords
|
||||
${PROJECT_SOURCE_DIR}/include/lib_table_lexer.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lib_table_keywords.cpp
|
||||
LIB_TABLE_T
|
||||
)
|
||||
|
||||
add_custom_target(
|
||||
lib_table_lexer_source_files ALL
|
||||
DEPENDS
|
||||
${PROJECT_SOURCE_DIR}/include/lib_table_lexer.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lib_table_keywords.cpp
|
||||
# These files consume *_lexer.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/fp_lib_table.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lib_table_base.cpp
|
||||
${PROJECT_SOURCE_DIR}/pcbnew/dialogs/panel_fp_lib_table.cpp
|
||||
${PROJECT_SOURCE_DIR}/eeschema/symbol_lib_table.cpp
|
||||
${PROJECT_SOURCE_DIR}/eeschema/dialogs/panel_sym_lib_table.cpp
|
||||
)
|
||||
|
||||
add_dependencies( common lib_table_lexer_source_files )
|
||||
@@ -593,19 +585,13 @@ add_dependencies( pcbcommon lib_table_lexer_source_files )
|
||||
# auto-generate page layout reader s-expression page_layout_reader_lexer.h
|
||||
# and title_block_reader_keywords.cpp.
|
||||
make_lexer(
|
||||
page_layout_lexer_source_files
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/page_layout/page_layout_reader.keywords
|
||||
${PROJECT_SOURCE_DIR}/include/page_layout_reader_lexer.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/page_layout/page_layout_reader_keywords.cpp
|
||||
TB_READER_T
|
||||
)
|
||||
|
||||
add_custom_target(
|
||||
page_layout_lexer_source_files ALL
|
||||
DEPENDS
|
||||
${PROJECT_SOURCE_DIR}/include/page_layout_reader_lexer.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/page_layout/page_layout_reader_keywords.cpp
|
||||
)
|
||||
|
||||
add_dependencies( common page_layout_lexer_source_files )
|
||||
|
||||
# This one gets made only when testing.
|
||||
|
||||
@@ -0,0 +1,157 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* @author Seth Hillbrand <seth@kipro-pcb.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 3
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include <base64.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
#include <limits>
|
||||
#include <vector>
|
||||
|
||||
namespace {
|
||||
|
||||
static const uint8_t ENCODE_BASE64[64] = {
|
||||
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48,
|
||||
0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50,
|
||||
0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
|
||||
0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66,
|
||||
0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E,
|
||||
0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76,
|
||||
0x77, 0x78, 0x79, 0x7A, 0x30, 0x31, 0x32, 0x33,
|
||||
0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x2B, 0x2F,
|
||||
};
|
||||
|
||||
static const uint8_t E = -1;
|
||||
|
||||
static const uint8_t DECODE_BASE64[128] = {
|
||||
/* 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xA 0xB 0xC 0xD 0xE 0xF */
|
||||
E, E, E, E, E, E, E, E, E, E, E, E, E, E, E, E,
|
||||
E, E, E, E, E, E, E, E, E, E, E, E, E, E, E, E,
|
||||
E, E, E, E, E, E, E, E, E, E, E, 62, E, E, E, 63,
|
||||
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, E, E, E, E, E, E,
|
||||
E, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
|
||||
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, E, E, E, E, E,
|
||||
E, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
|
||||
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, E, E, E, E, E,
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
namespace base64
|
||||
{
|
||||
size_t encode_length( size_t aInputLen )
|
||||
{
|
||||
return 4 * ( ( aInputLen + 2 ) / 3 ) + ( aInputLen + 2 ) % 3 - 2;
|
||||
}
|
||||
|
||||
|
||||
size_t decode_length( size_t aInputLen )
|
||||
{
|
||||
if( aInputLen % 4 == 1 )
|
||||
return 0;
|
||||
else
|
||||
return 3 * ( ( aInputLen + 2 ) / 4 ) + ( aInputLen + 2 ) % 4 - 2;
|
||||
}
|
||||
|
||||
|
||||
void encode( const std::vector<uint8_t>& aInput, std::vector<uint8_t>& aOutput )
|
||||
{
|
||||
size_t end = ( aInput.size() / 3 ) * 3;
|
||||
aOutput.reserve( encode_length( aInput.size() ) );
|
||||
|
||||
for( size_t i = 0; i < end; i += 3 )
|
||||
{
|
||||
unsigned value = ( aInput[i] << 16 ) | ( aInput[i + 1] << 8 ) | aInput[i + 2] ;
|
||||
|
||||
aOutput.emplace_back( ENCODE_BASE64[( value >> 18 ) & 0x3F] );
|
||||
aOutput.emplace_back( ENCODE_BASE64[( value >> 12 ) & 0x3F] );
|
||||
aOutput.emplace_back( ENCODE_BASE64[( value >> 6 ) & 0x3F] );
|
||||
aOutput.emplace_back( ENCODE_BASE64[value & 0x3F] );
|
||||
}
|
||||
|
||||
size_t remainder = aInput.size() - end;
|
||||
|
||||
if( remainder )
|
||||
{
|
||||
unsigned value = aInput[end];
|
||||
|
||||
if( remainder == 2 )
|
||||
{
|
||||
value = ( value << 10 ) | ( aInput[end + 1] << 2 );
|
||||
aOutput.emplace_back( ENCODE_BASE64[( value >> 12 ) & 0x3F] );
|
||||
}
|
||||
else
|
||||
{
|
||||
value <<= 4;
|
||||
}
|
||||
|
||||
aOutput.emplace_back( ENCODE_BASE64[( value >> 6 ) & 0x3F] );
|
||||
aOutput.emplace_back( ENCODE_BASE64[value & 0x3F] );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void decode(const std::vector<uint8_t>& aInput, std::vector<uint8_t>& aOutput )
|
||||
{
|
||||
size_t end = ( aInput.size() / 4 ) * 4;
|
||||
size_t decode_size = decode_length( aInput.size() );
|
||||
|
||||
if( !decode_size )
|
||||
return;
|
||||
|
||||
aOutput.reserve( decode_size );
|
||||
|
||||
for( size_t i = 0; i < end; i++ )
|
||||
{
|
||||
unsigned value = ( DECODE_BASE64[aInput[i] & 0x7F] << 18 ) |
|
||||
( DECODE_BASE64[aInput[i + 1] & 0x7F] << 12 ) |
|
||||
( DECODE_BASE64[aInput[i + 2] & 0x7F] << 6 ) |
|
||||
DECODE_BASE64[aInput[i + 3] & 0x7F];
|
||||
|
||||
aOutput.emplace_back( ( value >> 16 ) & 0xff );
|
||||
aOutput.emplace_back( ( value >> 8 ) & 0xff );
|
||||
aOutput.emplace_back( value & 0xff );
|
||||
}
|
||||
|
||||
size_t remainder = aInput.size() - end;
|
||||
|
||||
if( remainder )
|
||||
{
|
||||
unsigned value = ( ( DECODE_BASE64[aInput[end] & 0x7F] ) << 6 ) |
|
||||
( DECODE_BASE64[aInput[end + 1] & 0x7F] );
|
||||
|
||||
if( remainder == 3 )
|
||||
{
|
||||
value = ( value << 6 ) | ( DECODE_BASE64[aInput[end + 2] & 0x7F] );
|
||||
value >>= 2;
|
||||
|
||||
aOutput.emplace_back( ( value >> 8 ) & 0xff );
|
||||
}
|
||||
else
|
||||
{
|
||||
value >>= 4;
|
||||
}
|
||||
aOutput[0] = value & 0xff ;
|
||||
}
|
||||
}
|
||||
|
||||
} // base64
|
||||
@@ -405,6 +405,9 @@ bool EDA_RECT::Intersects( const wxPoint& aPoint1, const wxPoint& aPoint2 ) cons
|
||||
|
||||
bool EDA_RECT::Intersects( const EDA_RECT& aRect ) const
|
||||
{
|
||||
if( !m_init )
|
||||
return false;
|
||||
|
||||
// this logic taken from wxWidgets' geometry.cpp file:
|
||||
bool rc;
|
||||
EDA_RECT me(*this);
|
||||
@@ -433,6 +436,9 @@ bool EDA_RECT::Intersects( const EDA_RECT& aRect ) const
|
||||
|
||||
bool EDA_RECT::Intersects( const EDA_RECT& aRect, double aRot ) const
|
||||
{
|
||||
if( !m_init )
|
||||
return false;
|
||||
|
||||
/* Most rectangles will be axis aligned.
|
||||
* It is quicker to check for this case and pass the rect
|
||||
* to the simpler intersection test
|
||||
@@ -565,6 +571,9 @@ const wxPoint EDA_RECT::FarthestPointTo( const wxPoint& aPoint ) const
|
||||
|
||||
bool EDA_RECT::IntersectsCircle( const wxPoint& aCenter, const int aRadius ) const
|
||||
{
|
||||
if( !m_init )
|
||||
return false;
|
||||
|
||||
wxPoint closest = ClosestPointTo( aCenter );
|
||||
|
||||
double dx = aCenter.x - closest.x;
|
||||
@@ -578,6 +587,9 @@ bool EDA_RECT::IntersectsCircle( const wxPoint& aCenter, const int aRadius ) con
|
||||
|
||||
bool EDA_RECT::IntersectsCircleEdge( const wxPoint& aCenter, const int aRadius, const int aWidth ) const
|
||||
{
|
||||
if( !m_init )
|
||||
return false;
|
||||
|
||||
EDA_RECT me( *this );
|
||||
me.Normalize(); // ensure size is >= 0
|
||||
|
||||
@@ -675,6 +687,17 @@ EDA_RECT& EDA_RECT::Inflate( wxCoord dx, wxCoord dy )
|
||||
|
||||
void EDA_RECT::Merge( const EDA_RECT& aRect )
|
||||
{
|
||||
if( !m_init )
|
||||
{
|
||||
if( aRect.IsValid() )
|
||||
{
|
||||
m_Pos = aRect.GetPosition();
|
||||
m_Size = aRect.GetSize();
|
||||
m_init = true;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Normalize(); // ensure width and height >= 0
|
||||
EDA_RECT rect = aRect;
|
||||
rect.Normalize(); // ensure width and height >= 0
|
||||
@@ -692,6 +715,13 @@ void EDA_RECT::Merge( const EDA_RECT& aRect )
|
||||
|
||||
void EDA_RECT::Merge( const wxPoint& aPoint )
|
||||
{
|
||||
if( !m_init )
|
||||
{
|
||||
m_Pos = aPoint;
|
||||
m_Size = wxSize( 0, 0 );
|
||||
return;
|
||||
}
|
||||
|
||||
Normalize(); // ensure width and height >= 0
|
||||
|
||||
wxPoint end = GetEnd();
|
||||
|
||||
@@ -266,6 +266,10 @@ wxString StringFromValue( EDA_UNITS_T aUnits, int aValue, bool aAddUnitSymbol, b
|
||||
stringValue += wxT( " deg" );
|
||||
break;
|
||||
|
||||
case PERCENT:
|
||||
stringValue += wxT( "%" );
|
||||
break;
|
||||
|
||||
case UNSCALED_UNITS:
|
||||
break;
|
||||
}
|
||||
@@ -294,6 +298,7 @@ double From_User_Unit( EDA_UNITS_T aUnits, double aValue, bool aUseMils )
|
||||
|
||||
default:
|
||||
case UNSCALED_UNITS:
|
||||
case PERCENT:
|
||||
return aValue;
|
||||
}
|
||||
}
|
||||
@@ -442,6 +447,9 @@ wxString GetAbbreviatedUnitsLabel( EDA_UNITS_T aUnit, bool aUseMils )
|
||||
case MILLIMETRES:
|
||||
return _( "mm" );
|
||||
|
||||
case PERCENT:
|
||||
return _( "%" );
|
||||
|
||||
case UNSCALED_UNITS:
|
||||
return wxEmptyString;
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2014-2017 KiCad Developers, see CHANGELOG.TXT for contributors.
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -26,362 +25,69 @@
|
||||
/* routines to handle bezier curves */
|
||||
/************************************/
|
||||
|
||||
#include <fctsys.h>
|
||||
#include <bezier_curves.h>
|
||||
|
||||
|
||||
static inline double calc_sq_distance( int x1, int y1, int x2, int y2 )
|
||||
BEZIER_POLY::BEZIER_POLY( const std::vector<wxPoint>& aControlPoints )
|
||||
{
|
||||
int dx = x2 - x1;
|
||||
int dy = y2 - y1;
|
||||
for( unsigned ii = 0; ii < aControlPoints.size(); ++ii )
|
||||
m_ctrlPts.emplace_back( VECTOR2D( aControlPoints[ii] ) );
|
||||
|
||||
return (double)dx * dx + (double)dy * dy;
|
||||
}
|
||||
|
||||
|
||||
static inline double sqrt_len( int dx, int dy )
|
||||
{
|
||||
return ((double)dx * dx) + ((double)dy * dy);
|
||||
m_minSegLen = 0.0;
|
||||
}
|
||||
|
||||
|
||||
void BEZIER_POLY::GetPoly( std::vector<wxPoint>& aOutput, int aMinSegLen )
|
||||
{
|
||||
wxCHECK( !m_ctrlPts.empty(), /* void */ );
|
||||
m_minSegLen = std::max( 1, aMinSegLen );
|
||||
m_output = &aOutput;
|
||||
m_output->clear();
|
||||
m_output->push_back( wxPoint( m_ctrlPts.front() ) );
|
||||
aOutput.clear();
|
||||
std::vector<VECTOR2D> buffer;
|
||||
GetPoly( buffer, double( aMinSegLen ) );
|
||||
|
||||
// Only quadratic and cubic Bezier curves are handled
|
||||
if( m_ctrlPts.size() == 3 )
|
||||
recursiveBezier( m_ctrlPts[0].x, m_ctrlPts[0].y,
|
||||
m_ctrlPts[1].x, m_ctrlPts[1].y,
|
||||
m_ctrlPts[2].x, m_ctrlPts[2].y, 0 );
|
||||
|
||||
else if( m_ctrlPts.size() == 4 )
|
||||
recursiveBezier( m_ctrlPts[0].x, m_ctrlPts[0].y,
|
||||
m_ctrlPts[1].x, m_ctrlPts[1].y,
|
||||
m_ctrlPts[2].x, m_ctrlPts[2].y,
|
||||
m_ctrlPts[3].x, m_ctrlPts[3].y, 0 );
|
||||
|
||||
m_output->push_back( wxPoint( m_ctrlPts.back() ) );
|
||||
for( unsigned ii = 0; ii < buffer.size(); ++ii )
|
||||
aOutput.emplace_back( wxPoint( int( buffer[ii].x ), int( buffer[ii].y ) ) );
|
||||
}
|
||||
|
||||
|
||||
void BEZIER_POLY::recursiveBezier( int x1, int y1, int x2, int y2,
|
||||
int x3, int y3, unsigned int level )
|
||||
void BEZIER_POLY::GetPoly( std::vector<VECTOR2D>& aOutput, double aMinSegLen )
|
||||
{
|
||||
if( level > recursion_limit )
|
||||
return;
|
||||
wxASSERT( m_ctrlPts.size() == 4 );
|
||||
// FIXME Brute force method, use a better (recursive?) algorithm
|
||||
// with a max error value.
|
||||
// to optimize the number of segments
|
||||
#define CURVE_POINTS 32
|
||||
double dt = 1.0 / CURVE_POINTS;
|
||||
|
||||
// Calculate all the mid-points of the line segments
|
||||
//----------------------
|
||||
int x12 = (x1 + x2) / 2;
|
||||
int y12 = (y1 + y2) / 2;
|
||||
int x23 = (x2 + x3) / 2;
|
||||
int y23 = (y2 + y3) / 2;
|
||||
int x123 = (x12 + x23) / 2;
|
||||
int y123 = (y12 + y23) / 2;
|
||||
aOutput.clear();
|
||||
aOutput.push_back( m_ctrlPts[0] );
|
||||
|
||||
int dx = x3 - x1;
|
||||
int dy = y3 - y1;
|
||||
double d = fabs( ((double) (x2 - x3) * dy) - ((double) (y2 - y3) * dx ) );
|
||||
double da;
|
||||
// If the Bezier curve is degenerated (straight line), skip intermediate points:
|
||||
bool degenerated = m_ctrlPts[0] == m_ctrlPts[1] && m_ctrlPts[2] == m_ctrlPts[3];
|
||||
|
||||
if( d > curve_collinearity_epsilon )
|
||||
if( !degenerated )
|
||||
{
|
||||
// Regular case
|
||||
//-----------------
|
||||
if( d * d <= distance_tolerance_square * (dx * dx + dy * dy) )
|
||||
for( int ii = 1; ii < CURVE_POINTS; ii++ )
|
||||
{
|
||||
// If the curvature doesn't exceed the distance_tolerance value
|
||||
// we tend to finish subdivisions.
|
||||
//----------------------
|
||||
if( angle_tolerance < curve_angle_tolerance_epsilon )
|
||||
{
|
||||
addSegment( wxPoint( x123, y123 ) );
|
||||
return;
|
||||
}
|
||||
double t = dt * ii;
|
||||
double omt = 1.0 - t;
|
||||
double omt2 = omt * omt;
|
||||
double omt3 = omt * omt2;
|
||||
double t2 = t * t;
|
||||
double t3 = t * t2;
|
||||
|
||||
// Angle & Cusp Condition
|
||||
//----------------------
|
||||
da = fabs( atan2( (double) ( y3 - y2 ), (double) ( x3 - x2 ) ) -
|
||||
atan2( (double) ( y2 - y1 ), (double) ( x2 - x1 ) ) );
|
||||
if( da >=M_PI )
|
||||
da = 2 * M_PI - da;
|
||||
VECTOR2D vertex = omt3 * m_ctrlPts[0]
|
||||
+ 3.0 * t * omt2 * m_ctrlPts[1]
|
||||
+ 3.0 * t2 * omt * m_ctrlPts[2]
|
||||
+ t3 * m_ctrlPts[3];
|
||||
|
||||
if( da < angle_tolerance )
|
||||
{
|
||||
// Finally we can stop the recursion
|
||||
//----------------------
|
||||
addSegment( wxPoint( x123, y123 ) );
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Collinear case
|
||||
//------------------
|
||||
da = sqrt_len(dx, dy);
|
||||
if( da == 0 )
|
||||
{
|
||||
d = calc_sq_distance( x1, y1, x2, y2 );
|
||||
}
|
||||
else
|
||||
{
|
||||
d = ( (double)(x2 - x1) * dx + (double)(y2 - y1) * dy ) / da;
|
||||
if( d > 0 && d < 1 )
|
||||
{
|
||||
// Simple collinear case, 1---2---3
|
||||
// We can leave just two endpoints
|
||||
return;
|
||||
}
|
||||
if( d <= 0 )
|
||||
d = calc_sq_distance( x2, y2, x1, y1 );
|
||||
else if( d >= 1 )
|
||||
d = calc_sq_distance( x2, y2, x3, y3 );
|
||||
else
|
||||
d = calc_sq_distance( x2, y2, x1 + (int) d * dx,
|
||||
y1 + (int) d * dy );
|
||||
}
|
||||
if( d < distance_tolerance_square )
|
||||
{
|
||||
addSegment( wxPoint( x2, y2 ) );
|
||||
return;
|
||||
// a minimal filter on the lenght of the segment being created:
|
||||
// The offset from last point:
|
||||
VECTOR2D delta = vertex - aOutput.back();
|
||||
double dist = delta.EuclideanNorm();
|
||||
|
||||
if( dist > aMinSegLen )
|
||||
aOutput.push_back( vertex );
|
||||
}
|
||||
}
|
||||
|
||||
// Continue subdivision
|
||||
//----------------------
|
||||
recursiveBezier( x1, y1, x12, y12, x123, y123, level + 1 );
|
||||
recursiveBezier( x123, y123, x23, y23, x3, y3, level + 1 );
|
||||
}
|
||||
|
||||
|
||||
void BEZIER_POLY::recursiveBezier( int x1, int y1, int x2, int y2,
|
||||
int x3, int y3, int x4, int y4, unsigned int level )
|
||||
{
|
||||
if( level > recursion_limit )
|
||||
return;
|
||||
|
||||
// Calculate all the mid-points of the line segments
|
||||
//----------------------
|
||||
int x12 = (x1 + x2) / 2;
|
||||
int y12 = (y1 + y2) / 2;
|
||||
int x23 = (x2 + x3) / 2;
|
||||
int y23 = (y2 + y3) / 2;
|
||||
int x34 = (x3 + x4) / 2;
|
||||
int y34 = (y3 + y4) / 2;
|
||||
int x123 = (x12 + x23) / 2;
|
||||
int y123 = (y12 + y23) / 2;
|
||||
int x234 = (x23 + x34) / 2;
|
||||
int y234 = (y23 + y34) / 2;
|
||||
int x1234 = (x123 + x234) / 2;
|
||||
int y1234 = (y123 + y234) / 2;
|
||||
|
||||
|
||||
// Try to approximate the full cubic curve by a single straight line
|
||||
//------------------
|
||||
int dx = x4 - x1;
|
||||
int dy = y4 - y1;
|
||||
|
||||
double d2 = fabs( (double) ( (x2 - x4) * dy - (y2 - y4) * dx ) );
|
||||
double d3 = fabs( (double) ( (x3 - x4) * dy - (y3 - y4) * dx ) );
|
||||
double da1, da2, k;
|
||||
|
||||
switch( (int(d2 > curve_collinearity_epsilon) << 1) +
|
||||
int(d3 > curve_collinearity_epsilon) )
|
||||
{
|
||||
case 0:
|
||||
|
||||
// All collinear OR p1==p4
|
||||
//----------------------
|
||||
k = dx * dx + dy * dy;
|
||||
if( k == 0 )
|
||||
{
|
||||
d2 = calc_sq_distance( x1, y1, x2, y2 );
|
||||
d3 = calc_sq_distance( x4, y4, x3, y3 );
|
||||
}
|
||||
else
|
||||
{
|
||||
k = 1 / k;
|
||||
da1 = x2 - x1;
|
||||
da2 = y2 - y1;
|
||||
d2 = k * (da1 * dx + da2 * dy);
|
||||
da1 = x3 - x1;
|
||||
da2 = y3 - y1;
|
||||
d3 = k * (da1 * dx + da2 * dy);
|
||||
if( d2 > 0 && d2 < 1 && d3 > 0 && d3 < 1 )
|
||||
{
|
||||
// Simple collinear case, 1---2---3---4
|
||||
// We can leave just two endpoints
|
||||
return;
|
||||
}
|
||||
if( d2 <= 0 )
|
||||
d2 = calc_sq_distance( x2, y2, x1, y1 );
|
||||
else if( d2 >= 1 )
|
||||
d2 = calc_sq_distance( x2, y2, x4, y4 );
|
||||
else
|
||||
d2 = calc_sq_distance( x2, y2, x1 + (int) d2 * dx,
|
||||
y1 + (int) d2 * dy );
|
||||
|
||||
if( d3 <= 0 )
|
||||
d3 = calc_sq_distance( x3, y3, x1, y1 );
|
||||
else if( d3 >= 1 )
|
||||
d3 = calc_sq_distance( x3, y3, x4, y4 );
|
||||
else
|
||||
d3 = calc_sq_distance( x3, y3, x1 + (int) d3 * dx,
|
||||
y1 + (int) d3 * dy );
|
||||
}
|
||||
if( d2 > d3 )
|
||||
{
|
||||
if( d2 < distance_tolerance_square )
|
||||
{
|
||||
addSegment( wxPoint( x2, y2 ) );
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( d3 < distance_tolerance_square )
|
||||
{
|
||||
addSegment( wxPoint( x3, y3 ) );
|
||||
return;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
|
||||
// p1,p2,p4 are collinear, p3 is significant
|
||||
//----------------------
|
||||
if( d3 * d3 <= distance_tolerance_square * sqrt_len(dx, dy) )
|
||||
{
|
||||
if( angle_tolerance < curve_angle_tolerance_epsilon )
|
||||
{
|
||||
addSegment( wxPoint( x23, y23 ) );
|
||||
return;
|
||||
}
|
||||
|
||||
// Angle Condition
|
||||
//----------------------
|
||||
da1 = fabs( atan2( (double) ( y4 - y3 ), (double) ( x4 - x3 ) ) -
|
||||
atan2( (double) ( y3 - y2 ), (double) ( x3 - x2 ) ) );
|
||||
if( da1 >= M_PI )
|
||||
da1 = 2 * M_PI - da1;
|
||||
|
||||
if( da1 < angle_tolerance )
|
||||
{
|
||||
addSegment( wxPoint( x2, y2 ) );
|
||||
addSegment( wxPoint( x3, y3 ) );
|
||||
return;
|
||||
}
|
||||
|
||||
if( cusp_limit != 0.0 )
|
||||
{
|
||||
if( da1 > cusp_limit )
|
||||
{
|
||||
addSegment( wxPoint( x3, y3 ) );
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
|
||||
// p1,p3,p4 are collinear, p2 is significant
|
||||
//----------------------
|
||||
if( d2 * d2 <= distance_tolerance_square * sqrt_len(dx, dy) )
|
||||
{
|
||||
if( angle_tolerance < curve_angle_tolerance_epsilon )
|
||||
{
|
||||
addSegment( wxPoint( x23, y23 ) );
|
||||
return;
|
||||
}
|
||||
|
||||
// Angle Condition
|
||||
//----------------------
|
||||
da1 = fabs( atan2( (double) ( y3 - y2 ), (double) ( x3 - x2 ) ) -
|
||||
atan2( (double) ( y2 - y1 ), (double) ( x2 - x1 ) ) );
|
||||
if( da1 >= M_PI )
|
||||
da1 = 2 * M_PI - da1;
|
||||
|
||||
if( da1 < angle_tolerance )
|
||||
{
|
||||
addSegment( wxPoint( x2, y2 ) );
|
||||
addSegment( wxPoint( x3, y3 ) );
|
||||
return;
|
||||
}
|
||||
|
||||
if( cusp_limit != 0.0 )
|
||||
{
|
||||
if( da1 > cusp_limit )
|
||||
{
|
||||
addSegment( wxPoint( x2, y2 ) );
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
|
||||
// Regular case
|
||||
//-----------------
|
||||
if( (d2 + d3) * (d2 + d3) <= distance_tolerance_square * sqrt_len(dx, dy) )
|
||||
{
|
||||
// If the curvature doesn't exceed the distance_tolerance value
|
||||
// we tend to finish subdivisions.
|
||||
//----------------------
|
||||
if( angle_tolerance < curve_angle_tolerance_epsilon )
|
||||
{
|
||||
addSegment( wxPoint( x23, y23 ) );
|
||||
return;
|
||||
}
|
||||
|
||||
// Angle & Cusp Condition
|
||||
//----------------------
|
||||
k = atan2( (double) ( y3 - y2 ), (double) ( x3 - x2 ) );
|
||||
da1 = fabs( k - atan2( (double) ( y2 - y1 ),
|
||||
(double) ( x2 - x1 ) ) );
|
||||
da2 = fabs( atan2( (double) ( y4 - y3 ),
|
||||
(double) ( x4 - x3 ) ) - k );
|
||||
if( da1 >= M_PI )
|
||||
da1 = 2 * M_PI - da1;
|
||||
if( da2 >= M_PI )
|
||||
da2 = 2 * M_PI - da2;
|
||||
|
||||
if( da1 + da2 < angle_tolerance )
|
||||
{
|
||||
// Finally we can stop the recursion
|
||||
//----------------------
|
||||
addSegment( wxPoint( x23, y23 ) );
|
||||
return;
|
||||
}
|
||||
|
||||
if( cusp_limit != 0.0 )
|
||||
{
|
||||
if( da1 > cusp_limit )
|
||||
{
|
||||
addSegment( wxPoint( x2, y2 ) );
|
||||
return;
|
||||
}
|
||||
|
||||
if( da2 > cusp_limit )
|
||||
{
|
||||
addSegment( wxPoint( x3, y3 ) );
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// Continue subdivision
|
||||
//----------------------
|
||||
recursiveBezier( x1, y1, x12, y12, x123, y123, x1234, y1234, level + 1 );
|
||||
recursiveBezier( x1234, y1234, x234, y234, x34, y34, x4, y4, level + 1 );
|
||||
if( aOutput.back() != m_ctrlPts[3] )
|
||||
aOutput.push_back( m_ctrlPts[3] );
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <bin_mod.h>
|
||||
#include <common.h>
|
||||
#include <pgm_base.h>
|
||||
#include <id.h>
|
||||
|
||||
|
||||
BIN_MOD::BIN_MOD( const char* aName ) :
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
|
||||
#include "bitmap_base.h"
|
||||
|
||||
#include <wx/dc.h>
|
||||
#include <wx/mstream.h>
|
||||
|
||||
|
||||
@@ -238,10 +239,24 @@ void BITMAP_BASE::DrawBitmap( wxDC* aDC, const wxPoint& aPos )
|
||||
aDC->SetUserScale( scale * GetScalingFactor(), scale * GetScalingFactor() );
|
||||
aDC->SetLogicalOrigin( logicalOriginX / GetScalingFactor(),
|
||||
logicalOriginY / GetScalingFactor() );
|
||||
aDC->DrawBitmap( *m_bitmap,
|
||||
KiROUND( pos.x / GetScalingFactor() ),
|
||||
KiROUND( pos.y / GetScalingFactor() ),
|
||||
true );
|
||||
|
||||
pos.x = KiROUND( pos.x / GetScalingFactor() );
|
||||
pos.y = KiROUND( pos.y / GetScalingFactor() );
|
||||
size.x = KiROUND( size.x / GetScalingFactor() );
|
||||
size.y = KiROUND( size.y / GetScalingFactor() );
|
||||
aDC->SetClippingRegion( pos, size );
|
||||
|
||||
if( GetGRForceBlackPenState() )
|
||||
{
|
||||
wxBitmap result( m_bitmap->ConvertToImage().ConvertToGreyscale() );
|
||||
aDC->DrawBitmap( result, pos.x, pos.y, true );
|
||||
}
|
||||
else
|
||||
{
|
||||
aDC->DrawBitmap( *m_bitmap, pos.x, pos.y, true );
|
||||
}
|
||||
|
||||
aDC->DestroyClippingRegion();
|
||||
aDC->SetUserScale( scale, scale );
|
||||
aDC->SetLogicalOrigin( logicalOriginX, logicalOriginY );
|
||||
}
|
||||
|
||||
@@ -57,33 +57,46 @@ using KIGFX::COLOR4D;
|
||||
COLOR4D g_GhostColor;
|
||||
|
||||
|
||||
// When reading/writing files, we need to swtich to setlocale( LC_NUMERIC, "C" ).
|
||||
// Works fine to read/write files with floating point numbers.
|
||||
// We can call setlocale( LC_NUMERIC, "C" ) of wxLocale( "C", "C", "C", false )
|
||||
// wxWidgets discourage a direct call to setlocale
|
||||
// However, for us, calling wxLocale( "C", "C", "C", false ) has a unwanted effect:
|
||||
// The I18N translations are no longer active, because the English dixtionary is selected.
|
||||
// To read files, this is not a major issues, but the resul can differ
|
||||
// from using setlocale(xx, "C").
|
||||
// Previouly, we called setlocale( LC_NUMERIC, "C" )
|
||||
// The old code will be removed when calling wxLocale( "C", "C", "C", false )
|
||||
// is fully tested, and all issues fixed
|
||||
#define USE_WXLOCALE 1 /* 0 to call setlocale, 1 to call wxLocale */
|
||||
|
||||
// On Windows, when using setlocale, a wx alert is generated
|
||||
// in some cases (reading a bitmap for instance)
|
||||
// So we disable alerts during the time a file is read or written
|
||||
#if !USE_WXLOCALE
|
||||
#if defined( _WIN32 ) && defined( DEBUG )
|
||||
// a wxAssertHandler_t function to filter wxWidgets alert messages when reading/writing a file
|
||||
// when switching the locale to LC_NUMERIC, "C"
|
||||
// It is used in class LOCALE_IO to hide a useless (in kicad) wxWidgets alert message
|
||||
void KiAssertFilter( const wxString &file, int line,
|
||||
const wxString &func, const wxString &cond,
|
||||
const wxString &msg)
|
||||
const wxString &func, const wxString &cond,
|
||||
const wxString &msg)
|
||||
{
|
||||
if( !msg.Contains( "Decimal separator mismatch" ) )
|
||||
wxTheApp->OnAssertFailure( file, line, func, cond, msg );
|
||||
wxTheApp->OnAssertFailure( file.c_str(), line, func.c_str(), cond.c_str(), msg.c_str() );
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
std::atomic<unsigned int> LOCALE_IO::m_c_count( 0 );
|
||||
|
||||
|
||||
// Note on Windows, setlocale( LC_NUMERIC, "C" ) works fine to read/write
|
||||
// files with floating point numbers, but generates a overzealous wx alert
|
||||
// in some cases (reading a bitmap for instance)
|
||||
// So we disable alerts during the time a file is read or written
|
||||
|
||||
LOCALE_IO::LOCALE_IO()
|
||||
LOCALE_IO::LOCALE_IO() : m_wxLocale( nullptr )
|
||||
{
|
||||
// use thread safe, atomic operation
|
||||
if( m_c_count++ == 0 )
|
||||
{
|
||||
#if USE_WXLOCALE
|
||||
m_wxLocale = new wxLocale( "C", "C", "C", false );
|
||||
#else
|
||||
// Store the user locale name, to restore this locale later, in dtor
|
||||
m_user_locale = setlocale( LC_NUMERIC, nullptr );
|
||||
#if defined( _WIN32 ) && defined( DEBUG )
|
||||
@@ -92,6 +105,7 @@ LOCALE_IO::LOCALE_IO()
|
||||
#endif
|
||||
// Switch the locale to C locale, to read/write files with fp numbers
|
||||
setlocale( LC_NUMERIC, "C" );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,10 +116,15 @@ LOCALE_IO::~LOCALE_IO()
|
||||
if( --m_c_count == 0 )
|
||||
{
|
||||
// revert to the user locale
|
||||
#if USE_WXLOCALE
|
||||
delete m_wxLocale; // Deleting m_wxLocale restored previous locale
|
||||
m_wxLocale = nullptr;
|
||||
#else
|
||||
setlocale( LC_NUMERIC, m_user_locale.c_str() );
|
||||
#if defined( _WIN32 ) && defined( DEBUG )
|
||||
// Enable wxWidgets alerts
|
||||
wxSetDefaultAssertHandler();
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -167,12 +186,12 @@ void SelectReferenceNumber( wxTextEntry* aTextEntry )
|
||||
{
|
||||
wxString num = ref;
|
||||
|
||||
while( !num.IsEmpty() && ( !isdigit( num.Last() ) || !isdigit( num.GetChar( 0 ) ) ) )
|
||||
while( !num.IsEmpty() && ( !wxIsdigit( num.Last() ) || !wxIsdigit( num.GetChar( 0 ) ) ) )
|
||||
{
|
||||
if( !isdigit( num.Last() ) )
|
||||
if( !wxIsdigit( num.Last() ) )
|
||||
num.RemoveLast();
|
||||
|
||||
if( !isdigit( num.GetChar ( 0 ) ) )
|
||||
if( !wxIsdigit( num.GetChar ( 0 ) ) )
|
||||
num = num.Right( num.Length() - 1);
|
||||
}
|
||||
|
||||
@@ -425,7 +444,7 @@ wxString KIwxExpandEnvVars(const wxString& str)
|
||||
if( !expanded )
|
||||
strResult << (wxChar)bracket;
|
||||
|
||||
str_m = str[++m];
|
||||
m++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -450,6 +469,11 @@ wxString KIwxExpandEnvVars(const wxString& str)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef __WINDOWS__
|
||||
if( strResult.StartsWith( "~" ) )
|
||||
strResult.Replace( "~", wxGetHomeDir(), false );
|
||||
#endif // __WINDOWS__
|
||||
|
||||
return strResult;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#include <confirm.h>
|
||||
#include <bitmaps.h>
|
||||
#include <html_messagebox.h>
|
||||
#include <dialog_exit_base.h>
|
||||
|
||||
#include <functional>
|
||||
#include <unordered_map>
|
||||
@@ -90,10 +89,10 @@ bool KIDIALOG::Show( bool aShow )
|
||||
return it->second;
|
||||
}
|
||||
|
||||
bool ret = wxRichMessageDialog::Show( aShow );
|
||||
int ret = wxRichMessageDialog::Show( aShow );
|
||||
|
||||
// Has the user asked not to show the dialog again
|
||||
if( IsCheckBoxChecked() )
|
||||
// Has the user asked not to show the dialog again and it was confirmed
|
||||
if( IsCheckBoxChecked() && ret != wxID_CANCEL )
|
||||
doNotShowAgainDlgs[m_hash] = ret;
|
||||
|
||||
return ret;
|
||||
@@ -111,7 +110,7 @@ int KIDIALOG::ShowModal()
|
||||
int ret = wxRichMessageDialog::ShowModal();
|
||||
|
||||
// Has the user asked not to show the dialog again
|
||||
if( IsCheckBoxChecked() )
|
||||
if( IsCheckBoxChecked() && ret != wxID_CANCEL )
|
||||
doNotShowAgainDlgs[m_hash] = ret;
|
||||
|
||||
return ret;
|
||||
@@ -153,65 +152,56 @@ long KIDIALOG::getStyle( KD_TYPE aType )
|
||||
}
|
||||
|
||||
|
||||
class DIALOG_EXIT: public DIALOG_EXIT_BASE
|
||||
{
|
||||
public:
|
||||
DIALOG_EXIT( wxWindow *aParent, const wxString& aWarning, const wxString& aMessage,
|
||||
const wxString& aOKLabel, const wxString& aCancelLabel ) :
|
||||
DIALOG_EXIT_BASE( aParent )
|
||||
{
|
||||
m_bitmap->SetBitmap( KiBitmap( dialog_warning_xpm ) );
|
||||
m_TextInfo->SetLabel( aWarning );
|
||||
m_staticTextWarningMessage->SetLabel( aMessage );
|
||||
|
||||
m_sdbSizerOK->SetLabel( aOKLabel );
|
||||
m_sdbSizerCancel->SetLabel( aCancelLabel );
|
||||
m_sdbSizerOK->SetDefault();
|
||||
|
||||
FinishDialogSettings();
|
||||
};
|
||||
|
||||
private:
|
||||
void OnSave( wxCommandEvent& event ) override { EndModal( wxID_YES ); }
|
||||
void OnDiscard( wxCommandEvent& event ) override { EndModal( wxID_NO ); }
|
||||
};
|
||||
|
||||
|
||||
int UnsavedChangesDialog( wxWindow* parent, const wxString& aMessage, bool* aApplyToAll )
|
||||
{
|
||||
DIALOG_EXIT dlg( parent, aMessage,
|
||||
_( "If you don't save, all your changes will be permanently lost." ),
|
||||
_( "Save" ), _( "Cancel" ) );
|
||||
wxRichMessageDialog dlg( parent, aMessage, wxEmptyString,
|
||||
wxYES_NO | wxCANCEL | wxYES_DEFAULT | wxICON_WARNING | wxCENTER );
|
||||
dlg.ShowDetailedText( _( "If you don't save, all your changes will be permanently lost." ) );
|
||||
dlg.SetYesNoLabels( wxMessageDialog::ButtonLabel( _( "Save" ) ),
|
||||
wxMessageDialog::ButtonLabel( _( "Discard Changes" ) ) );
|
||||
|
||||
dlg.m_ApplyToAllOpt->Show( aApplyToAll != nullptr );
|
||||
if( aApplyToAll )
|
||||
dlg.ShowCheckBox( _( "Apply to all" ), true );
|
||||
|
||||
int ret = dlg.ShowModal();
|
||||
|
||||
if( aApplyToAll )
|
||||
*aApplyToAll = dlg.m_ApplyToAllOpt->GetValue();
|
||||
*aApplyToAll = dlg.IsCheckBoxChecked();
|
||||
|
||||
// Returns wxID_YES, wxID_NO, or wxID_CANCEL
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
int UnsavedChangesDialog( wxWindow* parent, const wxString& aMessage )
|
||||
{
|
||||
wxMessageDialog dlg( parent, aMessage, wxEmptyString,
|
||||
wxYES_NO | wxCANCEL | wxYES_DEFAULT | wxICON_WARNING | wxCENTER );
|
||||
dlg.SetExtendedMessage( _( "If you don't save, all your changes will be permanently lost." ) );
|
||||
dlg.SetYesNoLabels( wxMessageDialog::ButtonLabel( _( "Save" ) ),
|
||||
wxMessageDialog::ButtonLabel( _( "Discard Changes" ) ) );
|
||||
|
||||
// Returns wxID_YES, wxID_NO, or wxID_CANCEL
|
||||
return dlg.ShowModal();
|
||||
}
|
||||
|
||||
|
||||
bool ConfirmRevertDialog( wxWindow* parent, const wxString& aMessage )
|
||||
{
|
||||
DIALOG_EXIT dlg( parent, aMessage,
|
||||
_( "Your current changes will be permanently lost." ),
|
||||
_( "Revert" ), _( "Cancel" ) );
|
||||
wxMessageDialog dlg( parent, aMessage, wxEmptyString,
|
||||
wxOK | wxCANCEL | wxOK_DEFAULT | wxICON_WARNING | wxCENTER );
|
||||
dlg.SetExtendedMessage( _( "Your current changes will be permanently lost." ) );
|
||||
dlg.SetOKCancelLabels( wxMessageDialog::ButtonLabel( _( "Revert" ) ),
|
||||
wxMessageDialog::ButtonLabel( _( "Cancel" ) ) );
|
||||
|
||||
dlg.m_ApplyToAllOpt->Show( false );
|
||||
dlg.m_DiscardButton->Show( false );
|
||||
|
||||
return dlg.ShowModal() == wxID_YES;
|
||||
return dlg.ShowModal() == wxID_OK;
|
||||
}
|
||||
|
||||
|
||||
bool HandleUnsavedChanges( wxWindow* aParent, const wxString& aMessage,
|
||||
const std::function<bool()>& aSaveFunction )
|
||||
{
|
||||
switch( UnsavedChangesDialog( aParent, aMessage, nullptr ) )
|
||||
switch( UnsavedChangesDialog( aParent, aMessage ) )
|
||||
{
|
||||
case wxID_YES: return aSaveFunction();
|
||||
case wxID_NO: return true;
|
||||
@@ -221,20 +211,24 @@ bool HandleUnsavedChanges( wxWindow* aParent, const wxString& aMessage,
|
||||
}
|
||||
|
||||
|
||||
int YesOrCancelDialog( wxWindow* aParent, const wxString& aWarning, const wxString& aMessage,
|
||||
const wxString& aOKLabel, const wxString& aCancelLabel, bool* aApplyToAll )
|
||||
int OKOrCancelDialog( wxWindow* aParent, const wxString& aWarning, const wxString& aMessage,
|
||||
const wxString& aOKLabel, const wxString& aCancelLabel, bool* aApplyToAll )
|
||||
{
|
||||
DIALOG_EXIT dlg( aParent, aWarning, aMessage, aOKLabel, aCancelLabel );
|
||||
wxRichMessageDialog dlg( aParent, aMessage, wxEmptyString,
|
||||
wxOK | wxCANCEL | wxOK_DEFAULT | wxICON_WARNING | wxCENTER );
|
||||
dlg.ShowDetailedText( _( "If you don't save, all your changes will be permanently lost." ) );
|
||||
dlg.SetOKCancelLabels( wxMessageDialog::ButtonLabel( aOKLabel ),
|
||||
wxMessageDialog::ButtonLabel( aCancelLabel ) );
|
||||
|
||||
dlg.m_ApplyToAllOpt->Show( aApplyToAll != nullptr );
|
||||
dlg.m_DiscardButton->Show( false );
|
||||
if( aApplyToAll )
|
||||
dlg.ShowCheckBox( _( "Apply to all" ), true );
|
||||
|
||||
int ret = dlg.ShowModal();
|
||||
|
||||
if( aApplyToAll )
|
||||
*aApplyToAll = dlg.m_ApplyToAllOpt->GetValue();
|
||||
*aApplyToAll = dlg.IsCheckBoxChecked();
|
||||
|
||||
// Returns wxID_YES, wxID_NO, or wxID_CANCEL
|
||||
// Returns wxID_OK or wxID_CANCEL
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -300,7 +294,8 @@ bool IsOK( wxWindow* aParent, const wxString& aMessage )
|
||||
}
|
||||
|
||||
|
||||
int SelectSingleOption( wxWindow* aParent, const wxString& aTitle, const wxString& aMessage, const wxArrayString& aOptions )
|
||||
int SelectSingleOption( wxWindow* aParent, const wxString& aTitle,
|
||||
const wxString& aMessage, const wxArrayString& aOptions )
|
||||
{
|
||||
wxSingleChoiceDialog dlg( aParent, aMessage, aTitle, aOptions );
|
||||
|
||||
|
||||
@@ -32,11 +32,42 @@
|
||||
#include <common.h>
|
||||
#include <convert_basic_shapes_to_polygon.h>
|
||||
|
||||
/**
|
||||
* Function TransformCircleToPolygon
|
||||
* convert a circle to a polygon, using multiple straight lines
|
||||
* @param aBuffer = a SHAPE_LINE_CHAIN to store the polygon corners
|
||||
* @param aCenter = the center of the circle
|
||||
* @param aRadius = the radius of the circle
|
||||
* @param aCircleToSegmentsCount = the number of segments to approximate a circle
|
||||
* Note: the polygon is inside the circle, so if you want to have the polygon
|
||||
* outside the circle, you should give aRadius calculated with a correction factor
|
||||
*/
|
||||
void TransformCircleToPolygon( SHAPE_LINE_CHAIN& aBuffer,
|
||||
wxPoint aCenter, int aRadius,
|
||||
int aCircleToSegmentsCount )
|
||||
{
|
||||
wxPoint corner_position;
|
||||
double delta = 3600.0 / aCircleToSegmentsCount; // rot angle in 0.1 degree
|
||||
double halfstep = delta/2; // the starting value for rot angles
|
||||
|
||||
for( int ii = 0; ii < aCircleToSegmentsCount; ii++ )
|
||||
{
|
||||
corner_position.x = aRadius;
|
||||
corner_position.y = 0;
|
||||
double angle = (ii * delta) + halfstep;
|
||||
RotatePoint( &corner_position, angle );
|
||||
corner_position += aCenter;
|
||||
aBuffer.Append( corner_position.x, corner_position.y );
|
||||
}
|
||||
|
||||
aBuffer.SetClosed( true );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function TransformCircleToPolygon
|
||||
* convert a circle to a polygon, using multiple straight lines
|
||||
* @param aCornerBuffer = a buffer to store the polygon
|
||||
* @param aCornerBuffer = a SHAPE_POLY_SET to store the polygon
|
||||
* @param aCenter = the center of the circle
|
||||
* @param aRadius = the radius of the circle
|
||||
* @param aCircleToSegmentsCount = the number of segments to approximate a circle
|
||||
@@ -397,40 +428,14 @@ void TransformRingToPolygon( SHAPE_POLY_SET& aCornerBuffer,
|
||||
return;
|
||||
}
|
||||
|
||||
aCornerBuffer.NewOutline();
|
||||
SHAPE_POLY_SET buffer;
|
||||
|
||||
// Draw the inner circle of the ring
|
||||
int delta = 3600 / aCircleToSegmentsCount; // rotate angle in 0.1 degree
|
||||
TransformCircleToPolygon( buffer, aCentre, outer_radius, aCircleToSegmentsCount );
|
||||
|
||||
for( int ii = 0; ii < 3600; ii += delta )
|
||||
{
|
||||
curr_point.x = inner_radius;
|
||||
curr_point.y = 0;
|
||||
RotatePoint( &curr_point, ii );
|
||||
curr_point += aCentre;
|
||||
aCornerBuffer.Append( curr_point.x, curr_point.y );
|
||||
}
|
||||
// Build the hole:
|
||||
buffer.NewHole();
|
||||
TransformCircleToPolygon( buffer.Hole( 0, 0 ), aCentre, inner_radius, aCircleToSegmentsCount );
|
||||
|
||||
// Draw the last point of inner circle
|
||||
aCornerBuffer.Append( aCentre.x + inner_radius, aCentre.y );
|
||||
|
||||
// Draw the outer circle of the ring
|
||||
// the first point creates also a segment from the inner to the outer polygon
|
||||
for( int ii = 0; ii < 3600; ii += delta )
|
||||
{
|
||||
curr_point.x = outer_radius;
|
||||
curr_point.y = 0;
|
||||
RotatePoint( &curr_point, -ii );
|
||||
curr_point += aCentre;
|
||||
aCornerBuffer.Append( curr_point.x, curr_point.y );
|
||||
}
|
||||
|
||||
// Draw the last point of outer circle
|
||||
aCornerBuffer.Append( aCentre.x + outer_radius, aCentre.y );
|
||||
|
||||
// And connect the outer polygon to the inner polygon,.
|
||||
// because a segment from inner to the outer polygon was already created,
|
||||
// the final polygon is the inner and the outer outlines connected by
|
||||
// 2 overlapping segments
|
||||
aCornerBuffer.Append( aCentre.x + inner_radius, aCentre.y );
|
||||
buffer.Fracture( SHAPE_POLY_SET::PM_FAST );
|
||||
aCornerBuffer.Append( buffer );
|
||||
}
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2019 KiCad Developers, see CHANGELOG.TXT for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, you may find one here:
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* or you may search the http://www.gnu.org website for the version 2 license,
|
||||
* or you may write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <cursor_store.h>
|
||||
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/debug.h>
|
||||
|
||||
|
||||
/**
|
||||
* Construct a cursor for the given definition.
|
||||
*
|
||||
* How to do this depends on the platform, see
|
||||
* http://docs.wxwidgets.org/trunk/classwx_cursor.html
|
||||
*
|
||||
* @param aDef the cursor definition
|
||||
* @return a newly constructed cursor if the platform is supported,
|
||||
* else wxNullCursor
|
||||
*/
|
||||
wxCursor constructCursor( const CURSOR_STORE::CURSOR_DEF& aDef )
|
||||
{
|
||||
#if defined( __WXMSW__ ) or defined( __WXMAC__ )
|
||||
|
||||
wxBitmap img_bitmap(
|
||||
reinterpret_cast<const char*>( aDef.m_image_data ), aDef.m_size.x, aDef.m_size.y );
|
||||
wxBitmap msk_bitmap(
|
||||
reinterpret_cast<const char*>( aDef.m_mask_data ), aDef.m_size.x, aDef.m_size.y );
|
||||
img_bitmap.SetMask( new wxMask( msk_bitmap ) );
|
||||
|
||||
wxImage image( img_bitmap.ConvertToImage() );
|
||||
|
||||
#if defined( __WXMSW__ )
|
||||
image.SetMaskColour( 255, 255, 255 );
|
||||
#endif
|
||||
|
||||
image.SetOption( wxIMAGE_OPTION_CUR_HOTSPOT_X, aDef.m_hotspot.x );
|
||||
image.SetOption( wxIMAGE_OPTION_CUR_HOTSPOT_Y, aDef.m_hotspot.y );
|
||||
|
||||
return wxCursor{ image };
|
||||
|
||||
#elif defined( __WXGTK__ ) or defined( __WXMOTIF__ )
|
||||
|
||||
return wxCursor{
|
||||
reinterpret_cast<const char*>( aDef.m_image_data ),
|
||||
aDef.m_size.x,
|
||||
aDef.m_size.y,
|
||||
aDef.m_hotspot.x,
|
||||
aDef.m_hotspot.y,
|
||||
reinterpret_cast<const char*>( aDef.m_mask_data ),
|
||||
};
|
||||
|
||||
#else
|
||||
wxASSERT_MSG( false, "Unknown platform for cursor construction." );
|
||||
return wxNullCursor;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
CURSOR_STORE::CURSOR_STORE( const std::vector<CURSOR_DEF>& aDefs )
|
||||
{
|
||||
for( const auto& def : aDefs )
|
||||
{
|
||||
m_store[def.m_id_key] = constructCursor( def );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const wxCursor& CURSOR_STORE::Get( int aIdKey ) const
|
||||
{
|
||||
const auto find_iter = m_store.find( aIdKey );
|
||||
|
||||
if( find_iter != m_store.end() )
|
||||
{
|
||||
return find_iter->second;
|
||||
}
|
||||
|
||||
wxASSERT_MSG( false,
|
||||
wxString::Format( "Could not find cursor with ID %d", static_cast<int>( aIdKey ) ) );
|
||||
return wxNullCursor;
|
||||
}
|
||||
@@ -64,7 +64,7 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
|
||||
aInfo.SetAppName( Pgm().App().GetAppName() );
|
||||
|
||||
/* Copyright information */
|
||||
aInfo.SetCopyright( "(C) 1992-2019 KiCad Developers Team" );
|
||||
aInfo.SetCopyright( "(C) 1992-2020 KiCad Developers Team" );
|
||||
|
||||
/* KiCad build version */
|
||||
wxString version;
|
||||
@@ -152,8 +152,7 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
|
||||
description << "<ul>";
|
||||
description << "<li>"
|
||||
<< _( "Report or examine bugs - " )
|
||||
<< HtmlHyperlink( "https://bugs.launchpad.net/kicad/+bugs?orderby=-id&start=0",
|
||||
"https://bugs.launchpad.net/kicad" )
|
||||
<< HtmlHyperlink( "https://gitlab.com/kicad/code/kicad/issues" )
|
||||
<< "</li>";
|
||||
description << "</ul></p>";
|
||||
|
||||
@@ -167,11 +166,6 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
|
||||
<< HtmlHyperlink( "https://forum.kicad.info" )
|
||||
<< "</li>";
|
||||
|
||||
description << "<li>"
|
||||
<<_( "KiCad user's group - " )
|
||||
<< HtmlHyperlink( "https://groups.yahoo.com/neo/groups/kicad-users/info" )
|
||||
<< "</li>";
|
||||
|
||||
description << "</ul></p>";
|
||||
|
||||
aInfo.SetDescription( description );
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2010 Rafael Sokolowski <Rafael.Sokolowski@web.de>
|
||||
* Copyright (C) 2017 KiCad Developers, see CHANGELOG.TXT for contributors.
|
||||
* Copyright (C) 2017-2019 KiCad Developers, see CHANGELOG.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
|
||||
@@ -68,6 +68,8 @@ extern std::string GetCurlLibVersion();
|
||||
DIALOG_ABOUT::DIALOG_ABOUT( EDA_BASE_FRAME *aParent, ABOUT_APP_INFO& aAppInfo )
|
||||
: DIALOG_ABOUT_BASE( aParent ), m_info( aAppInfo )
|
||||
{
|
||||
wxASSERT( aParent != nullptr );
|
||||
|
||||
m_picInformation = KiBitmap( info_xpm );
|
||||
m_picDevelopers = KiBitmap( preference_xpm );
|
||||
m_picDocWriters = KiBitmap( editor_xpm );
|
||||
@@ -89,11 +91,13 @@ DIALOG_ABOUT::DIALOG_ABOUT( EDA_BASE_FRAME *aParent, ABOUT_APP_INFO& aAppInfo )
|
||||
m_bitmapApp->SetBitmap( icon );
|
||||
}
|
||||
|
||||
m_staticTextAppTitle->SetLabel( m_info.GetAppName() );
|
||||
m_titleName = aParent->GetAboutTitle();
|
||||
m_staticTextAppTitle->SetLabel( m_titleName );
|
||||
m_staticTextCopyright->SetLabel( m_info.GetCopyright() );
|
||||
m_staticTextBuildVersion->SetLabel( "Version: " + m_info.GetBuildVersion() );
|
||||
m_staticTextLibVersion->SetLabel( m_info.GetLibVersion() );
|
||||
|
||||
SetTitle( wxString::Format( _( "About %s" ), m_titleName ) );
|
||||
createNotebooks();
|
||||
|
||||
GetSizer()->SetSizeHints( this );
|
||||
@@ -124,10 +128,13 @@ void DIALOG_ABOUT::createNotebooks()
|
||||
createNotebookHtmlPage( m_auiNotebook, _( "Information" ), m_picInformation,
|
||||
m_info.GetDescription() );
|
||||
|
||||
createNotebookPage( m_auiNotebook, _( "Developers" ) , m_picDevelopers, m_info.GetDevelopers() );
|
||||
createNotebookPage( m_auiNotebook, _( "Doc Writers" ), m_picDocWriters, m_info.GetDocWriters() );
|
||||
createNotebookPage( m_auiNotebook, _( "Developers" ) , m_picDevelopers,
|
||||
m_info.GetDevelopers() );
|
||||
createNotebookPage( m_auiNotebook, _( "Doc Writers" ), m_picDocWriters,
|
||||
m_info.GetDocWriters() );
|
||||
|
||||
createNotebookPageByCategory( m_auiNotebook, _( "Artists" ), m_picArtists, m_info.GetArtists() );
|
||||
createNotebookPageByCategory( m_auiNotebook, _( "Artists" ), m_picArtists,
|
||||
m_info.GetArtists() );
|
||||
createNotebookPageByCategory( m_auiNotebook, _( "Translators" ), m_picTranslators,
|
||||
m_info.GetTranslators() );
|
||||
createNotebookPageByCategory( m_auiNotebook, _( "Packagers" ), m_picPackagers,
|
||||
@@ -237,7 +244,8 @@ void DIALOG_ABOUT::createNotebookPageByCategory(wxAuiNotebook* aParent, const wx
|
||||
wxStaticText* m_staticText1 = new wxStaticText( m_scrolledWindow1, wxID_ANY,
|
||||
contributor->GetCategory() + wxT( ":" ),
|
||||
wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText1->SetFont( wxFont( -1, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false,
|
||||
m_staticText1->SetFont( wxFont( -1, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL,
|
||||
wxFONTWEIGHT_BOLD, false,
|
||||
wxEmptyString ) ); // bold font
|
||||
m_staticText1->Wrap( -1 );
|
||||
fgSizer1->Add( m_staticText1, 0, wxALIGN_LEFT|wxBOTTOM, 2 );
|
||||
@@ -444,7 +452,7 @@ void DIALOG_ABOUT::buildVersionInfoData( wxString& aMsg, bool aFormatHtml )
|
||||
#define OFF "OFF" << eol
|
||||
|
||||
wxPlatformInfo platform;
|
||||
aMsg << "Application: " << m_info.GetAppName() << eol;
|
||||
aMsg << "Application: " << m_titleName << eol;
|
||||
aMsg << "Version: " << m_info.GetBuildVersion() << eol;
|
||||
aMsg << "Libraries:" << eol;
|
||||
aMsg << indent4 << wxGetLibraryVersionInfo().GetVersionString() << eol;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2010 Rafael Sokolowski <Rafael.Sokolowski@web.de>
|
||||
* Copyright (C) 2010-2017 KiCad Developers, see CHANGELOG.TXT for contributors.
|
||||
* Copyright (C) 2010-2019 KiCad Developers, see CHANGELOG.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
|
||||
@@ -49,6 +49,7 @@ private:
|
||||
wxBitmap m_picTranslators;
|
||||
wxBitmap m_picPackagers;
|
||||
wxBitmap m_picLicense;
|
||||
wxString m_titleName;
|
||||
|
||||
ABOUT_APP_INFO& m_info;
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version May 6 2016)
|
||||
// C++ code generated with wxFormBuilder (version Mar 28 2019)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "dialog_about_base.h"
|
||||
@@ -12,77 +12,78 @@
|
||||
DIALOG_ABOUT_BASE::DIALOG_ABOUT_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
|
||||
{
|
||||
this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
|
||||
|
||||
|
||||
wxBoxSizer* bSizerMain;
|
||||
bSizerMain = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
wxBoxSizer* bSizerTitle;
|
||||
bSizerTitle = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerTitle->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_bitmapApp = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerTitle->Add( m_bitmapApp, 1, wxALIGN_CENTER|wxALL, 5 );
|
||||
|
||||
|
||||
wxBoxSizer* b_apptitleSizer;
|
||||
b_apptitleSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_staticTextAppTitle = new wxStaticText( this, wxID_ANY, _("App Title"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
|
||||
|
||||
m_staticTextAppTitle = new wxStaticText( this, wxID_ANY, _("App Title"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER_HORIZONTAL );
|
||||
m_staticTextAppTitle->Wrap( -1 );
|
||||
m_staticTextAppTitle->SetFont( wxFont( 14, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
|
||||
|
||||
|
||||
b_apptitleSizer->Add( m_staticTextAppTitle, 0, wxALIGN_CENTER|wxALL, 5 );
|
||||
|
||||
m_staticTextCopyright = new wxStaticText( this, wxID_ANY, _("Copyright Info"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
|
||||
|
||||
m_staticTextCopyright = new wxStaticText( this, wxID_ANY, _("Copyright Info"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER_HORIZONTAL );
|
||||
m_staticTextCopyright->Wrap( -1 );
|
||||
b_apptitleSizer->Add( m_staticTextCopyright, 0, wxALIGN_CENTER|wxALL, 1 );
|
||||
|
||||
m_staticTextBuildVersion = new wxStaticText( this, wxID_ANY, _("Build Version Info"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
|
||||
|
||||
m_staticTextBuildVersion = new wxStaticText( this, wxID_ANY, _("Build Version Info"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER_HORIZONTAL );
|
||||
m_staticTextBuildVersion->Wrap( -1 );
|
||||
b_apptitleSizer->Add( m_staticTextBuildVersion, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||
|
||||
m_staticTextLibVersion = new wxStaticText( this, wxID_ANY, _("Lib Version Info"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
|
||||
|
||||
m_staticTextLibVersion = new wxStaticText( this, wxID_ANY, _("Lib Version Info"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER_HORIZONTAL );
|
||||
m_staticTextLibVersion->Wrap( -1 );
|
||||
b_apptitleSizer->Add( m_staticTextLibVersion, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerTitle->Add( b_apptitleSizer, 10, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerTitle->Add( 0, 0, 2, wxEXPAND, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerMain->Add( bSizerTitle, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_auiNotebook = new wxAuiNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_NB_SCROLL_BUTTONS|wxAUI_NB_TAB_FIXED_WIDTH );
|
||||
m_auiNotebook->SetMinSize( wxSize( 750,350 ) );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerMain->Add( m_auiNotebook, 2, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
wxBoxSizer* bSizerButtons;
|
||||
bSizerButtons = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_btShowVersionInfo = new wxButton( this, wxID_COPY, _("Show Version Info"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
|
||||
m_btShowVersionInfo = new wxButton( this, wxID_COPY, _("&Show Version Info"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerButtons->Add( m_btShowVersionInfo, 0, wxALL, 5 );
|
||||
|
||||
m_btCopyVersionInfo = new wxButton( this, wxID_COPY, _("Copy Version Info"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
|
||||
m_btCopyVersionInfo = new wxButton( this, wxID_COPY, _("&Copy Version Info"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_btCopyVersionInfo->SetToolTip( _("Copy KiCad version info to the clipboard") );
|
||||
|
||||
|
||||
bSizerButtons->Add( m_btCopyVersionInfo, 0, wxALL, 5 );
|
||||
|
||||
m_btOk = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_btOk->SetDefault();
|
||||
|
||||
m_btOk = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
|
||||
m_btOk->SetDefault();
|
||||
bSizerButtons->Add( m_btOk, 0, wxALL, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerMain->Add( bSizerButtons, 0, wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
this->SetSizer( bSizerMain );
|
||||
this->Layout();
|
||||
|
||||
|
||||
// Connect Events
|
||||
m_btShowVersionInfo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ABOUT_BASE::onShowVersionInfo ), NULL, this );
|
||||
m_btCopyVersionInfo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ABOUT_BASE::onCopyVersionInfo ), NULL, this );
|
||||
@@ -93,5 +94,5 @@ DIALOG_ABOUT_BASE::~DIALOG_ABOUT_BASE()
|
||||
// Disconnect Events
|
||||
m_btShowVersionInfo->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ABOUT_BASE::onShowVersionInfo ), NULL, this );
|
||||
m_btCopyVersionInfo->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ABOUT_BASE::onCopyVersionInfo ), NULL, this );
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<wxFormBuilder_Project>
|
||||
<FileVersion major="1" minor="13" />
|
||||
<FileVersion major="1" minor="15" />
|
||||
<object class="Project" expanded="1">
|
||||
<property name="class_decoration"></property>
|
||||
<property name="code_generation">C++</property>
|
||||
@@ -14,6 +14,8 @@
|
||||
<property name="file">dialog_about_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">MyProject</property>
|
||||
<property name="namespace"></property>
|
||||
@@ -24,6 +26,7 @@
|
||||
<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">1</property>
|
||||
<property name="use_microsoft_bom">0</property>
|
||||
<object class="Dialog" expanded="1">
|
||||
@@ -52,42 +55,6 @@
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnActivate"></event>
|
||||
<event name="OnActivateApp"></event>
|
||||
<event name="OnAuiFindManager"></event>
|
||||
<event name="OnAuiPaneButton"></event>
|
||||
<event name="OnAuiPaneClose"></event>
|
||||
<event name="OnAuiPaneMaximize"></event>
|
||||
<event name="OnAuiPaneRestore"></event>
|
||||
<event name="OnAuiRender"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnClose"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnHibernate"></event>
|
||||
<event name="OnIconize"></event>
|
||||
<event name="OnIdle"></event>
|
||||
<event name="OnInitDialog"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizerMain</property>
|
||||
@@ -168,29 +135,6 @@
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
@@ -235,6 +179,7 @@
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">App Title</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
@@ -252,7 +197,7 @@
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxALIGN_CENTRE</property>
|
||||
<property name="style">wxALIGN_CENTER_HORIZONTAL</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
@@ -260,29 +205,6 @@
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
@@ -318,6 +240,7 @@
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Copyright Info</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
@@ -335,7 +258,7 @@
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxALIGN_CENTRE</property>
|
||||
<property name="style">wxALIGN_CENTER_HORIZONTAL</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
@@ -343,29 +266,6 @@
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
@@ -401,6 +301,7 @@
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Build Version Info</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
@@ -418,7 +319,7 @@
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxALIGN_CENTRE</property>
|
||||
<property name="style">wxALIGN_CENTER_HORIZONTAL</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
@@ -426,29 +327,6 @@
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
@@ -484,6 +362,7 @@
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Lib Version Info</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
@@ -501,7 +380,7 @@
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxALIGN_CENTRE</property>
|
||||
<property name="style">wxALIGN_CENTER_HORIZONTAL</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
@@ -509,29 +388,6 @@
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
@@ -606,37 +462,6 @@
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAuiNotebookAllowDND"></event>
|
||||
<event name="OnAuiNotebookBeginDrag"></event>
|
||||
<event name="OnAuiNotebookButton"></event>
|
||||
<event name="OnAuiNotebookDragMotion"></event>
|
||||
<event name="OnAuiNotebookEndDrag"></event>
|
||||
<event name="OnAuiNotebookPageChanged"></event>
|
||||
<event name="OnAuiNotebookPageChanging"></event>
|
||||
<event name="OnAuiNotebookPageClose"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
@@ -663,25 +488,31 @@
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmap"></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="current"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="disabled"></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="focus"></property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_COPY</property>
|
||||
<property name="label">Show Version Info</property>
|
||||
<property name="label">&Show Version Info</property>
|
||||
<property name="margins"></property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
@@ -696,6 +527,8 @@
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="pressed"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
@@ -711,29 +544,6 @@
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">onShowVersionInfo</event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
@@ -751,25 +561,31 @@
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmap"></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="current"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="disabled"></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="focus"></property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_COPY</property>
|
||||
<property name="label">Copy Version Info</property>
|
||||
<property name="label">&Copy Version Info</property>
|
||||
<property name="margins"></property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
@@ -784,6 +600,8 @@
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="pressed"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
@@ -799,29 +617,6 @@
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">onCopyVersionInfo</event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
@@ -839,25 +634,31 @@
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmap"></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="current"></property>
|
||||
<property name="default">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="disabled"></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="focus"></property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_OK</property>
|
||||
<property name="label">OK</property>
|
||||
<property name="label">&OK</property>
|
||||
<property name="margins"></property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
@@ -872,6 +673,8 @@
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="pressed"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
@@ -886,30 +689,6 @@
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version May 6 2016)
|
||||
// C++ code generated with wxFormBuilder (version Mar 28 2019)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __DIALOG_ABOUT_BASE_H__
|
||||
#define __DIALOG_ABOUT_BASE_H__
|
||||
#pragma once
|
||||
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
@@ -31,10 +30,10 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class DIALOG_ABOUT_BASE
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class DIALOG_ABOUT_BASE : public wxDialog
|
||||
class DIALOG_ABOUT_BASE : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxStaticBitmap* m_bitmapApp;
|
||||
wxStaticText* m_staticTextAppTitle;
|
||||
@@ -45,17 +44,16 @@ class DIALOG_ABOUT_BASE : public wxDialog
|
||||
wxButton* m_btShowVersionInfo;
|
||||
wxButton* m_btCopyVersionInfo;
|
||||
wxButton* m_btOk;
|
||||
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void onShowVersionInfo( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void onCopyVersionInfo( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
DIALOG_ABOUT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 750,471 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
|
||||
DIALOG_ABOUT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 750,471 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_ABOUT_BASE();
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif //__DIALOG_ABOUT_BASE_H__
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <kiway_player.h>
|
||||
#include <wx/evtloop.h>
|
||||
#include <pgm_base.h>
|
||||
#include <tool/tool_manager.h>
|
||||
#include <eda_rect.h>
|
||||
#include <wx/display.h>
|
||||
#include <wx/grid.h>
|
||||
@@ -92,6 +93,12 @@ DIALOG_SHIM::DIALOG_SHIM( wxWindow* aParent, wxWindowID id, const wxString& titl
|
||||
// Inherit units from parent
|
||||
m_units = kiwayHolder->GetUserUnits();
|
||||
|
||||
// Don't mouse-warp after a dialog run from the context menu
|
||||
TOOL_MANAGER* toolMgr = kiwayHolder->GetToolManager();
|
||||
|
||||
if( toolMgr )
|
||||
toolMgr->VetoContextMenuMouseWarp();
|
||||
|
||||
// Set up the message bus
|
||||
SetKiway( this, &kiwayHolder->Kiway() );
|
||||
}
|
||||
|
||||
@@ -23,6 +23,18 @@
|
||||
|
||||
#define ALPHA_MAX 100 // the max value returned by the alpha (opacity) slider
|
||||
|
||||
|
||||
// Configure the spin controls contained inside the dialog
|
||||
void configureSpinCtrl( wxSpinCtrl* aCtrl )
|
||||
{
|
||||
wxSize textLength = aCtrl->GetTextExtent( "999" );
|
||||
wxSize ctrlSize = aCtrl->GetSizeFromTextSize( textLength );
|
||||
|
||||
aCtrl->SetMinSize( ctrlSize );
|
||||
aCtrl->SetSize( ctrlSize );
|
||||
}
|
||||
|
||||
|
||||
DIALOG_COLOR_PICKER::DIALOG_COLOR_PICKER( wxWindow* aParent, KIGFX::COLOR4D& aCurrentColor,
|
||||
bool aAllowOpacityControl, CUSTOM_COLORS_LIST* aUserColors )
|
||||
: DIALOG_COLOR_PICKER_BASE( aParent )
|
||||
@@ -131,6 +143,13 @@ bool DIALOG_COLOR_PICKER::TransferDataToWindow()
|
||||
SetEditVals( ALL_CHANGED );
|
||||
drawAll();
|
||||
|
||||
// Configure the spin control sizes
|
||||
configureSpinCtrl( m_spinCtrlGreen );
|
||||
configureSpinCtrl( m_spinCtrlBlue );
|
||||
configureSpinCtrl( m_spinCtrlRed );
|
||||
configureSpinCtrl( m_spinCtrlHue );
|
||||
configureSpinCtrl( m_spinCtrlSaturation );
|
||||
|
||||
m_notebook->GetPage( 0 )->Layout();
|
||||
m_notebook->GetPage( 1 )->Layout();
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jul 11 2018)
|
||||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@@ -12,29 +12,29 @@
|
||||
DIALOG_COLOR_PICKER_BASE::DIALOG_COLOR_PICKER_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
||||
{
|
||||
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
||||
|
||||
|
||||
wxBoxSizer* bSizerMain;
|
||||
bSizerMain = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
wxBoxSizer* bSizerUpperMain;
|
||||
bSizerUpperMain = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
|
||||
m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_panelFreeColors = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizerUpperFreeColors;
|
||||
bSizerUpperFreeColors = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
wxBoxSizer* bSizerPanels;
|
||||
bSizerPanels = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
|
||||
wxStaticBoxSizer* sbSizerViewRGB;
|
||||
sbSizerViewRGB = new wxStaticBoxSizer( new wxStaticBox( m_panelFreeColors, wxID_ANY, _("RGB") ), wxVERTICAL );
|
||||
|
||||
|
||||
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 );
|
||||
|
||||
|
||||
wxFlexGridSizer* fgSizerRGB;
|
||||
fgSizerRGB = new wxFlexGridSizer( 0, 3, 0, 0 );
|
||||
fgSizerRGB->AddGrowableCol( 0 );
|
||||
@@ -42,109 +42,99 @@ DIALOG_COLOR_PICKER_BASE::DIALOG_COLOR_PICKER_BASE( wxWindow* parent, wxWindowID
|
||||
fgSizerRGB->AddGrowableCol( 2 );
|
||||
fgSizerRGB->SetFlexibleDirection( wxBOTH );
|
||||
fgSizerRGB->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
|
||||
m_staticTextR = new wxStaticText( sbSizerViewRGB->GetStaticBox(), wxID_ANY, _("Red:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextR->Wrap( -1 );
|
||||
fgSizerRGB->Add( m_staticTextR, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_staticTextG = new wxStaticText( sbSizerViewRGB->GetStaticBox(), wxID_ANY, _("Green:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextG->Wrap( -1 );
|
||||
fgSizerRGB->Add( m_staticTextG, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_staticTextB = new wxStaticText( sbSizerViewRGB->GetStaticBox(), wxID_ANY, _("Blue:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextB->Wrap( -1 );
|
||||
fgSizerRGB->Add( m_staticTextB, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_spinCtrlRed = new wxSpinCtrl( sbSizerViewRGB->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 255, 128 );
|
||||
m_spinCtrlRed->SetMinSize( wxSize( 80,-1 ) );
|
||||
|
||||
fgSizerRGB->Add( m_spinCtrlRed, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_spinCtrlGreen = new wxSpinCtrl( sbSizerViewRGB->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 255, 128 );
|
||||
m_spinCtrlGreen->SetMinSize( wxSize( 80,-1 ) );
|
||||
|
||||
fgSizerRGB->Add( m_spinCtrlGreen, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_spinCtrlBlue = new wxSpinCtrl( sbSizerViewRGB->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 255, 128 );
|
||||
m_spinCtrlBlue->SetMinSize( wxSize( 80,-1 ) );
|
||||
|
||||
fgSizerRGB->Add( m_spinCtrlBlue, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
sbSizerViewRGB->Add( fgSizerRGB, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerPanels->Add( sbSizerViewRGB, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
wxStaticBoxSizer* sbSizerViewHSV;
|
||||
sbSizerViewHSV = new wxStaticBoxSizer( new wxStaticBox( m_panelFreeColors, wxID_ANY, _("HSV") ), wxHORIZONTAL );
|
||||
|
||||
|
||||
wxBoxSizer* bSizer10;
|
||||
bSizer10 = new wxBoxSizer( 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 );
|
||||
|
||||
|
||||
wxFlexGridSizer* fgSizerHSV;
|
||||
fgSizerHSV = new wxFlexGridSizer( 0, 2, 0, 0 );
|
||||
fgSizerHSV->AddGrowableCol( 0 );
|
||||
fgSizerHSV->AddGrowableCol( 1 );
|
||||
fgSizerHSV->SetFlexibleDirection( wxBOTH );
|
||||
fgSizerHSV->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
|
||||
m_staticTextHue = new wxStaticText( sbSizerViewHSV->GetStaticBox(), wxID_ANY, _("Hue:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextHue->Wrap( -1 );
|
||||
fgSizerHSV->Add( m_staticTextHue, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_staticTextSat = new wxStaticText( sbSizerViewHSV->GetStaticBox(), wxID_ANY, _("Saturation:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextSat->Wrap( -1 );
|
||||
fgSizerHSV->Add( m_staticTextSat, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_spinCtrlHue = new wxSpinCtrl( sbSizerViewHSV->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 0, 359, 0 );
|
||||
m_spinCtrlHue->SetMinSize( wxSize( 80,-1 ) );
|
||||
|
||||
fgSizerHSV->Add( m_spinCtrlHue, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_spinCtrlSaturation = new wxSpinCtrl( sbSizerViewHSV->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 255, 128 );
|
||||
m_spinCtrlSaturation->SetMinSize( wxSize( 80,-1 ) );
|
||||
|
||||
fgSizerHSV->Add( m_spinCtrlSaturation, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizer10->Add( fgSizerHSV, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
sbSizerViewHSV->Add( bSizer10, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
wxBoxSizer* bSizerBright;
|
||||
bSizerBright = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
m_staticTextBright = new wxStaticText( sbSizerViewHSV->GetStaticBox(), 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_LABELS|wxSL_LEFT|wxSL_VERTICAL );
|
||||
|
||||
m_sliderBrightness = new wxSlider( sbSizerViewHSV->GetStaticBox(), wxID_ANY, 255, 0, 255, wxDefaultPosition, wxDefaultSize, wxSL_INVERSE|wxSL_LABELS|wxSL_LEFT|wxSL_VERTICAL );
|
||||
bSizerBright->Add( m_sliderBrightness, 1, wxTOP|wxRIGHT|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
sbSizerViewHSV->Add( bSizerBright, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerPanels->Add( sbSizerViewHSV, 0, wxEXPAND|wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerUpperFreeColors->Add( bSizerPanels, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
m_panelFreeColors->SetSizer( bSizerUpperFreeColors );
|
||||
m_panelFreeColors->Layout();
|
||||
bSizerUpperFreeColors->Fit( m_panelFreeColors );
|
||||
m_notebook->AddPage( m_panelFreeColors, _("Color Picker"), true );
|
||||
m_panelDefinedColors = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
m_SizerDefinedColors = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
m_fgridColor = new wxFlexGridSizer( 0, 10, 0, 0 );
|
||||
m_fgridColor->AddGrowableCol( 1 );
|
||||
m_fgridColor->AddGrowableCol( 3 );
|
||||
@@ -153,78 +143,78 @@ DIALOG_COLOR_PICKER_BASE::DIALOG_COLOR_PICKER_BASE( wxWindow* parent, wxWindowID
|
||||
m_fgridColor->AddGrowableCol( 9 );
|
||||
m_fgridColor->SetFlexibleDirection( wxBOTH );
|
||||
m_fgridColor->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
|
||||
|
||||
|
||||
m_SizerDefinedColors->Add( m_fgridColor, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
m_panelDefinedColors->SetSizer( m_SizerDefinedColors );
|
||||
m_panelDefinedColors->Layout();
|
||||
m_SizerDefinedColors->Fit( m_panelDefinedColors );
|
||||
m_notebook->AddPage( m_panelDefinedColors, _("Defined Colors"), false );
|
||||
|
||||
|
||||
bSizerUpperMain->Add( m_notebook, 0, wxEXPAND | wxALL, 5 );
|
||||
|
||||
|
||||
m_SizerTransparency = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
|
||||
|
||||
m_SizerTransparency->Add( 0, 20, 0, wxTOP, 5 );
|
||||
|
||||
|
||||
m_opacityLabel = new wxStaticText( this, wxID_ANY, _("Opacity:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_opacityLabel->Wrap( -1 );
|
||||
m_SizerTransparency->Add( m_opacityLabel, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxLEFT, 5 );
|
||||
|
||||
m_sliderTransparency = new wxSlider( this, wxID_ANY, 80, 20, 100, wxDefaultPosition, wxDefaultSize, wxSL_LABELS|wxSL_LEFT|wxSL_VERTICAL );
|
||||
|
||||
m_sliderTransparency = new wxSlider( this, wxID_ANY, 80, 20, 100, wxDefaultPosition, wxDefaultSize, wxSL_INVERSE|wxSL_LABELS|wxSL_LEFT|wxSL_VERTICAL );
|
||||
m_SizerTransparency->Add( m_sliderTransparency, 1, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_HORIZONTAL, 10 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerUpperMain->Add( m_SizerTransparency, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerUpperMain->Add( 0, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerMain->Add( bSizerUpperMain, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_staticline = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
bSizerMain->Add( m_staticline, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 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|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_OldColorRect = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
|
||||
m_OldColorRect->SetMinSize( wxSize( 30,22 ) );
|
||||
|
||||
|
||||
bButtonsSizer->Add( m_OldColorRect, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_NewColorRect = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
|
||||
m_NewColorRect->SetMinSize( wxSize( 30,22 ) );
|
||||
|
||||
|
||||
bButtonsSizer->Add( m_NewColorRect, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
m_sdbSizer = new wxStdDialogButtonSizer();
|
||||
m_sdbSizerOK = new wxButton( this, wxID_OK );
|
||||
m_sdbSizer->AddButton( m_sdbSizerOK );
|
||||
m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
|
||||
m_sdbSizer->AddButton( m_sdbSizerCancel );
|
||||
m_sdbSizer->Realize();
|
||||
|
||||
|
||||
bButtonsSizer->Add( m_sdbSizer, 1, wxALL, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerMain->Add( bButtonsSizer, 1, wxEXPAND|wxLEFT, 10 );
|
||||
|
||||
|
||||
|
||||
|
||||
this->SetSizer( bSizerMain );
|
||||
this->Layout();
|
||||
bSizerMain->Fit( this );
|
||||
|
||||
|
||||
this->Centre( wxBOTH );
|
||||
|
||||
|
||||
// Connect Events
|
||||
m_RgbBitmap->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_COLOR_PICKER_BASE::onRGBMouseClick ), NULL, this );
|
||||
m_RgbBitmap->Connect( wxEVT_MOTION, wxMouseEventHandler( DIALOG_COLOR_PICKER_BASE::onRGBMouseDrag ), NULL, this );
|
||||
@@ -285,5 +275,5 @@ DIALOG_COLOR_PICKER_BASE::~DIALOG_COLOR_PICKER_BASE()
|
||||
m_sliderTransparency->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( DIALOG_COLOR_PICKER_BASE::OnChangeAlpha ), NULL, this );
|
||||
m_sliderTransparency->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( DIALOG_COLOR_PICKER_BASE::OnChangeAlpha ), NULL, this );
|
||||
m_sliderTransparency->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( DIALOG_COLOR_PICKER_BASE::OnChangeAlpha ), NULL, this );
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jul 11 2018)
|
||||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __DIALOG_COLOR_PICKER_BASE_H__
|
||||
#define __DIALOG_COLOR_PICKER_BASE_H__
|
||||
#pragma once
|
||||
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
@@ -41,7 +40,7 @@
|
||||
class DIALOG_COLOR_PICKER_BASE : public DIALOG_SHIM
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxNotebook* m_notebook;
|
||||
wxPanel* m_panelFreeColors;
|
||||
@@ -72,7 +71,7 @@ class DIALOG_COLOR_PICKER_BASE : public DIALOG_SHIM
|
||||
wxStdDialogButtonSizer* m_sdbSizer;
|
||||
wxButton* m_sdbSizerOK;
|
||||
wxButton* m_sdbSizerCancel;
|
||||
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void onRGBMouseClick( wxMouseEvent& event ) { event.Skip(); }
|
||||
virtual void onRGBMouseDrag( wxMouseEvent& event ) { event.Skip(); }
|
||||
@@ -85,13 +84,12 @@ class DIALOG_COLOR_PICKER_BASE : public DIALOG_SHIM
|
||||
virtual void OnChangeEditSat( wxSpinEvent& event ) { event.Skip(); }
|
||||
virtual void OnChangeBrightness( wxScrollEvent& event ) { event.Skip(); }
|
||||
virtual void OnChangeAlpha( wxScrollEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
DIALOG_COLOR_PICKER_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Color Picker"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
|
||||
DIALOG_COLOR_PICKER_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Color Picker"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_COLOR_PICKER_BASE();
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif //__DIALOG_COLOR_PICKER_BASE_H__
|
||||
|
||||
@@ -221,14 +221,17 @@ bool DIALOG_CONFIGURE_PATHS::TransferDataFromWindow()
|
||||
|
||||
for( int row = 0; row < m_EnvVars->GetNumberRows(); ++row )
|
||||
{
|
||||
wxString name = m_EnvVars->GetCellValue( row, EV_NAME_COL );
|
||||
wxString path = m_EnvVars->GetCellValue( row, EV_PATH_COL );
|
||||
wxString external = m_EnvVars->GetCellValue( row, EV_FLAG_COL );
|
||||
wxString name = m_EnvVars->GetCellValue( row, EV_NAME_COL );
|
||||
wxString path = m_EnvVars->GetCellValue( row, EV_PATH_COL );
|
||||
wxString external = m_EnvVars->GetCellValue( row, EV_FLAG_COL );
|
||||
ENV_VAR_ITEM var( path );
|
||||
|
||||
if( external.Length() )
|
||||
continue;
|
||||
|
||||
if( name.IsEmpty() )
|
||||
{
|
||||
// Don't check for consistency on external variables, just use them as-is
|
||||
var.SetDefinedExternally( true );
|
||||
}
|
||||
else if( name.IsEmpty() )
|
||||
{
|
||||
m_errorGrid = m_EnvVars;
|
||||
m_errorRow = row;
|
||||
@@ -245,7 +248,7 @@ bool DIALOG_CONFIGURE_PATHS::TransferDataFromWindow()
|
||||
return false;
|
||||
}
|
||||
|
||||
envVarMap[ name ] = ENV_VAR_ITEM( path );
|
||||
envVarMap[ name ] = var;
|
||||
}
|
||||
|
||||
Pgm().SetLocalEnvVariables( envVarMap );
|
||||
@@ -339,8 +342,15 @@ void DIALOG_CONFIGURE_PATHS::OnGridCellChanging( wxGridEvent& event )
|
||||
}
|
||||
else if( col == EV_NAME_COL && m_EnvVars->GetCellValue( row, EV_NAME_COL ) != text )
|
||||
{
|
||||
// Changing name; clear external flag
|
||||
m_EnvVars->SetCellValue( row, EV_FLAG_COL, wxEmptyString );
|
||||
if( text == PROJECT_VAR_NAME ) // This env var name is reserved and cannot be added here:
|
||||
{
|
||||
wxMessageBox( wxString::Format(
|
||||
_( "The name %s is reserved, and cannot be used here" ),
|
||||
PROJECT_VAR_NAME ) );
|
||||
event.Veto();
|
||||
}
|
||||
else // Changing name; clear external flag
|
||||
m_EnvVars->SetCellValue( row, EV_FLAG_COL, wxEmptyString );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
||||
// C++ code generated with wxFormBuilder (version 3.9.0 Nov 1 2020)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@@ -14,22 +14,22 @@
|
||||
DIALOG_CONFIGURE_PATHS_BASE::DIALOG_CONFIGURE_PATHS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
||||
{
|
||||
this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
|
||||
|
||||
|
||||
wxBoxSizer* bSizerMain;
|
||||
bSizerMain = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
wxStaticBoxSizer* sbEnvVars;
|
||||
sbEnvVars = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Environment Variables") ), wxVERTICAL );
|
||||
|
||||
|
||||
m_EnvVars = new WX_GRID( sbEnvVars->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
|
||||
|
||||
// Grid
|
||||
m_EnvVars->CreateGrid( 1, 2 );
|
||||
m_EnvVars->EnableEditing( true );
|
||||
m_EnvVars->EnableGridLines( true );
|
||||
m_EnvVars->EnableDragGridSize( false );
|
||||
m_EnvVars->SetMargins( 0, 0 );
|
||||
|
||||
|
||||
// Columns
|
||||
m_EnvVars->SetColSize( 0, 150 );
|
||||
m_EnvVars->SetColSize( 1, 454 );
|
||||
@@ -38,54 +38,50 @@ DIALOG_CONFIGURE_PATHS_BASE::DIALOG_CONFIGURE_PATHS_BASE( wxWindow* parent, wxWi
|
||||
m_EnvVars->SetColLabelSize( 22 );
|
||||
m_EnvVars->SetColLabelValue( 0, _("Name") );
|
||||
m_EnvVars->SetColLabelValue( 1, _("Path") );
|
||||
m_EnvVars->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
|
||||
|
||||
m_EnvVars->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
||||
|
||||
// Rows
|
||||
m_EnvVars->EnableDragRowSize( true );
|
||||
m_EnvVars->SetRowLabelSize( 0 );
|
||||
m_EnvVars->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
|
||||
|
||||
m_EnvVars->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
||||
|
||||
// Label Appearance
|
||||
|
||||
|
||||
// Cell Defaults
|
||||
m_EnvVars->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
|
||||
m_EnvVars->SetMinSize( wxSize( 604,170 ) );
|
||||
|
||||
sbEnvVars->Add( m_EnvVars, 1, wxEXPAND|wxBOTTOM, 5 );
|
||||
|
||||
|
||||
sbEnvVars->Add( m_EnvVars, 1, wxBOTTOM|wxEXPAND|wxLEFT, 5 );
|
||||
|
||||
wxBoxSizer* bSizerEnvVarBtns;
|
||||
bSizerEnvVarBtns = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_btnAddEnvVar = new wxBitmapButton( sbEnvVars->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_btnAddEnvVar->SetMinSize( wxSize( 30,29 ) );
|
||||
|
||||
bSizerEnvVarBtns->Add( m_btnAddEnvVar, 0, wxRIGHT, 5 );
|
||||
|
||||
|
||||
|
||||
m_btnAddEnvVar = new wxBitmapButton( sbEnvVars->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||
bSizerEnvVarBtns->Add( m_btnAddEnvVar, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
|
||||
bSizerEnvVarBtns->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_btnDeleteEnvVar = new wxBitmapButton( sbEnvVars->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_btnDeleteEnvVar->SetMinSize( wxSize( 30,29 ) );
|
||||
|
||||
bSizerEnvVarBtns->Add( m_btnDeleteEnvVar, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
|
||||
m_btnDeleteEnvVar = new wxBitmapButton( sbEnvVars->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||
bSizerEnvVarBtns->Add( m_btnDeleteEnvVar, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
|
||||
sbEnvVars->Add( bSizerEnvVarBtns, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerMain->Add( sbEnvVars, 1, wxEXPAND|wxALL, 5 );
|
||||
|
||||
|
||||
m_sb3DSearchPaths = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("3D Search Paths") ), wxVERTICAL );
|
||||
|
||||
|
||||
m_SearchPaths = new WX_GRID( m_sb3DSearchPaths->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
|
||||
|
||||
// Grid
|
||||
m_SearchPaths->CreateGrid( 1, 3 );
|
||||
m_SearchPaths->EnableEditing( true );
|
||||
m_SearchPaths->EnableGridLines( true );
|
||||
m_SearchPaths->EnableDragGridSize( false );
|
||||
m_SearchPaths->SetMargins( 0, 0 );
|
||||
|
||||
|
||||
// Columns
|
||||
m_SearchPaths->SetColSize( 0, 150 );
|
||||
m_SearchPaths->SetColSize( 1, 300 );
|
||||
@@ -96,54 +92,46 @@ DIALOG_CONFIGURE_PATHS_BASE::DIALOG_CONFIGURE_PATHS_BASE( wxWindow* parent, wxWi
|
||||
m_SearchPaths->SetColLabelValue( 0, _("Alias") );
|
||||
m_SearchPaths->SetColLabelValue( 1, _("Path") );
|
||||
m_SearchPaths->SetColLabelValue( 2, _("Description") );
|
||||
m_SearchPaths->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
|
||||
|
||||
m_SearchPaths->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
||||
|
||||
// Rows
|
||||
m_SearchPaths->AutoSizeRows();
|
||||
m_SearchPaths->EnableDragRowSize( false );
|
||||
m_SearchPaths->SetRowLabelSize( 0 );
|
||||
m_SearchPaths->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
|
||||
|
||||
m_SearchPaths->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
||||
|
||||
// Label Appearance
|
||||
|
||||
|
||||
// Cell Defaults
|
||||
m_SearchPaths->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
|
||||
m_SearchPaths->SetMinSize( wxSize( 604,150 ) );
|
||||
|
||||
m_sb3DSearchPaths->Add( m_SearchPaths, 1, wxEXPAND|wxBOTTOM, 5 );
|
||||
|
||||
|
||||
m_sb3DSearchPaths->Add( m_SearchPaths, 1, wxBOTTOM|wxEXPAND|wxLEFT, 5 );
|
||||
|
||||
wxBoxSizer* bSizerSearchPathBtns;
|
||||
bSizerSearchPathBtns = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_btnAddSearchPath = new wxBitmapButton( m_sb3DSearchPaths->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_btnAddSearchPath->SetMinSize( wxSize( 30,29 ) );
|
||||
|
||||
bSizerSearchPathBtns->Add( m_btnAddSearchPath, 0, wxRIGHT, 5 );
|
||||
|
||||
m_btnMoveUp = new wxBitmapButton( m_sb3DSearchPaths->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_btnMoveUp->SetMinSize( wxSize( 30,29 ) );
|
||||
|
||||
bSizerSearchPathBtns->Add( m_btnMoveUp, 0, wxRIGHT, 5 );
|
||||
|
||||
m_btnMoveDown = new wxBitmapButton( m_sb3DSearchPaths->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_btnMoveDown->SetMinSize( wxSize( 30,29 ) );
|
||||
|
||||
bSizerSearchPathBtns->Add( m_btnMoveDown, 0, wxRIGHT, 5 );
|
||||
|
||||
|
||||
|
||||
m_btnAddSearchPath = new wxBitmapButton( m_sb3DSearchPaths->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||
bSizerSearchPathBtns->Add( m_btnAddSearchPath, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_btnMoveUp = new wxBitmapButton( m_sb3DSearchPaths->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||
bSizerSearchPathBtns->Add( m_btnMoveUp, 0, wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
m_btnMoveDown = new wxBitmapButton( m_sb3DSearchPaths->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||
bSizerSearchPathBtns->Add( m_btnMoveDown, 0, wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
|
||||
bSizerSearchPathBtns->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_btnDeleteSearchPath = new wxBitmapButton( m_sb3DSearchPaths->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_btnDeleteSearchPath->SetMinSize( wxSize( 30,29 ) );
|
||||
|
||||
bSizerSearchPathBtns->Add( m_btnDeleteSearchPath, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
|
||||
m_btnDeleteSearchPath = new wxBitmapButton( m_sb3DSearchPaths->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||
bSizerSearchPathBtns->Add( m_btnDeleteSearchPath, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
|
||||
m_sb3DSearchPaths->Add( bSizerSearchPathBtns, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerMain->Add( m_sb3DSearchPaths, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_sdbSizer = new wxStdDialogButtonSizer();
|
||||
m_sdbSizerOK = new wxButton( this, wxID_OK );
|
||||
m_sdbSizer->AddButton( m_sdbSizerOK );
|
||||
@@ -152,16 +140,16 @@ DIALOG_CONFIGURE_PATHS_BASE::DIALOG_CONFIGURE_PATHS_BASE( wxWindow* parent, wxWi
|
||||
m_sdbSizerHelp = new wxButton( this, wxID_HELP );
|
||||
m_sdbSizer->AddButton( m_sdbSizerHelp );
|
||||
m_sdbSizer->Realize();
|
||||
|
||||
|
||||
bSizerMain->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
this->SetSizer( bSizerMain );
|
||||
this->Layout();
|
||||
bSizerMain->Fit( this );
|
||||
|
||||
|
||||
this->Centre( wxBOTH );
|
||||
|
||||
|
||||
// Connect Events
|
||||
this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnUpdateUI ) );
|
||||
m_EnvVars->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnGridCellChange ), NULL, this );
|
||||
@@ -192,5 +180,5 @@ DIALOG_CONFIGURE_PATHS_BASE::~DIALOG_CONFIGURE_PATHS_BASE()
|
||||
m_btnMoveDown->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnSearchPathMoveDown ), NULL, this );
|
||||
m_btnDeleteSearchPath->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnDeleteSearchPath ), NULL, this );
|
||||
m_sdbSizerHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnHelp ), NULL, this );
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<wxFormBuilder_Project>
|
||||
<FileVersion major="1" minor="13" />
|
||||
<FileVersion major="1" minor="15" />
|
||||
<object class="Project" expanded="1">
|
||||
<property name="class_decoration"></property>
|
||||
<property name="code_generation">C++</property>
|
||||
@@ -14,6 +14,8 @@
|
||||
<property name="file">dialog_configure_paths_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_CONFIGURE_PATHS_BASE</property>
|
||||
<property name="namespace"></property>
|
||||
@@ -24,6 +26,7 @@
|
||||
<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">
|
||||
@@ -52,41 +55,6 @@
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnActivate"></event>
|
||||
<event name="OnActivateApp"></event>
|
||||
<event name="OnAuiFindManager"></event>
|
||||
<event name="OnAuiPaneButton"></event>
|
||||
<event name="OnAuiPaneClose"></event>
|
||||
<event name="OnAuiPaneMaximize"></event>
|
||||
<event name="OnAuiPaneRestore"></event>
|
||||
<event name="OnAuiRender"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnClose"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnHibernate"></event>
|
||||
<event name="OnIconize"></event>
|
||||
<event name="OnIdle"></event>
|
||||
<event name="OnInitDialog"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI">OnUpdateUI</event>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
@@ -105,10 +73,9 @@
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="parent">1</property>
|
||||
<property name="permission">none</property>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND|wxLEFT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxGrid" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
@@ -132,10 +99,10 @@
|
||||
<property name="cell_vert_alignment">wxALIGN_TOP</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="col_label_horiz_alignment">wxALIGN_CENTRE</property>
|
||||
<property name="col_label_horiz_alignment">wxALIGN_CENTER</property>
|
||||
<property name="col_label_size">22</property>
|
||||
<property name="col_label_values">"Name" "Path"</property>
|
||||
<property name="col_label_vert_alignment">wxALIGN_CENTRE</property>
|
||||
<property name="col_label_vert_alignment">wxALIGN_CENTER</property>
|
||||
<property name="cols">2</property>
|
||||
<property name="column_sizes">150,454</property>
|
||||
<property name="context_help"></property>
|
||||
@@ -178,10 +145,10 @@
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="row_label_horiz_alignment">wxALIGN_CENTRE</property>
|
||||
<property name="row_label_horiz_alignment">wxALIGN_CENTER</property>
|
||||
<property name="row_label_size">0</property>
|
||||
<property name="row_label_values"></property>
|
||||
<property name="row_label_vert_alignment">wxALIGN_CENTRE</property>
|
||||
<property name="row_label_vert_alignment">wxALIGN_CENTER</property>
|
||||
<property name="row_sizes"></property>
|
||||
<property name="rows">1</property>
|
||||
<property name="show">1</property>
|
||||
@@ -192,61 +159,8 @@
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnGridCellChange">OnGridCellChange</event>
|
||||
<event name="OnGridCellLeftClick"></event>
|
||||
<event name="OnGridCellLeftDClick"></event>
|
||||
<event name="OnGridCellRightClick"></event>
|
||||
<event name="OnGridCellRightDClick"></event>
|
||||
<event name="OnGridCmdCellChange"></event>
|
||||
<event name="OnGridCmdCellLeftClick"></event>
|
||||
<event name="OnGridCmdCellLeftDClick"></event>
|
||||
<event name="OnGridCmdCellRightClick"></event>
|
||||
<event name="OnGridCmdCellRightDClick"></event>
|
||||
<event name="OnGridCmdColSize"></event>
|
||||
<event name="OnGridCmdEditorCreated"></event>
|
||||
<event name="OnGridCmdEditorHidden"></event>
|
||||
<event name="OnGridCmdEditorShown"></event>
|
||||
<event name="OnGridCmdLabelLeftClick"></event>
|
||||
<event name="OnGridCmdLabelLeftDClick"></event>
|
||||
<event name="OnGridCmdLabelRightClick"></event>
|
||||
<event name="OnGridCmdLabelRightDClick"></event>
|
||||
<event name="OnGridCmdRangeSelect"></event>
|
||||
<event name="OnGridCmdRowSize"></event>
|
||||
<event name="OnGridCmdSelectCell"></event>
|
||||
<event name="OnGridColSize"></event>
|
||||
<event name="OnGridEditorCreated"></event>
|
||||
<event name="OnGridEditorHidden"></event>
|
||||
<event name="OnGridEditorShown"></event>
|
||||
<event name="OnGridLabelLeftClick"></event>
|
||||
<event name="OnGridLabelLeftDClick"></event>
|
||||
<event name="OnGridLabelRightClick"></event>
|
||||
<event name="OnGridLabelRightDClick"></event>
|
||||
<event name="OnGridRangeSelect"></event>
|
||||
<event name="OnGridRowSize"></event>
|
||||
<event name="OnGridSelectCell"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize">OnGridSize</event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
@@ -260,7 +174,7 @@
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxRIGHT</property>
|
||||
<property name="flag">wxBOTTOM|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBitmapButton" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
@@ -271,6 +185,7 @@
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="auth_needed">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmap"></property>
|
||||
@@ -280,6 +195,7 @@
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="current"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="disabled"></property>
|
||||
@@ -293,15 +209,16 @@
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="hover"></property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Add Environment Variable</property>
|
||||
<property name="margins"></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">30,29</property>
|
||||
<property name="minimum_size">-1,-1</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_btnAddEnvVar</property>
|
||||
<property name="pane_border">1</property>
|
||||
@@ -310,8 +227,9 @@
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="pressed"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="selected"></property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
@@ -326,29 +244,6 @@
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnAddEnvVar</event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
@@ -363,7 +258,7 @@
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxBOTTOM|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBitmapButton" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
@@ -374,6 +269,7 @@
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="auth_needed">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmap"></property>
|
||||
@@ -383,6 +279,7 @@
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="current"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="disabled"></property>
|
||||
@@ -396,15 +293,16 @@
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="hover"></property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Delete Environment Variable</property>
|
||||
<property name="margins"></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">30,29</property>
|
||||
<property name="minimum_size">-1,-1</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_btnDeleteEnvVar</property>
|
||||
<property name="pane_border">1</property>
|
||||
@@ -413,8 +311,9 @@
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="pressed"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="selected"></property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
@@ -429,29 +328,6 @@
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnRemoveEnvVar</event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
@@ -470,10 +346,9 @@
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="parent">1</property>
|
||||
<property name="permission">protected</property>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND|wxLEFT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxGrid" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
@@ -497,10 +372,10 @@
|
||||
<property name="cell_vert_alignment">wxALIGN_TOP</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="col_label_horiz_alignment">wxALIGN_CENTRE</property>
|
||||
<property name="col_label_horiz_alignment">wxALIGN_CENTER</property>
|
||||
<property name="col_label_size">22</property>
|
||||
<property name="col_label_values">"Alias" "Path" "Description"</property>
|
||||
<property name="col_label_vert_alignment">wxALIGN_CENTRE</property>
|
||||
<property name="col_label_vert_alignment">wxALIGN_CENTER</property>
|
||||
<property name="cols">3</property>
|
||||
<property name="column_sizes">150,300,154</property>
|
||||
<property name="context_help"></property>
|
||||
@@ -543,10 +418,10 @@
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="row_label_horiz_alignment">wxALIGN_CENTRE</property>
|
||||
<property name="row_label_horiz_alignment">wxALIGN_CENTER</property>
|
||||
<property name="row_label_size">0</property>
|
||||
<property name="row_label_values"></property>
|
||||
<property name="row_label_vert_alignment">wxALIGN_CENTRE</property>
|
||||
<property name="row_label_vert_alignment">wxALIGN_CENTER</property>
|
||||
<property name="row_sizes"></property>
|
||||
<property name="rows">1</property>
|
||||
<property name="show">1</property>
|
||||
@@ -557,61 +432,8 @@
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnGridCellChange">OnGridCellChange</event>
|
||||
<event name="OnGridCellLeftClick"></event>
|
||||
<event name="OnGridCellLeftDClick"></event>
|
||||
<event name="OnGridCellRightClick">OnGridCellRightClick</event>
|
||||
<event name="OnGridCellRightDClick"></event>
|
||||
<event name="OnGridCmdCellChange"></event>
|
||||
<event name="OnGridCmdCellLeftClick"></event>
|
||||
<event name="OnGridCmdCellLeftDClick"></event>
|
||||
<event name="OnGridCmdCellRightClick"></event>
|
||||
<event name="OnGridCmdCellRightDClick"></event>
|
||||
<event name="OnGridCmdColSize"></event>
|
||||
<event name="OnGridCmdEditorCreated"></event>
|
||||
<event name="OnGridCmdEditorHidden"></event>
|
||||
<event name="OnGridCmdEditorShown"></event>
|
||||
<event name="OnGridCmdLabelLeftClick"></event>
|
||||
<event name="OnGridCmdLabelLeftDClick"></event>
|
||||
<event name="OnGridCmdLabelRightClick"></event>
|
||||
<event name="OnGridCmdLabelRightDClick"></event>
|
||||
<event name="OnGridCmdRangeSelect"></event>
|
||||
<event name="OnGridCmdRowSize"></event>
|
||||
<event name="OnGridCmdSelectCell"></event>
|
||||
<event name="OnGridColSize"></event>
|
||||
<event name="OnGridEditorCreated"></event>
|
||||
<event name="OnGridEditorHidden"></event>
|
||||
<event name="OnGridEditorShown"></event>
|
||||
<event name="OnGridLabelLeftClick"></event>
|
||||
<event name="OnGridLabelLeftDClick"></event>
|
||||
<event name="OnGridLabelRightClick"></event>
|
||||
<event name="OnGridLabelRightDClick"></event>
|
||||
<event name="OnGridRangeSelect"></event>
|
||||
<event name="OnGridRowSize"></event>
|
||||
<event name="OnGridSelectCell"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
@@ -625,7 +447,7 @@
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxRIGHT</property>
|
||||
<property name="flag">wxBOTTOM|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBitmapButton" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
@@ -636,6 +458,7 @@
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="auth_needed">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmap"></property>
|
||||
@@ -645,6 +468,7 @@
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="current"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="disabled"></property>
|
||||
@@ -658,15 +482,16 @@
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="hover"></property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Add Path</property>
|
||||
<property name="margins"></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">30,29</property>
|
||||
<property name="minimum_size">-1,-1</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_btnAddSearchPath</property>
|
||||
<property name="pane_border">1</property>
|
||||
@@ -675,8 +500,9 @@
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="pressed"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="selected"></property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
@@ -691,34 +517,11 @@
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnAddSearchPath</event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxRIGHT</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBitmapButton" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
@@ -729,6 +532,7 @@
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="auth_needed">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmap"></property>
|
||||
@@ -738,6 +542,7 @@
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="current"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="disabled"></property>
|
||||
@@ -751,15 +556,16 @@
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="hover"></property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Move Up</property>
|
||||
<property name="margins"></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">30,29</property>
|
||||
<property name="minimum_size">-1,-1</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_btnMoveUp</property>
|
||||
<property name="pane_border">1</property>
|
||||
@@ -768,8 +574,9 @@
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="pressed"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="selected"></property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
@@ -784,34 +591,11 @@
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnSearchPathMoveUp</event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxRIGHT</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBitmapButton" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
@@ -822,6 +606,7 @@
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="auth_needed">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmap"></property>
|
||||
@@ -831,6 +616,7 @@
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="current"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="disabled"></property>
|
||||
@@ -844,15 +630,16 @@
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="hover"></property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Move Down</property>
|
||||
<property name="margins"></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">30,29</property>
|
||||
<property name="minimum_size">-1,-1</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_btnMoveDown</property>
|
||||
<property name="pane_border">1</property>
|
||||
@@ -861,8 +648,9 @@
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="pressed"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="selected"></property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
@@ -877,29 +665,6 @@
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnSearchPathMoveDown</event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
@@ -914,7 +679,7 @@
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxBOTTOM|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBitmapButton" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
@@ -925,6 +690,7 @@
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="auth_needed">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmap"></property>
|
||||
@@ -934,6 +700,7 @@
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="current"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="disabled"></property>
|
||||
@@ -947,15 +714,16 @@
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="hover"></property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Delete Path</property>
|
||||
<property name="margins"></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">30,29</property>
|
||||
<property name="minimum_size">-1,-1</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_btnDeleteSearchPath</property>
|
||||
<property name="pane_border">1</property>
|
||||
@@ -964,8 +732,9 @@
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="pressed"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="selected"></property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
@@ -980,29 +749,6 @@
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnDeleteSearchPath</event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
@@ -1025,14 +771,7 @@
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_sdbSizer</property>
|
||||
<property name="permission">protected</property>
|
||||
<event name="OnApplyButtonClick"></event>
|
||||
<event name="OnCancelButtonClick"></event>
|
||||
<event name="OnContextHelpButtonClick"></event>
|
||||
<event name="OnHelpButtonClick">OnHelp</event>
|
||||
<event name="OnNoButtonClick"></event>
|
||||
<event name="OnOKButtonClick"></event>
|
||||
<event name="OnSaveButtonClick"></event>
|
||||
<event name="OnYesButtonClick"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
||||
// C++ code generated with wxFormBuilder (version 3.9.0 Nov 1 2020)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __DIALOG_CONFIGURE_PATHS_BASE_H__
|
||||
#define __DIALOG_CONFIGURE_PATHS_BASE_H__
|
||||
#pragma once
|
||||
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
@@ -20,10 +19,10 @@ class WX_GRID;
|
||||
#include <wx/font.h>
|
||||
#include <wx/grid.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/bmpbuttn.h>
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/image.h>
|
||||
#include <wx/icon.h>
|
||||
#include <wx/bmpbuttn.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/statbox.h>
|
||||
@@ -38,7 +37,7 @@ class WX_GRID;
|
||||
class DIALOG_CONFIGURE_PATHS_BASE : public DIALOG_SHIM
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
WX_GRID* m_EnvVars;
|
||||
wxBitmapButton* m_btnAddEnvVar;
|
||||
@@ -53,7 +52,7 @@ class DIALOG_CONFIGURE_PATHS_BASE : public DIALOG_SHIM
|
||||
wxButton* m_sdbSizerOK;
|
||||
wxButton* m_sdbSizerCancel;
|
||||
wxButton* m_sdbSizerHelp;
|
||||
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
virtual void OnGridCellChange( wxGridEvent& event ) { event.Skip(); }
|
||||
@@ -66,13 +65,12 @@ class DIALOG_CONFIGURE_PATHS_BASE : public DIALOG_SHIM
|
||||
virtual void OnSearchPathMoveDown( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnDeleteSearchPath( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnHelp( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
DIALOG_CONFIGURE_PATHS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Configure Paths"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
|
||||
DIALOG_CONFIGURE_PATHS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Configure Paths"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_CONFIGURE_PATHS_BASE();
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif //__DIALOG_CONFIGURE_PATHS_BASE_H__
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
||||
// C++ code generated with wxFormBuilder (version Aug 15 2019)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@@ -12,33 +12,36 @@
|
||||
DIALOG_DISPLAY_HTML_TEXT_BASE::DIALOG_DISPLAY_HTML_TEXT_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
||||
{
|
||||
this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
|
||||
|
||||
|
||||
wxBoxSizer* bMainSizer;
|
||||
bMainSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
m_htmlWindow = new wxHtmlWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO );
|
||||
m_htmlWindow->SetMinSize( wxSize( 400,250 ) );
|
||||
|
||||
|
||||
bMainSizer->Add( m_htmlWindow, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_buttonClose = new wxButton( this, wxID_CANCEL, _("OK"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_buttonClose->SetDefault();
|
||||
bMainSizer->Add( m_buttonClose, 0, wxALIGN_RIGHT|wxALL, 5 );
|
||||
|
||||
|
||||
|
||||
m_sdbSizer1 = new wxStdDialogButtonSizer();
|
||||
m_sdbSizer1OK = new wxButton( this, wxID_OK );
|
||||
m_sdbSizer1->AddButton( m_sdbSizer1OK );
|
||||
m_sdbSizer1->Realize();
|
||||
|
||||
bMainSizer->Add( m_sdbSizer1, 0, wxBOTTOM|wxEXPAND, 5 );
|
||||
|
||||
|
||||
this->SetSizer( bMainSizer );
|
||||
this->Layout();
|
||||
bMainSizer->Fit( this );
|
||||
|
||||
|
||||
// Connect Events
|
||||
m_htmlWindow->Connect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( DIALOG_DISPLAY_HTML_TEXT_BASE::OnHTMLLinkClicked ), NULL, this );
|
||||
m_buttonClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_HTML_TEXT_BASE::OnCloseButtonClick ), NULL, this );
|
||||
m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_HTML_TEXT_BASE::OnOKButtonClick ), NULL, this );
|
||||
}
|
||||
|
||||
DIALOG_DISPLAY_HTML_TEXT_BASE::~DIALOG_DISPLAY_HTML_TEXT_BASE()
|
||||
{
|
||||
// Disconnect Events
|
||||
m_htmlWindow->Disconnect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( DIALOG_DISPLAY_HTML_TEXT_BASE::OnHTMLLinkClicked ), NULL, this );
|
||||
m_buttonClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_HTML_TEXT_BASE::OnCloseButtonClick ), NULL, this );
|
||||
|
||||
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_HTML_TEXT_BASE::OnOKButtonClick ), NULL, this );
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<wxFormBuilder_Project>
|
||||
<FileVersion major="1" minor="13" />
|
||||
<FileVersion major="1" minor="15" />
|
||||
<object class="Project" expanded="1">
|
||||
<property name="class_decoration"></property>
|
||||
<property name="code_generation">C++</property>
|
||||
@@ -14,6 +14,8 @@
|
||||
<property name="file">dialog_display_info_HTML_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_display_info_HTML</property>
|
||||
<property name="namespace"></property>
|
||||
@@ -24,6 +26,7 @@
|
||||
<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">
|
||||
@@ -52,52 +55,16 @@
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnActivate"></event>
|
||||
<event name="OnActivateApp"></event>
|
||||
<event name="OnAuiFindManager"></event>
|
||||
<event name="OnAuiPaneButton"></event>
|
||||
<event name="OnAuiPaneClose"></event>
|
||||
<event name="OnAuiPaneMaximize"></event>
|
||||
<event name="OnAuiPaneRestore"></event>
|
||||
<event name="OnAuiRender"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnClose"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnHibernate"></event>
|
||||
<event name="OnIconize"></event>
|
||||
<event name="OnIdle"></event>
|
||||
<event name="OnInitDialog"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size">-1,-1</property>
|
||||
<property name="name">bMainSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxHtmlWindow" expanded="1">
|
||||
<object class="wxHtmlWindow" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
@@ -149,120 +116,26 @@
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnHtmlCellClicked"></event>
|
||||
<event name="OnHtmlCellHover"></event>
|
||||
<event name="OnHtmlLinkClicked">OnHTMLLinkClicked</event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_RIGHT|wxALL</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" 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">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_CANCEL</property>
|
||||
<property name="label">OK</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>
|
||||
<object class="wxStdDialogButtonSizer" expanded="1">
|
||||
<property name="Apply">0</property>
|
||||
<property name="Cancel">0</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="moveable">1</property>
|
||||
<property name="name">m_buttonClose</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="name">m_sdbSizer1</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnCloseButtonClick</event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<event name="OnOKButtonClick">OnOKButtonClick</event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
||||
// C++ code generated with wxFormBuilder (version Aug 15 2019)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __DIALOG_DISPLAY_INFO_HTML_BASE_H__
|
||||
#define __DIALOG_DISPLAY_INFO_HTML_BASE_H__
|
||||
#pragma once
|
||||
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
@@ -18,8 +17,8 @@
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/dialog.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -31,21 +30,21 @@
|
||||
class DIALOG_DISPLAY_HTML_TEXT_BASE : public DIALOG_SHIM
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxButton* m_buttonClose;
|
||||
|
||||
wxStdDialogButtonSizer* m_sdbSizer1;
|
||||
wxButton* m_sdbSizer1OK;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnHTMLLinkClicked( wxHtmlLinkEvent& event ) { event.Skip(); }
|
||||
virtual void OnCloseButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
wxHtmlWindow* m_htmlWindow;
|
||||
|
||||
DIALOG_DISPLAY_HTML_TEXT_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 );
|
||||
|
||||
DIALOG_DISPLAY_HTML_TEXT_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 );
|
||||
~DIALOG_DISPLAY_HTML_TEXT_BASE();
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif //__DIALOG_DISPLAY_INFO_HTML_BASE_H__
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Nov 21 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "dialog_exit_base.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
DIALOG_EXIT_BASE::DIALOG_EXIT_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
||||
{
|
||||
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
||||
|
||||
wxBoxSizer* bSizerMain;
|
||||
bSizerMain = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxBoxSizer* bSizerUpper;
|
||||
bSizerUpper = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerUpper->Add( m_bitmap, 0, wxALL, 5 );
|
||||
|
||||
wxBoxSizer* bSizerMessages;
|
||||
bSizerMessages = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_TextInfo = new wxStaticText( this, wxID_ANY, _("Save changes?"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_TextInfo->Wrap( -1 );
|
||||
m_TextInfo->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
|
||||
|
||||
bSizerMessages->Add( m_TextInfo, 0, wxALL, 5 );
|
||||
|
||||
m_staticTextWarningMessage = new wxStaticText( this, wxID_ANY, _("If you don't save, all your changes will be permanently lost."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextWarningMessage->Wrap( 300 );
|
||||
bSizerMessages->Add( m_staticTextWarningMessage, 0, wxALL, 5 );
|
||||
|
||||
|
||||
bSizerUpper->Add( bSizerMessages, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerMain->Add( bSizerUpper, 1, wxEXPAND|wxALL, 5 );
|
||||
|
||||
m_staticline = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
bSizerMain->Add( m_staticline, 0, wxEXPAND|wxLEFT|wxRIGHT, 10 );
|
||||
|
||||
m_buttonSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_ApplyToAllOpt = new wxCheckBox( this, wxID_ANY, _("Apply to all"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_buttonSizer->Add( m_ApplyToAllOpt, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxTOP, 5 );
|
||||
|
||||
|
||||
m_buttonSizer->Add( 20, 0, 1, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_DiscardButton = new wxButton( this, wxID_ANY, _("Discard Changes"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_buttonSizer->Add( m_DiscardButton, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
|
||||
m_buttonSizer->Add( 20, 0, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_sdbSizer = new wxStdDialogButtonSizer();
|
||||
m_sdbSizerOK = new wxButton( this, wxID_OK );
|
||||
m_sdbSizer->AddButton( m_sdbSizerOK );
|
||||
m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
|
||||
m_sdbSizer->AddButton( m_sdbSizerCancel );
|
||||
m_sdbSizer->Realize();
|
||||
|
||||
m_buttonSizer->Add( m_sdbSizer, 0, wxBOTTOM|wxTOP, 5 );
|
||||
|
||||
|
||||
bSizerMain->Add( m_buttonSizer, 0, wxEXPAND|wxLEFT, 5 );
|
||||
|
||||
|
||||
this->SetSizer( bSizerMain );
|
||||
this->Layout();
|
||||
bSizerMain->Fit( this );
|
||||
|
||||
this->Centre( wxBOTH );
|
||||
|
||||
// Connect Events
|
||||
m_DiscardButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXIT_BASE::OnDiscard ), NULL, this );
|
||||
m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXIT_BASE::OnSave ), NULL, this );
|
||||
}
|
||||
|
||||
DIALOG_EXIT_BASE::~DIALOG_EXIT_BASE()
|
||||
{
|
||||
// Disconnect Events
|
||||
m_DiscardButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXIT_BASE::OnDiscard ), NULL, this );
|
||||
m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXIT_BASE::OnSave ), NULL, this );
|
||||
|
||||
}
|
||||
@@ -1,511 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<wxFormBuilder_Project>
|
||||
<FileVersion major="1" minor="15" />
|
||||
<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_exit_base</property>
|
||||
<property name="first_id">1000</property>
|
||||
<property name="help_provider">none</property>
|
||||
<property name="indent_with_spaces"></property>
|
||||
<property name="internationalize">1</property>
|
||||
<property name="name">dialog_exit_base</property>
|
||||
<property name="namespace"></property>
|
||||
<property name="path">.</property>
|
||||
<property name="precompiled_header"></property>
|
||||
<property name="relative_path">1</property>
|
||||
<property name="skip_lua_events">1</property>
|
||||
<property name="skip_php_events">1</property>
|
||||
<property name="skip_python_events">1</property>
|
||||
<property name="ui_table">UI</property>
|
||||
<property name="use_enum">0</property>
|
||||
<property name="use_microsoft_bom">0</property>
|
||||
<object class="Dialog" expanded="1">
|
||||
<property name="aui_managed">0</property>
|
||||
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
|
||||
<property name="bg"></property>
|
||||
<property name="center">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>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">DIALOG_EXIT_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="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizerMain</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizerUpper</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticBitmap" 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="bitmap">Load From File; </property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_bitmap</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="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</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">bSizerMessages</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font">,90,92,-1,70,0</property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Save changes?</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_TextInfo</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="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">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">If you don't save, all your changes will be permanently lost.</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_staticTextWarningMessage</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">300</property>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxEXPAND|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticLine" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_staticline</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxLI_HORIZONTAL</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size">-1,-1</property>
|
||||
<property name="name">m_buttonSizer</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">protected</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxTOP</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Apply to all</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_ApplyToAllOpt</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">public</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">0</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">20</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" 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="bitmap"></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="current"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="disabled"></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="focus"></property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Discard Changes</property>
|
||||
<property name="margins"></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_DiscardButton</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">public</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="pressed"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnDiscard</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">0</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">20</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxTOP</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStdDialogButtonSizer" expanded="1">
|
||||
<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_sdbSizer</property>
|
||||
<property name="permission">protected</property>
|
||||
<event name="OnOKButtonClick">OnSave</event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</wxFormBuilder_Project>
|
||||
@@ -1,63 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Nov 21 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
#include <wx/intl.h>
|
||||
#include "dialog_shim.h"
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/image.h>
|
||||
#include <wx/icon.h>
|
||||
#include <wx/statbmp.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/statline.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/dialog.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class DIALOG_EXIT_BASE
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class DIALOG_EXIT_BASE : public DIALOG_SHIM
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
wxStaticBitmap* m_bitmap;
|
||||
wxStaticText* m_TextInfo;
|
||||
wxStaticText* m_staticTextWarningMessage;
|
||||
wxStaticLine* m_staticline;
|
||||
wxBoxSizer* m_buttonSizer;
|
||||
wxStdDialogButtonSizer* m_sdbSizer;
|
||||
wxButton* m_sdbSizerOK;
|
||||
wxButton* m_sdbSizerCancel;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnDiscard( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnSave( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
wxCheckBox* m_ApplyToAllOpt;
|
||||
wxButton* m_DiscardButton;
|
||||
|
||||
DIALOG_EXIT_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 );
|
||||
~DIALOG_EXIT_BASE();
|
||||
|
||||
};
|
||||
|
||||
@@ -21,20 +21,51 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <pgm_base.h>
|
||||
#include <dialog_shim.h>
|
||||
#include <kiface_i.h>
|
||||
#include <bitmap_types.h>
|
||||
#include <bitmaps.h>
|
||||
#include <wx/graphics.h>
|
||||
#include "panel_common_settings.h"
|
||||
|
||||
PANEL_COMMON_SETTINGS::PANEL_COMMON_SETTINGS( DIALOG_SHIM* aDialog, wxWindow* aParent ) :
|
||||
PANEL_COMMON_SETTINGS_BASE( aParent ),
|
||||
m_dialog( aDialog ),
|
||||
m_last_scale( -1 )
|
||||
#include <bitmap_types.h>
|
||||
#include <bitmaps.h>
|
||||
#include <dialog_shim.h>
|
||||
#include <dpi_scaling.h>
|
||||
#include <kiface_i.h>
|
||||
#include <pgm_base.h>
|
||||
#include <id.h>
|
||||
|
||||
#include <wx/graphics.h>
|
||||
|
||||
|
||||
static constexpr int dpi_scaling_precision = 1;
|
||||
static constexpr double dpi_scaling_increment = 0.5;
|
||||
|
||||
|
||||
PANEL_COMMON_SETTINGS::PANEL_COMMON_SETTINGS( DIALOG_SHIM* aDialog, wxWindow* aParent )
|
||||
: PANEL_COMMON_SETTINGS_BASE( aParent ),
|
||||
m_dialog( aDialog ),
|
||||
m_last_scale( -1 )
|
||||
{
|
||||
m_scaleSlider->SetStep( 25 );
|
||||
m_canvasScaleCtrl->SetRange(
|
||||
DPI_SCALING::GetMinScaleFactor(), DPI_SCALING::GetMaxScaleFactor() );
|
||||
m_canvasScaleCtrl->SetDigits( dpi_scaling_precision );
|
||||
m_canvasScaleCtrl->SetIncrement( dpi_scaling_increment );
|
||||
m_canvasScaleCtrl->SetValue( DPI_SCALING::GetDefaultScaleFactor() );
|
||||
|
||||
m_canvasScaleCtrl->SetToolTip(
|
||||
_( "Set the scale for the canvas."
|
||||
"\n\n"
|
||||
"On high-DPI displays on some platforms, KiCad cannot determine the "
|
||||
"scaling factor. In this case you may need to set this to a value to "
|
||||
"match your system's DPI scaling. 2.0 is a common value. "
|
||||
"\n\n"
|
||||
"If this does not match the system DPI scaling, the canvas will "
|
||||
"not match the window size and cursor position." ) );
|
||||
|
||||
m_canvasScaleAuto->SetToolTip(
|
||||
_( "Use an automatic value for the canvas scale."
|
||||
"\n\n"
|
||||
"On some platforms, the automatic value is incorrect and should be "
|
||||
"set manually." ) );
|
||||
|
||||
m_iconScaleSlider->SetStep( 25 );
|
||||
|
||||
m_textEditorBtn->SetBitmap( KiBitmap( folder_xpm ) );
|
||||
m_pdfViewerBtn->SetBitmap( KiBitmap( folder_xpm ) );
|
||||
@@ -63,18 +94,24 @@ bool PANEL_COMMON_SETTINGS::TransferDataToWindow()
|
||||
commonSettings->Read( CAIRO_ANTIALIASING_MODE_KEY, &antialiasingMode, 0 );
|
||||
m_antialiasingFallback->SetSelection( antialiasingMode );
|
||||
|
||||
int scale_fourths;
|
||||
commonSettings->Read( ICON_SCALE_KEY, &scale_fourths );
|
||||
int icon_scale_fourths;
|
||||
commonSettings->Read( ICON_SCALE_KEY, &icon_scale_fourths );
|
||||
|
||||
if( scale_fourths <= 0 )
|
||||
if( icon_scale_fourths <= 0 )
|
||||
{
|
||||
m_scaleAuto->SetValue( true );
|
||||
m_scaleSlider->SetValue( 25 * KiIconScale( GetParent() ) );
|
||||
m_iconScaleAuto->SetValue( true );
|
||||
m_iconScaleSlider->SetValue( 25 * KiIconScale( GetParent() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_scaleAuto->SetValue( false );
|
||||
m_scaleSlider->SetValue( scale_fourths * 25 );
|
||||
m_iconScaleAuto->SetValue( false );
|
||||
m_iconScaleSlider->SetValue( icon_scale_fourths * 25 );
|
||||
}
|
||||
|
||||
{
|
||||
const DPI_SCALING dpi( commonSettings, this );
|
||||
m_canvasScaleCtrl->SetValue( dpi.GetScaleFactor() );
|
||||
m_canvasScaleAuto->SetValue( dpi.GetCanvasIsAutoScaled() );
|
||||
}
|
||||
|
||||
bool option;
|
||||
@@ -111,9 +148,14 @@ bool PANEL_COMMON_SETTINGS::TransferDataFromWindow()
|
||||
|
||||
commonSettings->Write( CAIRO_ANTIALIASING_MODE_KEY, m_antialiasingFallback->GetSelection() );
|
||||
|
||||
const int scale_fourths = m_scaleAuto->GetValue() ? -1 : m_scaleSlider->GetValue() / 25;
|
||||
const int scale_fourths = m_iconScaleAuto->GetValue() ? -1 : m_iconScaleSlider->GetValue() / 25;
|
||||
commonSettings->Write( ICON_SCALE_KEY, scale_fourths );
|
||||
|
||||
{
|
||||
DPI_SCALING dpi( commonSettings, this );
|
||||
dpi.SetDpiConfig( m_canvasScaleAuto->GetValue(), m_canvasScaleCtrl->GetValue() );
|
||||
}
|
||||
|
||||
commonSettings->Write( USE_ICONS_IN_MENUS_KEY, m_checkBoxIconsInMenus->GetValue() );
|
||||
commonSettings->Write( ENBL_ZOOM_NO_CENTER_KEY, !m_ZoomCenterOpt->GetValue() );
|
||||
commonSettings->Write( ENBL_MOUSEWHEEL_PAN_KEY, m_MousewheelPANOpt->GetValue() );
|
||||
@@ -131,21 +173,43 @@ bool PANEL_COMMON_SETTINGS::TransferDataFromWindow()
|
||||
|
||||
void PANEL_COMMON_SETTINGS::OnScaleSlider( wxScrollEvent& aEvent )
|
||||
{
|
||||
m_scaleAuto->SetValue( false );
|
||||
m_iconScaleAuto->SetValue( false );
|
||||
aEvent.Skip();
|
||||
}
|
||||
|
||||
|
||||
void PANEL_COMMON_SETTINGS::OnScaleAuto( wxCommandEvent& aEvent )
|
||||
void PANEL_COMMON_SETTINGS::OnIconScaleAuto( wxCommandEvent& aEvent )
|
||||
{
|
||||
if( m_scaleAuto->GetValue() )
|
||||
if( m_iconScaleAuto->GetValue() )
|
||||
{
|
||||
m_last_scale = m_scaleSlider->GetValue();
|
||||
m_scaleSlider->SetValue( 25 * KiIconScale( GetParent() ) );
|
||||
m_last_scale = m_iconScaleAuto->GetValue();
|
||||
m_iconScaleSlider->SetValue( 25 * KiIconScale( GetParent() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( m_last_scale >= 0 )
|
||||
m_scaleSlider->SetValue( m_last_scale );
|
||||
m_iconScaleSlider->SetValue( m_last_scale );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void PANEL_COMMON_SETTINGS::OnCanvasScaleChange( wxCommandEvent& aEvent )
|
||||
{
|
||||
m_canvasScaleAuto->SetValue( false );
|
||||
}
|
||||
|
||||
|
||||
void PANEL_COMMON_SETTINGS::OnCanvasScaleAuto( wxCommandEvent& aEvent )
|
||||
{
|
||||
const bool automatic = m_canvasScaleAuto->GetValue();
|
||||
|
||||
if( automatic )
|
||||
{
|
||||
// set the scale to the auto value, without consulting the config
|
||||
DPI_SCALING dpi( nullptr, this );
|
||||
|
||||
// update the field (no events sent)
|
||||
m_canvasScaleCtrl->SetValue( dpi.GetScaleFactor() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -40,10 +40,20 @@ protected:
|
||||
bool TransferDataToWindow() override;
|
||||
|
||||
void OnScaleSlider( wxScrollEvent& aEvent ) override;
|
||||
void OnScaleAuto( wxCommandEvent& aEvent ) override;
|
||||
void OnIconScaleAuto( wxCommandEvent& aEvent ) override;
|
||||
void OnTextEditorClick( wxCommandEvent& event ) override;
|
||||
void OnPDFViewerClick( wxCommandEvent& event ) override;
|
||||
void onUpdateUIPdfPath( wxUpdateUIEvent& event ) override;
|
||||
void onUpdateUIPdfPath( wxUpdateUIEvent& event ) override;
|
||||
|
||||
/**
|
||||
* Event fired when the canvas scale field is modified
|
||||
*/
|
||||
void OnCanvasScaleChange( wxCommandEvent& aEvent ) override;
|
||||
|
||||
/**
|
||||
* Event fired when the canvas auto-scale option is changed
|
||||
*/
|
||||
void OnCanvasScaleAuto( wxCommandEvent& aEvent ) override;
|
||||
|
||||
DIALOG_SHIM* m_dialog;
|
||||
|
||||
|
||||