Commit Graph

50 Commits

Author SHA1 Message Date
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
Wayne Stambaugh 409d6e8ea2 Eeschema schematic object improvements.
* Remove unnecessary copy constructors from schematic and component
  library objects.
* Add comment to class definitions where the default copy constructor
  generated by the compiler was adequate.
* Add assignment operator to EDA_ITEM, SCH_ITEM, and all schematic
  objects where the default assignment operator generated by the
  compiler would not be adequate.
2012-01-09 15:26:55 -05:00
Wayne Stambaugh 8985a1807b Encapsulation and other minor improvements.
* 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.
2011-12-29 15:11:42 -05:00
Wayne Stambaugh 6c28cdc62c More encapsulation work and other minor improvements.
* EDA_RECT and EDA_ITEM completely encapsulated.
* Removed unnecessary EDA_ITEM member m_Selected and replaced functionality
  with SELECTED flag bit.
2011-12-21 08:42:02 -05:00
Dick Hollenbeck 463c17b807 fix EDA_ITEM::Show() prototype bug, fix KICAD_PLUGIN::Save() problem with netclasses. 2011-12-14 11:25:42 -06:00
Dick Hollenbeck 74ccc4b558 ++common
* changed all the RotatePoint() functions in trigo.{h,cpp} to take a double as the
    angle, which is still in tenths of degrees for now.
  * EDA_TEXT::m_Orient is now double, still in tenths of degrees (for a short while),
    but the double means parsing files and saving them use a different format string.
++pcbnew
  * DRAWSEGMENT::GetStart() and GetEnd() do not operate for S_ARC like they used to.
    They are now simply accessors for m_Start and m_End.  Use DRAWSEGMENT::GetArcStart()
    and GetArcEnd() and GetCenter() for arcs.  specctra_export.cpp was the only
    source file dependent on the old behavior.
  * DIMENSION::m_Text is now contained, not dynamically allocated.
  * more kicad_plugin work.
2011-12-13 22:43:51 -06:00
jean-pierre charras 4221c3619a Eeschema: bug 880132 : partial fix.
Pcbnew: remove useless code.
Doc: remobe obsolete reference to MINIZIP (which do not exist now)
2011-11-11 08:00:51 +01:00
Wayne Stambaugh 3541335a08 Use output formatter to save component library files and objects. 2011-11-01 11:06:26 -04:00
Wayne Stambaugh 8cad403d23 Use line reader to load component library files and objects. 2011-10-31 16:49:48 -04:00
Wayne Stambaugh ebc7259a91 Rename WinEDA_App class to EDA_APP and remove redundant includes. 2011-09-06 10:09:40 -04:00
jean-pierre charras fb8a6bf164 Libedit: actual line thickness taken in account by collector. Thick lines are now more easy to locate. Fix incorrect boundary box calculations for LIB_PIN items. Very minor other fixes. 2011-05-25 12:42:56 +02:00
jean-pierre charras 0b91eb30b2 Minor code cleaning and minor enhancement. 2011-05-22 21:08:34 +02:00
jean-pierre charras f81c237d43 Libedit: add block rotate and block mirror horizontally 2011-05-20 20:29:35 +02:00
Wayne Stambaugh 86bf955db7 Add hit testing clarification to schematic library editor.
* Create library collector class.
* Add clarification menu to library editor when multiple items are found
  at the current position.
* Add get clarification menu text to all objects derived from LIB_ITEM.
* Add get menu bitmap for all objects derived from LIB_ITEM.
* Improve LIB_PIN bounding box calculation.
* Rename LIB_ITEM::DoGenCopy to doClone to match behavior defined in base
  class EDA_ITEM.
