Commit Graph

78 Commits

Author SHA1 Message Date
Jeff Young ea0941cab3 Implement modern tools for LibEdit. 2019-05-10 16:11:57 +01:00
Jeff Young 40f41133b3 Move Circle, Arc, Rectangle and PolyLine tools to modern toolset. 2019-05-10 16:11:57 +01:00
Jeff Young fd546da640 Homogenize hit testing and selection return types.
Prep work for sharing SCH_SELECTION_TOOL with LibEdit.
2019-05-05 17:14:30 +01:00
Jeff Young 2aad4a5e57 Remove dead code from removal of eeschema legacy canvas. 2019-04-05 15:54:31 +01:00
Jeff Young a8c7bb0c92 Move library text items to LAYER_DEVICE. Only sch text items belong on LAYER_NOTES.
Fixes: lp:1800350
* https://bugs.launchpad.net/kicad/+bug/1800350
2018-10-28 17:45:11 +00:00
Jeff Young f17c18bcce Remove AdvanceDepth() hacks in favour of proper layers.
Also removes the bounding-box cache since the last big merge
should have sorted out the Update(GEOMETRY) calls.

Fixes: lp:1797271
* https://bugs.launchpad.net/kicad/+bug/1797271

Fixes: lp:1797268
* https://bugs.launchpad.net/kicad/+bug/1797268

Fixes: lp:1797075
* https://bugs.launchpad.net/kicad/+bug/1797075
2018-10-21 15:55:56 +01:00
Seth Hillbrand bfa7f16b44 Wrap printfs in DBG defines
This places the remaining printf statements behind DBG() macros to
suppress their output on release builds.  We should remove these prior
to 5.1
2018-10-11 13:32:20 -07:00
Tomasz Wlostowski 90c7c60471 eeschema-gal: initial GALified version. Lots of stuff still to do! 2018-10-09 11:08:52 +01:00
Jeff Young eacaa39aa2 Remove global units usage from GetSelectionText...
... and GetMsgPanelInfo.

Step 4 in the g_UserUnit eradication effort.

Also removes a couple of conversion routines that were close
enough to extinction.

(cherry picked from commit c75da51)
2018-07-17 15:11:09 +01:00
Jeff Young b99ea159c8 Rationalize select menu texts.
Be consistent with order, formatting, etc.
Remove debug stuff such as zone timestamp and net code.
Clean up misleading pad messages.

(cherry picked from commit 2132109)
2018-07-17 15:09:48 +01:00
jean-pierre charras 5d72aebd22 Fix code after renaming files 2018-01-29 16:40:22 +01:00
jean-pierre charras 4c5bd01887 Rename a few files 2018-01-28 22:02:31 +01:00
jean-pierre charras e499d337d8 rename files: update filenames in sources 2018-01-28 19:12:26 +01:00
Jeff Young 829c236437 Symbol library load performance enhancements.
1) Edit Symbol gets similar fix as Place Symbol
2) progress dialog updating reduced to once every 50ms
3) SearchText gets lazy normalization
4) TypeNames get lazy translation
5) default fieldNames get translated a single time per language change

These fixes reduce first-load-time of both Edit Symbol and Place Symbol
by about 2/3, and second-load-time of Edit Symbol to near-instantaneous.
2018-01-27 08:29:43 -05:00
Wayne Stambaugh 694ad93385 Move LIB_PART save code to legacy schematic plugin.
This is the last of the object save/load code that was not moved into
the SCH_LEGACY_PLUGIN object.  All schematic and library I/O is now
performed in the SCH_LEGACY_PLUGIN object and as been removed from the
schematic and library objects.

The old single symbol file format has been replaced with the normal
symbol library file format since there was no difference between them
except the SYMBOL token.  The SYMBOL token was no longer being read
since the introduction of the SCH_LEGACY_PLUGIN symbol library loader.

