Commit Graph

98 Commits

Author SHA1 Message Date
Marek Roszko 1538d737e7 Split out FILL_T to its own header to avoid spreading eda_item everywhere 2020-10-14 21:51:23 -04:00
Mikolaj Wielgus 400c15b8eb Add mils to units, remove useMils variables 2020-10-03 20:06:56 +00:00
jean-pierre charras 7865d8de43 more cleanup about removing useless include 2020-10-02 15:50:46 +02:00
Jeff Young 64fa400b19 Ease translation a bit.
Also improves the SNR and consistency of the menu item text.  For
instance, a position is rarely useful, while relative sizes can be.

Also removes some unnecessary repitition, such as "Graphic Rectangle"
when "Rectangle" communicates the necessary information.
2020-09-19 18:49:06 +01:00
Jeff Young 1535c83b88 Lay some groundwork for adding distances to DRC errors.
modified:   eeschema/lib_rectangle.cpp
2020-04-24 14:46:22 +01:00
Jeff Young da7205ff32 Re-implement negative-width-means-don't-stroke hack. 2020-04-21 21:17:59 +01:00
Jeff Young 9c8941e040 Remove a bunch of globals. 2020-04-16 17:34:46 +01:00
jean-pierre charras 952e7a5fb4 Eeschema: move some default values to default_values.h.
These default values are used in many files, and some files were using
magic numbers.
2020-04-14 20:15:18 +02:00
jean-pierre charras 6148461484 Eeschema plot: fix (temporary) line 0 thickness.
Plotting lines having 0 thickness is not acceptable and create issues.
2020-04-14 12:43:51 +02:00
Jeff Young 591428b0d9 Remove some problematic global variables.
Fixes https://gitlab.com/kicad/code/kicad/issues/4121
2020-04-05 16:17:04 +01:00
Jon Evans 643c97a2f4 ADDED: Schematic plotting can use a dedicated color theme
ADDED: PDF, PS, and SVG plots can optionally include the page background color

Fixes #1830
2020-03-06 00:01:02 -05:00
Wayne Stambaugh e1900161a7 Eeschema: implement new symbol library file s-expression formatter.
CHANGES: Symbol library file format has been converted to s-expressions.

Add support code for picking apart symbols at some future junction that
will allow full inheritance conversion of existing symbol libraries.  For
now, symbols arranged by unit and body style numbers are nested for round
robin testing of symbol libraries once the parser is complete.
2020-03-03 08:06:22 -05:00
Wayne Stambaugh aeb3281e27 Convert Schematic Internal Units to 100nm 2019-12-30 18:28:00 +00:00
Mark Roszko 11ff16be4e Switch to scoped enums 2019-12-20 14:11:39 +00:00
Jeff Young 51479c2042 Fix several bugs in selection exhibited by 74LS02.
1) Use PenWidth() (which is clipped at 0) instead of Width()
2) Implement an interior HitTest when a PolyLine is filled
3) Brighten background objects as well as foreground
4) Don't HitTest last segment when PolyLine is not filled

Fixes: lp:1834703
* https://bugs.launchpad.net/kicad/+bug/1834703
2019-06-29 20:03:08 +01:00
Jeff Young d6e9bdf07b Convert remaining legacy drawing code to print code. 2019-05-31 21:54:22 +01:00
Jeff Young 323bb0f8e1 Moving PageLayout editor to GAL canvas and modern toolset. 2019-05-24 19:49:09 +01:00
jean-pierre charras 872c8ca37b Remove a duplicate icon. 2019-05-23 16:21:06 +02:00
jean-pierre charras 0a308c4584 Fix minor compil warnings 2019-05-11 11:12:39 +02:00
Jeff Young b83dac68d0 Fix drag-select hit-testing of LibEdit items. 2019-05-10 23:24:27 +01:00
Jeff Young f6e07f575a Rename for clarity.
SetOffset() didn't set anything; it performed an action.
Move() suggests a delta, when it in fact does a SetPosition().
2019-05-10 16:11:57 +01:00
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
Seth Hillbrand 94fa734c61 eeschema: Fix plot line width for negative lines
Negative width lines are used to hide the outline of shapes in eeschema.
Plot should not show these lines.
2019-03-11 12:08:16 -07:00
jean-pierre charras 576a0af293 Eeschema: make draw functions working with "old" libraries using a useless large negative line width (like -1000 or -2000 mils).
They are now clamped to -1.

This is only a workaround to avoid ugly artifacts
2018-10-20 13:08:33 +02: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
jean-pierre charras 5d72aebd22 Fix code after renaming files 2018-01-29 16:40:22 +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
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
Simon Richter 1b2fd6a382 Replace BOOST_FOREACH with C++11 range based for. 2016-06-29 16:07:55 -04:00
unknown 82b3744ddd fix very minor issue: Eeschema creating extra whitespace in .lib 2016-03-20 15:53:02 +01:00
Mark Roszko 33419ee4bf Eeschema: remove unused headers, unused variables, redundant casts, and minor boolean tweaks. 2015-11-03 14:44:05 -05:00
jean-pierre charras 991927a177 Fix crash (only on Linux) when exporting a footprint from the footprint wizard frame.
Replace %zu be %d in wxString::Format (%zu format not known by wxString::Format on Windows 32 bits)
2015-09-07 17:20:15 +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
jean-pierre charras a550ff84db Fix some coverity and cppcheck warnings (most are very minor issues: not initialized members and initialized but not used variables) 2015-03-04 10:26:00 +01:00
Wayne Stambaugh 25b9a42ea3 More Coverity scan error fix goodness. 2015-02-28 15:50:35 -05: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
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
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 6bfff89fe5 merge tip in, resolve. 2014-03-20 01:24:33 -05: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