Instead of keeping all items in a boost::ptr_vector(), LIB_ITEMs are now
stored in an integer (KICAD_T) to LIB_ITEMS map.
The map allows to quickly access a subset of items of given type.
As the items are stored per type, there is no need to call
LIB_ITEMS::sort() to assure the correct drawing order. As a result,
libraries load faster.
To retain the old interface, there is a LIB_ITEMS_LIST wrapper for
the map, allowing the developers to access the items as if it was a flat
list-like structure.
eeschema now supports arbitrary colors for all object types, and
pcbnew does in GAL canvas. When switching from GAL to legacy canvas,
pcbnew will convert colors to the nearest legacy color.
Add SCH_PLUGIN object to PART_LIB object.
Convert all PART_LIB I/O to use SCH_PLUGIN.
Remove library caching from PART_LIB and use caching provided by SCH_PLUGIN.
Add support to use PROPERTIES for buffering and document file write control
instead of adding code the SCH_PLUGIN object in the SCH_LEGACY_PLUGIN that
will not be required when the new file formats are implemented.
Add buffering to SCH_LEGACY_PLUGIN to prevent cache from writing file on
every change to library. This is to prevent the cache library from being
written every time a new symbol is added.
Add option to not save library document file when saving library. This is
primarily used by the cache library write code.
Move symbol library write code out of LIB_PART and into SCH_LEGACY_PLUGIN.
Add exception handling where LIB_PART caught the exception and returned
an error status.
Remove KICAD_SCH_IO_MANAGER build option as it is no longer optional.
Fix build error when KICAD_USE_SCH_IO_MANAGER=OFF due to const issues with
LIB_PART ctor.
Fix unused variable build warning in legacy schematic plugin.
Make LIB_PART copy constructor take a const LIB_PART reference.
Add SaveSymbol to legacy symbol library plugin.
Add removeAlias to legacy symbol library cache.
Add AddSymbol to legacy symbol library cache.
* Write SCH_LEGACY_PLUGIN_CACHE object for handling the legacy symbol library
file format.
* Write legacy symbol library file parser.
* Write code to transfer cache to PART_LIB object so existing library save
code can be used for round trip testing. This is temporary until Eeschema
is updated to use the plugin for library management rather than PART_LIB.
* Add LIB_XXXX object helper functions where there was no way to set the member
variables of an object.
* Give the cache object friend status to some object where there are incredibly
byzantine ways of setting text in LIB_XXXX objects.
Libraries have been 100% case-sensitive for a while now; there is no longer a
need to keep this option around. This will change nothing except for any
stragglers still manually specifying this old option.
* Use temporary storage of new pins to prevent corruption of the library part draw items
list when adding alternater body style pins to existing component which caused segfault.
* fix minor coding style issues.
* remove unused member in modview_frame.
* use different frame names in ctor of modview_frame and viewlib_frame depending on the fact they are built modal or not modal (allowing identifications when calling wxFindWindowByName)
* change questionnable code in class_libentry.cpp.
* remove unused code in class_treeproject_item.cpp
Now all are calculated using the top to bottom draw Y axis. This is perhaps not a good idea, but at least it will be easy to change, later.
Code cleaning relative to these bounding boxes.
* Add code to test if any of the components in the schematic cache have been changed
in the component libraries.
* Prompt user to accept or reject components when changes are found.
* If the user chooses to use the components in the cache, create a new library with the old
components and add it to the beginning of the component library list so the schematic will
not be changed.
* Create dialogs to handle user feedback and status.
* Check to see if image handler is already initialized to prevent warning
on debug builds.
* Change LIB_PART destructor message output to use wxLogDebug for debugging
on windows builds.
* Minor code cleaning and coding policy fixes.
However to be compatible with old versions of Eeschema, when a search in library fails, a case insensitive search is made.
Therefore, this version should be compatible with sch files created by previous Eeschema versions compiled with KICAD_KEEPCASE = OFF
*) When kicad.exe closes a project, close any open KIFACEs so that they cannot
get disassociated from their true PROJECT.
*) Allow loading eeschema library editor from kicad.exe
*) Allow loading pcbnew library editor from kicad.exe
*) Rename LIB_COMPONENT to LIB_PART.
*) Add class PART_LIBS, and PART_LIB.
*) Make PART_LIBS non-global, i.e. PROJECT specific.
*) Implement "data on demand" for PART_LIBS
*) Implement "data on demand" for schematic SEARCH_STACK.
*) Use RSTRINGs to retain eeschema editor's notion of last library and part being edited.
*) Get rid of library search on every SCH_COMPONENT::Draw() call, instead use
a weak pointer.
*) Remove all chdir() calls so projects don't need to be CWD.
*) Romove APPEND support from OpenProjectFiles().
*) Make OpenProjectFiles() robust, even for creating new projects.
*) Load EESCHEMA colors in the KIWAY::OnKiwayStart() rather in window open,
and save them in the .eeschema config file, not in the project file.
*) Fix bug with wxDir() while accessing protected dirs in kicad.exe
*) Consolidate template copying into PROJECT class, not in kicad.exe source.
*) Generally untangle eeschema, making its libraries not global but rather
held in the PROJECT.
was used locally. Then comment it out in favor of a newer strategy for
filling in nicknames in cvpcb.
Add MODULE* FootprintLoadWithOptionalNickname( const FPID& aFootprintId )
throw( IO_ERROR, PARSE_ERROR );
from code found elsewhere.
! 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.
* Improve component chooser redraw to fit in wxWidgets redraw strategies.
* Use LIB_COMPONENT::Draw and LIB_COMPONENT::GetBoundingBox for drawing the
component
* Make resize redrawing work properly.
The desire is to migrate designs *away from* case independence, and to create
designs which use literally (case specific) interpreted component names. But for
backwards compatibility, you may turn OFF this option if you really must.
(Remember that with KiCad using text data files, typically you would be better
off simply doctoring those files into a case literal state with a text editor
and move forward into the brave new world of case specificity. Also, BOM
generators may not work properly when you have this option turned OFF, the xml
export's referential integrity is broken on library part name. Hence the default
is ON now, as of 29-Jan-2014.
In most case the assignment to null was not necessary since it was easily provable that the (local) variable wouldn't have referenced after that anyway.
In particular the new mechanism for handling extended color palettes is in place,
included renaming the ini keys and saving the color name instead of its index; this means better forward compatibility with palette changes.
Since ini keys are changed, colors will be reset