* if the current select plugin is the github plugin, one can select some of these libraries and add them to the table
* if the current select plugin is the kicad plugin, one can select some of these libraries and download them to make alocal copy.
They can added to the table after they are downloaded.
Fix issue when using a page layout file in project folder: eeschema and Pcbnew did not use it, unless using an absolute path.
Now, if the file path is nor absolute, it is seen as relative to the project (which is the expected behavior)
fp lib wizard: when pcbnew id compiled with USE_GITHUB_PLUGIN=OFF, the github plugin option is no more accessible (and the web viewer no more used).
* Many path related fixes.
* Fix execution of external applications.
* Update mac-osx.txt.
* Add top-level links for standalone applications inside OSX bundle.
* Fix document icons for Eeschema and pl_editor.
* Create individual bundles for standalone applications inside the main application bundle.
* Add usual 'site-packages' to python path in OSX bundle.
* Fix name of OSX bundle plugin folder.
* Compile all binaries into a single application bundle.
* Use CMake BundleUtilities to make application bundle relocatable.
* Restructure build output to directly create an image file.
* Fix default search paths.
* Set KIGITHUB environment variable.
* Added patch to fix wxWidgets so names for OSX.
* Create GetNewConfig() and GetKicadConfigPath() to unify configuration file
creation and location.
* Move Windows configuration out of the registry into configuration files.
* Move Linux configuration files from $HOME to $HOME/.config/kicad to eliminate
configuration file pollution in the users $HOME folder.
* Fix a bug in the configuration file where the Eeschema hot keys are saved.
They are now member of EDA_DRAW_FRAME.
This change could fix Bug #1330781 (Background color change in Eeschema affects background color in Pcbnew)
Show page limits has meaning only for the schematic editor, the board editor and the page layout editor.
Draw background color selection exists only in eeschema and page layout editor.
In pcbnew, only a black background is allowed.
A side effect is now the user should set the background color in schematic editor, and the library editor (2 different options).
The default is still the white color.
if it is running under single_top.cpp or under a project manager.
*) Test Kiface().IsSingle() when adding menus, some operations are not permitted
when running under a project manager and the KIWAY_PLAYER is pegged to a
specific project.
*) Implemented KIWAY::KiFACE() so it loads *.kiface files. They still have to be
in the same directory as the main *.exe launcher, so this presents some difficulty
when the binaries are not yet installed but rather the *.kiface files are still
in their original build directories. For today, I simply copied _pcbnew.kiface
to build/kicad/.
*) Add a test case to kicad/mainframe.cpp just to get an early peek at loading
_pcbnew.kiface under the C++ project manager. Got that working for one
specific invocation just for proof of concept. Surprise, it works.
! 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.
Remove KICAD_GOST option because it is now useless: the 2 GOST options are now selectable at run time and are:
* specific page layouts (now user definable, and the GOST page layouts are available in template folder)
* notation for multiple parts per package (made in eeschema, preference menu)
* Do not fail to build when wxWidgets is built with either --with-gnomeprint
or --with-gtkprint are not configured. Only display warning.
* Move warning code from include/common.h to common/common.cpp so it only
shows the warning once instead of every source file that includes common.h
fix potential issue in .kicad_pcb file creation, in some places where a %g or %.16g format was used:
al least under Mingw/gcc4.7.2, the floating number was written using scientific notation, not accepted by the S-expr reader.
base on expected text and current window font.
Expand the virtual world to 2.14 meters in the nanometer build of PCBNEW.
This seems to be holding up for now.
Other scaling factors (MILS_TO_IU_SCALING_FACTOR and DECIMILS_TO_IU_SCALING_FACTOR)
also defined only in convert_to_biu.h.
Allows different scaling value for Gerbview.
Needs more tests.
solution to see that it was not pre-computing constants when used in static initializers.
So we have two use cases, and need two solutions to be optimal, since the compiler
is too stupid to do the right thing.
I think we need something else for compile time computable constants, to be optimal
in both use cases. There is quite a bit of code savings by using a macro for that
situation from my testing. To fully capitalize on this, we need to go back and make
Mm2mils() and what not macros also, or have MACRO versions of them too.
// This provides better project control over rounding to int from double
// than wxRound() did. This scheme provides better logging in Debug builds
// and it provides for compile time calculation of constants.
#include <stdio.h>
#include <assert.h>
#include <limits.h>
//-----<KiROUND KIT>------------------------------------------------------------
/**
* KiROUND
* rounds a floating point number to an int using
* "round halfway cases away from zero".
* In Debug build an assert fires if will not fit into an int.
*/
#if defined( DEBUG )
// DEBUG: a macro to capture line and file, then calls this inline
static inline int KiRound( double v, int line, const char* filename )
{
v = v < 0 ? v - 0.5 : v + 0.5;
if( v > INT_MAX + 0.5 )
{
printf( "%s: in file %s on line %d, val: %.16g too ' > 0 ' for int\n", __FUNCTION__, filename, line, v );
}
else if( v < INT_MIN - 0.5 )
{
printf( "%s: in file %s on line %d, val: %.16g too ' < 0 ' for int\n", __FUNCTION__, filename, line, v );
}
return int( v );
}
#define KiROUND( v ) KiRound( v, __LINE__, __FILE__ )
#else
// RELEASE: a macro so compile can pre-compute constants.
#define KiROUND( v ) int( (v) < 0 ? (v) - 0.5 : (v) + 0.5 )
#endif
//-----</KiROUND KIT>-----------------------------------------------------------
// Only a macro is compile time calculated, an inline function causes a static constructor
// in a situation like this.
// Therefore the Release build is best done with a MACRO not an inline function.
int Computed = KiROUND( 14.3 * 8 );
int main( int argc, char** argv )
{
for( double d = double(INT_MAX)-1; d < double(INT_MAX)+8; d += 2.0 )
{
int i = KiROUND( d );
printf( "t: %d %.16g\n", i, d );
}
return 0;
}
* Move all convert from user to internal units into base_units.cpp.
* Remove internal units parameters from all moved conversion functions.
* Revise all source code that calls the moved conversion functions.
* Remove internal units from all dialog text control helper classes.
* Move all convert from internal to user units functions into separate file.
* Remove internal units parameter from all moved conversion functions.
* Revise all source code that calls the moved conversion functions.
* Compile these conversion routines separately for the appropriate pcb or
schematic internal units.
* Move internal units specific status bar update code into the appropriate
application for updating the status bar.
* Move millimeter user units rounding function to common.cpp.
* Move EDA_TEXT object into separate header and source file.
* Compile EDA_TEXT class separately for BOARD_ITEM and SCH_ITEM units.
* Compile PAGE_INFO class separately for BOARD_ITEM and SCH_ITEM units.
* Minor formatting tweaks to Pcbnew s-expression file.
* Move internal unit formatting functions into BOARD_ITEM and SCH_ITEM.
* Add s-expression Format() function to all objects derived from
BOARD_ITEM.
* Add s-expression Format() function to base objects as required.
* Add functions to convert coordinates from base internal units
(nanometers) to millimeter string for writing to s-expression
file.
* Add temporary dummy conversion functions to prevent link errors
until schematic and board object and action code can be separated
into DSO/DLL.
* Add CMake build option to build Pcbnew with nanometer internal
units.
sizes. Tested with postscript output only. Required minor file format changes
to reflect the "portrait" setting. common/dialogs/dialog_page_settings.cpp
uses a checkbox but its name is "Landscape", which is inverted from portrait,
but since it is the more common choice, I used that rather than portrait.
The tooltip for that checkbox makes it clear. No portrait mode is supported
for "User" paper size.
* EDA_DRAW_PANEL completely encapsulated.
* Moved OSX m_overlay member from EDA_DRAW_PANEL to EDA_DRAW_FRAME where
it is used.
* Doxygen comment warning fixes.
In common.cpp GetTimeStamp is renamed GetNewTimeStamp (a better name).
Pcbnew: prepare work to calculate connections between pads that inteserct and therefore can be connected without any track (composite pads).
* Replace Eeschema find code with a collector based implementation.
* Fixed a search bug when all subsequent searches of an item would ignore
the remaining valid child items when an item had more than one child
item that matched the search criteria.
* Add SCH_FIND_COLLECTOR class to find all items that meet the specified
search criteria.
* Add SCH_FIND_COLLECT0R_DATA to keep track of information for all matching
items.
* Use collector to iterate over the list of items that match the search
criteria rather than trying to start at the last matched item.
* Remove unused searching methods from sheet path and sheet path list
objects.
* Add replace and replace all functionality to Eeschema find dialog.
* Push matching methods down to EDA_ITEM class so they can be used by
other derived objects.
* Add method to EDA_ITEM to test if item supports replacing.
* Add flag to find/replace data to support replace feature.
* Disable wild card matching check box when dialog is in replace mode as
wild card replacement is not supported at this time.
* The usual Doxygen comment and coding policy fixes.
* Replace C malloc() and free() functions with C++ new and delete
operators or the appropriate STL container.
* Add option to end mouse capture function to skip executing the end
mouse capture callback.
* Lots of coding policy and Doxygen comment goodness.
Added configuartion option KICAD_NANOMETRIC for this.
* With option set to false: *
- it should work and compile as usual
- some values are saved with decimal point (which should be backward/forward compatible as old versions should just drop fractional part)
* With option set to true: *
- lengths in Global Design Rules should be settable 1nm steps.
FROM/TO_LEGACY_LU(_DBL) macros introduced for easy interconnection between old and new units.
* Use version of DateAndTime that returns a wxString and delete the
version that takes a char* as it is no longer required.
* Merge StrNumICmp() and StrLenNumICmp() into StrLenNumCmp() to create a
single function for comparing strings with integers and remove a lot
of duplicate code.
* Remove unused strupper from string.cpp.
* Use wxArrayString for sorting the EDA_LIST_DIALOG contents.
* Correct all user strings and comments for the correct capitalization of
application names according to JP. They are KiCad, Pcbnew, CvPcb,
Eeschema, and GerbView.
* Add a note the the user interface policy about the correct capitalization.
* Add hotkey "P" - place item
* Add record and play macros for sequence hotkey.
Macros set to numeric key 0..9.
<Ctrl>+<numkey> - start record macros
<hotkey> <mouse move> ... <hotkey>|<mouse place>
<Ctrl>+<numkey> - end record macros
<numkey> - play macros
* Add menu save/read macros to/from xml-file
* Add configure rotate angle for rotate module: 45 or 90 deg.
* fix segfault when move/drag segment if disconnected to pad
* Change class WinEDA_MsgPanel name to EDA_MSG_PANEL per coding policy.
* Change some old set message panel code in PCBNew with updated message
panel methods in EDA_DRAW_FRAME.
* Remove unused global function Affiche_1_Parametre.
* Minor Doxygen warning fixes.
* Add item clarification context menu to EESchema when multiple unresolved
items are found at the current cross hair position.
* Add collector class SCH_COLLECTOR for supporting multiple item hit testing.
* Removed bit wise masked filtering from schematic item hit testing.
* Removed all old hit testing functions and methods scattered about the
EESchema source code.
* Move terminal point test function into SCH_SCREEN object.
* Fixed bug in terminal point test when terminating a bus to a label.
* Define the < operator for sorting schematic items.
* Add area calculation method to EDA_Rect item.
* Add method for returning an item's bitmap for menu display purposes.
* Add method for returning an item's menu text for menu display purposes.
* Changed EDA_ITEMS container from boost::ptr_vector to std::vector.
* Factor coordinate string conversion code from EDA_DRAW_FRAME to function
CoordinateToString().
* Move schematic wire and bus break code into schematic screen object.
* Move schematic test for dangling ends into schematic screen object.
* Remove left over debugging output in schematic screen object.
* Remove unused file eeschema/cleanup.cpp.
* Fix bug in schematic line object hit test algorithm.
* Fix a string concatenation compile error added in r2752.
* Rename class WinEDA_BasicFrame to EDA_BASE_FRAME.
* Rename class WinEDA_DrawFrame to EDA_DRAW_FRAME.
* Rename class WinEDA_DrawPanel to EDA_DRAW_PANEL.
* Break classes_body_item.cpp(.h) into more reasonable size bites.
* Rename classes_body_item.cpp(.h) to lib_draw_item.cpp(.h)
* Fix some unsatisfied header file dependencies.
* Add stubs to component library draw item base classe to handle editing
internally.
* Lots of code cleaning.
inches and mm, the industry is crazy enough to force us with mixed
design. For example I routinely use imperial units for track size and
clearance, but drilling is strictly a metric issue...
So I added a little parser to recognize a suffix specification in the
unit text boxes... so you can put in things like:
1in (1 inch)
1" (idem)
25th (25 thou)
25mi (25 mils, the same)
6mm (6 mm, obviously)
The rules are: spaces between the number and the unit are accepted, only
the first two letters are significant.
As a bonus, it also recognize the period (.) as a decimal point
substituting it with the correct locale character (there was a wishlist
for it, IIRC). Most useful for number pad fans :D
* Fix a minor problem with wxFileDialog to open a file that no longer
exists in PCBNew.
* Make GerbView open file behavior the same as PCBNew.
* Remove redundant PCB file wild card definition.
* Add open file refactor task to the todo list.
* Fix some minor code formatting issues.
* Replaced find dialog with wxFormBuilder version.
* New find dialog is modeless, supports more advanced search features,
remembers it's last position, size, search history, and search settings,
and implements initial support for replacing.
* Added Shift+F5 hot key to search for next DRC marker. F5 now just
repeats previous search.
* Minor cosmetic enhancements to label edit dialog.
* Remove tab from grid size text printf to fix toolbar grid combobox
display in wxGTK.
* Updated my TODO list items.
* Moved ReturnLayerName() to static BOARD::GetDefaultLayerName() and migrated
to a Specctra DSN compatible default layer naming scheme:
Component becomes Front, Copper becomes Back.
* set_color.h: Cmp becomes Front, Cu becomes Back.
* D_PAD::DisplayInfo() changed to use actual copper layer names.
* more layer setup dialog work, moved all programmatic wxControl instantiation
into the wxFormbuilder environment, but this is fraught with danger:
wxFlexGridSizer used the tallest control to establish the row heights, so
be careful about changing control borders in the scroll panel. The vertical
size can explode since just a couple of pixels times the number of rows
is substantial. Currently I am setting a 5 pixel border only left, top, and right
but not bottom.
* Set copper layer count is back in place as a hack until I can get the enabled
layer bit map fully operational.
* Replaced library pin properties dialog with wxFormBuilder version.
* Remove DialogBlocks version of pin properties dialog.
* Add pin properties dialog support code to pin object.
* Create single event handler for displaying pin properties dialog.
* Remove left over DialogBlocks project file for annotate dialog.
* Fixed escape key bug in library editor new component dialog.
* Add GetUnitsLabel() to get human readable units for dialog labels.
* Translate French comments in all modified files.
* Some minor clean up of Doxygen comments.
* Create static component library methods to manage library list.
* Rename component library, component, and alias objects to more readable name.
* Use pointer to component instead of root name to prevent redundant library searches.
* Add append message helper to message panel that calculates string length.
* Initial ground work for merging library and library document files.
* Improved component library file load error checking.
* Minor component library editor improvements.
* All: remove all remaining occurrences of g_DialogFont and dialog font menu handers.
* All: remove all remaining non-standard fonts and button text colors from common dialogs.
* PCBNew: remove all non-standard fonts and button text colors from dialogs.
* PCBNew: update project library and path dialog to match changes to CVPCB version.
* EESchema: update project library and path dialog to match changes to CVPCB version.
* EESchema: save vertical/horizontal line direction setting between sessions.
* All - add wxList implementation for dynamic declaration of application settings.
* EESchema: remove non-standard fonts and dialog button text colors from all UI controls.
* EESchema: update project file and application settings from static to dynamic method.
* EESchema: save and restore show hidden pins state between sessions.
* EESchema: global variable reductions.
* EESchema: use EVT_UPDATE_UI instead of SetToolbars() to set control states.
* EESchema: remove unused DialogBlocks BOM dialog project file.
* GerbView: remove non-standard fonts and dialog button text colors from all UI controls.
* GerbView: fix infinite loop when parsing RS274X aperture definitions with whitespace.
* GerbView: add file name to export to PCBNew select layer dialog.
* Add methods to read and write project file parameters using dynamically defined list.
* Remove all global variables defined in CVPcb code.
* Dynamically define project file settings so class member variables can be used.
* Separate reading and writing application settings from project file settings.
* Make application UI objects and dialogs respect system UI font.
* Remove non-standard widget colors from CVPcb dialogs.
* Changed CVPcb object link list implementation to use wxList.
* Changed project library and path dialog to make OK button save project file instead of confusing "Save Cfg" button.
* Eliminate some duplicate file wildcard and extension definitions.
* The usual code reformatting, commenting, and spelling fixes.
* Add default OS program install path(s) to search path list as fail safe.
* Remove unnecessary wxGetApp calls in WinEDA_App class methods.
* Remove non-standard message panel font and changed background to system menu color.
* Remove italic fonts from menus.
* Remove non-standard font in Kicad app project tree.
* Remove font selection dialog menu items from apps for removed fonts.
* Remove all global variables and settings associated with the removed fonts.
* Fixed PCBNew export and import library file dialog response tests from wxCANCEL to wxID_CANCEL.
================================================================================
+eeschema
* commiting my changes to allow multiple instances of a given schematic file within
a hierarchy:
** internally, m_currentScreen has been replaced with m_currentSheet,
which is a list or 'path' of screens. The path of screens is used to
generate
a series of timestamps, which is converted to flat component reference via
a look-up
table in the schematic files.
** this means that m_currentScreen is no longer used -- use GetScreen().
** GetScreen is virtual, as some of the dialogs keep around a WinEDA_BaseScreen
pointer.
** all sub-sheets in a given schematic must have different names to generate a
meaningful netlist.