You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1034 lines
37 KiB

* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
6 years ago
Use legacy schematic plugin for loading schematics in all code paths. Use the legacy plugin schematic loader in the sheet edit and append schematic code paths. Check for fully qualified LIB_ID objects (must have library nickname) when loading existing schematics when edit sheets. Rewrite append schematic feature to handle import issues rather than change the name and file name of all of the sheets in the imported schematic. This includes the following: - Load the schematic into a temporary SCH_SHEET object. - Make sure the imported schematic does not cause any hierarchy recursion issues. - Verify the imported schematic uses fully qualified #LIB_ID objects (symbol library table). - Check to see if any symbol libraries need to be added to the current project's symbol library table. This includes: - Check if the symbol library already exists in the project or global symbol library table. - Convert symbol library URLS that use the ${KIPRJMOD} environment variable to absolute paths. ${KIPRJMOD} will not be the same for this project. - Check for duplicate symbol library nicknames and change the new symbol library nickname to prevent library name clashes. - Update all schematic symbol LIB_ID object library nicknames when the library nickname was changed to prevent clashes. - Check for duplicate sheet names which is illegal and automatically rename any duplicate sheets in the imported schematic. - Clear all of the annotation in the imported schematic to prevent clashes. - Append the objects from the temporary sheet to the current page. - Replace any duplicate time stamps. - Refresh the symbol library links. Add support code to SCH_SCREEN object to assist with schematic import. Doxygen comment cleaning. Fixes lp:1731760 https://bugs.launchpad.net/kicad/+bug/1731760
8 years ago
6 years ago
Use legacy schematic plugin for loading schematics in all code paths. Use the legacy plugin schematic loader in the sheet edit and append schematic code paths. Check for fully qualified LIB_ID objects (must have library nickname) when loading existing schematics when edit sheets. Rewrite append schematic feature to handle import issues rather than change the name and file name of all of the sheets in the imported schematic. This includes the following: - Load the schematic into a temporary SCH_SHEET object. - Make sure the imported schematic does not cause any hierarchy recursion issues. - Verify the imported schematic uses fully qualified #LIB_ID objects (symbol library table). - Check to see if any symbol libraries need to be added to the current project's symbol library table. This includes: - Check if the symbol library already exists in the project or global symbol library table. - Convert symbol library URLS that use the ${KIPRJMOD} environment variable to absolute paths. ${KIPRJMOD} will not be the same for this project. - Check for duplicate symbol library nicknames and change the new symbol library nickname to prevent library name clashes. - Update all schematic symbol LIB_ID object library nicknames when the library nickname was changed to prevent clashes. - Check for duplicate sheet names which is illegal and automatically rename any duplicate sheets in the imported schematic. - Clear all of the annotation in the imported schematic to prevent clashes. - Append the objects from the temporary sheet to the current page. - Replace any duplicate time stamps. - Refresh the symbol library links. Add support code to SCH_SCREEN object to assist with schematic import. Doxygen comment cleaning. Fixes lp:1731760 https://bugs.launchpad.net/kicad/+bug/1731760
8 years ago
Use legacy schematic plugin for loading schematics in all code paths. Use the legacy plugin schematic loader in the sheet edit and append schematic code paths. Check for fully qualified LIB_ID objects (must have library nickname) when loading existing schematics when edit sheets. Rewrite append schematic feature to handle import issues rather than change the name and file name of all of the sheets in the imported schematic. This includes the following: - Load the schematic into a temporary SCH_SHEET object. - Make sure the imported schematic does not cause any hierarchy recursion issues. - Verify the imported schematic uses fully qualified #LIB_ID objects (symbol library table). - Check to see if any symbol libraries need to be added to the current project's symbol library table. This includes: - Check if the symbol library already exists in the project or global symbol library table. - Convert symbol library URLS that use the ${KIPRJMOD} environment variable to absolute paths. ${KIPRJMOD} will not be the same for this project. - Check for duplicate symbol library nicknames and change the new symbol library nickname to prevent library name clashes. - Update all schematic symbol LIB_ID object library nicknames when the library nickname was changed to prevent clashes. - Check for duplicate sheet names which is illegal and automatically rename any duplicate sheets in the imported schematic. - Clear all of the annotation in the imported schematic to prevent clashes. - Append the objects from the temporary sheet to the current page. - Replace any duplicate time stamps. - Refresh the symbol library links. Add support code to SCH_SCREEN object to assist with schematic import. Doxygen comment cleaning. Fixes lp:1731760 https://bugs.launchpad.net/kicad/+bug/1731760
8 years ago
Use legacy schematic plugin for loading schematics in all code paths. Use the legacy plugin schematic loader in the sheet edit and append schematic code paths. Check for fully qualified LIB_ID objects (must have library nickname) when loading existing schematics when edit sheets. Rewrite append schematic feature to handle import issues rather than change the name and file name of all of the sheets in the imported schematic. This includes the following: - Load the schematic into a temporary SCH_SHEET object. - Make sure the imported schematic does not cause any hierarchy recursion issues. - Verify the imported schematic uses fully qualified #LIB_ID objects (symbol library table). - Check to see if any symbol libraries need to be added to the current project's symbol library table. This includes: - Check if the symbol library already exists in the project or global symbol library table. - Convert symbol library URLS that use the ${KIPRJMOD} environment variable to absolute paths. ${KIPRJMOD} will not be the same for this project. - Check for duplicate symbol library nicknames and change the new symbol library nickname to prevent library name clashes. - Update all schematic symbol LIB_ID object library nicknames when the library nickname was changed to prevent clashes. - Check for duplicate sheet names which is illegal and automatically rename any duplicate sheets in the imported schematic. - Clear all of the annotation in the imported schematic to prevent clashes. - Append the objects from the temporary sheet to the current page. - Replace any duplicate time stamps. - Refresh the symbol library links. Add support code to SCH_SCREEN object to assist with schematic import. Doxygen comment cleaning. Fixes lp:1731760 https://bugs.launchpad.net/kicad/+bug/1731760
8 years ago
Use legacy schematic plugin for loading schematics in all code paths. Use the legacy plugin schematic loader in the sheet edit and append schematic code paths. Check for fully qualified LIB_ID objects (must have library nickname) when loading existing schematics when edit sheets. Rewrite append schematic feature to handle import issues rather than change the name and file name of all of the sheets in the imported schematic. This includes the following: - Load the schematic into a temporary SCH_SHEET object. - Make sure the imported schematic does not cause any hierarchy recursion issues. - Verify the imported schematic uses fully qualified #LIB_ID objects (symbol library table). - Check to see if any symbol libraries need to be added to the current project's symbol library table. This includes: - Check if the symbol library already exists in the project or global symbol library table. - Convert symbol library URLS that use the ${KIPRJMOD} environment variable to absolute paths. ${KIPRJMOD} will not be the same for this project. - Check for duplicate symbol library nicknames and change the new symbol library nickname to prevent library name clashes. - Update all schematic symbol LIB_ID object library nicknames when the library nickname was changed to prevent clashes. - Check for duplicate sheet names which is illegal and automatically rename any duplicate sheets in the imported schematic. - Clear all of the annotation in the imported schematic to prevent clashes. - Append the objects from the temporary sheet to the current page. - Replace any duplicate time stamps. - Refresh the symbol library links. Add support code to SCH_SCREEN object to assist with schematic import. Doxygen comment cleaning. Fixes lp:1731760 https://bugs.launchpad.net/kicad/+bug/1731760
8 years ago
Use legacy schematic plugin for loading schematics in all code paths. Use the legacy plugin schematic loader in the sheet edit and append schematic code paths. Check for fully qualified LIB_ID objects (must have library nickname) when loading existing schematics when edit sheets. Rewrite append schematic feature to handle import issues rather than change the name and file name of all of the sheets in the imported schematic. This includes the following: - Load the schematic into a temporary SCH_SHEET object. - Make sure the imported schematic does not cause any hierarchy recursion issues. - Verify the imported schematic uses fully qualified #LIB_ID objects (symbol library table). - Check to see if any symbol libraries need to be added to the current project's symbol library table. This includes: - Check if the symbol library already exists in the project or global symbol library table. - Convert symbol library URLS that use the ${KIPRJMOD} environment variable to absolute paths. ${KIPRJMOD} will not be the same for this project. - Check for duplicate symbol library nicknames and change the new symbol library nickname to prevent library name clashes. - Update all schematic symbol LIB_ID object library nicknames when the library nickname was changed to prevent clashes. - Check for duplicate sheet names which is illegal and automatically rename any duplicate sheets in the imported schematic. - Clear all of the annotation in the imported schematic to prevent clashes. - Append the objects from the temporary sheet to the current page. - Replace any duplicate time stamps. - Refresh the symbol library links. Add support code to SCH_SCREEN object to assist with schematic import. Doxygen comment cleaning. Fixes lp:1731760 https://bugs.launchpad.net/kicad/+bug/1731760
8 years ago
Use legacy schematic plugin for loading schematics in all code paths. Use the legacy plugin schematic loader in the sheet edit and append schematic code paths. Check for fully qualified LIB_ID objects (must have library nickname) when loading existing schematics when edit sheets. Rewrite append schematic feature to handle import issues rather than change the name and file name of all of the sheets in the imported schematic. This includes the following: - Load the schematic into a temporary SCH_SHEET object. - Make sure the imported schematic does not cause any hierarchy recursion issues. - Verify the imported schematic uses fully qualified #LIB_ID objects (symbol library table). - Check to see if any symbol libraries need to be added to the current project's symbol library table. This includes: - Check if the symbol library already exists in the project or global symbol library table. - Convert symbol library URLS that use the ${KIPRJMOD} environment variable to absolute paths. ${KIPRJMOD} will not be the same for this project. - Check for duplicate symbol library nicknames and change the new symbol library nickname to prevent library name clashes. - Update all schematic symbol LIB_ID object library nicknames when the library nickname was changed to prevent clashes. - Check for duplicate sheet names which is illegal and automatically rename any duplicate sheets in the imported schematic. - Clear all of the annotation in the imported schematic to prevent clashes. - Append the objects from the temporary sheet to the current page. - Replace any duplicate time stamps. - Refresh the symbol library links. Add support code to SCH_SCREEN object to assist with schematic import. Doxygen comment cleaning. Fixes lp:1731760 https://bugs.launchpad.net/kicad/+bug/1731760
8 years ago
Use legacy schematic plugin for loading schematics in all code paths. Use the legacy plugin schematic loader in the sheet edit and append schematic code paths. Check for fully qualified LIB_ID objects (must have library nickname) when loading existing schematics when edit sheets. Rewrite append schematic feature to handle import issues rather than change the name and file name of all of the sheets in the imported schematic. This includes the following: - Load the schematic into a temporary SCH_SHEET object. - Make sure the imported schematic does not cause any hierarchy recursion issues. - Verify the imported schematic uses fully qualified #LIB_ID objects (symbol library table). - Check to see if any symbol libraries need to be added to the current project's symbol library table. This includes: - Check if the symbol library already exists in the project or global symbol library table. - Convert symbol library URLS that use the ${KIPRJMOD} environment variable to absolute paths. ${KIPRJMOD} will not be the same for this project. - Check for duplicate symbol library nicknames and change the new symbol library nickname to prevent library name clashes. - Update all schematic symbol LIB_ID object library nicknames when the library nickname was changed to prevent clashes. - Check for duplicate sheet names which is illegal and automatically rename any duplicate sheets in the imported schematic. - Clear all of the annotation in the imported schematic to prevent clashes. - Append the objects from the temporary sheet to the current page. - Replace any duplicate time stamps. - Refresh the symbol library links. Add support code to SCH_SCREEN object to assist with schematic import. Doxygen comment cleaning. Fixes lp:1731760 https://bugs.launchpad.net/kicad/+bug/1731760
8 years ago
Use legacy schematic plugin for loading schematics in all code paths. Use the legacy plugin schematic loader in the sheet edit and append schematic code paths. Check for fully qualified LIB_ID objects (must have library nickname) when loading existing schematics when edit sheets. Rewrite append schematic feature to handle import issues rather than change the name and file name of all of the sheets in the imported schematic. This includes the following: - Load the schematic into a temporary SCH_SHEET object. - Make sure the imported schematic does not cause any hierarchy recursion issues. - Verify the imported schematic uses fully qualified #LIB_ID objects (symbol library table). - Check to see if any symbol libraries need to be added to the current project's symbol library table. This includes: - Check if the symbol library already exists in the project or global symbol library table. - Convert symbol library URLS that use the ${KIPRJMOD} environment variable to absolute paths. ${KIPRJMOD} will not be the same for this project. - Check for duplicate symbol library nicknames and change the new symbol library nickname to prevent library name clashes. - Update all schematic symbol LIB_ID object library nicknames when the library nickname was changed to prevent clashes. - Check for duplicate sheet names which is illegal and automatically rename any duplicate sheets in the imported schematic. - Clear all of the annotation in the imported schematic to prevent clashes. - Append the objects from the temporary sheet to the current page. - Replace any duplicate time stamps. - Refresh the symbol library links. Add support code to SCH_SCREEN object to assist with schematic import. Doxygen comment cleaning. Fixes lp:1731760 https://bugs.launchpad.net/kicad/+bug/1731760
8 years ago
Use legacy schematic plugin for loading schematics in all code paths. Use the legacy plugin schematic loader in the sheet edit and append schematic code paths. Check for fully qualified LIB_ID objects (must have library nickname) when loading existing schematics when edit sheets. Rewrite append schematic feature to handle import issues rather than change the name and file name of all of the sheets in the imported schematic. This includes the following: - Load the schematic into a temporary SCH_SHEET object. - Make sure the imported schematic does not cause any hierarchy recursion issues. - Verify the imported schematic uses fully qualified #LIB_ID objects (symbol library table). - Check to see if any symbol libraries need to be added to the current project's symbol library table. This includes: - Check if the symbol library already exists in the project or global symbol library table. - Convert symbol library URLS that use the ${KIPRJMOD} environment variable to absolute paths. ${KIPRJMOD} will not be the same for this project. - Check for duplicate symbol library nicknames and change the new symbol library nickname to prevent library name clashes. - Update all schematic symbol LIB_ID object library nicknames when the library nickname was changed to prevent clashes. - Check for duplicate sheet names which is illegal and automatically rename any duplicate sheets in the imported schematic. - Clear all of the annotation in the imported schematic to prevent clashes. - Append the objects from the temporary sheet to the current page. - Replace any duplicate time stamps. - Refresh the symbol library links. Add support code to SCH_SCREEN object to assist with schematic import. Doxygen comment cleaning. Fixes lp:1731760 https://bugs.launchpad.net/kicad/+bug/1731760
8 years ago
Use legacy schematic plugin for loading schematics in all code paths. Use the legacy plugin schematic loader in the sheet edit and append schematic code paths. Check for fully qualified LIB_ID objects (must have library nickname) when loading existing schematics when edit sheets. Rewrite append schematic feature to handle import issues rather than change the name and file name of all of the sheets in the imported schematic. This includes the following: - Load the schematic into a temporary SCH_SHEET object. - Make sure the imported schematic does not cause any hierarchy recursion issues. - Verify the imported schematic uses fully qualified #LIB_ID objects (symbol library table). - Check to see if any symbol libraries need to be added to the current project's symbol library table. This includes: - Check if the symbol library already exists in the project or global symbol library table. - Convert symbol library URLS that use the ${KIPRJMOD} environment variable to absolute paths. ${KIPRJMOD} will not be the same for this project. - Check for duplicate symbol library nicknames and change the new symbol library nickname to prevent library name clashes. - Update all schematic symbol LIB_ID object library nicknames when the library nickname was changed to prevent clashes. - Check for duplicate sheet names which is illegal and automatically rename any duplicate sheets in the imported schematic. - Clear all of the annotation in the imported schematic to prevent clashes. - Append the objects from the temporary sheet to the current page. - Replace any duplicate time stamps. - Refresh the symbol library links. Add support code to SCH_SCREEN object to assist with schematic import. Doxygen comment cleaning. Fixes lp:1731760 https://bugs.launchpad.net/kicad/+bug/1731760
8 years ago
Use legacy schematic plugin for loading schematics in all code paths. Use the legacy plugin schematic loader in the sheet edit and append schematic code paths. Check for fully qualified LIB_ID objects (must have library nickname) when loading existing schematics when edit sheets. Rewrite append schematic feature to handle import issues rather than change the name and file name of all of the sheets in the imported schematic. This includes the following: - Load the schematic into a temporary SCH_SHEET object. - Make sure the imported schematic does not cause any hierarchy recursion issues. - Verify the imported schematic uses fully qualified #LIB_ID objects (symbol library table). - Check to see if any symbol libraries need to be added to the current project's symbol library table. This includes: - Check if the symbol library already exists in the project or global symbol library table. - Convert symbol library URLS that use the ${KIPRJMOD} environment variable to absolute paths. ${KIPRJMOD} will not be the same for this project. - Check for duplicate symbol library nicknames and change the new symbol library nickname to prevent library name clashes. - Update all schematic symbol LIB_ID object library nicknames when the library nickname was changed to prevent clashes. - Check for duplicate sheet names which is illegal and automatically rename any duplicate sheets in the imported schematic. - Clear all of the annotation in the imported schematic to prevent clashes. - Append the objects from the temporary sheet to the current page. - Replace any duplicate time stamps. - Refresh the symbol library links. Add support code to SCH_SCREEN object to assist with schematic import. Doxygen comment cleaning. Fixes lp:1731760 https://bugs.launchpad.net/kicad/+bug/1731760
8 years ago
6 years ago
6 years ago
Use legacy schematic plugin for loading schematics in all code paths. Use the legacy plugin schematic loader in the sheet edit and append schematic code paths. Check for fully qualified LIB_ID objects (must have library nickname) when loading existing schematics when edit sheets. Rewrite append schematic feature to handle import issues rather than change the name and file name of all of the sheets in the imported schematic. This includes the following: - Load the schematic into a temporary SCH_SHEET object. - Make sure the imported schematic does not cause any hierarchy recursion issues. - Verify the imported schematic uses fully qualified #LIB_ID objects (symbol library table). - Check to see if any symbol libraries need to be added to the current project's symbol library table. This includes: - Check if the symbol library already exists in the project or global symbol library table. - Convert symbol library URLS that use the ${KIPRJMOD} environment variable to absolute paths. ${KIPRJMOD} will not be the same for this project. - Check for duplicate symbol library nicknames and change the new symbol library nickname to prevent library name clashes. - Update all schematic symbol LIB_ID object library nicknames when the library nickname was changed to prevent clashes. - Check for duplicate sheet names which is illegal and automatically rename any duplicate sheets in the imported schematic. - Clear all of the annotation in the imported schematic to prevent clashes. - Append the objects from the temporary sheet to the current page. - Replace any duplicate time stamps. - Refresh the symbol library links. Add support code to SCH_SCREEN object to assist with schematic import. Doxygen comment cleaning. Fixes lp:1731760 https://bugs.launchpad.net/kicad/+bug/1731760
8 years ago
Use legacy schematic plugin for loading schematics in all code paths. Use the legacy plugin schematic loader in the sheet edit and append schematic code paths. Check for fully qualified LIB_ID objects (must have library nickname) when loading existing schematics when edit sheets. Rewrite append schematic feature to handle import issues rather than change the name and file name of all of the sheets in the imported schematic. This includes the following: - Load the schematic into a temporary SCH_SHEET object. - Make sure the imported schematic does not cause any hierarchy recursion issues. - Verify the imported schematic uses fully qualified #LIB_ID objects (symbol library table). - Check to see if any symbol libraries need to be added to the current project's symbol library table. This includes: - Check if the symbol library already exists in the project or global symbol library table. - Convert symbol library URLS that use the ${KIPRJMOD} environment variable to absolute paths. ${KIPRJMOD} will not be the same for this project. - Check for duplicate symbol library nicknames and change the new symbol library nickname to prevent library name clashes. - Update all schematic symbol LIB_ID object library nicknames when the library nickname was changed to prevent clashes. - Check for duplicate sheet names which is illegal and automatically rename any duplicate sheets in the imported schematic. - Clear all of the annotation in the imported schematic to prevent clashes. - Append the objects from the temporary sheet to the current page. - Replace any duplicate time stamps. - Refresh the symbol library links. Add support code to SCH_SCREEN object to assist with schematic import. Doxygen comment cleaning. Fixes lp:1731760 https://bugs.launchpad.net/kicad/+bug/1731760
8 years ago
Use legacy schematic plugin for loading schematics in all code paths. Use the legacy plugin schematic loader in the sheet edit and append schematic code paths. Check for fully qualified LIB_ID objects (must have library nickname) when loading existing schematics when edit sheets. Rewrite append schematic feature to handle import issues rather than change the name and file name of all of the sheets in the imported schematic. This includes the following: - Load the schematic into a temporary SCH_SHEET object. - Make sure the imported schematic does not cause any hierarchy recursion issues. - Verify the imported schematic uses fully qualified #LIB_ID objects (symbol library table). - Check to see if any symbol libraries need to be added to the current project's symbol library table. This includes: - Check if the symbol library already exists in the project or global symbol library table. - Convert symbol library URLS that use the ${KIPRJMOD} environment variable to absolute paths. ${KIPRJMOD} will not be the same for this project. - Check for duplicate symbol library nicknames and change the new symbol library nickname to prevent library name clashes. - Update all schematic symbol LIB_ID object library nicknames when the library nickname was changed to prevent clashes. - Check for duplicate sheet names which is illegal and automatically rename any duplicate sheets in the imported schematic. - Clear all of the annotation in the imported schematic to prevent clashes. - Append the objects from the temporary sheet to the current page. - Replace any duplicate time stamps. - Refresh the symbol library links. Add support code to SCH_SCREEN object to assist with schematic import. Doxygen comment cleaning. Fixes lp:1731760 https://bugs.launchpad.net/kicad/+bug/1731760
8 years ago
Use legacy schematic plugin for loading schematics in all code paths. Use the legacy plugin schematic loader in the sheet edit and append schematic code paths. Check for fully qualified LIB_ID objects (must have library nickname) when loading existing schematics when edit sheets. Rewrite append schematic feature to handle import issues rather than change the name and file name of all of the sheets in the imported schematic. This includes the following: - Load the schematic into a temporary SCH_SHEET object. - Make sure the imported schematic does not cause any hierarchy recursion issues. - Verify the imported schematic uses fully qualified #LIB_ID objects (symbol library table). - Check to see if any symbol libraries need to be added to the current project's symbol library table. This includes: - Check if the symbol library already exists in the project or global symbol library table. - Convert symbol library URLS that use the ${KIPRJMOD} environment variable to absolute paths. ${KIPRJMOD} will not be the same for this project. - Check for duplicate symbol library nicknames and change the new symbol library nickname to prevent library name clashes. - Update all schematic symbol LIB_ID object library nicknames when the library nickname was changed to prevent clashes. - Check for duplicate sheet names which is illegal and automatically rename any duplicate sheets in the imported schematic. - Clear all of the annotation in the imported schematic to prevent clashes. - Append the objects from the temporary sheet to the current page. - Replace any duplicate time stamps. - Refresh the symbol library links. Add support code to SCH_SCREEN object to assist with schematic import. Doxygen comment cleaning. Fixes lp:1731760 https://bugs.launchpad.net/kicad/+bug/1731760
8 years ago
Use legacy schematic plugin for loading schematics in all code paths. Use the legacy plugin schematic loader in the sheet edit and append schematic code paths. Check for fully qualified LIB_ID objects (must have library nickname) when loading existing schematics when edit sheets. Rewrite append schematic feature to handle import issues rather than change the name and file name of all of the sheets in the imported schematic. This includes the following: - Load the schematic into a temporary SCH_SHEET object. - Make sure the imported schematic does not cause any hierarchy recursion issues. - Verify the imported schematic uses fully qualified #LIB_ID objects (symbol library table). - Check to see if any symbol libraries need to be added to the current project's symbol library table. This includes: - Check if the symbol library already exists in the project or global symbol library table. - Convert symbol library URLS that use the ${KIPRJMOD} environment variable to absolute paths. ${KIPRJMOD} will not be the same for this project. - Check for duplicate symbol library nicknames and change the new symbol library nickname to prevent library name clashes. - Update all schematic symbol LIB_ID object library nicknames when the library nickname was changed to prevent clashes. - Check for duplicate sheet names which is illegal and automatically rename any duplicate sheets in the imported schematic. - Clear all of the annotation in the imported schematic to prevent clashes. - Append the objects from the temporary sheet to the current page. - Replace any duplicate time stamps. - Refresh the symbol library links. Add support code to SCH_SCREEN object to assist with schematic import. Doxygen comment cleaning. Fixes lp:1731760 https://bugs.launchpad.net/kicad/+bug/1731760
8 years ago
Use legacy schematic plugin for loading schematics in all code paths. Use the legacy plugin schematic loader in the sheet edit and append schematic code paths. Check for fully qualified LIB_ID objects (must have library nickname) when loading existing schematics when edit sheets. Rewrite append schematic feature to handle import issues rather than change the name and file name of all of the sheets in the imported schematic. This includes the following: - Load the schematic into a temporary SCH_SHEET object. - Make sure the imported schematic does not cause any hierarchy recursion issues. - Verify the imported schematic uses fully qualified #LIB_ID objects (symbol library table). - Check to see if any symbol libraries need to be added to the current project's symbol library table. This includes: - Check if the symbol library already exists in the project or global symbol library table. - Convert symbol library URLS that use the ${KIPRJMOD} environment variable to absolute paths. ${KIPRJMOD} will not be the same for this project. - Check for duplicate symbol library nicknames and change the new symbol library nickname to prevent library name clashes. - Update all schematic symbol LIB_ID object library nicknames when the library nickname was changed to prevent clashes. - Check for duplicate sheet names which is illegal and automatically rename any duplicate sheets in the imported schematic. - Clear all of the annotation in the imported schematic to prevent clashes. - Append the objects from the temporary sheet to the current page. - Replace any duplicate time stamps. - Refresh the symbol library links. Add support code to SCH_SCREEN object to assist with schematic import. Doxygen comment cleaning. Fixes lp:1731760 https://bugs.launchpad.net/kicad/+bug/1731760
8 years ago
Use legacy schematic plugin for loading schematics in all code paths. Use the legacy plugin schematic loader in the sheet edit and append schematic code paths. Check for fully qualified LIB_ID objects (must have library nickname) when loading existing schematics when edit sheets. Rewrite append schematic feature to handle import issues rather than change the name and file name of all of the sheets in the imported schematic. This includes the following: - Load the schematic into a temporary SCH_SHEET object. - Make sure the imported schematic does not cause any hierarchy recursion issues. - Verify the imported schematic uses fully qualified #LIB_ID objects (symbol library table). - Check to see if any symbol libraries need to be added to the current project's symbol library table. This includes: - Check if the symbol library already exists in the project or global symbol library table. - Convert symbol library URLS that use the ${KIPRJMOD} environment variable to absolute paths. ${KIPRJMOD} will not be the same for this project. - Check for duplicate symbol library nicknames and change the new symbol library nickname to prevent library name clashes. - Update all schematic symbol LIB_ID object library nicknames when the library nickname was changed to prevent clashes. - Check for duplicate sheet names which is illegal and automatically rename any duplicate sheets in the imported schematic. - Clear all of the annotation in the imported schematic to prevent clashes. - Append the objects from the temporary sheet to the current page. - Replace any duplicate time stamps. - Refresh the symbol library links. Add support code to SCH_SCREEN object to assist with schematic import. Doxygen comment cleaning. Fixes lp:1731760 https://bugs.launchpad.net/kicad/+bug/1731760
8 years ago
Use legacy schematic plugin for loading schematics in all code paths. Use the legacy plugin schematic loader in the sheet edit and append schematic code paths. Check for fully qualified LIB_ID objects (must have library nickname) when loading existing schematics when edit sheets. Rewrite append schematic feature to handle import issues rather than change the name and file name of all of the sheets in the imported schematic. This includes the following: - Load the schematic into a temporary SCH_SHEET object. - Make sure the imported schematic does not cause any hierarchy recursion issues. - Verify the imported schematic uses fully qualified #LIB_ID objects (symbol library table). - Check to see if any symbol libraries need to be added to the current project's symbol library table. This includes: - Check if the symbol library already exists in the project or global symbol library table. - Convert symbol library URLS that use the ${KIPRJMOD} environment variable to absolute paths. ${KIPRJMOD} will not be the same for this project. - Check for duplicate symbol library nicknames and change the new symbol library nickname to prevent library name clashes. - Update all schematic symbol LIB_ID object library nicknames when the library nickname was changed to prevent clashes. - Check for duplicate sheet names which is illegal and automatically rename any duplicate sheets in the imported schematic. - Clear all of the annotation in the imported schematic to prevent clashes. - Append the objects from the temporary sheet to the current page. - Replace any duplicate time stamps. - Refresh the symbol library links. Add support code to SCH_SCREEN object to assist with schematic import. Doxygen comment cleaning. Fixes lp:1731760 https://bugs.launchpad.net/kicad/+bug/1731760
8 years ago
Use legacy schematic plugin for loading schematics in all code paths. Use the legacy plugin schematic loader in the sheet edit and append schematic code paths. Check for fully qualified LIB_ID objects (must have library nickname) when loading existing schematics when edit sheets. Rewrite append schematic feature to handle import issues rather than change the name and file name of all of the sheets in the imported schematic. This includes the following: - Load the schematic into a temporary SCH_SHEET object. - Make sure the imported schematic does not cause any hierarchy recursion issues. - Verify the imported schematic uses fully qualified #LIB_ID objects (symbol library table). - Check to see if any symbol libraries need to be added to the current project's symbol library table. This includes: - Check if the symbol library already exists in the project or global symbol library table. - Convert symbol library URLS that use the ${KIPRJMOD} environment variable to absolute paths. ${KIPRJMOD} will not be the same for this project. - Check for duplicate symbol library nicknames and change the new symbol library nickname to prevent library name clashes. - Update all schematic symbol LIB_ID object library nicknames when the library nickname was changed to prevent clashes. - Check for duplicate sheet names which is illegal and automatically rename any duplicate sheets in the imported schematic. - Clear all of the annotation in the imported schematic to prevent clashes. - Append the objects from the temporary sheet to the current page. - Replace any duplicate time stamps. - Refresh the symbol library links. Add support code to SCH_SCREEN object to assist with schematic import. Doxygen comment cleaning. Fixes lp:1731760 https://bugs.launchpad.net/kicad/+bug/1731760
8 years ago
Use legacy schematic plugin for loading schematics in all code paths. Use the legacy plugin schematic loader in the sheet edit and append schematic code paths. Check for fully qualified LIB_ID objects (must have library nickname) when loading existing schematics when edit sheets. Rewrite append schematic feature to handle import issues rather than change the name and file name of all of the sheets in the imported schematic. This includes the following: - Load the schematic into a temporary SCH_SHEET object. - Make sure the imported schematic does not cause any hierarchy recursion issues. - Verify the imported schematic uses fully qualified #LIB_ID objects (symbol library table). - Check to see if any symbol libraries need to be added to the current project's symbol library table. This includes: - Check if the symbol library already exists in the project or global symbol library table. - Convert symbol library URLS that use the ${KIPRJMOD} environment variable to absolute paths. ${KIPRJMOD} will not be the same for this project. - Check for duplicate symbol library nicknames and change the new symbol library nickname to prevent library name clashes. - Update all schematic symbol LIB_ID object library nicknames when the library nickname was changed to prevent clashes. - Check for duplicate sheet names which is illegal and automatically rename any duplicate sheets in the imported schematic. - Clear all of the annotation in the imported schematic to prevent clashes. - Append the objects from the temporary sheet to the current page. - Replace any duplicate time stamps. - Refresh the symbol library links. Add support code to SCH_SCREEN object to assist with schematic import. Doxygen comment cleaning. Fixes lp:1731760 https://bugs.launchpad.net/kicad/+bug/1731760
8 years ago
  1. /*
  2. * This program source code file is part of KiCad, a free EDA CAD application.
  3. *
  4. * Copyright (C) 2015 Jean-Pierre Charras, jp.charras wanadoo.fr
  5. * Copyright (C) 2008 Wayne Stambaugh <stambaughw@gmail.com>
  6. * Copyright (C) 2023 CERN (www.cern.ch)
  7. * Copyright (C) 2004-2024 KiCad Developers, see AUTHORS.txt for contributors.
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License
  11. * as published by the Free Software Foundation; either version 2
  12. * of the License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, you may find one here:
  21. * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  22. * or you may search the http://www.gnu.org website for the version 2 license,
  23. * or you may write to the Free Software Foundation, Inc.,
  24. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  25. */
  26. #ifndef SCH_EDIT_FRAME_H
  27. #define SCH_EDIT_FRAME_H
  28. #include <stddef.h>
  29. #include <vector>
  30. #include <wx/cmndata.h>
  31. #include <wx/event.h>
  32. #include <wx/gdicmn.h>
  33. #include <wx/string.h>
  34. #include <wx/treectrl.h>
  35. #include <wx/utils.h>
  36. #include <core/typeinfo.h>
  37. #include <eda_base_frame.h>
  38. #include <eeschema_settings.h>
  39. #include <math/box2.h>
  40. #include <sch_base_frame.h>
  41. #include <template_fieldnames.h>
  42. class SCH_ITEM;
  43. class EDA_ITEM;
  44. class SCH_LINE;
  45. class SCH_TEXT;
  46. class SCH_BITMAP;
  47. class SCH_SHEET;
  48. class SCH_SHEET_PATH;
  49. class SCH_SHEET_PIN;
  50. class SCH_SYMBOL;
  51. class SCH_FIELD;
  52. class SCH_JUNCTION;
  53. class SCHEMATIC;
  54. class SCH_COMMIT;
  55. class DIALOG_BOOK_REPORTER;
  56. class DIALOG_ERC;
  57. class DIALOG_SYMBOL_FIELDS_TABLE;
  58. class DIALOG_SCH_FIND;
  59. class RESCUER;
  60. class HIERARCHY_PANE;
  61. class API_HANDLER_SCH;
  62. /// Schematic search type used by the socket link with Pcbnew
  63. enum SCH_SEARCH_T
  64. {
  65. HIGHLIGHT_PIN,
  66. HIGHLIGHT_SYMBOL
  67. };
  68. enum SCH_CLEANUP_FLAGS
  69. {
  70. NO_CLEANUP,
  71. LOCAL_CLEANUP,
  72. GLOBAL_CLEANUP
  73. };
  74. wxDECLARE_EVENT( EDA_EVT_SCHEMATIC_CHANGING, wxCommandEvent );
  75. wxDECLARE_EVENT( EDA_EVT_SCHEMATIC_CHANGED, wxCommandEvent );
  76. /**
  77. * Tree view item data for the net navigator.
  78. */
  79. class NET_NAVIGATOR_ITEM_DATA : public wxTreeItemData
  80. {
  81. public:
  82. NET_NAVIGATOR_ITEM_DATA( const SCH_SHEET_PATH& aSheetPath, const SCH_ITEM* aItem ) :
  83. m_sheetPath( aSheetPath ),
  84. m_item( aItem )
  85. {
  86. }
  87. NET_NAVIGATOR_ITEM_DATA() :
  88. m_item( nullptr )
  89. {
  90. }
  91. SCH_SHEET_PATH& GetSheetPath() { return m_sheetPath; }
  92. const SCH_ITEM* GetItem() const { return m_item; }
  93. bool operator==( const NET_NAVIGATOR_ITEM_DATA& aRhs ) const
  94. {
  95. return ( m_sheetPath == aRhs.m_sheetPath ) && ( m_item == aRhs.m_item );
  96. }
  97. NET_NAVIGATOR_ITEM_DATA& operator=( const NET_NAVIGATOR_ITEM_DATA& aItemData )
  98. {
  99. if( this == &aItemData )
  100. return *this;
  101. m_sheetPath = aItemData.m_sheetPath;
  102. m_item = aItemData.m_item;
  103. return *this;
  104. }
  105. private:
  106. SCH_SHEET_PATH m_sheetPath;
  107. const SCH_ITEM* m_item;
  108. };
  109. /**
  110. * Schematic editor (Eeschema) main window.
  111. */
  112. class SCH_EDIT_FRAME : public SCH_BASE_FRAME
  113. {
  114. public:
  115. SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent );
  116. ~SCH_EDIT_FRAME() override;
  117. SCH_SCREEN* GetScreen() const override;
  118. SELECTION& GetCurrentSelection() override;
  119. SCHEMATIC& Schematic() const;
  120. /**
  121. * Allow edit frame to show/hide hidden pins.
  122. */
  123. bool GetShowAllPins() const override;
  124. /**
  125. * Save changes to the project settings to the project (.pro) file.
  126. */
  127. void SaveProjectLocalSettings() override;
  128. /**
  129. * Load the KiCad project file (*.pro) settings specific to Eeschema.
  130. *
  131. * @return True if the project file was loaded correctly.
  132. */
  133. bool LoadProjectSettings();
  134. void ShowSchematicSetupDialog( const wxString& aInitialPage = wxEmptyString );
  135. void LoadSettings( APP_SETTINGS_BASE* aCfg ) override;
  136. void SaveSettings( APP_SETTINGS_BASE* aCfg ) override;
  137. void CreateScreens();
  138. void ReCreateHToolbar() override;
  139. void ReCreateVToolbar() override;
  140. void ReCreateOptToolbar() override;
  141. void setupUIConditions() override;
  142. /**
  143. * Get if the current schematic has been modified but not saved.
  144. *
  145. * @return true if the any changes have not been saved
  146. */
  147. bool IsContentModified() const override;
  148. /**
  149. * Must be called after a schematic change in order to set the "modify" flag and update other
  150. * data structures and GUI elements.
  151. */
  152. void OnModify() override;
  153. SEVERITY GetSeverity( int aErrorCode ) const override;
  154. /**
  155. * Return a human-readable description of the current screen.
  156. */
  157. wxString GetScreenDesc() const override;
  158. wxString GetFullScreenDesc() const override;
  159. /**
  160. * Execute a remote command sent via a socket on port KICAD_SCH_PORT_SERVICE_NUMBER (which
  161. * defaults to 4243).
  162. *
  163. * When user selects a footprint or pin in Pcbnew, Eeschema shows that same symbol or pin
  164. * and moves cursor on the item.
  165. *
  166. * Valid commands are:
  167. * \li \c \$PART: \c "reference" Put cursor on symbol.
  168. * \li \c \$PART: \c "reference" \c \$REF: \c "ref" Put cursor on symbol reference.
  169. * \li \c \$PART: \c "reference" \c \$VAL: \c "value" Put cursor on symbol value.
  170. * \li \c \$PART: \c "reference" \c \$PAD: \c "pin name" Put cursor on the symbol pin.
  171. * \li \c \$NET: \c "netname" Highlight a specified net
  172. * \li \c \$CLEAR: \c "HIGHLIGHTED" Clear symbols highlight
  173. * <p>
  174. * They are a keyword followed by a quoted string.
  175. * @param cmdline is the command received from Pcbnew.
  176. */
  177. void ExecuteRemoteCommand( const char* cmdline ) override;
  178. void KiwayMailIn( KIWAY_EXPRESS& aEvent ) override;
  179. /**
  180. * Refresh the display of any operaintg points. Called after a .op simulation completes.
  181. */
  182. void RefreshOperatingPointDisplay();
  183. /**
  184. * Automatically set the rotation of an item (if the item supports it)
  185. */
  186. void AutoRotateItem( SCH_SCREEN* aScreen, SCH_ITEM* aItem );
  187. /**
  188. * Run the Find or Find & Replace dialog.
  189. */
  190. void ShowFindReplaceDialog( bool aReplace );
  191. /**
  192. * Update the hierarchy navigation tree and history
  193. */
  194. void UpdateHierarchyNavigator( bool aRefreshNetNavigator = true );
  195. /**
  196. * Update the hierarchy navigation tree labels.
  197. * No change for the tree, only the labels are updated, after editing a sheet
  198. * name or a sheet number.
  199. */
  200. void UpdateLabelsHierarchyNavigator();
  201. /**
  202. * Update the hierarchy navigation tree selection (cross-probe from schematic to hierarchy
  203. * pane).
  204. */
  205. void UpdateHierarchySelection();
  206. void ShowFindReplaceStatus( const wxString& aMsg, int aStatusTime );
  207. void ClearFindReplaceStatus();
  208. /**
  209. * Notification that the Find dialog has closed.
  210. */
  211. void OnFindDialogClose();
  212. /**
  213. * Break a single segment into two at the specified point.
  214. * @param aCommit Transaction container used to record changes for undo/redo
  215. * @param aSegment Line segment to break
  216. * @param aPoint Point at which to break the segment
  217. * @param aNewSegment Pointer to the newly created segment (if created)
  218. * @param aScreen is the screen to examine
  219. */
  220. void BreakSegment( SCH_COMMIT* aCommit, SCH_LINE* aSegment, const VECTOR2I& aPoint,
  221. SCH_LINE** aNewSegment, SCH_SCREEN* aScreen );
  222. /**
  223. * Check every wire and bus for a intersection at \a aPoint and break into two segments
  224. * at \a aPoint if an intersection is found.
  225. * @param aCommit Transaction container used to record changes for undo/redo
  226. * @param aPoint Test this point for an intersection.
  227. * @param aScreen is the screen to examine.
  228. * @return True if any wires or buses were broken.
  229. */
  230. bool BreakSegments( SCH_COMMIT* aCommit, const VECTOR2I& aPoint, SCH_SCREEN* aScreen );
  231. /**
  232. * Test all junctions and bus entries in the schematic for intersections with wires and
  233. * buses and breaks any intersections into multiple segments.
  234. * @param aCommit Transaction container used to record changes for undo/redo
  235. * @param aScreen is the screen to examine.
  236. * @return True if any wires or buses were broken.
  237. */
  238. bool BreakSegmentsOnJunctions( SCH_COMMIT* aCommit, SCH_SCREEN* aScreen );
  239. /**
  240. * Test all of the connectable objects in the schematic for unused connection points.
  241. * @return True if any connection state changes were made.
  242. */
  243. void TestDanglingEnds();
  244. /**
  245. * Send items to board editor for selection.
  246. *
  247. * This is used for when the eeschema user is using the cross-probe tool.
  248. *
  249. * @param aItems are the items to select
  250. * @param aForce select the element in pcbnew whether or not the user has the select option
  251. * chosen
  252. */
  253. void SendSelectItemsToPcb( const std::vector<EDA_ITEM*>& aItems, bool aForce );
  254. /**
  255. * Send a net name to Pcbnew for highlighting.
  256. *
  257. * @param aNetName is the name of a net, or empty string to clear highlight
  258. */
  259. void SendCrossProbeNetName( const wxString& aNetName );
  260. /**
  261. * Send a connection (net or bus) to Pcbnew for highlighting.
  262. *
  263. * @param aConnection is the connection to highlight
  264. */
  265. void SetCrossProbeConnection( const SCH_CONNECTION* aConnection );
  266. /**
  267. * Tell Pcbnew to clear the existing highlighted net, if one exists
  268. */
  269. void SendCrossProbeClearHighlight();
  270. const wxString& GetHighlightedConnection() const
  271. {
  272. return m_highlightedConn;
  273. }
  274. void SetHighlightedConnection( const wxString& aConnection,
  275. const NET_NAVIGATOR_ITEM_DATA* aSelection = nullptr );
  276. /**
  277. * Check if we are ready to write a netlist file for the current schematic.
  278. *
  279. * Test for some issues (missing or duplicate references and sheet names).
  280. *
  281. * @param aAnnotateMessage a message to put up in case annotation needs to be performed.
  282. * @return true if all is well (i.e. you can call WriteNetListFile next).
  283. */
  284. bool ReadyToNetlist( const wxString& aAnnotateMessage );
  285. /**
  286. * Create a netlist file.
  287. *
  288. * @param aFormat is the netlist format (NET_TYPE_PCBNEW ...).
  289. * @param aFullFileName is the full netlist file name.
  290. * @param aNetlistOptions is the netlist options using OR'ed bits.
  291. * <p>
  292. * For SPICE netlist only:
  293. * if NET_USE_NETNAMES is set, use net names from labels in schematic
  294. * else use net numbers (net codes)
  295. * if NET_USE_X_PREFIX is set : change "U" and "IC" reference prefix to "X"
  296. * </p>
  297. * @param aReporter is a #REPORTER to report error messages, can be a nullptr.
  298. * @return true if success.
  299. */
  300. bool WriteNetListFile( int aFormat, const wxString& aFullFileName, unsigned aNetlistOptions,
  301. REPORTER* aReporter = nullptr );
  302. /**
  303. * Clear the current symbol annotation.
  304. *
  305. * @param aAnnotateScope See #ANNOTATE_SCOPE_T
  306. * @param aRecursive Annotation should descend into and annotate subsheets
  307. * @param aReporter A sink for error messages. Use NULL_REPORTER if you don't need errors.
  308. */
  309. void DeleteAnnotation( ANNOTATE_SCOPE_T aAnnotateScope, bool aRecursive, REPORTER& aReporter );
  310. /**
  311. * Annotate the symbols in the schematic that are not currently annotated. Multi-unit symbols
  312. * are annotated together. E.g. if two symbols were R8A and R8B, they may become R3A and
  313. * R3B, but not R3A and R3C or R3C and R4D.
  314. * @param aCommit Transaction container used to record changes for undo/redo
  315. * @param aAnnotateScope See #ANNOTATE_SCOPE_T
  316. * @param aSortOption Define the annotation order. See #ANNOTATE_ORDER_T.
  317. * @param aAlgoOption Define the annotation style. See #ANNOTATE_ALGO_T.
  318. * @param aRecursive Annotation should descend into and annotate subsheets
  319. * @param aStartNumber The start number for non-sheet-based annotation styles.
  320. * @param aResetAnnotation Clear any previous annotation if true. Otherwise, keep the
  321. * existing symbol annotation.
  322. * @param aRepairTimestamps Test for and repair any duplicate time stamps if true.
  323. * Otherwise, keep the existing time stamps. This option
  324. * could change previous annotation because time stamps are
  325. * used to handle annotation in complex hierarchies.
  326. * @param aReporter A sink for error messages. Use NULL_REPORTER if you don't need errors.
  327. *
  328. * When the sheet number is used in annotation, each sheet annotation starts from sheet
  329. * number * 100. In other words the first sheet uses 100 to 199, the second sheet uses
  330. * 200 to 299, and so on.
  331. */
  332. void AnnotateSymbols( SCH_COMMIT* aCommit, ANNOTATE_SCOPE_T aAnnotateScope,
  333. ANNOTATE_ORDER_T aSortOption, ANNOTATE_ALGO_T aAlgoOption,
  334. bool aRecursive, int aStartNumber, bool aResetAnnotation,
  335. bool aRepairTimestamps, REPORTER& aReporter );
  336. /**
  337. * Check for annotation errors.
  338. *
  339. * The following list of items are checked:
  340. * - Symbols that are not annotated.
  341. * - Duplicate symbol references.
  342. * - Multiple part per package symbols where the part number is greater number of parts in
  343. * the package.
  344. * - Multiple part per package symbols where the reference designator is different between
  345. * parts.
  346. *
  347. * @return Number of annotation errors found.
  348. * @param aReporter A handler for error reporting.
  349. * @param aAnnotateScope See #ANNOTATE_SCOPE_T Check the current sheet only if true.
  350. * Otherwise check the entire schematic.
  351. */
  352. int CheckAnnotate( ANNOTATION_ERROR_HANDLER aErrorHandler,
  353. ANNOTATE_SCOPE_T aAnnotateScope = ANNOTATE_ALL,
  354. bool aRecursive = true );
  355. /**
  356. * Run a modal version of the annotate dialog for a specific purpose.
  357. *
  358. * @param aMessage A user message indicating the purpose.
  359. * @return the result of ShowModal()
  360. */
  361. int ModalAnnotate( const wxString& aMessage );
  362. // Functions used for hierarchy handling
  363. SCH_SHEET_PATH& GetCurrentSheet() const;
  364. void SetCurrentSheet( const SCH_SHEET_PATH& aSheet );
  365. void UpdateItem( EDA_ITEM* aItem, bool isAddOrDelete = false,
  366. bool aUpdateRtree = false ) override;
  367. /**
  368. * Rebuild the GAL and redraw the screen. Call when something went wrong.
  369. */
  370. void HardRedraw() override;
  371. /**
  372. * Draw the current sheet on the display.
  373. */
  374. void DisplayCurrentSheet();
  375. /**
  376. * Use the wxWidgets print code to draw an image of the current sheet onto the clipboard.
  377. */
  378. void DrawCurrentSheetToClipboard();
  379. /**
  380. * Called when modifying the page settings.
  381. *
  382. * In derived classes it can be used to modify parameters like draw area size, and any other
  383. * local parameter related to the page settings.
  384. */
  385. void OnPageSettingsChange() override;
  386. /**
  387. * Set the m_ScreenNumber and m_NumberOfScreens members for screens.
  388. *
  389. * @note This must be called after deleting or adding a sheet and when entering a sheet.
  390. */
  391. void SetSheetNumberAndCount();
  392. wxPageSetupDialogData& GetPageSetupData() { return m_pageSetupData; }
  393. void NewProject();
  394. void LoadProject();
  395. /**
  396. * Save the currently-open schematic (including its hierarchy) and associated project.
  397. *
  398. * @param aSaveAs is true to perform a Save As operation (rename the schematic and project).
  399. * This may only be done in standalone mode.
  400. * @return true if the schematic was saved
  401. */
  402. bool SaveProject( bool aSaveAs = false );
  403. bool OpenProjectFiles( const std::vector<wxString>& aFileSet, int aCtl = 0 ) override;
  404. wxString GetCurrentFileName() const override;
  405. /**
  406. * Import a KiCad schematic into the current sheet.
  407. *
  408. * @return True if the schematic was imported properly.
  409. */
  410. bool AppendSchematic();
  411. /**
  412. * Add a sheet file into the current sheet and updates display
  413. *
  414. * @note Used in AppendSchematic() and SCH_EDIT_TOOL::ddAppendFile() (so it is public)
  415. *
  416. * @param aFullFileName Path and name of sheet
  417. * @return True if the sheet was properly added
  418. */
  419. bool AddSheetAndUpdateDisplay( const wxString aFullFileName );
  420. /**
  421. * Check if any of the screens has unsaved changes and asks the user whether to save or
  422. * drop them.
  423. *
  424. * @return True if user decided to save or drop changes, false if the operation should be
  425. * canceled.
  426. */
  427. bool AskToSaveChanges();
  428. SCH_JUNCTION* AddJunction( SCH_COMMIT* aCommit, SCH_SCREEN* aScreen, const VECTOR2I& aPos );
  429. /**
  430. * Perform routine schematic cleaning including breaking wire and buses and deleting
  431. * identical objects superimposed on top of each other.
  432. * @param aCommit Transaction container used to record changes for undo/redo
  433. * @param aScreen is the screen to examine, or nullptr to examine the current screen
  434. */
  435. void SchematicCleanUp( SCH_COMMIT* aCommit, SCH_SCREEN* aScreen = nullptr );
  436. /**
  437. * If any single wire passes through _both points_, remove the portion between the two points,
  438. * potentially splitting the wire into two.
  439. * @param aCommit Transaction container used to record changes for undo/redo
  440. * @param aStart The starting point for trimmming
  441. * @param aEnd The ending point for trimming
  442. * @return True if any wires were changed by this operation
  443. */
  444. bool TrimWire( SCH_COMMIT* aCommit, const VECTOR2I& aStart, const VECTOR2I& aEnd );
  445. void OnOpenPcbnew( wxCommandEvent& event );
  446. void OnOpenCvpcb( wxCommandEvent& event );
  447. void OnUpdatePCB( wxCommandEvent& event );
  448. void OnAnnotate( wxCommandEvent& event );
  449. /**
  450. * Verify that \a aSheet will not cause a recursion error in \a aCurrentSheet.
  451. *
  452. * @param aSheet is the #SCH_SHEET object to test.
  453. * @param aCurrentSheet is the #SCH_SHEET_PATH where \a aSheet is going to reside.
  454. * @return true if \a aSheet will cause a recursion error in \a aCurrentSheet.
  455. */
  456. bool CheckSheetForRecursion( SCH_SHEET* aSheet, SCH_SHEET_PATH* aCurrentSheet );
  457. /**
  458. * Check \a aSchematicFileName for a potential file name case sensitivity clashes.
  459. *
  460. * On platforms where file names are case sensitive, it is possible to schematic sheet
  461. * file names that would cause issues on platforms where file name are case insensitive.
  462. * File names foo.sch and Foo.sch are unique files on Linux and MacOS but on Windows
  463. * this would result in a broken schematic.
  464. *
  465. * @param aSchematicFileName is the absolute path and file name of the file to test.
  466. * @return true if the user accepts the potential file name clash risk.
  467. */
  468. bool AllowCaseSensitiveFileNameClashes( const wxString& aOldName, const wxString& aSchematicFileName );
  469. /**
  470. * Edit an existing sheet or add a new sheet to the schematic.
  471. *
  472. * When \a aSheet is a new sheet:
  473. * - and the file name already exists in the schematic hierarchy, the screen associated
  474. * with the sheet found in the hierarchy is associated with \a aSheet.
  475. * - and the file name already exists on the system, then \a aSheet is loaded with the
  476. * existing file.
  477. * - and the file name does not exist in the schematic hierarchy or on the file system,
  478. * then a new screen is created and associated with \a aSheet.
  479. *
  480. * When \a aSheet is an existing sheet:
  481. * - and the file name already exists in the schematic hierarchy, the current associated
  482. * screen is replace by the one found in the hierarchy.
  483. * - and the file name already exists on the system, the current associated screen file
  484. * name is changed and the file is loaded.
  485. * - and the file name does not exist in the schematic hierarchy or on the file system,
  486. * the current associated screen file name is changed and saved to disk.
  487. *
  488. * Note: the screen is not refresh. The caller is responsible to do that
  489. *
  490. * @param aSheet is the sheet to edit
  491. * @param aHierarchy is the current hierarchy containing aSheet
  492. * @param aClearAnnotationNewItems is a reference to a bool to know if the items managed by
  493. * this sheet need to have their annotation cleared i.e. when an existing item list is used.
  494. * it can happens when the edited sheet used an existing file, or becomes a new instance
  495. * of a already existing sheet.
  496. * @param aUpdateHierarchyNavigator is an optional flag to indicate the sheet changes require
  497. * the hierarchy navigator panel to be updated.
  498. */
  499. bool EditSheetProperties( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHierarchy,
  500. bool* aClearAnnotationNewItems,
  501. bool* aUpdateHierarchyNavigator = nullptr );
  502. void InitSheet( SCH_SHEET* aSheet, const wxString& aNewFilename );
  503. /**
  504. * Load a the KiCad schematic file \a aFileName into the sheet \a aSheet.
  505. *
  506. * If \a aSheet does not have a valid #SCH_SCREEN object, the schematic is loaded into
  507. * \a Sheet. Otherwise, it is appended to the current #SCH_SCREEN object.
  508. *
  509. * In order to import a schematic a lot of things have to happen to before the contents
  510. * of the imported schematic can be appended to the current page. The following list
  511. * describes this process:
  512. *
  513. * - Load the schematic into a temporary #SCH_SHEET object.
  514. * - Make sure the imported schematic does not cause any hierarchy recursion issues.
  515. * - Verify the imported schematic uses fully qualified #LIB_ID objects (symbol library table).
  516. * - Check all of the possible combinations that could cause broken symbol library links
  517. * and give the user the option to cancel the append process. The following conditions
  518. * are check but they still do not guarantee that there will not be any broken symbol
  519. * library links:
  520. * - The source schematic is in the current project path and contains symbol library
  521. * nicknames not found in the project symbol library table. This can happen if the
  522. * schematic is copied to the current project path from another project.
  523. * - The source schematic is in a different path and there are symbol library link nicknames
  524. * that do not exist in either the current symbol library table or the source project
  525. * symbol library table if it exists in the source path.
  526. * - The source schematic is in a different path and contains duplicate symbol library
  527. * nicknames that point to different libraries.
  528. * - Check to see if any symbol libraries need to be added to the current project's symbol
  529. * library table. This includes:
  530. * - Check if the symbol library already exists in the project or global symbol library
  531. * table.
  532. * - Convert symbol library URLS that use the ${KIPRJMOD} environment variable to absolute
  533. * paths. ${KIPRJMOD} will not be the same for this project.
  534. * - Clear all of the annotation in the imported schematic to prevent clashes.
  535. * - Append the objects from the temporary sheet to the current page.
  536. * - Replace any duplicate time stamps.
  537. * - Refresh the symbol library links.
  538. *
  539. * @param aSheet is the sheet to either append or load the schematic.
  540. * @param aCurrentSheet is the current position in the schematic hierarchy used to test for
  541. * possible file recursion issues.
  542. * @param aFileName is the file name to load. The file name is expected to have an absolute
  543. * path.
  544. *
  545. * @return True if the schematic was imported properly.
  546. */
  547. bool LoadSheetFromFile( SCH_SHEET* aSheet, SCH_SHEET_PATH* aCurrentSheet,
  548. const wxString& aFileName );
  549. /**
  550. * Removes a given junction and heals any wire segments under the junction
  551. *
  552. * @param aItem The junction to delete
  553. */
  554. void DeleteJunction( SCH_COMMIT* aCommit, SCH_ITEM* aItem );
  555. void FlipBodyStyle( SCH_SYMBOL* aSymbol );
  556. void SelectUnit( SCH_SYMBOL* aSymbol, int aUnit );
  557. void SetAltPinFunction( SCH_PIN* aPin, const wxString& aFunction );
  558. /* Undo - redo */
  559. /**
  560. * Create a copy of the current schematic item, and put it in the undo list.
  561. *
  562. * aTypeCommand =
  563. * CHANGED
  564. * NEWITEM
  565. * DELETED
  566. *
  567. * If it is a delete command, items are put on list with the .Flags member
  568. * set to DELETED.
  569. *
  570. * @param aItemToCopy is the schematic item modified by the command to undo.
  571. * @param aTypeCommand is the command type (see enum UNDO_REDO).
  572. * @param aAppend set to true to add the item to the previous undo list.
  573. * @param aDirtyConnectivity set to true if the change can affect connectivity.
  574. */
  575. void SaveCopyInUndoList( SCH_SCREEN* aScreen, SCH_ITEM* aItemToCopy, UNDO_REDO aTypeCommand,
  576. bool aAppend, bool aDirtyConnectivity = true );
  577. /**
  578. * Create a new entry in undo list of commands.
  579. *
  580. * @param aItemsList is the list of items modified by the command to undo/
  581. * @param aTypeCommand is the command type (see enum UNDO_REDO).
  582. * @param aAppend set to true to add the item to the previous undo list.
  583. * @param aDirtyConnectivity set to true if the change can affect connectivity.
  584. */
  585. void SaveCopyInUndoList( const PICKED_ITEMS_LIST& aItemsList, UNDO_REDO aTypeCommand,
  586. bool aAppend, bool aDirtyConnectivity = true );
  587. /**
  588. * Restore an undo or redo command to put data pointed by \a aList in the previous state.
  589. *
  590. * @param aList a PICKED_ITEMS_LIST pointer to the list of items to undo/redo
  591. */
  592. void PutDataInPreviousState( PICKED_ITEMS_LIST* aList );
  593. /**
  594. * Free the undo or redo list from \a aList element.
  595. *
  596. * - Wrappers are deleted.
  597. * - data pointed by wrappers are deleted if not in use in schematic
  598. * i.e. when they are copy of a schematic item or they are no more in use (DELETED)
  599. *
  600. * @param whichList is the UNDO_REDO_CONTAINER to clear
  601. * @param aItemCount is the count of items to remove. Use < 0 to remove all items from
  602. * the beginning of the list.
  603. */
  604. void ClearUndoORRedoList( UNDO_REDO_LIST whichList, int aItemCount = -1 ) override;
  605. /**
  606. * Clone \a aItem and owns that clone in this container.
  607. */
  608. void SaveCopyForRepeatItem( const SCH_ITEM* aItem );
  609. void AddCopyForRepeatItem( const SCH_ITEM* aItem );
  610. /**
  611. * Return the items which are to be repeated with the insert key. Such objects are owned by
  612. * this container, and must be cloned.
  613. */
  614. const std::vector<std::unique_ptr<SCH_ITEM>>& GetRepeatItems() const
  615. {
  616. return m_items_to_repeat;
  617. }
  618. EDA_ITEM* GetItem( const KIID& aId ) const override;
  619. /**
  620. * Perform an undo of the last edit WITHOUT logging a corresponding redo. Used to cancel
  621. * an in-progress operation.
  622. */
  623. void RollbackSchematicFromUndo();
  624. /**
  625. * Create a library \a aFileName that contains all symbols used in the current schematic.
  626. *
  627. * @param aFileName The full path and file name of the archive library.
  628. * @return True if \a aFileName was written successfully.
  629. */
  630. bool CreateArchiveLibrary( const wxString& aFileName );
  631. /**
  632. * Plot or print the current sheet to the clipboard.
  633. */
  634. virtual void PrintPage( const RENDER_SETTINGS* aSettings ) override;
  635. void SetNetListerCommand( const wxString& aCommand ) { m_netListerCommand = aCommand; }
  636. /**
  637. * Reset the execution flags to defaults for external netlist and bom generators.
  638. */
  639. void DefaultExecFlags() { m_exec_flags = wxEXEC_SYNC; }
  640. /**
  641. * Set (adds) specified flags for next execution of external generator of the netlist or bom.
  642. *
  643. * @param aFlags is the wxEXEC_* flags, see wxExecute documentation.
  644. */
  645. void SetExecFlags( const int aFlags ) { m_exec_flags |= aFlags; }
  646. /**
  647. * Clear (removes) specified flags that not needed for next execution of external generator
  648. * of the netlist or bom.
  649. *
  650. * @param aFlags is the wxEXEC_* flags, see wxExecute documentation.
  651. */
  652. void ClearExecFlags( const int aFlags ) { m_exec_flags &= ~( aFlags ); }
  653. wxString GetNetListerCommand() const { return m_netListerCommand; }
  654. /**
  655. * Generate the connection data for the entire schematic hierarchy.
  656. */
  657. void RecalculateConnections( SCH_COMMIT* aCommit, SCH_CLEANUP_FLAGS aCleanupFlags );
  658. /**
  659. * Called after the preferences dialog is run.
  660. */
  661. void CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged ) override;
  662. void UpdateNetHighlightStatus();
  663. void ShowChangedLanguage() override;
  664. void SetScreen( BASE_SCREEN* aScreen ) override;
  665. const BOX2I GetDocumentExtents( bool aIncludeAllVisible = true ) const override;
  666. int GetSchematicJunctionSize();
  667. void FocusOnItem( SCH_ITEM* aItem );
  668. bool IsSyncingSelection() { return m_syncingPcbToSchSelection; }
  669. /**
  670. * Update a schematic symbol from a LIB_SYMBOL.
  671. *
  672. * This is typically called from the symbol editor when editing symbols in place.
  673. *
  674. * @param aSymbol is the new symbol data.
  675. * @param aSchematicSymbolUUID refers to the schematic symbol to update.
  676. */
  677. void SaveSymbolToSchematic( const LIB_SYMBOL& aSymbol, const KIID& aSchematicSymbolUUID );
  678. /**
  679. * Update the schematic's page reference map for all global labels, and refresh the labels
  680. * so that they are redrawn with up-to-date references.
  681. */
  682. void RecomputeIntersheetRefs();
  683. void ShowAllIntersheetRefs( bool aShow );
  684. /**
  685. * This overloaded version checks if the auto save master file "#auto_saved_files#" exists
  686. * and recovers all of the schematic files listed in it.
  687. *
  688. * @param aFileName is the project auto save master file name.
  689. */
  690. virtual void CheckForAutoSaveFile( const wxFileName& aFileName ) override;
  691. virtual void DeleteAutoSaveFile( const wxFileName& aFileName ) override;
  692. /**
  693. * Toggle the show/hide state of the left side schematic navigation panel
  694. */
  695. void ToggleSchematicHierarchy();
  696. /**
  697. * Toggle the show/hide state of Search pane
  698. */
  699. void ToggleSearch();
  700. void ToggleProperties() override;
  701. DIALOG_BOOK_REPORTER* GetSymbolDiffDialog();
  702. DIALOG_ERC* GetErcDialog();
  703. DIALOG_SYMBOL_FIELDS_TABLE* GetSymbolFieldsTableDialog();
  704. wxTreeCtrl* GetNetNavigator() { return m_netNavigator; }
  705. const SCH_ITEM* GetSelectedNetNavigatorItem() const;
  706. /**
  707. * @return the name of the wxAuiPaneInfo managing the Hierarchy Navigator panel
  708. */
  709. static const wxString SchematicHierarchyPaneName()
  710. {
  711. return wxT( "SchematicHierarchy" );
  712. }
  713. /**
  714. * @return the name of the wxAuiPaneInfo managing the Search panel
  715. */
  716. static const wxString SearchPaneName() { return wxT( "Search" ); }
  717. /**
  718. * Add \a aListener to post #EDA_EVT_SCHEMATIC_CHANGED command events to.
  719. *
  720. * @warning The caller is reponsible for removing any listeners that are no long valid.
  721. *
  722. * @note This only gets called when the schematic editor is in stand alone mode. Changing
  723. * projects in the project manager closes the schematic editor when a new project is
  724. * loaded.
  725. */
  726. void AddSchematicChangeListener( wxEvtHandler* aListener );
  727. /**
  728. * Remove \a aListener to from the schematic changed listener list.
  729. */
  730. void RemoveSchematicChangeListener( wxEvtHandler* aListener );
  731. static const wxString NetNavigatorPaneName()
  732. {
  733. return wxS( "NetNavigator" );
  734. }
  735. void RefreshNetNavigator( const NET_NAVIGATOR_ITEM_DATA* aSelection = nullptr );
  736. void MakeNetNavigatorNode( const wxString& aNetName, wxTreeItemId aParentId,
  737. const NET_NAVIGATOR_ITEM_DATA* aSelection = nullptr );
  738. void SelectNetNavigatorItem( const NET_NAVIGATOR_ITEM_DATA* aSelection = nullptr );
  739. void ToggleNetNavigator();
  740. PLUGIN_ACTION_SCOPE PluginActionScope() const override
  741. {
  742. return PLUGIN_ACTION_SCOPE::SCHEMATIC;
  743. }
  744. DECLARE_EVENT_TABLE()
  745. protected:
  746. /**
  747. * Save the schematic files that have been modified and not yet saved.
  748. *
  749. * @return true if the auto save was successful otherwise false.
  750. */
  751. bool doAutoSave() override;
  752. void doReCreateMenuBar() override;
  753. /**
  754. * Send the KiCad netlist over to CVPCB.
  755. */
  756. void sendNetlistToCvpcb();
  757. void onSize( wxSizeEvent& aEvent );
  758. void saveProjectSettings() override;
  759. void onCloseSymbolDiffDialog( wxCommandEvent& aEvent );
  760. void onCloseErcDialog( wxCommandEvent& aEvent );
  761. void onCloseSymbolFieldsTableDialog( wxCommandEvent& aEvent );
  762. void unitsChangeRefresh() override;
  763. void updateSelectionFilterVisbility() override;
  764. private:
  765. // Called when resizing the Hierarchy Navigator panel
  766. void OnResizeHierarchyNavigator( wxSizeEvent& aEvent );
  767. void onResizeNetNavigator( wxSizeEvent& aEvent );
  768. // Sets up the tool framework
  769. void setupTools();
  770. void OnExit( wxCommandEvent& event );
  771. void OnLoadFile( wxCommandEvent& event );
  772. void OnAppendProject( wxCommandEvent& event );
  773. void OnImportProject( wxCommandEvent& event );
  774. void OnClearFileHistory( wxCommandEvent& aEvent );
  775. bool canCloseWindow( wxCloseEvent& aCloseEvent ) override;
  776. void doCloseWindow() override;
  777. /**
  778. * Set the main window title bar text.
  779. *
  780. * If file name defined by SCH_SCREEN::m_FileName is not set, the title is set to the
  781. * application name appended with no file.
  782. * Otherwise, the title is set to the hierarchical sheet path and the full file name, and
  783. * read only is appended to the title if the user does not have write access to the file.
  784. */
  785. void updateTitle();
  786. /**
  787. * Initialize the zoom value of the current screen and mark the screen as zoom-initialized.
  788. */
  789. void initScreenZoom();
  790. /**
  791. * Verify that the symbol library links \a aSheet and all of its child sheets have
  792. * been remapped to the symbol library table.
  793. *
  794. * @param aSheet is the #SCH_SHEET object to test.
  795. *
  796. * @return true if \a aSheet and its child sheets have not been remapped.
  797. */
  798. bool checkForNoFullyDefinedLibIds( SCH_SHEET* aSheet );
  799. /**
  800. * Load the given filename but sets the path to the current project path.
  801. *
  802. * @param full filepath of file to be imported.
  803. * @param aFileType SCH_FILE_T value for file type
  804. */
  805. bool importFile( const wxString& aFileName, int aFileType,
  806. const STRING_UTF8_MAP* aProperties = nullptr );
  807. /**
  808. * Save \a aSheet to a schematic file.
  809. *
  810. * @param aSheet is the #SCH_SHEET object to save.
  811. * @param aSavePath is the full path of the destination file
  812. * @return True if the file has been saved.
  813. */
  814. bool saveSchematicFile( SCH_SHEET* aSheet, const wxString& aSavePath );
  815. /**
  816. * Fill a map of uuid -> reference from the currently loaded schematic.
  817. *
  818. * @param aMap is a map to fill
  819. */
  820. void mapExistingAnnotation( std::map<wxString, wxString>& aMap );
  821. bool updateAutoSaveFile();
  822. const wxString& getAutoSaveFileName() const;
  823. wxTreeCtrl* createHighlightedNetNavigator();
  824. void onNetNavigatorSelection( wxTreeEvent& aEvent );
  825. void onNetNavigatorSelChanging( wxTreeEvent& aEvent );
  826. private:
  827. // The schematic editor control class should be able to access some internal
  828. // functions of the editor frame.
  829. friend class SCH_EDITOR_CONTROL;
  830. friend class SCH_FIND_REPLACE_TOOL;
  831. SCHEMATIC* m_schematic; ///< The currently loaded schematic
  832. wxString m_highlightedConn; ///< The highlighted net or bus or empty string.
  833. wxPageSetupDialogData m_pageSetupData;
  834. std::vector<std::unique_ptr<SCH_ITEM>> m_items_to_repeat; ///< For the repeat-last-item cmd
  835. wxString m_netListerCommand; ///< Command line to call a custom net list
  836. ///< generator.
  837. int m_exec_flags; ///< Flags of the wxExecute() function
  838. ///< to call a custom net list generator.
  839. DIALOG_SCH_FIND* m_findReplaceDialog;
  840. DIALOG_ERC* m_ercDialog;
  841. DIALOG_BOOK_REPORTER* m_diffSymbolDialog;
  842. HIERARCHY_PANE* m_hierarchy;
  843. DIALOG_SYMBOL_FIELDS_TABLE* m_symbolFieldsTableDialog;
  844. wxTreeCtrl* m_netNavigator;
  845. bool m_syncingPcbToSchSelection; // Recursion guard when synchronizing selection from PCB
  846. bool m_show_search;
  847. bool m_highlightedConnChanged;
  848. std::vector<wxEvtHandler*> m_schematicChangeListeners;
  849. #ifdef KICAD_IPC_API
  850. std::unique_ptr<API_HANDLER_SCH> m_apiHandler;
  851. #endif
  852. };
  853. #endif // SCH_EDIT_FRAME_H