Commit Graph

97 Commits

Author SHA1 Message Date
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
Bernhard Stegmaier a457dffd8f OSX drawing artifacts 2014-06-16 11:32:23 -05:00
Dick Hollenbeck 8cb3423262 Remove class RETAINED_PATH, put is main member function into SEARCH_STACK.
Change class PROJECT to use a generalized wxString in place of the
RETAINED_PATH items, so that new session and project specific strings
of any purpose can be saved there, for the life of a session.
2014-06-10 10:56:43 -05: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
Henner Zeller 392e3a0a2b Eeschema component selection dialog improvements.
* Allow to select units in components that have more than one right in the
  component chooser dialog.
* Keep chosen unit in history.
* Show preview of current component unit as thumbnail image next to the
  description box.
* Fixes lp:1280567
2014-02-18 16:41:27 -05:00
jean-pierre charras a094f7d5b5 Fix some issues in modview, relative to few incorrect use of some wxAuiManager functions.
Fix not working + and - keys in layers manager.
Fix typo errors and modify some messages to make translator's life more easy.
2014-01-19 14:12:57 +01:00
Wayne Stambaugh 73ca1ed754 Eeschema multiple unit component nomenclature improvements (fixes 1226874).
* Replace all occurrences of the word "part" with "unit" when referring to
  multiple unit components for improved consistency.
* Replace "shared by" with "common to" when referring to objects (lines, arcs,
  pins, etc.) that are common to all units.
* Improve wording in library component properties dialog.
2013-11-09 11:30:49 -05:00
jean-pierre charras 2043001b0a eeschema: fix Bug #1184318 (Eeschema-Libedit: Reference moving+zooming issue)
and fix a minor issue in netlist dialog.
2013-05-28 10:05:10 +02:00
Dick Hollenbeck c4c58e1279 copyright and formatting 2013-05-24 16:30:27 -05:00
Lorenzo Marcantonio 3b1ddd952f Removed the SAFE_DELETE macro.
In most case the assignment to null was not necessary since it was easily provable that the (local) variable wouldn't have referenced after that anyway.
2013-04-28 16:28:13 +02:00
Lorenzo Marcantonio 42709330e0 Better strings for the translators (converted concatenations to formats) 2013-04-09 19:49:01 +02:00
Wayne Stambaugh 7d0ec1a138 More encapsulation work.
* Complete encapsulation of the MODULE class.
* Complete encapsulation of the EDA_TEXT class.
* Encapsulate most of the ZONE_CONTAINER class.
* Add pcbcommon library as a dependency for reSWIGging the scripting
  support.  This should cover most dependency cases.
2013-03-18 15:36:07 -04:00
Jacobo Aragunde Perez da757938e6 Commit patch for bug 1116059 (Inconsistency between confirmation dialogs) 2013-02-07 18:35:37 +01:00
jean-pierre charras dd3b684ce6 Eeschema: fix Bug #1095005 2013-01-01 21:52:37 +01:00
Dick Hollenbeck dd519d68ea remove unused #include <wxfstream.h> from several places 2012-10-29 16:56:18 -05:00
Dick Hollenbeck 7c5e42b4d0 switch from STREAM_OUTPUTFORMATTER to FILE_OUTPUTFORMATTER mostly throughout,and minor richio factoring 2012-10-25 10:41:20 -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
jean-pierre charras ed5585eb6c Libedit: fix bug (svg export does not work)
other minor fixes.
2012-03-06 15:08:59 +01:00
jean-pierre charras f1e5be9a67 Fix @JP messages (no bugs, just comment lines)
Eeschema: Viewlib is now accessible from Libedit (to browse libs or load a component to edit)
Libedit: uses now the same dialog as the schematic editor to load a component
Some code cleaning.
2012-02-19 20:53:11 +01: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 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
jean-pierre charras 375310f2ab 3D view: Fix Bug #908871
Eeschema: fix a minor issue.
2011-12-27 19:08:50 +01:00
Wayne Stambaugh c2e5fcaec8 More encapsulation improvements.
* EDA_DRAW_FRAME completely encapsulated.
* Encapsulate the the low hanging fruit in EDA_DRAW_PANEL.
2011-12-22 08:28:11 -05:00
Wayne Stambaugh fac288cffa More encapsulation work and other minor improvements.
* EDA_DRAW_FRAME completely encapsulated except for DrawFrame member.
* Moved members specific to Pcbnew from EDA_DRAW_FRAME to PCB_BASE_FRAME
  or PCB_EDIT_FRAME as appropriate.