Update the Doxygen comments in all of the modified files.
2017-12-01 11:49:44 -05:00
Wayne Stambaugh 0acdd9f02e Remove obsolete symbol library item load code. 2017-11-27 14:42:22 -05:00
jean-pierre charras bdc6a5950b rename plot_common.h to class_plotter.h, a better name, consistent with other class definitions. 2017-11-16 15:53:30 +01:00
Seth Hillbrand f685cfaf3d Eeschema: Add collision-based selection code to circles and text 2017-10-10 20:54:31 +02:00
Fabrizio Tappero ac9a64a173 general UI fix. Fixed a lot of icons and a lot of menu.
Also a few no longer used .cpp icon files are removed.
2017-06-02 11:51:11 +02:00
Maciej Suminski 0dc88bb4cf Changed COLOR4D defines to static consts 2017-02-22 17:35:00 +01:00
Jon Evans a52250a91e Change from EDA_COLOR_T to COLOR4D globally; arbitrary color support
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.
2017-02-22 17:35:00 +01:00
John Beard a8eea6155a Move bitmaps.h out of base_struct.h
bitmaps.h was included in nearly every file in the project due to it
being included by base_struct.h

Only about 130 files actually use the XPM definitions defined there, and
many of those already included bitmaps.h themselves, or via
menu_helpers.h. However, touching bitmaps.h would result in over 400
rebuilt files for pcbnew alone.

This commit moves the bitmap-related types like BITMAT_DEF out to a new
header, which is still included by base_struct.h, which is less
avoidable for now, it's it's used in the interface.

The icon list is still in bitmaps.h. This has the side effect that's
it's now easier to automatically generate this file.

Many classes in pcbnew and eeschema needed some functions moved
to the implementaitons from the headers too.
2017-02-21 09:50:15 -05:00
Dick Hollenbeck 0c459ced97 EDA_TEXT object refactor.
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.
2017-01-25 08:03:32 -05:00
Maciej Suminski 9748b65a6d str[n]icmp -> str[n]casecmp 2016-08-11 14:41:06 +02:00
unknown 82b3744ddd fix very minor issue: Eeschema creating extra whitespace in .lib 2016-03-20 15:53:02 +01:00
unknown 5897580c13 LIB_TEXT::Plot doesn't take justification into account, so when generating postscript/PDF/etc with left/right-justified text, the text is in the wrong position. This rev fixes that. 2015-11-08 11:10:52 +01:00
unknown 71b3125d8e Cleanup: remove unnecessary macros EXCHG and NEGATE. add MIRROR macro. 2015-06-26 15:41:56 +02:00
jean-pierre charras d4d201f0d8 Libedit: Fix an issue relative to bounding boxes of symbol items: some were calculated using the top to bottom draw Y axis, some others using the bottom to top libedit Y axis
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.
2015-06-18 16:56:08 +02:00
Wayne Stambaugh 1dc5178095 Message panel consistency improvements and coding policy fixes.
* Make title capitalization consistant.
* Replace some instances of module with footprint.
* Use angle instead of orientation where appropriate.
* Remove abbreviations where it made sense.
* Coding policy fixes.
2014-11-15 14:06:05 -05:00
Lorenzo Marcantonio 260ca0e79f Added support for decoupling stored text from shown text in EDA_TEXT
Factored out text ellipsing support to max 15 character (for generating menu items)
2014-09-13 20:15:45 +02:00
Dick Hollenbeck 7e483f69bd Modular KiCad Blueprint Milestone B), major portions:
*) 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.
2014-08-13 15:28:54 -05:00
Andrew Zonenberg afd89c358e 1) EDA_DRAW_FRAME::m_showOriginAxis is never initialized in the constructor
2) LIB_RECTANGLE and related classes sscanf data read from a file using "%s"
without field limits, which can cause problems with malformed/really long
inputs.

