Commit Graph

71 Commits

Author SHA1 Message Date
Tomasz Włostowski 81d1e17f02 refactoring: renamed pcbstruct.h to pcb_display_options.h, DISPLAY_OPTIONS->PCB_DISPLAY_OPTIONS 2017-11-03 20:02:06 +01:00
Tomasz Włostowski 32185ddcd3 Multiple improvements concerning colors, configuration handling and legacy features in pcbnew:
- support for background color setting
    - removed several global config settings (such as g_Drc_On)
    - wrapped most of global config settings in PCB_GENERAL_SETTINGS class
    - reorganized PCB general options dialog to clearly mark which options concern only the legacy canvas
    - new GAL feature for legacy users: double-click (or E) to change track width available as an option.

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

Fixes: lp:1707145
* https://bugs.launchpad.net/kicad/+bug/1707145
2017-08-04 16:06:57 +02:00
jean-pierre charras 1ada4863fc Pcbnew: fix incorrect UI behavior of "Zoom to selection" tool in GAL canvas. 2017-06-13 09:24:21 +02:00
Jon Evans 3ec28e2acf Refactor layer enumerations to all live in the same place 2017-03-30 16:01:48 -04:00
Mrio Luzeiro d8eab321f7 3D Viewer: complete refactor of the 3D viewer.
* Split and rewrite the preview window and canvas.
* Create a new class for handling the board information.
* Adds new render targets: openGL, legacy, and ray tracing.
* Render targets take full advantage of the new 3D plugins system and 3D cache
  for a fast 3D model loading.
* Faster board loading.
* New OpenGL render is faster than the old one.
* New ray tracing render target with a post processing shader.
* Use of new 3D plugins (WRL, X3D, STEP and IGES) and 3D model caching.
* Preview of 3D model while browsing the file name.
* 3D preview of the footprint while adding / align 3D shapes.
* Render of 3D models according to attributes: Normal, Normal+Insert, Virtual.
* Pivot rotation centered in one point over the PCB board.
* Shortcuts keys improved for XYZ orientation..
* Animated camera.
2016-07-19 13:35:25 -04:00
Chris Pavlina 5285962775 Remove option to not show footprint ratsnest when moving
This option only exists in legacy, with no real plan to port it to GAL. Nobody
seems to use this; there isn't really much of a point to it. Bye!
2016-06-11 22:34:07 -04:00
Wayne Stambaugh 96832a5185 Fix build error cause by previous commit when KICAD_SCRIPTING_WXPYTHON is not enabled. 2015-12-21 10:39:36 -05:00
unknown 1ee7458140 1. Fixed copy paste error in append_board_to_current.cpp ruining a if else condition, should fix a possible bounding box computation bug
2. Whole bunch of pointless casts removed
3. Unused variables removed
4. Fix bug caused by JP on April 25, 2015 where strings were adjusted for translation and the hotkeys section table accidentally swapped the footprint editor title with tag, resulting in "footprint editor" being exported instead of "[footprinteditor]"
No functional changes besides #4, technically it'll "break" imports hotkeys files but April 25 broke imports as well.
2015-11-04 09:48:34 +01:00
Wayne Stambaugh bc6e9e855c Pcbnew: fix broken board ratsnest visibility storage behavior.
* The board ratsnest visibility state was being saved in both the board file
  and the Pcbnew configuration files causing visibility state issues.  Use the
  board file to save the board ratsnest visibility state.
* Remove all of the board ratsnest save visibility state to configuration file
  code.
* Add code to set the board modified property when layer visibility states
  change to give the user a chance to save the state in the board file.
