Commit Graph

86 Commits

Author SHA1 Message Date
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 e07b4cbe86 github_plugin.cpp: in error message relative to"cannot get zip archive...", line 496, make the sentence relative to http GET command not translatable
inside the full translated message.
2014-01-27 09:48:17 +01:00
jean-pierre charras fe97521bda Pcbnew: fix Bug #1272926 (Texts are now not accepted on edge cuts layer) 2014-01-26 18:30:20 +01:00
jean-pierre charras c029dc398b Eeschema: fix compatibility with old schematic files, which can contain markers.
Pcbnew: better test for allowed layers when creating/editing Dimensions and some other Graphic items
Drc: fix comments and messages for some drc tests.
To do: fix issues in active layer selection when creating a track and layer pair selection dialog
2013-09-11 17:30:21 +02:00
Dick Hollenbeck efb34166ea *) retain grid origin in the BOARD and save it in legacy and kicad board files.
*) add hotkey for setting the grid origin as 'S', in board editor, module editor.
*) re-position the function interface for cursor movement from BASE_SCREEN into
   class EDA_DRAW_FRAME.  This is a prelude to getting rid of BASE_SCREEN or
   splitting it up.
2013-08-03 00:15:23 -05:00
Wayne Stambaugh c9be8bfdd4 Pcbnew footprint library table work in progress.
* Add code for loading, modifying, and saving the global and project
  footprint library tables.
* Add code to load MODULE objects using the footprint library table to
  the footprint viewer.
* Add static methods to FP_LIB_TABLE to support loading footprint library
  tables.
2013-05-20 10:49:20 -04:00
Lorenzo Marcantonio 42709330e0 Better strings for the translators (converted concatenations to formats) 2013-04-09 19:49:01 +02:00
Lorenzo Marcantonio b525e3be55 Factored out text anchor drawing
More layer classification cleanup
2013-04-09 18:00:46 +02: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 bb6795ddf1 Pcbnew: drag functions: serious cleanup and better code. Use now the connectivity functions to find tracks connected to pads,
and therefore  tracks are now dragged when a end point is inside a pad, not necessary on the pad position.
However, drag functions still need more cleanup.
2012-09-11 09:33:17 +02:00
jean-pierre charras 018b080001 Pcbnew: Add keepout areas (Copper zones without tracks or/and vias).
This is *a work in progress*, so some features are missing, and/or could be modified.
Mainly keepout zones are not yet exported to autorouters, and pads are not taken in account.
Some code cleanup in polygon.*
2012-07-13 20:55:29 +02:00
Marco Mattila b7c5649463 Add copy to text items in pcbnew. Automatically mirror text items added to back silkscreen (bug 1017446). 2012-07-04 22:50:47 +03:00
jean-pierre charras 0028c05484 Pcbnew: fix issues in kicad nanometer in zone ediition and detection.
autoroute functions: code cleaning
2012-06-17 18:06:12 +02:00
Dick Hollenbeck aac1010636 more eagle_plugin work 2012-05-22 12:51:18 -05:00
jean-pierre charras 8f62c6aa05 Move AddMenuItem inline functions outside wxstruct.h in a new file (menu_helpers.h)
Enhancements in AddMenuItem (that accepts now a menu type)
Partial use of the Edwin van den Oetelaar's patch (patch not fully working or correct)
2012-04-09 11:16:47 +02:00
jean-pierre charras 623ae37f22 Pcbnew - ModView: add 3D view, and fix issues. 2012-02-10 09:49:43 +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
Dick Hollenbeck dd091fc6b9 merge in mainline into KICAD_PLUGIN work, which is for the PCBNEW nanometer support 2012-01-05 10:30:58 -06:00
Dick Hollenbeck 697f912307 moving objects into BOARD which are saved in a *.brd file, for PLUGIN access 2011-12-30 23:44:00 -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
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 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
Wayne Stambaugh 95891006cd More EDA_DRAW_FRAME encapsulation work. 2011-12-14 15:03:15 -05:00
jean-pierre charras 683921f98d Eeschema: fix crash in intermediate netlist generation when a component has no pins (like logos or images).
Pcbnew: texts in dimensions can be now moved.
Gerbview: fix incorrect number of layers  in export to pcbnew function.
2011-11-24 20:57:41 +01:00
Wayne Stambaugh 2c251196c6 Minor dialog fixes and code cleaning.
* Grammar and spelling fixes in Eeschema, CvPcb, and Pcbnew path and
  library dialog tool tips.
* Translate the French file name subrill.cpp to highlight.cpp.
* Lots of coding style policy fixes.
2011-10-17 16:01:27 -04:00
Wayne Stambaugh c2f1113e5d Fix Pcbnew KICAD_T enum names for consistency. 2011-10-01 15:24:27 -04:00
Wayne Stambaugh edd35b4e90 PCB common library header rationalization.
* All header files used to create the PCB common library now compile as
  stand alone code.  This prevents the need to define them in a specific
  order to make source code compile properly.  It should also now be
  possible to relocate the source code to build the common PCB library
  to a separate folder.