3) If some of the optional fields in a lib line are missing, "tmp" can remain
uninitialized.
2014-08-12 09:39:44 -05:00
Lorenzo Marcantonio 342016b692 Constification of HitTest and GetParent
In particular HitTest for zones *do not* select the nearest vertex/edge as a side effect
2014-05-04 19:08:36 +02:00
Dick Hollenbeck 2c67c3ff80 * 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.
2014-03-19 19:42:08 -05:00
jean-pierre charras f905b4697e Code cleanup: Pcbnew: move files relative to exort functions to the new folder exporters
all: remove include <protos.h>  from a lot of  files which do not need it.
2014-01-08 15:18:51 +01:00
jean-pierre charras 5f01f123de All: GetBoundingBox returns now a const EDA_RECT.
Pcbnew: Code cleaning and bug fix in autoplace functions
Dialog exchange footprints has now a separate button to update the .cmp file, only on request.
2013-11-24 18:48:14 +01:00
jean-pierre charras 5c247857d3 Replace in EDA_TEXT::Draw the parameter EDA_DRAW_PANEL* aPanel by EDA_RECT* aClipBox, which is the actual parameter used by Draw.
This change make more easy to  use this function when a EDA_DRAW_PANEL canvas is not used to draw texts.
Remove dead code in worksheet.cpp.
2013-06-29 11:52:22 +02:00
Lorenzo Marcantonio 42709330e0 Better strings for the translators (converted concatenations to formats) 2013-04-09 19:49:01 +02:00
Lorenzo Marcantonio 675f8d4a0b Typedef STATUS_FLAGS to encapsulate EDA_ITEM bitmapped flags 2013-03-28 20:12:46 +01:00
Baranovskiy Konstantin e37372f45f Eeschema border and title block DXF plot color bug fix. 2013-02-21 18:45:46 -05:00
Wayne Stambaugh f8a56d446f Base object decoupling improvements.
* Improve MSG_PANEL_ITEM to handle message panel information.
* Create containers for passing message panel items between objects and
  the message panel.
* Rename EDA_ITEM::DisplayInfo to EDA_ITEM::GetMsgPanelInfo.
* Remove all direct manipulation of EDA_DRAW_FRAME from all objects derived
  from EDA_ITEM.
2013-01-12 12:32:24 -05:00
jean-pierre charras 143af26952 Eeschema: code cleanup, remove dead code and some global and useless variables 2012-09-28 19:47:41 +02:00
Lorenzo Marcantonio e771112259 Enforced EDA_COLOR_T type and minor const-ification 2012-09-02 14:06:47 +02:00
Lorenzo Marcantonio 082d901d60 Encapsulated drawmode as an enum for type checking 2012-09-01 15:38:27 +02:00
jean-pierre charras 61acac28e1 Add patch from Lorenzo Marcantonio. Fix some warning issues, and zlib issue under Windows (zlib sources added) 2012-05-03 20:37:56 +02:00
Wayne Stambaugh 57d75a75a8 More internal unit improvements.
* 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.
2012-04-13 14:51:24 -04:00
Wayne Stambaugh 45445dd88f Minor code improvements and coding policy fixes.
* BLOCK_SELECTOR class is not longer derived from EDA_ITEM.
* Encapsulate BLOCK_SELECTOR class member variables and add access methods.
* Move HandleBlockBegin() function from block_commande.cpp to drawframe.cpp.
* Remove virtual methods from top level derived objects per future
  coding policy change.
* Remove Doxygen copydoc statement from objects derived from EDA_ITEM
  since the comments are automatically copied to the derived object.
* Removed copy and pasted Doxygen comments from objects derived from
  EDA_ITEM.
2012-03-26 19:47:08 -04:00
Wayne Stambaugh 058e17edf7 Minor code and Doxygen comment improvements.
* Remove double Clone() function calls from all classes derived from
  EDA_ITEM.
* Lots of Doxygen comment warning fixes.
2012-03-17 10:39:27 -04:00
Wayne Stambaugh 4a7394038f Minor Eeschema LIB_ITEM object improvements. 2012-02-27 18:02:08 -05:00
Dick Hollenbeck b8a0ab4c52 switch to <> for includes from "" per conversation with Jean-Pierre and Wayne, adjust search paths 2012-01-22 22:33:36 -06:00