* Some minor code cleaning and coding policy fixes.
2015-10-14 14:12:17 -04:00
jean-pierre charras 9cfb97d8b4 Add hight contrast option in Modedit. In hight contrast mode, solder masks and solder paste are shown.
this option was possible only by modifying the way display options are managed.
before these changes, display options were a global DISPLAY_OPTIONS class instance.
Now each EDA_DRAW_FRAME(and derivated classes)  includes its own DISPLAY_OPTIONS class instance.
As a consequence, some duplicate display option variables in these classes have been removed, because there were just duplicate variables of the  DISPLAY_OPTIONS class instance.
2015-01-10 11:27:49 +01:00
jean-pierre charras 7e431a0d4b Pcbnew: Console python: use a wxMiniFrame to show the console and remove the management by a EDA_PANEINFO, which was not the right way to manage this console. 2014-10-31 08:51:22 +01:00
Mark Roszko 2d008c79fd More module to footprint UI fixes. 2014-10-12 11:12:02 -04:00
jean-pierre charras 5a38d2b657 Rework on env. variable KISYS3DMOD. Until now, was used in different files using different ways, so no consistency between files.
code cleanup.
2014-08-24 09:05:07 +02:00
jean-pierre charras 688dbe5de1 Minor cosmetic enhancement, and try to fix an issue with accelerator keys and the Python scripting console 2014-06-17 20:31:27 +02:00
Maciej Suminski cd8aaee160 Moved most of the board design rules related fields & methods to BOARD_DESIGN_SETTINGS class. 2014-05-13 11:22:51 +02:00
Maciej Suminski 7ec1313cbc Custom width settings taken into account in wxUpdateUIEvent handlers. 2014-05-13 11:22:51 +02:00
Maciej Suminski 23392ce8c9 Upstream merge. 2014-04-02 15:38:59 +02:00
Maciej Suminski 87c9423f0f PCB_EDIT_FRAME::SetActiveLayer() & GetActiveLayer() made public. 2014-03-21 11:17:47 +01: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
Martin Janitschke 29e7638a3c make microwave toolbar accessible from menu (Bug #1285425 ) 2014-02-27 19:48:18 +01:00
Lorenzo Marcantonio aae87178a7 Renamed global variables:
Drc_On => g_Drc_On
Route_Layer_TOP => g_Route_Layer_TOP
Route_Layer_BOTTOM => g_Route_Layer_BOTTOM
Track_45_Only_Allowed => g_Track_45_Only_Allowed
2013-03-27 19:32:12 +01:00
jean-pierre charras ac64da651d Pcbnew: fix a minor bug I created in rev 3912.
Still try to find a better fix for Bug #1100876, however I am thinking the bug is not in Kicad:
looks like a buggy version of wxWidgets is used, which sends sometimes an unwanted wxCommandEvent event,
when an event::Check() is called inside a function called by a  wxUpdateUIEvent event.
2013-01-19 16:01:17 +01:00
jean-pierre charras 81f9f743d3 Pcbnew: fix bug Bug #1101399 (Custom page size gets reset after restarting pcbnew) (bug also in eeschema)
Try to find a better fix for Bug #1100876
2013-01-19 10:58:25 +01:00
jean-pierre charras 129f93b8d3 Try to fix Bug #1100876< Modes (track/footprint) not available.>
It could be a race condition when setting the tools state on and off in PCB_EDIT_FRAME::OnSelectAutoPlaceMode( wxCommandEvent& aEvent ) on some Linux/wxWidgets versions
(does not happen on my computer)
2013-01-18 15:12:57 +01:00
Wayne Stambaugh 8a5ea7ec0d Pcbnew BOARD object encapsulation improvements. 2013-01-09 13:52:44 -05:00
jean-pierre charras 7f07b48e88 Pcbnew: Update incorrect or incomplete copyrights in many files.
Minor code cleaning in autoroute files.
2012-06-08 11:56:42 +02:00
jean-pierre charras 4125ea7789 Gerbview: remove dependencies from Pcbnew.
Should allow Pcbnew code easier to change and Gerbview code more understandable and easier to maintain.
Code cleaning (remove dead code, add comments).
Minor other enhancements.
2012-05-04 19:44:42 +02:00
Dick Hollenbeck 716d21d88a get rid of some globals, share BOARD_DESIGN_SETTINGS from PCB_EDIT_FRAME with FOOTPRINT_EDIT_FRAME 2012-02-02 11:45:37 -06: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 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 95891006cd More EDA_DRAW_FRAME encapsulation work. 2011-12-14 15:03:15 -05:00
Dick Hollenbeck b26580d5df ++PCBNew
* Removed Pcb_Frame argument from BOARD() constructor, since it precludes
    having a BOARD being edited by more than one editor, it was a bad design.
    And this meant removing m_PcbFrame from BOARD.
  * removed BOARD::SetWindowFrame(), and BOARD::m_PcbFrame
  * Removed the global BOARD_DESIGN_SETTINGS which was in class_board.cpp
  * added BOARD_DESIGN_SETTINGS to the BOARD class, a full instance
  * a couple dialogs now only change BOARD_DESIGN_SETTINGS when OK is pressed,
    such as dialog_mask_clearance, dialog_drc, etc.
  * Removed common/pcbcommon.cpp's int g_CurrentVersionPCB = 1 and replaced it
    with build_version.h's #define BOARD_FILE_VERSION, although there may be a
    better place for this constant.
  * Made the public functions in PARAM_CFG_ARRAY be type const.
    void SaveParam(..) const and void ReadParam(..) const
  * PARAM_CFG_BASE now has virtual destructor since we have various way of
    destroying the derived class and boost::ptr_vector must be told about this.
  * Pass const PARAM_CFG_ARRAY& instead of PARAM_CFG_ARRAY so that we can use
    an automatic PARAM_CFG_ARRAY which is on the stack.\
  * PCB_EDIT_FRAME::GetProjectFileParameters() may no longer cache the array,
    since it has to access the current BOARD and the BOARD can change.
    Remember BOARD_DESIGN_SETTINGS are now in the BOARD.
  * Made the m_BoundingBox member private, this was a brutally hard task,
    and indicative of the lack of commitment to accessors and object oriented
    design on the part of KiCad developers.  We must do better.
    Added BOARD::GetBoundingBox, SetBoundingBox(), ComputeBoundingBox().
  * Added PCB_BASE_FRAME::GetBoardBoundingBox() which calls BOARD::ComputeBoundingBox()
2011-12-05 00:15:33 -06: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 ebc7259a91 Rename WinEDA_App class to EDA_APP and remove redundant includes. 2011-09-06 10:09:40 -04:00
jean-pierre charras 098a20a0d8 fix very minor bugs. 2011-03-03 20:08:13 +01: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
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 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
jean-pierre charras e095b07cc3 code cleaning 2010-11-18 22:16:28 +01:00
jean-pierre charras dfc54fb3a5 Fix issue with new layer box, mainly with wxWidgets 2.9.1 2010-11-03 20:42:38 +01:00
jean-pierre charras c0eeafa070 Fix issue with new layer box, mainly with wxWidgets 2.9.1 2010-11-03 19:55:51 +01:00
Marco Serantoni bf67eed7eb OSX adjustments - grid fix - speedup of refresh 2010-09-19 12:23:53 +02:00
Marco Serantoni 86fbcdfd59 Removed redundant AUI Manager Update, should speedup refresh 2010-09-14 19:38:34 +02:00
Dick Hollenbeck bc14e66d78 A little useful feature: even if the default unit can be changed between
inches and mm, the industry is crazy enough to force us with mixed
design. For example I routinely use imperial units for track size and
clearance, but drilling is strictly a metric issue...

So I added a little parser to recognize a suffix specification in the
unit text boxes... so you can put in things like:
1in (1 inch)
1" (idem)
25th (25 thou)
25mi (25 mils, the same)
6mm (6 mm, obviously)

The rules are: spaces between the number and the unit are accepted, only
the first two letters are significant.

As a bonus, it also recognize the period (.) as a decimal point
substituting it with the correct locale character (there was a wishlist
for it, IIRC). Most useful for number pad fans :D
2010-07-12 09:07:09 -05:00
jean-pierre charras 0d485b4b4a fixed bug 564619. 2010-04-17 12:45:00 +02:00
stambaughw 3066c70559 Implement wxDC coordinate handling and wxGCDC.
* Implement code to allow wxDC to handle coordinate conversions between
  device and drawing units.
* Add build settings to enable wxGCDC for wxGraphicsContext testing.
* Remove wxAUI conditional build cruft as it is now required to build
  Kicad.
* Fix scroll increment size regression to prevent jumping around the
  zoom center position.
* Add find GDI+ cmake module for building on WXMSW when wxGraphicsContext
  is enabled.
2010-02-08 18:15:42 +00:00
charras a61b48eced Code cleaning. Use new font. 2010-02-01 21:23:27 +00:00
charras a46cd46d9d pcbnew: More about work on color selection and items visibility:
removed global variables and a lot of redundancies
2010-01-31 20:01:46 +00:00
charras cf7ad0f503 pcbnew: More about work on color selection and items visibility 2010-01-30 14:46:26 +00:00