mainly because we now use std::string in a lot of function using previously char*
FROM_UTF8(const char* cstring) now calls From_UTF8(const char* cstring)
in most of files, including wx.h is not necessary, when only 2 or 3 wx files must be included.
Moreover, on windows, including wx.h sometimes create compil warnings about
shadowed vars defined in some specific windows headers.
* Split up the thirdparty code into the thirdparty folder (#3637)
* Create a new kimath static library containing all the math functions
This is part of cleaning the build system for #1906.
This allows setting the config dir at build time, providing packagers a
method of controlling where the configuration files are placed.
Fixes: lp:1780601
* https://bugs.launchpad.net/kicad/+bug/1780601
The standard DIM() macro was not typesafe as it happily deferred errors
to runtime that can be caught at compile time. Replacing it with a
generic C++11 constexpr allows for typecasting, comparison and compile
time error checking.
Make all EDA_TEXT data private and rename accessors to avoid function
name collisions in derived classes.
Overload EDA_TEXT's SetTextAngle() and SetEffects() in TEXTE_PCB.
Add support for preserving Reference text position, size, orientation
during a netlist import into a BOARD, as well as the one off footprint
update dialog.
*) Extend SWIG support deeper into the BOARD class.
*) Move swig *.i files into a directory identified for SWIG, in preparation
for a parallel universe involving Phoenix's SIP.
*) Move swig files which will be common to both eeschema and pcbnew into
common/swig.
*) Sketch out a "common" python module, and plan on dovetailing that into a
libkicad_shared.{dll,so}
*) Add common/swig/ki_exceptions.i and define a macro HANDLE_EXCEPTIONS()
which is to be applied to any function which needs C++ to python
exception translation.
*) Move the test for SWIG tool into top level CMakeLists.txt file for use
in all python modules beyond pcbnew, i.e. eeschema and common.
*) Add SWIG_MODULE_pcbnew_EXTRA_DEPS which generates a better Makefile, one
which rebuilds the swig generated *.cxx file when one of its dependencies
change.
*) Re-architect the board.i file so that it can be split into multiple *.i
files easily.
*) Make some KIWAY from python progress, in preparation for Modular KiCad
phase III.
* Switched hashtables.h over to std::undordered_map from boost version.
* Added new macros DECL_VEC_FOR_SWIG() and DECL_MAP_FOR_SWIG() in macros.h.
These along with future DECL_HASH_FOR_SWIG() unify the declaration to swig
and C++ so that the resultant type name is common in both languages, and
the types AGREE.
* Fixed swigging of NETINFO_ITEM and NETINFO_LIST via magic.
* Newly exposed (python wrapped) are: D_PADS, TRACKS (was TRACK_PTRS),
NETNAME_MAP, NETCODE_MAP, wxString (without constructor purposely, read
comment in wx.i), MARKERS, ZONE_CONTAINERS, NETCLASSPTR, KICAD_T types.
* std::vector<SOMETHING*> tends to end up named SOMETHINGS in C++ and python.
Having the name consistent between like types is helpful, and between
languages. std::map<> ends up as SOMETHING_MAP.
* NETINFO_LIST::m_netNames and NETINFO_LIST::m_netCodes are now std::map
instead of hashtables, because swig does not yet support std::unordered_map.
* You can now get to any netclass or net info. NETNAMES_MAP and NETCODES_MAP
are traversable basically the same as a python dictionary using a python
string (not wsString) as the key! The wxString typemap converts python
string to wxString before the lookup happens. Iteration also works.
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)
- Removed spurious int casts (these are truncated anyway and will break
doubles)
- Applied the Distance, GetLineLength, EuclideanNorm, DEG2RAD, RAD2DEG
ArcTangente and NORMALIZE* functions where possible
- ArcTangente now returns double and handles the 0,0 case like atan2, so
it's no longer necessary to check for it before calling
- Small functions in trigo moved as inline
* Rename all ADD_MENUITEM_* functions to AddMenuItem and move them to
wxstruct.h since they are used by the Kicad main frame classes.
* Move SET_BITMAP and SETBITMAPS definitions to wxstruct.h.
* Fix a bug in SET_BITMAPS that prevented enabling menu item images on
OSX.
* Rename MsgItem to EDA_MSG_ITEM.
* Remove redundant includes from modified files.
* Doxygen and coding style policy fixes.
* Add USE_IMAGES_IN_MENUS definition to override the default platform
behavior for adding images to menu items.
* Update COMPILING.txt to document how to use USE_IMAGES_IN_MENUS.
* Fix Windows segfault when creating language selection submenu introduced
by new bitmap code in r3087.
* Changed per email from JP from CVPcb to CvPcb because I'm getting old and
blind and misread the email.
* Lot's of Doxygen comment and coding style policy fixes.
* macros.h now has TO_UTF8() and FROM_UTF8() which are working converters
to and from UTF-8 encoding for any wxWidgets build mode. We can switch to
them at any time. I am using them now for specctra conversions and
elsewhere where I wanted gauranteed UTF8 encoding.
* added OUTPUTFORMATTER::Quoted( const wxString& ) to simplify converting
to UTF8 encoded s-expression atoms. The recommended technique is now simply:
out->Quoted( wxString ).c_str()