* Minor class renaming for improved code consistency.
* Added less than operator to EDA_ITEM.
2011-04-27 15:44:32 -04:00
jean-pierre charras 135a62748f Eeschema: enhanced Pin editor dialog. 2011-04-18 22:22:17 +02:00
Vladimir Ur 668bdfa695 Made symbol text capable of overlining. Format for text is slightly changed: now text with quotes and/or tildes saved in quoted format: it will cause libraries to fail loading in older versions when ~s or "s are used in text. 2011-04-12 20:23:12 +04:00
Wayne Stambaugh 67f70fe079 Coding style and Doxygen comment fixes.
* Rename EDA_Rect class to EDA_RECT.
* Rename EDA_TextStruct class to EDA_TEXT.
* Remove duplicate Doxygen comments from sch_sheet_path.cpp.
2011-03-29 15:33:07 -04:00
jean-pierre charras 92952b70aa Use UTF-8 encoding only in kicad files. Under Linux, this was already the case. Under Windows, texts with non ascii characters must be corrected.
This ensure compatibility between platforms.
2011-02-28 19:36:19 +01:00
Wayne Stambaugh 73e38ce98c EESchema code refactoring and coding policy naming fixes.
* 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.
2011-01-21 14:30:59 -05:00
jean-pierre charras 5bab73d638 Eeschema: fix issues in drag command (mainly hotkey command and forgotten wire ends connected to components to drag).
Rename EDA_Rect::Inside to EDA_Rect::Contains ( EDA_Rect::Inside( const EDA_Rect& aRect ) was very ambiguous )
 Fix some Doxygen warnings and erroneous comments; Add comments.
2010-12-20 18:44:25 +01:00
Wayne Stambaugh 7cb34aece7 Schematic component object encapsulation and Doxygen comment warning fixes. 2010-12-14 10:56:30 -05:00
Wayne Stambaugh adb4ad1a7b Schematic object improvements and other minor fixes. 2010-12-10 14:47:44 -05:00
jean-pierre charras 8e0937e6a2 Pcbnew: code cleaning, dialogs converted from Dialogblocks to wxFormBuilder, file housekeeping. Add patch from Manveru. 2010-11-27 14:09:18 +01:00
Dick Hollenbeck 636b2d301e function comments, fix ones in *.cpp files until they can be deleted if they exist in the headers 2010-11-12 10:36:43 -06:00
Wayne Stambaugh 76aa3f6e1c EESchema schematic object refactoring and header rationalization. 2010-11-10 10:30:12 -05:00
Wayne Stambaugh 1e7d95d58e Begin schematic object rationalization and other minor improvements 2010-10-26 16:25:48 -04:00
Wayne Stambaugh 6566b0c5fa Schematic component library object improvements and other minor fixes. 2010-10-25 11:43:42 -04:00
Wayne Stambaugh 185a2544b5 Component library editor bug fixes and other minor fixes.
* Fix bug that prevented component from being replaced in library when
  the component root name was changed.
* Fix drawing bug when changing text or field item string while move in
  progress.
* Fix drawing bug when rotating text item while move in progress.
* Prevent undo or redo when editing a component draw item.
* Fix assert bug when replacing component in library when the component
  root name was changed.
* Fix bug in field editor caused by new root alias implementation that
  prevented any field from being changed.
* Fix minor spacing issues with EESchema find dialog.
* Deprecate remaining internal linked list code from component library
  objects.
* Rename pin object files to match new library object file naming
  scheme.
* Move LIB_TEXT object definition into it's own header file.
2010-10-22 08:11:52 -04:00
Wayne Stambaugh 285d9b649d Major component library ojbect editing code refactor.
* All library component object editing is now performed with the ojbect
  except LIB_PIN (coming soon).
* Added TRANFORM class to handle coordinate transforms.
* Remove old transform matrix functions.
* More file renaming to align them with the other component library
  object file names.
* Fix hot key bugs in library editor to disable edit keys while an item
  is being edited.
* Fixed bug when cancelling rotation of text and field objects while
  being moved.
2010-10-20 16:24:26 -04:00
Renamed from eeschema/class_BodyItem_Text.cpp (Browse further)