* Replace EDA_TOOLBAR with wxAuiToolBar as EDA_TOOL bar provided no
  additional functionality and made code less readable.
* Remove EDA_TOOLBAR class definition from wxstruct.h and delete file
  wineda_toolbar.cpp.
* Rename tool bar members to something more descriptive since the
  horizontal and vertical references wont mean anything once the
  tool bars are movable.
* Lots of dead code removal.
2011-12-16 08:32:23 -05:00
Wayne Stambaugh 7a5e6a2d66 Remove message dialogs from COMPONENT_LIBRARY class.
* Move the component library save file creation and write error dialogs
  into the appropriate frame object.
* Change the save component library and document definitions take an
  OUTPUTFORMATTER object instead of a file name.
* Change the component alias save document definition function to take
  an OUTPUTFORMATTER object instead of a file handle.
2011-11-11 15:10:24 -05:00
Wayne Stambaugh cd0b231656 Minor fixes, dead code removal, and coding policy fixes.
* 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.
2011-11-08 11:37:25 -05:00
Wayne Stambaugh a834c47be5 Fix schematic library pin editing bug. Fixes lp:809506
* Change edit pin per part flag to only have effect when editing
  component with multiple parts or alternate body styles.
* Move global edit pin pert part variable into library editor frame
  object.
* Note that this only fixes the bug when the component does not have
  multiple parts or alternate body styles.
2011-10-28 09:43:37 -04:00
Wayne Stambaugh 4b853dedb4 Application name capitalization fixes.
* 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.
2011-09-30 14:15:37 -04:00
Wayne Stambaugh ebc7259a91 Rename WinEDA_App class to EDA_APP and remove redundant includes. 2011-09-06 10:09:40 -04:00
Wayne Stambaugh c64a6937f4 Add user write permission tests to EESchama and other minor fixes.
* Add general purpose user write permission test function to base
  window class.
* Check user write permissions before saving project, schematic and
  library files.
* Remove displaying file dialog every time the project file is saved.
* Display absolute paths for non-root sheet file in title bar.
* Remove redundant command table entry from schematic editor.
* Remove unused variables to fix GCC 4.6 warnings.
* The usual Doxygen comment and coding style policy fixes.
2011-08-18 15:25:12 -04:00
Wayne Stambaugh e7eef8cf7b Prevent component library editor from saving read only files (fixes lp:811118)
* Disable save library command when user does not have permission to write
  the active library.
* Append the active library file name displayed in the title bar with read
  only when the user does not have write permission.
* Test the selected folder permissions when user chooses the save library
  as command.