2011-09-23 09:57:12 -04:00
Wayne Stambaugh e26cdada42 Translate French code names and comments and other minor code cleaning. 2011-09-20 11:07:52 -04:00
Wayne Stambaugh e4d1fa12ac PCBNew trace search code refactoring and other minor fixes.
* Refactor trace search functions into the appropriate object.
* Translate French code names and comments.
* Lots of coding style policy fixes.
2011-09-16 10:13:02 -04:00
Wayne Stambaugh 0c44335795 Lots and lots of PCBNew code cleaning and fix build bug introduced in r3108.
* Changed <wx-2.8/xml/xml.h> to "xnode.h" in pcbnew_config.cpp to fix bug
  when building against wxWidgets 2.9 and above.
* Convert broken wxXmlNode code to use XNODE.
* Overloaded XNODE constructor for creating child nodes.
* Translate French naming conventions.
* Translate French comments.
* Remove tabs from several source files.
* Coding style policy and Doxygen comment fixes.
2011-09-07 15:41:04 -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 14e3507e16 gr_basic: fix incorrect clipping of thick lines (due to changes in code, the thickness was not taken in account to calculate the clip box size)
Pcbnew: fix a very minor bug.
2011-04-14 20:44:46 +02:00
jean-pierre charras f6669b7845 Gerbview: code cleanup: remove dead code and obsolete options. Coding policy class naming fixes.
others: fix minor issues.
2011-03-12 10:50:21 +01:00
Wayne Stambaugh 018292a8c6 PCBNew auxiliary tool bar changes and other minor improvements.
* Remove clearance and net class name read only text boxes from PCBNew
  auxiliary tool bar.
* Display full net class information in message panel when an object that
  supports net classes is selected.
* Move coordinate string conversion function to EDA_DRAW_FRAME object and
  made it more versatile.
* Refresh message panel text when units change.
2011-03-11 10:53:28 -05:00
Wayne Stambaugh 1010601a78 PCBNew control update bug fixes, fixes lp:725963.
* Fix grid select box update bug on context menu.
* Fix via size and track width select box update bugs.
* Fix layer pair indicator button update bug.
* Fix auto track width tool bar control enable bug.
* Fix via size and track width select status bug in context menu.
* Fix layer select box and layer control widget select bug when current
  layer is removed.
* Add virtual function to notify objects derived from EDA_DRAW_FRAME that
  the units setting has changed.
* Coding policy class naming fixes.
2011-03-01 14:26:17 -05:00
jean-pierre charras cdffc3d15f Pcbnew: Better selection of corners and edges in zones. Usefull when selecting edge/corner by right clicking on a zone outline, for hight density boards. 2011-03-01 14:59:21 +01: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
jean-pierre charras 8bde66afbe Eeschema, Pcbnew, fix issues when creating new pins, tracks or segments. 2011-02-24 13:35:14 +01:00
jean-pierre charras d39df05275 Eeschema: fix crash when starting ERC.
Fix other issues.
2011-02-23 14:48:19 +01:00
jean-pierre charras 6910df3972 Pcbnew: fix 2 (minor) issues
Cvpcb: code cleaning.
2011-02-22 18:59:46 +01:00
Wayne Stambaugh ee003180bc Global variable removal and minor Doxygen comment fixes.
* Remove global key press variable.  The key press is know passed to
  GeneralControl().
* Removed unused old mouse buttons global variable.
2011-02-22 11:43:03 -05:00
Wayne Stambaugh bdca3c5efb All control state handling is now performed in wxUpdateUIEvent handlers.
* Old control state handling code completely removed in all applications.
* Factor common control state handlers into EDA_DRAW_FRAME.
* Replaced EDA_ITEM test for newness with IsNew() method.
* Factor vertical right toolbar command handlers out of giant edit command
  switch statement in EESchema and PCBNew.
2011-02-21 08:54:29 -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 6a26a7f9bf Use logical cursor position and other minor changes.
* Remove unused member variable m_SizeVisu from base screen object.
* Move nearest grid position code into base screen object.
* Add get cursor position method to base screen object.
* Add position parameter to OnHotKey method in base draw frame and all
  derived objects.
* Pass logical position on left mouse button click and double click
  events instead of device position.
* Pass logical position to on right mouse button click instead of device
  position.
* Use logical event position parameter for locating items in EESchema
  instead of the stored position.
* Remove unused position parameter when displaying component edit dialog
  in EESchema.
* Comment out debugging macro in eeschema/template_field_names.cpp that was
  preventing debug builds using wxWidgets 2.8.x.
2011-02-02 14:01:21 -05: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
jean-pierre charras dcf7542514 Added hotkey E to edit items. Minor code cleaning 2010-08-10 20:34:26 +02:00
jean-pierre charras 28a3e5840f Added grag labels patch 2010-07-17 13:14:57 +02:00
jean-pierre charras 3097b919ed Pcbnew: Added grid origin patch from Lorenzo Marcantonio. Converted set grid dialog from DialogBlocks to wxFormBuilder, and added in this dialog the grid origin parameters settings. 2010-07-13 12:42:32 +02:00
jean-pierre charras 4787b38a63 Pcbnew: Fixed minor problems (bugs 568357 and 568356). Changed French word COTATION to DIMENSION in class COTATION (now class DIMENSION) 2010-04-23 11:54:40 +02:00
jean-pierre charras b471f8d70c Fixed minor bugs and printing problems, and others minor enhancements 2010-04-22 19:47:10 +02:00