Compare commits
496 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 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
|
||||
|
||||
@@ -59,6 +59,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 +86,12 @@ demos/**/fp-info-cache
|
||||
*.gch
|
||||
*.orig
|
||||
*.patch
|
||||
|
||||
# These CMake files are wanted
|
||||
!CMakeModules/*.cmake
|
||||
|
||||
# Eclipse IDE
|
||||
.project
|
||||
.cproject
|
||||
.pydevproject
|
||||
__pycache__
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
@@ -462,8 +461,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 )
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -711,35 +711,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,
|
||||
|
||||
@@ -150,10 +150,6 @@ void Convert_path_polygon_to_polygon_blocks_and_dummy_blocks(
|
||||
float aDivFactor,
|
||||
const BOARD_ITEM &aBoardItem );
|
||||
|
||||
void Polygon_Calc_BBox_3DU( const SHAPE_POLY_SET &aPolysList,
|
||||
CBBOX2D &aOutBBox,
|
||||
float aBiuTo3DunitsScale );
|
||||
|
||||
void Polygon2d_TestModule();
|
||||
|
||||
#endif // _CPOLYGON2D_H_
|
||||
|
||||
@@ -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
|
||||
@@ -310,7 +310,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 +341,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()
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -28,18 +28,22 @@
|
||||
*/
|
||||
|
||||
#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 +166,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 +192,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();
|
||||
|
||||
@@ -288,32 +293,62 @@ void EDA_3D_VIEWER::Process_Special_Functions( wxCommandEvent &event )
|
||||
|
||||
case ID_ROTATE3D_X_POS:
|
||||
m_settings.CameraGet().RotateX( 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_X_NEG:
|
||||
m_settings.CameraGet().RotateX( -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_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:
|
||||
@@ -726,7 +761,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 +904,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" );
|
||||
@@ -941,7 +992,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 +1276,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
|
||||
*/
|
||||
|
||||
@@ -102,28 +102,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 )
|
||||
@@ -655,8 +670,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 +730,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
|
||||
#
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
find_path( NGSPICE_INCLUDE_DIR ngspice/sharedspice.h
|
||||
PATHS ${NGSPICE_ROOT_DIR} $ENV{NGSPICE_ROOT_DIR} ${NGSPICE_INCLUDE_PATH}
|
||||
${NGSPICE_ROOT_DIR}/include
|
||||
PATH_SUFFIXES src/include share/ngspice/include share/ngspice/include/ngspice
|
||||
)
|
||||
|
||||
|
||||
@@ -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} )
|
||||
|
||||
@@ -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 - 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
|
||||
#
|
||||
|
||||
# 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.5-rc1" )
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -54,6 +54,9 @@ target_link_libraries( bitmap2component
|
||||
)
|
||||
|
||||
if( APPLE )
|
||||
include( ${CMAKE_MODULE_PATH}/KiCadVersion.cmake )
|
||||
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist @ONLY )
|
||||
|
||||
set_target_properties( bitmap2component PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist
|
||||
)
|
||||
|
||||
@@ -17,17 +17,17 @@
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleLongVersionString</key>
|
||||
<string></string>
|
||||
<string>@KICAD_VERSION_FULL@</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Bitmap 2 Component</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string></string>
|
||||
<string>@KICAD_VERSION@</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string></string>
|
||||
<string>@KICAD_VERSION_FULL@</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
<key>LSRequiresCarbon</key>
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 |
@@ -188,7 +188,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
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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,19 @@ 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 );
|
||||
|
||||
if( GetGRForceBlackPenState() )
|
||||
{
|
||||
wxBitmap result( m_bitmap->ConvertToImage().ConvertToGreyscale() );
|
||||
aDC->DrawBitmap( result, KiROUND( pos.x / GetScalingFactor() ),
|
||||
KiROUND( pos.y / GetScalingFactor() ), true );
|
||||
}
|
||||
else
|
||||
{
|
||||
aDC->DrawBitmap( *m_bitmap, KiROUND( pos.x / GetScalingFactor() ),
|
||||
KiROUND( pos.y / GetScalingFactor() ), true );
|
||||
}
|
||||
|
||||
aDC->SetUserScale( scale, scale );
|
||||
aDC->SetLogicalOrigin( logicalOriginX, logicalOriginY );
|
||||
}
|
||||
|
||||
@@ -167,12 +167,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);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#include <confirm.h>
|
||||
#include <bitmaps.h>
|
||||
#include <html_messagebox.h>
|
||||
#include <dialog_exit_base.h>
|
||||
|
||||
#include <functional>
|
||||
#include <unordered_map>
|
||||
@@ -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;
|
||||
}
|
||||
@@ -167,11 +167,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() );
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jul 11 2018)
|
||||
// C++ code generated with wxFormBuilder (version Mar 28 2019)
|
||||
// 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,109 @@ 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 +153,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 +285,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 Mar 28 2019)
|
||||
// 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__
|
||||
|
||||
@@ -339,8 +339,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,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,7 @@
|
||||
<property name="file">dialog_configure_paths_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_CONFIGURE_PATHS_BASE</property>
|
||||
<property name="namespace"></property>
|
||||
@@ -52,41 +53,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,7 +71,6 @@
|
||||
<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>
|
||||
@@ -132,10 +97,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 +143,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 +157,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">
|
||||
@@ -280,6 +192,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,9 +206,10 @@
|
||||
<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>
|
||||
@@ -310,8 +224,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 +241,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">
|
||||
@@ -383,6 +275,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,9 +289,10 @@
|
||||
<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>
|
||||
@@ -413,8 +307,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 +324,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,7 +342,6 @@
|
||||
<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>
|
||||
@@ -497,10 +368,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 +414,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 +428,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">
|
||||
@@ -645,6 +463,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,9 +477,10 @@
|
||||
<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>
|
||||
@@ -675,8 +495,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,29 +512,6 @@
|
||||
<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">
|
||||
@@ -738,6 +536,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,9 +550,10 @@
|
||||
<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>
|
||||
@@ -768,8 +568,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,29 +585,6 @@
|
||||
<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">
|
||||
@@ -831,6 +609,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,9 +623,10 @@
|
||||
<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>
|
||||
@@ -861,8 +641,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 +658,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">
|
||||
@@ -934,6 +692,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,9 +706,10 @@
|
||||
<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>
|
||||
@@ -964,8 +724,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 +741,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 +763,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,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,42 @@ bool PANEL_COMMON_SETTINGS::TransferDataFromWindow()
|
||||
|
||||
void PANEL_COMMON_SETTINGS::OnScaleSlider( wxScrollEvent& aEvent )
|
||||
{
|
||||
m_scaleAuto->SetValue( false );
|
||||
m_iconScaleAuto->SetValue( false );
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jan 5 2019)
|
||||
// C++ code generated with wxFormBuilder (version Nov 10 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@@ -136,25 +136,26 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
|
||||
|
||||
m_staticTexticonscale = new wxStaticText( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("Icon scale:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTexticonscale->Wrap( -1 );
|
||||
fgSizer11->Add( m_staticTexticonscale, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 4 );
|
||||
fgSizer11->Add( m_staticTexticonscale, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 4 );
|
||||
|
||||
wxBoxSizer* bSizer4;
|
||||
bSizer4 = new wxBoxSizer( wxHORIZONTAL );
|
||||
m_iconScaleSlider = new STEPPED_SLIDER( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, 50, 50, 275, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
|
||||
m_iconScaleSlider->SetMinSize( wxSize( 240,-1 ) );
|
||||
|
||||
m_scaleSlider = new STEPPED_SLIDER( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, 50, 50, 275, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
|
||||
m_scaleSlider->SetMinSize( wxSize( 240,-1 ) );
|
||||
fgSizer11->Add( m_iconScaleSlider, 1, wxBOTTOM|wxEXPAND, 4 );
|
||||
|
||||
bSizer4->Add( m_scaleSlider, 1, wxBOTTOM|wxEXPAND, 4 );
|
||||
m_iconScaleAuto = new wxCheckBox( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("Automatic"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer11->Add( m_iconScaleAuto, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 25 );
|
||||
|
||||
m_staticTextPerCent = new wxStaticText( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextPerCent->Wrap( -1 );
|
||||
bSizer4->Add( m_staticTextPerCent, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
|
||||
m_staticTextCanvasScale = new wxStaticText( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("Canvas scale:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextCanvasScale->Wrap( -1 );
|
||||
fgSizer11->Add( m_staticTextCanvasScale, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
m_canvasScaleCtrl = new wxSpinCtrlDouble( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 100, 0, 1 );
|
||||
m_canvasScaleCtrl->SetDigits( 0 );
|
||||
fgSizer11->Add( m_canvasScaleCtrl, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
fgSizer11->Add( bSizer4, 1, wxEXPAND, 5 );
|
||||
|
||||
m_scaleAuto = new wxCheckBox( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("Automatic"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer11->Add( m_scaleAuto, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 25 );
|
||||
m_canvasScaleAuto = new wxCheckBox( sbSizerIconsOpts->GetStaticBox(), wxID_ANY, _("Automatic"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer11->Add( m_canvasScaleAuto, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 25 );
|
||||
|
||||
|
||||
fgSizer11->Add( 0, 0, 0, wxEXPAND, 5 );
|
||||
@@ -202,16 +203,18 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
|
||||
m_PDFViewerPath->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_COMMON_SETTINGS_BASE::onUpdateUIPdfPath ), NULL, this );
|
||||
m_pdfViewerBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnPDFViewerClick ), NULL, this );
|
||||
m_pdfViewerBtn->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_COMMON_SETTINGS_BASE::onUpdateUIPdfPath ), NULL, this );
|
||||
m_scaleSlider->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleAuto->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleAuto ), NULL, this );
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleAuto->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnIconScaleAuto ), NULL, this );
|
||||
m_canvasScaleCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnCanvasScaleChange ), NULL, this );
|
||||
m_canvasScaleAuto->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnCanvasScaleAuto ), NULL, this );
|
||||
}
|
||||
|
||||
PANEL_COMMON_SETTINGS_BASE::~PANEL_COMMON_SETTINGS_BASE()
|
||||
@@ -221,15 +224,17 @@ PANEL_COMMON_SETTINGS_BASE::~PANEL_COMMON_SETTINGS_BASE()
|
||||
m_PDFViewerPath->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_COMMON_SETTINGS_BASE::onUpdateUIPdfPath ), NULL, this );
|
||||
m_pdfViewerBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnPDFViewerClick ), NULL, this );
|
||||
m_pdfViewerBtn->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_COMMON_SETTINGS_BASE::onUpdateUIPdfPath ), NULL, this );
|
||||
m_scaleSlider->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleSlider->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_scaleAuto->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleAuto ), NULL, this );
|
||||
m_iconScaleSlider->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleSlider->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( PANEL_COMMON_SETTINGS_BASE::OnScaleSlider ), NULL, this );
|
||||
m_iconScaleAuto->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnIconScaleAuto ), NULL, this );
|
||||
m_canvasScaleCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnCanvasScaleChange ), NULL, this );
|
||||
m_canvasScaleAuto->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnCanvasScaleAuto ), NULL, this );
|
||||
|
||||
}
|
||||
|
||||
@@ -1219,7 +1219,7 @@
|
||||
<property name="vgap">0</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">4</property>
|
||||
<property name="flag">wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
@@ -1278,142 +1278,70 @@
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">4</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer4</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">4</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxSlider" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maxValue">275</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minValue">50</property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size">240,-1</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_scaleSlider</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">wxSL_HORIZONTAL|wxSL_LABELS</property>
|
||||
<property name="subclass">STEPPED_SLIDER; widgets/stepped_slider.h; Not forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value">50</property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnScroll">OnScaleSlider</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">2</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">%</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_staticTextPerCent</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="wxSlider" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maxValue">275</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minValue">50</property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size">240,-1</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_iconScaleSlider</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">wxSL_HORIZONTAL|wxSL_LABELS</property>
|
||||
<property name="subclass">STEPPED_SLIDER; widgets/stepped_slider.h; Not forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value">50</property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnScroll">OnScaleSlider</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
@@ -1457,7 +1385,7 @@
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_scaleAuto</property>
|
||||
<property name="name">m_iconScaleAuto</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
@@ -1478,7 +1406,198 @@
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnCheckBox">OnScaleAuto</event>
|
||||
<event name="OnCheckBox">OnIconScaleAuto</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Canvas scale:</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_staticTextCanvasScale</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxSpinCtrlDouble" 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="digits">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="inc">1</property>
|
||||
<property name="initial">0</property>
|
||||
<property name="max">100</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min">0</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_canvasScaleCtrl</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">wxSP_ARROW_KEYS</property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnSpinCtrlText">OnCanvasScaleChange</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">25</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Automatic</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_canvasScaleAuto</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnCheckBox">OnCanvasScaleAuto</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jan 5 2019)
|
||||
// C++ code generated with wxFormBuilder (version Nov 10 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@@ -61,9 +61,11 @@ class PANEL_COMMON_SETTINGS_BASE : public wxPanel
|
||||
wxTextCtrl* m_PDFViewerPath;
|
||||
wxBitmapButton* m_pdfViewerBtn;
|
||||
wxStaticText* m_staticTexticonscale;
|
||||
STEPPED_SLIDER* m_scaleSlider;
|
||||
wxStaticText* m_staticTextPerCent;
|
||||
wxCheckBox* m_scaleAuto;
|
||||
STEPPED_SLIDER* m_iconScaleSlider;
|
||||
wxCheckBox* m_iconScaleAuto;
|
||||
wxStaticText* m_staticTextCanvasScale;
|
||||
wxSpinCtrlDouble* m_canvasScaleCtrl;
|
||||
wxCheckBox* m_canvasScaleAuto;
|
||||
wxCheckBox* m_checkBoxIconsInMenus;
|
||||
wxCheckBox* m_ZoomCenterOpt;
|
||||
wxCheckBox* m_MousewheelPANOpt;
|
||||
@@ -74,7 +76,9 @@ class PANEL_COMMON_SETTINGS_BASE : public wxPanel
|
||||
virtual void onUpdateUIPdfPath( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
virtual void OnPDFViewerClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnScaleSlider( wxScrollEvent& event ) { event.Skip(); }
|
||||
virtual void OnScaleAuto( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnIconScaleAuto( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnCanvasScaleChange( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnCanvasScaleAuto( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@@ -21,13 +21,16 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <panel_hotkeys_editor.h>
|
||||
#include <bitmaps.h>
|
||||
#include <confirm.h>
|
||||
#include <eda_base_frame.h>
|
||||
#include <panel_hotkeys_editor.h>
|
||||
|
||||
#include <wx/srchctrl.h>
|
||||
#include <wx/panel.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/panel.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/srchctrl.h>
|
||||
#include <wx/statline.h>
|
||||
|
||||
#include <widgets/button_row_panel.h>
|
||||
#include <widgets/ui_common.h>
|
||||
@@ -70,7 +73,33 @@ PANEL_HOTKEYS_EDITOR::PANEL_HOTKEYS_EDITOR( EDA_BASE_FRAME* aFrame, wxWindow* aW
|
||||
m_hotkeyStore( aShowHotkeys )
|
||||
{
|
||||
const auto margin = KIUI::GetStdMargin();
|
||||
auto mainSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_mainSizer = new wxBoxSizer( wxVERTICAL );
|
||||
m_errorMessageSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
// Setup the sub-sizer to contain the bitmap and header text
|
||||
wxBoxSizer* errImgHeadSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
wxStaticBitmap* valid_img = new wxStaticBitmap(
|
||||
this, wxID_ANY, KiBitmap( cancel_xpm ), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
wxStaticText* err_head = new wxStaticText( this, wxID_ANY, _( "Hotkey errors detected" ),
|
||||
wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
|
||||
errImgHeadSizer->Add( valid_img, 0, wxALL, 5 );
|
||||
errImgHeadSizer->Add( err_head, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5 );
|
||||
m_errorMessageSizer->Add( errImgHeadSizer, 0, wxTOP | wxLEFT | wxRIGHT, margin );
|
||||
|
||||
// Setup the error message to give the user information about any problems with the hotkeys,
|
||||
// but only do this if they can actually change them
|
||||
if( !m_readOnly )
|
||||
{
|
||||
m_errorMessage = new wxStaticText(
|
||||
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
|
||||
m_errorMessageSizer->Add( m_errorMessage, 0, wxALL, 5 );
|
||||
}
|
||||
m_errorMessageSizer->Add( new wxStaticLine( this ), 0, wxALL | wxEXPAND, 2 );
|
||||
|
||||
// Add the validity text to the main sizer and hide the entire sizer
|
||||
m_mainSizer->Add( m_errorMessageSizer, 0, wxTOP | wxLEFT | wxRIGHT | wxEXPAND, margin );
|
||||
|
||||
// Sub-sizer for setting a wider side margin
|
||||
// TODO: Can this be set by the parent widget- doesn't seem to be
|
||||
@@ -87,9 +116,9 @@ PANEL_HOTKEYS_EDITOR::PANEL_HOTKEYS_EDITOR( EDA_BASE_FRAME* aFrame, wxWindow* aW
|
||||
if( !m_readOnly )
|
||||
installButtons( bMargins );
|
||||
|
||||
mainSizer->Add( bMargins, 1, wxEXPAND | wxRIGHT | wxLEFT, side_margins );
|
||||
m_mainSizer->Add( bMargins, 1, wxEXPAND | wxRIGHT | wxLEFT, side_margins );
|
||||
|
||||
this->SetSizer( mainSizer );
|
||||
this->SetSizer( m_mainSizer );
|
||||
this->Layout();
|
||||
|
||||
// Connect Events
|
||||
@@ -125,7 +154,7 @@ void PANEL_HOTKEYS_EDITOR::installButtons( wxSizer* aSizer )
|
||||
_( "Import..." ),
|
||||
_( "Import hotkey definitions from an external file, replacing the current values" ),
|
||||
[this]( wxCommandEvent& ){
|
||||
m_frame->ImportHotkeyConfigFromFile( m_hotkeys, m_nickname );
|
||||
onImportHotkeyConfigFromFile();
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -144,6 +173,22 @@ void PANEL_HOTKEYS_EDITOR::installButtons( wxSizer* aSizer )
|
||||
}
|
||||
|
||||
|
||||
void PANEL_HOTKEYS_EDITOR::onImportHotkeyConfigFromFile()
|
||||
{
|
||||
m_frame->ImportHotkeyConfigFromFile( m_hotkeys, m_nickname );
|
||||
|
||||
if( !m_hotkeyStore.TestStoreValidity() )
|
||||
{
|
||||
wxString msg = _( "The imported file contains invalid hotkeys. "
|
||||
"Please correct the errors before continuing." );
|
||||
|
||||
wxString errKeys;
|
||||
m_hotkeyStore.GetStoreValidityMessage( errKeys );
|
||||
DisplayErrorMessage( this, msg, errKeys );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool PANEL_HOTKEYS_EDITOR::TransferDataToWindow()
|
||||
{
|
||||
return m_hotkeyListCtrl->TransferDataToControl();
|
||||
@@ -167,3 +212,34 @@ void PANEL_HOTKEYS_EDITOR::OnFilterSearch( wxCommandEvent& aEvent )
|
||||
const auto searchStr = aEvent.GetString();
|
||||
m_hotkeyListCtrl->ApplyFilterString( searchStr );
|
||||
}
|
||||
|
||||
|
||||
void PANEL_HOTKEYS_EDITOR::UpdateErrorMessage()
|
||||
{
|
||||
wxString validMessage;
|
||||
bool isValid = m_hotkeyStore.GetStoreValidityMessage( validMessage );
|
||||
|
||||
if( isValid )
|
||||
{
|
||||
// Hide the error message sizer if all the hotkeys are valid
|
||||
if( !m_readOnly )
|
||||
{
|
||||
m_errorMessage->SetLabelText( wxEmptyString );
|
||||
m_errorMessage->Update();
|
||||
}
|
||||
|
||||
m_mainSizer->Hide( m_errorMessageSizer );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Update the message text and ensure it is showing if there are errors
|
||||
if( !m_readOnly )
|
||||
{
|
||||
m_errorMessage->SetLabelText( validMessage );
|
||||
m_errorMessage->Update();
|
||||
}
|
||||
|
||||
m_mainSizer->Show( m_errorMessageSizer );
|
||||
}
|
||||
m_mainSizer->Layout();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,178 @@
|
||||
/*
|
||||
* 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 <dpi_scaling.h>
|
||||
|
||||
#include <core/optional.h>
|
||||
|
||||
#include <env_vars.h>
|
||||
#include <pgm_base.h>
|
||||
|
||||
#include <wx/config.h>
|
||||
#include <wx/log.h>
|
||||
|
||||
|
||||
/**
|
||||
* Flag to enable trace for HiDPI scaling factors
|
||||
*
|
||||
* Use "KICAD_TRACE_HIGH_DPI" to enable.
|
||||
*
|
||||
* @ingroup trace_env_vars
|
||||
*/
|
||||
const wxChar* const traceHiDpi = wxT( "KICAD_TRACE_HIGH_DPI" );
|
||||
|
||||
|
||||
/**
|
||||
* Get a user-configured scale factor from KiCad config file
|
||||
*
|
||||
* @return the scale factor, if set
|
||||
*/
|
||||
static OPT<double> getKiCadConfiguredScale( const wxConfigBase& aConfig )
|
||||
{
|
||||
OPT<double> scale;
|
||||
double canvas_scale = 0.0;
|
||||
aConfig.Read( CANVAS_SCALE_KEY, &canvas_scale, 0.0 );
|
||||
|
||||
if( canvas_scale > 0.0 )
|
||||
{
|
||||
scale = canvas_scale;
|
||||
}
|
||||
|
||||
if( scale )
|
||||
{
|
||||
wxLogTrace( traceHiDpi, "Scale factor (configured): %f", *scale );
|
||||
}
|
||||
|
||||
return scale;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the toolkit scale factor from a user-set environment variable
|
||||
* (for example GDK_SCALE on GTK).
|
||||
*
|
||||
* @return the scale factor, if set
|
||||
*/
|
||||
static OPT<double> getEnviromentScale()
|
||||
{
|
||||
const wxPortId port_id = wxPlatformInfo::Get().GetPortId();
|
||||
OPT<double> scale;
|
||||
|
||||
if( port_id == wxPORT_GTK )
|
||||
{
|
||||
// Under GTK, the user can use GDK_SCALE to force the scaling
|
||||
scale = GetEnvVar<double>( "GDK_SCALE" );
|
||||
}
|
||||
|
||||
if( scale )
|
||||
{
|
||||
wxLogTrace( traceHiDpi, "Scale factor (environment): %f", *scale );
|
||||
}
|
||||
|
||||
return scale;
|
||||
}
|
||||
|
||||
|
||||
DPI_SCALING::DPI_SCALING( wxConfigBase* aConfig, const wxWindow* aWindow )
|
||||
: m_config( aConfig ), m_window( aWindow )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
double DPI_SCALING::GetScaleFactor() const
|
||||
{
|
||||
OPT<double> val;
|
||||
|
||||
if( m_config )
|
||||
{
|
||||
val = getKiCadConfiguredScale( *m_config );
|
||||
}
|
||||
|
||||
if( !val )
|
||||
{
|
||||
val = getEnviromentScale();
|
||||
}
|
||||
|
||||
if( !val && m_window )
|
||||
{
|
||||
// Use the native WX reporting.
|
||||
// On Linux, this will not work until WX 3.2 and GTK >= 3.10
|
||||
// Otherwise it returns 1.0
|
||||
val = m_window->GetContentScaleFactor();
|
||||
wxLogTrace( traceHiDpi, "Scale factor (WX): %f", *val );
|
||||
}
|
||||
|
||||
if( !val )
|
||||
{
|
||||
// Nothing else we can do, give it a default value
|
||||
val = GetDefaultScaleFactor();
|
||||
wxLogTrace( traceHiDpi, "Scale factor (default): %f", *val );
|
||||
}
|
||||
|
||||
return *val;
|
||||
}
|
||||
|
||||
|
||||
bool DPI_SCALING::GetCanvasIsAutoScaled() const
|
||||
{
|
||||
if( m_config == nullptr )
|
||||
{
|
||||
// No configuration given, so has to be automatic scaling
|
||||
return true;
|
||||
}
|
||||
|
||||
const bool automatic = getKiCadConfiguredScale( *m_config ) == boost::none;
|
||||
wxLogTrace( traceHiDpi, "Scale is automatic: %d", automatic );
|
||||
return automatic;
|
||||
}
|
||||
|
||||
|
||||
void DPI_SCALING::SetDpiConfig( bool aAuto, double aValue )
|
||||
{
|
||||
wxCHECK_RET( m_config != nullptr, "Setting DPI config without a config store." );
|
||||
|
||||
const double value = aAuto ? 0.0 : aValue;
|
||||
|
||||
m_config->Write( CANVAS_SCALE_KEY, value );
|
||||
}
|
||||
|
||||
|
||||
double DPI_SCALING::GetMaxScaleFactor()
|
||||
{
|
||||
// displays with higher than 4.0 DPI are not really going to be useful
|
||||
// for KiCad (even an 8k display would be effectively only ~1080p at 4x)
|
||||
return 6.0;
|
||||
}
|
||||
|
||||
|
||||
double DPI_SCALING::GetMinScaleFactor()
|
||||
{
|
||||
// scales under 1.0 don't make sense from a HiDPI perspective
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
double DPI_SCALING::GetDefaultScaleFactor()
|
||||
{
|
||||
// no scaling => 1.0
|
||||
return 1.0;
|
||||
}
|
||||
@@ -148,8 +148,6 @@ void EDA_DRAW_PANEL_GAL::SetFocus()
|
||||
|
||||
void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& WXUNUSED( aEvent ) )
|
||||
{
|
||||
m_viewControls->UpdateScrollbars();
|
||||
|
||||
// Update current zoom settings if the canvas is managed by a EDA frame
|
||||
// (i.e. not by a preview panel in a dialog)
|
||||
if( GetParentEDAFrame() && GetParentEDAFrame()->GetScreen() )
|
||||
@@ -160,6 +158,8 @@ void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& WXUNUSED( aEvent ) )
|
||||
GetParentEDAFrame()->SetScrollCenterPosition( wxPoint( center.x, center.y ) );
|
||||
}
|
||||
|
||||
m_viewControls->UpdateScrollbars();
|
||||
|
||||
if( !m_gal->IsVisible() )
|
||||
return;
|
||||
|
||||
|
||||
@@ -109,7 +109,9 @@ long long int ECOORD::ConvertToNm( int aValue, enum EAGLE_UNIT aUnit )
|
||||
case EU_MIL: ret = (long long) aValue * 25400; break;
|
||||
}
|
||||
|
||||
wxASSERT( ( ret > 0 ) == ( aValue > 0 ) ); // check for overflow
|
||||
if( ( ret > 0 ) != ( aValue > 0 ) )
|
||||
wxLogError( _( "Invalid size %lld: too large" ), aValue );
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -283,8 +285,13 @@ wxPoint ConvertArcCenter( const wxPoint& aStart, const wxPoint& aEnd, double aAn
|
||||
wxPoint mid = ( aStart + aEnd ) / 2;
|
||||
|
||||
double dlen = sqrt( dx*dx + dy*dy );
|
||||
wxASSERT( dlen != 0 );
|
||||
wxASSERT( aAngle != 0 );
|
||||
|
||||
if( !std::isnormal( dlen ) || !std::isnormal( aAngle ) )
|
||||
{
|
||||
THROW_IO_ERROR(
|
||||
wxString::Format( _( "Invalid Arc with radius %f and angle %f" ), dlen, aAngle ) );
|
||||
}
|
||||
|
||||
double dist = dlen / ( 2 * tan( DEG2RAD( aAngle ) / 2 ) );
|
||||
|
||||
wxPoint center(
|
||||
@@ -608,7 +615,7 @@ wxSize ETEXT::ConvertSize() const
|
||||
}
|
||||
else
|
||||
{
|
||||
wxASSERT( false );
|
||||
wxLogDebug( "Invalid font name \"%s\"", fontName );
|
||||
textsize = wxSize( size.ToSchUnits(), size.ToSchUnits() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -582,16 +582,14 @@ bool EDA_BASE_FRAME::IsWritable( const wxFileName& aFileName )
|
||||
}
|
||||
|
||||
|
||||
void EDA_BASE_FRAME::CheckForAutoSaveFile( const wxFileName& aFileName,
|
||||
const wxString& aBackupFileExtension )
|
||||
void EDA_BASE_FRAME::CheckForAutoSaveFile( const wxFileName& aFileName )
|
||||
{
|
||||
wxCHECK_RET( aFileName.IsOk(), wxT( "Invalid file name!" ) );
|
||||
wxCHECK_RET( !aBackupFileExtension.IsEmpty(), wxT( "Invalid backup file extension!" ) );
|
||||
|
||||
wxFileName autoSaveFileName = aFileName;
|
||||
|
||||
// Check for auto save file.
|
||||
autoSaveFileName.SetName( AUTOSAVE_PREFIX_FILENAME + aFileName.GetName() );
|
||||
autoSaveFileName.SetName( GetAutoSaveFilePrefix() + aFileName.GetName() );
|
||||
|
||||
wxLogTrace( traceAutoSave,
|
||||
wxT( "Checking for auto save file " ) + autoSaveFileName.GetFullPath() );
|
||||
@@ -615,18 +613,14 @@ void EDA_BASE_FRAME::CheckForAutoSaveFile( const wxFileName& aFileName,
|
||||
{
|
||||
// Get the backup file name.
|
||||
wxFileName backupFileName = aFileName;
|
||||
backupFileName.SetExt( aBackupFileExtension );
|
||||
backupFileName.SetExt( aFileName.GetExt() + GetBackupSuffix() );
|
||||
|
||||
// If an old backup file exists, delete it. If an old copy of the file exists, rename
|
||||
// it to the backup file name
|
||||
if( aFileName.FileExists() )
|
||||
{
|
||||
// Remove the old file backup file.
|
||||
if( backupFileName.FileExists() )
|
||||
wxRemoveFile( backupFileName.GetFullPath() );
|
||||
|
||||
// Rename the old file to the backup file name.
|
||||
if( !wxRenameFile( aFileName.GetFullPath(), backupFileName.GetFullPath() ) )
|
||||
if( !wxRenameFile( aFileName.GetFullPath(), backupFileName.GetFullPath(), true ) )
|
||||
{
|
||||
msg.Printf( _( "Could not create backup file \"%s\"" ),
|
||||
GetChars( backupFileName.GetFullPath() ) );
|
||||
|
||||
@@ -2,7 +2,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 AUTHORS.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
|
||||
@@ -103,18 +103,19 @@ bool GetAssociatedDocument( wxWindow* aParent,
|
||||
wxT( "file:" )
|
||||
};
|
||||
|
||||
// Replace before resolving as we might have a URL in a variable
|
||||
docname = ResolveUriByEnvVars( aDocName );
|
||||
|
||||
for( unsigned ii = 0; ii < arrayDim(url_header); ii++ )
|
||||
{
|
||||
if( aDocName.First( url_header[ii] ) == 0 ) // looks like an internet url
|
||||
if( docname.First( url_header[ii] ) == 0 ) // looks like an internet url
|
||||
{
|
||||
wxURI uri( aDocName );
|
||||
wxURI uri( docname );
|
||||
wxLaunchDefaultBrowser( uri.BuildURI() );
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
docname = aDocName;
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
docname.Replace( UNIX_STRING_DIR_SEP, WIN_STRING_DIR_SEP );
|
||||
#else
|
||||
@@ -123,17 +124,17 @@ bool GetAssociatedDocument( wxWindow* aParent,
|
||||
|
||||
|
||||
/* Compute the full file name */
|
||||
if( wxIsAbsolutePath( aDocName ) || aPaths == NULL)
|
||||
fullfilename = aDocName;
|
||||
if( wxIsAbsolutePath( docname ) || aPaths == NULL)
|
||||
fullfilename = docname;
|
||||
/* If the file exists, this is a trivial case: return the filename
|
||||
* "as this". the name can be an absolute path, or a relative path
|
||||
* like ./filename or ../<filename>
|
||||
*/
|
||||
else if( wxFileName::FileExists( aDocName ) )
|
||||
fullfilename = aDocName;
|
||||
else if( wxFileName::FileExists( docname ) )
|
||||
fullfilename = docname;
|
||||
else
|
||||
{
|
||||
fullfilename = aPaths->FindValidPath( aDocName );
|
||||
fullfilename = aPaths->FindValidPath( docname );
|
||||
}
|
||||
|
||||
wxString mask( wxT( "*" ) ), extension;
|
||||
@@ -160,7 +161,7 @@ bool GetAssociatedDocument( wxWindow* aParent,
|
||||
|
||||
if( !wxFileExists( fullfilename ) )
|
||||
{
|
||||
msg.Printf( _( "Doc File \"%s\" not found" ), GetChars( aDocName ) );
|
||||
msg.Printf( _( "Doc File \"%s\" not found" ), GetChars( docname ) );
|
||||
DisplayError( aParent, msg );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
#include <common.h>
|
||||
|
||||
#include <wx/utils.h>
|
||||
|
||||
using STRING_MAP = std::map<wxString, wxString>;
|
||||
|
||||
/*
|
||||
@@ -102,4 +104,37 @@ wxString LookUpEnvVarHelp( const wxString& aEnvVar )
|
||||
initialiseEnvVarHelp( env_var_help_text );
|
||||
|
||||
return env_var_help_text[aEnvVar];
|
||||
}
|
||||
|
||||
|
||||
template<>
|
||||
OPT<double> GetEnvVar( const wxString& aEnvVarName )
|
||||
{
|
||||
OPT<double> opt_value;
|
||||
|
||||
wxString env;
|
||||
if( wxGetEnv( aEnvVarName, &env ) )
|
||||
{
|
||||
double value;
|
||||
if( env.ToDouble( &value ) )
|
||||
{
|
||||
opt_value = value;
|
||||
}
|
||||
}
|
||||
|
||||
return opt_value;
|
||||
}
|
||||
|
||||
template<>
|
||||
OPT<wxString> GetEnvVar( const wxString& aEnvVarName )
|
||||
{
|
||||
OPT<wxString> opt_value;
|
||||
|
||||
wxString env;
|
||||
if( wxGetEnv( aEnvVarName, &env ) )
|
||||
{
|
||||
opt_value = env;
|
||||
}
|
||||
|
||||
return opt_value;
|
||||
}
|
||||
@@ -259,11 +259,12 @@ long long FP_LIB_TABLE::GenerateTimestamp( const wxString* aNickname )
|
||||
}
|
||||
|
||||
|
||||
void FP_LIB_TABLE::FootprintEnumerate( wxArrayString& aFootprintNames, const wxString& aNickname )
|
||||
void FP_LIB_TABLE::FootprintEnumerate( wxArrayString& aFootprintNames, const wxString& aNickname,
|
||||
bool aBestEfforts )
|
||||
{
|
||||
const FP_LIB_TABLE_ROW* row = FindRow( aNickname );
|
||||
wxASSERT( (PLUGIN*) row->plugin );
|
||||
row->plugin->FootprintEnumerate( aFootprintNames, row->GetFullURI( true ),
|
||||
row->plugin->FootprintEnumerate( aFootprintNames, row->GetFullURI( true ), aBestEfforts,
|
||||
row->GetProperties() );
|
||||
}
|
||||
|
||||
@@ -341,8 +342,11 @@ bool FP_LIB_TABLE::FootprintExists( const wxString& aNickname, const wxString& a
|
||||
{
|
||||
try
|
||||
{
|
||||
std::unique_ptr<MODULE> m( FootprintLoad( aNickname, aFootprintName ) );
|
||||
return m.get() != nullptr;
|
||||
const FP_LIB_TABLE_ROW* row = FindRow( aNickname );
|
||||
wxASSERT( (PLUGIN*) row->plugin );
|
||||
|
||||
return row->plugin->FootprintExists( row->GetFullURI( true ), aFootprintName,
|
||||
row->GetProperties() );
|
||||
}
|
||||
catch( ... )
|
||||
{
|
||||
|
||||
@@ -117,9 +117,47 @@ const VECTOR2D CAIRO_GAL_BASE::xform( const VECTOR2D& aP )
|
||||
|
||||
const double CAIRO_GAL_BASE::angle_xform( const double aAngle )
|
||||
{
|
||||
double world_angle = -std::atan2( currentWorld2Screen.xy, currentWorld2Screen.xx );
|
||||
// calculate rotation angle due to the rotation transform
|
||||
// and if flipped on X axis.
|
||||
double world_rotation = -std::atan2( currentWorld2Screen.xy, currentWorld2Screen.xx );
|
||||
|
||||
return std::fmod( aAngle + world_angle, 2.0 * M_PI );
|
||||
// When flipped on X axis, the rotation angle is M_PI - initial angle:
|
||||
if( IsFlippedX() )
|
||||
world_rotation = M_PI - world_rotation;
|
||||
|
||||
return std::fmod( aAngle + world_rotation, 2.0 * M_PI );
|
||||
}
|
||||
|
||||
|
||||
void CAIRO_GAL_BASE::arc_angles_xform_and_normalize( double& aStartAngle, double& aEndAngle )
|
||||
{
|
||||
double startAngle = aStartAngle;
|
||||
double endAngle = aEndAngle;
|
||||
|
||||
// When the view is flipped, the coordinates are flipped by the matrix transform
|
||||
// However, arc angles need to be "flipped": the flipped angle is M_PI - initial angle.
|
||||
if( IsFlippedX() )
|
||||
{
|
||||
startAngle = M_PI - startAngle;
|
||||
endAngle = M_PI - endAngle;
|
||||
}
|
||||
|
||||
// Normalize arc angles
|
||||
SWAP( startAngle, >, endAngle );
|
||||
|
||||
// now rotate arc according to the rotation transform matrix
|
||||
// Remark:
|
||||
// We call angle_xform() to calculate angles according to the flip/rotation
|
||||
// transform and normatize between -2M_PI and +2M_PI.
|
||||
// Therefore, if aStartAngle = aEndAngle + 2*n*M_PI, the transform gives
|
||||
// aEndAngle = aStartAngle
|
||||
// So, if this is the case, force the aEndAngle value to draw a circle.
|
||||
aStartAngle = angle_xform( startAngle );
|
||||
|
||||
if( std::abs( aEndAngle - aStartAngle ) >= 2*M_PI ) // arc is a full circle
|
||||
aEndAngle = aStartAngle + 2*M_PI;
|
||||
else
|
||||
aEndAngle = angle_xform( endAngle );
|
||||
}
|
||||
|
||||
|
||||
@@ -245,6 +283,7 @@ void CAIRO_GAL_BASE::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius )
|
||||
auto c = roundp( xform( aCenterPoint ) );
|
||||
auto r = ::roundp( xform( aRadius ) );
|
||||
|
||||
cairo_set_line_width( currentContext, std::min( 2.0 * r, lineWidthInPixels ) );
|
||||
cairo_new_sub_path( currentContext );
|
||||
cairo_arc( currentContext, c.x, c.y, r, 0.0, 2 * M_PI );
|
||||
cairo_close_path( currentContext );
|
||||
@@ -258,10 +297,11 @@ void CAIRO_GAL_BASE::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, doub
|
||||
{
|
||||
syncLineWidth();
|
||||
|
||||
SWAP( aStartAngle, >, aEndAngle );
|
||||
auto startAngleS = angle_xform( aStartAngle );
|
||||
auto endAngleS = angle_xform( aEndAngle );
|
||||
auto r = xform( aRadius );
|
||||
// calculate start and end arc angles according to the rotation transform matrix
|
||||
// and normalize:
|
||||
arc_angles_xform_and_normalize( aStartAngle, aEndAngle );
|
||||
|
||||
double r = xform( aRadius );
|
||||
|
||||
// N.B. This is backwards. We set this because we want to adjust the center
|
||||
// point that changes both endpoints. In the worst case, this is twice as far.
|
||||
@@ -277,7 +317,7 @@ void CAIRO_GAL_BASE::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, doub
|
||||
if( isFillEnabled )
|
||||
cairo_move_to( currentContext, mid.x, mid.y );
|
||||
|
||||
cairo_arc( currentContext, mid.x, mid.y, r, startAngleS, endAngleS );
|
||||
cairo_arc( currentContext, mid.x, mid.y, r, aStartAngle, aEndAngle );
|
||||
|
||||
if( isFillEnabled )
|
||||
cairo_close_path( currentContext );
|
||||
@@ -303,10 +343,14 @@ void CAIRO_GAL_BASE::DrawArcSegment( const VECTOR2D& aCenterPoint, double aRadiu
|
||||
}
|
||||
|
||||
syncLineWidth();
|
||||
SWAP( aStartAngle, >, aEndAngle );
|
||||
auto startAngleS = angle_xform( aStartAngle );
|
||||
auto endAngleS = angle_xform( aEndAngle );
|
||||
auto r = xform( aRadius );
|
||||
|
||||
// calculate start and end arc angles according to the rotation transform matrix
|
||||
// and normalize:
|
||||
double startAngleS = aStartAngle;
|
||||
double endAngleS = aEndAngle;
|
||||
arc_angles_xform_and_normalize( startAngleS, endAngleS );
|
||||
|
||||
double r = xform( aRadius );
|
||||
|
||||
// N.B. This is backwards. We set this because we want to adjust the center
|
||||
// point that changes both endpoints. In the worst case, this is twice as far.
|
||||
@@ -315,7 +359,7 @@ void CAIRO_GAL_BASE::DrawArcSegment( const VECTOR2D& aCenterPoint, double aRadiu
|
||||
lineWidthIsOdd = !( static_cast<int>( aRadius ) % 1 );
|
||||
|
||||
auto mid = roundp( xform( aCenterPoint ) );
|
||||
auto width = xform( aWidth / 2.0 );
|
||||
double width = xform( aWidth / 2.0 );
|
||||
auto startPointS = VECTOR2D( r, 0.0 ).Rotate( startAngleS );
|
||||
auto endPointS = VECTOR2D( r, 0.0 ).Rotate( endAngleS );
|
||||
|
||||
@@ -1490,14 +1534,6 @@ void CAIRO_GAL_BASE::DrawGrid()
|
||||
VECTOR2D worldStartPoint = screenWorldMatrix * VECTOR2D( 0.0, 0.0 );
|
||||
VECTOR2D worldEndPoint = screenWorldMatrix * VECTOR2D( screenSize );
|
||||
|
||||
double gridThreshold = KiROUND( computeMinGridSpacing() / worldScale );
|
||||
|
||||
if( gridStyle == GRID_STYLE::SMALL_CROSS )
|
||||
gridThreshold *= 2.0;
|
||||
|
||||
int gridScreenSizeDense = gridSize.x;
|
||||
int gridScreenSizeCoarse = KiROUND( gridSize.x * static_cast<double>( gridTick ) );
|
||||
|
||||
// Compute the line marker or point radius of the grid
|
||||
// Note: generic grids can't handle sub-pixel lines without
|
||||
// either losing fine/course distinction or having some dots
|
||||
@@ -1515,21 +1551,27 @@ void CAIRO_GAL_BASE::DrawGrid()
|
||||
if( !gridVisibility )
|
||||
return;
|
||||
|
||||
VECTOR2D gridScreenSize( gridSize );
|
||||
|
||||
double gridThreshold = KiROUND( computeMinGridSpacing() / worldScale );
|
||||
|
||||
if( gridStyle == GRID_STYLE::SMALL_CROSS )
|
||||
gridThreshold *= 2.0;
|
||||
|
||||
// If we cannot display the grid density, scale down by a tick size and
|
||||
// try again. Eventually, we get some representation of the grid
|
||||
while( std::min( gridScreenSizeDense, gridScreenSizeCoarse ) <= gridThreshold )
|
||||
while( std::min( gridScreenSize.x, gridScreenSize.y ) <= gridThreshold )
|
||||
{
|
||||
gridScreenSizeCoarse *= gridTick;
|
||||
gridScreenSizeDense *= gridTick;
|
||||
gridScreenSize = gridScreenSize * static_cast<double>( gridTick );
|
||||
}
|
||||
|
||||
// Compute grid starting and ending indexes to draw grid points on the
|
||||
// visible screen area
|
||||
// Note: later any point coordinate will be offsetted by gridOrigin
|
||||
int gridStartX = KiROUND( ( worldStartPoint.x - gridOrigin.x ) / gridScreenSizeDense );
|
||||
int gridEndX = KiROUND( ( worldEndPoint.x - gridOrigin.x ) / gridScreenSizeDense );
|
||||
int gridStartY = KiROUND( ( worldStartPoint.y - gridOrigin.y ) / gridScreenSizeDense );
|
||||
int gridEndY = KiROUND( ( worldEndPoint.y - gridOrigin.y ) / gridScreenSizeDense );
|
||||
int gridStartX = KiROUND( ( worldStartPoint.x - gridOrigin.x ) / gridScreenSize.x );
|
||||
int gridEndX = KiROUND( ( worldEndPoint.x - gridOrigin.x ) / gridScreenSize.x );
|
||||
int gridStartY = KiROUND( ( worldStartPoint.y - gridOrigin.y ) / gridScreenSize.y );
|
||||
int gridEndY = KiROUND( ( worldEndPoint.y - gridOrigin.y ) / gridScreenSize.y );
|
||||
|
||||
// Ensure start coordinate > end coordinate
|
||||
|
||||
@@ -1550,27 +1592,27 @@ void CAIRO_GAL_BASE::DrawGrid()
|
||||
// Vertical lines
|
||||
for( int j = gridStartY; j <= gridEndY; j++ )
|
||||
{
|
||||
const double y = j * gridScreenSizeDense + gridOrigin.y;
|
||||
const double y = j * gridScreenSize.y + gridOrigin.y;
|
||||
|
||||
if( axesEnabled && y == 0 )
|
||||
if( axesEnabled && y == 0.0 )
|
||||
continue;
|
||||
|
||||
SetLineWidth( ( j % gridTick ) ? marker : doubleMarker );
|
||||
drawGridLine( VECTOR2D( gridStartX * gridScreenSizeDense + gridOrigin.x, y ),
|
||||
VECTOR2D( gridEndX * gridScreenSizeDense + gridOrigin.x, y ) );
|
||||
drawGridLine( VECTOR2D( gridStartX * gridScreenSize.x + gridOrigin.x, y ),
|
||||
VECTOR2D( gridEndX * gridScreenSize.x + gridOrigin.x, y ) );
|
||||
}
|
||||
|
||||
// Horizontal lines
|
||||
for( int i = gridStartX; i <= gridEndX; i++ )
|
||||
{
|
||||
const double x = i * gridScreenSizeDense + gridOrigin.x;
|
||||
const double x = i * gridScreenSize.x + gridOrigin.x;
|
||||
|
||||
if( axesEnabled && x == 0 )
|
||||
if( axesEnabled && x == 0.0 )
|
||||
continue;
|
||||
|
||||
SetLineWidth( ( i % gridTick ) ? marker : doubleMarker );
|
||||
drawGridLine( VECTOR2D( x, gridStartY * gridScreenSizeDense + gridOrigin.y ),
|
||||
VECTOR2D( x, gridEndY * gridScreenSizeDense + gridOrigin.y ) );
|
||||
drawGridLine( VECTOR2D( x, gridStartY * gridScreenSize.y + gridOrigin.y ),
|
||||
VECTOR2D( x, gridEndY * gridScreenSize.y + gridOrigin.y ) );
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1584,8 +1626,8 @@ void CAIRO_GAL_BASE::DrawGrid()
|
||||
{
|
||||
bool tickX = ( i % gridTick == 0 );
|
||||
SetLineWidth( ( ( tickX && tickY ) ? doubleMarker : marker ) );
|
||||
auto pos = VECTOR2D( i * gridScreenSizeDense + gridOrigin.x,
|
||||
j * gridScreenSizeDense + gridOrigin.y );
|
||||
auto pos = VECTOR2D( i * gridScreenSize.x + gridOrigin.x,
|
||||
j * gridScreenSize.y + gridOrigin.y );
|
||||
|
||||
if( gridStyle == GRID_STYLE::SMALL_CROSS )
|
||||
drawGridCross( pos );
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018 CERN
|
||||
* Copyright (C) 2019 CERN
|
||||
* Author: Maciej Suminski <maciej.suminski@cern.ch>
|
||||
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
|
||||
*
|
||||
@@ -63,8 +63,16 @@ CAIRO_PRINT_CTX::CAIRO_PRINT_CTX( wxDC* aDC )
|
||||
#ifdef __WXGTK__
|
||||
m_ctx = static_cast<cairo_t*>( gctx->GetNativeContext() );
|
||||
m_surface = cairo_get_target( m_ctx );
|
||||
// Magic value: apparently for linux, all printers are 72 DPI
|
||||
m_dpi = 72.0;
|
||||
// On linux, cairo printers have 72 DPI by default.
|
||||
// This is an unusable resolution for us.
|
||||
// A better resolution could be 4800 DPI (at 600 DPI, we still have minor
|
||||
// but visible artifacts, for instance with arcs, but not at 4800 DPI)
|
||||
// so modify the default:
|
||||
#define DEFAULT_DPI 72.0
|
||||
#define KICAD_PRINTER_DPI 4800.0
|
||||
// our device scale is DEFAULT_DPI / KICAD_PRINTER_DPI
|
||||
cairo_surface_set_device_scale( m_surface, DEFAULT_DPI/KICAD_PRINTER_DPI, DEFAULT_DPI/KICAD_PRINTER_DPI );
|
||||
m_dpi = KICAD_PRINTER_DPI;
|
||||
#endif /* __WXGTK__ */
|
||||
|
||||
#ifdef __WXMSW__
|
||||
@@ -122,6 +130,7 @@ CAIRO_PRINT_GAL::CAIRO_PRINT_GAL( GAL_DISPLAY_OPTIONS& aDisplayOptions,
|
||||
m_clearColor = COLOR4D( 1.0, 1.0, 1.0, 1.0 );
|
||||
m_hasNativeLandscapeRotation = false;
|
||||
resetContext();
|
||||
|
||||
SetScreenDPI( m_printCtx->GetNativeDPI() );
|
||||
}
|
||||
|
||||
|
||||
@@ -22,9 +22,13 @@
|
||||
*/
|
||||
|
||||
#include <gal/gal_display_options.h>
|
||||
|
||||
#include <wx/config.h>
|
||||
#include <wx/log.h>
|
||||
|
||||
#include <config_map.h>
|
||||
#include <dpi_scaling.h>
|
||||
#include <pgm_base.h>
|
||||
|
||||
using namespace KIGFX;
|
||||
|
||||
@@ -47,6 +51,16 @@ static const UTIL::CFG_MAP<KIGFX::GRID_STYLE> gridStyleConfigVals =
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Flag to enable GAL_DISPLAY_OPTIONS loggin
|
||||
*
|
||||
* Use "KICAD_GAL_DISPLAY_OPTIONS" to enable.
|
||||
*
|
||||
* @ingroup trace_env_vars
|
||||
*/
|
||||
static const wxChar* traceGalDispOpts = wxT( "KICAD_GAL_DISPLAY_OPTIONS" );
|
||||
|
||||
|
||||
GAL_DISPLAY_OPTIONS::GAL_DISPLAY_OPTIONS()
|
||||
: gl_antialiasing_mode( OPENGL_ANTIALIASING_MODE::NONE ),
|
||||
cairo_antialiasing_mode( CAIRO_ANTIALIASING_MODE::NONE ),
|
||||
@@ -55,42 +69,86 @@ GAL_DISPLAY_OPTIONS::GAL_DISPLAY_OPTIONS()
|
||||
m_gridMinSpacing( 10.0 ),
|
||||
m_axesEnabled( false ),
|
||||
m_fullscreenCursor( false ),
|
||||
m_forceDisplayCursor( false )
|
||||
m_forceDisplayCursor( false ),
|
||||
m_scaleFactor( DPI_SCALING::GetDefaultScaleFactor() )
|
||||
{}
|
||||
|
||||
|
||||
void GAL_DISPLAY_OPTIONS::ReadConfig( wxConfigBase* aCfg, const wxString& aBaseName )
|
||||
void GAL_DISPLAY_OPTIONS::ReadAppConfig( wxConfigBase& aCfg, const wxString& aBaseName )
|
||||
{
|
||||
const wxString baseName = aBaseName + GAL_DISPLAY_OPTIONS_KEY;
|
||||
|
||||
wxLogTrace( traceGalDispOpts, "Reading options with base name '%s'", baseName );
|
||||
|
||||
long readLong; // Temp value buffer
|
||||
|
||||
aCfg->Read( aBaseName + GalGridStyleConfig, &readLong,
|
||||
static_cast<long>( KIGFX::GRID_STYLE::DOTS ) );
|
||||
aCfg.Read( baseName + GalGridStyleConfig, &readLong,
|
||||
static_cast<long>( KIGFX::GRID_STYLE::DOTS ) );
|
||||
m_gridStyle = UTIL::GetValFromConfig( gridStyleConfigVals, readLong );
|
||||
|
||||
aCfg->Read( aBaseName + GalGridLineWidthConfig, &m_gridLineWidth, 1.0 );
|
||||
aCfg->Read( aBaseName + GalGridMaxDensityConfig, &m_gridMinSpacing, 10 );
|
||||
aCfg->Read( aBaseName + GalGridAxesEnabledConfig, &m_axesEnabled, false );
|
||||
aCfg->Read( aBaseName + GalFullscreenCursorConfig, &m_fullscreenCursor, false );
|
||||
aCfg->Read( aBaseName + GalForceDisplayCursorConfig, &m_forceDisplayCursor, true );
|
||||
aCfg.Read( baseName + GalGridLineWidthConfig, &m_gridLineWidth, 1.0 );
|
||||
aCfg.Read( baseName + GalGridMaxDensityConfig, &m_gridMinSpacing, 10 );
|
||||
aCfg.Read( baseName + GalGridAxesEnabledConfig, &m_axesEnabled, false );
|
||||
aCfg.Read( baseName + GalFullscreenCursorConfig, &m_fullscreenCursor, false );
|
||||
aCfg.Read( baseName + GalForceDisplayCursorConfig, &m_forceDisplayCursor, true );
|
||||
|
||||
NotifyChanged();
|
||||
}
|
||||
|
||||
|
||||
void GAL_DISPLAY_OPTIONS::WriteConfig( wxConfigBase* aCfg, const wxString& aBaseName )
|
||||
void GAL_DISPLAY_OPTIONS::ReadCommonConfig( wxConfigBase& aCommonConfig, wxWindow* aWindow )
|
||||
{
|
||||
aCfg->Write( aBaseName + GalGridStyleConfig,
|
||||
wxLogTrace( traceGalDispOpts, "Reading common config" );
|
||||
|
||||
int temp;
|
||||
aCommonConfig.Read(
|
||||
GAL_ANTIALIASING_MODE_KEY, &temp, (int) KIGFX::OPENGL_ANTIALIASING_MODE::NONE );
|
||||
gl_antialiasing_mode = (KIGFX::OPENGL_ANTIALIASING_MODE) temp;
|
||||
|
||||
aCommonConfig.Read(
|
||||
CAIRO_ANTIALIASING_MODE_KEY, &temp, (int) KIGFX::CAIRO_ANTIALIASING_MODE::NONE );
|
||||
cairo_antialiasing_mode = (KIGFX::CAIRO_ANTIALIASING_MODE) temp;
|
||||
|
||||
{
|
||||
const DPI_SCALING dpi{ &aCommonConfig, aWindow };
|
||||
m_scaleFactor = dpi.GetScaleFactor();
|
||||
}
|
||||
|
||||
NotifyChanged();
|
||||
}
|
||||
|
||||
|
||||
void GAL_DISPLAY_OPTIONS::ReadConfig( wxConfigBase& aCommonConfig, wxConfigBase& aAppConfig,
|
||||
const wxString& aBaseCfgName, wxWindow* aWindow )
|
||||
{
|
||||
wxLogTrace( traceGalDispOpts, "Reading common and app config (%s)", aBaseCfgName );
|
||||
|
||||
ReadAppConfig( aAppConfig, aBaseCfgName );
|
||||
|
||||
ReadCommonConfig( aCommonConfig, aWindow );
|
||||
}
|
||||
|
||||
|
||||
void GAL_DISPLAY_OPTIONS::WriteConfig( wxConfigBase& aCfg, const wxString& aBaseName )
|
||||
{
|
||||
const wxString baseName = aBaseName + GAL_DISPLAY_OPTIONS_KEY;
|
||||
|
||||
wxLogTrace( traceGalDispOpts, "Writing app config (%s)", baseName );
|
||||
|
||||
aCfg.Write( baseName + GalGridStyleConfig,
|
||||
UTIL::GetConfigForVal( gridStyleConfigVals, m_gridStyle ) );
|
||||
|
||||
aCfg->Write( aBaseName + GalGridLineWidthConfig, m_gridLineWidth );
|
||||
aCfg->Write( aBaseName + GalGridMaxDensityConfig, m_gridMinSpacing );
|
||||
aCfg->Write( aBaseName + GalGridAxesEnabledConfig, m_axesEnabled );
|
||||
aCfg->Write( aBaseName + GalFullscreenCursorConfig, m_fullscreenCursor );
|
||||
aCfg->Write( aBaseName + GalForceDisplayCursorConfig, m_forceDisplayCursor );
|
||||
aCfg.Write( baseName + GalGridLineWidthConfig, m_gridLineWidth );
|
||||
aCfg.Write( baseName + GalGridMaxDensityConfig, m_gridMinSpacing );
|
||||
aCfg.Write( baseName + GalGridAxesEnabledConfig, m_axesEnabled );
|
||||
aCfg.Write( baseName + GalFullscreenCursorConfig, m_fullscreenCursor );
|
||||
aCfg.Write( baseName + GalForceDisplayCursorConfig, m_forceDisplayCursor );
|
||||
}
|
||||
|
||||
|
||||
void GAL_DISPLAY_OPTIONS::NotifyChanged()
|
||||
{
|
||||
wxLogTrace( traceGalDispOpts, "Change notification" );
|
||||
|
||||
Notify( &GAL_DISPLAY_OPTIONS_OBSERVER::OnGalDisplayOptionsChanged, *this );
|
||||
}
|
||||
}
|
||||
@@ -26,16 +26,14 @@
|
||||
|
||||
#include <gal/hidpi_gl_canvas.h>
|
||||
|
||||
#include <dpi_scaling.h>
|
||||
|
||||
HIDPI_GL_CANVAS::HIDPI_GL_CANVAS( wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const int *attribList,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
const wxString& name,
|
||||
const wxPalette& palette ) :
|
||||
wxGLCanvas( parent, id, attribList, pos, size, style, name, palette )
|
||||
|
||||
HIDPI_GL_CANVAS::HIDPI_GL_CANVAS( wxWindow* parent, wxWindowID id, const int* attribList,
|
||||
const wxPoint& pos, const wxSize& size, long style, const wxString& name,
|
||||
const wxPalette& palette )
|
||||
: wxGLCanvas( parent, id, attribList, pos, size, style, name, palette ),
|
||||
m_scale_factor( DPI_SCALING::GetDefaultScaleFactor() )
|
||||
{
|
||||
#ifdef RETINA_OPENGL_PATCH
|
||||
SetViewWantsBestResolution( true );
|
||||
@@ -47,15 +45,14 @@ wxSize HIDPI_GL_CANVAS::GetNativePixelSize() const
|
||||
{
|
||||
wxSize size = wxGLCanvas::GetClientSize();
|
||||
|
||||
#ifdef RETINA_OPENGL_PATCH
|
||||
const float scaleFactor = GetBackingScaleFactor();
|
||||
size.x *= scaleFactor;
|
||||
size.y *= scaleFactor;
|
||||
#endif
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
|
||||
float HIDPI_GL_CANVAS::GetBackingScaleFactor() const
|
||||
{
|
||||
#ifdef RETINA_OPENGL_PATCH
|
||||
@@ -63,6 +60,20 @@ float HIDPI_GL_CANVAS::GetBackingScaleFactor() const
|
||||
// => clean up when it officially has arrived in wxWidgets
|
||||
return static_cast< wxGLCanvas* >( const_cast< HIDPI_GL_CANVAS* >( this ))->GetBackingScaleFactor();
|
||||
#else
|
||||
return 1.0f;
|
||||
|
||||
// Return the cached value (which originally was set from config or automatically)
|
||||
return m_scale_factor;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void HIDPI_GL_CANVAS::SetScaleFactor( double aNewScaleFactor )
|
||||
{
|
||||
m_scale_factor = aNewScaleFactor;
|
||||
}
|
||||
|
||||
|
||||
double HIDPI_GL_CANVAS::GetScaleFactor() const
|
||||
{
|
||||
return m_scale_factor;
|
||||
}
|
||||
@@ -333,12 +333,11 @@ int isPixelInSegment( vec2 aCoord )
|
||||
|
||||
void strokedCircle( vec2 aCoord, float aRadius, float aWidth )
|
||||
{
|
||||
float outerRadius = max( aRadius + ( aWidth / 2 ), 0.0 );
|
||||
float innerRadius = max( aRadius - ( aWidth / 2 ), 0.0 );
|
||||
float relWidth = innerRadius / outerRadius;
|
||||
float outerRadius = max( aRadius, 0.0 );
|
||||
float innerRadius = max( aRadius - aWidth, 0.0 );
|
||||
|
||||
if( ( dot( aCoord, aCoord ) < 1.0 ) &&
|
||||
( dot( aCoord, aCoord ) > relWidth * relWidth ) )
|
||||
( dot( aCoord, aCoord ) * ( outerRadius * outerRadius ) > innerRadius * innerRadius ) )
|
||||
gl_FragColor = gl_Color;
|
||||
else
|
||||
discard;
|
||||
|
||||
@@ -336,6 +336,12 @@ bool OPENGL_GAL::updatedGalDisplayOptions( const GAL_DISPLAY_OPTIONS& aOptions )
|
||||
refresh = true;
|
||||
}
|
||||
|
||||
if( options.m_scaleFactor != GetScaleFactor() )
|
||||
{
|
||||
SetScaleFactor( options.m_scaleFactor );
|
||||
refresh = true;
|
||||
}
|
||||
|
||||
if( super::updatedGalDisplayOptions( aOptions ) || refresh )
|
||||
{
|
||||
Refresh();
|
||||
@@ -1224,7 +1230,8 @@ void OPENGL_GAL::DrawGrid()
|
||||
nonCachedManager->EnableDepthTest( false );
|
||||
|
||||
// sub-pixel lines all render the same
|
||||
float minorLineWidth = std::fmax( 1.0f, gridLineWidth ) * getWorldPixelSize();
|
||||
float minorLineWidth =
|
||||
std::fmax( 1.0f, gridLineWidth ) * getWorldPixelSize() / GetBackingScaleFactor();
|
||||
float majorLineWidth = minorLineWidth * 2.0f;
|
||||
|
||||
// Draw the axis and grid
|
||||
@@ -1249,29 +1256,27 @@ void OPENGL_GAL::DrawGrid()
|
||||
if( !gridVisibility )
|
||||
return;
|
||||
|
||||
int gridScreenSizeDense = gridSize.x;
|
||||
int gridScreenSizeCoarse = KiROUND( gridSize.x * static_cast<double>( gridTick ) );
|
||||
VECTOR2D gridScreenSize( gridSize );
|
||||
|
||||
double gridThreshold = KiROUND( computeMinGridSpacing() / worldScale );
|
||||
double gridThreshold = computeMinGridSpacing() / worldScale;
|
||||
|
||||
if( gridStyle == GRID_STYLE::SMALL_CROSS )
|
||||
gridThreshold *= 2.0;
|
||||
|
||||
// If we cannot display the grid density, scale down by a tick size and
|
||||
// try again. Eventually, we get some representation of the grid
|
||||
while( std::min( gridScreenSizeDense, gridScreenSizeCoarse ) <= gridThreshold )
|
||||
while( std::min( gridScreenSize.x, gridScreenSize.y ) <= gridThreshold )
|
||||
{
|
||||
gridScreenSizeCoarse *= gridTick;
|
||||
gridScreenSizeDense *= gridTick;
|
||||
gridScreenSize = gridScreenSize * static_cast<double>( gridTick );
|
||||
}
|
||||
|
||||
// Compute grid staring and ending indexes to draw grid points on the
|
||||
// Compute grid starting and ending indexes to draw grid points on the
|
||||
// visible screen area
|
||||
// Note: later any point coordinate will be offsetted by gridOrigin
|
||||
int gridStartX = KiROUND( ( worldStartPoint.x - gridOrigin.x ) / gridScreenSizeDense );
|
||||
int gridEndX = KiROUND( ( worldEndPoint.x - gridOrigin.x ) / gridScreenSizeDense );
|
||||
int gridStartY = KiROUND( ( worldStartPoint.y - gridOrigin.y ) / gridScreenSizeDense );
|
||||
int gridEndY = KiROUND( ( worldEndPoint.y - gridOrigin.y ) / gridScreenSizeDense );
|
||||
int gridStartX = KiROUND( ( worldStartPoint.x - gridOrigin.x ) / gridScreenSize.x );
|
||||
int gridEndX = KiROUND( ( worldEndPoint.x - gridOrigin.x ) / gridScreenSize.x );
|
||||
int gridStartY = KiROUND( ( worldStartPoint.y - gridOrigin.y ) / gridScreenSize.y );
|
||||
int gridEndY = KiROUND( ( worldEndPoint.y - gridOrigin.y ) / gridScreenSize.y );
|
||||
|
||||
// Ensure start coordinate > end coordinate
|
||||
SWAP( gridStartX, >, gridEndX );
|
||||
@@ -1305,7 +1310,7 @@ void OPENGL_GAL::DrawGrid()
|
||||
for( int j = gridStartY; j <= gridEndY; j++ )
|
||||
{
|
||||
bool tickY = ( j % gridTick == 0 );
|
||||
int posY = j * gridScreenSizeDense + gridOrigin.y;
|
||||
const double posY = j * gridScreenSize.y + gridOrigin.y;
|
||||
|
||||
// Horizontal positions
|
||||
for( int i = gridStartX; i <= gridEndX; i++ )
|
||||
@@ -1313,7 +1318,7 @@ void OPENGL_GAL::DrawGrid()
|
||||
bool tickX = ( i % gridTick == 0 );
|
||||
SetLineWidth( ( ( tickX && tickY ) ? majorLineWidth : minorLineWidth ) );
|
||||
auto lineLen = 2.0 * GetLineWidth();
|
||||
auto posX = i * gridScreenSizeDense + gridOrigin.x;
|
||||
auto posX = i * gridScreenSize.x + gridOrigin.x;
|
||||
|
||||
DrawLine( VECTOR2D( posX - lineLen, posY ), VECTOR2D( posX + lineLen, posY ) );
|
||||
DrawLine( VECTOR2D( posX, posY - lineLen ), VECTOR2D( posX, posY + lineLen ) );
|
||||
@@ -1327,15 +1332,15 @@ void OPENGL_GAL::DrawGrid()
|
||||
// Vertical lines
|
||||
for( int j = gridStartY; j <= gridEndY; j++ )
|
||||
{
|
||||
const double y = j * gridScreenSizeDense + gridOrigin.y;
|
||||
const double y = j * gridScreenSize.y + gridOrigin.y;
|
||||
|
||||
// If axes are drawn, skip the lines that would cover them
|
||||
if( axesEnabled && y == 0 )
|
||||
if( axesEnabled && y == 0.0 )
|
||||
continue;
|
||||
|
||||
SetLineWidth( ( j % gridTick == 0 ) ? majorLineWidth : minorLineWidth );
|
||||
VECTOR2D a ( gridStartX * gridScreenSizeDense + gridOrigin.x, y );
|
||||
VECTOR2D b ( gridEndX * gridScreenSizeDense + gridOrigin.x, y );
|
||||
VECTOR2D a ( gridStartX * gridScreenSize.x + gridOrigin.x, y );
|
||||
VECTOR2D b ( gridEndX * gridScreenSize.x + gridOrigin.x, y );
|
||||
|
||||
DrawLine( a, b );
|
||||
}
|
||||
@@ -1352,15 +1357,15 @@ void OPENGL_GAL::DrawGrid()
|
||||
// Horizontal lines
|
||||
for( int i = gridStartX; i <= gridEndX; i++ )
|
||||
{
|
||||
const double x = i * gridScreenSizeDense + gridOrigin.x;
|
||||
const double x = i * gridScreenSize.x + gridOrigin.x;
|
||||
|
||||
// If axes are drawn, skip the lines that would cover them
|
||||
if( axesEnabled && x == 0 )
|
||||
if( axesEnabled && x == 0.0 )
|
||||
continue;
|
||||
|
||||
SetLineWidth( ( i % gridTick == 0 ) ? majorLineWidth : minorLineWidth );
|
||||
VECTOR2D a ( x, gridStartY * gridScreenSizeDense + gridOrigin.y );
|
||||
VECTOR2D b ( x, gridEndY * gridScreenSizeDense + gridOrigin.y );
|
||||
VECTOR2D a ( x, gridStartY * gridScreenSize.y + gridOrigin.y );
|
||||
VECTOR2D b ( x, gridEndY * gridScreenSize.y + gridOrigin.y );
|
||||
DrawLine( a, b );
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ bool STROKE_FONT::LoadNewStrokeFont( const char* const aNewStrokeFont[], int aNe
|
||||
double glyphEndX = 0.0;
|
||||
VECTOR2D glyphBoundingX;
|
||||
|
||||
std::deque<VECTOR2D>* pointList = nullptr;
|
||||
std::vector<VECTOR2D>* pointList = nullptr;
|
||||
|
||||
int i = 0;
|
||||
|
||||
@@ -105,7 +105,7 @@ bool STROKE_FONT::LoadNewStrokeFont( const char* const aNewStrokeFont[], int aNe
|
||||
|
||||
if( !pointList )
|
||||
{
|
||||
glyph.emplace_back( std::deque<VECTOR2D>() );
|
||||
glyph.emplace_back( std::vector<VECTOR2D>() );
|
||||
pointList = &glyph.back();
|
||||
}
|
||||
|
||||
@@ -140,17 +140,16 @@ BOX2D STROKE_FONT::computeBoundingBox( const GLYPH& aGLYPH, const VECTOR2D& aGLY
|
||||
{
|
||||
BOX2D boundingBox;
|
||||
|
||||
std::deque<VECTOR2D> boundingPoints;
|
||||
std::vector<VECTOR2D> boundingPoints;
|
||||
|
||||
boundingPoints.emplace_back( VECTOR2D( aGLYPHBoundingX.x, 0 ) );
|
||||
boundingPoints.emplace_back( VECTOR2D( aGLYPHBoundingX.y, 0 ) );
|
||||
|
||||
for( GLYPH::const_iterator pointListIt = aGLYPH.begin(); pointListIt != aGLYPH.end(); ++pointListIt )
|
||||
for( const auto& pointList : aGLYPH )
|
||||
{
|
||||
for( std::deque<VECTOR2D>::const_iterator pointIt = pointListIt->begin();
|
||||
pointIt != pointListIt->end(); ++pointIt )
|
||||
for( const auto& pt : pointList )
|
||||
{
|
||||
boundingPoints.emplace_back( VECTOR2D( aGLYPHBoundingX.x, pointIt->y ) );
|
||||
boundingPoints.emplace_back( aGLYPHBoundingX.x, pt.y );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -341,15 +340,13 @@ void STROKE_FONT::drawSingleLineText( const UTF8& aText )
|
||||
last_had_overbar = false;
|
||||
}
|
||||
|
||||
for( GLYPH::iterator pointListIt = glyph.begin(); pointListIt != glyph.end();
|
||||
++pointListIt )
|
||||
for( const auto& pointList : glyph )
|
||||
{
|
||||
std::deque<VECTOR2D> pointListScaled;
|
||||
|
||||
for( std::deque<VECTOR2D>::iterator pointIt = pointListIt->begin();
|
||||
pointIt != pointListIt->end(); ++pointIt )
|
||||
for( const auto& pt : pointList )
|
||||
{
|
||||
VECTOR2D pointPos( pointIt->x * glyphSize.x + xOffset, pointIt->y * glyphSize.y );
|
||||
VECTOR2D pointPos( pt.x * glyphSize.x + xOffset, pt.y * glyphSize.y );
|
||||
|
||||
if( m_gal->IsFontItalic() )
|
||||
{
|
||||
|
||||
@@ -150,7 +150,8 @@ wxString GbrMakeProjectGUIDfromString( wxString& aText )
|
||||
std::string GBR_APERTURE_METADATA::FormatAttribute( GBR_APERTURE_ATTRIB aAttribute,
|
||||
bool aUseX1StructuredComment )
|
||||
{
|
||||
std::string attribute_string;
|
||||
std::string attribute_string; // the specific aperture attribute (TA.xxx)
|
||||
std::string comment_string; // a optional G04 comment line to write before the TA. line
|
||||
|
||||
// generate a string to print a Gerber Aperture attribute
|
||||
switch( aAttribute )
|
||||
@@ -169,8 +170,8 @@ std::string GBR_APERTURE_METADATA::FormatAttribute( GBR_APERTURE_ATTRIB aAttribu
|
||||
attribute_string = "TA.AperFunction,Conductor";
|
||||
break;
|
||||
|
||||
case GBR_APERTURE_ATTRIB_CUTOUT: // print info associated to a outline
|
||||
attribute_string = "TA.AperFunction,CutOut";
|
||||
case GBR_APERTURE_ATTRIB_EDGECUT: // print info associated to a board outline (edge.cut layer)
|
||||
attribute_string = "TA.AperFunction,Profile";
|
||||
break;
|
||||
|
||||
case GBR_APERTURE_ATTRIB_VIAPAD: // print info associated to a flashed via
|
||||
@@ -226,13 +227,18 @@ std::string GBR_APERTURE_METADATA::FormatAttribute( GBR_APERTURE_ATTRIB aAttribu
|
||||
break;
|
||||
|
||||
case GBR_APERTURE_ATTRIB_COMPONENTDRILL: // print info associated to a component
|
||||
// round hole in drill files
|
||||
// round pad hole in drill files
|
||||
attribute_string = "TA.AperFunction,ComponentDrill";
|
||||
break;
|
||||
|
||||
case GBR_APERTURE_ATTRIB_SLOTDRILL: // print info associated to a oblong hole in drill files
|
||||
attribute_string = "TA.AperFunction,Slot";
|
||||
break;
|
||||
// print info associated to a component oblong pad hole in drill files
|
||||
// Same as a round pad hole, but is a specific aperture in drill file and
|
||||
// a G04 comment is added to the aperture function
|
||||
case GBR_APERTURE_ATTRIB_COMPONENTOBLONGDRILL:
|
||||
comment_string = "aperture for slot hole";
|
||||
attribute_string = "TA.AperFunction,ComponentDrill";
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
std::string full_attribute_string;
|
||||
@@ -240,14 +246,19 @@ std::string GBR_APERTURE_METADATA::FormatAttribute( GBR_APERTURE_ATTRIB aAttribu
|
||||
|
||||
if( !attribute_string.empty() )
|
||||
{
|
||||
if( !comment_string.empty() )
|
||||
{
|
||||
full_attribute_string = "G04 " + comment_string + "*\n";
|
||||
}
|
||||
|
||||
if( aUseX1StructuredComment )
|
||||
{
|
||||
full_attribute_string = "G04 #@! ";
|
||||
full_attribute_string += "G04 #@! ";
|
||||
eol_string = "*\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
full_attribute_string = "%";
|
||||
full_attribute_string += "%";
|
||||
eol_string = "*%\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2018 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 1992-2018 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
|
||||
@@ -30,6 +30,9 @@
|
||||
#include <eda_rect.h>
|
||||
#include <geometry/geometry_utils.h>
|
||||
|
||||
// To approximate a circle by segments, a minimal seg count is mandatory
|
||||
#define MIN_SEGCOUNT_FOR_CIRCLE 6
|
||||
|
||||
int GetArcToSegmentCount( int aRadius, int aErrorMax, double aArcAngleDegree )
|
||||
{
|
||||
// calculate the number of segments to approximate a circle by segments
|
||||
@@ -38,11 +41,15 @@ int GetArcToSegmentCount( int aRadius, int aErrorMax, double aArcAngleDegree )
|
||||
// error relative to the radius value:
|
||||
double rel_error = (double)aErrorMax / aRadius;
|
||||
// minimal arc increment in degrees:
|
||||
double step = 180 / M_PI * acos( 1.0 - rel_error ) * 2;
|
||||
// the minimal seg count for a arc
|
||||
int segCount = round_nearest( fabs( aArcAngleDegree ) / step );
|
||||
double arc_increment = 180 / M_PI * acos( 1.0 - rel_error ) * 2;
|
||||
|
||||
// Ensure at least one segment is used
|
||||
// Ensure a minimal arc increment reasonable value for a circle
|
||||
// (360.0 degrees). For very small radius values, this is mandatory.
|
||||
arc_increment = std::min( 360.0/MIN_SEGCOUNT_FOR_CIRCLE, arc_increment );
|
||||
|
||||
int segCount = round_nearest( fabs( aArcAngleDegree ) / arc_increment );
|
||||
|
||||
// Ensure at least one segment is used (can happen for small arcs)
|
||||
return std::max( segCount, 1 );
|
||||
}
|
||||
|
||||
@@ -53,13 +60,13 @@ double GetCircletoPolyCorrectionFactor( int aSegCountforCircle )
|
||||
* due to the segment approx.
|
||||
* For a circle the min radius is radius * cos( 2PI / aSegCountforCircle / 2)
|
||||
* this is the distance between the center and the middle of the segment.
|
||||
* therfore, to move the middle of the segment to the circle (distance = radius)
|
||||
* therefore, to move the middle of the segment to the circle (distance = radius)
|
||||
* the correctionFactor is 1 /cos( PI/aSegCountforCircle )
|
||||
*/
|
||||
if( aSegCountforCircle < 6 )
|
||||
aSegCountforCircle = 6;
|
||||
if( 1 || aSegCountforCircle > 64 )
|
||||
return 1.0 / cos( M_PI / aSegCountforCircle );
|
||||
if( aSegCountforCircle < MIN_SEGCOUNT_FOR_CIRCLE )
|
||||
aSegCountforCircle = MIN_SEGCOUNT_FOR_CIRCLE;
|
||||
|
||||
return 1.0 / cos( M_PI / aSegCountforCircle );
|
||||
}
|
||||
|
||||
|
||||
@@ -70,16 +77,19 @@ double GetCircletoPolyCorrectionFactor( int aSegCountforCircle )
|
||||
inline int clipOutCode( const EDA_RECT *aClipBox, int x, int y )
|
||||
{
|
||||
int code;
|
||||
|
||||
if( y < aClipBox->GetY() )
|
||||
code = 2;
|
||||
else if( y > aClipBox->GetBottom() )
|
||||
code = 1;
|
||||
else
|
||||
code = 0;
|
||||
|
||||
if( x < aClipBox->GetX() )
|
||||
code |= 4;
|
||||
else if( x > aClipBox->GetRight() )
|
||||
code |= 8;
|
||||
|
||||
return code;
|
||||
}
|
||||
|
||||
@@ -98,6 +108,7 @@ bool ClipLine( const EDA_RECT *aClipBox, int &x1, int &y1, int &x2, int &y2 )
|
||||
|
||||
// Choose a side to clip
|
||||
int thisoutcode, x, y;
|
||||
|
||||
if( outcode1 )
|
||||
thisoutcode = outcode1;
|
||||
else
|
||||
|
||||
@@ -256,7 +256,11 @@ const SHAPE_LINE_CHAIN SHAPE_ARC::ConvertToPolyline( double aAccuracy ) const
|
||||
|
||||
for( int i = 0; i <= n ; i++ )
|
||||
{
|
||||
double a = sa + m_centralAngle * (double) i / (double) n;
|
||||
double a = sa;
|
||||
|
||||
if( n != 0 )
|
||||
a += m_centralAngle * (double) i / (double) n;
|
||||
|
||||
double x = c.x + r * cos( a * M_PI / 180.0 );
|
||||
double y = c.y + r * sin( a * M_PI / 180.0 );
|
||||
|
||||
|
||||
@@ -396,12 +396,12 @@ bool SHAPE_POLY_SET::GetNeighbourIndexes( int aGlobalIndex, int* aPrevious, int*
|
||||
}
|
||||
|
||||
|
||||
bool SHAPE_POLY_SET::IsPolygonSelfIntersecting( int aPolygonIndex )
|
||||
bool SHAPE_POLY_SET::IsPolygonSelfIntersecting( int aPolygonIndex ) const
|
||||
{
|
||||
SEGMENT_ITERATOR iterator = IterateSegmentsWithHoles( aPolygonIndex );
|
||||
SEGMENT_ITERATOR innerIterator;
|
||||
CONST_SEGMENT_ITERATOR iterator = CIterateSegmentsWithHoles( aPolygonIndex );
|
||||
CONST_SEGMENT_ITERATOR innerIterator;
|
||||
|
||||
for( iterator = IterateSegmentsWithHoles( aPolygonIndex ); iterator; iterator++ )
|
||||
for( iterator = CIterateSegmentsWithHoles( aPolygonIndex ); iterator; iterator++ )
|
||||
{
|
||||
SEG firstSegment = *iterator;
|
||||
|
||||
@@ -423,7 +423,7 @@ bool SHAPE_POLY_SET::IsPolygonSelfIntersecting( int aPolygonIndex )
|
||||
}
|
||||
|
||||
|
||||
bool SHAPE_POLY_SET::IsSelfIntersecting()
|
||||
bool SHAPE_POLY_SET::IsSelfIntersecting() const
|
||||
{
|
||||
for( unsigned int polygon = 0; polygon < m_polys.size(); polygon++ )
|
||||
{
|
||||
@@ -544,7 +544,15 @@ void SHAPE_POLY_SET::BooleanIntersection( const SHAPE_POLY_SET& a,
|
||||
}
|
||||
|
||||
|
||||
void SHAPE_POLY_SET::Inflate( int aFactor, int aCircleSegmentsCount )
|
||||
void SHAPE_POLY_SET::InflateWithLinkedHoles( int aFactor, int aCircleSegmentsCount, POLYGON_MODE aFastMode )
|
||||
{
|
||||
Simplify( aFastMode );
|
||||
Inflate( aFactor, aCircleSegmentsCount );
|
||||
Fracture( aFastMode );
|
||||
}
|
||||
|
||||
|
||||
void SHAPE_POLY_SET::Inflate( int aFactor, int aCircleSegmentsCount, bool aPreseveCorners )
|
||||
{
|
||||
// A static table to avoid repetitive calculations of the coefficient
|
||||
// 1.0 - cos( M_PI/aCircleSegmentsCount)
|
||||
@@ -554,10 +562,14 @@ void SHAPE_POLY_SET::Inflate( int aFactor, int aCircleSegmentsCount )
|
||||
|
||||
ClipperOffset c;
|
||||
|
||||
// N.B. using jtSquare here does not create square corners. They end up mitered by
|
||||
// aFactor. Setting jtMiter and forcing the limit to be aFactor creates sharp corners.
|
||||
JoinType type = aPreseveCorners ? jtMiter : jtRound;
|
||||
|
||||
for( const POLYGON& poly : m_polys )
|
||||
{
|
||||
for( size_t i = 0; i < poly.size(); i++ )
|
||||
c.AddPath( poly[i].convertToClipper( i == 0 ), jtRound, etClosedPolygon );
|
||||
c.AddPath( poly[i].convertToClipper( i == 0 ), type, etClosedPolygon );
|
||||
}
|
||||
|
||||
PolyTree solution;
|
||||
@@ -583,6 +595,7 @@ void SHAPE_POLY_SET::Inflate( int aFactor, int aCircleSegmentsCount )
|
||||
coeff = arc_tolerance_factor[aCircleSegmentsCount];
|
||||
|
||||
c.ArcTolerance = std::abs( aFactor ) * coeff;
|
||||
c.MiterLimit = std::abs( aFactor );
|
||||
|
||||
c.Execute( solution, aFactor );
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <trigo.h>
|
||||
#include <common.h>
|
||||
#include <math_for_graphics.h>
|
||||
#include <geometry/seg.h>
|
||||
|
||||
// Returns true if the point P is on the segment S.
|
||||
// faster than TestSegmentHit() because P should be exactly on S
|
||||
@@ -56,7 +57,8 @@ bool IsPointOnSegment( const wxPoint& aSegStart, const wxPoint& aSegEnd,
|
||||
|
||||
// Returns true if the segment 1 intersectd the segment 2.
|
||||
bool SegmentIntersectsSegment( const wxPoint &a_p1_l1, const wxPoint &a_p2_l1,
|
||||
const wxPoint &a_p1_l2, const wxPoint &a_p2_l2 )
|
||||
const wxPoint &a_p1_l2, const wxPoint &a_p2_l2,
|
||||
wxPoint* aIntersectionPoint )
|
||||
{
|
||||
|
||||
//We are forced to use 64bit ints because the internal units can oveflow 32bit ints when
|
||||
@@ -87,10 +89,13 @@ bool SegmentIntersectsSegment( const wxPoint &a_p1_l1, const wxPoint &a_p2_l1,
|
||||
num_a = dY_ab * dX_b - dY_b * dX_ab;
|
||||
num_b = dY_ab * dX_a - dY_a * dX_ab;
|
||||
|
||||
//We wont calculate directly the u_k of the intersection point to avoid floating point
|
||||
// division but they could be calculated with:
|
||||
// u_a = (float) num_a / (float) den;
|
||||
// u_b = (float) num_b / (float) den;
|
||||
// Only compute the intersection point if requested
|
||||
if( aIntersectionPoint )
|
||||
{
|
||||
*aIntersectionPoint = a_p1_l1;
|
||||
aIntersectionPoint->x += KiROUND( dX_a * ( double )num_a / ( double )den );
|
||||
aIntersectionPoint->y += KiROUND( dY_a * ( double )num_b / ( double )den );
|
||||
}
|
||||
|
||||
if( den < 0 )
|
||||
{
|
||||
@@ -147,23 +152,8 @@ bool TestSegmentHit( const wxPoint &aRefPoint, wxPoint aStart, wxPoint aEnd, int
|
||||
if( aStart.y == aEnd.y && aRefPoint.x > xmin && aRefPoint.x < xmax )
|
||||
return std::abs( delta.y ) <= aDist;
|
||||
|
||||
wxPoint len = aEnd - aStart;
|
||||
// Precision note here:
|
||||
// These are 32-bit integers, so squaring requires 64 bits to represent
|
||||
// exactly. 64-bit Doubles have only 52 bits in the mantissa, so we start to lose
|
||||
// precision at 2^53, which corresponds to ~ ±1nm @ 9.5cm, 2nm at 90cm, etc...
|
||||
// Long doubles avoid this ambiguity as well as the more expensive denormal double calc
|
||||
// Long doubles usually (sometimes more if SIMD) have at least 64 bits in the mantissa
|
||||
long double length_square = (long double) len.x * len.x + (long double) len.y * len.y;
|
||||
long double cross = std::abs( (long double) len.x * delta.y - (long double) len.y * delta.x );
|
||||
long double dist_square = (long double) aDist * aDist;
|
||||
|
||||
// The perpendicular distance to a line is the vector magnitude of the line from
|
||||
// a test point to the test line. That is the 2d determinant. Because we handled
|
||||
// the zero length case above, so we are guaranteed a unique solution.
|
||||
|
||||
return ( ( length_square >= cross && dist_square >= cross ) ||
|
||||
( length_square * dist_square >= cross * cross ) );
|
||||
SEG segment( aStart, aEnd );
|
||||
return segment.PointCloserThan( aRefPoint, aDist + 1 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -347,27 +347,27 @@ bool OpenPDF( const wxString& file )
|
||||
wxString command;
|
||||
wxString filename = file;
|
||||
|
||||
// Quote in case there are spaces in the file name.
|
||||
AddDelimiterString( filename );
|
||||
|
||||
Pgm().ReadPdfBrowserInfos();
|
||||
|
||||
if( !Pgm().UseSystemPdfBrowser() ) // Run the preferred PDF Browser
|
||||
{
|
||||
command = Pgm().GetPdfBrowserName() + wxT( " " ) + filename;
|
||||
command = Pgm().GetPdfBrowserName() + wxT( " '" ) + filename + wxT( "'" );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( wxLaunchDefaultApplication( filename ) )
|
||||
return true;
|
||||
|
||||
#ifdef __WXMAC__
|
||||
command = wxT( "/usr/bin/open -a '" ) + filename + wxT( "'" );
|
||||
#endif
|
||||
// If launching the system default PDF viewer fails, fall through with empty command
|
||||
// string so the error message is displayed.
|
||||
}
|
||||
|
||||
if( !command.IsEmpty() )
|
||||
{
|
||||
if( ProcessExecute( command ) )
|
||||
if( ProcessExecute( command ) != -1 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ static inline size_t hash_board_item( const BOARD_ITEM* aItem, int aFlags )
|
||||
size_t ret = 0;
|
||||
|
||||
if( aFlags & LAYER )
|
||||
ret ^= hash<unsigned long long>{}( aItem->GetLayerSet().to_ullong() );
|
||||
ret = hash<unsigned long long>{}( aItem->GetLayerSet().to_ullong() );
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -55,57 +55,57 @@ size_t hash_eda( const EDA_ITEM* aItem, int aFlags )
|
||||
{
|
||||
const MODULE* module = static_cast<const MODULE*>( aItem );
|
||||
|
||||
ret ^= hash_board_item( module, aFlags );
|
||||
ret += hash_board_item( module, aFlags );
|
||||
|
||||
if( aFlags & POSITION )
|
||||
{
|
||||
ret ^= hash<int>{}( module->GetPosition().x );
|
||||
ret ^= hash<int>{}( module->GetPosition().y );
|
||||
ret += hash<int>{}( module->GetPosition().x );
|
||||
ret += hash<int>{}( module->GetPosition().y );
|
||||
}
|
||||
|
||||
if( aFlags & ROTATION )
|
||||
ret ^= hash<double>{}( module->GetOrientation() );
|
||||
ret += hash<double>{}( module->GetOrientation() );
|
||||
|
||||
for( const BOARD_ITEM* i = module->GraphicalItemsList(); i; i = i->Next() )
|
||||
ret ^= hash_eda( i, aFlags );
|
||||
ret += hash_eda( i, aFlags );
|
||||
|
||||
for( const D_PAD* i = module->PadsList(); i; i = i->Next() )
|
||||
ret ^= hash_eda( i, aFlags );
|
||||
ret += hash_eda( i, aFlags );
|
||||
}
|
||||
break;
|
||||
|
||||
case PCB_PAD_T:
|
||||
{
|
||||
const D_PAD* pad = static_cast<const D_PAD*>( aItem );
|
||||
ret ^= hash_board_item( pad, aFlags );
|
||||
ret ^= hash<int>{}( pad->GetShape() << 16 );
|
||||
ret ^= hash<int>{}( pad->GetDrillShape() << 18 );
|
||||
ret ^= hash<int>{}( pad->GetSize().x << 8 );
|
||||
ret ^= hash<int>{}( pad->GetSize().y << 9 );
|
||||
ret ^= hash<int>{}( pad->GetOffset().x << 6 );
|
||||
ret ^= hash<int>{}( pad->GetOffset().y << 7 );
|
||||
ret ^= hash<int>{}( pad->GetDelta().x << 4 );
|
||||
ret ^= hash<int>{}( pad->GetDelta().y << 5 );
|
||||
ret += hash_board_item( pad, aFlags );
|
||||
ret += hash<int>{}( pad->GetShape() << 16 );
|
||||
ret += hash<int>{}( pad->GetDrillShape() << 18 );
|
||||
ret += hash<int>{}( pad->GetSize().x << 8 );
|
||||
ret += hash<int>{}( pad->GetSize().y << 9 );
|
||||
ret += hash<int>{}( pad->GetOffset().x << 6 );
|
||||
ret += hash<int>{}( pad->GetOffset().y << 7 );
|
||||
ret += hash<int>{}( pad->GetDelta().x << 4 );
|
||||
ret += hash<int>{}( pad->GetDelta().y << 5 );
|
||||
|
||||
if( aFlags & POSITION )
|
||||
{
|
||||
if( aFlags & REL_COORD )
|
||||
{
|
||||
ret ^= hash<int>{}( pad->GetPos0().x );
|
||||
ret ^= hash<int>{}( pad->GetPos0().y );
|
||||
ret += hash<int>{}( pad->GetPos0().x );
|
||||
ret += hash<int>{}( pad->GetPos0().y );
|
||||
}
|
||||
else
|
||||
{
|
||||
ret ^= hash<int>{}( pad->GetPosition().x );
|
||||
ret ^= hash<int>{}( pad->GetPosition().y );
|
||||
ret += hash<int>{}( pad->GetPosition().x );
|
||||
ret += hash<int>{}( pad->GetPosition().y );
|
||||
}
|
||||
}
|
||||
|
||||
if( aFlags & ROTATION )
|
||||
ret ^= hash<double>{}( pad->GetOrientation() );
|
||||
ret += hash<double>{}( pad->GetOrientation() );
|
||||
|
||||
if( aFlags & NET )
|
||||
ret ^= hash<int>{}( pad->GetNetCode() << 6 );
|
||||
ret += hash<int>{}( pad->GetNetCode() << 6 );
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -119,64 +119,64 @@ size_t hash_eda( const EDA_ITEM* aItem, int aFlags )
|
||||
if( !( aFlags & VALUE ) && text->GetType() == TEXTE_MODULE::TEXT_is_VALUE )
|
||||
break;
|
||||
|
||||
ret ^= hash_board_item( text, aFlags );
|
||||
ret ^= hash<string>{}( text->GetText().ToStdString() );
|
||||
ret ^= hash<bool>{}( text->IsItalic() );
|
||||
ret ^= hash<bool>{}( text->IsBold() );
|
||||
ret ^= hash<bool>{}( text->IsMirrored() );
|
||||
ret ^= hash<int>{}( text->GetTextWidth() );
|
||||
ret ^= hash<int>{}( text->GetTextHeight() );
|
||||
ret ^= hash<int>{}( text->GetHorizJustify() );
|
||||
ret ^= hash<int>{}( text->GetVertJustify() );
|
||||
ret += hash_board_item( text, aFlags );
|
||||
ret += hash<string>{}( text->GetText().ToStdString() );
|
||||
ret += hash<bool>{}( text->IsItalic() );
|
||||
ret += hash<bool>{}( text->IsBold() );
|
||||
ret += hash<bool>{}( text->IsMirrored() );
|
||||
ret += hash<int>{}( text->GetTextWidth() );
|
||||
ret += hash<int>{}( text->GetTextHeight() );
|
||||
ret += hash<int>{}( text->GetHorizJustify() );
|
||||
ret += hash<int>{}( text->GetVertJustify() );
|
||||
|
||||
if( aFlags & POSITION )
|
||||
{
|
||||
if( aFlags & REL_COORD )
|
||||
{
|
||||
ret ^= hash<int>{}( text->GetPos0().x );
|
||||
ret ^= hash<int>{}( text->GetPos0().y );
|
||||
ret += hash<int>{}( text->GetPos0().x );
|
||||
ret += hash<int>{}( text->GetPos0().y );
|
||||
}
|
||||
else
|
||||
{
|
||||
ret ^= hash<int>{}( text->GetPosition().x );
|
||||
ret ^= hash<int>{}( text->GetPosition().y );
|
||||
ret += hash<int>{}( text->GetPosition().x );
|
||||
ret += hash<int>{}( text->GetPosition().y );
|
||||
}
|
||||
}
|
||||
|
||||
if( aFlags & ROTATION )
|
||||
ret ^= hash<double>{}( text->GetTextAngle() );
|
||||
ret += hash<double>{}( text->GetTextAngle() );
|
||||
}
|
||||
break;
|
||||
|
||||
case PCB_MODULE_EDGE_T:
|
||||
{
|
||||
const EDGE_MODULE* segment = static_cast<const EDGE_MODULE*>( aItem );
|
||||
ret ^= hash_board_item( segment, aFlags );
|
||||
ret ^= hash<int>{}( segment->GetType() );
|
||||
ret ^= hash<int>{}( segment->GetShape() );
|
||||
ret ^= hash<int>{}( segment->GetWidth() );
|
||||
ret ^= hash<int>{}( segment->GetRadius() );
|
||||
ret += hash_board_item( segment, aFlags );
|
||||
ret += hash<int>{}( segment->GetType() );
|
||||
ret += hash<int>{}( segment->GetShape() );
|
||||
ret += hash<int>{}( segment->GetWidth() );
|
||||
ret += hash<int>{}( segment->GetRadius() );
|
||||
|
||||
if( aFlags & POSITION )
|
||||
{
|
||||
if( aFlags & REL_COORD )
|
||||
{
|
||||
ret ^= hash<int>{}( segment->GetStart0().x );
|
||||
ret ^= hash<int>{}( segment->GetStart0().y );
|
||||
ret ^= hash<int>{}( segment->GetEnd0().x );
|
||||
ret ^= hash<int>{}( segment->GetEnd0().y );
|
||||
ret += hash<int>{}( segment->GetStart0().x );
|
||||
ret += hash<int>{}( segment->GetStart0().y );
|
||||
ret += hash<int>{}( segment->GetEnd0().x );
|
||||
ret += hash<int>{}( segment->GetEnd0().y );
|
||||
}
|
||||
else
|
||||
{
|
||||
ret ^= hash<int>{}( segment->GetStart().x );
|
||||
ret ^= hash<int>{}( segment->GetStart().y );
|
||||
ret ^= hash<int>{}( segment->GetEnd().x );
|
||||
ret ^= hash<int>{}( segment->GetEnd().y );
|
||||
ret += hash<int>{}( segment->GetStart().x );
|
||||
ret += hash<int>{}( segment->GetStart().y );
|
||||
ret += hash<int>{}( segment->GetEnd().x );
|
||||
ret += hash<int>{}( segment->GetEnd().y );
|
||||
}
|
||||
}
|
||||
|
||||
if( aFlags & ROTATION )
|
||||
ret ^= hash<double>{}( segment->GetAngle() );
|
||||
ret += hash<double>{}( segment->GetAngle() );
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -25,6 +25,9 @@
|
||||
|
||||
HOTKEY_STORE::HOTKEY_STORE( EDA_HOTKEY_CONFIG* aHotkeys )
|
||||
{
|
||||
m_isValid = false;
|
||||
m_invalidityCauses = _( "Hotkeys not checked" );
|
||||
|
||||
for( EDA_HOTKEY_CONFIG* section = aHotkeys; section->m_HK_InfoList; ++section )
|
||||
{
|
||||
m_hk_sections.push_back( genSection( *section ) );
|
||||
@@ -113,13 +116,13 @@ void HOTKEY_STORE::ResetAllHotkeysToOriginal()
|
||||
}
|
||||
|
||||
|
||||
bool HOTKEY_STORE::CheckKeyConflicts( long aKey, const wxString& aSectionTag,
|
||||
EDA_HOTKEY** aConfKey, EDA_HOTKEY_CONFIG** aConfSect )
|
||||
bool HOTKEY_STORE::CheckKeyConflicts( long aKey, const wxString& aSectionTag, EDA_HOTKEY** aConfKey,
|
||||
EDA_HOTKEY_CONFIG** aConfSect, const int aIdCommand )
|
||||
{
|
||||
EDA_HOTKEY* conflicting_key = nullptr;
|
||||
EDA_HOTKEY_CONFIG* conflicting_section = nullptr;
|
||||
|
||||
for( auto& section: m_hk_sections )
|
||||
for( auto& section : m_hk_sections )
|
||||
{
|
||||
const auto& sectionTag = *section.m_section.m_SectionTag;
|
||||
|
||||
@@ -135,7 +138,7 @@ bool HOTKEY_STORE::CheckKeyConflicts( long aKey, const wxString& aSectionTag,
|
||||
for( auto& hotkey: section.m_hotkeys )
|
||||
{
|
||||
auto& curr_hk = hotkey.GetCurrentValue();
|
||||
if( aKey == curr_hk.m_KeyCode )
|
||||
if( ( aKey == curr_hk.m_KeyCode ) && ( aIdCommand != curr_hk.m_Idcommand ) )
|
||||
{
|
||||
conflicting_key = &curr_hk;
|
||||
conflicting_section = §ion.m_section;
|
||||
@@ -151,4 +154,99 @@ bool HOTKEY_STORE::CheckKeyConflicts( long aKey, const wxString& aSectionTag,
|
||||
*aConfSect = conflicting_section;
|
||||
|
||||
return conflicting_key == nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool HOTKEY_STORE::CheckKeyValidity( long aKey, wxString& aMessage )
|
||||
{
|
||||
// Extract the modifiers and the keycode
|
||||
int modifiers = aKey & ( GR_KB_SHIFT | GR_KB_CTRL | GR_KB_ALT );
|
||||
int keycode = aKey & 0x00FFFFFF;
|
||||
|
||||
// Hotkeys may not contain the shift+SYMBOL sequence.
|
||||
// This sequence gets mapped to (UPPER SYMBOL) in the hotkey logic
|
||||
if( modifiers & GR_KB_SHIFT )
|
||||
{
|
||||
// These catch the ASCII codes for the special characters
|
||||
if( ( keycode <= 64 && keycode >= 32 ) ||
|
||||
( keycode <= 96 && keycode >= 91 ) ||
|
||||
( keycode <= 126 && keycode >= 123 ) )
|
||||
{
|
||||
aMessage = _( "A hotkey cannot contain the shift key and a symbol key." );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// This code block can be used to test the key validity checks
|
||||
#if 0
|
||||
if( modifiers & GR_KB_CTRL )
|
||||
{
|
||||
if( keycode == 'K' )
|
||||
{
|
||||
aMessage = "A hotkey cannot be ctrl+K";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool HOTKEY_STORE::TestStoreValidity()
|
||||
{
|
||||
m_isValid = true;
|
||||
m_invalidityCauses.Clear();
|
||||
|
||||
// Iterate over every key to test it
|
||||
for( HOTKEY_SECTION& section : m_hk_sections )
|
||||
{
|
||||
for( CHANGED_HOTKEY& hotkey : section.m_hotkeys )
|
||||
{
|
||||
EDA_HOTKEY& curr_hk = hotkey.GetCurrentValue();
|
||||
wxString validMessage;
|
||||
|
||||
bool isValid = CheckKeyValidity( curr_hk.m_KeyCode, validMessage );
|
||||
|
||||
// If the key isn't valid, set it and continue
|
||||
if( !isValid )
|
||||
{
|
||||
hotkey.SetValidity( false, validMessage );
|
||||
|
||||
m_invalidityCauses << wxGetTranslation( curr_hk.m_InfoMsg );
|
||||
m_invalidityCauses << ": " << validMessage << "\n";
|
||||
m_isValid = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Test for duplication
|
||||
const wxString& sectionTag = *section.m_section.m_SectionTag;
|
||||
EDA_HOTKEY* conflicting_key = nullptr;
|
||||
EDA_HOTKEY_CONFIG* conflicting_section = nullptr;
|
||||
|
||||
CheckKeyConflicts( curr_hk.m_KeyCode, sectionTag, &conflicting_key,
|
||||
&conflicting_section, curr_hk.m_Idcommand );
|
||||
|
||||
// Not valid if a conflicting key was found
|
||||
if( conflicting_key != nullptr )
|
||||
{
|
||||
wxString keyInfoMsg = wxGetTranslation( conflicting_key->m_InfoMsg );
|
||||
validMessage =
|
||||
wxString::Format( _( "Duplicate of hotkey for \"%s\"" ), keyInfoMsg );
|
||||
|
||||
hotkey.SetValidity( false, validMessage );
|
||||
|
||||
m_invalidityCauses << wxGetTranslation( curr_hk.m_InfoMsg );
|
||||
m_invalidityCauses << ": " << validMessage << "\n";
|
||||
m_isValid = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
// If it made it this far, it is a valid hotkey
|
||||
validMessage = _( "Hotkey is valid" );
|
||||
hotkey.SetValidity( true, validMessage );
|
||||
}
|
||||
}
|
||||
|
||||
return m_isValid;
|
||||
}
|
||||
|
||||
@@ -28,16 +28,20 @@
|
||||
#include <common.h>
|
||||
|
||||
|
||||
HTML_MESSAGE_BOX::HTML_MESSAGE_BOX( wxWindow* parent, const wxString& aTitle) :
|
||||
DIALOG_DISPLAY_HTML_TEXT_BASE( parent, wxID_ANY, aTitle )
|
||||
HTML_MESSAGE_BOX::HTML_MESSAGE_BOX( wxWindow* aParent, const wxString& aTitle,
|
||||
const wxPoint& aPosition, const wxSize& aSize ) :
|
||||
DIALOG_DISPLAY_HTML_TEXT_BASE( aParent, wxID_ANY, aTitle, aPosition, aSize )
|
||||
{
|
||||
m_htmlWindow->SetLayoutDirection( wxLayout_LeftToRight );
|
||||
ListClear();
|
||||
|
||||
// Gives a default logical size (the actual size depends on the display definition)
|
||||
SetSizeInDU( 320, 120 );
|
||||
if( aSize != wxDefaultSize )
|
||||
SetSizeInDU( aSize.x, aSize.y );
|
||||
|
||||
Center();
|
||||
|
||||
m_sdbSizer1OK->SetDefault();
|
||||
}
|
||||
|
||||
|
||||
@@ -49,12 +53,14 @@ HTML_MESSAGE_BOX::~HTML_MESSAGE_BOX()
|
||||
}
|
||||
|
||||
|
||||
void HTML_MESSAGE_BOX::OnCloseButtonClick( wxCommandEvent& event )
|
||||
void HTML_MESSAGE_BOX::OnOKButtonClick( wxCommandEvent& event )
|
||||
{
|
||||
// the dialog can be shown modal or not modal.
|
||||
// the dialog can be shown quasi-model, modal, or not modeless.
|
||||
// therefore, use the right way to close it.
|
||||
if( IsModal() )
|
||||
EndModal( 0 );
|
||||
if( IsQuasiModal() )
|
||||
EndQuasiModal( wxID_OK );
|
||||
else if( IsModal() )
|
||||
EndModal( wxID_OK );
|
||||
else
|
||||
Destroy();
|
||||
}
|
||||
|
||||
@@ -1,188 +0,0 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2015 Jean-Pierre Charras, jean-pierre.charras at wanadoo.fr
|
||||
* Copyright (C) 1992-2017 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, you may find one here:
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* or you may search the http://www.gnu.org website for the version 2 license,
|
||||
* or you may write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <incremental_text_ctrl.h>
|
||||
|
||||
#include <utility>
|
||||
|
||||
/**
|
||||
* Check that a string looks like a floating point number that can
|
||||
* be dealt with.
|
||||
*/
|
||||
static bool validateFloatField( const wxString& aStr )
|
||||
{
|
||||
// Skip empty fields
|
||||
if( aStr.size() == 0 )
|
||||
return false;
|
||||
|
||||
// a single . or , doesn't count as number, although valid in a float
|
||||
if( aStr.size() == 1 )
|
||||
{
|
||||
if( (aStr.compare( "." ) == 0) ||
|
||||
(aStr.compare( "," ) == 0) )
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
INCREMENTAL_TEXT_CTRL::INCREMENTAL_TEXT_CTRL() :
|
||||
m_minVal( 0.0 ),
|
||||
m_maxVal( 1.0 ),
|
||||
m_currentValue( 0.0 ),
|
||||
m_precision( 4 )
|
||||
{}
|
||||
|
||||
|
||||
void INCREMENTAL_TEXT_CTRL::SetStep( double aMin, double aMax,
|
||||
STEP_FUNCTION aStepFunc )
|
||||
{
|
||||
wxASSERT( aMin <= aMax );
|
||||
|
||||
m_minVal = std::min( aMin, aMax );
|
||||
m_maxVal = std::max( aMin, aMax );
|
||||
m_stepFunc = std::move( aStepFunc );
|
||||
|
||||
// finally, clamp the current value and re-display
|
||||
updateTextValue();
|
||||
}
|
||||
|
||||
|
||||
void INCREMENTAL_TEXT_CTRL::updateTextValue()
|
||||
{
|
||||
if( m_currentValue > m_maxVal )
|
||||
m_currentValue = m_maxVal;
|
||||
|
||||
if( m_currentValue < m_minVal )
|
||||
m_currentValue = m_minVal;
|
||||
|
||||
wxString fmt = wxString::Format( "%%.%df", m_precision );
|
||||
setTextCtrl( wxString::Format( fmt, m_currentValue ) );
|
||||
}
|
||||
|
||||
|
||||
void INCREMENTAL_TEXT_CTRL::incrementCtrlBy( double aInc )
|
||||
{
|
||||
const wxString txt = getCtrlText();
|
||||
if( !validateFloatField( txt ) )
|
||||
return;
|
||||
|
||||
txt.ToDouble( &m_currentValue );
|
||||
m_currentValue += aInc;
|
||||
|
||||
updateTextValue();
|
||||
}
|
||||
|
||||
|
||||
void INCREMENTAL_TEXT_CTRL::incrementCtrl( bool aUp )
|
||||
{
|
||||
incrementCtrlBy( m_stepFunc( aUp, m_currentValue ) );
|
||||
}
|
||||
|
||||
|
||||
void INCREMENTAL_TEXT_CTRL::SetPrecision( int aPrecision )
|
||||
{
|
||||
m_precision = aPrecision;
|
||||
}
|
||||
|
||||
|
||||
void INCREMENTAL_TEXT_CTRL::SetValue( double aValue )
|
||||
{
|
||||
m_currentValue = aValue;
|
||||
updateTextValue();
|
||||
}
|
||||
|
||||
|
||||
double INCREMENTAL_TEXT_CTRL::GetValue()
|
||||
{
|
||||
// sanitise before handing the value - if the user did something
|
||||
// like close a window with outstanding text changes, we need
|
||||
// to clamp the value and re-interpret the text
|
||||
incrementCtrlBy( 0.0 );
|
||||
|
||||
return m_currentValue;
|
||||
}
|
||||
|
||||
|
||||
SPIN_INCREMENTAL_TEXT_CTRL::SPIN_INCREMENTAL_TEXT_CTRL( wxSpinButton& aSpinBtn,
|
||||
wxTextCtrl& aTextCtrl ):
|
||||
m_spinBtn( aSpinBtn ),
|
||||
m_textCtrl( aTextCtrl )
|
||||
{
|
||||
(void) m_spinBtn;
|
||||
|
||||
// set always enabled, otherwise it's very hard to keep in sync
|
||||
aSpinBtn.SetRange( -INT_MAX, INT_MAX );
|
||||
|
||||
auto spinUpHandler = [this] ( wxSpinEvent& event )
|
||||
{
|
||||
incrementCtrl( true );
|
||||
};
|
||||
|
||||
// spin up/down if a single step of the field
|
||||
auto spinDownHandler = [this] ( wxSpinEvent& event )
|
||||
{
|
||||
incrementCtrl( false );
|
||||
};
|
||||
|
||||
auto mouseWheelHandler = [this] ( wxMouseEvent& aEvent )
|
||||
{
|
||||
incrementCtrl( aEvent.GetWheelRotation() >= 0 );
|
||||
};
|
||||
|
||||
aSpinBtn.Bind( wxEVT_SPIN_UP, spinUpHandler );
|
||||
aSpinBtn.Bind( wxEVT_SPIN_DOWN, spinDownHandler );
|
||||
|
||||
m_textCtrl.Bind( wxEVT_MOUSEWHEEL, mouseWheelHandler );
|
||||
|
||||
m_textCtrl.Bind( wxEVT_KILL_FOCUS, &SPIN_INCREMENTAL_TEXT_CTRL::onFocusLoss, this );
|
||||
}
|
||||
|
||||
SPIN_INCREMENTAL_TEXT_CTRL::~SPIN_INCREMENTAL_TEXT_CTRL()
|
||||
{
|
||||
// this must be unbound, as kill focus can arrive after the
|
||||
// text control is gone
|
||||
m_textCtrl.Unbind( wxEVT_KILL_FOCUS, &SPIN_INCREMENTAL_TEXT_CTRL::onFocusLoss, this );
|
||||
}
|
||||
|
||||
|
||||
void SPIN_INCREMENTAL_TEXT_CTRL::onFocusLoss( wxFocusEvent& aEvent )
|
||||
{
|
||||
// re-read the input and sanitize any user changes
|
||||
incrementCtrlBy( 0.0 );
|
||||
}
|
||||
|
||||
|
||||
void SPIN_INCREMENTAL_TEXT_CTRL::setTextCtrl( const wxString& val )
|
||||
{
|
||||
m_textCtrl.SetValue( val );
|
||||
}
|
||||
|
||||
|
||||
wxString SPIN_INCREMENTAL_TEXT_CTRL::getCtrlText() const
|
||||
{
|
||||
return m_textCtrl.GetValue();
|
||||
}
|
||||
|
||||
@@ -94,6 +94,7 @@ void KIWAY::SetTop( wxFrame* aTop )
|
||||
const wxString KIWAY::dso_search_path( FACE_T aFaceId )
|
||||
{
|
||||
const char* name;
|
||||
const char* dirName;
|
||||
|
||||
switch( aFaceId )
|
||||
{
|
||||
@@ -110,6 +111,13 @@ const wxString KIWAY::dso_search_path( FACE_T aFaceId )
|
||||
return wxEmptyString;
|
||||
}
|
||||
|
||||
// The subdirectories usually have the same name as the kiface
|
||||
switch( aFaceId )
|
||||
{
|
||||
case FACE_PL_EDITOR: dirName = "pagelayout_editor"; break;
|
||||
default: dirName = name + 1; break;
|
||||
}
|
||||
|
||||
#ifndef __WXMAC__
|
||||
wxString path;
|
||||
|
||||
@@ -131,6 +139,25 @@ const wxString KIWAY::dso_search_path( FACE_T aFaceId )
|
||||
|
||||
fn.SetName( name );
|
||||
|
||||
#ifdef DEBUG
|
||||
// To speed up development, it's sometimes nice to run kicad from inside
|
||||
// the build path. In that case, each program will be in a subdirectory.
|
||||
// To find the DSOs, we need to go up one directory and then enter a subdirectory.
|
||||
|
||||
if( wxGetEnv( wxT( "KICAD_RUN_FROM_BUILD_DIR" ), nullptr ) )
|
||||
{
|
||||
#ifdef __WXMAC__
|
||||
fn = wxStandardPaths::Get().GetExecutablePath();
|
||||
fn.RemoveLastDir();
|
||||
fn.AppendDir( wxT( "PlugIns" ) );
|
||||
fn.SetName( name );
|
||||
#else
|
||||
fn.RemoveLastDir();
|
||||
fn.AppendDir( dirName );
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
// Here a "suffix" == an extension with a preceding '.',
|
||||
// so skip the preceding '.' to get an extension
|
||||
fn.SetExt( KIFACE_SUFFIX + 1 ); // + 1 => &KIFACE_SUFFIX[1]
|
||||
|
||||