* The obligatory coding style policy fixes.
2011-08-12 13:43:16 -04:00
jean-pierre charras 09c038be5c Eeschema: add direct acces to LibEdit in popup menu, when a component is selected ( Whishlist #788621 ). This new command calls Libedit and load the lib component corresponding to the selected schematic component. 2011-05-28 20:51:32 +02:00
Wayne Stambaugh cb647737ee Improve handling of tool bar command IDs.
* Make EDA_DRAW_FRAME current tool ID member variable private.
* Added global no tool selected ID to replace application specific no
  tool selected IDs.
* Change SetToolID to prevent setting the tool ID to anything less than
  the new global no tool selected ID and assert on debug builds.
* Change command and update user interface command event handlers to use
  new global no tool selected ID.
* Fixed schematic library editor add pin hot key handler.
2011-02-24 15:22:12 -05:00
Wayne Stambaugh c02d90e9a7 Use wxUpdateUIEvent in CVPcb and other minor changes.
* CVPcb now uses wxUpdateUIEvent instead of set toolbars.
* Removed duplicate event handlers in CVPcb that were factored into
  EDA_DRAW_FRAME.
* Fix definition of GeneralControle() in CVPcb that prevented it from being
  called.
* Remove rarely used and scary refresh code GeneralControle() method in all
  main frame windows.
* Factor zoom menu and tool bar command IDs down to EDA_DRAW_FRAME.
2011-02-21 16:07:00 -05:00
Wayne Stambaugh 7b8b51b240 Draw panel object refactoring and other minor code cleaning.
* Rename all member variables and methods that reference the cross hair
  code in draw panel object from cursor to cross hair to eliminate confusion
  between the two concepts.
* Rename cursor capture call backs in draw panel object to improve code
  readability.
* Create helper class for turning off the cross hair while drawing.
* Remove redundant block clear code.
* Remove redundant mouse capture call back reset code when end capture
  call back is called.
* Remove unused function definitions in base draw frame object.
* Lots of minor coding policy and doxygen comment fixes.
2011-02-11 15:48:13 -05:00
Wayne Stambaugh 0d8cb9b53c EESchema improvements and other minor fixes.
* Remove base screen methods from draw frame object and correct current
  screen methods in derived objects.
* Move restore old wires function code into schematic screen object.
* Make add junction method use current screen position instead of store
  position.
* Move poly line ghosting function into the delete current segment method
  as that was the only place is was being used.
* Add method to base schematic object of testing if object has a label
  that can be incremented.
* Simplified the schematic hierarchy traversing code.
* PCBNew Doxygen warning fixes.
2011-02-04 21:21:11 -05:00
Wayne Stambaugh 50f063da07 Changes to use cursor position as parameter and snap to grid settings.
* Changed managed cursor callback definition to include the current
  cursor drawing position.
* Modified all managed cursor callbacks to match new definition.
* Added snap to grid option to base drawing frame object.
* Changed add no connect managed cursor callback to use new position
  parameter instead of the stored one.
* Lots of coding policy fixes.
2011-02-03 14:27:28 -05:00
Wayne Stambaugh d657b43052 Use wxDC for all coordinate manipulations.
* Remove all occurrences if #ifdef USE_WX_ZOOM and all associated code within
  the #else/#endif block ( old zoom code ).
* Removed the build option for USE_WX_ZOOM from CMakeList.txt and config.h.in.
* Removed all scaling code in base screen object.
* Fixed buffered paint and buffered client DC on Windows.  Buffering works
  properly on Linux and Windows.
* Modified kicad_device_context.h to automatically uses buffering on platforms
  where double buffering is supported natively.
* Remove all of the scaled versions of the drawing functions in gr_basic.cpp
  and any support code.
* Removed all traces of ActiveScreen global variable from eeschema and
  gerbview.
* Renamed Recadre_Trace to RedrawScreen in draw frame object.
* Renamed PostDirtyRect to RefreshDrawingRect in draw panel object.
* Lots of code cleaning an Doxygen comment improvements.
2011-01-30 17:22:38 -05:00
Wayne Stambaugh df48725551 Restore library editor value field rename behaviour and other minor fixes. 2010-12-02 16:41:56 -05:00
Wayne Stambaugh f6c8066477 More EESchema dialog file housekeeping and coding policy fixes. 2010-11-20 16:59:00 -05:00
Wayne Stambaugh ccabd605a5 More EESchema dialog file housekeeping and coding policy fixes. 2010-11-19 11:28:46 -05:00
Dick Hollenbeck 6c9244e8c3 fix function comments, this time ones in *.cpp files until they
can be deleted later if they exist in the headers, or moved to 
headers if they should exist in the headers.
2010-11-12 10:59:16 -06:00
Wayne Stambaugh 76aa3f6e1c EESchema schematic object refactoring and header rationalization. 2010-11-10 10:30:12 -05:00
Wayne Stambaugh 6566b0c5fa Schematic component library object improvements and other minor fixes. 2010-10-25 11:43:42 -04:00
Vovanium 15652d8d34 Make option not uppercasing component names. I'm so bored with my Eeschema is convert ADuC, Si, component names to ADUC, SI etc., so I contribute this patch so anyone now may keep components 2010-10-22 19:02:11 +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 3335ccd98d Initial work on new component library stucture.
* Use C++ map in component library instead of boost::ptr_vector.
* Drop Boost pointer containers for standard C++ containers.
* Moved duplicate name user interface elements from library object to
  library editor.
* Added code to support direct addition and replacement of component
  alias objects into libraries.
* Removed temporary strings used to add and remove alias objects.
* Libraries only store alias objects, components now accessed thru alias.
* Simplify library API for adding, removing, and replacing components.
* Updated edit component in library dialog and library editor to reflect
  component library object changes.
* Fixed bug in library viewer when displaying alias name.
* Made a few header files compile stand alone per the new coding policy.
* Remove some dead code and the usual code formatting fixes.
2010-10-04 14:54:14 -04:00
Wayne Stambaugh 0c3541b7c1 Component library object refactoring and minor code cleaning. 2010-09-09 13:37:25 -04:00
jean-pierre charras 5605ce89ff Fixed very minor issues.
Fixed compil warning under wxWidgets 2.9.1.
File beautification
Statring using wxTextEntryDialog instead of Get_Message (because Get_Message does not handle properly cancel option)
2010-07-20 12:30:40 +02:00