Compare commits

..

2473 Commits

Author SHA1 Message Date
maciej. 898ed7445f GAL: fix zooming using mouse wheel with wxWidgets 3.0. 2014-03-19 21:07:49 +01:00
jean-pierre charras 0f09c15f11 Pad editor dialog: Better tests and error messages about issues in pad settings. Fis also an other hard to translate error messge. 2014-03-19 21:06:09 +01:00
jean-pierre charras 152c97a34f kicad-install.sh: fix bad url for legacy libraries. Add the same script hich does not need a bazaar account to download Kicad (using https instead of ssh to create branches) 2014-03-18 19:52:29 +01:00
jean-pierre charras 89be32714b 3D viewer: fix 3D grid artifact ( bug 1293873 ) 2014-03-18 11:31:13 +01:00
unknown b436924380 Warning removal, patches from Camille 019 2014-03-16 18:40:23 +01:00
jean-pierre charras 91c53a947a bitmap2component: add management of image resolution: Is read from file, when exists, and can be modified in bitmap2component.
It also fix issue #747631
2014-03-16 15:10:42 +01:00
Orson 59a0ced0a6 Corrected the error message about required OpenGL version for GAL. Fixed pcb_calculator .desktop file. 2014-03-14 21:32:25 +01:00
jean-pierre charras ab27f56cc7 Doc update 2014-03-14 08:37:04 +01:00
Marco Serantoni bc707ced58 [MacOSX] Pcbnew crash on editing dimension's line width 2014-03-14 02:10:27 +01:00
Marco Serantoni dcea11e5cb [MacOSX] New OSX build enviroment now supported 2014-03-14 02:07:44 +01:00
Marco Serantoni ec5a767542 [MacOSX] New OSX enviroment seems to be more picky about options, this fixes the linker part 2014-03-14 00:44:46 +01:00
Maciej Suminski e76c330aaf Fixes build error with the choosy CLANG (Thanks to Maciej Suminski) 2014-03-13 18:50:52 +01:00
jean-pierre charras d00fae588a Footprint Editor: fix a crash when the dialog to set pad properties is called from the main toolbar (i.e. to define the default setting for new pads, and not to edit an existing pad) 2014-03-13 08:15:19 +01:00
Maciej Suminski 527011208c Pcbnew: GAL canvas selection tool bug fixes.
* Fix Python scripting error causing pcbnew_wrap.cxx to fail to build.
* Fix OpenGL canvas ratsnest missing connections in copper zones.
2014-03-12 20:55:59 -04:00
Maciej Suminski 52791f2375 Changed cast from float to double in RN_POLY::HitTest. 2014-03-12 22:42:08 +01:00
Maciej Suminski c7e3887ba4 Fixed erroneous hit testing for polygons in ratsnest for GAL. 2014-03-12 15:00:14 +01:00
Maciej Suminski 55f9aaabd7 Workarounded SWIG problems (does not support nested C++ classes, more on the subject: http://www.swig.org/Doc1.3/SWIGPlus.html#SWIGPlus_nested_classes). 2014-03-12 14:58:49 +01:00
Maciej Suminski f0251ebdb6 Merge selection tool branch. 2014-03-11 20:45:01 -04:00
Marco Serantoni 5feddb8cac [MacOSX] fixes some interations with KicadOSXBuilder 2014-03-10 23:37:59 +01:00
jean-pierre charras 4fd3dbb5a5 Finishing work on a better 3D viewer. this also fix bugs like Bug #1129630 . 2014-03-09 19:43:53 +01:00
jean-pierre charras f24bc87a84 Pcbnew: fix Bug #1289416 (Broken setting of layer list in D_PAD:: ViewGetLayers() for GAL). 2014-03-08 20:07:35 +01:00
jean-pierre charras 63401f3d95 Rework on 3D viewer (work in progress): Disable or enable layers, grid or 3D footprint shapes should be now faster. 2014-03-08 20:04:23 +01:00
Wayne Stambaugh c89d52ee1a Pcbnew: make block rotate honor the rotation angle setting. (fixes lp:1281605)
* Make block rotate command honor the rotation angle setting.  Thank you
  Umesh Mohan <mohan.umesh@gmail.com> for the patch.
* Change block rotate undo command from UR_ROTATE to UR_CHANGED so consecutive
  rotations do not lead to round errors and for proper undo in case the user
  changes the rotation angle setting between block rotations.
2014-03-07 17:34:54 -05:00
Cirilo Bernardo 04f8d12ae5 KiCad: improve gerber file extension wildcard so gerbers show up correctly in the file tree pane. 2014-03-06 16:44:48 -05:00
Wayne Stambaugh 339dd0daf2 Coding policy fixes. 2014-03-06 13:38:39 -05:00
Maciej Suminski 5ed0980dd5 Merged upstream. 2014-03-06 09:42:16 +01:00
Maciej Suminski 3cb168be5a Removed warnings. 2014-03-06 09:14:06 +01:00
jean-pierre charras a1b065c190 Fix a minor bug I created in commit 4733 2014-03-05 18:57:13 +01:00
jean-pierre charras 764b5c11bf Minor code cleanup in 3d viewer (remove dead or useless code). Some minor other fixes. 2014-03-05 18:40:23 +01:00
Maciej Suminski b8e3ff8ca3 Fixed undo while PNS is active. 2014-03-05 16:44:08 +01:00
Maciej Suminski c557e52dab Squashed memory leaks. 2014-03-05 14:57:14 +01:00
Maciej Suminski 505b38416d Removed a few memory leaks. 2014-03-03 17:15:41 +01:00
Martin Janitschke b33fa0cc13 Pcbnew: add option to merge non-plated through holes to drill file. (fixes lp:1133330) 2014-03-03 09:28:05 -05:00
Maciej Suminski 36813fe8ab Pcbnew: fixed SIGFPE arithetic exception. (fixes lp:128339, 1285969, and 1286426) 2014-03-02 20:18:26 -05:00
Martin Janitschke 7c3918da2a Pcbnew: fix global deletion bug and minor dialog changes. (fixes lp:1263795)
* Handle different item global deletions correctly.  No more removing of text
  if graphics is selected.
* Layer settings are always obeyed for modules, zones, text, and graphics.
* Text will be removed from copper layers if all layers are selected or
  according to the current layer.
* Added check boxes for "normal" and "locked" footprints to be consistent
  with the naming for the track deletion options.
2014-03-01 12:20:22 -05:00
jean-pierre charras 47e5026cfe 3D viewer: fix mirroring issue for texts in flipped footprints. 2014-02-28 18:46:18 +01:00
Fabrizio Tappero 9c71f62e1c Commit patch about cvpcb, pcbnew and layout editor menu items, with 3 menu labels modified in Eeschema. 2014-02-28 18:31:00 +01:00
jean-pierre charras 4a461cd09b 3D viewer: shows now the texts of footprints (ref, value and others) when visible.
Fix also other very minor issues.
Realistic mode shows or not the copper thickness (depending on selected option in preferences) to speed up the screen redraw.
2014-02-28 11:51:47 +01:00
Maciej Suminski 41397f5b5b Fixes ratsnest crashing on zones with negative net codes. 2014-02-28 11:12:55 +01:00
Marco Serantoni 9413b30567 Fix for bug #1285878, build fails with clean repository and high parallelism due missing dependance between router and pcbcommon 2014-02-27 23:56:16 +01:00
jean-pierre charras 2c69b7f512 Fix Bug #1275544 (Page size dialog: page size drop-down doesn't handle mouse-click event) 2014-02-27 20:53:04 +01:00
Martin Janitschke 29e7638a3c make microwave toolbar accessible from menu (Bug #1285425 ) 2014-02-27 19:48:18 +01:00
jean-pierre charras 031202a837 Fix wx28 compatibility issue. 2014-02-27 09:05:28 +01:00
Marco Serantoni fb6099abd9 [MacOSX] Fixing some refresh issues when changing component on cvpcb 2014-02-27 01:57:18 +01:00
Marco Serantoni e009721982 [MacOSX] Avoid race between cmake -E copy_directory, which triggers a build error when using an high parallelism 2014-02-26 21:46:25 +01:00
jean-pierre charras fbecc0d9ce * fp_lib_table.cpp: fix an issue on Windows in ConvertFromLegacy: sometimes, because the comparison was case sensitive, lib nicknames were not found, although libs exist ( for instance if a path was given like f:\mypath instead of F:\mypath)
* getpart.cpp: fix a potential bug on a translatable string with has requirements in spelling.
* fix bug  #1066179
* kicad: fix erroneous labels in sub menus.
2014-02-26 15:06:24 +01:00
Maciej Suminski 75026d8754 Renamed BOARD_CONNECTED_ITEM::GetNet() -> GetNetCode()
Renamed BOARD_CONNECTED_ITEM::SetNet() -> SetNetCode()
Added BOARD_CONNECTED_ITEM::GetNet() for accessing NETINFO_ITEM* of a given item.
Fixed module editor crash when launched to edit a module from a PCB.
Replaced some BOARD::FindNet( item->GetNet() ) calls with BOARD_CONNECTED_ITEM::GetNet().
2014-02-25 11:40:34 +01:00
jean-pierre charras 19e4cb409b Viewlib: ensure in wxListBoxes the lib and the component are always shown as selected when a lib and component are specified (when called by the get component dialog for instance) 2014-02-24 20:07:24 +01:00
HennerZeller 992cc5f166 Eeschema: * Preselect the currently chosen component in the browser when pressing the thumbnail view.
* Various smallish documentation updates in the component chooser area.
2014-02-24 11:52:08 +01:00
Henner Zeller c7e794dcaf Eeschema: component selection dialog improvements.
* Pressing 'Enter' while the focus is in the tree did not work due to the
  double-click wxWidgets workaround.  Make it work.
* More clearly document what is happening and how it can be tested.
2014-02-23 20:27:07 -05:00
Nick Ostergaard bcf970e6b2 Remove duplicate comments from CMakeList.txt. 2014-02-23 20:02:41 -05:00
Martin Janitschke c436f453ac Fix 3D viewer crash bug. (fixes lp:673603 and lp:804778) 2014-02-23 19:53:55 -05:00
Henner Zeller df8b7c53fb Eeschema: fix build error when using wxWidgets 2.8 and other minor fixes.
* Fix string concatenation for _( "Unit" ) + wxT( " " ). This failed
  compiling against wxWidgets 2.8 (thanks Cirilo Bernardo ).
* Base the indentation on a measured observation with explanation
  (98%-ile of name-length found in library). The previously chosen 24
  character indentation was too wide for most.
* Don't use a #define spilling into the global namespace, but use
  a locally defined constant for COLUMN_DESCR_POS.
2014-02-23 09:15:01 -05:00
Blair Bonnett 64da190e37 Build documentation updates and comment spelling fixes. 2014-02-22 18:17:36 -05:00
jean-pierre charras c5a2028ae3 Eeschema: Remove usage of tabs in dialog_choose_component.cpp strings, because it does not work very well on Linux, and does not work on Windows.
This is replaced by the right number of space, using a fixed font (like in CvPcb)
Fix mismatch between icons and the actual rotation of components (CW instead of CCW) (bug 1022154 )
2014-02-22 18:50:20 +01:00
jean-pierre charras b4d1813d86 Eeschema: Remove usage of tabs in dialog_choose_component.cpp strings, because they do not work very well on Linux, and do not work on Windows.
Fix incorrect rotation of components (CCW instaed of CW)
2014-02-22 13:39:59 +01:00
Marco Serantoni d475c544c8 [MacOSX] Fixing resize issue in layer setup dialog 2014-02-21 17:38:29 +01:00
Maciej Suminski 151826b206 Upstream merge. 2014-02-21 11:05:28 +01:00
Maciej Suminski 8a8e5d8d14 Quick fix for unsupported pad types in PNS router. 2014-02-21 09:53:10 +01:00
Fabrizio Tappero 28e6356250 Patch from Fabrizio Tappero: better kicad and eeschema menu entries and labels, which minor fixes. 2014-02-21 08:54:13 +01:00
Wayne Stambaugh b26d1b614e Eeschema: minor component selection dialog improvements.
* Manually change fbp file minor version number so dialog could be edited
  with latest release version of wxFormBuilder.
* Give component view panel more weight for improved component view size.
* Add padding around dialog button sizer.
2014-02-20 19:29:31 -05:00
Wayne Stambaugh 949118a030 Minor coding policy fixes. 2014-02-20 19:06:37 -05:00
Marco Serantoni 932c92af55 [MacOSX] New reorg for building system, typos and path refines 2014-02-19 22:39:21 +01:00
Henner Zeller bd52f00601 Eeschema: component selection dialog improvements.
* Improve component chooser redraw to fit in wxWidgets redraw strategies.
* Use LIB_COMPONENT::Draw and LIB_COMPONENT::GetBoundingBox for drawing the
  component
* Make resize redrawing work properly.
2014-02-19 11:44:48 -05:00
unknown 34ad638924 GLM (tool for opengl) update to 0.9.4.6 2014-02-19 11:51:33 +01: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
Marco Serantoni 7da13137da [MacOSX] Fix for bugs #1258081 and #1267772 2014-02-18 21:30:17 +01:00
jean-pierre charras fd2afec6f5 Remove some fully outdated code (#pragma, from Henner Zeller's report, and some other things) 2014-02-18 12:41:53 +01:00
Marco Serantoni fcd17a59ee [MacOSX] Fix some small issues, this should be the least for scripting 2014-02-17 19:58:03 +01:00
unknown 40b30d43d3 GLM (tool for opengl) update to 0.9.4.6 2014-02-17 19:42:52 +01:00
Maciej Suminski 9b1eb35472 Pcbnew: fix OpenGL PNS router track not shown bug. (fixes lp:1275319) 2014-02-15 18:54:51 -05:00
Marco Serantoni 0e42a2ffd0 [MacOSX] wxPython patch revised for http://trac.wxwidgets.org/ticket/15957 2014-02-15 19:09:14 +01:00
Marco Serantoni fb9e5b94ca [MacOSX] support for plugins in the bundle 2014-02-15 11:01:27 +01:00
Cirilo Bernardo d5064b98a4 Export VRML and IDF maintenance.
Fix minor bug in eeschema (opening a relative path does not work) (patch from HennerZeller).
2014-02-15 08:39:06 +01:00
Marco Serantoni 1c5a997f82 [MacOSX] Reorg and preparation to include scripts into Bundles 2014-02-14 22:09:48 +01:00
Henner Zeller 60b1671485 Eeschema: Better naming for private struct: public fields uppercase.
* make some more fields 'const' that can.
* Instead of previous/next _visible_ element, Go through
      previous and next element. Otherwise the cursor stops moving
      if the item is only partially visible.
2014-02-14 18:16:59 +01:00
Henner Zeller 31fea1e766 PATCH: making component choosing (much!) more usable 2014-02-14 09:07:20 +01:00
Henner Zeller 4340ceeb8b PATCH: making component choosing (much!) more usable 2014-02-14 09:05:04 +01:00
jean-pierre charras 63eac42d07 Fix a minor error in class D_PAD: void D_PAD::Flip( int Y ) changed to virtual void D_PAD::Flip( const wxPoint& aCentre ) (as defined in BOARD_ITEM)
Scripting: fix compatibility current pcbnew version in 2 examples and the default extension of board files  in board.i (was .kicad_brd, now is .kicad_pcb)
2014-02-13 18:27:48 +01:00
Miguel Angel Ajo 3329ed26f3 switching to the new python scripting console icon 2014-02-12 22:19:12 +01:00
Miguel Angel Ajo 4da4a558a9 Enforces python2.6 / 2.7, thanks to orsonmmz 2014-02-12 22:17:19 +01:00
Maciej Suminski ec763dfede NETINFO_ITEM for orphaned items now have empty netname and net code = 0 (to avoid problems).
Fixed case for the footprint legacy plugin when added module's do not have set parent (BOARD).
Added copyright notice for pcbnew/class_netinfolist.cpp (feel free to correct, it is just copied from corresponding header file).
2014-02-12 18:01:03 +01:00
Fabrizio Tappero b4f6cc45f2 Some icons update 2014-02-12 14:56:52 +01:00
jean-pierre charras 29a1bdb32a Fix issues in print mirror. (include some changes coming from Cirilo Berdarno's patch)
gr_basic.cpp: rewrite the function which draws the outlines of a thick segment.
2014-02-12 11:03:34 +01:00
Nick Østergaard f214a57629 Fix wrong numbering in the QFP footprint wizard python script 2014-02-12 08:59:56 +01:00
Fabrizio Tappero b954478621 Update icon_bitmap2component. 2014-02-12 08:53:55 +01:00
Marco Serantoni 73898d5954 [MacOSX] Refines in building system, now bundles lib migration supports symbolic links 2014-02-12 00:13:14 +01:00
Henner Zeller 3132c70e54 * Apply Henner Zeller's patch to add connecting line from reference and labels to component position whilst moving to help identify which component the reference or label belongs too 2014-02-11 21:54:30 +00:00
Fabrizio Tappero 7061d6c2a5 Icon update, and an other very minor fix. 2014-02-11 19:32:09 +01:00
Maciej Suminski e6a01e5a41 Fixed ratsnest related segfaults on BOARD destruction. 2014-02-11 14:26:33 +01:00
Lorenzo Marcantonio 29dcb49c62 - Do not autonumber NPTH pads on add in module editor (keep the number blank)
Factored out the next-pad-number function
2014-02-10 18:19:15 +01:00
jean-pierre charras 8c5292207f Use environment KISYS3DMOD to know the default path for 3D shapes in footprint editors dialogs, and build short 3D file names.
This value is now shown in these dialogs.
2014-02-10 11:01:11 +01:00
jean-pierre charras 81c84fcac5 fix linux compil. 2014-02-10 10:58:17 +01:00
jean-pierre charras c935624779 Use environment KISYS3DMOD to know defaut path for 3D shapes in footprint editors dialogs. 2014-02-10 10:30:08 +01:00
Miguel Angel Ajo 26ca1ad03d Fix py26 testing for OSX, assertIsNotNone unavailable for py26 2014-02-10 10:15:48 +01:00
jean-pierre charras 788b38c09b Cosmetic enhancement: better icon for bitmap2component. 2014-02-09 21:06:05 +01:00
Miguel Angel Ajo bbcd2c61d6 BOARD saving test 2014-02-09 00:21:47 +01:00
Marco Serantoni 9263a4e798 [MacOSX] Setting Set3DShapesPath 2014-02-08 18:33:21 +01:00
Marco Serantoni 2acaa2871d [MacOSX] Fixing build system, sorry guys, refining build system and make building smoother. 2014-02-08 16:15:06 +01:00
jean-pierre charras e7d2b9b456 Add the environment variable KYSYS3DMOD to define a default path for 3D models.
If it is not defined by user, it is set to a legacy 3D files path.
The default value needs to be fixed on MACOSX.
This change could be better, but it is compatible with environment variables and the old way ( defined search paths) to find 3D shape files.
3D shapes files names can  also include an environment variable definition, like libraries names.
However using KYSYS3DMOD in these names is not required.
If the 3D filename is a legacy name, KYSYS3DMOD is automatically used as default path.
2014-02-08 12:54:24 +01:00
jean-pierre charras fff54d759e Add the environment variable KYSYS3DMOD to define a default path for 3D models. 2014-02-08 11:44:55 +01:00
jean-pierre charras 6a9771f24b main CMakeLists: build lib-wxpython only if KICAD_SCRIPTING_WXPYTHON is ON 2014-02-08 08:42:41 +01:00
Miguel Angel Ajo 8df3326df1 More BOARD unit tests 2014-02-08 01:02:29 +01:00
Marco Serantoni a2483d48f3 [MacOSX] Fixing qa, thanks Miguel Angel for the feedback 2014-02-08 00:40:11 +01:00
Marco Serantoni bbff6c0d30 [MacOSX] Adding patches for wxPython && http://trac.wxwidgets.org/ticket/15957 2014-02-07 23:00:19 +01:00
Maciej Suminski 222017758c Moved PCB_VISIBLE size check to .cpp. 2014-02-07 20:54:58 +01:00
Maciej Suminski 9ef713dfa8 Right click on an item when there is nothing selected - enables the context menu. 2014-02-07 20:44:34 +01:00
jean-pierre charras d6f348f41e Remove duplicate icon apply.svg (use ckecked_ok.svg instead which is the same icon).
Add a workaround to fix a new bug in wxWidgets 3.0 ( Windows specific ) which shows icons only with a size = 16x16 in menus which have attribute wxITEM_CHECK
2014-02-07 20:32:08 +01:00
Marco Serantoni c441c287b0 [MacOSX] Fixing minor issue for wxPython 2014-02-07 20:19:53 +01:00
Maciej Suminski 63e4defd2a Corrected bounding box for arcs (DRAWSEGMENT). 2014-02-07 19:55:40 +01:00
Marco Serantoni eb34364d89 [MacOSX] Automating building for OSX with KICAD_SCRIPTING, see Documentation/compiling/mac-osx.txt 2014-02-07 19:53:54 +01:00
Henner Zeller 34f6ca1b20 * Bring CvPcb footprint window to the front when it has been obscured by another window 2014-02-07 18:38:41 +00:00
Brian Sidebotham 159017ed62 * Add Henner's patch (with minimal changes) to ensure CVpcb footprint view window is always brought into view, even after being hidden by another window 2014-02-07 18:36:12 +00:00
Brian Sidebotham 742ee5320e * Fix Project templates location under Linux, preserve Windows location 2014-02-07 18:19:53 +00:00
Brian Sidebotham 775ce3993c * Fix linux location for system project templates 2014-02-07 18:17:58 +00:00
jean-pierre charras d68940c4d2 Minor fixes. 2014-02-07 17:09:15 +01:00
Cirilo Bbernardo 87d2caa4c6 IDF export: fix incorrect rotation of flipped items. 2014-02-07 17:01:46 +01:00
Maciej Suminski 25dfbcd39f Upstream merged. 2014-02-07 09:52:47 +01:00
Maciej Suminski d124cf45f3 Reverted changes introduced by the revision 4655. 2014-02-06 21:34:03 +01:00
Maciej Suminski 0f026bbe1d Fixed snapping item in a wrong spot bug. 2014-02-06 17:29:13 +01:00
jean-pierre charras 544f987fa0 add missing svg file 2014-02-06 16:54:55 +01:00
Fabrizio Tappero c407654224 Fix issues in icons with texts, from Fabrizio Tappero. 2014-02-06 16:49:37 +01:00
jean-pierre charras f366f26523 Fix some incorrect icons (which were using a not supported font for texts). Add ps_router icon from Konstantin Baranovskiy. 2014-02-06 15:13:31 +01:00
Fabrizio Tappero 26041d52c7 New other icons from Fabrizio Tappero, and some svg file fixes 2014-02-06 09:29:45 +01:00
Fabrizio Tappero 02bac313a8 New other icons from Fabrizio Tappero, and some svg file fixes. 2014-02-06 09:28:29 +01:00
Fabrizio Tappero c84f6331b0 New icons from Fabrizio Tappero 2014-02-05 15:36:57 +01:00
Maciej Suminski 1d4c6ad40e Minor optimizations. 2014-02-05 14:51:19 +01:00
Maciej Suminski 468e14f003 Merged ratsnest_threadsafe branch. 2014-02-05 11:55:04 +01:00
Maciej Suminski 3a15f5ad28 Initialized value to suppress Valgrind warnings. 2014-02-05 11:33:45 +01:00
Maciej Suminski 17c030aa98 Fixed removal of items in the KiCad-default style. 2014-02-05 11:08:34 +01:00
Maciej Suminski 857956e42e Fixed bug introduced in the last commit. 2014-02-05 10:47:55 +01:00
Maciej Suminski d7517e472b Some items were still marked as selected after undoing an operation. 2014-02-05 10:30:50 +01:00
Cirilo Bernardo f57eaf45fa Apply IDF tools patch from Cirilo Bernardo 2014-02-05 10:29:01 +01:00
Cirilo Bernardo fbe8484225 Apply IDF tools patch from Cirilo Bernardo 2014-02-05 10:27:21 +01:00
Maciej Suminski a9031edc0d Grip margin is relative to the world's zoom. 2014-02-05 10:17:14 +01:00
Maciej Suminski f922533978 Added possibility for editing pads properties. 2014-02-05 09:05:27 +01:00
Miguel Angel Ajo b39408b14a Adding a first BOARD class tester, very basic 2014-02-04 22:16:32 +01:00
Maciej Suminski 8df0f769f7 Added KiCad-style modification methods (hover over an item and press a hot key, without selecting first).
Modification point is selected basing on the number of selected items.
Rotation angle setting (Preferences->General) is taken into account while rotating.
2014-02-04 17:27:00 +01:00
Maciej Suminski 625dcddb27 Added 2 tool actions:
- pcbnew.InteractiveSelection.Single for selecting a single item
- pcbnew.InteractiveSelection.Clear for clearing the selection
Made SELECTION_TOOL::clearSelection private.
2014-02-04 16:03:56 +01:00
Maciej Suminski 106fa9bbd8 Edit tool may still be activated if it was invoked with no selected items. 2014-02-04 14:21:29 +01:00
Maciej Suminski 347649e855 Protection against non consecutive net codes. 2014-02-04 13:40:39 +01:00
Maciej Suminski 0b9a8709f8 Modifiers (Alt/Shift/Control) are properly set for events when autopanning is active. 2014-02-04 13:38:18 +01:00
Maciej Suminski 82ca611ed3 SELECTION_TOOL::SELECTION::Clear made private, as there was no chance to call it outside the SELECTION_TOOL class. 2014-02-04 11:37:54 +01:00
Maciej Suminski b317894ea0 Snapping settings are valid while autopanning. 2014-02-04 09:44:16 +01:00
Dick Hollenbeck ec9c949c9b Windows name export tweak 2014-02-03 23:05:07 -06:00
Dick Hollenbeck 142782b402 remove wxApp()::FindLibraryPath() usages from Pcbnew. Use environment variable substitution. 2014-02-03 15:39:42 -06:00
Dick Hollenbeck 33e26b278d KIWAY in progress... 2014-02-03 13:26:18 -06:00
Maciej Suminski f87b6962e0 Enabled PNS for selected items. 2014-02-03 18:09:17 +01:00
Maciej Suminski f6aa447036 Ratsnest lines for zones are removed when a zone is dragged. 2014-02-03 17:40:39 +01:00
Dick Hollenbeck 2eb99fefdf Initial KIWAY (modular-kicad) work. Various tweeks. 2014-02-03 09:21:04 -06:00
Dick Hollenbeck 4f26386e8d Initial KIWAY (modular-kicad) work. Various tweeks. 2014-02-03 09:10:37 -06:00
Maciej Suminski 3f5c3d4349 Minor changes (fix cvpcb build issue, wx2.8 compatibility, some other stuff). 2014-02-03 16:02:54 +01:00
Maciej Suminski 63bc40b58e Takes into account hidden module text settings. 2014-02-03 07:22:31 -06:00
Maciej Suminski fff616c8dc Moved netnames (GAL specific layers) to a separate enum, to avoid saving/reading their settings from files.
Added a check for the number of PCB_VISIBLE elements.
Worksheet & general purpose overlay layers are visible by default.
2014-02-03 14:14:53 +01:00
Maciej Suminski 2fe85cf43d Minor changes. 2014-02-03 13:26:25 +01:00
Maciej Suminski 864c86062d Changed ROUTER_PREVIEW_ITEM layer. 2014-02-03 13:09:10 +01:00
Maciej Suminski db252ea88c Changed BOARD_DESIGN_SETTINGS::m_VisibleElements from int to long, to assure at least 32 bits length (without depending on the platfrom int size). 2014-02-03 13:08:01 +01:00
Maciej Suminski 44861f5889 Fixed tracks of 0 width causing division by 0 error. 2014-02-03 13:05:27 +01:00
Miguel Angel Ajo 15bfac3f4e Moved QA to root. 2014-02-02 22:50:45 +01:00
Dick Hollenbeck 741bfb685b Another attempt at wxFrame::SaveSettings() standard infrastructure. 2014-02-02 14:18:10 -06:00
jean-pierre charras 8afe2dfbce Eeschema: Fix bug #1271155 relative to Grid selection in Eeschema. 2014-02-02 20:51:50 +01:00
Cirilo Bernardo 5a6665ec08 Dxf import fix (patch from Cirilo Bernardo, with a minor change) 2014-02-02 10:07:02 +01:00
jean-pierre charras 9ef5627880 Kicad manager: code cleaning (better use of wxaui manager). Fix a very minor bug. 2014-02-02 10:02:29 +01:00
jean-pierre charras 6f10d16824 Kicad manager: code cleaning. Fix a very minor bug. 2014-02-01 19:27:18 +01:00
Carl Poirier 1490099ddd Parallelized the RN_DATA::Recalculate() function. 2014-01-31 18:27:06 +01:00
Maciej Suminski 0c67e26e9c Added the dynamic ratsnest for the tracks that are currently routed with the PNS router. 2014-01-31 18:05:11 +01:00
Maciej Suminski 3e2e11fb42 Undo/redo buffer fixed once again.. 2014-01-31 16:08:20 +01:00
Maciej Suminski 24ba75ba92 Minor change to clearing selection handling. 2014-01-31 14:52:01 +01:00
Maciej Suminski 630a3fb1b9 Safer RN_NET::GetNodes() 2014-01-31 14:41:15 +01:00
Maciej Suminski 7f3bf1bef7 Added missing operators==/!= for RN_NODE_PTR.
Moved ClearSimple() functions back to the header file.
2014-01-31 13:19:59 +01:00
Maciej Suminski 7f4648149b Ratsnest is updated after backend switch. 2014-01-31 13:14:18 +01:00
Maciej Suminski 3827f495ca Ratsnest color is saved in RENDER_SETTINGS. Temporary ratsnest is drawn using a brightened color. 2014-01-31 11:16:01 +01:00
Maciej Suminski 5fea60d20f Fixed undo/redo while routing with the PNS error. 2014-01-30 17:11:40 +01:00
Maciej Suminski 510fee1358 Another way of handling items for the ratsnest (clearer and now finally supports undo/redo of the PNS created tracks). 2014-01-30 15:46:39 +01:00
Maciej Suminski bbb3972fb7 Undo buffer for the PNS router. Still, it has a bug - it crashes when an undo/redo operation is performed while routing a track. 2014-01-30 11:32:08 +01:00
Maciej Suminski a73e386505 Added a new tool event: TA_UNDO_REDO, sent after undo/redo operation is issued. 2014-01-30 11:18:58 +01:00
jean-pierre charras fa8cbd983b 3d-frame: is now derived from EDA_BASE_FRAME. Remove duplicate code and some useless includes 2014-01-30 09:18:47 +01:00
jean-pierre charras f43ed90921 Add specific bitmaps in export IDF and export DSN menus.
Add missing calls to Show( false ) to some main frames (Kicad, eeschema, gerbview), to force config saving when closing these windows.
Code cleanup and minor coding style fixes in footprint_wizard_frame.
2014-01-29 19:39:16 +01:00
Dick Hollenbeck 2ac58935b5 Make option KICAD_KEEPCASE actually functional for Eeschema, and make the setting default ON.
The desire is to migrate designs *away from* case independence, and to create
designs which use literally (case specific) interpreted component names. But for
backwards compatibility, you may turn OFF this option if you really must.
(Remember that with KiCad using text data files, typically you would be better
off simply doctoring those files into a case literal state with a text editor
and move forward into the brave new world of case specificity. Also, BOM
generators may not work properly when you have this option turned OFF, the xml
export's referential integrity is broken on library part name. Hence the default
is ON now, as of 29-Jan-2014.
2014-01-29 12:02:02 -06:00
jean-pierre charras ce6b907fe3 Add specific bitmaps in export IDF and export DSN menus.
Add missing calls to Show( false ) to some main frames (Kicad, eeschema, gerbview), to force config saving when closing these windows.
Code cleanup and minor coding style fixes  in footprint_wizard_frame
2014-01-29 18:01:42 +01:00
unknown 690a001648 Pcbnew: export IDF fixes 2014-01-29 17:42:21 +01:00
Maciej Suminski 57bfaca131 PNS_ITEM::m_parent: BOARD_ITEM->BOARD_CONNECTED_ITEM 2014-01-29 15:35:25 +01:00
Maciej Suminski af350eb1e6 RN_DATA::GetNets() -> RN_DATA::GetNet() with an assert to check if someone calls it for the unconnected net.
Only items that belong to a net are removed from ratsnest.
2014-01-29 15:24:19 +01:00
Maciej Suminski b52e5fabda Ratsnest lines are drawn using a more transparent color.
BOARD::chainMarkedSegments() uses a safer method for gettings pads.
2014-01-29 14:51:50 +01:00
Maciej Suminski bec24b6c7f Ratsnest is updated after rotation, flip, undo/redo operations.
Fixed crashes of ratsnest when a pointer for an item has changed after undo/redo operations.
Vias are properly removed from ratsnest (pcbnew/class_board.cpp).
2014-01-29 10:17:14 +01:00
Maciej Suminski 83f7c7e35e Added RN_DATA::Add()/Remove() methods.
RN_DATA::Update()/AddSimple() take BOARD_ITEM* as the parameter (instead of being split to versions with BOARD_CONNECTED_ITEM* and MODULE*), to make the code look clearer.
2014-01-28 16:30:58 +01:00
Maciej Suminski 2b8f9fc621 Added BOARD_[CONNECTED_]ITEM::IsConnected() for checking if a BOARD_ITEM is BOARD_CONNECTED_ITEM as well. 2014-01-28 16:23:08 +01:00
Dick Hollenbeck 784e43f2e8 Add option --remove-orphaned-libraries to scripts/library-repos-install.sh 2014-01-28 08:23:01 -06:00
Maciej Suminski c3c7b2e9cc Merged the netnames branch. 2014-01-28 11:59:04 +01:00
Maciej Suminski 7f6bc781aa Upstream merge. 2014-01-28 10:43:55 +01:00
Maciej Suminski 15b8d3d20a Added NETINFO_MAPPING, to ease saving nets with consecutive net codes (without modifying the net codes during the run time).
Now, nets are saved with consecutive net codes (both modern & legacy plugins).
Zones are saved together with their nets, without depending on the fact if there are any pads with such net. Therefore validation of zone net names was removed (pcbnew/class_board.cpp).

Performed tests:
- Changed a pad's net name from empty to existent - ok, name was changed.
- Changed a pad's net name from empty to nonexistent - ok, error message is displayed, net name stays empty.
- Changed a pad's net name from existent to empty - ok, net name became empty
- Changed a pad's net name from existent to nonexistent - ok, error message is displayed, net name is not changed.

- Drawn a zone that belongs to a net, then modified schematics so the net does not exist anymore. After reloading the net list, all pads/tracks are updated. Zones still belongs to the net that does not exist in the schematic (but still exists in .kicad_pcb file). After running DRC, the zone becomes not filled.
- Undo & redo affects assignment of a polygon to a specific net (you may change net of a polygon, refill it and undo/redo the changes).

- KiCad s-expr & legacy, Eagle, P-CAD boards seem to load without any problem (they also contain correct net names assigned to the appropriate pads). All types of board file formats were loaded, then saved in sexpr format and reopened with a KiCad built from the master branch (without my modifications).
- A few boards were also saved using the legacy format and were opened with the master KiCad without any issues.

- Change a net name for a pad, restore with undo/redo - ok
- Remove everything, restore with undo - ok
- Remove everything, reload netlist - ok

Differences observed between files saved by the master branch KiCad and this one:
- list of nets are not saved in any particular order, so net codes may differ
- the default net class does not contain the unconnected net
2014-01-28 10:19:51 +01:00
Dick Hollenbeck c63fa6ff31 Add EDA_BASE_FRAME::Show() and call SaveSettings() only from there for all derived wxFrames. Remove calls to SaveSettings() elsewhere. 2014-01-27 19:29:26 -06:00
Marco Serantoni 786bb81c4d [MacOSX] KICAD_BUILD_DYNAMIC stabilized and almost working 2014-01-27 23:24:04 +01:00
jean-pierre charras 6181e9e46e Bitmap2component: fix Bug #1273082 (patch from Wesley Dungan) 2014-01-27 18:22:49 +01:00
Dick Hollenbeck 9bce766331 Report findings of possible github zipfile caching in a comment, improve a Sprintf() setup. 2014-01-27 09:51:14 -06:00
Maciej Suminski a10d918cac Thread-safe version of Delaunay triangulation. 2014-01-27 11:42:47 +01: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
Dick Hollenbeck 9afc4a0db6 Remove g_LibraryNames and all supporting infrastructure from pcbnew. FP_LIB_TABLE is now local to major wxFrames. 2014-01-27 01:23:02 -06:00
Dick Hollenbeck 6617ce58f3 Use factored SelectLibrary() from base class. Spelling and comments. 2014-01-27 00:41:40 -06:00
Maciej Suminski 8e6019748a GAL takes into account hidden module text settings. 2014-01-26 22:02:48 +01:00
Maciej Suminski e537480f1e Fixes crash when there are no edges for a given net in the ratsnest. 2014-01-26 22:01:42 +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 3354bdde05 Pcbnew: fix bug #1272714 . Code cleanup: use 2 different enums for pad shapes and pad drill shapes. Remove never used pad shape. 2014-01-26 15:20:58 +01:00
Marco Serantoni 179bb920b8 [MacOSX] adding multiprocess building and initial support for KICAD_BUILD_DYNAMIC 2014-01-26 14:09:36 +01:00
Cirilo Bernardo 4f29440f5f add patch from Cirilo Bernardo (about IDF export) , and minor fixes. 2014-01-25 15:36:56 +01:00
jean-pierre charras f7ca6e4bf9 add patch from Cirilo Bernardo, and minor fixes. 2014-01-25 13:23:29 +01:00
Marco Serantoni dc2592238e [MacOSX] Adding wx-widgets building with patches for OSX preparing for dynamic.. 2014-01-24 22:09:31 +01:00
Marco Serantoni 7e9ab70384 [MacOSX] Fixing in the case -arch are not set with cairo 2014-01-22 19:01:36 +01:00
Dick Hollenbeck f3256a918d Increase boost download TIMEOUT to 10 minutes, offer a LOG_DOWNLOAD option for capturing download problems. 2014-01-22 07:44:02 -06:00
Dick Hollenbeck 33dcef695e fix 2014-01-21 09:25:43 -06:00
Dick Hollenbeck d11d92504a tugs and bugs 2014-01-21 00:59:32 -06:00
Dick Hollenbeck aa451fb4d1 freerouter does not understand "mixed" layers, export mixed as signal 2014-01-20 13:11:42 -06:00
Dick Hollenbeck bf30114db8 use changed URL to library repo. 2014-01-20 13:10:45 -06:00
Dick Hollenbeck 8dc7189653 Add EDA_APP::setLanguageId() accessor and fix FindwxWidgets.cmake for windows cross on linux. 2014-01-20 03:33:17 -06:00
jean-pierre charras 294463208b Code cleanup and minor fix in viewlib. 2014-01-19 17:36:12 +01: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
maciej. 76aa0ba756 Fix compile errors when wx3.x is built with --enable-stl 2014-01-18 03:07:05 -06:00
Dick Hollenbeck a3211b2b9e disable deprecation warnings in Debug build, change message in fp_lib_table.cpp 2014-01-18 03:04:12 -06:00
Wayne Stambaugh bcf79484f0 CvPcb: fix no footprints shown in list when no legacy libraries are defined in project file. 2014-01-17 15:26:27 -05:00
Maciej Suminski 441e03172c Added iterators for NETINFO_LIST (as net codes for existing net codes may be not consecutive). 2014-01-16 16:47:31 +01:00
Maciej Suminski af7520ccb9 wxWidgets 2.8 fix 2014-01-16 14:36:09 +01:00
Maciej Suminski 8a4e723504 NETINFO_ITEMs are not stored in a vector anymore, instead they are held in a unordered_map. Now, the net codes may be not consecutive. There is another way for assigning net codes (using a static int that holds a possible empty net code and a function that makes sure it is not used [getFreeNetCode()]).
Removed some unused fields (NETINFO_ITEM::m_NbNodes, m_NbLink, m_NbNoconn, m_Flag).
2014-01-16 14:20:51 +01:00
Maciej Suminski d62b47a0df BOARD_CONNECTED_ITEMs do not store net code anymore (m_NetCode field), instead net info is stored using a pointer to NETINFO_ITEM.
GetNet() refers to the net code stored in the NETINFO_ITEM. SetNet() finds an appropriate NETINFO_ITEM and uses it.
Removing GetNet() & SetNet() (and the whole net code idea) requires too many changes in the code (~250 references to the mentioned functions).
BOARD_CONNECTED_ITEMs by default get a pointer to NETINFO_ITEM that stores unconnected items. This requires for all BOARD_CONNECTED_ITEMs to have a parent (so BOARD* is accessible). The only orphaned item is BOARD_DESIGN_SETTINGS::m_Pad_Master, but it does not cause any issues so far.
Items that do not have access to a BOARD (do not have set parents) and therefore cannot get net assigned, by default get const static NETINFO_LIST::ORPHANED.

Performed tests:
- loaded .kicad_pcb, KiCad legacy board, Eagle 6.0 board, P-CAD board - all ok
- load a simple project, reload netlist after changing connections in eeschema - ok
- save & reload a board - ok, but still contain empty nets
- remove everything, restore with undo - ok
- remove everything, reload netlist - ok
- changing net names (all possibilites: empty->existing, empty->not existing, existing->empty, existing->not existing) - all ok
- zones: when net is changed to a net that does not have any nodes besides the zone itself, it does not get filled
2014-01-15 18:03:06 +01:00
Maciej Suminski 3017b61711 Added NETINFO_LIST::UNCONNECTED constant. 2014-01-15 09:34:16 +01:00
Maciej Suminski 78732f13f7 Removed:
- ZONE_CONTAINER::m_Netname field
- ZONE_CONTAINER::SetNetName()
- ZONE_CONTAINER::SetNet() [it uses the one in BOARD_CONNECTED_ITEM]
- ZONE_CONTAINER::GetNetName() [instead BOARD_CONNECTED_ITEM::GetNetname is used]
- ZONE_CONTAINER::SetNetNameFromNetCode()

Performed tests:
- Drawn a zone that belongs to a net, then modified schematics so the net does not exist anymore. After reloading the net list, all pads/tracks are updated. Zones still belongs to the net that does not exist in the schematic (but still exists in .kicad_pcb file). After running DRC, the zone becomes not filled.
- Undo & redo affects assignment of a polygon to a specific net (you may change net of a polygon, refill it and undo/redo the changes).
2014-01-14 11:41:06 +01:00
Maciej Suminski 654e7e556e Removed D_PAD::SetNetname() function and D_PAD::m_Netname, D_PAD::m_ShortNetname fields.
D_PAD::GetNetname() and D_PAD::GetShortNetname() were moved to BOARD_CONNECTED_ITEM. Now they use the net name stored in NETINFO_ITEM.
Moved some one-line functions from class_board_connected_item.cpp to class_board_connected_item.h.
Added a copyright notice, moved Doxygen comments from class_board_connected_item.cpp to class_board_connected_item.h.

I have some doubts if changes introduced pcbnew/dialogs/dialog_pad_properties.cpp do not break anything, but I could not find a test case that breaks the pcbnew.

Performed tests:
- changed pad's net name from empty to existent - ok, name was changed
- changed pad's net name from empty to nonexistent - ok, error message is displayed, net name stays empty
- changed pad's net name from existent to empty - ok, net name became empty
- changed pad's net name from existent to nonexistent - ok, error message is displayed, net name is not changed
- (re)reading netlists, including net changes - fine, changes are applied, but empty nets are still kept
- loaded pcbnew/pcad2kicadpcb_plugin/examples/CK1202_V1.pcb to test P-CAD import plugin - ok, net names are correct
- imported an Eagle 6.0 board (Arduino Uno; http://arduino.cc/en/uploads/Main/arduino_Uno_Rev3-02-TH.zip) then saved in .kicad_pcb format and reloaded - ok, net names are correct
- saved demos/video/video.kicad_pcb in legacy format and then loaded it again - ok, net names are correct
2014-01-14 10:41:52 +01:00
jean-pierre charras 5954910913 Fix some issues in modview, relative to some a bad use of some wxAuiManager functions. 2014-01-13 16:09:52 +01:00
jean-pierre charras f0412874c0 Update demo files. A minor code cleaning. 2014-01-10 21:12:36 +01:00
Maciej Suminski bf80cc770e Changed the way of looking up NETINFO_ITEM using net names (using boost::unordered_map). Added a hash function (wxString) for that. Introduced NETINFO_ITEM::GetNetItem( wxString ). BOARD::FindNet() uses the map.
Net codes are updated upon net list update. (BOARD::ReplaceNetlist())
Added in some places (mostly class_board.cpp) pad->SetNet() calls to synchronize net codes.
On creation of NETINFO_LIST, the first NETINFO_ITEM is added (the unconnected items net).
Removed COMPONENT_NET::m_netNumber, as it was not used anywhere.
Added an assert to D_PAD::GetNetname(), checking if net code and net name is consistent for unconnected pads. Added an assert for NETINFO_LIST::AppendNet() to assure that appended nets are unique.

It seems that at this point:
- Updating net lists works fine. The only difference between the file ouput is that after changes it contains empty nets as well.
- Nets are not saved in the lexical order. Still, net names and net codes are properly assigned to all items in the .kicad_pcb file. It is going to be addressed in the next commit. I believe it should not create any problems, as pads are sorted by their net names anyway (NETINFO_LIST::buildPadsFullList())

Performed tests:
- Created a blank PCB, saved as pic_programmer.kicad_pcb (from demos folder). Updated net lists. .kicad_pcb file (comparing to the results from master branch) differ with net order (as mentioned before), net codes and timestamps.
- Removed some of components from the above .kicad_pcb file and updated net lists. Modules reappeared. .kicad_pcb file differs in the same way as described above.
- Trying to change a pad net name (via properties dialog) results in assert being fired. It is done on purpose (as there is a call to GetNetname() and net name and net code do not match). This will not happen after the next commit.
- Prepared a simple project (starting with schematics). Imported net list, changed schematic, reimported net list - changes are applied.
- Eagle & KiCad legacy boards seem to load without any problem.
2014-01-10 18:04:07 +01:00
Maciej Suminski 386d1fc257 Made two functions immune to empty containers. 2014-01-10 17:19:33 +01:00
Brian Sidebotham 51e3d8943f * Fix FindwxWidgets.cmake for V3.0 wxWidgets using 'win32' style find. i.e. for MinGW native build without msys or cygwin 2014-01-09 23:13:22 +00:00
Dick Hollenbeck edc5783411 file maintenance, update some scripts 2014-01-09 09:01:59 -06:00
Maciej Suminski 487b609e76 Removed NETINFO_ITEM::SetNet() and NETINFO_ITEM::SetNetname() methods.
NETINFO_ITEM::m_Net and NETINFO_ITEM::m_Netname are const.

Changes to be verified:
- pcbnew/minimun_spanning_tree.cpp: It segfaults is m_Size == 0
- pcbnew/exporters/export_gencad.cpp: I removed the SetNetname() call, as it changes only the unconnected net and in the next line it returns if the net is unconnected. Still, I wonder if name for the unconnected net matters. What about tests that check if a net name is empty to decide if it is unconnected net or not.
2014-01-09 15:51:47 +01:00
jean-pierre charras d3f0151ad4 Code cleanup: Pcbnew: move files relative to export functions to the new folder exporters
Pcbnew, Eeschema: remove include file <protos.h> from a lot of files which do not need it.
2014-01-08 20:29:46 +01:00
Dick Hollenbeck a8bc07c832 Add KICAD_REPO_NAME to the about dialog and build_version.cpp 2014-01-08 08:47:39 -06: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
Maciej Sumiński e9d3f787db merge Orson's patch with changes 2014-01-07 20:02:03 -06:00
Dick Hollenbeck a2a723ddf6 Fix option description, add mark_as_advanced(), and add a comment to KICAD_SKIP_BOOST 2014-01-07 20:00:47 -06:00
Maciej Sumiński c1e68436f1 Remove assembly language files, and make building Boost optional.
https://lists.launchpad.net/kicad-developers/msg11965.html
2014-01-07 19:52:19 -06:00
Dick Hollenbeck 1c0f034bca Make KiCad compile with minimal warnings against SVN HEAD of wxWidgets as of today. 2014-01-07 19:34:04 -06:00
jean-pierre charras 710e6a56c4 Move files relative to export code to subdir exporters. 2014-01-07 21:41:32 +01:00
jean-pierre charras fe919cd456 Update demos. Fix pspice netlist issues when using ( and ) in net names ( parenthesis are replaced by underscore) . 2014-01-07 20:42:34 +01:00
Cirilo Bernardo b02f12f440 Commit patch about new better vrml export. patch to fix mirrored page layout when print mirrored is enabled ( page layout should not be mirrored) 2014-01-07 20:27:51 +01:00
Maciej Suminski 8f054a606f Fixed snapping and ratsnest update for EDIT_TOOL. 2014-01-07 17:23:17 +01:00
Maciej Suminski 84412ce135 Delaunau triangulation algorithm was bailing out if run on an emprty container. 2014-01-07 15:52:10 +01:00
Maciej Suminski 6ad9d013e2 Safer way for syncing pads in Push and Shover router. 2014-01-07 14:23:46 +01:00
Maciej Suminski 75db0cebb7 Fixed Push and Shove and ratsnest cooperation (tracks added by PNS are taken into account while calculating ratsnest). 2014-01-07 14:22:37 +01:00
Maciej Suminski 69cf8aa325 Fixed snapping for Push and Shove router. 2014-01-07 14:21:37 +01:00
Maciej Suminski 3fe183c472 Tools have possibility to react to GAL switching or model (board) reload. 2014-01-07 14:16:47 +01:00
Maciej Suminski aaf857e894 Items removed from board are removed from ratsnest as well. Corrected the way of items removal from ratsnest. 2014-01-07 14:15:40 +01:00
Maciej Suminski bc71a2c007 Removed TOOL_STATE.idle field, as it was redundant. 2014-01-07 14:11:53 +01:00
Maciej Suminski 7784365b39 Fixed bounding box for module texts. 2014-01-07 14:09:27 +01:00
Marco Serantoni 290a60a462 [MacOSX] Fixing STL && single processor building in pixman 2014-01-07 00:20:52 +01:00
jean-pierre charras 714d5b28d2 Better vrml export, from Cirilo Bernardo. 2014-01-06 21:14:24 +01:00
Maciej Suminski 537d82fb98 Upstream merge. 2014-01-06 10:29:31 +01:00
Marco Serantoni 54bbba6c86 [MacOSX] fixes some corner case compiling on x86 in boost 2014-01-04 14:40:22 +01:00
Marco Serantoni 2c39ea00e2 [MacOSX] Added support in boost context for PPC processors, now is possible again compile kicad testing for PPC ( https://svn.boost.org/trac/boost/ticket/8266 ) 2014-01-04 03:13:18 +01:00
Dick Hollenbeck 84cf722541 This is why we cannot have nice things. This is why we test our changes before committing.
Pray for angus johnson who is support too many languages, and needs to find a text editor that removes trailing whitespace.
2014-01-03 18:46:06 -06:00
Dick Hollenbeck dbb72d161e fix some compiler warnings 2014-01-03 18:07:20 -06:00
Dick Hollenbeck 6b08cb4ca1 comment out broken tool_modview.cpp's useless footprint select button. somebody needs to fix this. 2014-01-03 17:19:54 -06:00
Dick Hollenbeck cbcf666470 force switch to boost::context, add --force option to bzr clean-tree 2014-01-03 17:17:50 -06:00
Dick Hollenbeck e659d53590 fix compiler warnings 2014-01-03 17:16:40 -06:00
jean-pierre charras eb22bf426c Pcbnew: very minor fixes and update: update clipper version. uncrustify polytri/* and fix some warning compil. 2014-01-03 18:39:28 +01:00
Cirilo Bernardo 6e56aa2ff0 IDF3 wxDateTime patch to fix MinGW builds for missing localtime_r(). 2014-01-03 08:31:50 -05:00
Cirilo Bernado deb3d54c01 Adds basic IDF3 export (board and cutouts / holes only) 2014-01-02 10:28:10 +01:00
Cirilo Bernardo 0b853c5af2 Adds basic IDF3 export (board and cutouts / holes only) 2014-01-02 10:26:03 +01:00
Dick Hollenbeck c264823731 8 bit string relief via class UTF8 2014-01-01 20:17:07 -06:00
Dick Hollenbeck f346727214 FIX: only invoke fp-lib-table options editor when table not empty. 2013-12-31 10:59:33 -06:00
Dick Hollenbeck bfc72b0183 Add bzr clean-tree to download_boost.cmake 2013-12-31 10:58:05 -06:00
Marco Serantoni 54fe3eeeee [MacOSX] Reorganize OSX Library PATH, first the USER's one then the SYSTEM's one 2013-12-31 15:28:34 +01:00
Marco Serantoni 4d139b590f [MacOSX] Adding better support for Retina Display (NSHighResolutionCapable) 2013-12-31 12:03:02 +01:00
Marco Serantoni 6d2db4783e [MacOSX] Manage older OpenSSL API (needed for OSX 10.6) and probably older linuxes 2013-12-31 11:48:16 +01:00
Marco Serantoni 7ffd6db5b4 [MacOSX] Manage older OpenSSL API (needed for OSX 10.6) and probably older linuxes 2013-12-31 11:45:17 +01:00
Marco Serantoni b08c85f67c [MacOSX] Removing freetype dependecy for Cairo (uses cocoa font management) 2013-12-31 11:44:16 +01:00
Marco Serantoni 2d53c8eef5 [MacOSX] disable -fvisibility due compiler blames.. 2013-12-31 11:42:25 +01:00
Dick Hollenbeck 52d3535160 minor tidying 2013-12-31 00:25:53 -06:00
Dick Hollenbeck f9ab5d2c61 Add -fvisibility options to significantly reduce binary sizes.
Switch to boost::context for all platforms, almost.
Please try your platform by commenting out fcontext.s in common/CMakeLists.txt.
2013-12-30 11:53:12 -06:00
Marco Serantoni cae7a6ffb8 [MacOSX] fixes issues with previous OSX compilers gcc-4.2 and makes a better general beaviour of KICAD_BUILD_STATIC 2013-12-30 16:53:09 +01:00
Marco Serantoni 6e586d6996 Fixing typo 2013-12-30 01:36:57 +01:00
Marco Serantoni ea4bec99d0 [MacOSX]/All purpose - Support for static linking 2013-12-30 01:27:03 +01:00
jean-pierre charras 7fa0aa8f4f eeschema: fix compil issue. Boost build: boost lib context built only on OSX (does not build on mingw, and not needed) 2013-12-29 23:05:06 +01:00
Marco Serantoni 573b7424dc [MacOSX]/All purpose - Starting support to static linking 2013-12-29 20:38:12 +01:00
Marco Serantoni 66e8017d74 [MacOSX] fixes a missing feature in boost and fixes static build with x86/i386 involved
(https://svn.boost.org/trac/boost/ticket/8266)
2013-12-29 20:36:30 +01:00
jean-pierre charras 612e2ddb4a fix bugs 1264240, 1264247, 1264239, 1264233 (clang report errors) 2013-12-29 16:12:27 +01:00
jean-pierre charras a455ab4a90 Fix bugs 1264236, 1264238, 1264254 2013-12-29 12:01:54 +01:00
jean-pierre charras 46e82e4e18 Move HitTestForCorner and HitTestForEdge code from class_zone to polygon/PolyLine.cpp, to avoid redundant code.
Fix bug 1264248.
Fix a very minor issue in RemoveTrailingZeros, for countries where the separator in floating numbers is a comma.
2013-12-29 11:15:06 +01:00
Marco Serantoni 5418a083d9 Shows the current BZR version in version.h, not the last in the repository (Nick Østergaard) 2013-12-28 12:29:20 +01:00
jean-pierre charras ca60f0863a Dialog fp plugin option: Fix compil issue under gcc 4.4 (does not happen with 4.6 and later) about an overloaded function. 2013-12-27 12:44:40 +01:00
jean-pierre charras f9cc325bd8 Pcbnew, 3D viewer: fix incorrect position of multiline texts. 2013-12-27 08:24:36 +01:00
Dick Hollenbeck 517ca83fbc Hide m_galCanvas and m_galCanvasActive behind accessors. Fix DLIST concatonation API corner case. 2013-12-26 16:36:43 -06:00
fabrizio. 9be908ce79 Update freedesktop files according to http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html 2013-12-24 13:11:18 -06:00
Dick Hollenbeck b9c56b2fc4 FIX: avoid use of wxFileName::GetModificationTime() when it can fail. 2013-12-24 13:09:41 -06:00
Dick Hollenbeck 81ef4cd422 add mime type application/x-pcbnew-pcb, extend Desktop Exec to support a file to open on command line 2013-12-24 13:07:17 -06:00
Dick Hollenbeck 69dccf19c1 Update resources/linux/mime with zip from Fabrizio 2013-12-24 12:46:56 -06:00
Marco Serantoni fdd9b79879 [MacOSX] Thanks for the hint, nullset@freenode, Merry Xmas ! 2013-12-24 19:16:56 +01:00
Baranovskiy Konstantin 065966291c Fix worksheet multiple line text plotting bug. (fixes lp:1261906) 2013-12-23 11:25:13 -05:00
Dick Hollenbeck 860d26e451 kicad-install.sh: abort on first failure. 2013-12-23 09:39:40 -06:00
Marco Serantoni d6292053f3 [MacOSX] Fixing Zone visualization and removing not working code 2013-12-23 16:14:22 +01:00
jean-pierre charras c5031d3f62 specctra_export.cpp: Fix a conversion error from mils to mm I made i n may last commit, which set min dist to find a segment end for internal outlines holes to 1 mil instead of 10 mils. 2013-12-23 09:07:08 +01:00
Marco Serantoni 0dd18c2549 [MacOSX] Cleanup 2013-12-22 20:52:52 +01:00
jean-pierre charras d337d340ee Fix broken download_boost.cmake. Fix minor other issues:
dialog fp lib table display not updated (Windows specific) when an option is changed from the lib table option editor
overloaded function in dialog_fp_lib_table.cpp not compiled with gcc 4.4.7 (try to fix Bug #1262002).
specctra_export.cpp: set min dist to find segment ends when building the board outline to 2 microns (should break anything, but should be enough to fix rounding issues when creating/importing board outlines with arcs)
2013-12-22 20:02:04 +01:00
Marco Serantoni 057a947a4b [MacOSX] Fixing crash/missing refresh in pcb text 2013-12-22 18:39:37 +01:00
Marco Serantoni f3cfea9521 [MacOSX] Fixing crash when changing module text properties - bug #1230090 2013-12-22 18:29:57 +01:00
Maciej Suminski 578ecc6f45 Merge zone outline drawing fix request. 2013-12-22 11:30:46 -05:00
Maciej Suminski 702a90addc Merge aligned text fix request. 2013-12-22 11:07:47 -05:00
Marco Serantoni 2441a7a046 [MacOSX] Treats LLVM as GCC + adds support for boost multiple processor(ppc/intel) and address(32/64 bit) 2013-12-22 15:55:05 +01:00
Maciej Suminski ff6a7e648f OpenGL canvas rats nest merge request. 2013-12-20 15:58:18 -05:00
Maciej Suminski 3dc9f295a4 Fixed cursor force position option. 2013-12-20 16:07:58 +01:00
Maciej Suminski c79962635e Ratsnest is updated, when there are tracks added using the P&S router. 2013-12-20 15:18:41 +01:00
Maciej Suminski 5fe20bbc70 Fixed broken search filters. 2013-12-20 11:54:48 +01:00
Maciej Suminski fe5c5953fc Upstream merge. 2013-12-20 10:15:00 +01:00
jean-pierre charras dd3da8428c Undo the change in specctra_export I erroneously committed, which is not fully tested. 2013-12-19 12:43:16 +01:00
jean-pierre charras 50f6186ebc Dxf export: fix an issue in exported arcs. Update libdfx.
Pcbnew:, libedit, Save lib as...: the new .pretty lib format is the default, instead of legacy .mod format. The legacy format is still selectable in the file selection dialog.
2013-12-19 12:33:57 +01:00
Maciej Suminski 84c496e138 Upstream merge 2013-12-19 11:15:27 +01:00
Maciej Suminski d613da8b8d Module texts are undo/redoable. 2013-12-19 10:10:42 +01:00
Baranovskiy Konstantin de65a7a1da Fix border and title block line thickness plotting bug. (fixes lp:1261899) 2013-12-18 13:11:15 -05:00
Wayne Stambaugh 51d9765826 CvPcb: reload footprint list when footprint library table is changed. (fixes lp:1261911) 2013-12-18 11:36:07 -05:00
Maciej Suminski 7ce91d4e38 Fixed zone area removal (& undoing) using the EDIT_TOOL. 2013-12-18 17:16:15 +01:00
Maciej Suminski fb78432367 Made pads & module texts unselectable 2013-12-18 16:26:21 +01:00
Wayne Stambaugh 75777f4a4e Pcbnew: rotate footprint hot key fixes (fixes lp:1066182).
* Change general properties dialog to allow for entry of arbitrary rotation
  angles for greater than 0 to 90.
* Move global rotation angle variable into PCB_EDIT_FRAME object where it is
  used and add accessors.
* Change rotate footprint undo operation from UR_ROTATE_XXXX to UR_CHANGE.
* Create function to remove trailing zeros from floating point wxString
  objects.
2013-12-18 09:48:59 -05:00
Maciej Suminski f4de2877f3 Added possibility of removing selected items while dragging. 2013-12-18 15:38:38 +01:00
Maciej Suminski fd0a3348ea More elegant way of handling interruption of current modifications. 2013-12-18 15:11:12 +01:00
Maciej Suminski c1d6e44413 Speed optimization during selection of multiple items.
Removed debug output.
2013-12-18 15:09:09 +01:00
Maciej Suminski 873235304e SELECTION_TOOL uses ITEMS_PICKED_LIST to store selected items.
Modifications done using the EDIT_TOOL are saved using the default KiCad's undo buffer.
If there is only one item selected, info about the item is displayed in the bottom status bar.
2013-12-18 14:33:34 +01:00
Maciej Suminski e4efe212d6 Added MODULE::RunOnChildren(). 2013-12-18 13:39:11 +01:00
Maciej Suminski 32065b339a Added const modifiers where applicable (PICKED_ITEMS_LIST).
Added PICKED_ITEMS_LIST::FindItem().
2013-12-18 13:27:18 +01:00
Maciej Suminski 4a0407fb69 Removed some debug logs. 2013-12-18 12:46:18 +01:00
Wayne Stambaugh ca11fcb5c9 Pcbnew: change general properties dialog rotation angle to text edit control. 2013-12-17 16:38:20 -05:00
Wayne Stambaugh 8fe06e12b9 Merge changes from testing head. 2013-12-16 16:41:32 -05:00
Wayne Stambaugh 8f6d69e57e Pcbnew: fix 45 degree rotation angle undo and global variable elimination. 2013-12-16 16:40:03 -05:00
Maciej Suminski 60e3b01ace Fixed drawing of rotated texts that are not horizontally center aligned. 2013-12-16 10:36:33 +01:00
jean-pierre charras bb8741c74f Pcbnew: remove broken patch for" Bug #1255059".
Minor change: Eeschema+Pcbnew: display timestamp in edit dialogs (for footprints, sheets, components)
2013-12-14 20:03:38 +01:00
Wayne Stambaugh efd9963750 Pcbnew: minor Geda and KiCad plugin improvements.
* Make GPCB_PLUGIN::EnumerateFootprints() read the directory contents
  instead of loading the entire cache.
* Make KICAD_PLUGIN::EnumerateFootprints() read the directory contents
  instead of loading the entire cache.
2013-12-13 18:16:40 -05:00
Wayne Stambaugh 2d9385b43a Make old behavior the default in EnumerateFootprint() changes. 2013-12-13 18:14:30 -05:00
Wayne Stambaugh 30a08e2bed Pcbnew: minor Geda and KiCad plugin improvements.
* Make GPCB_PLUGIN::EnumerateFootprints() read the directory contents
  instead of loading the entire cache.
* Make KICAD_PLUGIN::EnumerateFootprints() read the directory contents
  instead of loading the entire cache.
2013-12-13 18:01:42 -05:00
Dick Hollenbeck 031ab96f12 github_plugin.cpp was erroneously affected by rev 4552 patching. 2013-12-13 10:39:46 -06:00
Povilas Kanapickas 7f12513c7e Remove some uses of using namespace std. 2013-12-13 10:27:30 -06:00
Dick Hollenbeck 5c28285cdf kicad-install.sh and library-repos-install.sh utilize /etc/profile.d/kicad.sh for setting environment variables globally 2013-12-13 09:35:05 -06:00
Wayne Stambaugh 6c4518b015 Pcbnew: Geda plugin fixes.
* Prevent cache from being reloaded on every footprint file read.
* Fix a bug forming wxFileName in GPCB_FP_CACHE::Load().
* Fix invalid file name time stamp debug assertion.
* Use FPID to set loaded footprint name.
* Remove file name <> from exception strings per UIPolicy.
2013-12-12 12:42:38 -05:00
Dick Hollenbeck 7ba078b620 remove USE_FP_LIB_TABLE code, make it the norm. Add lazy loading support to FOOTPRINT_INFO. 2013-12-12 10:01:03 -06:00
Wayne Stambaugh b85a713395 Fix footprint viewer perspective save bug. 2013-12-11 15:08:13 -05:00
Dick Hollenbeck ed42092464 Add strtok_r.c 2013-12-10 17:52:51 -06:00
Dick Hollenbeck e842d711c6 FIX: make LEGACY_PLUGIN re-entrant. extern "C" strtok_r() put conditionally into libcommon. 2013-12-10 17:41:34 -06:00
Marco Mattila 40d0a14560 Fix wxWidgets 2.8 validator bug in footprint name entry dialog. (fixes lp:1259204) 2013-12-10 14:24:10 -05:00
Maciej Suminski 4940bff891 Commit merge request lp:197913. 2013-12-10 12:14:30 -05:00
Maciej Suminski 3701e13186 Commit merge request lp:197858 (fixes lp:1249736). 2013-12-10 08:43:04 -05:00
Dick Hollenbeck dbd72122e1 dialog perfection does not come easily. 2013-12-09 16:48:09 -06:00
Dick Hollenbeck bb872dd583 spinners initial values and limits. 2013-12-09 16:39:12 -06:00
Wayne Stambaugh 74e43871d4 Fix frame perspective configuration entry name in basicframe.cpp. 2013-12-09 15:27:49 -05:00
Dick Hollenbeck 3582df6a0b molding mercury. 2013-12-09 13:06:47 -06:00
Dick Hollenbeck d8b270ca4d move ${Boost_LIBRARIES} into cvpcb, pcbnew, _pcbnew and out of github, because worker threads used regardless of github 2013-12-09 12:48:42 -06:00
Dick Hollenbeck dba4fccec9 *) Change FOOTPRINT_LIST::ReadFootprintFiles( FP_LIB_TABLE*, const wxString*)
To use multiple working threads.  This entailed adding KiCad typedefs:
*) Add typedefs for MUTEX and MUTLOCK which mask the actual choices for the project.
*) Add FOOTPRINT_LIST::DisplayErrors( wxWindow* ) which is a single strategy for
   showing aggregated load errors.  Although what's there is only scaffolding
   and needs a volunteer who knows HTML pretty well.
*) Ensure all callers of ReadFootprintFiles() use the new DisplayErrors() function.   
*) Push utf8.cpp and utf8.h into common library for open use.
2013-12-09 12:09:58 -06:00
Maciej Suminski 7e60cc530a Comments. 2013-12-09 11:07:30 +01:00
Maciej Suminski a3909d4f71 Added removal of BOARD_ITEMs for the TOOL_FRAMEWORK. 2013-12-09 11:01:05 +01:00
Maciej Suminski d8acd1c718 Moved Init() & Reset() from TOOL_INTERACTIVE to TOOL_BASE.
Added REASON enum for Reset() function, so tools will know why a reset occured.
Fixed SELECTION_TOOL (it was bailing out, when a new board was loaded and some items were still selected).
Added removal of VIEW_ITEM groups after changing layers and removing items.
2013-12-09 10:42:38 +01:00
Dick Hollenbeck 7717aa9279 fixes, a couple more unit tests. 2013-12-08 09:25:11 -06:00
Wayne Stambaugh 8316477638 Enable building the footprint library table as the default. 2013-12-08 09:06:55 -05:00
scrizt aef48d2716 Allow spoke width to equal minimum zone width in pcbnew (fix bug #1255059) 2013-12-08 12:00:20 +02:00
Dick Hollenbeck 5df7288678 complete class UTF8.cpp 2013-12-08 00:48:25 -06:00
Dick Hollenbeck 2f327f068d Documentation/guidelines/UIpolicies.txt should not speak of the unspeakable use of <> in quoted strings. 2013-12-07 22:49:44 -06:00
Dick Hollenbeck 7d58d82656 common/gal/stroke_font.cpp was segfaulting in wx 2.8 when drawing multi-line string. 2013-12-07 22:47:37 -06:00
Dick Hollenbeck e2b7ba4b19 eeschema/dialogs/dialog_lib_new_component.cpp was not expanding part name field nor setting initial focus. 2013-12-07 22:46:25 -06:00
Wayne Stambaugh 4f2921f384 Pcbnew: footprint viewer wxAUI improvements.
* Make the tool bar dockable.
* Enable the overflow control in the tool bar in case the it does not fit in
  it's parent window.
* Fix some wxAuiPaneInfo usage issues.
* Remove unused wxAuiPaneInfo objects.
* Move perspective saving and loading into EDA_BASE_FRAME object in preparation
  for extending this to all frame windows.
2013-12-06 19:33:16 -05:00
Dick Hollenbeck 03a4f5c4ea Move "code costly" functions in experimental class UTF8 to be not "inlined", prefering compactness. 2013-12-06 14:22:10 -06:00
jean-pierre charras 4374e25219 Plot functions: some enhancements in mirror mode (Pcbnew specific): boards are mirrored horizontally, and the page layout is no more mirrored, and therefore is always readable. 2013-12-06 19:31:15 +01:00
maciej. 72e567f503 Bug fix: pcbnew hangs up on polygon movement 2013-12-06 15:34:39 +01:00
Maciej Suminski 6d0a35323b Removed unnecessary parts. 2013-12-06 15:01:36 +01:00
Dick Hollenbeck a0623d9584 UTF8::uni_iter made leaner. 2013-12-06 07:32:33 -06:00
Maciej Suminski aebb8b3ff9 Fixed an infinite loop in the destructor of ACTION_MANAGER; 2013-12-06 13:57:56 +01:00
Dick Hollenbeck 391ff6699a sketch out class UTF8::uni_iter, add tools/make-UTF8.sh 2013-12-06 06:51:39 -06:00
Maciej Suminski b8b96f77a2 Corrected drawing of zone outlines. 2013-12-06 11:25:23 +01:00
Maciej Suminski afe2bbaca7 Corrected polygon outline width. 2013-12-06 10:00:51 +01:00
Dick Hollenbeck 6274740de9 add a concept of an 8 bit string class for testing and experimentation. 2013-12-05 14:36:18 -06:00
Orson 45cd2756a6 merge lp:~cern-kicad/kicad/bugfix_1256302 from Orson 2013-12-05 13:04:06 -06:00
Dick Hollenbeck a2f6faf161 Switch STROKE_FONT::Draw() to take "const wxString&" rather than "wxString" by value. 2013-12-05 12:59:27 -06:00
Dick Hollenbeck ed29423b78 merge lp:~cern-kicad/kicad/bugfix_1256302 from Orson 2013-12-05 12:55:07 -06:00
Maciej Suminski dffacc18ec DIfferent handling of italic texts, depending on the mirroring setting. 2013-12-05 17:00:29 +01:00
Maciej Suminski 24550f3f38 Tilda handling for STROKE_FONT class. 2013-12-05 16:58:32 +01:00
Maciej Suminski 6be27ae2ea Glyphs and their bounding boxes are held in vectors instead of deque.
Moved scaling of font glyphs to the moment when they are created (eliminated a few multiplications unnecessary variables).
Changed some magic numbers into constants.
2013-12-05 16:29:54 +01:00
Maciej Suminski ca11855f12 Changed std::wstring to wxString. 2013-12-05 16:00:24 +01:00
Maciej Suminski 0e7db24049 Fixed SetCurrentContext() assert, that was firing on closure of pcbnew, when the OpenGL backend was active. 2013-12-05 14:54:30 +01:00
Maciej Suminski fc2d8e91c9 Changed selection rules (pads&modules can be selected depending on the 'modules front/back' visibility instead of corresponding copper layers).
Fixed comments.
2013-12-05 14:52:08 +01:00
Maciej Suminski c5a1df6216 ClearHotKey() function. 2013-12-05 14:48:44 +01:00
Maciej Suminski d7fc8db02c Removed warning. 2013-12-05 13:46:13 +01:00
Maciej Suminski aa7168708c Merged upstream 2013-12-05 13:24:27 +01:00
Dick Hollenbeck 7985a4b16b From kicad-install.sh, issue instructional aid on setting KIGITHUB if not already set. 2013-12-04 16:19:55 -06:00
Maciej Suminski 27c7eb5dce The Selection Tool displays information about selected items. ClearSelection() made public. 2013-12-04 10:58:51 +01:00
Dick Hollenbeck 879a6225c2 Add a test script for plugin testing, and some asserts, no bugs fixed. 2013-12-03 12:37:21 -06:00
Maciej Suminski 24a317ce28 The Selection Tool is always active. Removed entries for toolbar menu and hotkeys for the tool. 2013-12-03 17:11:22 +01:00
Maciej Suminski 7d788109fe Merged upstream 2013-12-03 16:43:53 +01:00
Maciej Suminski 07a5774a1e Renamed MOVE_TOOL to EDIT_TOOL. 2013-12-03 16:09:03 +01:00
Maciej Suminski b582162cb5 Split rotate and flip operations into separate functions.
Added Properties action (display properties windows)
2013-12-03 15:57:09 +01:00
Maciej Suminski ad3cb1f36a Added TOOL_MANAGER::RunAction() function. 2013-12-03 15:41:41 +01:00
Maciej Suminski bec2e9b178 Added some comments & asserts. 2013-12-03 15:17:43 +01:00
Maciej Suminski 7678983e38 Fixed non ASCII characters drawing using GAL. 2013-12-03 11:00:52 +01:00
jean-pierre charras ab36d23595 Pcbnew: fix issue in modedit, undo command: moved fields were not drawn afetr undo (due to incorrect flags state)
Fix incorrect initialization of lib names column in EDA_LIST_DIALOG. (Only the row 0 was initialized)
2013-12-03 09:50:58 +01:00
Dick Hollenbeck c6d7ee7e19 Fix important informational comment in library-repos-install.sh 2013-12-02 14:08:13 -06:00
Dick Hollenbeck 81bdafcf55 *) update scripts/kicad-install.sh to use Github plugin for system footprints.
*) Add scripts/library-repos-install.sh for downloading *.pretty libraries and possibly using them.
*) Remove template/fp-* files, they are now at https://github.com/KiCad/kicad-library/template/*
   so they can be maintained by the library team.  However note that it is possible to break
   kicad-install.sh with uncoordinated changes to that github repo.

It is best to delete your ~/kicad_sources/kicad-lib.bzr directory before running kicad-install.sh
at this or any newer version relative to an older library repo.
2013-12-02 12:21:06 -06:00
Maciej Suminski 0e514e93c4 Pcbnew: fixed disappearance of selected items after GAL switching. 2013-12-02 13:04:26 -05:00
Robert Yates 697d95cc86 Boost::Context support for ARM platform. 2013-12-02 10:59:09 -05:00
Maciej Suminski 08fd9d8cbd Overridden ViewUpdate() for MODULE class, so it handles its pads, drawings and texts. 2013-12-02 14:35:05 +01:00
Maciej Suminski 2b0f3350e3 Fixed disappearance of selected items after GAL switching. 2013-12-02 11:34:07 +01:00
Dick Hollenbeck 4a297e7812 library repo name has changed at launchpad, and will soon be switched to github. 2013-12-02 00:59:06 -06:00
Wayne Stambaugh 56e2df79f6 Pcbnew: footprint library table fixes.
* Replace illegal file system characters when reading legacy libraries to
  prevent FPID parsing errors and allow saving to PRETTY file format.
* Create validator to filter illegal file system characters from footprint
  name text edit controls to prevent issues when saving to PRETTY file format.
* Add missing source file licenses and some minor coding policy fixes.
2013-11-29 13:29:41 -05:00
Maciej Suminski 4876dbea24 Storing the selected item position from a context menu. 2013-11-29 16:45:39 +01:00
Maciej Suminski e76a151ee7 Added a missing file 2013-11-29 16:13:09 +01:00
Maciej Suminski 3ce3d22b97 Moved the SELECTION_TOOL out of the KIGFX namespace. 2013-11-29 09:37:23 +01:00
jean-pierre charras 48f9ea2287 eeschema, Pcbnew: fix Bug #1255822 (incorrect position of multiline texts when plotting them) 2013-11-29 09:13:43 +01:00
Dick Hollenbeck a105a1ea4d *.kicad_mod omits (at 0 0) for brevity. 2013-11-28 10:40:23 -06:00
Dick Hollenbeck 224594625a API Documentation improvements, especially noticable when viewing doxygen output. 2013-11-28 09:41:10 -06:00
Maciej Suminski af976b2d36 Automatic unregistration of tool actions during ACTION_MANAGER destruction. 2013-11-28 15:24:19 +01:00
Maciej Suminski c21ae6efca Double click support for the Tool Framework. 2013-11-28 15:19:50 +01:00
Dick Hollenbeck 183afdd089 Even more clarification on "Github" plugin usage 2013-11-27 14:15:11 -06:00
Dick Hollenbeck 1b93203f7c Better GITHUB class header documentation, better eeschema library field dialog stretching and title. 2013-11-27 14:06:41 -06:00
jean-pierre charras cd9da9dd64 Pcbnew: fix Bug #1255568 (relative to .pos file creation). Minor compil warnings fixes 2013-11-27 20:38:59 +01:00
Jon Neal 18dd52385f FIX: Red Hat (and derivatives such as Fedora) support in kicad-install.sh 2013-11-27 08:13:06 -06:00
jean-pierre charras f068c0d94f Pcbnew: Autoplace functions: renamed spread footprint functions. Rewritten.
Now footprints, after loaded by reading a netlist are grouped by sheets by the footprints spread function, and the grouping is better.
Rename 2 files. Fix minor issues. Clean code
2013-11-27 14:20:42 +01:00
Robert Yates 838d5957cf Boost::Context support for ARM platform. 2013-11-27 09:48:31 +01:00
Maciej Suminski 06f4662ea0 Profile counter simplified, so it should be more portable. 2013-11-27 09:46:59 +01:00
Dick Hollenbeck 251f0c7f9b Ensure a unique FootprintEnumerate() return list in GITHUB_PLUGIN when using COW. 2013-11-27 00:51:49 -06:00
Dick Hollenbeck b0c739e7ee *) Implement "Copy On Write" (COW) support in GITHUB_PLUGIN. See class header
comment for GITHUB_PLUGIN which should flow into Doxygen output.
*) Rewrote: 
        PCB_BASE_FRAME::Save_Module_In_Library(): now uses fp-lib-table and PROPERTIES.  
        PCB_EDIT_FRAME::ArchiveModulesOnBoard(): now can archive to any writable library type.
        PCB_BASE_FRAME::SelectLibrary(): is now generic for selecting a library, not just the active library.
2013-11-27 00:04:04 -06:00
Dick Hollenbeck 56615d1653 FIX: work around for wx 2.8 bug affecting wxListCtrl column resizing. 2013-11-26 11:08:07 -06:00
Dick Hollenbeck 96c2bee8c3 PLUGINs which implement FootprintLibOptions() should call base class's implementation too. 2013-11-26 11:06:54 -06:00
Andrey Fedorushkov d8954ca3cf eeschema: fix parts range 1 to 26 in component 2013-11-26 13:15:20 +04:00
Maciej Suminski c6efc451e6 Added ratsnest for GAL 2013-11-25 16:50:03 +01:00
jean-pierre charras 18616d7782 Fix bugs in autoplac.cpp 2013-11-25 12:29:16 +01:00
Andrey Fedorushkov 1b58582e25 pcbnew: fix error build autoplace.cpp in linux gcc-4.8.2
template: add file fp-lib-table.for-eagle
2013-11-25 10:10:24 +04: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 78670eebb0 Pcbnew: Fix a crash on exit when an item was previously deleted. Fix not working footprint exchange functions 2013-11-22 20:47:10 +01:00
jean-pierre charras 44bb2e6d4d Pcbnew: Code cleaning and some minor fixes. 2013-11-20 18:26:47 +01:00
Dick Hollenbeck d0c50d5654 Add template fp-lib-table for eagle-6.4.0 2013-11-20 10:38:06 -06:00
Dick Hollenbeck 8df7407b80 FIX: regression loading of SMD pads within EAGLE_PLUGIN::FootprintLoad().
FIX: unique renaming of eagle footprints by substituting illegal : and / with URL encoding technique.
ADD: window resize border to DisplayError() windows.
2013-11-20 10:35:03 -06:00
Wayne Stambaugh 53f33d3941 Pcbnew: minor target properties dialog improvements.
* Make spacing between controls and dialog frame consistent.
* Use default size to allow wxWigdets to determine optimal dialog size.
* Set OK button as default so return key works properly.
2013-11-20 11:03:09 -05:00
Wayne Stambaugh f472b6deb1 Pcbnew: fix assertion when deleting BOARD_ITEM not linked to list. (fixes lp:1252696) 2013-11-19 16:51:33 -05:00
Dick Hollenbeck abfeab02d7 FIX: wx 2.8 convert to UTF8 differently than 2.9 caused problems in DIALOG_FP_PLUGIN_OPTIONS. 2013-11-19 14:38:29 -06:00
Wayne Stambaugh abe9801d3d Pcbnew: fix graphic item undo/redo bug. (--fixes lp:1252264)
* Use std::swap for PCB_LINE_T items in SwapData().
* Use std::swap for PCB_MODULE_EDGE_T items in SwapData().
* Add assignment operator to EDGE_MODULE object.
* Move code from copy method to assignment operator.
* Minor coding policy fixes.
2013-11-19 13:58:12 -05:00
Dick Hollenbeck 83a002ff91 Add a place-holder Description to fp-lib-table rows 2013-11-19 12:08:24 -06:00
Dick Hollenbeck f3ad2463e2 *) Switch to later environment variable expansion in fp-lib-table.
*) Save library nickname in APP so upon module editor re-entry last is re-used.
*) Fix bug editing fp-lib-table Description field.
2013-11-19 11:24:45 -06:00
Carl Poirier 468d50317d update fp-lib-table to footprint library renaming efforts. 2013-11-19 11:24:19 -06:00
jean-pierre charras 5a50b968d5 Eeszchema: Minor fixes.
Code cleanup: remove m_Son member in EDA_ITEM which was never used.
2013-11-19 17:27:13 +01:00
Dick Hollenbeck 9546c59fab more useable, in the face of wx 2.8 vs. 3.0 differences. 2013-11-18 16:42:01 -06:00
Dick Hollenbeck b177716b65 Work around wx 2.8 bug in wxListControl not honoring omissing of wxHSCROLL. 2013-11-18 16:03:34 -06:00
Dick Hollenbeck 300a047ffe more EDA_LIST_DIALOG usability enhancements, compiler warning, coding standards 2013-11-18 13:27:27 -06:00
jean-pierre charras cf7dbf6f94 Fix some minor issues 2013-11-18 18:52:18 +01:00
Dick Hollenbeck 7cf3467851 Show the "Description" field from fp-lib-table in pcbnew's module editor 'set current library' dialog. 2013-11-18 10:04:23 -06:00
jean-pierre charras 25bfd82240 Fix a compatibility issue for wxWidgets 3.0, when moving cursor by arrow keys.
Fix a very minor bug (2 duplicate lines when copying version informations to the clipboard)
2013-11-17 17:48:47 +01:00
Dick Hollenbeck 6aabb9bc38 EDA_LIST_DIALOG_BASE is used multiple times for different numbers of
columns.  DIALOG_SHIM would resize each separate usage to the same
size.  DIALOG_SHIM now supports and alternate m_hash_key in lieu
of the class name, optionally.
2013-11-17 00:04:20 -06:00
Baranovskiy Konstantin 94db11a8f6 Fix justification of vertically aligned multi-line text. 2013-11-16 20:31:07 -05:00
Wayne Stambaugh 4c8bff9f71 Eeschema: update component editor new component dialog with revise unit nomenclature. 2013-11-16 20:13:26 -05:00
Dick Hollenbeck 53e8c9b2c2 fix link error with multiply used edaapl.cpp 2013-11-15 09:12:07 -06:00
Dick Hollenbeck 593aa2dc12 Show KISYSMOD in DIALOG_FP_LIB_TABLE even if it has not been referenced by a URI. 2013-11-15 08:36:11 -06:00
Dick Hollenbeck 7196e7bc98 Show KIPRJMOD in DIALOG_FP_LIB_TABLE even if it has not been referenced by a URI. 2013-11-15 08:11:46 -06:00
Dick Hollenbeck c1429f2824 Allowing pre-setting CMAKE_CXX_FLAGS on first CMake invocation 2013-11-15 08:10:29 -06:00
jean-pierre charras 9f9f2ed380 Minor code cleaning: Remove unused file, remove obsolete or useless defines 2013-11-15 10:28:31 +01:00
jean-pierre charras 568a43b917 Minor fix about version information when BUILD_GITHUB_PLUGIN is on 2013-11-15 08:24:10 +01:00
Dick Hollenbeck 1ba6c82f44 TODO.txt 2013-11-14 16:52:28 -06:00
Maciej Sumiński b1facf3e90 add boost dependency on BZip2 by adding find_package( BZip2 REQUIRED ) 2013-11-14 16:51:11 -06:00
jean-pierre charras ccab3ff5ce rtree.h: suppress compil warnings about not initialized vars.
Pcbnew: add WIN32_LEAN_AND_MEAN define in github_plugin.cpp. Note: this define is already in use in avhttp build (Windows specific)
2013-11-14 19:00:57 +01:00
Wayne Stambaugh 0d6efaab94 Minor copy version information improvements.
* Add build type (debug/release) for wxWidgets library  versions greater
  than 2.8.
* Add build type (debug/release) for KiCad.
* Add missing build options.
2013-11-14 09:21:32 -05:00
Wayne Stambaugh b08fa18d7d Update TODO.txt to reflect completed FP_LIB_TABLE items. 2013-11-13 15:57:51 -05:00
Dick Hollenbeck b9bd421184 format string concatenation bug 2013-11-13 13:59:47 -06:00
Dick Hollenbeck d624dcebf2 half way point for Carl's *.mod file renaming work 2013-11-13 13:58:50 -06:00
Maciej Suminski 89b80b2bcd Merged rtree.h, to avoid code duplication.
Fixes the case, when waste is never greater then the worst case and seeds assignment does not occur.
2013-11-13 17:03:22 +01:00
Maciej Suminski 521d73ac5a Fix wx2.8 strings compatibility. (fixes lp:1250876) 2013-11-13 10:27:14 -05:00
Maciej Suminski fc4f9195b6 Fixed wx2.8 strings compatibility. 2013-11-13 15:52:06 +01:00
Dick Hollenbeck 179807922d change 2013-11-12 14:58:33 -06:00
Dick Hollenbeck 943b0678e3 Completion of DIALOG_FP_PLUGIN_OPTIONS 2013-11-12 14:49:17 -06:00
Maciej Suminski e8e6b1f7c4 Commit Launchpad merge request 194664.
* Modify error handling for OpenGL backend.
* Correct Doxygen comments notation.
2013-11-12 14:29:01 -05:00
Brian Sidebotham f10865e5c4 Although CMake keeps time stamps to remember how far it got in an ExternalProject_Add()
build, it throws the time stamps away when there are edits to the CMakeLists.txt portion
pertaining to the external project.  Only a 'make clean' would remove the untarred tree.
This patch removes the need to do a make clean when changing the ExternalProject_Add()
text pertinent to patching.

Fixes bug 1250222 in KiCad-Winbuilder
2013-11-12 12:44:30 +00:00
Dick Hollenbeck dc138512b9 wxString PCB_BASE_FRAME::SelectFootprintFromLibBrowser() now returns empty string on abort.
GITHUB_PLUGIN uses redirected URL to remove one HTTP hit time.
2013-11-11 19:14:17 -06:00
Wayne Stambaugh 5821d4bc48 Footprint library table fixes.
* Pcbnew: catch exceptions when saving changes to footprint library table.
* Pcbnew: update footprint viewer library list if open when footprint library
  table changes.
* CvPcb: update library list when footprint library table changes.
* Minor coding policy fixes.
2013-11-11 20:05:23 -05:00
Dick Hollenbeck 76fed4f995 *) Add PLUGIN::FootprintLibOptions( PROPERTIES* ), and extend DIALOG_FP_PLUGIN_OPTIONS to use it.
*) Move button handlers to LEFT MOUSE CLICK from COMMAND events, so wxGrid focus is not lost.
*) Sketch out the concept of COW support for the GITHUB_PLUGIN in its @todo.
2013-11-11 18:17:27 -06:00
Wayne Stambaugh 1f1a88534e Escape " character to fix warning in TokenList2DsnLexer.cmake 2013-11-11 16:39:02 -05:00
Dick Hollenbeck c7bb62290f error: 'uintptr_t' was not declared in this scope.
https://svn.boost.org/trac/boost/ticket/8973
https://svn.boost.org/trac/boost/changeset/84950#file0
2013-11-11 08:50:45 -06:00
Maciej Suminski d250ae5d81 Corrected Doxygen comments notation. 2013-11-11 13:47:08 +01:00
Maciej Suminski 5235d7e5eb Modified error handling for OpenGL backend, now error messages should be visible. 2013-11-11 10:48:49 +01:00
jean-pierre charras a3c02bc377 Pcbnew: fix a build issue when BUILD_GITHUB_PLUGIN is enabled. 2013-11-11 09:01:04 +01:00
Dick Hollenbeck b3b9e96c9a Support only one boost build subset, regardless of BUILD_GITHUB_PLUGIN.
This is so builders with multiple out of source build trees can all use
the same common boost install directory.  And the build system will not
vascillate between the fuller and lesser subsets of boost.
2013-11-10 18:47:54 -06:00
jean-pierre charras 5cea94089a All: under mingw32+msys: fix an issue when using Cmake version >= 2.8.5 which uses by default a response file.
This response file is not expanded under mingw3 2 (mingw/gcc bug?), and the list of include paths, found in this file, is not taken in account.
Now, under mingw32+msys, when not cross-compiling, the response file is disabled.
Cvpcb, Pcbnew: fix a list of libs  which should be added only when cross-compiling:
Previously, they were always added, which creates an issue with mingw/msy/ gcc  2.8.
Now they are added only when cross-compiling (this issue was noticeable only with msys+mingw version  2.8)
2013-11-10 20:15:09 +01:00
Dick Hollenbeck 683a655fa7 python in kicad-install.sh, if user enables it 2013-11-10 00:31:13 -06: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
Brian Sidebotham c1466216fd * Remove erroneous comment about requiring perl for OpenSSL build 2013-11-08 17:54:00 +00:00
Brian Sidebotham 60dacd55a4 * Build OpenSSL from source using the OpenSSL-CMake project on Windows with MinGW when no specifying OPENSSL_ROOT_DIR 2013-11-08 07:06:14 +00:00
Colin Cooper 253b62a0e5 kicad-install.h checks if bzr id set 2013-11-07 12:15:58 -06:00
Dick Hollenbeck 9b3d826bc1 switch to static linking of libstdc++ on windows 2013-11-07 08:26:32 -06:00
jean-pierre charras 35b1b13f27 Eeschema: Disable a debug option I enabled and forgot to remove. 2013-11-06 20:36:46 +01:00
Maciej Sumiński bb0f4b9ac3 Patches one by Lorenzo, one by Orson 2013-11-06 11:17:42 -06:00
Dick Hollenbeck eb125838fd add fix_eagle_package_name() and apply it in two places to re-spell eagle package names 2013-11-06 10:53:44 -06:00
Wayne Stambaugh b35fbc0a77 Set project footprint library table path environment variable before loading table. 2013-11-06 11:10:44 -05:00
Dick Hollenbeck 0d69a817e6 kicad-install.sh needed libcairo2-dev prerequisite 2013-11-06 08:37:39 -06:00
jean-pierre charras 99b640584f page layout editor: Add missing Info.plist for OSX.
Mingw, all: remove static link of libgcc, which can create issues when using dll version of wxWidgets.
Therefore libgcc_s_dw2-1.dll should be in the paths for executables.
2013-11-06 08:33:49 +01:00
Dick Hollenbeck 3a821bf8e6 add libglew-dev prerequisite for debian systems, it pulls in libgl1-mesa-dev and libglu1-mesa-dev on its own 2013-11-06 00:14:15 -06:00
Edwin van den Oetelaar 056800997a Running a very common Ubuntu 12.4.3 building from repo could not find the GLEW library. 2013-11-06 00:11:58 -06:00
Wayne Stambaugh a3f0e450ab Eeschema: fix bug loading grid size from previous session. (fixes lp:1239445) 2013-11-05 16:14:09 -05:00
Maciej Suminski bae5780dc3 Fixes missing worksheet layout when there is no PCB loaded and all random brightness changes for the Cairo rendering backend. 2013-11-05 15:22:49 -05:00
jean-pierre charras 44d9607461 Pcbnew: Fix incorrect bounding box calculation of texts. Only noticeable with boards conveted from Eagle, which are using other text justification than center.
Eagle plugin: filter and replace not allowed chars in FPID(-':' and '/')  by _ or -, if they are used in Eagle footprint names (otherwise, boards converted and saved under kicad_pcb format are not readable by Pcbnew).
2013-11-05 18:12:27 +01:00
jean-pierre charras db5409dfc7 Disable patch from Baranovskiy Konstantin about vertical justification of multiline texts, because it does not work for rotated/mirrored texts 2013-11-04 18:20:54 +01:00
jean-pierre charras f956fbd8ac painter: better size of pad nums and pad netnames in opengl mode 2013-11-04 18:18:19 +01:00
Dick Hollenbeck 96912e6b8c filter better the unsupported layers coming into EAGLE_PLUGIN::Load() 2013-11-03 20:09:28 -06:00
Wayne Stambaugh fe54ceacab Fix debug builds on wxWidgets 2.8. 2013-11-03 13:15:46 -05:00
jean-pierre charras e9f41a3b98 Opengl display: fix incorrect text size of pad num and pad netname. 2013-11-03 15:06:16 +01:00
Dick Hollenbeck 1e9cbe8055 Orson's changes 2013-11-02 15:06:13 -05:00
Dick Hollenbeck 5f329b472b make PROPERTIES::Value() not inline 2013-11-02 14:49:46 -05:00
Dick Hollenbeck 42ef7f6215 *) Start removing some of the problematic "<%s>.." format strings, which won't
pass into an HTML rendering panel and otherwise look goofey.
*) Implement BOARD::Move() can call it from EAGLE_PLUGIN::Load().
*) When USE_FP_LIB_TABLE, tolerate blank nicknames in FPIDs coming from eeschema.
   See the switch for this in pcbnew/netlist.cpp as ALLOW_PARTIAL_FPID.
*) Add an assert and a try catch block to figure out that View does not
   like some eagle pcb board.  bitset::set() is getting a -1 value and firing
   an exception.
2013-11-01 19:24:38 -05:00
jean-pierre charras 9e61c6ce1b Footprint wizards: fix issues. 2013-11-01 21:51:37 +01:00
jean-pierre charras 8caef8f8b1 Make footprint wizards compatible with FPID changes (MODULE::SetLibRef changed to MODULE::SetFPID) 2013-11-01 16:29:50 +01:00
jean-pierre charras a7c553b442 Pcbnew, compiled with python support: Under windows, force python environment, if the folder python27_us is found in Kicad bin folder (<kicad>/bin, and if python27_us environment is not fully set (i.e. if python27_us is not in the path, or if PYTHONPATH id not defined.) 2013-11-01 14:02:10 +01:00
Orson 28b9317640 Fix redraw issue in modedit a modview, with GAL 2013-11-01 13:56:20 +01:00
Maciej Suminski c94603f103 Added some comments and missing parameter names for pcb_painter.h. 2013-11-01 10:06:50 +01:00
Dick Hollenbeck 53e04ce7a6 cvpcb was not filtering on the current library when USE_FP_LIB_TABLE.
<%s> being replaced with '%s' because the former in invisible in html panels.
Cure some compiler warnings.
2013-10-31 16:30:57 -05:00
Dick Hollenbeck 0ca123d255 add --uninstall-libraries to kicad-install.sh 2013-10-31 14:12:14 -05:00
Wayne Stambaugh 1173eff777 Shorten footprint library table environment variable KICAD_PRJ_PATH to KIPRJMOD. 2013-10-31 09:08:36 -04:00
jean-pierre charras b8d81d263c Pcbnew: fix a crash when a non ascii char (i.e. a char having a code > 127) is found in a text (see Bug #1246340).
Could be only a temporary fix (tested only with French non ascii chars).
2013-10-30 21:07:52 +01:00
Dick Hollenbeck e4825ee2fc more fp_lib_table dialog work 2013-10-30 10:33:51 -05:00
Dick Hollenbeck 07d31b9cfd merge lp:~cern-kicad/kicad/pcbnew_segfix from Orson 2013-10-30 07:46:36 -05:00
jean-pierre charras 629c932952 Add undo command to dxf file import. Change improper use of __WXDEBUG__ to DEBUG in class_board_connected_item.cpp. 2013-10-30 13:14:45 +01:00
Maciej Suminski c8fc149ae5 Fixed segfault occurring on rendering backend switch when pcbnew is run from the main KiCad dialog. 2013-10-30 11:50:09 +01:00
Dick Hollenbeck 416c44615a memory leak, comments 2013-10-30 00:14:11 -05:00
Dick Hollenbeck c1ec14bcac merge in a year's worth of CERN work 2013-10-29 19:10:24 -05:00
Maciej Suminski edc43c19cd Fix colorized framebuffer output on some GPUs. 2013-10-29 17:53:47 +01:00
Maciej Suminski f615c462a2 Changed the used framebuffer object extension from ARB_framebuffer_object to EXT_framebuffer_object (compatibility reasons). 2013-10-29 17:28:29 +01:00
Maciej Suminski e13f862145 Merged upstream. 2013-10-28 21:34:06 +01:00
Maciej Suminski c7bc1e151c GAL is not activated by default. Late OpenGL backend initializatization. 2013-10-28 16:51:56 +01:00
jean-pierre charras 3e3869ed80 dxf import: minor enhancements in dialog. Update libdfxw from git, and uncrustify it. add a test dfx file 2013-10-28 09:06:38 +01:00
Wayne Stambaugh f0b2565f12 Eeschema find/replace bug fixes and improvements (fixes 1208616).
* Fix replace bug to handle case sensitivity properly.
* Fix replace bug where the item index was getting updated incorrectly.
* Fix replace infinite loop bug on replace all.
* Make find/replace view update code a separate function.
* Rearrange find/replace trace string to add tracing to EDA_ITEM::Replace().
* Add IsComplexHierarchy method to SCH_SHEET_LIST for future find/replace
  improvements.
2013-10-27 14:21:53 -04:00
jean-pierre charras 2229b5ff77 Fix typo 2013-10-26 20:17:44 +02:00
jean-pierre charras 6a9ed328a4 Pcbnew, dxf import: Add dialog to choose the board import layer, and the position of dxf coordinates origin 2013-10-26 09:03:06 +02:00
jean-pierre charras 7e3551d371 Add patch from Baranovskiy Konstantin about vertical justification of multiline texts.
Fix issues created by this patch.
Note, this fix slightly changes the vertical position of these texts.
This is not really a  problem in eeschema, but in pcbnew this is perhaps  more annoying, if the verical multiline text is critical.
Fix a very minor issue  for vertical justification of single line texts in dxf import.
2013-10-25 14:16:18 +02:00
jean-pierre charras 40eb9c9cc2 Pcbnew: First work to add a DXF file import to create board outlines. The DXF import is based on DXF lib import/export from LibreCad. 2013-10-24 20:47:07 +02:00
jean-pierre charras 55e9b4d1b6 Add a DXF file import to create board outlines 2013-10-24 18:44:38 +02:00
Dick Hollenbeck e8ad48adf4 more DIALOG_FP_PLUGIN_OPTIONS work, make PROPERTIES a map instead of a hashtable for alphabetical iteration. 2013-10-24 08:58:05 -05:00
Dick Hollenbeck 75f2e5446e script improvements 2013-10-24 08:57:01 -05:00
Dick Hollenbeck 1731e89508 *) Factor out Cut, Copy, and Paste for wxGrid into class common/GRID_TRICKS.
*) Use it on 3 grids total in DIALOG_FP_PLUGIN_OPTIONS and DIALOG_FP_LIB_TABLE.
*) Fix bug when pasting "(fp_lib_table" text into FP_LIB_TABLE.
2013-10-23 13:56:03 -05:00
Dick Hollenbeck 2033181bd8 fixes 2013-10-23 06:40:17 -05:00
Dick Hollenbeck c4d29b4258 Grab pending (unsaved) wxGridCellEditor cell text and stuff into fp_lib_table. 2013-10-22 14:29:37 -05:00
Dick Hollenbeck 5862306295 When pasting into a fp_lib_table with no initial rows, start at column zero, not -1. 2013-10-22 09:29:48 -05:00
Dick Hollenbeck 1c3f23ba1d Distro specific architecture in scripts/kicad-install.sh. 2013-10-22 09:28:30 -05:00
Camille 019 712392b118 Tidy up the gcc 4.7.0 - 2 optimization setting methodology. 2013-10-22 09:26:26 -05:00
jean-pierre charras 27c00853a3 Pcbnew: fix bug 1199340 2013-10-20 17:39:15 +02:00
jean-pierre charras 503ee825c9 All: fix bug making IsOK dialog always returns false, regardless the button clicked. 2013-10-19 15:22:24 +02:00
jean-pierre charras b0e2908c9b pl_editor: add a PPI (pixel per inch) setup option for bitmaps. 2013-10-19 12:29:54 +02:00
jean-pierre charras 6bb62a7196 Remove duplicate files.
Page layout editor: Add bitmap items to the page layout existing items.
Now a bitmap image can be added to a page layout description. Currently the bitmap is expected having a 300 ppi definition.
Note: not all plotters can plot a bitmap, and in this case the bounding box is plotted instead of the bitmap
2013-10-18 19:38:03 +02:00
Wayne Stambaugh 9e9450e272 Fix bug due to change in the default global footprint library table file name. 2013-10-18 12:06:18 -04:00
jean-pierre charras 7acc3e67ce page layout editor: now one can add a bitmap to the page layout 2013-10-18 17:42:48 +02:00
Wayne Stambaugh 612ba67c10 Minor message box improvements
* Create a generic yes/no/cancel dialog from DIALOG_EXIT.
* Make DIALOG_EXIT return wxID_YES instead of wxID_OK so it is consistent
  with the standard message dialogs.
* Add missing license to confirm.h and confirm.cpp.
* Change Eeschema message dialog when loading a schematic if the current
  schematic is modified to be more consistent with the exit dialog.
* Change Pcbnew message dialog when loading a board if the current board
  is modified to be more consistent with the exit dialog.
* Remove some Eeschema block debug logging code left over from my last
  commit.
2013-10-18 09:32:22 -04:00
Dick Hollenbeck a44e2c821e fix template files installation 2013-10-18 08:18:45 -05:00
jean-pierre charras 7622d6c985 Remove duplicate files 2013-10-18 12:33:50 +02:00
Andrey Fedorushkov 5c4a3a08e0 fix auto install template files 2013-10-18 10:01:59 +04:00
Dick Hollenbeck 939ef4ad59 Add support for building *.deb file using CPack, install ~/fp-lib-table either from kicad-install.sh or from make install_user_configuration_files 2013-10-17 14:03:36 -05:00
Dick Hollenbeck 4e4f422814 .bzrignore was ignored. 2013-10-17 14:02:11 -05:00
Dick Hollenbeck b8c228114b add {Get,Set}ModuleLibraryNickname to EDA_APP, reformatting 2013-10-17 14:01:35 -05:00
Dick Hollenbeck 37c3ef503f fix expansion of dialog on stretching and initial view 2013-10-17 13:59:54 -05:00
Dick Hollenbeck e8ee26344f fix formatting goofs 2013-10-17 13:47:46 -05:00
Dick Hollenbeck 8609dfe283 Throw exception if accessing a GITHUB library from build not supporting GITHUB. 2013-10-17 13:46:20 -05:00
Dick Hollenbeck 1eab1f7a88 add script to build KiCad on Ubuntu/Debian/Mint linux 2013-10-17 10:33:46 -05:00
Wayne Stambaugh 25a1277247 Add PDF output to Pcbnew plot dialog. (fixes 1p:1188972) 2013-10-15 14:22:35 -04:00
Wayne Stambaugh efb96bcce9 Eeschema block end handler code improvements.
* Merge HandleBlockEnd() and HandleBlockEndByPopUp() into as single block
  end function HandleBlockEnd().
* Replace all instances of HandleBlockEndByPopUp() with HandleBlockEnd().
* Change block hot keys to send command events instead of directly calling
  end block handler.
2013-10-15 12:18:30 -04:00
Maciej Suminski bd03ca1fce Hides the GAL subwindow in cvpcb module view frame. 2013-10-15 15:15:29 +02:00
Brian Sidebotham bec78be1a1 Temporarily disable Boost.Context library build as it breaks MinGW builds by bringing in a dependency on MASM (The Microsoft Assembler) 2013-10-15 11:42:26 +01:00
Maciej Suminski 5249b1a6da Renamed TOOL_MOUSE_BUTTONS constants to avoid name conflict with Windows MB_RIGHT constant. 2013-10-15 10:41:00 +02:00
Maciej Suminski 853b32df30 Merge 2013-10-14 20:41:56 +02:00
Maciej Suminski bc305859b2 Mainly case changes. 2013-10-14 20:40:36 +02:00
Dick Hollenbeck 3869cf4e10 Planning for PCB_BASE_FRAME::Save_Module_In_Library and PCB_EDIT_FRAME::ArchiveModulesOnBoard rewrites 2013-10-14 11:54:00 -05:00
jean-pierre charras 082b8326de Pcbnew: Fix issue when displaying net names and/or pad numbers including the "<" char in drc dialog, because drc dialog uses an wxHtmlWindow to display drc messages, and the "<" char has a special meaning and is not allowed in texts (now replaced by the" &lt;" sequence in messages displayed in html)
Eeschema: replace "<" and ">" by "(" and ")" in autogenerated net names, to avoid other issues in html messages.
Very minor other fixes.
2013-10-14 18:03:38 +02:00
Wayne Stambaugh 62764cd618 Fix Pcbnew block rotate hot key and minor code cleaning. 2013-10-14 11:29:16 -04:00
Maciej Suminski 0ac3e1fbf2 Namespace KiGfx->KIGFX.
template<> -> template <>
Some more reformatting according to uncrustify results.
2013-10-14 16:13:35 +02:00
Maciej Suminski 7c52014712 Fixed unnecessary comment 2013-10-14 14:45:01 +02:00
Maciej Suminski f1c3ea1c3c Fixed unnecessary comment 2013-10-14 14:42:35 +02:00
Maciej Suminski 22045b61ea Converted tabs to spaces. Removed trailing whitespaces. 2013-10-14 13:43:57 +02:00
Maciej Suminski ac489ece7b Merged 'development' 2013-10-14 11:41:43 +02:00
Maciej Suminski 4b6c6a5c98 Merged 'testing' 2013-10-14 11:40:14 +02:00
Maciej Suminski 75bb84704d Added error messages for OpenGL framebuffer errors. This should eliminate quiet segfaults in case of drivers that cannot handle multiple attachment points for framebuffers. 2013-10-14 11:39:21 +02:00
Maciej Suminski 31dbe2d2f4 Marked pnsrouter as dependent on boost 2013-10-14 08:37:58 +02:00
Wayne Stambaugh c674314859 Fix bug when creating initial global footprint library table on Windows. 2013-10-13 20:14:52 -04:00
Dick Hollenbeck afd6f292e7 *) Switch over to FP_LIB_TABLE::Footprint*() functions.
*) Set environment variable KISYSMOD before loading FP_LIB_TABLE so that
   FP_LIB_TABLE::ROW::SetFullURI() can do substitution up front.
*) De-emphasize the lib path in some of the footprint frames but keep it
   so the footprint editor can export a current library to another.
   You can even export a GITHUB library to a pretty library for local 
   installation.
*) Start the PLUGIN options editor.
*) Enhance cursor positioning in DIALOG_FP_LIB_TABLE.
2013-10-13 16:33:58 -05:00
jean-pierre charras 7f64899591 specctra_export.cpp: fix a bug in my export function to 3D viewer which generates bad shapes for holes generated by outlines
inside the main board outlines.
specctra_export.cpp: always approximate arcs in outlines by 36 segm for 360 degrees,
even for arc angle which differs from 90 degrees.
90 degrees is the default when creating an arc, but the arc value can be edited and have any value between 0 and 360 degrees.
Previously, 9 segments were used regardless the arc angle.
2013-10-13 18:47:11 +02:00
Wayne Stambaugh 8580d87ef7 Footprint library table improvements.
* Add save table and set project path environment variable code to
  FP_LIB_TABLE object.
* Add code to Pcbnew and CvPcb to set project path environment variable.
* Create empty footprint table in Pcbnew when new board created.
* Save current project specific footprint library table to path on file save
  as or empty project path.
* Fix a bug in Pcbnew in file save function that would silently overwrite
  an existing board file.
* Disable selecting the current library in the module editor when there are
  no libraries defined.
* Catch exceptions and report errors when writing footprint library tables.
* Fix Boost build CMakeFile to fix bug when bootstrapping a Boost build in
  MSys.
2013-10-13 12:29:20 -04:00
jean-pierre charras a8e57e10e8 Remove wxUSE_UNICODE definition from CMakeLists.txt, because this define comes from wxWidgets and should not be made inside kicad
Remove KICAD_GOST option because it is  now useless: the 2 GOST options are now selectable at run time and are:
* specific page layouts (now user definable, and the GOST page layouts are available in template folder)
* notation for multiple parts per package (made in eeschema, preference menu)
2013-10-11 18:24:43 +02:00
Maciej Suminski 2e2bea3b0c Fixed IDs for the push and shove router menu 2013-10-11 14:26:09 +02:00
Maciej Suminski c33564c6df Removed unused variable. 2013-10-08 10:17:49 +02:00
Brian Sidebotham 7c340f6b19 * Fix building of Github plugin support for Windows using Mingw-w64
* Pre-built binaries for OpenSSL can be used from the LuaDist project: https://github.com/LuaDist/openssl/releases
* Building of Boost libraries fixed for Mingw-w64 for github plugin
2013-10-07 20:49:44 +01:00
jean-pierre charras 602aa1682c 3D-viewer: minor fixes and enhancements 2013-10-07 18:39:39 +02:00
jean-pierre charras 28f55e2abf 3D-viewer: minor fixes and enhancements 2013-10-07 16:50:23 +02:00
jean-pierre charras 5614ba009a Pcbnew: 3D view: Better 3D rendering (fix some artifact issues). Add a realistic rendering mode. 2013-10-07 13:51:08 +02:00
Wayne Stambaugh 191cc6d16d Fix footprint library editor bug.
* Don't convert footprint library path to wxFileName.  This removes a '/'
  from the GIT_HUB_PLUGIN uri which causes wxUri to choke and the incorrect
  plug in is selected.
2013-10-05 19:41:40 -04:00
Dick Hollenbeck ec7f26f54b FP_LIB_TABLE::ROW::SetFullURI() does environment variable substitution up front.
We can now remove a few calls to FP_LIB_TABLE::ExpandSubstitutions( const wxString& aString )
since its being done in above function.

DIALOG_FP_LIB_TABLE now handles table to copy cut copy paste from global to
project and reverse.  Fixed a problem with cursor position management when
switching between tables.
2013-10-05 05:34:55 -05:00
Dick Hollenbeck 248788f381 Put FP_LIB_TABLE::Footprint*() functions on stage, but comment out lazy plugin lookup trick in FindRow() until these new API functions are used. 2013-10-04 23:53:15 -05:00
Dick Hollenbeck d82c3b9ab1 DIALOG_FP_LIB_TABLE: disable row resizing, get rid of tooltips on grids 2013-10-04 23:41:15 -05:00
Dick Hollenbeck bf97bf891b AutoSizeColumns(), and search for "(fp_lib_table" not "(fp_lib_table " 2013-10-04 23:21:58 -05:00
Dick Hollenbeck a90975d11c FP_LIB_TABLE::ROW::SetType() ensures sensible value of "KiCad" if nothing good comes in. 2013-10-04 17:40:25 -05:00
Dick Hollenbeck e0a0f596e2 Add keyboard support to DIALOG_FP_LIB_TABLE grid interface:
CTL+X, CTL+V, CTL+A, CTL+C
2013-10-04 17:23:53 -05:00
Dick Hollenbeck bf26962f72 CTL_OMIT_PATH patch 2013-10-04 17:23:04 -05:00
Dick Hollenbeck d77f95af15 Rebase a subset of Footprint*() PLUGIN API onto FP_LIB_TABLE 2013-10-04 14:09:10 -05:00
Dick Hollenbeck 205aa43379 Fix FP_LIB_TABLE::ROW operator=(), was not copying "description" field.
Remove tooltips from fp_lib_table wxGrid, were annoying and munging wxGrid's grid.
Change initial size of DIALOG_FP_LIB_TABLE.
2013-10-04 10:58:32 -05:00
jean-pierre charras ab8016abc4 3D viewer: Preference menu: fix a bug which displays incorrectly the actual display options state (always shown off) when starting the 3D viewer 2013-10-04 16:52:09 +02:00
jean-pierre charras 229879345e 3D board display: better rendering of the board: the board polygon outlines (generated by the specctra function which calclaltes outlines) is now used to create the 3D body of the board,
in pcbnew and cvpcb.
2013-10-04 16:32:59 +02:00
jean-pierre charras 7a2593832d Fix Cmakelists issues 2013-10-04 14:48:50 +02:00
jean-pierre charras 79443fdbe5 Move specctra.cpp, specctra_import.cpp and specctra_keywords.cpp compilation to pcbcommon lib because they containt functions used by the 3D viewer in Cvpcb and Pcbnew. 2013-10-04 14:22:33 +02:00
jean-pierre charras dd64b2f284 3D board display: better rendering of the board: the board polygon outlines (generated by the specctra function) is now used to create the 3D body of the board. 2013-10-04 10:42:09 +02:00
Brian Sidebotham 964933db00 Removed some Microsoft Visual C centric definitions in CMakeModules/config.h.cmake which were tripping up the mingw-w64 build 2013-10-03 23:53:42 +01:00
Dick Hollenbeck e45ed220f9 DIALOG_FP_LIB_TABLE does not use wxSplitterWindow, it would not obey.
Paste popup menu in this dialog now allows pasting a (fp_lib_table)
s-expression element holding (lib) elements.  This provides an 
opportunity for GITHUB library publishers to put the table description
into their README.md file as a (fp_lib_table) element where it can
be quickly copied to clipboard and pasted into the fp lib table dialog.
This is a paste operation, and overwrites from the initial cursor position.
2013-10-03 17:12:56 -05:00
Dick Hollenbeck 8234966a3a if https:// GET fails, report the URL 2013-10-03 10:12:25 -05:00
Dick Hollenbeck 44ca3530b0 throw better IO_ERROR message on bad GITHUB URL, improved formatting and comments. 2013-10-03 08:40:00 -05:00
Dick Hollenbeck 65b0343be1 fix: https://answers.launchpad.net/kicad/+question/233824 2013-10-02 15:25:44 -05:00
Maciej Suminski 3c738faed6 Renamed WORKSHEET_ITEM to WORKSHEET_VIEWITEM. 2013-10-02 14:26:14 +02:00
Maciej Suminski 54946f46f7 Fixed memory leak caused by ViewUpdate() with VIEW_ITEM::GEOMETRY/LAYER parameters. 2013-10-02 13:57:21 +02:00
Maciej Suminski ff3c2bb66b Worksheet is not selectable anymore. 2013-10-02 12:02:25 +02:00
Maciej Suminski 460dcfc621 Removed SELECTION layer. 2013-10-02 11:39:08 +02:00
Maciej Suminski 24af7490bb Added missing ViewUpdate flag 2013-10-02 11:25:04 +02:00
Maciej Suminski 0b7305a823 Fixed reset for the selection tool. 2013-10-02 11:21:17 +02:00
Maciej Suminski 2ee858072f Moved VIEW_GROUP creation to the selection tool. In this way selected items are always drawn on overlay, not only when dragged. 2013-10-02 10:21:05 +02:00
Maciej Suminski 86000832fe Added typedefs for VIEW_GROUP iterators. Fixed improper order of layer drawing for VIEW_GROUP items. 2013-10-02 10:19:48 +02:00
Maciej Suminski 87a9964c78 VIEW_GROUP now does not change depth during drawing. Introduced functions for manipulating stored items.
FIxed problem of overlay being covered by other layers while panning.
Few minor fixes.
2013-10-01 16:55:33 +02:00
Maciej Suminski e013f3e8c2 Comments, refactoring 2013-10-01 10:21:32 +02:00
Dick Hollenbeck 8c87d71e74 Make environment variable wxGrid/table read-only in the fp lib table dialog.
Fix throwing of IO_ERROR in plugin.cpp by converting function name to wxString.GetData().
Switch to const PROPERTIES* in GITHUB PLUGIN functions.
2013-09-30 16:26:49 -05:00
Maciej Suminski d2618caabc Added missing file 2013-09-30 16:28:21 +02:00
Maciej Suminski 43b5aa4c8d Fixed Mac OS build & removed one warning. 2013-09-30 09:45:42 +02:00
jean-pierre charras 25b20c5564 Gerbview: fix incorrect printing of negative objects, when using black and white option
Enhancement in Excellon file reader: accept Feed Rate and Spindle Speed definitions in Tool information line (but does not use them)
Eeschema: better name for m_SheetList (changed to m_SheetPath) member of class NETLIST_OBJECT.
2013-09-30 08:36:40 +02:00
Maciej Sumiński a6a1af9d75 Restored previous version of math_utils.h. WARNING: Mac OS build is probably broken now. 2013-09-29 21:29:28 +02:00
Maciej Sumiński d895a90bdc Fixed selection disambiguation menu for wx2.8 2013-09-29 21:23:45 +02:00
jean-pierre charras d368739731 Gerbview: fix incorrect printing of negative objects, when using black and white option.
Eeschema: better name for m_SheetList (changed to m_SheetPath) member of  class NETLIST_OBJECT.
2013-09-29 20:24:38 +02:00
Maciej Sumiński 6409f7f96b wxWidgets 2.8 compatibility fix (removed wx/kbdstate.h) 2013-09-29 14:25:04 +02:00
Maciej Sumiński 53fef8d4c4 Fixed menu entry ids for the p&s router context menu. 2013-09-29 13:56:32 +02:00
Maciej Sumiński e1290101aa Fixed strings for wxWidgets 2.8 2013-09-29 12:57:20 +02:00
Wayne Stambaugh 473a724b9a Fix wxWidgets 2.8 compile error. 2013-09-28 18:53:55 -04:00
Maciej Suminski 35721397bd Moved common actions to a separate file. 2013-09-27 20:52:34 +02:00
jean-pierre charras 1ae681454a Eeschema: fix isssues in net names selection for not named nets (i.e. nets without labels) 2013-09-27 19:58:58 +02:00
Maciej Suminski 6b74b5771a Even more code comments and reformatting. 2013-09-27 18:51:21 +02:00
Maciej Suminski 3f320e4d68 Some more comments and code formatting. 2013-09-27 16:23:43 +02:00
jean-pierre charras f2e5da63e3 Eeschema: netlist generation: fix bad choice for the "best net name" when selecting a net name between labels connected to the same net.
Code cleanup and remove unused file.
2013-09-27 14:30:35 +02:00
Maciej Suminski 6e0c7a938c Added missing header 2013-09-27 14:29:07 +02:00
Maciej Suminski 5e3030ee89 Merge kicad-pns-mac 2013-09-27 12:06:59 +02:00
Maciej Suminski 936e0be090 Uncrustified the push&shove source, fixed some warnings. 2013-09-27 10:00:26 +02:00
Maciej Sumiński 5598acb617 Uncrustifying push&shove router 2013-09-26 23:53:54 +02:00
Wayne Stambaugh 5927f026b3 Footprint viewer improvements and code cleaning.
* Use wxAuiManager perspective to save and load window settings which should
  allow us to start using more advanced wxAui features like detachable tool
  bars and windows.
* Remove sash size change events, event handler, and sash width clamping code
  since it didn't work all that well anyway.
* Disable the close button on the footprint view pane.
* Update the footprint list box selection when iterating the list using the
  tool bar arrow buttons.
* Merge code from modview.cpp into modview_frame.cpp and remove modview.cpp.
2013-09-26 13:22:35 -04:00
Maciej Suminski 87b3f2e499 Added Init() to TOOL_INTERACTIVE, allowing to set up things that are needed to be initialized only once.
TOOL_ACTIONs can be run from CONTEXT_MENU after adding them.
Move tool actions are available to be run from CONTEXT_MENU displayed after right mouse button click on selected items.
Added some asserts to check the code.
2013-09-26 18:38:58 +02:00
Dick Hollenbeck 5f0679bf6e comment/doc cleanups 2013-09-26 10:02:46 -05:00
Maciej Suminski e6c20adc5a Fixed premature highlighting of options in CONTEXT_MENU. 2013-09-26 14:29:47 +02:00
Maciej Suminski 12b8714aff Different way of handling CONTEXT_MENU in the selection tool. Removed some unnecessary lines. 2013-09-26 14:09:56 +02:00
Maciej Suminski 61066fa608 Added functions for handling hotkeys, interface for adding TOOL_ACTIONs to CONTEXT_MENU.
Less objects are allocated dynamically.
CONTEXT_MENU is being run using its copy (it saves a hassle of following the lifetime of object).
2013-09-26 14:09:18 +02:00
Maciej Suminski 7b7a331645 Added some const modifiers. 2013-09-26 11:22:59 +02:00
Dick Hollenbeck 4f7c7eb174 Make pretty prettier by striving for single line module pads. Add slick std::string based strprintf(), twice. 2013-09-26 00:29:54 -05:00
jean-pierre charras a0fbe422c7 Eeschema: Rework on netlist generator: code cleaning and enhancement.
Mainly, fix an annoying issue about not named nets:
now, these nets are named from the component references and pin names which are connected.
therefore, unless the net or the footprint references are modified, the net name is not modified between 2 netlist calculations.

Netlist generation code still needs some code enhancement (mainly removing the global g_NetObjectslist variable).
2013-09-25 21:37:28 +02:00
Dick Hollenbeck f72394cc6b Make PLUGIN::Footprint*() API functions take 'const' PROPERTIES*.
Add const PROPERTIES* to FootprintDelete().
Add {Get,Set}Properties() to FP_LIB_TABLE::ROW.
Touch up fp table dialog.
2013-09-25 14:17:06 -05:00
jean-pierre charras daeeee5617 Eeschema: Rework on netlist generator: code clenenig and enhancement.
Fix an annoying issue about not named nets:
now, these nets are named from the component references and pin names which are connected.
therefore, unless the net or the footprint references are modified, the net name is not modified between 2 netlist calculations.
2013-09-25 21:09:57 +02:00
Wayne Stambaugh 4afae65110 Fix debug build error in pcbnew/dialogs_fp_lib_table.cpp. 2013-09-25 09:51:54 -04:00
Dick Hollenbeck 98eaacdd6b turn off new linker map generation in pcbnew 2013-09-24 16:26:23 -05:00
Dick Hollenbeck 74ce031e62 Set PROPERTIES* into FP_LIB_TABLE::ROW, which is a parsed (binary) form of the 'options'.
Write parser and formatter for options.  Write dialog verification used before saving
FP_LIB_TABLEs, triggered from OK button in table editor.
Switch PROPERTY's value column to std::string from wxString.
Add event handler to fp lib table dialog for upcoming options dialog.
2013-09-24 16:23:13 -05:00
Wayne Stambaugh 85777d6569 Pcbnew footprint library plug in fixes and minor code cleaning.
* When loading footprint do not retest every footprint in cache.  Only test
  the footprint being loaded.  Fixes long load times on libraries with a lot
  of parts.
* Fix footprint name bug where file extension was added to the end of the
  footprint name.
* Fix bug in path equivalence test due to Posix path separators in footprint
  library table.  Convert paths to native separator before comparison.
* Fix a bug in FOOTPRINT_VIEWER_FRAME::OnActivate() which cause the footprint
  list to always get reloaded when using footprint library tables.
* Remove some unnecessary debugging messages.
* Add a few Doxygen comments to FP_CACHE in kicad_plugin.cpp.
2013-09-24 14:45:57 -04:00
Maciej Suminski d1578e4e1a Fixed cvpcb build. 2013-09-24 16:12:02 +02:00
Maciej Suminski 1624320749 Added protection from redrawing while GAL backend is being switched. 2013-09-24 16:00:21 +02:00
Maciej Suminski c4ad58f2a8 Added rotate & flip to the pcbnew.InteractiveMove tool, hotkeys for them and undoing all the operations on cancelling the tool. 2013-09-24 15:49:43 +02:00
Maciej Suminski 1de8eba49e Added functions for refreshing the layer set occupied by a VIEW_ITEM. 2013-09-24 15:48:04 +02:00
Maciej Suminski 96d162c907 Added possibility to cancel a tool that is not on the top of the tool stack. 2013-09-24 15:47:07 +02:00
Dick Hollenbeck 7125da8a45 Set FPID on GITHUB_PLUGIN::FootprintLoad() 2013-09-23 10:57:15 -05:00
Dick Hollenbeck ecca7434e1 GITHUB_PLUGIN now builds under the scripting DSO on linux.
Enhance IO_MGR::GuessPluginTypeFromLibPath() to support the GITHUB plugin.
Build boost with -fPIC on Linux unconditionally, in preparation for
DLL/DSO build of kicad.
Add python script to test back to back reads of GITHUB plugin.
2013-09-23 10:19:39 -05:00
Maciej Suminski 7837dfa3ac Fixed build for Mac OS 2013-09-23 17:02:25 +02:00
Maciej Suminski 171857a7a8 FIxed TOOL_EVENT::Modifier() (now it returns value for current modifier, not only if there is one active or not). 2013-09-23 10:02:01 +02:00
Wayne Stambaugh 076c2c762a Pcbnew footprint library table fixes.
* Make footprint editor work properly with library table.
* Fix bug in Eagle plugin when comparing file timestamps.
* Fix bug in footprint viewer when error occur loading footprints from
  the selected library.
* Fix error message display by in footprint viewer on library load error.
2013-09-22 13:20:46 -04:00
Dick Hollenbeck de4cceb245 unique FPL_CACHE class names 2013-09-21 23:38:22 -05:00
Dick Hollenbeck 153aee8eda GITHUB_PLUGIN now works and can be used under Linux immediately.
Other platforms to follow as volunteers test support and get openssl in 
place.
2013-09-21 22:57:40 -05:00
Dick Hollenbeck 0a3e76a74d OOPS, add missing file for Windows GITHUB_PLUGIN 2013-09-21 22:24:11 -05:00
Wayne Stambaugh 0f4ba09545 Pcbnew footprint library table fixes.
* Make footprint viewer work properly with library table.
* Fix bug in Eagle plugin when enumerating footprints.
* Add missing P-CAD plugin from footprint library table editing dialog.
* Fix bug in FOOTPRINT_INFO::LoadLibraries when error occur loading footprints
  from libraries.
2013-09-21 20:28:02 -04:00
Build System 5e53232f0c Fixes typo in doxygen-python, and fixes unitest TestCase().discover on python < 2.7 2013-09-22 02:34:15 +04:00
Miguel Angel Ajo be7d0c8feb missing QA tests for the python scripting QA 2013-09-22 00:27:41 +02:00
Miguel Angel Ajo 48334f6650 scripting QA tests, initial implementation 2013-09-22 00:04:59 +02:00
Miguel Angel Ajo 45de27baba Scripting build tools moved and renamed 2013-09-22 00:03:02 +02:00
Dick Hollenbeck 87e378c14d BUILD_GITHUB_PLUGIN will build GITHUB_PLUGIN on Linux now. Don't know if the parser works yet, but the FootprintEnumerate() function worked in testing. 2013-09-21 14:20:31 -05:00
jean-pierre charras e9713bb291 Pcbnew: Block selection enhancement, from Bug #593997 (whishlist)
1. block created from-left-to-right selects only 100%inside selection objects (as it now does)
2.block created from-right-to-left selects all overlapping objects inside selection
From the patch sent by mathieulj (mathieulj), and some fixes and code cleaning.
2013-09-21 20:09:41 +02:00
jean-pierre charras d5ecafd5af Fix some minor issues in hotkey dialogs 2013-09-21 19:09:08 +02:00
Dick Hollenbeck 3053d45b15 temporarily disable GITHUB_PLUGIN 2013-09-21 11:07:26 -05:00
Dick Hollenbeck b2267ec703 temporarily disable GITHUB_PLUGIN 2013-09-21 11:06:15 -05:00
Dick Hollenbeck 579f28862b BUILD_GITHUB_PLUGIN issues. 2013-09-21 09:48:37 -05:00
Dick Hollenbeck 95b67c8bf8 remove some headers, no good for my head 2013-09-21 02:45:25 -05:00
Dick Hollenbeck 4a2f86932a Early GITHUB_PLUGIN hopefull-ness 2013-09-21 02:30:23 -05:00
Build System a602c1b2fe Adds target to build doxygen-python documentation, that take
pcbnew.py + doxygen-xml files, and build .i files with docstrings,
those .i files are included back again to build a pcbnew.py with
extended documentation from C++, finally we take the final pcbnew.py
to build the doxygen-python documentation
2013-09-20 21:01:21 +04:00
Maciej Suminski 7db595da31 Added missing files 2013-09-20 18:21:01 +02:00
Maciej Suminski 8e472c736a Merged upstream. 2013-09-20 17:54:35 +02:00
Maciej Suminski a991cb4470 Changed the way of refreshing canvases (both standard & GAL). 2013-09-20 17:29:32 +02:00
Dick Hollenbeck 4f78403463 BOM generators now report count of "interesting" components, rather than total components 2013-09-20 10:11:45 -05:00
Maciej Suminski b39d562aea Restored previous function names. 2013-09-20 16:32:11 +02:00
Maciej Suminski c00533a150 Merged kicad-gal 2013-09-20 15:48:27 +02:00
Maciej Suminski d4d801204f Added cursor for the move tool 2013-09-20 15:01:08 +02:00
jean-pierre charras 0ae31f3ecb Pcbnew: better dialogs to select the active layer or a layer pair. Add an option (hotkey+popup menu) to place a via and select the new active layer
(useful for boards having more than 2 layers)
Eeschema:fix compatibility with old schematic files, when they  contain ERC 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.
Fix minor bugs in cleanup dialog options and plot solder mask function (thanks to Lorenzo to locate these bugs)
2013-09-20 12:52:33 +02:00
Dick Hollenbeck 1e8430d53d Lorenzo's help enabled a fix to UTF8 support in csv.writer in python bom generators. 2013-09-19 18:50:30 -05:00
Maciej Suminski 2c03bf4109 Removed TA_ActivateTool (now tools are invoked by sending TA_Action event, with the tool name as string parameter).
Developed TOOL_Action class & added ActionManager. Hot keys registered by tools are processed.
Selection & move tool can be invoked by a hot key.
2013-09-19 17:02:57 +02:00
Maciej Suminski eb784536af Moved GalLayersOrder from layers_id_colors_and_visibility.h to PCB_BASE_FRAME. 2013-09-19 09:55:37 +02:00
Maciej Suminski fd973478dd Merged kicad-pns-tom. 2013-09-19 09:33:07 +02:00
jean-pierre charras c7531d6c38 Fix minor bugs in cleanup dialog options and plot solder mask function (thanks to Lorenzo to locate these bugs) 2013-09-18 21:22:25 +02:00
jean-pierre charras bb39956057 Fix minor bugs in cleanup dialog options and plot solder mask function (thanks to Lorenzo to locate these bugs) 2013-09-18 21:21:11 +02:00
tomasz.wlostowski@cern.ch 979f549e99 A very short insturction for the P&S Router. 2013-09-18 20:11:21 +02:00
tomasz.wlostowski@cern.ch 0d4b71ef3c Merged Orson's latest changes. 2013-09-18 20:10:55 +02:00
tomasz.wlostowski@cern.ch 87dccc9f81 P&S router: some missing files 2013-09-18 19:56:37 +02:00
tomasz.wlostowski@cern.ch db62d672d2 Initial version of the P&S router. Buggy and crappy. 2013-09-18 19:55:16 +02:00
Maciej Suminski 9ec4520c45 Added missing files 2013-09-18 19:51:57 +02:00
tomasz.wlostowski@cern.ch 74f42a6241 geometry/rtree.h: fix compiler warnings 2013-09-18 19:37:56 +02:00
Maciej Suminski 9b16651607 Added limits for VIEW scale values & panning area. 2013-09-18 17:36:54 +02:00
Maciej Suminski 56c78d44bf Moved Type() method from EDA_ITEM to VIEW_ITEM. 2013-09-18 17:04:07 +02:00
Maciej Suminski dcb5d8f25c Merged Tom's branch 2013-09-18 16:59:08 +02:00
tomasz.wlostowski@cern.ch 75b59d8fa4 PCB_EDIT_FRAME: public SetTopLayer() method 2013-09-18 13:37:20 +02:00
tomasz.wlostowski@cern.ch 1112d279c5 PCB_PAINTER: fix segfault when item has no net assigned 2013-09-18 13:16:57 +02:00
tomasz.wlostowski@cern.ch 88ee288465 VIEW_CONTROLS: added ForceCursorPosition() and ShowCursor() methods 2013-09-18 13:15:42 +02:00
Wayne Stambaugh 5202ec58c7 Fix std::string to wxString conversion bug in Pcbnew. (fixes lp:1226670) 2013-09-18 07:15:17 -04:00
tomasz.wlostowski@cern.ch dea793209d VIEW: added GetTopLayer() method 2013-09-18 13:14:57 +02:00
tomasz.wlostowski@cern.ch 23298886a1 geometry: killed compiler warnings 2013-09-18 13:14:13 +02:00
tomasz.wlostowski@cern.ch d8480e4674 gal: make the cursor a bit bigger and hidden by default 2013-09-18 13:13:03 +02:00
Wayne Stambaugh 6fb731189c Fix two more FPID empty string parsing bugs. 2013-09-17 11:51:05 -04:00
Wayne Stambaugh 028b0bd3f3 Fix board parsing error when module name is empty. (fixes lp:1226546) 2013-09-17 10:03:16 -04:00
Maciej Suminski 3f6fa86190 Fixed random color of worksheet border. 2013-09-17 14:46:48 +02:00
Maciej Suminski 300c066b68 The last fix to selection rules. 2013-09-17 13:47:33 +02:00
Maciej Suminski 867067aa9c Selection in high contrast mode selects only items that are shown as active. 2013-09-17 11:32:47 +02:00
Maciej Suminski c5c65d366d Selection box color is put into render settings. Selection layer is removed from active layers. 2013-09-17 11:23:00 +02:00
Maciej Suminski f53dafd496 Modules are marked to be on copper layer too. 2013-09-17 11:21:42 +02:00
Maciej Suminski 3d0753c920 Added get functions for high contrast mode fields. 2013-09-17 11:19:15 +02:00
Wayne Stambaugh 0224bc2f58 Fix but reading empty footprints in netlist. (fixes lp:1226283)
* Remove fp_lib token from board and s-expr netlist file format.
* Fix a bunch of Doxygen warnings.
* Remove some extra debug log messages.
2013-09-16 20:52:08 -04:00
Wayne Stambaugh 7de43e4aec Fix broken CvPcb footprint preview. (fixes lp:1226272) 2013-09-16 19:56:45 -04:00
Maciej Suminski ab21124b71 Reenabled snapping for tools. 2013-09-16 16:46:02 +02:00
Maciej Suminski 8e0674b724 Unified marking of selected items. 2013-09-16 16:18:43 +02:00
Maciej Suminski 373c8d6441 Changed to worksheet border color to match the rest of the worksheet layout. 2013-09-16 15:19:48 +02:00
Maciej Suminski 7207de9bea Fixed bounding box for dimension. 2013-09-16 14:44:03 +02:00
Maciej Suminski 8a1c97ea56 More careful check on the net number while drawing net labels for tracks. 2013-09-16 11:08:31 +02:00
Maciej Suminski 573f9841df Better way of marking 'brightened' mode for items. 2013-09-16 11:00:59 +02:00
Maciej Suminski 86f520f76e Sorted out headers. 2013-09-16 09:52:47 +02:00
Maciej Suminski 9fbf45ebfc Fixed drawing outlined track segments. 2013-09-16 09:51:53 +02:00
Maciej Suminski e0f3e2900b Changed alignment. 2013-09-16 09:51:24 +02:00
Wayne Stambaugh ce409e3699 CvPcb footprint library table implementation.
* Add code to CvPcb to handle assigning component footprints from the
  footprint library table instead of the search path method.
* Add code to CvPcb to allow editing of the footprint library table.
* CvPcb footprint and component panes display fully qualified FPID names.
* Make CvPcb library pane display footprint library table nicknames instead
  of library file names.
* Add code to FP_LIB_TABLE object to test the paths in the table against the
  list of libraries loaded from the project file.
* Add code to FP_LIB_TABLE to convert assigned footprints in a NETLIST from
  legacy format to footprint library table format.
* Split out COMPONENT_NET, COMPONENT, and NETLIST objects from netlist_reader
  files and create new pcb_netlist files.
* Fix minor wxListView scroll bar sizing issues.
* Add new token and code to save and load FPID nickname in board file.
* Add new token and code to save and load FPID nickname in s-expression net
  list file.
* Add WX_STRING_REPORT object to dump strings to a wxString object.
2013-09-14 16:33:22 -04:00
Maciej Suminski b907e74d37 Added more required layers for pads (adhesive, solder paste & solder mask) 2013-09-13 17:45:40 +02:00
tomasz.wlostowski@cern.ch 886a3e937a Merged Orson's branch 2013-09-13 15:45:03 +02:00
tomasz.wlostowski@cern.ch 299f424345 geometry: r-tree based shape index 2013-09-13 15:43:33 +02:00
Maciej Suminski 9adbdd803a Added missing functions for checking type of keyboard event 2013-09-13 15:31:19 +02:00
Maciej Suminski 782867f7b3 Caps for lines are drawn only when segments are wider than 1.0 2013-09-13 15:30:45 +02:00
tomasz.wlostowski@cern.ch 00ecafe94f common/profile.h: fix incorrect #endif 2013-09-13 15:28:51 +02:00
tomasz.wlostowski@cern.ch 228a9451f7 polygon: added poly2tri library.
Requied for constrained Delaunay triangulation (P&S/ratsnest) and zone tesselation (GAL).
2013-09-13 15:28:20 +02:00
tomasz.wlostowski@cern.ch 7b0531fdd1 SEG: added SquaredLength() method 2013-09-13 15:25:03 +02:00
Maciej Suminski 4c2e3b9a59 Removed unnecessary debug message 2013-09-13 15:05:57 +02:00
Lorenzo Marcantonio 87290e5248 Add missing file 2013-09-13 12:59:47 +02:00
jean-pierre charras 50242fd54d Pcbnew: Fix Bug #1224656 2013-09-13 11:58:51 +02:00
jean-pierre charras bc8a3c7bf3 Add export netlist IPC-D-356 from Lorenzo Marcantonio, with very minor fixes. 2013-09-13 11:57:31 +02:00
Lorenzo Marcantonio l. 1883370387 Add export netlist IPC-D-356 from Lorenzo Marcantonio, with very minor fixes. 2013-09-13 11:49:55 +02:00
Maciej Suminski e00c8e92cb Removed VIEW_LAYER.isDirty flag. 2013-09-13 11:38:16 +02:00
Maciej Suminski 42860b5d02 Changed VIEW::PrepareTargets() to more appropriate name VIEW::ClearTargets(). Added SELECTION layer to always-on-top list. 2013-09-13 11:28:47 +02:00
Maciej Suminski f9cc914960 Mouse movement events are sent during autopanning, as the cursor position changes in the world coordinates (even if it stays still in the screen coordinates). It allows tools to update their state, as if the mouse was moved. 2013-09-13 10:26:08 +02:00
Maciej Suminski d9ff4b851a Currently selected layer is displayed on the top. 2013-09-12 18:24:53 +02:00
Maciej Suminski 82fe1a4972 Merged Tom's branch 2013-09-12 17:42:28 +02:00
tomasz.wlostowski@cern.ch ac871702ce added note why there's no P&S sources yet... 2013-09-12 11:49:24 +02:00
tomasz.wlostowski@cern.ch f85bf48a4b EDA_DRAW_PANEL_GAL: redraw stuff in a single place, with "coalescing"
Redraws can be requested way too often than it is required. This commit adds redraw timeout:
- if the view became dirty and there has been no redraw for longer than certain time, it is redrawed immediately
- otherwise, we wait for the next frame

This in general improves smoothness of rendering.
2013-09-12 11:40:16 +02:00
tomasz.wlostowski@cern.ch 660d4cc6c9 CONTEXT_MENU: null pointer check bugfix. 2013-09-12 11:36:19 +02:00
tomasz.wlostowski@cern.ch c3759d870c COLOR4D: added Saturate(), FromHSV(), ToHSV() methods.
Used in highlighting/routing code.
2013-09-12 11:35:42 +02:00
Maciej Suminski bfdad27893 Fixed rollback of traces movement. 2013-09-12 10:54:11 +02:00
Maciej Suminski 8f5e6badc4 Removed selection disambiguation in case when there is a choice between a footprint and a smaller component (smaller components have priority). 2013-09-12 10:46:22 +02:00
Maciej Suminski 382c6bd201 Move tool is activated when drag event starts nearby selected items. 2013-09-12 10:24:23 +02:00
Maciej Suminski b04de0cada Fixed memory leaks in containers. 2013-09-12 09:44:57 +02:00
Maciej Suminski d13355f7fe Removed some potential memory leaks. 2013-09-11 19:37:52 +02: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
Maciej Suminski f179183dea Removed some dead code. 2013-09-11 16:38:40 +02:00
Maciej Suminski 90a3b97c2f Added drawing of worksheet layout. 2013-09-11 14:42:12 +02:00
Maciej Suminski e2f5b2779f Changed lifetime of RENDER_SETTINGS (now they are accessible right after PAINTER object is created). 2013-09-11 12:09:22 +02:00
Maciej Suminski afe2e27b0a Moved GetColor() from PAINTER to RENDER_SETTINGS. Fixed recaching of custom items. 2013-09-11 11:39:46 +02:00
Maciej Suminski c5d3376c26 Changed some 'magic numbers' into constants. Added const modifier in appropriate spots. 2013-09-11 11:34:10 +02:00
Maciej Suminski cd56848326 Added one more function to convert colors. 2013-09-11 11:11:27 +02:00
Maciej Suminski 7d4aed1099 Fixed COLOR4D( EDA_COLOR_T aColor ) and added asserts. 2013-09-11 10:30:39 +02:00
tomasz.wlostowski@cern.ch 9eb3916852 Merged kicad-gal-orson 2013-09-10 19:32:19 +02:00
tomasz.wlostowski@cern.ch fa817b7475 pcbnew: start integrating P&S router 2013-09-10 19:26:44 +02:00
tomasz.wlostowski@cern.ch b73474bda6 VIEW_GROUP: added FreeItems() method 2013-09-10 19:25:02 +02:00
tomasz.wlostowski@cern.ch f14db7c78c TOOL_MANAGER: open menu on right mouse button when requested 2013-09-10 19:23:15 +02:00
tomasz.wlostowski@cern.ch 9daa1ab52a TOOL_DISPATCHER: improve mouse handling 2013-09-10 19:22:38 +02:00
Maciej Suminski 6d15131231 Some more missing D()->DBG() changes. 2013-09-10 17:07:46 +02:00
Maciej Suminski 08e797551b Modified default grid/origin settings. 2013-09-10 14:35:10 +02:00
Maciej Suminski 082f3f9bb4 Added const modifiers where applicable. 2013-09-10 14:31:52 +02:00
Maciej Suminski 5659dd479e PCB items are refreshed on GAL switching (changes made using default renderer are displayed by GAL). 2013-09-10 13:57:28 +02:00
tomasz.wlostowski@cern.ch 6ac8188f7f common: minimum version of the shape library 2013-09-10 13:43:09 +02:00
Maciej Suminski 4f0aa1c07c Changed D() macro to DBG() because of conflict with glm::D().
Added const to GetColor() and GetType() functions in WS_DRAW_ITEM.
2013-09-10 10:47:42 +02:00
Maciej Suminski 87da6a8ad3 Fixed hanging up of menu loop when user never moves mouse cursor into popup menu area. 2013-09-09 17:12:03 +02:00
tomasz.wlostowski@cern.ch b0357ce9a7 PCB_PAINTER: added public GetLayerColor() method 2013-09-09 17:08:52 +02:00
tomasz.wlostowski@cern.ch b0694e0333 EDA_DRAWPANEL_GAL: set focus on mouse enter to catch all key events 2013-09-09 17:07:03 +02:00
tomasz.wlostowski@cern.ch da2f63bf31 math/vector2d.h: removed unused code, correct rounding in Resize() 2013-09-09 16:56:18 +02:00
tomasz.wlostowski@cern.ch 20eedfd7dc math/math_util.h: fixed signedness bug in rescale() 2013-09-09 16:55:01 +02:00
tomasz.wlostowski@cern.ch 6639c2d8db math/box2.h: normalize on construction, minor compilation warning fix 2013-09-09 16:53:33 +02:00
Maciej Suminski d0749a3a52 Small refactoring. 2013-09-09 14:31:27 +02:00
Maciej Suminski 8a4417ec46 Fixed color for drawing polygons on overlay. 2013-09-09 14:31:13 +02:00
Maciej Suminski cba1e0bf91 Stops autopanning on left mouse button release. 2013-09-09 13:57:56 +02:00
Maciej Suminski 5e3ab406e2 Enabled snapping for the move tool. 2013-09-09 11:45:20 +02:00
Maciej Suminski 0dc587e2ef Tools are enabled to switch snapping cursor to grid. 2013-09-09 10:54:11 +02:00
Maciej Suminski dbbe628b8c Modified interfaces for [WX_]VIEW_CONTROLS. 2013-09-09 10:53:46 +02:00
Maciej Suminski d2c47a74f2 Parts of MODULEs are not selectable in multiple selection mode. 2013-09-09 10:10:02 +02:00
Maciej Suminski 31f7ecc16a First version of the move tool. 2013-09-09 09:34:52 +02:00
Wayne Stambaugh 230c5f8f5a Convert footprint definitions from wxString to FPID.
* Use FPID instead of wxString in MODULE object.
* Use FPID instead of wxString when loading and saving files.
* Use FPID in COMPONENT object.
* Add wxString helper functions and comparison operators to FPID.
* Add fp_lib token to pcb and netlist file formats.
* Add code to load and save FPIDs to pcb file format.
* Fix segfault when deleting invalid footprint library tables in Pcbnew
  in non footprint library table build.
* Fix bug when counting the number of mod files in
  EDA_APP::SetFootprintLibTablePath();
2013-09-08 14:31:21 -04:00
Maciej Suminski f1b0ffd3d7 Changed focus owner of LayerWidget to EDA_DRAW_PANEL_GAL to make keyboard events work (apparently everything works fine, to be tested more extensively).
Removed unnecessary event hook from EDA_DRAW_PANEL_GAL.
2013-09-06 17:53:01 +02:00
Maciej Suminski c012554daa Starts the GAL by default. 2013-09-06 17:06:33 +02:00
Maciej Suminski 8658d90663 Some more spots where the GAL refresh was required. 2013-09-06 17:06:02 +02:00
Maciej Suminski d213a26057 Smarter selection algorithm (does not allow to select both whole MODULE and its parts at the same time).
Cancel event works better (selection box does not appear after cancelling the selection tool).
Removed blinking selection box effect.
Model is accessed in more appropriate way (getModel() method).
2013-09-06 16:04:12 +02:00
Maciej Suminski f2b4c7a18b Added a few comments. 2013-09-06 16:01:46 +02:00
Wayne Stambaugh 9ab7c18f46 Footprint library table ground work.
* Remove defined CMAKE_INSTALL_PREFIX for Windows from main CMakeList.txt.
* Move footprint library path detection code from pcbnew.cpp to EDA_APP
  object.
* Add CMAKE_INSTALL_PREFIX to config.h.cmake.
* Simplify and fix search path list code.
* Add CMAKE_INSTALL_PREFIX to the list of search paths in case KiCad was
  installed using `make install`.
* Add default global footprint library table to CMake install.
* Add method to set footprint library table to PCB_BASE_FRAME object.
* Remove unused function EDA_APP::GetLibraryFile().
* Minor FP_LIB_TABLE object improvements.
2013-09-06 08:17:33 -04:00
Maciej Suminski ab4cb862b0 Solved refreshing issues. 2013-09-06 11:31:16 +02:00
Maciej Suminski f04df9d79c Fixed hotkeys for switching rendering backends. 2013-09-06 10:19:53 +02:00
Maciej Suminski f93d297cb5 Some comments. 2013-09-04 16:25:57 +02:00
Maciej Suminski bf3690d841 More effective way of updating bounding boxes. IsCached() method made public. Removed some of unused fields from the layer description structure. 2013-09-04 16:23:26 +02:00
Maciej Suminski 000f1122b1 Moved selection marking boxes to a different layer. 2013-09-04 16:18:37 +02:00
Maciej Suminski 44bafd1c8f Improved selection rules. Added some comments to the selection tool. 2013-09-04 10:56:06 +02:00
jean-pierre charras 36ae78ff94 pcbnew: fix wxWidgets 2.8 compatibility issue (temporary fix, still have a minor cosmetic issue), and add missing file. 2013-09-03 21:37:52 +02:00
Maciej Suminski 55744d1e9a Fixed Cairo's render target setting. 2013-09-03 17:46:05 +02:00
jean-pierre charras ede208f3cb Pcbnew: use pcb layer box selector in dialog graphic item properties and pcb text properties. 2013-09-03 14:48:38 +02:00
Maciej Suminski 2a45987d46 Module texts are now moveable, rotatable and flippable. 2013-09-03 14:15:37 +02:00
Maciej Suminski 8a0157069b Support for trapezoidal pads. 2013-09-03 13:51:53 +02:00
jean-pierre charras b7b972d8ad Rework on layer box selector, to use it in dialogs (currently the active layer selector, the layer pair selector and the dimension editor dialog.
This rework solves Bug #1214545.
Work in progress: many dialogs do not yet use the layer box selector.
2013-09-02 17:49:29 +02:00
jean-pierre charras 902e5ccee5 pcb layer box selector: ajust size when modifying the layer names, to show the full name. 2013-09-02 17:26:52 +02:00
Maciej Suminski f4ec1e729e Allow invoking GAL tools, only if GAL is active. 2013-09-02 16:44:13 +02:00
Maciej Suminski ee3f47ae51 Added autopanning to the selection tool. 2013-09-02 16:29:10 +02:00
Maciej Suminski 8e88a621ba Corrected behaviour of drag panning while autopanning is enabled. 2013-09-02 16:26:42 +02:00
Maciej Suminski e8083ae808 Added some comments and changed names of classes to match the coding rules. 2013-09-02 14:21:12 +02:00
Maciej Suminski fef50dd81e Changed way of naming VIEW_ITEM update flags to be more explicit.
VIEW_ITEMs save the layer numbers they use, it allowed to speed up removal of items.
2013-09-02 11:49:46 +02:00
jean-pierre charras 047749a8dc minor changes and refinement in class pcb layer box 2013-09-02 11:06:17 +02:00
jean-pierre charras 684bfad0af Cleaning code for PCB_LAYER_BOX_SELECTOR class, and use it in edit dimension dialog. 2013-09-01 20:38:11 +02:00
Dick Hollenbeck 93eeb75c8f Use via layers which are determined in only one place, this is a cheap trick to support blind vias in the export. 2013-09-01 12:59:28 -05:00
Dick Hollenbeck e3c104d69e Add <aliases> and <alias> to generic netlist XML format, required by new bom_csv_grouped_by_value.py support. 2013-09-01 12:52:46 -05:00
Dick Hollenbeck 0ba6f998c8 Clarify, extend, and rename ky*.py to kicad_netlist_reader.py.
Significantly enhance the bom_csv_grouped_by_value.py BOM generator.
IMO it at this moment, the best BOM production tool for KiCad.
2013-09-01 12:49:01 -05:00
Brian Sidebotham b6110bfcc3 * Fix Bug 1219239 - EESCHEMA crashes when editing a template field in libedit through the context menu 2013-08-31 16:53:46 +01:00
jean-pierre charras eb1f89d02e add missing files 2013-08-30 21:37:56 +02:00
jean-pierre charras 6c14eee672 Pcbnew: Redesign layer selection and layer pair selection (give them a look near the Layer selector in toolbarr) 2013-08-30 21:28:31 +02:00
Maciej Suminski d0fc362ec6 Fixed warning. 2013-08-30 14:43:18 +02:00
Maciej Suminski 01d4080e47 Added selection box for DIMENSION. 2013-08-30 14:02:57 +02:00
Maciej Suminski fb9a4c2bfc Added stacking for tools. 2013-08-30 10:37:26 +02:00
Maciej Suminski 424aa28e1f Added SELECTION_TOOL::GetSelection() 2013-08-30 10:23:18 +02:00
Maciej Suminski 89849cdfa7 Unified Set/GetPosition() for BOARD_ITEMs. 2013-08-29 12:06:06 +02:00
Maciej Suminski edea2f9112 Reduced displayed events information. 2013-08-29 12:03:57 +02:00
jean-pierre charras 51eaeccf03 Pl_Editor: fix some minor issues. 2013-08-29 09:20:09 +02:00
jean-pierre charras 90029a4e1f Pcbnew: enhancements for blind/buried vias placement ( separate keys to add a buried via or a through via), and save" blind/buried vias allowed" option in .kicad_pcb file
Minor code cleaning.
Allows compiling under wxMSW-2.8.12, only for test purposes, because there are serious bugs for Kicad under wxWidgets version < 2.9.3.  (compil warning generated for these versions)
2013-08-28 19:32:49 +02:00
jean-pierre charras 90b820a52c Pcbnew: enhancements for blind/buried vias palcement, and save blind/buried vias allowed option in .kicad_pcb file 2013-08-28 18:14:39 +02:00
Maciej Suminski bd8998d1da Fixed cursor drawing for OpenGL. 2013-08-28 17:06:07 +02:00
Maciej Suminski 6fe086ab6d Added cursor snapping. 2013-08-28 16:25:42 +02:00
jean-pierre charras 0b48116119 Add missing file 2013-08-28 09:29:48 +02:00
jean-pierre charras 9af4ea4014 Add pl_editor_doc.icns, from Orson. Fix Bug #1217504 (bad look of Module Properties Dialog, 3D fields).
Add Dick's workaround in plot_board_layers.cpp to try to avoid crash in solder mask calculations, due to a bug in boost::polygon, in resize function.
2013-08-28 09:23:14 +02:00
Maciej Suminski 215f35e237 Added mouse cursor drawing.
Added flipping mode.
2013-08-27 18:08:32 +02:00
Maciej Suminski 32e962e8ee Merged upstream and Mac OS X build fixes. 2013-08-27 11:03:06 +02:00
Maciej Suminski a7e963bd6f Fixed GLEW library detection for Mac OS X. 2013-08-27 10:32:39 +02:00
Maciej Suminski 379f04af80 Added missing Mac OS X icons for the pagelayout_editor. 2013-08-27 10:14:26 +02:00
Dick Hollenbeck a7e32b03b9 switch to newer boost version. 2013-08-26 15:19:04 -05:00
Dick Hollenbeck 0c2e03ae32 enhanced beautification, better formatting, upgrade to 0.60 uncrustify.cfg 2013-08-26 15:15:00 -05:00
Maciej Suminski 9b52e9dd89 Fix for wxWidgets 2.9.5 2013-08-26 14:23:17 +02:00
Maciej Suminski 6ee32b9912 Fixed the 64 bit build. 2013-08-26 14:08:32 +02:00
Maciej Suminski 3962464190 Fixed linking errors for apps other than pcbnew. 2013-08-26 10:43:22 +02:00
jean-pierre charras c40f5917c1 Pcbnew: speedup netlist read, when some footprints are not found, by caching the non-existent footprint names, which are searched only once in libs.
When a non existent footprint is used by many components, this footprint was previoulsy searched in libs for each component, which is very time consumming.
2013-08-24 15:03:59 +02:00
jean-pierre charras 8cca89ffbe Pcbnew: read netlist enhancements: add option to remove single pads nets, add enforce tests to report non existing netnames in zones.
Fix also some very minor errors in comments.
2013-08-24 10:08:55 +02:00
jean-pierre charras 3d40bd7e16 Pcbnew: add more test when reading a netlist file: verify if all pads found in netlist are found in corresponding footprints (no missing pads). 2013-08-23 11:22:19 +02:00
Maciej Suminski b03f97b991 Removed some unnecessary stuff and added some comments to WX_VIEW_CONTROLS. 2013-08-23 10:56:52 +02:00
jean-pierre charras 4428d69a63 Pcbnew: Fix a bug when reading a netlist which forces pcbnew to read lib files to find a footprint even if the right footprint is already loaded (which explains the long time to load netlists)
Netlist dialog: add option to report only most important messages. Useful for large boards.
class REPORTER: add features to allow a basic message filtering (flags to report all/warning/error messages)
Fix Bug #1214599 ( tools are deselected on Move command )
2013-08-23 08:38:57 +02:00
Maciej Suminski 961a8c2eca Added autopanning functionality to WX_VIEW_CONTROLS. 2013-08-22 18:42:53 +02:00
Maciej Suminski 875c0f7062 Modified InvokeTool(), so besides resetting the tool, it also send an ActivateTool event.
Added generation of CancelTool event upon ESC key press.
Minor bugfix.
2013-08-22 15:07:34 +02:00
Maciej Suminski 1057d5a5be Changed reaction of SELECTION_TOOL to ToolCancel event (first event clears selection, second one deactivates the tool). 2013-08-22 15:05:37 +02:00
Maciej Suminski 6b3742b76b Mark layers as dirty on VIEW_ITEM removal. 2013-08-22 15:04:14 +02:00
Maciej Suminski 89a138c09e Added handling keyboard events for the Tool framework. 2013-08-21 17:37:27 +02:00
Dick Hollenbeck 0be3992913 Lay basis for a more full featured usage of boost, including compiled libraries such as unit_test_framework, system, etc. Move headers now into boost_root/include/boost/. 2013-08-20 13:03:21 -05:00
Lorenzo Marcantonio e04860d61b Fixed issues when opening a pagelayout from the command line 2013-08-20 15:44:42 +02:00
Maciej Suminski 5adba827a6 Added VIEW_GROUP for grouping items to be displayed on a single layer. 2013-08-20 15:07:38 +02:00
Maciej Suminski 61ba40aa7e Added InvokeTool() and FindTool() functions. 2013-08-20 14:49:08 +02:00
Maciej Suminski 43ae1cb98d Smarter way of the overlay rendering (overlay is always refreshed, while cached&noncached targets only if the viewport or items have changed). 2013-08-19 11:02:38 +02:00
Maciej Suminski e87eea7abc Reformatting. 2013-08-19 09:47:36 +02:00
Maciej Suminski e697a2c41c Functions for direct item drawing. 2013-08-19 09:44:50 +02:00
jean-pierre charras f2055f6c5d Pl_Editor: fix crash on Linux when closing Pl_Editor 2013-08-19 09:08:13 +02:00
jean-pierre charras d04ab1fe75 Pl_Editor: fix minor issues in multi-lines texts
Others: fix very minor issues.
2013-08-18 17:49:04 +02:00
Brian Sidebotham 87eb527d67 * Fix the last parts of Bug 1204712 by removing DateAndTime from library file and documentation file formats. They weren't being loaded anyway. 2013-08-16 23:31:37 +01:00
Wayne Stambaugh 33b8142b71 Fix layer alignment target default size. 2013-08-16 14:41:09 -04:00
Wayne Stambaugh 2afe1eab7a Fix MinGW build issue for missing isinf() in PolyLine.cpp. 2013-08-16 10:25:34 -04:00
Marco Mattila 7e1aef2200 Pcbnew: fix filleting of zones with parallel adjacent edges 2013-08-16 14:51:35 +03:00
Lorenzo Marcantonio ddff71c11b - Rogue int as LAYER_MSK (will break with more than 32 layers)
- Comment fix
2013-08-15 17:20:25 +02:00
Maciej Suminski aabd2a46d0 Build fix. 2013-08-15 16:23:54 +02:00
Maciej Suminski 9bd7ba36ac Added resetting of tools after loading a new board. 2013-08-15 10:20:49 +02:00
Wayne Stambaugh 761023f6bc Eeschema bus label test bug fixes. (fixes lp:1209424)
* Use a regular expression to enforce more stringent bus label testing.
* Add validator to edit label dialog to prevent space character from being
  used in labels.
2013-08-13 19:04:41 -04:00
jean-pierre charras 336d1b23f9 Pcbnew: fix Bug #1211468
Pl_Editor: fix copyright in files. Enhancement when creating new items.
2013-08-13 19:51:22 +02:00
Maciej Suminski 1b7593f403 Fixed win32 builds. 2013-08-10 11:14:16 +02:00
Dick Hollenbeck 31461a9b53 REMOVE: vias from specctra DSN export which are not in a netclass. Use only netclass based via sizes in freerouter.
Some of the vias in the class-less list were setting the drill hole size to zero and this made no sense to freerouter.
2013-08-09 14:05:04 -05:00
Dick Hollenbeck cc7a070b63 User longer, more dis-ambiguating text for Show button 2013-08-09 14:03:26 -05:00
jean-pierre charras 6e102489dd Replace the wxFilePickedCtrl in Option Page dialog by an usual wxButton + wxTextCtrl, because under wxWdgets 2.8.12 the look and the behavior is very different between Windows and Linux. 2013-08-09 19:36:45 +02:00
jean-pierre charras 5817c99a4a Replace the wxFilePickedCtrl in Option Page dialog by an usual wxButton + wxTextCtrl, because under wxWdgets 2.8.12 the look and the behavior is very different between Windows and Linux. 2013-08-09 18:19:52 +02:00
Maciej Suminski 723424df07 Added some comments. 2013-08-09 15:21:31 +02:00
Maciej Suminski d73d153665 Added selection boxes for texts. 2013-08-09 15:04:10 +02:00
Maciej Suminski 6af09fedda Added the additive mode for the selection area. 2013-08-09 10:18:48 +02:00
jean-pierre charras 1293c026f7 Eeschema: fix Bug #1210120 2013-08-09 08:51:14 +02:00
Maciej Suminski 2cb6e59dfd Multiple items selection tool. 2013-08-08 19:42:19 +02:00
Maciej Suminski 80901c69cf Reformatting. 2013-08-08 19:41:20 +02:00
Dick Hollenbeck d0a69ac7b7 EHNANCE: add a "Show" button to the two text field properties
dialogs which allow editing of component properties.  The button
is active when the table row cursor is on the DATASHEET field only.
When active, and your datasheet is a URI, then your default
browser will be launced to show that datasheet if it can find it.
This incentivizes use of http:// links for datasheets.
2013-08-08 11:12:41 -05:00
Dick Hollenbeck 92baa531f3 ENHANCE: specctra export Edge.Cuts "endpoint mismatch error message" was not showing exact coordinates with sufficient resolution 2013-08-08 11:11:50 -05:00
Dick Hollenbeck e5a94ff994 FIX: removed unwanted indent in *.kicad_pcb files ahead of "placed" and "locked" 2013-08-08 11:09:49 -05:00
Maciej Suminski 12e10fd43a Reformatting. 2013-08-08 14:59:59 +02:00
Maciej Suminski 282995eaee Fixed disambiguation menu issue. 2013-08-08 14:50:32 +02:00
Maciej Suminski 402f3c6f2c Added brightened mode for selecting items using disambiguation menu. 2013-08-08 12:30:00 +02:00
Maciej Suminski cc5c038362 Added selection box for modules. 2013-08-08 11:53:29 +02:00
Maciej Suminski 16437e5d45 Added general purpose overlay layer and moved selection box to it. 2013-08-08 11:43:56 +02:00
Maciej Suminski 8c37e70889 Different approach to item recaching. 2013-08-07 17:20:01 +02:00
jean-pierre charras 69c880e088 Eeschema: fix a crash when plotting a schematic.
Pcbnew: footprint wizard dialogs: minor fixes, and fixes a not working parameters dialog under Windows, due to an incorrect Printf format.
remove scripts/packagesrc.sh, fully outdated (still refers svn repo)  and not commented.
2013-08-07 15:22:59 +02:00
jean-pierre charras 45155ff0af merge with trunk 2013-08-07 12:13:54 +02:00
Maciej Suminski ee80c7f674 Some more reformatting and adding copyright notices. 2013-08-07 11:20:12 +02:00
Maciej Suminski 62ea71fcae Fixed layers caching settings. Added some comments. 2013-08-07 10:52:50 +02:00
Maciej Suminski e050133c07 Simplified color computation. 2013-08-07 09:51:39 +02:00
Maciej Suminski 8ab98ae60b Removed frame limiter. 2013-08-07 09:37:28 +02:00
Dick Hollenbeck 6196921ae1 REMOVE: check for repeat_item->Flags() == 0 in eeschema/hotkeys.cpp 2013-08-06 18:23:50 -05:00
Carl Poirier 3f8343b341 REMOVE: USE_PCBNEW_NANOMETERS by making it the only way to go in pcbnew, effectively removing the deci-mils build. 2013-08-06 18:21:40 -05:00
Dick Hollenbeck 4c6f7bc158 FIX: insert key must repeat text labels 2013-08-06 17:59:07 -05:00
Maciej Suminski bc69429a56 Added GetTarget() for GALs. 2013-08-06 14:57:48 +02:00
Maciej Suminski 7d5a456344 Code reformatting. 2013-08-06 10:30:09 +02:00
Maciej Suminski f193e389ec Moved highlighted flag from VIEW_ITEM to EDA_ITEM. Added brightened and selected flag to EDA_ITEM. 2013-08-06 09:31:08 +02:00
Dick Hollenbeck c0832a0342 BUG FIX: eeschema as segfaulting on the 'Insert' key because the m_itemToRepeat
was simply a pointer to an object on the display list.  At times this object
would disappear from the display list, in the test case because of a concatonation
of two wires, and if you then tried to clone the non-existent object you'd get a 
crash.  This was not merely a bug, but a naive design choice. IMO.
Now the item to repeat is cloned, so will never also be on the display list.
2013-08-05 16:02:41 -05:00
Dick Hollenbeck 7377cb541f formatting and fix selection clarification bug in pcbnew, could not move reference text when hidden under another footprint 2013-08-05 15:47:34 -05:00
Dick Hollenbeck c58bd957a5 add Brian to about dialog, scoot Wayne up, alphabetize the rest 2013-08-05 15:45:22 -05:00
Camille Delbegue 2134e7de04 Remove a Clang warning and add a missing dependency to boost in cmake file. 2013-08-05 17:53:13 +02:00
Dick Hollenbeck e8dc730526 1) Remove requirement to define KICAD_TESTING_BRANCH. Instead the KICAD_STABLE_BRANCH
must be defined if that is the build type wanted. This only affects a text string
anyways, is not particularly important other than telling user from which code
branch  the source came.  

2) Change name of "testing" to "product" in that same description within
common/build_version.cpp.  "testing" made it sound frightenly unusable.
2013-08-05 10:38:50 -05:00
Maciej Suminski 8753bef2fa Moved VIEW_ITEM::ViewGetRequiredLayers() functionality to the VIEW class. Now required layers are set per layer basis instead of per item. 2013-08-05 16:28:58 +02:00
jean-pierre charras e89db97dd4 Pcbnew: footprint wizard dialogs: minor fixes, and fixes a not working parmeters dialog under Windows, due to an incorrect Printf format. 2013-08-05 15:43:15 +02:00
Maciej Suminski d15f0e91e2 Upstream merge. 2013-08-05 14:46:05 +02:00
Maciej Suminski 2c2e506edf Fixed bounding box for TEXTE_PCB class. 2013-08-05 14:06:01 +02:00
Brian Sidebotham c99243ffc5 * Added modified CMake FindPython... modules to support using Python-a-mingw-us distribution when building Windows scripting support using MinGW 2013-08-04 21:31:14 +01:00
Dick Hollenbeck 790e0ef36c ReturnStringFromValue() refinements 2013-08-03 15:20:55 -05:00
Dick Hollenbeck 1b5a1b74fa fix interface mapping slip-up in wxPoint EDA_DRAW_FRAME::GetCrossHairPosition( bool aInvertY ) const 2013-08-03 13:57:15 -05:00
jean-pierre charras d68c727b0f Pcbnew: add hotkey Z to reset grid origin.
Save grid origin in .kicad_pcb files only if not 0,0 (to keep compatibility with previous versions of pcbnew, mainly the stable version)
Very minor other fixes (set modify flag when grid origin is moved from the dialog grid)
2013-08-03 18:16:57 +02:00
Dick Hollenbeck 76a604bc35 split expression into two lines for verification while using debugger that GetScreen() is a virtualized call. 2013-08-03 01:36:51 -05: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
Maciej Suminski 096dd7a09b Merge. 2013-08-02 19:23:35 +02:00
Maciej Suminski df6cacf64b Windows build fix. 2013-08-02 19:21:22 +02:00
tomasz.wlostowski@cern.ch d1a0bfcc39 pcbnew: fixed missing Select Tool icon warning 2013-08-02 19:18:58 +02:00
tomasz. fdf9898eb2 pcbnew: removed printf() causing a bug 2013-08-02 17:57:28 +02:00
tomasz. 8ea0f7ae5b Merged Orson's changes 2013-08-02 17:28:09 +02:00
tomasz. 31389c4063 pcbnew: tool initialization should belong to PCB_EDIT_FRAME to avoid linking errors on cvpcb. 2013-08-02 17:25:53 +02:00
tomasz. 69a44d5f13 pcbnew: hooked Tool Framework into the edit panel. Added a sample selection tool (not fully functional). 2013-08-02 16:53:50 +02:00
tomasz. 4c777e92f3 PCB painter: improve label highlighting 2013-08-02 16:53:04 +02:00
tomasz. 09182d814d View: various fixes, added VIEW::IsDirty() 2013-08-02 16:51:38 +02:00
tomasz. cc6ca277e3 Added COROUTINE and DELEGATE class examples. 2013-08-02 16:50:29 +02:00
tomasz. ca138b8e92 Increased number of layers in the view (for overlay objects) 2013-08-02 16:49:07 +02:00
tomasz. 241061025b Added core tool framework files + boost::context assembly stuff (initial, very buggy and unfinished work). 2013-08-02 16:46:53 +02:00
Maciej Suminski e4315f0664 Added missing header. 2013-08-02 16:45:30 +02:00
Maciej Suminski 2fd2c1dc03 Upstream merge. 2013-08-02 15:57:24 +02:00
Maciej Suminski 19b344806d Fixed the tesselator, so now it works with Windows. 2013-08-02 10:55:40 +02:00
Maciej Suminski 5e474cf87f Modified usage of wxStandardPaths to make it compatible with newer versions of wxWidgets. 2013-08-02 10:35:58 +02:00
Maciej Suminski ebc2a4269e Modified way of handling OpenGL framebuffer errors.
Now it is more verbose and the status is checked at the right moment (previously it was fine with Linux, but on Windows it showed errors).
2013-08-02 10:34:23 +02:00
jean-pierre charras 744dd80eaf Minor fixes. Minor code cleaning. Pcbnew: better iniatilization of members in DRAWSEGMENT, TRACK, EDGE_MOD (not bugs: just useful when using python scripting). 2013-07-31 18:41:32 +02:00
Maciej Suminski 8d7054a592 Added drawing of solderpaste layer for pads. 2013-07-31 14:51:20 +02:00
Maciej Suminski f5b0c19830 Added missing outline for polygon segments. 2013-07-31 13:35:02 +02:00
Maciej Suminski 8fda1d2264 Fixed drawing of polygon segments (eg. microwave extension traces). 2013-07-31 11:36:46 +02:00
Maciej Suminski 544726e4f3 New display style for grid (dotted). 2013-07-31 10:28:23 +02:00
Maciej Suminski d34df18f2c Fixed grid line drawing in OpenGL backend for some drivers. 2013-07-31 09:01:25 +02:00
Maciej Suminski 190ed58568 Code refactoring. 2013-07-30 18:29:54 +02:00
Maciej Suminski 790a1f8563 Made GAL backends settings more consistent. Fixed grid line width in the OpenGL backend. 2013-07-30 17:09:06 +02:00
Maciej Suminski 1ce21605a5 Merge removal of the shaderless OpenGL backend. 2013-07-30 14:05:32 +02:00
Maciej Sumiński 6dda8d4a7e Fixed smudging in the Cairo backend. 2013-07-30 13:58:03 +02:00
Maciej Suminski f9d74ccb70 Removed shaderless OpenGL backend. 2013-07-29 16:38:07 +02:00
Maciej Suminski bd182aad9f Fixed top layer pads netnames issue. 2013-07-29 14:20:40 +02:00
Maciej Suminski be012cac94 Added initialization of variable, preventing unconditional jumps. Fixed typos in comments. 2013-07-29 14:12:27 +02:00
jean-pierre charras 4a7f92fb4f Minor code cleaning. Pcbnew: better iniatilization of members in DRAWSEGMENT, TRACK, EDGE_MOD (useful when using python scripting). 2013-07-29 09:33:56 +02:00
Dick Hollenbeck b1ed22f7ed minor tweaks to debug statements and cmake 2013-07-28 11:30:39 -05:00
Ben Harris 1760a28ea7 fix FP_CACHE::Load() 2013-07-28 11:30:02 -05:00
Dick Hollenbeck 17b1c04f45 add script which converts footprint libraries from one format to another 2013-07-28 11:28:17 -05:00
Dick Hollenbeck 234c4a3814 $ iconv -f LATIN1 -t UTF-8 pic_sockets.sch -o /tmp/pic_sockets.sch
convert to UTF-8, eeschema cannot load LATIN1 strings anymore.
2013-07-28 10:21:43 -05:00
Dick Hollenbeck bd0c713691 AUTHORS.txt LATIN1 to UTF-8 via: $ iconv -f LATIN1 -t UTF-8 AUTHORS.txt > /new/AUTHORS.txt
All source files are supposed to be UTF-8 now.  Although not a source file, my editor
was tripping on this file when grepping.
2013-07-28 09:47:13 -05:00
matheiulj d786ac91df Fix pad bounding box calculation bug. (fixes lp:1202828) 2013-07-26 17:29:16 -04:00
Wayne Stambaugh cb52b9d0fe Fix minor debug build error. 2013-07-26 16:25:21 -04:00
Maciej Suminski ee1b8e2a80 Added display of soldermask for pads. 2013-07-26 18:15:11 +02:00
Maciej Suminski 862d5a4bf2 Added scalar addition and subtraction operators. 2013-07-26 18:12:22 +02:00
jean-pierre charras a82bc9d1a2 Commit missing file 2013-07-26 15:20:08 +02:00
jean-pierre charras 3b246ca483 Pl_Editor: add undo/redo commands. 2013-07-26 14:50:29 +02:00
Maciej Suminski 2ee99f74c4 Fixed profiling timers for compilation under Win32 (and hopefully Mac OS too). 2013-07-26 14:35:31 +02:00
Maciej Suminski 1fa882db53 Moved multilayer pad netnames to the top. 2013-07-26 12:15:28 +02:00
Maciej Suminski 9dd6b6a8ee Fixed recaching after changing display properties. 2013-07-26 10:05:57 +02:00
jean-pierre charras 1ef311cd01 Pl_Editor: title block texts can be multiline (use" \n" : a '\' followed by a 'n' to create a new line inside a text)
Very minor code cleaning.
2013-07-25 20:58:46 +02:00
Maciej Suminski c9199ea80a Fixed high contrast mode in OpenGL. Split display settings loading into more appropriate places. 2013-07-25 18:04:15 +02:00
Maciej Suminski 4076f99332 Added a layer compositor for the Cairo backend. 2013-07-25 14:40:04 +02:00
jean-pierre charras 71a40b0d09 Very minor code cleaning 2013-07-24 20:34:28 +02:00
Baranovskiy Konstantin eaea2ea12b Add GOST page layout description files in template 2013-07-24 17:57:38 +02:00
jean-pierre charras ee749988f1 Pl_Editor: fix a very minor issue when displaying the page size in status bar. 2013-07-24 17:19:37 +02:00
jean-pierre charras 28cd996394 Pl_Editor: add some hot keys. Fix some rounding issues. 2013-07-24 17:11:35 +02:00
Maciej Suminski 27113348b9 Fixed blending function for OpenGL compositing. Corrected documentation, removed unnecessary functions. 2013-07-24 15:06:59 +02:00
Maciej Suminski 67c0cd2205 Header containing GLSL source code is generated only after change of any of shader source files. 2013-07-24 14:22:00 +02:00
jean-pierre charras 99535864e4 Pl_Editor: bug fixes (default values not saved, and duplicate item names, when adding items) 2013-07-23 18:45:23 +02:00
Maciej Suminski 618a5f0e75 OpenGL multitarget rendering (compositing). 2013-07-23 18:39:07 +02:00
jean-pierre charras fff2f017d8 Fix an issue in Debug mode 2013-07-23 12:35:58 +02:00
Camille Delbegue 9076bfc9f7 Pl_Editor: Fix wx28 compatibility 2013-07-23 08:18:59 +02:00
jean-pierre charras ec7ee344b5 Bug #1202761 (Off centre zoom ) 2013-07-22 20:38:04 +02:00
jean-pierre charras b65c7df0a3 Initial release of pl_editor, the page layout and title block editor. 2013-07-22 18:46:44 +02:00
jean-pierre charras d7f569ae78 Fix GOST compatibility. 2013-07-22 18:45:22 +02:00
Maciej Suminski a8f4791395 Changed rendering order of cached & noncached layers. 2013-07-22 13:14:53 +02:00
Maciej Suminski 5242fff9d7 Code refactorization. VBO_CONTAINER is split to [NON]CACHED_MANAGER, GPU_MANAGER and VERTEX_MANAGER. 2013-07-22 10:41:12 +02:00
jean-pierre charras c328d6b118 pl_editor: add config options 2013-07-21 16:15:07 +02:00
jean-pierre charras 1f3f11ca0d Add margin values control in pl_editor, and remove margin definition from class PAGE_INFO. 2013-07-20 21:36:19 +02:00
Thiadmer Riemersma f2003d8dda Eeschema: fix subtle find bug when at the end of the search list. (fixes lp 1199689) 2013-07-20 13:13:40 -04:00
jean-pierre charras 50743cf3ba Initial release of pl_editor, the page layout and title block editor. 2013-07-19 20:27:22 +02:00
Maciej Suminski 4d7db7171c Fixed comments. 2013-07-19 09:35:25 +02:00
Maciej Sumiński 92ccc2018e Headers containing shader program sources are generated using CMake. 2013-07-17 23:55:59 +02:00
Maciej Suminski bbc0e8eb74 Refactorization of VBO_CONTAINER. 2013-07-17 18:49:38 +02:00
Maciej Suminski 99e8814028 Fixed wrong memory freeing. 2013-07-17 14:16:37 +02:00
Maciej Suminski 861ea0592e Different approach to coloring netname labels. 2013-07-17 14:02:08 +02:00
Maciej Suminski f4114d22c5 Display preferences for showing netnames applies to the GAL backend. 2013-07-17 13:38:56 +02:00
Maciej Suminski cc901496e9 Restored missing Refresh() on switching the high contrast mode. 2013-07-17 10:26:29 +02:00
Maciej Suminski c5ca075e24 Added an interface for highlighting. 2013-07-17 10:21:46 +02:00
Maciej Suminski b0c1b97ff3 Fixed stroked circles width issue with OpenGL shaders. 2013-07-17 10:21:29 +02:00
Maciej Suminski aa6a5ab671 Moved bottom netnames layer over bottom tracks & pads. Changed int to LAYER_NUM where applicable. 2013-07-16 15:45:21 +02:00
Maciej Suminski fef47b0b67 Fixed OpenGL tracks transparency & netnames issue. 2013-07-16 15:44:08 +02:00
Maciej Suminski 7739cfef2f Added support for multiple active layers (colored ones in the high contrast mode).
Added separate layers for pad netnames (now these are divided into multilayer/top/bottom pads).
More appropriate layers are selecting a copper layer in the high contrast mode (now it shows the copper layer itself, vias & multilayer pads and netnames).
2013-07-16 13:40:53 +02:00
Maciej Suminski 0544134ae3 Moved rendering order settings to a more appropriate place. 2013-07-16 10:49:56 +02:00
Maciej Suminski 07e4fc31b4 1 pixel wide outlines for the Cairo and the OpenGL with shaders backends, but it breaks displaying outline in the shaderless OpenGL backend. 2013-07-16 09:27:28 +02:00
Maciej Suminski cbec733deb Refactored code responsible for high contrast mode. Now it allows to have more than one layer on the top.
Selecting layer using the dropdown list on the toolbar influences the layer displayed in high contrast mode.
2013-07-16 09:26:29 +02:00
Maciej Suminski 20c86db71f 1 pixel wide lines using OpenGL shaders. 2013-07-16 08:49:12 +02:00
Maciej Suminski 64122ae057 Stroked lines in Cairo GAL are always drawn at least 1 pixel wide. 2013-07-16 08:48:21 +02:00
Maciej Suminski 9374d642bf Fixind GLM headers problem. 2013-07-16 08:42:44 +02:00
Wayne Stambaugh ba16d9e763 Eeschema find bug fixes. (fixes lp:1199689)
* Force search when wrap past end of list option changes state.
* Fix SCH_FIELD::Matches() for bug in user defined fields which have an ID
  of -1.
* Minor improvements to the find data names to improve source code readability.
2013-07-14 14:08:20 -04:00
Maciej Suminski 58280f749a Fixed multiline vertical strings drawing bug. 2013-07-09 10:00:23 +02:00
Dick Hollenbeck 34e6314a3e dialog information hiding, initial Fit() 2013-07-09 00:48:26 -05:00
Dick Hollenbeck 8c2d3d12fc comment improvements 2013-07-09 00:22:08 -05:00
Dick Hollenbeck e44fa93776 wxStandardPaths().GetExecutablePath(); is not wx 2.9.5 compatible, formatting improvements 2013-07-09 00:20:07 -05:00
Dick Hollenbeck e135b7f669 treat chars as unsigned when hashing 2013-07-09 00:18:03 -05:00
Maciej Suminski 6c3534bd35 Dynamic color setting for netnames. 2013-07-08 20:42:46 +02:00
Maciej Suminski 32db0d469a Dynamic font scaling for pads netnames. 2013-07-08 20:04:43 +02:00
Maciej Suminski b7747bc224 wxWidgets 2.8 compatibility fix.
Scripting engine build fix.
2013-07-08 17:14:16 +02:00
Maciej Suminski 89637b89b8 Separate layers for each copper layer netnames. 2013-07-08 16:46:04 +02:00
Maciej Suminski b7447ff05e Remove updating of non-cached layers. 2013-07-08 15:24:44 +02:00
Maciej Suminski 36f1147da1 Upstream merge. 2013-07-08 15:05:12 +02:00
Maciej Suminski 46eabaa44e Fixed 'disappearing via' issue. 2013-07-08 14:06:45 +02:00
Maciej Suminski fb1f4ad8e5 Lighter pads & tracks net names color. Proper rotation of text on symmetrical pads. 2013-07-08 13:57:09 +02:00
Maciej Suminski 3841b0ac3a Showing net names on pads. 2013-07-08 11:30:50 +02:00
Maciej Suminski 032ef3a74c Showing net names on tracks. 2013-07-08 09:57:23 +02:00
Maciej Suminski 5a0869f2e2 Added 'required layers' option for drawn items. 2013-07-08 09:28:58 +02:00
Maciej Sumiński d51b8a8744 Removed some more KICAD_GAL ifdefs. 2013-07-07 20:02:06 +02:00
Maciej Sumiński 180c72ef83 Added possibility to change zoom using toolbar in GAL. 2013-07-07 19:30:44 +02:00
Maciej Sumiński d81a351c73 Removed drawing hatch lines for polygons. 2013-07-07 18:55:23 +02:00
Maciej Sumiński 07781d34be Removed KICAD_GAL CMake option. 2013-07-07 02:30:28 +02:00
jean-pierre charras 28d702f6a9 Eeschema: fix a *very subtle* bug noticeable only in complex hierachies, for multiple parts per package:
sometimes, the modified flag was set for these components just when switching from a sheet to an other sheet.
Pcbnew: fix Bug #1197414 (dragged track segments does not show clearance area)
2013-07-05 19:48:01 +02:00
Maciej Suminski b5aadfc3f9 Fixed segmentation fault when there was no board loaded. 2013-07-05 15:48:45 +02:00
Maciej Suminski eb041ee2d3 Removed most of deprecated OpenGL calls. Items used to be drawn in immediate mode now are drawn using vertex arrays. 2013-07-05 14:01:33 +02:00
Maciej Suminski 408fb4f159 Removed pointers where they were not necessary. 2013-07-05 09:31:04 +02:00
Maciej Suminski e29a829a70 Added implementation of level of details per layer and item type pairs basis (items on every layer have a possibility to define the minimum VIEW scale to be shown). 2013-07-04 18:45:00 +02:00
Maciej Suminski 9c4e02379a Added the 'cached' parameter for VIEW_LAYER. The parameter decides if items drawn on the layer should be cached or drawn in immediate mode.
Removed m_useGroups from VIEW, as now groups are enabled per layer.
2013-07-04 17:02:20 +02:00
Maciej Suminski aff3787b34 Fixed drawing circles and semicircles using display lists. 2013-07-04 16:27:27 +02:00
Maciej Suminski af5a695c85 Added functions for changing settings of used font in GAL. 2013-07-04 14:24:41 +02:00
Maciej Suminski 073eb024fe Reduced frame limit. 2013-07-04 14:21:40 +02:00
Maciej Suminski 84392f1723 Moved STROKE_FONT from PAINTER to GAL. 2013-07-04 11:37:43 +02:00
Maciej Suminski fe6c901a9f Shaders can handle integer parameters (uniforms). 2013-07-03 13:08:43 +02:00
jean-pierre charras 26bd37e086 Eeschema: fix bug Bug #1197103 and an other very minor bug. 2013-07-03 09:27:52 +02:00
Maciej Suminski 97f914ccb3 Fixed stroked semicircles Z coordinate in shaderless OpenGL backend. 2013-07-02 18:11:57 +02:00
Maciej Suminski 68961c82fd Added possibility to change display modes of zones. 2013-07-02 14:02:42 +02:00
Maciej Suminski 0f5aa0630a Fixed stroke semicircles drawing using shaderless OpenGL backend. 2013-07-02 09:27:12 +02:00
Dick Hollenbeck 9d6ec5a265 dsnlexer.cpp's isNumber() was recently stupid-ized, un-stupid-ize it. 2013-07-01 09:37:03 -05:00
Maciej Suminski 6dc79cf193 Headers are regenerated only if shaders' source code was modified. 2013-07-01 15:47:44 +02:00
Maciej Suminski 9e4fe8b410 Faster polylines drawing using OpenGL backend.
Fixed drawing of lines' caps.
2013-07-01 15:23:43 +02:00
unknown 4360860bee Removed different styles of line caps and line joins, leaving only round caps & joins.
Fixed drawing stroked semicircles using OpenGL backend.
2013-07-01 14:39:27 +02:00
Maciej Suminski 8a44751b61 Mirrored text display bugfix. 2013-07-01 14:06:38 +02:00
Maciej Suminski a73216fc95 Changed std::map to boost::unordered_map for storing memory chunks and groups information. 2013-07-01 13:20:48 +02:00
Dick Hollenbeck caf5fc8d8d DSNLEXER::NextTok() organizes the specctraMode code better, into one if block mostly.
This keeps it out of the KiCad mode path, making that leaner and less confusing about
what is supported in KiCad mode.  Within KiCad mode, treat quoted vs. non-quoted tokens
as the two general categories, with non-quoted having sub-categories.  Eliminate  
an unimplemented, unused function declaration in DSNLEXER.
 
Improve the output formatting of THROW_PARSE_ERROR().
2013-07-01 01:47:36 -05:00
Dick Hollenbeck 44d31a1897 Speed up DSNLEXER::findToken() to such an extent that it resulted in an approximate 13% reduction
in *.kicad_pcb file loading times.
2013-06-30 20:05:40 -05:00
Maciej Sumiński 00847a8aed Colors are stored as unsigned bytes instead of floats. 2013-06-30 22:45:31 +02:00
Karl Thorén ee8901d9dd All: Fix bug #1196277 (pcbnew does not save all parts of the title block to the kicad_pcb file) 2013-06-30 19:40:33 +02:00
Maciej Sumiński 27a6f8afd6 Shaders are built-in instead of being loaded from external files. 2013-06-30 19:31:16 +02:00
Maciej Sumiński 335bf72060 More debug information in case of failure compilation of shaders. 2013-06-30 15:37:46 +02:00
Maciej Sumiński 5eb38ec232 Made shaders compatible with Intel GPUs. 2013-06-30 15:37:35 +02: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
Wayne Stambaugh a56d3235e3 Prevent GTK printing build error on Linux
* Do not fail to build when wxWidgets is built with either --with-gnomeprint
  or --with-gtkprint are not configured.  Only display warning.
* Move warning code from include/common.h to common/common.cpp so it only
  shows the warning once instead of every source file that includes common.h
2013-06-28 12:29:39 -04:00
jean-pierre charras 820153c7d4 Gerbview: remove fully outdated code (about reading DCode files) and fix erroneous comments. 2013-06-28 12:49:43 +02:00
Maciej Suminski bc8ea55092 VBO_CONTAINER: Changed new[]/delete[] pairs to realloc(), possibly reducing memory fragmentation and the container shrinking time. 2013-06-28 10:47:41 +02:00
jean-pierre charras ccbc4882fd Pcbnew: fix bug Bug #1194219 (Solder mask clearance ignored for oval pads )
When KISYSMOD is not defined , in GetAllFiles, skip hidden directories
Gerbview: fix a collision name for GetLayout method.
Eeschema: fix potential crash when editing a pin electrical type (The user was able to enter a non existing type)
2013-06-28 08:31:24 +02:00
Dick Hollenbeck 0a11144cad fix legacy board file footprint name setting in MODULE 2013-06-27 16:34:01 -05:00
Dick Hollenbeck 770d72c538 remove dialog_netlist.h 2013-06-27 15:34:30 -05:00
Dick Hollenbeck cec229bf83 WTF 2013-06-27 15:33:28 -05:00
Wayne Stambaugh ce94880a52 Pcbnew: fix bug reading legacy board format. (fixes lp:1195368) 2013-06-27 16:27:29 -04:00
jean-pierre charras 10352b1df5 Minor fixes. Gerbview: fix a collision name for GetLayout method. 2013-06-27 21:12:01 +02:00
Maciej Suminski 3f1da8b2c0 Minor code cleaning. 2013-06-27 17:31:10 +02:00
Maciej Suminski 649a7fa305 Proper handling of toggling outline display of items. 2013-06-27 17:23:54 +02:00
Maciej Suminski 628c069a39 Faster circles & semicircles drawing for the shaderless OpenGL backend. Removed unnecessary variables and computations. 2013-06-27 16:05:15 +02:00
Maciej Suminski 332a7b4bd9 Groups are stored in map instead of deque, so it allows easier adding & removing. 2013-06-27 11:54:49 +02:00
Maciej Suminski 58de62aacc High contrast mode with showing the selected layer on the top. 2013-06-26 16:31:52 +02:00
Maciej Suminski 1367d33cd8 Small speed up for the color change function (OpenGL_GAL). 2013-06-26 10:43:58 +02:00
Alexander Lunev b66d6e2d8c pcad2kicadpcb: check for file format 2013-06-25 11:05:51 -05:00
Dick Hollenbeck e513380a85 Add script to make a footprint library table from the KiCad Bazaar library repository, either in s-expr or CSV format. Add also the generation of such tables as of today. 2013-06-25 10:56:12 -05:00
Maciej Suminski db74de74f5 Added possibility to change cached layer color (for the purpose of high contrast display). 2013-06-25 17:12:54 +02:00
Maciej Suminski 0bac4a1e07 Fixed warning about a not initialized variable. 2013-06-25 16:54:30 +02:00
Maciej Suminski 0baa580b8d Added zoom in, zoom out & fit on screen view commands handling in GAL. 2013-06-25 09:15:57 +02:00
Maciej Suminski fbc3d63c24 Draw the origin marker in OpenGL with shaders GAL. 2013-06-24 16:02:18 +02:00
Maciej Suminski 978b548c64 Small improvements to SHADER class. 2013-06-24 15:40:31 +02:00
Maciej Suminski ef865aab68 Grid settings apply to GAL based rendering. 2013-06-24 14:33:02 +02:00
Maciej Suminski 322c71d2cc Fixed hotkeys for switching GAL backends. 2013-06-24 13:46:24 +02:00
Maciej Suminski 81c674387e Added convertsion from wxColour to COLOR4D. 2013-06-24 10:32:08 +02:00
Maciej Suminski 08c54e8acf Passing COLOR4D parameter using constant reference. 2013-06-24 10:21:34 +02:00
Maciej Suminski f7d85691c2 Added conversion from EDA_COLOR_T to COLOR4D. 2013-06-24 10:12:36 +02:00
Dick Hollenbeck 4fad477d1a add CTL_OMIT_INITIAL_COMMENTS and CTL_FOR_BOARD PCB_IO::Format()ing flags 2013-06-24 00:30:22 -05:00
Dick Hollenbeck 9d86345ea5 fix copy constructor with new MODULE::m_initial_comments member handling 2013-06-23 17:41:35 -05:00
Dick Hollenbeck 1f9ee2e45e Support for 'initial single line comments' in the pretty footprint format.
This is limited to round tripping the lines of commented text in the
loading and saving to disk through PCBIO::Format() and PCBIO::Parse().
No editing of the comments is given.
2013-06-23 14:18:33 -05:00
Maciej Suminski 26f6e259e6 Shows single layer pads with proper colors. 2013-06-21 12:02:17 +02:00
Maciej Suminski 145a3f20de Changed atan2() to VECTOR2D::Angle() 2013-06-21 09:01:40 +02:00
Alexander Lunev 2b25beb074 Fix an issue with setting the Reference and Value of a module.
The bug was revealed on re-opening the saved version of a file imported by pcad2kicadpcb.
2013-06-20 15:53:23 -05:00
Maciej Suminski 8552a6e29d Fixed some minor rendering issues, mostyl for shaderless OpenGL GAL. 2013-06-20 16:37:21 +02:00
Maciej Suminski fd6ab6003d Bug fixes:
- VBO_CONTAINER::allocate() was returning wrong value in case of error
- framelimiter had wrong formula for computing destined period between frames
- removed _padding field from VBO_VERTEX, as it was not speeding up, but wasting memory
2013-06-20 13:16:12 +02:00
Maciej Suminski 929a849b99 Added a framerate limiter.
Now it does not use all the CPU power while panning even on simple boards.
2013-06-20 09:58:18 +02:00
jean-pierre charras 781cc00aca Pcbnew: netlist dialog: add silent mode option, and tool tip to the 2 options (dry run and silent mode)
dialog_display_info_HTML_base: derived now from dialog_shim.
2013-06-19 18:11:12 +02:00
Maciej Suminski bb9ee216e8 Changed order of used headers, so there is no need to include again 'wx/wx.h' needed by layers_id_color_and_visibility.h 2013-06-19 12:07:25 +02:00
Maciej Suminski 83f5bd60c1 Moved fields containing information about currently used color, shader and transformation for vertices from VBO_ITEM to VBO_CONTAINER (OPENGL_GAL). 2013-06-19 10:50:46 +02:00
jean-pierre charras 3b423cb12d Pcbnew fix Bug #1192203 (I hope ...)
Bitmap2component: add export for .kicad_mod new footprint file format, and export polygon descr for page layout description (.kicad_wks file)
2013-06-18 19:27:47 +02:00
Maciej Suminski 4de43d7c5f Removed unnecessary functions from VBO_VERTEX. 2013-06-18 17:53:12 +02:00
Maciej Suminski 1fc0113b06 Removed unnecessary casting from VIEW_ITEM to EDA_ITEM. Added Type() function to VIEW_ITEM. 2013-06-18 17:01:23 +02:00
Maciej Suminski cd517f67db Added VBO_CONTAINER as a faster storage for vertices (OPENGL_GAL), tuned for exchanging data with GPU.
Removed a few unnecessary variables and fields from OPENGL_GAL.
Added function GAL::ClearCache() for freeing memory used by cached items.
Fixed a few memory leaks (tesselator, PAINTER's settings & VIEW_ITEM's groups).
Changed a few functions into inlines.
2013-06-18 16:20:29 +02:00
Maciej Suminski 876bf75d89 Added GAL_TYPE_NONE as an indicator of GAL uninitialized state. 2013-06-18 16:19:30 +02:00
jean-pierre charras 4536e27426 Eeschema: Fix wx28 compatibility issue. 2013-06-17 21:01:47 +02:00
jean-pierre charras b4d0cd7467 Eeschema: Add dialog and utilities (help files ...) to create BOMs from generic netlist, using python scripts or xsltproc+style sheet.
Remove dead code relative to old BOM generation.
Rename witha  more explicit name bom-example?.py , fix some issues and move them from script/bom-in-python/ky to script/bom-in-python
Rename ki.py utility to more explicit  ky_generic_netlist_reader.py
2013-06-15 20:02:52 +02:00
Wayne Stambaugh 60eb4b006d Pcbnew netlist read performance improvements.
* Do not search for footprint when no footprint is defined for a component
  in the netlist.
2013-06-15 12:55:51 -04:00
jean-pierre charras 26b7bdc35c Eeschema: add dialog and utilities to create BOMs from generic netlist 2013-06-14 16:59:52 +02:00
Dick Hollenbeck 2810f5a5fe fix error message in legacy_plugin 2013-06-13 11:17:25 -05:00
Dick Hollenbeck dea9dd2361 better error reporting and parsing of bad legacy footprint libs 2013-06-13 11:09:35 -05:00
Dick Hollenbeck 64f8e0b8e1 various 2013-06-13 06:43:29 -05:00
Alexander Lunev a3f2980d80 Fix pcad2kicad issue, from A. Lunev, and a minor code cleaning in component_references_lister.cpp. 2013-06-12 21:43:22 +02:00
jean-pierre charras 179ada1c70 Eeschema: fix Bug #1189893 (ps plot file opened twice) 2013-06-11 16:27:07 +02:00
jean-pierre charras 39993e27e4 Fix issue in auto panning while moving in EDA_DRAW_PANEL::OnMouseLeaving() 2013-06-10 15:23:58 +02:00
Dick Hollenbeck 00adc67d2a Rename invoke_a_dialog.h. Code an alternate implementation for std::string BOARD_ITEM::FormatInternalUnits( int aValue ), for verification. 2013-06-10 07:24:01 -05:00
Dick Hollenbeck 36aca68e40 fix autopan non-response problem when dragging block to right or bottom 2013-06-09 13:14:01 -05:00
jean-pierre charras b1489cbe40 Remove a useless message shown only in debug mode, about page layout file not found 2013-06-09 18:50:57 +02:00
jean-pierre charras 92ac2ac47e Cvpcb: Bug fix: Select previous free component crashes Cvpcb when no previous free component found, and both Select next and previous free component where not working very well. 2013-06-09 18:36:54 +02:00
jean-pierre charras a287f89304 Custom page layout: add support for poly-polygons (useful for logos) 2013-06-08 20:19:09 +02:00
Wayne Stambaugh 98eb5e75e5 CvPcb focus and status bar improvements.
* Fixed status bar update bug that caused the selected footprint information
  to be overwritten.
* Remove unnecessary SetFocus() calls in list control OnChar() handlers.
2013-06-08 12:06:26 -04:00
Dick Hollenbeck 515f5fbe5e *) Introduce "invoke_a_dialog.h" to information hide between top frame
and various DIALOG classes called from top frames.  See comments in
   {eeschema,pcbnew}/invoke_a_dialog.h.
*) Move some dialog classes into *.cpp files from *.h files.
*) void SCH_EDIT_FRAME::OnErc( wxCommandEvent& event ) was opening the modeless
   ERC dialog more than once if icon was clicked more than once.
*) Remove BOM stuff.
2013-06-07 15:56:55 -05:00
jean-pierre charras 0c5d9fa20c Fix compil issue on wxWidgets 2.8.12, created by my last commit. 2013-06-07 19:35:09 +02:00
jean-pierre charras ee6cd0883d Plot files : fix Bug #1188664 (full filename instead of short file name, and swapping between sheet path and file name) 2013-06-07 18:37:44 +02:00
Wayne Stambaugh ecbe947bc6 CvPcb pin count filtering improvement. (fixes lp:1188325)
* Add option to MODULE::GetPadCount() to exclude non-plated through holes.
2013-06-07 09:17:52 -04:00
Wayne Stambaugh 9929919b59 Fix CvPcb library filtering bug. (fixes lp:1188321) 2013-06-07 08:15:32 -04:00
jean-pierre charras aaab12d37e Mainly for testing purposes: page layout: if the environment variable KICAD_WKSFILE points a S expr page layout descr, this descr is used instead of internal descr.
Therefore one can use a custom page layout and title block.
Eeschema, dialog edit component: minor enhancement (the last selected notebook page is remembered during a session)
2013-06-07 13:09:18 +02:00
jean-pierre charras c8c05cb4ee page layout: if the environment variable KICAD_WKSFILE points a S expr page layout descr, this descr is used instead of internal descr. Mainly for testing purposes.
Eeschema, dialog edit component: minor enhancement (the last selected notebook page is remembered during a session)
2013-06-07 11:49:36 +02:00
jean-pierre charras 7432d4de29 Page layout: add comments, and fix a very minor issue.
Eeschema, dialog netlist: fix a bug when removing a plugin panel, when is is not the last.
dialog netlist:Add a predefined command string for python scripts, when creating a new netlist plugin entry.
2013-06-06 20:03:29 +02:00
Wayne Stambaugh 7f18b883ab CvPcb filtering and other minor improvements.
* Change filtering from single selection to logically and each filter type.
* Remove clear filtering button and logic.
* Filter buttons now behave as true toggle buttons.
* Improve list control pane focus following when using arrow keys to change
  list pane.
* Remove unused parameters from list box constructors.
* Make tab key behave like right arrow key when moving focus to next list
  pane.
* Make list pane focus wrap around to next or previous control.
* Simplify component list filtering code.
* Improve status bar updating.
* Tell Bazaar to ignore .downloads-by-cmake instead of downloads-by-cmake.
2013-06-06 11:37:48 -04:00
Maciej Suminski e7b7e0e687 Removed some debug messages. 2013-06-06 11:54:37 +02:00
Maciej Suminski 8742dae4a4 Removed indices storing from VBO_ITEM as they are always consecutive numbers. Removed storing pointers to VBO_ITEMs that have to be drawn - instead they are memcpied to mapped GPU memory.
Some functions of VBO_ITEM became inline.
2013-06-06 11:52:39 +02:00
Dick Hollenbeck 142306e238 fix libeditframe.cpp, which in release build would not show multipart text in listbox. dialog uses DIALOG_SHIM. 2013-06-05 14:23:55 -05:00
jean-pierre charras 66f5b3d3cc Fix a minor issue in page layout default descr. 2013-06-05 17:32:24 +02:00
Dick Hollenbeck 0f1f0f92f1 downloads-by-cmake now configurable, fix wx2.8 compiler errors 2013-06-05 09:24:03 -05:00
jean-pierre charras 1ec4986422 Add info and comments about page layout description using S expressions 2013-06-05 15:21:14 +02:00
jean-pierre charras 91c3f3bc83 All: use a S expression to describe the page layout (title block and grid references). Work in progress.
This should  allow users to define their own page layout.
2013-06-05 14:03:16 +02:00
Maciej Suminski 8e1fe5d766 Changed data structure in VBO_ITEM. 2013-06-05 10:48:30 +02:00
Maciej Suminski e9ebdf2583 Upstream merge. 2013-06-05 10:01:53 +02:00
Dick Hollenbeck 3bddb98de9 Fix wierd ConfigBaseWriteDouble's Printf( wxT("%12f"), aValue ); format string
which was creating silly strings like 

  PcbTextThickness="    0.300000"

in kicad.pro files.
2013-06-04 09:44:21 -05:00
Dick Hollenbeck 94338e072f comment 2013-06-04 09:44:08 -05:00
Maciej Suminski 04b4f236be Switching to OpenGL using shaders backend on the fly (changed keyboard shortcuts: different backends are available using Alt+F9..F12). 2013-06-04 16:18:33 +02:00
Maciej Suminski 28511cf4fe Introducing shaders.
Shader's parameters are stored in VBO_ITEM. Changed VBO_ITEM data structure. Added UseShader() function for selecting shader for a given VBO_ITEM.
Added one main vertex & fragment shader program to be used for with all kinds of items (type of shader is selected using attributes that are stored in VBO). Currently available shaders are: at-least-1px-width line, filled circle and stroked circle.
Removed unnecessary param (aDepthOffset) from a few functions (OPENGL_GAL::drawSemiCircle(), OPENGL_GAL::drawLineCap()). Removed function OPENGL_GAL::DrawRoundedSegment(). Changed some asserts to debug info or error log.
2013-06-04 15:58:53 +02:00
Dick Hollenbeck 0390fbf978 speedups 2013-06-03 08:09:37 -05:00
Maciej Suminski ad5d10a8ba Display linking errors in debug mode for shaders. Added SHADER::GetAttribute() function for getting shaders attribute location. 2013-06-03 10:54:24 +02:00
Dick Hollenbeck f280c7374c include only the boost headers in the scratch repo 2013-05-31 23:04:56 -05:00
Dick Hollenbeck 387d0c4e01 *) Refinements to ExternalProject_Add( boost )
*) Enhancements to make_lexer().
*) Support multi-threaded build.
*) Switch to "bzr patch" from patch.exe for Windows users.
2013-05-31 16:36:40 -05:00
Dick Hollenbeck 70b8e6b6e2 add copyright message to download_boost.cmake 2013-05-31 16:26:08 -05:00
Dick Hollenbeck 2fc698846b *) Refinements to ExternalProject_Add( boost )
*) Enhancements to make_lexer().
*) Support multi-threaded build.
*) Switch to "bzr patch" from patch.exe for Windows users.
2013-05-31 16:22:34 -05:00
Michal Jahelka a23dcccce5 Add filtering footprint list by library to CvPcb
* Add third list control with library names.
* Add button to toolbar to select filter by library name.
* Add bitmap for filter by library name toolbar button.
* Remove custom UI colors from list controls.
2013-05-31 13:33:46 -04:00
Dick Hollenbeck 5c98951954 add support for exponents in dsnlexer.cpp's DSN_NUMBER token 2013-05-31 09:24:56 -05:00
Dick Hollenbeck 96f8f6066d remove boost and make it an external project, so the procedure for upgrading is better documented 2013-05-30 23:46:02 -05:00
Dick Hollenbeck d8f87cca3c factor out isNumber() in dsnlexer.cpp, add support for numbers with exponents, leave commented out for further testing 2013-05-30 20:20:37 -05:00
Dick Hollenbeck 0eae829b11 factor out isNumber() in dsnlexer.cpp, add support for numbers with exponents, leave commented out for further testing 2013-05-30 19:49:22 -05:00
Dick Hollenbeck 6231ce5959 fix buggy double2str() 2013-05-30 16:46:14 -05:00
jean-pierre charras 57b30ad254 Pcbnew: Fix Bug #1185556. fix issue about Solder Paste Ratio value which was accepting only one digit in mantissa in 3 dialogs (now 6 digits in all dialogs).
fix potential issue in .kicad_pcb file creation, in some places where a %g or %.16g format was used:
al least under Mingw/gcc4.7.2, the floating number was written using scientific notation, not accepted by the S-expr reader.
2013-05-30 21:32:00 +02:00
jean-pierre charras 5e8c38d293 Kicad template selector dialog: add an info line showing the template path in use. Fix very minor bug #1185462 2013-05-29 20:37:22 +02:00
jean-pierre charras da6f4024ff Fix issue created by the template selector change, on Linux. 2013-05-29 20:00:40 +02:00
jean-pierre charras 43afa81a8c Kicad template selector dialog: add info line showing the template path in use. 2013-05-29 14:03:03 +02:00
Wayne Stambaugh 5560cb54e2 More Pcbnew footprint library table work in progress.
* Add footprint library table loading to footprint editor.
* Overload FOOTPRINT_INFO::ReadFootprintFiles() to read footprints from the
  footprint library tables.
* Fix a bug in FP_LIB_TABLE::IsEmpty() when the table has a fallback table.
* Add code to FOOTPRINT_EDIT_FRAME to use footprint library tables.
* Add an optional build time version of PCB_EDIT_FRAME::loadFootprints() to
  populate netlist footprints from footprint library table.
* Remove adding footprints to board whenever GetModuleLibrary() is called and
  move loading locally as required.
* Add missing source file license comments and coding policy fixes.
2013-05-28 12:54:59 -04:00
jean-pierre charras 4e94d8e793 Dialog page setting: replace wxStaticBoxSizer by wxBoxSizer + static text,
because under Linux and wxWidgets 2.9, wxStaticBoxSizer are very ugly (text not readable in this dialog)
(Does not happen with wxWidgets 2.8)
Eeschema hotkeys: remove duplicate keys in key editor.
2013-05-28 11:49:53 +02: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
jean-pierre charras ea04a4af7d eeschema: netlist dialog: fix a very minor issue. 2013-05-27 15:59:10 +02:00
jean-pierre charras b750414561 Pcbnew: fix bug Bug #1184362 (Pcbnew losing user (custom) sheet size )
Fix minor issues in print/plot: filename not printed, sheetname incorrect in eeschema
2013-05-27 11:17:37 +02:00
Maciej Suminski e8acd2919b Added tesselation of polygons for VBO based rendering (OpenGL GAL). 2013-05-27 09:37:49 +02:00
Dick Hollenbeck 8ccf0320b4 1) Add "rules" to base of tree for copying into BZR_HOME/rules.
File "rules" has instructional text as comments near top.

2) Convert all text files in repo to LF line ending form.
   Any checkout done with "rules" in play will convert the working
   tree to native line ending, while keeping repo as LF line ending.
2013-05-25 23:36:44 -05:00
jean-pierre charras 94dccc9128 Pcbnew! fix Bug #1184030
very minor other chnages.
2013-05-25 18:10:19 +02:00
jean-pierre charras da51dbe1e0 Cvpcb fix bug #1183796 and fix bug when a fp lib is not found : the name of the missing file was not displayed in message window. 2013-05-25 17:02:16 +02:00
jean-pierre charras 29613e2974 Netlist reader: fix issue when reading an ORCADPCB2 netlist (which fixes also bug 1184023) and fix a Cvpcb crash when trying to read an unknown netlist format. 2013-05-25 12:41:24 +02:00
jean-pierre charras 38a5e9af4b 3D viewer: fix Bug #1183581 (pcbnew 3D viewer: recent UI inconsistency )
Pcbnew: fix bug in drag module: connected tracks were not dragged.
worksheet: code cleaning.
2013-05-25 11:01:44 +02:00
Dick Hollenbeck dc9122c5b6 remove "~" from empty *.lib component fields, replace with "", doctor old *.lib fields to blank if that was the intention 2013-05-24 18:58:29 -05:00
Dick Hollenbeck c4c58e1279 copyright and formatting 2013-05-24 16:30:27 -05:00
jean-pierre charras 8bafc54cdc Fix bug #1183802 : incorrect sheet Id (company name displayed instead of Id) 2013-05-24 16:06:58 +02:00
jean-pierre charras 7080828fe2 More about worksheet code. 2013-05-24 10:59:40 +02:00
Lorenzo Marcantonio 26f2c04f13 Make title block date field modifiable by hand. 2013-05-23 14:45:23 -04:00
jean-pierre charras 82cc923356 Worksheet code: more cleanup, and fix compil issue with wxWidgets 2.8 2013-05-23 18:38:17 +02:00
Dick Hollenbeck a9a009029f fix license text in COPYRIGHT.txt, remove duplicate Documentation/copyright.txt 2013-05-23 08:43:42 -05:00
jean-pierre charras b454998677 worksheet code cleaning and fix plot sheet filenames bug (mainly under Linux) (Bug #1182891 ) 2013-05-22 17:43:22 +02:00
jean-pierre charras 3f38a6d89a worksheetcode cleaning and fix plot sheet filename bug under Linux. 2013-05-22 17:08:57 +02:00
jean-pierre charras 001723e077 Worksheet code: cleanup and remove useless parameters. 2013-05-22 10:45:25 +02:00
jean-pierre charras 568ae2ec7e Remove duplicate code to draw and to plot title blocks (more than 1500 duplicate lines). Note: this is a work in progress.
Code cleanup
2013-05-21 09:44:46 +02:00
jean-pierre charras 26a3029a88 Remove duplicate code to draw and to plot title blocks. 2013-05-21 09:18:25 +02: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
jean-pierre charras a8a640811b Code cleaning and move worksheet code specific to title block and frame references shape in title_block_shapes.h and title_block_shapes_gost.h 2013-05-19 21:35:49 +02:00
jean-pierre charras 6b0980d964 Gerbview: fix bug #1176538 (incorrect flashed items size, when defined by aperture macros) 2013-05-18 18:56:03 +02:00
jean-pierre charras 172bbc8f9c Eeschema: fix Bug #1180902 (Libedit creates empty svg images) 2013-05-18 11:38:23 +02:00
jean-pierre charras 0f885e7f31 3D viewer: Add more options, to show/hide technical layers. 2013-05-16 21:04:21 +02:00
Maciej Suminski d45008a847 Different way of rendering groups (with a single DrawElements call) in OpenGL GAL. 2013-05-16 18:43:25 +02:00
Maciej Suminski 7a8e1fc6b4 Different way of measuring render time. 2013-05-16 17:17:35 +02:00
Dick Hollenbeck 7a5f5cb009 compiler warning from mailing list 2013-05-16 09:40:46 -05:00
Maciej Suminski 7a1718d0f5 Changed functions for adding vertices in VBO mode to make code easier to read and understand. 2013-05-16 14:47:34 +02:00
Maciej Suminski 2579fd524d Fixed time measuring functions (only for profiling in debug) 2013-05-16 13:46:00 +02:00
Maciej Suminski 733e5a55e3 Faster way of caching items for OPENGL GAL. 2013-05-16 10:35:16 +02:00
Maciej Suminski c9f9c4ddbc Added functionality for transformation of VBO vertices, extended functions like translate, rotate, scale using glm library. Removed D() macro, as it was not used, but in conflict with glm library. Added VBO_ITEMs for circles, semicircles. Now almost everything is drawn using VBO (besides polygons and grid). 2013-05-15 16:48:10 +02:00
Maciej Suminski c91b4ffbc4 Layer depth is set during items caching (so now they are rendered on proper layers). 2013-05-15 16:47:17 +02:00
Maciej Suminski a43dd351df Assured that there are no excessive initializations 2013-05-15 16:47:01 +02:00
Dick Hollenbeck 0ef043f0f8 replace BOM dialog with a pointer to FAQ https://answers.launchpad.net/kicad/+faq/2265 2013-05-15 05:32:41 -05:00
Maciej Suminski 1a4c6781d8 All kind of items are loaded on SetBoard() again. 2013-05-15 09:17:48 +02:00
Maciej Suminski 806dd7d8ec Items are not recached until GAL is changed (earlier it was done on every rendering backend switch). 2013-05-15 09:17:42 +02:00
Maciej Suminski e1ecd301a7 Added some debug informations. 2013-05-15 09:17:36 +02:00
jean-pierre charras ac1386a5a2 Pcbnew: fix bug 1179877, due a bad default copy constructor, after my changes about CPOLYGONS_LIST class.
More about CPOLYGONS_LIST work.
2013-05-14 20:47:01 +02:00
Maciej Suminski 135149e2d3 Fixed build for eeschema. 2013-05-14 10:46:43 +02:00
Maciej Suminski c55e063745 Removed double freeing of some of Cairo paths. 2013-05-14 10:42:56 +02:00
Maciej Suminski 1b1216e53d Modified SetOffset (VBO_ITEM/OpenGL GAL) function. 2013-05-14 10:41:05 +02:00
Maciej Suminski a6c8beb73b Drawing tracks using PushVertices, added some comments, fixed formatting. 2013-05-14 10:38:25 +02:00
Dick Hollenbeck 6fa4f1e6ac remove non-UTF8 encoded characters from source tree & format fix 2013-05-13 12:30:27 -05:00
Maciej Suminski 32784ea191 Added possibility of adding multiple vertices to VBO_ITEM at once 2013-05-13 11:14:35 +02:00
Maciej Suminski bce9f685ea Fixed Cairo issues and some possible memory leaks 2013-05-13 10:55:35 +02:00
Wayne Stambaugh f78497bf4f Decouple PLOT_CONTROLLER from UI dependencies. 2013-05-10 15:22:29 -04:00
Maciej Suminski e8f33ac903 Fixed memleak, removed excessive recaching, still there is a problem with Cairo caching 2013-05-10 16:05:40 +02:00
Wayne Stambaugh b5bb56426a Fix footprint library search path bug. (fixes lp:1178427 2013-05-09 21:51:55 -04:00
jean-pierre charras 2554575656 More work on CPOLYGONS_LIST class.
Pcbnew: fix minor bug about  plot line width.
2013-05-09 21:08:12 +02:00
Wayne Stambaugh cf86e18f5c Footprint library table work, minor fixes, and code cleaning.
* Fix a bug when full file name and path are passed to FOOTPRINT_INFO::
  ReadFootprintFiles() which I created in bug fix lp:593989.
* Fix a wxString debug assertion in EDA_APP::InitEDA_Appl() when the KICAD
  environment variable is defined as an empty string.
* Add error dialog when libraries cannot be found in system search path
  when loading footprint using the select footprint dialog.
* Add footprint library name column to the EDA_LIST_DIALOG when selecting
  footprints from the list.
* Allow reading all columns from the selected row in EDA_LIST_DIALOG.
* Remove redundant sort from EDA_LIST_DIALOG constructor
* Add library name member variable and accessors to FOOTPRINT_INFO.
* Make headers translatable for Eeschema select component from list dialog.
* Add some helper methods to FPID for identifying the FPID type and validity.
* Remove a bunch of trailing whitespace and add missing license comments.
2013-05-08 16:47:23 -04:00
jean-pierre charras 2e6969fe96 More work on CPOLYGONS_LIST class. 2013-05-08 20:20:58 +02:00
jean-pierre charras 6fcd9eb8a6 Eechema: fix bug : when saving the schematic project, the lib cache was saved under the current sheet opened, not the root sheet.
Pcbnew: clamp default plot line width between 0.02 and 2 mm. the other bug (saving this parameter in internal units instead of mm is not fixed)
2013-05-07 20:32:06 +02:00
Lorenzo Marcantonio 69b7c2a1b6 Removed some spurious float casts
(explanation: float is implicitly promoted to double anyway, it's only useful
for storage; also a fp variable forces conversion of other int in the expression
without needing a cast)
Typo fixes in some comments 'floatting' -> 'floating' :D
2013-05-07 19:31:52 +02:00
Wayne Stambaugh 2be09ba9e2 Fix bug when footprint library file names contain dots. (fixes lp:593989) 2013-05-06 13:57:18 -04:00
Lorenzo Marcantonio 8430508272 Closes bug 1176915
Mass parameters in gerbers can't use scientific notation (altough some software 
allow it), so the %g format was not correct.
2013-05-06 19:47:01 +02:00
jean-pierre charras 7e2779784b Eeschema: fix incorrect move command for bitmap items. 2013-05-06 15:38:14 +02:00
Lorenzo Marcantonio af5a9a8de9 Removed Show code from BOARD_ITEM derived classes (as requested by Dick) 2013-05-05 12:23:18 +02:00
Lorenzo Marcantonio e5dae4b149 Fixed LAYER_NUM usage in the specctra code.
A specctra layer is not a LAYER_NUM, so that's probably why it was difficult to use.
2013-05-05 12:11:30 +02:00
Lorenzo Marcantonio d00c83cde9 Migrated the interfaces accepting angles to the double type
The plan goes like this:
- eeschema still uses int in decidegrees
- all the other things internally use double in decidegrees (or radians
  in temporaries)
- in pcbnew UI the unit is *still* int in decidegrees

The idea is to have better precision everywhere while keeping the user with int i
angles. Hopefully, if a fractional angle doesn't come in from the outside, everything
should *look* like an integer angle (unless I forgot something and it broke)

When the time comes, simply updating the UI for allowing doubles from the user should
be enough to get arbitrary angles in pcbnew.
2013-05-05 09:17:48 +02:00
Lorenzo Marcantonio cb49ca5ae2 More int casts to rounding conversions 2013-05-04 13:57:09 +02:00
jean-pierre charras b2a76062c7 All: use CPOLYGONS_LIST, a typedef of std::vector<CPolyPt> to handle a Corners Polygons List.
This is a starting point of some code enhancements relative to polygons in Pcbew and 3D viewer.
2013-05-03 19:51:10 +02:00
Felix Morgner ea990230ca Fixes implementation of MacOpenFile( const wxString& ) in KiCad.
Adds "kicad_pcb" to the list of file-extensions for PCBnew in its Info.plist 
to make Launch Services recognize the file associations.

Change 8 bit string to UTF8 so fancy mew in "um" can be shown.
2013-05-02 23:04:30 -05:00
Lorenzo Marcantonio 91674347b5 Fixed bad computation in eeschema/transform (my fault)
Note: ArcTangente gives a double but *takes* ints, so it's not good to
use for nontrivial things
2013-05-02 22:53:12 +02:00
jean-pierre charras 19845828ef Fix compil issue in Debug mode. 2013-05-02 20:42:08 +02:00
Lorenzo Marcantonio 78e41187b3 Moved utilities for angles in trigo.h
New conversion routines and sin/cos implementation for angles in decidegrees
2013-05-02 20:06:58 +02:00
Dick Hollenbeck 226b3d64be fix compiler warnings 2013-05-02 09:12:55 -05:00
jean-pierre charras fc8e0bfb75 3D viewer: Modify the way board items shapes are built:
* All items shapes are converted to polygons.
* Polygons are merged layer by layer (for calculation time reasons,zones are not merged)
* for copper layers, vias and pads holes are substracted from polygons (but, for calculation time reasons, not inside zones areas).
* the look is better, mainly when displaying the copper thickness
* solder and paste layers are now shown in 3D viewer.
* the code was seriously cleaned (but still needs to be enhanced).
* Note this is a work in progress which needs refinements.
2013-05-02 07:56:22 +02:00
jean-pierre charras 4ac7dd5845 3D viewer: Modify yhe way board items shapes are built:
* All items shapes  are converted to polygons.
* Polygons are merged layer by layer (for calculation time reasons,zones are not merged)
* for copper layers, vias and pads holes are substracted from polygons (but, for calculation time reasons,  not inside zones areas).
* the look is better, mainly when displaying the copper thickness
* solder and paste layers are now shown in 3D viewer.
* the code was seriously cleaned (but still needs to be enhanced).
* Note this is a work in progress which needs refinements.
2013-05-01 21:01:14 +02:00
Lorenzo Marcantonio 0e903dba5b Angle and distances cleanup (preparing for angles in doubles)
- Removed spurious int casts (these are truncated anyway and will break
  doubles)

- Applied the Distance, GetLineLength, EuclideanNorm, DEG2RAD, RAD2DEG
  ArcTangente and NORMALIZE* functions where possible

- ArcTangente now returns double and handles the 0,0 case like atan2, so
  it's no longer necessary to check for it before calling

- Small functions in trigo moved as inline
2013-05-01 19:32:36 +02:00
Dick Hollenbeck 000ec33af2 remove temporary debug printf()s I no longer need. 2013-05-01 10:49:34 -05:00
Dick Hollenbeck 9634fa5c07 fix 2 corner case bugs in specctra import 2013-05-01 10:48:00 -05:00
Dick Hollenbeck a26e59d8ed pass round boards to freerouter via specctra_export 2013-05-01 08:36:26 -05:00
Dick Hollenbeck d55ab920d2 fix goofy text messages, period after newline 2013-04-30 14:51:33 -05:00
Maciej Suminski e9e4ed4230 Improved recaching (all items when a board is loaded), still needs some fixing (mem leak). 2013-04-30 17:55:24 +02:00
Dick Hollenbeck 63985f67cf wxString::Format() fix 2013-04-30 10:52:18 -05:00
Dr. Thomas Spindler f8f35a8cd0 specctra_export supports interior polygons and circles on the Edge.Cuts layer.
Interior regions on Edge.Cuts are out as keepouts for specctra DSN file
and downstream routers.  Point to point matching during polygon assembly
can have individual thresholds, one for board edge and another for interior polygons.
This is more forgiving for sloppy graphical mousers, or those that work without
grid snap on.  Currently the threshold for board edge is at zero, meaning the
board edge has to be precisely defined as a polygon, just as before.  But it
is easily tunable for experimentation.
2013-04-30 10:25:41 -05:00
Maciej Suminski 191cb40e79 Introduction of VBO. Now only tracks are rendered in a very simple way. 2013-04-30 15:59:32 +02:00
Lorenzo Marcantonio f50f31e5a3 Added include guard to math_for_graphics.h 2013-04-30 15:27:08 +02:00
Wayne Stambaugh 218fb338ab Pcbnew bug and warning fixes.
* Fixed a bug in PCB_EDIT_FRAME::loadFootprints when no footprint libraries
  are found when attempting to load footprints.
* Add a warning to PCB_EDIT_FRAME::loadFootprints to inform the user when
  a footprint library file cannot be found in any of the standard library
  search paths.
* Changed FOOTPRINT_INFO::m_padCount to unsigned to prevent signed/unsigned
  comparison compiler warnings.
* Put NestedSpace() function in netlist_reader.cpp inside conditional debug
  build statement to prevent warning in release builds.
2013-04-29 17:00:24 -04:00
Felix Morgner 625e8b0680 merge with upstream 2013-04-29 12:56:12 -04:00
Felix Morgner bb6fffa5a9 * Set "Ctrl+Shift+S" as shortcut for "Save as..." in CvPcb and PCBnew.
This seems to me like the defacto standard for this menu command.
* Added a default filename for save as. Currently it's set to
  "Unnamed file" using _() so its translatable.
* Changed the save dialog in PCBnew to use the path of the "original"
  file as a base for the new file.
2013-04-29 12:50:10 -04:00
Dick Hollenbeck f92cfcaee6 fix compiler warnings, comments, debug crash, and conceptual issues in specctra 2013-04-29 11:35:07 -05:00
Felix Morgner 3a9f3f89c1 merge with upstream 2013-04-28 18:47:58 -04:00
Wayne Stambaugh 4a9681d5c7 More post Pcbnew NETLIST_READER change clean up.
* Fix both legacy and s-expression netlist readers when footprints are
  assigned in the netlist.
* Add some helper functions to NETLIST for detecting when footprints are set
  or not set and when they have been changed while loading the .cmp file.
* Rename a few functions to improve their readability.
2013-04-28 16:20:40 -04:00
Lorenzo Marcantonio 6b500d606c Converted macros to inline template function 2013-04-28 17:43:26 +02: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 3c5c795c1f Message fix: SMD is an acronym, should be upper case 2013-04-28 15:34:59 +02:00
jean-pierre charras 2080739f76 Pcbbnew: fix bug Bug #1172892 (bad drill map file names, when a point is used inside a board file name) 2013-04-28 11:10:54 +02:00
Felix Morgner 6c2c647703 merge with upstream 2013-04-27 17:58:38 -04:00
Dick Hollenbeck ec497d5d9a Fix SVG plot with filename containing & character. 2013-04-26 21:12:57 -05:00
Felix Morgner 8ddbf84cbb merge with upstream 2013-04-26 11:24:44 -04:00
Wayne Stambaugh 81271ad41a Post Pcbnew NETLIST_READER change clean up.
* Tweak the NETLIST_READER code to allow for component footprint names that
  are not found in any library to generate a warning instead of an error and
  update the board accordingly.
* Don't display undo warning in netlist dialog when dry run option selected.
* Rename netlist_reader_common.cpp to netlist_reader.cpp
* Rename netlist_reader_firstformat.cpp to legacy_netlist_reader.cpp
* Rename netlist_reader_kicad.cpp to kicad_netlist_reader.cpp
* Remove cvpcb/read_write_cmpfile.cpp and move the single function it
  contained into cvframe.cpp
* Remove cvpcb/loadcmp.cpp and move the single function it contained into
  class_DisplayFootprintsFrame.cpp.
* Remove cvpcb/readschematicnetlist.cpp and move the single function it
  contained into cvframe.cpp.
* Remove cvpcb/setvisu.cpp and move the few functions it contained into
  the appropriate source file.
2013-04-26 11:11:52 -04:00
Felix Morgner 24f95c66db resaved some files as UTF-8 to silence clangs warnings about illegal character encodings. 2013-04-25 18:31:14 -04:00
Felix Morgner 5c0b735d82 made changes compliant to style guide. 2013-04-25 13:27:43 -04:00
Felix Morgner d3bf8c6b51 merge with upstream 2013-04-25 13:22:52 -04:00
Maciej Suminski 0cd108b55d Upstream merge. 2013-04-25 18:42:27 +02:00
Maciej Suminski 3ff70deab0 Changed non-shader primitives to GL_TRIANGLES. 2013-04-25 18:30:53 +02:00
Wayne Stambaugh 61b4f8a9eb Pcbnew NETLIST_READER improvements.
* Create separate NETLIST object to hold contents of netlist files.
* Read entire netlist and footprint link files before making applying
  changes to board.
* Add BOARD::ReplaceNetlist() function to eliminate the calls between the
  NETLIST_READER, PCB_EDIT_FRAME, and BOARD objects.
* Change placement of new components below the center of the current board
  or in the center of the page if the BOARD is empty.
* Add dry run option to netlist dialog to print changes to message control
  without making changes.
* Add button to netlist dialog to allow saving contents of message control
  to a file.
* Eliminate the need to compile netlist_reader_*.cpp in both CvPcb and Pcbnew.
* Add netlist_reader_*.cpp to the pcbcommon library.
* Remove redundant load component link file code from CvPcb.
* Modify CvPcb new to work with the new NETLIST_READER object.
* Add compare() function and < and == operators to FPID object.
* Add REPORTER class to hide an underlying string writing implementation for
  use in low level objects.  Thank you Dick for the idea.
* Lots of minor coding policy, Doxygen comment, and missing license fixes.
2013-04-25 12:29:35 -04:00
Dick Hollenbeck d8ba7b3af8 pcb_parser failed on (fill yes (arc_segments 16) (thermal_gap 1.99898) (thermal_bridge_width 1.99898))
See http://tech.groups.yahoo.com/group/kicad-users/message/15105
2013-04-25 07:25:47 -05:00
Maciej Suminski 790e4c6af7 Fixed tracks drawing using Cairo backend with caching turned on. 2013-04-25 10:26:32 +02:00
Maciej Suminski b70adc5f99 Fixed color issue for stroked fonts with OpenGL backend and caching turned on. 2013-04-25 10:00:25 +02:00
jean-pierre charras 00ee6c7b3b Pcbnew, dialog SVG export: Fix Pcbnew crash when opening the dialog. 2013-04-25 09:05:33 +02:00
Maciej Suminski dd8601cbf8 Added caching of multilayer items (storing multiple group ids for items). 2013-04-24 11:28:11 +02:00
Maciej Suminski 10dd5023e2 Removed BeginLayer and EndLayer functions. Resolved Cairo layers drawing problem in a different way. 2013-04-24 09:48:34 +02:00
Maciej Suminski bb3f3d063f wxWidgets 2.8 compatibility fix. 2013-04-23 18:20:45 +02:00
Maciej Suminski 4868af8b62 Changed view control settings to KiCad default (panning, zooming, etc.) 2013-04-23 12:07:14 +02:00
Maciej Suminski ced0d8add9 Modified shaders' source path. 2013-04-23 09:52:51 +02:00
Felix Morgner d7d7b16334 Updated the pcbnew Info.plist to associate .kicad_pcb files with pcbnew. 2013-04-22 12:20:34 -04:00
Maciej Suminski f24048e8da Drawing SMD pads with colors defined by "Pads Front"/"Pads Back" color settings. 2013-04-22 12:13:48 +02:00
Maciej Suminski 0a55a2b672 Fixed wheel scroll event on Windows 2013-04-22 11:08:02 +02:00
Maciej Suminski 1944fea398 Modified way of switching canvas 2013-04-22 11:07:38 +02:00
Felix Morgner 3815087b29 changed implementation of MacOpenFile to make it open files when they are double clicked in Finder. 2013-04-21 20:31:09 -04:00
Wayne Stambaugh d3f28fb71c Fix KiCad crash when no template is selected on new project from template. (fixes lp:1170973) 2013-04-21 15:44:57 -04:00
Maciej Suminski ad4a72ff11 Cairo now renders layers properly (colors are not saturated after layer composition), but slower. 2013-04-19 18:19:50 +02:00
Maciej Suminski 062fc2d200 Some cleanup. 2013-04-19 18:19:20 +02:00
jean-pierre charras 74c64958f4 Pcbnew: fix bug in pcb_parser: incorrect pad local solder paste margin ratio value read when not 0. ( This also fixes bug 1170535 ) 2013-04-19 09:14:27 +02:00
Matthew Beckler 97ccebf355 Fixes to scripting after refactoring & interface cleanups, 2013-04-18 23:23:11 +02:00
Miguel Angel Ajo c597e75b73 Support to enable color from PLOT_CONTROLLER into plotters that start in B/W 2013-04-18 23:21:26 +02:00
Dick Hollenbeck a20c89288f hide pageFmts[] since it is no longer NULL terminated and not global 2013-04-18 13:54:03 -05:00
Dick Hollenbeck 1f3b3d681c fix some compiler warnings 2013-04-18 12:03:47 -05:00
Dick Hollenbeck fb57b54be8 fix Lorenzo's bug introduced in rev. 4082 2013-04-18 12:03:25 -05:00
Maciej Suminski 5d704c9692 Turned on group recaching on GAL change. 2013-04-18 17:10:02 +02:00
Maciej Suminski a96c5379b3 Fixed non-GAL build. 2013-04-18 11:46:23 +02:00
Maciej Suminski e4bac0d91a Fixed resize issue (moved GAL panel into pane).
Tidied up event handlers.
2013-04-18 11:20:19 +02:00
Stefan Helmert 5da0a971d5 The internal BOM generator has bugs. I designed an XSL script, which converts the generated XML Partlist into
a CSV file for Libre Office or Open Office.  It is very easy to use. You can specify it as a plugin for 
Eeshema netlist generator.

It searches for all field names, generates the table headings accounting for all fields found in any part.
Then stuffs all the parts rows according to proper fields.
2013-04-17 09:57:47 -05:00
Maciej Suminski 9af45c05bb Fix for drawing polygons. 2013-04-17 13:59:46 +02:00
Maciej Suminski e799d7a06c Fixed drawing of PCB_TARGET items. 2013-04-17 13:12:54 +02:00
Maciej Suminski fde71bdf33 Removed unnecessary calls to cairo drawing functions. 2013-04-17 12:50:38 +02:00
Maciej Suminski 16a28348b4 Added const(..)& in GAL methods' parameters and change iterators to constant iterators. 2013-04-17 12:48:37 +02:00
Maciej Suminski 520be6f67b Added GAL::DrawSegment for drawing rounded segments (used for drawing tracks). 2013-04-17 12:38:00 +02:00
Maciej Suminski 6cf04e6820 Fixed drawing arcs in Cairo GAL. 2013-04-17 12:33:11 +02:00
Maciej Suminski 188ea1f59f More accurate rendering display of ZONE_CONTAINERs. 2013-04-17 12:30:21 +02:00
Maciej Suminski 71a1ad6ff5 Fixed drawing polygons using Cairo-based GAL. 2013-04-16 14:55:21 +02:00
jean-pierre charras c4dc992c03 Eeschema: fix bug #1168116. Netlist generation: remove dead code and fully outdated option pspice "use net number"
Pcbnew: layer manager: display tooltips using translated form (where internationalized, but always shown in English).
2013-04-16 12:53:23 +02:00
Maciej Suminski 4eadf2ef47 Removed flickering in Cairo-based rendering backend. 2013-04-16 11:43:13 +02:00
Maciej Suminski bee0d69289 Cleanup 2013-04-16 11:16:27 +02:00
Maciej Suminski 01ebf03110 Inverted Y display axis while using Cairo-based rendering backend. 2013-04-15 17:59:38 +02:00
Maciej Suminski 820e6e5e16 Introduced Cairo-based rendering backend using GAL.
Moved switching canvas routines to pcbnew, as they are used only there right now (otherwise libgal would have to be linked to every Kicad application).
2013-04-15 17:57:03 +02:00
Maciej Suminski 5b9057823a Introduced SetGAL() functions that will allow changing GAL backend for rendering on the fly. 2013-04-15 16:03:05 +02:00
Lorenzo Marcantonio 70dc51d1f9 Changed format specifiers of some printf involved with size_t values to %zu to avoid runtime assertions. 2013-04-14 13:02:19 +02:00
Lorenzo Marcantonio 2cad7a52ad Closes bug 1168753.
Depending on build options seems that wx uses different types for size() so the Format string was not always correct. Put a fat warning in a comment too.
2013-04-14 10:26:42 +02:00
Matthew Beckler 088832b8f6 Match 'new char[]' with proper delete[] char* rather than delete char*. 2013-04-13 23:07:04 -05:00
Dick Hollenbeck 35e1c65996 move project templates from source tree to library tree 2013-04-13 16:30:21 -05:00
Maciej Suminski e1fcd31381 Fixed text display using Cairo. 2013-04-12 16:41:31 +02:00
Maciej Suminski e3cb0aa36f Tesselation error fix.
Added missing callback function (combine callback).
2013-04-12 10:37:06 +02:00
Wayne Stambaugh b1144a864f wxWidgets 2.8.12 build fix 2013-04-12 09:30:18 +02:00
Maciej Suminski 3412e82799 Copyright change 2013-04-12 09:16:52 +02:00
Dick Hollenbeck d23724f59e use lower case library names in *.pro & *.sch files, to match actual filenames in the template file set. Noticed on linux. 2013-04-11 14:04:30 -05:00
Lorenzo Marcantonio 65b7f23d46 Set grid color for module editor and viewer (closes #1167884)
Also removed EDA_DRAW_FRAME::OnGrid which was totally dead (empty and unused)
2013-04-11 20:29:56 +02:00
Dick Hollenbeck d5fff4a6da revert text strings for clarity 2013-04-11 13:00:36 -05:00
jean-pierre charras e07590f930 All: fix a minor issue in drawtext.cpp
Pcbnew: load footprint from modview: Because modview allows user to choose the footprint library, the selected library is forced when the footprint is loaded.
I am not sure this is 100% better, but this new behavior has some advantages, mainly in the footprint editor (you can load a footprint outside the selected library)
2013-04-11 19:40:20 +02:00
Maciej Suminski 877dd3f79a Added multiline strings and text overbars rendering using GAL. 2013-04-11 14:21:59 +02:00
Maciej Suminski 53ec1efc1d Copyright notices fix. 2013-04-11 10:04:38 +02:00
Dick Hollenbeck e5740af069 2.9 wx rat race 2013-04-10 16:06:49 -05:00
Dick Hollenbeck 297a54fa3e Make project templates work with KICAD_PTEMPLATES env var. 2013-04-10 15:31:40 -05:00
jean-pierre charras 3e4a79d063 Pcbnew: fix Bug #1167364
pcb_calculator: fix bug Bug #1167345
2013-04-10 21:20:35 +02:00
Lorenzo Marcantonio b1c710a214 Made overbar position independant of pen size for text, to fix graphics glitches with halo text.
Slightly retuned for compensating the new position.
2013-04-10 21:09:59 +02:00
Dick Hollenbeck cca97586a9 revert to using quotes around variable text which may be blank 2013-04-10 10:08:01 -05:00
Maciej Suminski 07cd3bcb56 Upstream merged 2013-04-10 15:03:35 +02:00
Maciej Suminski 80999ba0a4 Temporarily disabled display of netlabels on pads due to performance drop. 2013-04-10 13:47:19 +02:00
Maciej Suminski 0d85444062 Fix for compatibility with wxWidgets 2.8 & 2.9 at the same time. 2013-04-10 10:09:23 +02:00
jean-pierre charras 0d41a7a523 All: fix some issues in messages to translate. Remove fully outdated files 2013-04-10 09:23:20 +02:00
Maciej Suminski ccd2ebefd3 Removed OpenGL different drawing modes, as they were not used.
Removed DRAW_MODE_NORMAL, DRAW_MODE_PREPARE_EDGES, DRAW_MODE_DRAW_EDGES modes.
2013-04-10 09:09:48 +02:00
Lorenzo Marcantonio 4cbbce3aa6 Removed ugly usage of an extra layer slot for the layer count in gerbview
Fixed layer picker for exporting to pcbnew
Realigned pcb layer name with class BOARD
2013-04-10 09:03:19 +02:00
Lorenzo Marcantonio 66453e3d92 Fixed pad preview color 2013-04-09 21:20:21 +02:00
Lorenzo Marcantonio 42709330e0 Better strings for the translators (converted concatenations to formats) 2013-04-09 19:49:01 +02:00
Lorenzo Marcantonio 20eaf66d5b Hunted down hardcoded pixel size thresholds for drawing
Dynamic contrast for netname and pin numbers ('halo' text)
Handle netname drawing even on diagonal tracks
2013-04-09 19:16:53 +02:00
Lorenzo Marcantonio b525e3be55 Factored out text anchor drawing
More layer classification cleanup
2013-04-09 18:00:46 +02:00
Maciej Suminski 5fda7bf32f Netnames and pad numbers are displayed on pads (using GAL) 2013-04-09 16:12:20 +02:00
Maciej Suminski d400a25075 Modified CMakeLists.txt in order to compile Kicad with KICAD_GAL=ON for Windows
Added settings that allow to use M cross environment (http://mxe.cc) to crosscompile Kicad for Windows.
2013-04-09 16:12:18 +02:00
Maciej Suminski ef5693080f Fixed line style used for displaying texts. 2013-04-09 16:12:17 +02:00
Maciej Suminski 70769d5d46 Fixed drawing of circles in certain circumstances using OpenGL. 2013-04-09 16:12:16 +02:00
Lorenzo Marcantonio 0de48234bc Printf was missing a GetChars 2013-04-09 04:31:36 +02:00
Wayne Stambaugh 477069c063 Fix compile bug in ptree.cpp with wxWidgets 2.9.x and MinGW. 2013-04-08 20:16:53 -04:00
Dick Hollenbeck 6bf3d7cdc3 Implement "KiCad s-epression" support for boost::property_tree's ptree, the 8
bit string version of property_tree. The ram resident structure of the ptree is
mostly compatible with one created using the xml_parser from
boost::property_tree, with slight differences in the way atoms are stored. The
result is you can use Format() to convert from xml to s-expression, but not the
other way around. You can write a simple s-expression beautifier in just a few
lines of code.

The main value however is the s-expression parser, i.e. Scan(), which is an
alternative to crafting a custom recursive descent parser for a particular
grammar. The tipping point depends on whether you want to read only a small
portion of a much larger document. If so, then using the ptree will likely be a
"faster to code" route. Documentation on how to navigate a ptree can be found on
the boost website and there are a number of examples in the
pcbnew/eagle_plugin.cpp file in this project. Powerful path navigation support
makes it easy to extract a subset of a ptree.
2013-04-08 16:04:45 -05:00
Maciej Suminski 05e3ae645d Fixed distorted polygons' corner display 2013-04-08 11:01:49 +02:00
Maciej Suminski 664692b2e6 Added outline display mode for pads, vias & tracks 2013-04-08 10:54:31 +02:00
Maciej Suminski 850c0a8473 Added high contrast display mode using GAL rendering.
New methods in VIEW class: SetTopLayer(), EnableTopLayer() for managing the top layer display.
New method in PCB_RENDER_SETTINGS class: LoadDisplayOptions() for applying display settings like high-contrast, outline display of items, etc.
2013-04-08 10:50:47 +02:00
jean-pierre charras 7bb04c8f63 Make some messages translatable.
Make dialog footprint wizard list resizable.
2013-04-08 09:13:26 +02:00
Marco Mattila e04b6a04a6 Use the boundary of the object and not just the boundary of the text in SCH_TEXT hit testing. 2013-04-07 21:49:13 +03:00
Lorenzo Marcantonio b739b2b075 Support for a visibility flag and color selection to NPTH holes
(when disabled they are shown as standard holes, a lot less distracting
than the previous fixed yellow color)
2013-04-07 18:20:46 +02:00
Lorenzo Marcantonio 204d085b64 More cleanup on layer code usage
Better description for entities on right click menu and panel
Typo fixes and some comment reformats
2013-04-07 13:55:18 +02:00
Lorenzo Marcantonio 9ebb4afacc Removed arbitrary MAX_LAYER_ROWS limit (only used in one assertion, anyway) 2013-04-06 18:46:03 +02:00
Lorenzo Marcantonio 150cfebb59 Fixed some tab-induced disalignments
Charras beat me on fixing the include/sch_item_struct.h include issue from 4069
2013-04-06 14:28:02 +02:00
jean-pierre charras ca4a3651c0 Gerbview, layer manager: add option (popup menu) to always keep layers not visible but the active layer, even when the active layer is changed.
Pcbnew: fix swig warning for operator EDA_COLOR_T::++  (changed to function EDA_COLOR_T:: NextColor)
2013-04-06 14:01:53 +02:00
Lorenzo Marcantonio 74a57d4ea8 Cleanup of the eeschema 'layers' i.e. entitity colours. This also fixes
the spurious warning about stuff that couldn't be seen when changing
colours.
NOTE that the 'net name' layer is present and configurable but non used 
anywhere!
2013-04-06 07:01:48 +02:00
Lorenzo Marcantonio 00f0e27851 Factored layer utility functions: classification, layer flip and mask flip 2013-04-05 21:04:58 +02:00
Lorenzo Marcantonio db09deedf7 New color palette 2013-04-05 19:23:56 +02:00
Lorenzo Marcantonio 90f2e67ed8 Typo fix 2013-04-05 17:09:04 +02:00
Maciej Suminski 52ec277592 Fixed bug of displaying stroked rectangles on wrong layer depth. 2013-04-05 15:10:58 +02:00
Maciej Suminski 84239542b7 Fixed code formatting. 2013-04-05 15:10:31 +02:00
Lorenzo Marcantonio 63e987edd0 Removed the default generation of phantom text by the postscript plot driver.
It crashes Adobe's own implementation of postscript!
2013-04-05 10:55:46 +02:00
jean-pierre charras 752e4a4a58 All: change some texts and messages hard to translate, or not translatable (and some incorrect messages).
Pcbnew, layer manager: add option (popup menu) to always keep copper layers not visible but the active layer, even when the active layer is changed.
Usefull for multilayer ( more than 4 layers) PCBs.
2013-04-05 09:38:00 +02:00
Lorenzo Marcantonio d12a45923b More work on EDA_COLOR_T and layers.
In particular the new mechanism for handling extended color palettes is in place,
included renaming the ini keys and saving the color name instead of its index; this means better forward compatibility with palette changes.

Since ini keys are changed, colors will be reset
2013-04-04 23:35:01 +02:00
Maciej Suminski 6d088b4365 Added setting active layer in PAINTER's render settings according to the PCB layer widget. 2013-04-04 14:17:40 +02:00
Maciej Suminski ccc0fb06c9 Added missing CMakeModules (Cairo & GLEW). 2013-04-04 11:52:16 +02:00
Maciej Suminski 329eae1f74 Added GetSettings() method for obtaining current rendering settings used by PAINTER class. 2013-04-04 11:23:23 +02:00
Maciej Suminski 826d5a8954 Added GetMinDepth()/GetMaxDepth() methods (useful for displaying things on the top or on the bottom). 2013-04-04 11:21:35 +02:00
Maciej Suminski 18374e53a0 common/painter.cpp: Removed unnecessary header inclusion, added variable initialization
common/view/view.cpp: Added line to comply with coding style
2013-04-04 11:18:47 +02:00
jean-pierre charras a47d36e399 Pcbnew: fix Bug #1163201. Fix Bug #1162779. Fix incorrect comment in CMakeLists.txt. 2013-04-03 18:16:26 +02:00
Maciej Suminski 2e5bd2fad1 Added painting of DIMENSION & PCB_TARGET items. Removed unnecessary header inclusion. 2013-04-03 11:19:13 +02:00
Maciej Suminski 39086ffb3f Added loading layer visibility settings when loading a board. Minor code cleaning. 2013-04-03 11:19:08 +02:00
Lorenzo Marcantonio 41d254fb48 Meaningful tooltip for ECO layers 2013-04-02 19:11:42 +02:00
Lorenzo Marcantonio 23981977f3 Fixed idiotic merge error in busentry handling 2013-04-02 18:04:12 +02:00
Maciej Suminski 4e4776c370 Showing module's value and reference text on proper layers. 2013-04-02 11:03:15 +02:00
Maciej Suminski a97c9a1b96 Added possibility to show/hide layers using right sidebar (PCB layer widget) in the GAL rendered view. 2013-04-02 11:02:35 +02:00
Maciej Suminski e262b32198 Introduction of Graphics Abstraction Layer based rendering for pcbnew.
New classes:
    - VIEW - represents view that is seen by user, takes care of layer ordering & visibility and how it is displayed (which location, how much zoomed, etc.)
    - VIEW_ITEM - Base class for every item that can be displayed on VIEW (the biggest change is that now it may be necessary to override ViewBBox & ViewGetLayers method for derived classes).
    - EDA_DRAW_PANEL_GAL - Inherits after EDA_DRAW_PANEL, displays VIEW output, right now it is not editable (in opposite to usual EDA_DRAW_PANEL).
    - GAL/OPENGL_GAL/CAIRO_GAL - Base Graphics Abstraction Layer class + two different flavours (Cairo is not fully supported yet), that offers methods to draw primitives using different libraries.
    - WX_VIEW_CONTROLS - Controller for VIEW, handles user events, allows zooming, panning, etc.
    - PAINTER/PCB_PAINTER - Classes that uses GAL interface to draw items (as you may have already guessed - PCB_PAINTER is a class for drawing PCB specific object, PAINTER is an abstract class). Its methods are invoked by VIEW, when an item has to be drawn. To display a new type of item - you need to implement draw(ITEM_TYPE*) method that draws it using GAL methods.
    - STROKE_FONT - Implements stroke font drawing using GAL methods.
                          
Most important changes to Kicad original code:
    * EDA_ITEM now inherits from VIEW_ITEM, which is a base class for all drawable objects.
    * EDA_DRAW_FRAME contains both usual EDA_DRAW_PANEL and new EDA_DRAW_PANEL_GAL, that can be switched anytime.
    * There are some new layers for displaying multilayer pads, vias & pads holes (these are not shown yet on the right sidebar in pcbnew)
    * Display order of layers is different than in previous versions (if you are curious - you may check m_galLayerOrder@pcbnew/basepcbframe.cpp). Preserving usual order would result in not very natural display, such as showing silkscreen texts on the bottom.
    * Introduced new hotkey (Alt+F12) and new menu option (View->Switch canvas) for switching canvas during runtime.
    * Some of classes (mostly derived from BOARD_ITEM) now includes ViewBBox & ViewGetLayers methods.
    * Removed tools/class_painter.h, as now it is extended and included in source code.
                         
Build changes:
    * GAL-based rendering option is turned on by a new compilation CMake option KICAD_GAL.
    * When compiling with CMake option KICAD_GAL=ON, GLEW and Cairo libraries are required.
    * GAL-related code is compiled into a static library (common/libgal).
    * Build with KICAD_GAL=OFF should not need any new libraries and should come out as a standard version of Kicad
                            
Currently most of items in pcbnew can be displayed using OpenGL (to be done are DIMENSIONS and MARKERS).
More details about GAL can be found in: http://www.ohwr.org/attachments/1884/view-spec.pdf
2013-04-02 08:54:03 +02:00
jean-pierre charras f4d6430eb0 Eeschema: Minor changes in dialogs to ensure a better likeness between dialogs on Linux and Windows (mainly, remove some useless wxStaticBoxSizer in dialogs)
Update Clipper version.
2013-04-01 14:41:46 +02:00
Lorenzo Marcantonio e18404eea1 Removed unused width attribute from schematic line 2013-04-01 13:59:19 +02:00
jean-pierre charras fd1cd36f63 Minor changes in dialogs to ensure a better likeness between dialogs on Linux and Windows (mainly, remove some wxStaticBoxSizer in dialogs) 2013-04-01 13:42:09 +02:00
jean-pierre charras 92e0eb628c Minor changes in dialogs to ensure a better likeness between dialogs on Linux and Windows (mainly, remove some wxStaticBoxSizer in dialogs) 2013-04-01 12:50:01 +02:00
Lorenzo Marcantonio f37812f898 Refactoring: split in two the SCH_BUS_ENTRY class 2013-04-01 12:35:20 +02:00
Lorenzo Marcantonio 0dd413a711 Removed unused defines 2013-04-01 07:53:38 +02:00
Lorenzo Marcantonio cc0524a21a Converted the IS_BUS/IS_WIRE define to an enum 2013-04-01 07:47:44 +02:00
Lorenzo Marcantonio 8175163296 Better type safety to DANGLING_END_ITEM (SCH_ITEM* instead of void*) 2013-04-01 07:26:53 +02:00
Lorenzo Marcantonio c32f56ffaa Removed the long time dead SCH_POLYLINE class (schematic level polyline) 2013-03-31 22:40:22 +02:00
Lorenzo Marcantonio 86851d39a4 Hide the anchor for hidden text (suggested by Sergey Borshch) 2013-03-31 20:57:31 +02:00
Lorenzo Marcantonio 9fd79dfa91 Implemented the LAYER_NUM typedef (LAYER was already taken as a class name...) to represent a layer number. 2013-03-31 15:27:46 +02:00
jean-pierre charras 8e09679437 Minor cosmetic fixes (mainly on Linux) in dialogs. 2013-03-31 14:44:23 +02:00
Wayne Stambaugh 29bf40dc96 Fix build errors in layer mask changes. 2013-03-30 19:41:08 -04:00
Lorenzo Marcantonio 27ee815742 Minor flags and layer mask cleanup 2013-03-30 20:55:26 +01:00
Lorenzo Marcantonio c650c378c0 Fixed the logic for "do you want to make the footprint visible" requester
(meaning was inverted)
2013-03-30 18:49:58 +01:00
Lorenzo Marcantonio e0303a4558 - New typedef LAYER_MSK to encapsulate a layer bitmap
- Renamed ReturnMaskLayer to GetLayerMask (since it's a plain getter)
2013-03-30 18:24:04 +01:00
jean-pierre charras 1702ab3a00 pcbnew: fix some cosmetic issues mainly on Linux ( these issues could be very dependant on wxWidgets/Gtk versions) 2013-03-30 15:06:05 +01:00
jean-pierre charras 9c60e618c0 pcbnew: fix some cosmetic issues (could be very dependant on wxWidgets/Gtk versions) 2013-03-30 14:36:19 +01:00
jean-pierre charras 51291b0965 Fix many issues in config functions, mainly a rounding issue when a double is stored in wxConfig file (was stored only using 4 digits in mantissa)
Remove dead or obsolete code.
2013-03-30 10:28:59 +01:00
Wayne Stambaugh 45fc0125a7 Fix field position bug in edit component dialog when OK button cancelled due to empty field. 2013-03-29 20:06:08 -04:00
jean-pierre charras d0724de1de Fix rounding issue when a double is stored in a wxConfig file (wxWidgets 2.9.4 store only 4 digits in mantissa).
A new inline function ConfigBaseWriteDouble( config, key,  double_value )  is used instead of config->Write(  key, double_value ) which store 12 digits
2013-03-29 11:14:32 +01:00
Wayne Stambaugh bf56b2b35d Fix a GOST compile error. 2013-03-28 16:49:17 -04:00
Lorenzo Marcantonio 675f8d4a0b Typedef STATUS_FLAGS to encapsulate EDA_ITEM bitmapped flags 2013-03-28 20:12:46 +01:00
Wayne Stambaugh cd18ff1762 Fix X3D patch commit coding policy issues. 2013-03-28 12:51:22 -04:00
Maciej Suminski ef2c94069f Added template RTREE and class VIEW_RTREE (R-tree for fast spatial indexing of VIEW items; for future usage in GAL) 2013-03-28 17:48:29 +01:00
Maciej Suminski ad4bf38e7a Added class COLOR4D that contains color representation with 4 components (RGBA) (for future usage in GAL) 2013-03-28 17:42:15 +01:00
Maciej Suminski 7e0a44e4af Added template MATRIX3x3 for handling general 3x3 matrices (for future usage in GAL) 2013-03-28 17:38:33 +01:00
Maciej Suminski 30e1aaec26 Replacement of classes BOX2 and VECTOR2 with their extended versions
include/vector2d.h: Removed old version
include/math/math_util.h: rescale() for VECTOR2
include/math/vector2d.h: New version of VECTOR2
include/math/box2.h: New version of BOX2
common/drawframe.cpp: Refactorization of code, so it is compatible with new classes
include/plot_common.h, pcbnew/basepcbframe.cpp: Changed header inclusion path
CMakeLists.txt: Added definition to turn on WX_COMPATIBILITY for replacement classes
2013-03-28 17:30:09 +01:00
jean-pierre charras 3c037a3c31 Pcbnew, Module Editor: fix bug Bug #1161114 (pad not visible after undoing a move pad) 2013-03-28 10:40:29 +01:00
Lorenzo Marcantonio 4865a68fa0 Extremely trivial stuff (mostly cosmetics) 2013-03-28 07:40:19 +01:00
Andrey Fedorushkov 5a5b90984a all: new Russian GOST patch - author Konstantin Baranovskiy
pcbnew: fix print format in THROW_IO_ERROR
        fix properties file export_vrml.cpp
2013-03-28 00:38:20 +04:00
jean-pierre charras e90fc3a9b2 Better fix for bug #1155888 2013-03-27 20:36:10 +01:00
jean-pierre charras 5874ac0f6f Commit patch for x3d file reader (with minor changes). Commit other minor patches and fixes 2013-03-27 19:34:23 +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
Dick Hollenbeck 0cbe14c12e reference a test program in a comment 2013-03-27 09:01:50 -05:00
Dick Hollenbeck 50682ef2dc remove interrim fix, no longer needed 2013-03-27 08:33:24 -05:00
Lorenzo Marcantonio ccd0ab78f3 Removed unused define TEXT_VTAB_HEIGHT 2013-03-26 21:02:23 +01:00
jean-pierre charras cc46ee0ec9 Pcbnew: Fix Bug #1160396 2013-03-26 19:15:30 +01:00
Wayne Stambaugh a6232e2c92 Fix field text position access bug in Eeschema. (fixes lp:1160214) 2013-03-26 13:25:18 -04:00
jean-pierre charras f824c83842 Pcbnew: fix an issue when texts in footprints have a size = 60 mils (default size for texts). After saving and reading the .kicad_pcb file, the size was not correct. 2013-03-26 18:05:47 +01:00
jean-pierre charras 00bdc80087 Pcbnew: Fix a collision name between 2 methods: EDA_ITEM::GetFlags() and ZONE_CONTAINER::GetFlags(), which creates a very strange behavior when creating/edition zones.
ZONE_CONTAINER::GetFlags() is now named  ZONE_CONTAINER::GetLocalFlags().
2013-03-26 10:58:40 +01:00
jean-pierre charras 8cb20938f4 Pcbnew: fix issue in zone keepout dialog: layers not displayed on Linux, and minor changes 2013-03-25 20:11:22 +01:00
jean-pierre charras 019d1364d3 Pcbnew: fix issue in zone keepout dialog: layers not displayed on Linux, and minor changes 2013-03-25 19:48:07 +01:00
Wayne Stambaugh db5d90ce9f Fix SCH_FIELD get reference designator text bug. (fixes lp:1159401) 2013-03-25 13:09:55 -04:00
jean-pierre charras 8d61cd0e5b Pcbnew: fix issue in zone keepout dialog: layers not displayed on Linux 2013-03-25 18:02:29 +01:00
jean-pierre charras 372ce6595a Very minor changes in dialog zones. 2013-03-25 14:37:48 +01:00
Andrey Fedorushkov 2b9297020b eeschema: fix build when KICAD_GOST ON (insert in bzr4019) 2013-03-24 00:37:48 +04:00
jean-pierre charras 21d1402c03 Pcbnew, ModEdit: fix issue when setting anchor position, and minor code cleaning. 2013-03-23 14:30:00 +01:00
Wayne Stambaugh 25e7abec0d Encapsulation, bug, context menu string, and, coding policy fixes.
* Complete encapsulation of the ZONE_CONTAINER class.
* Fixed a bug in the EDA_TEXT::Format() default effects behavior due to
  improper conversion to internal units and missing test for default
  thickness.
* Improved grammar of some Pcbnew context menu strings.
* Moved some more cleverly hidden BOARD object methods into class_board.cpp.
* Lots of coding policy and documentation fixes.
2013-03-20 10:50:12 -04:00
Dick Hollenbeck 25b65b2e3b Consistent with my email posting from a day or two ago, remove the translated
standard layer name support from BOARD::GetLayerName().  This function evolved
in a contorted direction over time, and was being asked to return one of 3
different kinds of layer names, even though it only took a boolean to control
that choice.  

Users are better served by forcing them to get to know the concise new 
English Standard layer names.  This is because these concise names show up
in the "pretty" footprint/module files as the standard representation of
both feature and copper layers.

Change the name of BOARD::GetDefaultLayerName() to GetStandardLayerName().
Drop boolean argument to both BOARD::GetStandardLayerName() and 
BOARD::GetLayerName().
2013-03-19 23:46:32 -05:00
Carl Poirier 8421cacef4 Add library column to component and module select dialog. 2013-03-18 21:25:19 -04: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
Miguel Angel Ajo da9e6b1679 checkcoding.py refactor from Edwin van den Oetelaar, some extra refactorings by me, improvement suggestions from Carl Poirier 2013-03-18 12:22:31 +01:00
jean-pierre charras 3e8bd5592b Pcbnew: fix Bug #1156193 . Fix compil issues when KICAD_SCRIPTING_WXPYTHON is not enabled and KICAD_SCRIPTING is enabled 2013-03-17 20:04:42 +01:00
Miguel Angel Ajo f227383341 ReloadPlugins() python function, and mtime stored in the KICAD_PLUGINS dictionary 2013-03-17 03:03:18 +01:00
Miguel Angel Ajo 1cf52baaa0 New register() method in plugins, used by the loader to handle runtime plugin reloading 2013-03-17 02:18:09 +01:00
Miguel Angel Ajo 31a693cb8d Refactoring python to wxArrayString, and better exception error reporting 2013-03-17 02:14:46 +01:00
Miguel Angel Ajo f83a200e5e Fix wxString.Print call to be compatible with wx2.8, thanks to Барановский Константин and Edwin van den Oetelaar for submiting same patch, same hour, are you twins? ;) 2013-03-17 00:51:43 +01:00
jean-pierre charras b992feeaf6 Pcbnew: designe rule dialog: fix incorect size of track list grid 2013-03-16 12:12:18 +01:00
Miguel Angel Ajo 9a8baa00f2 Allow plugins to be reloaded without closing/opening pcbnew, next step is plugin editor, just a few lines away... 2013-03-16 04:27:48 +01:00
Miguel Angel Ajo ecc6a69f4f Also check coding style of new files, not only modified ones 2013-03-16 00:28:35 +01:00
Miguel Angel Ajo 6c614e2996 tool for checking coding style 2013-03-16 00:21:53 +01:00
Miguel Angel Ajo 155ea57c36 LOCALE_IO toggle implementation for locale switches on scripting; code cleanups to comply with kicad coding style policy 2013-03-15 17:35:24 +01:00
Miguel Angel Ajo cefd3cd5e2 Fixed wxGrid re-creation and missing icon for dialog 2013-03-15 15:50:54 +01:00
Miguel Angel Ajo df93154dee wxT added to the locales fix, message box on python exceptions inside wizard, added some missing copyright notices 2013-03-15 14:27:18 +01:00
Miguel Angel Ajo 1477210b67 Fix for locales that set , as a decimal point (which is incompatible with python scripting), also fixed the m_Reference encapsulation in module to Reference() 2013-03-15 01:56:36 +01:00
Dick Hollenbeck 76e21c28a4 EAGLE_PLUGIN now establishes (trace_min), (via_min_size), (via_min_drill), and Default Net's (clearance)
by groking the eagle *.brd info.  This makes it more probable that fewer DRC errors come about on first 
DRC attempt.
2013-03-14 17:54:47 -05:00
jean-pierre charras ea5a03f93c 3D viewer: fix very minor issues (better rendering of 3D view). 2013-03-14 17:11:05 +01:00
jean-pierre charras 155a53dc57 Very minor fixes, mainly for the stable version 2013-03-13 20:15:09 +01:00
jean-pierre charras 53e98dede8 Last (minor) fixes for the stable version 2013-03-13 20:06:46 +01:00
Wayne Stambaugh 42d7bf6c8e Pcbnew encapsulation and code cleaning.
* Encapsulate most of the MODULE class.
* Start encapsulating the DIMENSION class.
* Lay some groundwork for EDA_TEXT encapsulation.
* Move cleverly hidden MODULE functions into class_module.cpp.
* Use std::swap to exchange TEXTE_PCB values for undo/redo.
* Remove unused members from MODULE class.
* The usual coding policy and documentation fixes.
2013-03-13 14:53:58 -04:00
Dick Hollenbeck 8287775bac EAGLE_PLUGIN cu layer map fix broke footprint library loading 2013-03-13 11:38:54 -05:00
Dick Hollenbeck 22c85e78ff EAGLE_PLUGIN cu layer map fix 2013-03-13 11:17:16 -05:00
jean-pierre charras 1be0b66d53 Pcbnew: fix a bug in autoplac.cpp 2013-03-12 17:37:41 +01:00
jean-pierre charras c8ed3280f3 Pcbnew: Fix many minor issues in print dialog, mainly in modedit. 2013-03-12 16:17:44 +01:00
Miguel Angel Ajo 742e1a7e44 Reverted back the ( i ) parameters for python, applied the PyGILState_Ensure from Dick into his PyLOCK class 2013-03-12 01:37:45 +01:00
jean-pierre charras 93a8e7b395 Pcbnew: print dialog: code cleanup and bug fixes (added some fixes from Sergey A. Borshch) 2013-03-11 20:30:58 +01:00
Dick Hollenbeck 2a2a530c62 improvements to python's GIL acquisition and release, but not done yet, since I think the GIL needs to be acquired even when not involving wxPython. 2013-03-11 03:09:48 -05:00
jean-pierre charras a88d067abf Kicad manager: fix bug: .kicad_pcb files not saved in zip file 2013-03-10 20:55:21 +01:00
jean-pierre charras 9d40727b4c Pcbnew: fix issues: Ensure pads type connector have a drill size= 0, like SMD pads. Ensure keepout zones have no net. 2013-03-10 14:59:47 +01:00
Miguel Angel Ajo ccd9500bfb Project templates now can find the system templates from KICAD environment variable 2013-03-10 02:35:24 +01:00
jean-pierre charras 5fc382df85 Pcbnew: Partial merge from pcad2kicad (from Alexander Lunev). Fix an old bug related to pads with offset: sometimes the connection to a zone was not detected. 2013-03-09 20:36:31 +01:00
jean-pierre charras 8306f4c65c Pcbnew: fix bug in export vrml (bad Z position of 3D shapes). Very minor code cleaning. 2013-03-08 08:29:30 +01:00
Wayne Stambaugh 2ab86e7400 Documentation and coding policy fixes.
* Fix all Doxygen warnings except polygon files.
* Add footprint library table tasks to TODO.txt.
* Add definition to drag.h to prevent nesting.
* Coding policy fixes.
2013-03-07 12:12:59 -05:00
Baranovskiy Konstantin 9a131706d7 Width factor for DXF plotting text used an inverted aspect ratio. 2013-03-07 08:15:35 -06:00
jean-pierre charras 1ae31edb9a Gerbview: Minor fixes 2013-03-06 20:32:59 +01:00
jean-pierre charras 46f106b6cd Pcbnew: fix Bug #1148785 (pcbnew crashes when using only one layer in autorouter ) , and a minor bug in dialog cleanup. 2013-03-06 10:04:27 +01:00
jean-pierre charras c1fbc8ef8b Pcbnew, module edit dialogs: fix some "cosmetic" issues. 2013-03-04 20:59:12 +01:00
jean-pierre charras 88e50d9da4 Refinements 2013-03-04 20:31:09 +01:00
jean-pierre charras 248343c0a3 Refinements 2013-03-04 20:15:23 +01:00
jean-pierre charras c1f6576f07 Dialog edit module: remove some wxStaticBoxSizer sizers. 2013-03-04 19:49:32 +01:00
jean-pierre charras 9f3cea6755 Still fix very minor issues in dialog_edit_module_for_BoardEditor.cpp 2013-03-04 17:57:24 +01:00
jean-pierre charras 7ff61616dc Still fix minor issues in dialog_edit_module_for_BoardEditor.cpp (noticeable only for non English users) 2013-03-04 17:39:08 +01:00
Wayne Stambaugh fa869a9690 Minor Pcbnew dialog spacing and consistency fixes. (fixes lp:1143465)
* Fix spacing and consistency issues and debug warning due to improper flex
  grid sizer in module editor module properties dialog.
* Fix spacing and consistency issues in Pcbnew module properties dialog.
* Fix spelling error in DRC dialog message box text.
2013-03-04 11:04:53 -05:00
jean-pierre charras fa73d54456 Pcbnew: fix strange things in module edit dialogs. 2013-03-04 13:08:35 +01:00
Andrey Fedorushkov 02b5b477da pcbnew: fix build in linux gcc-4.5.2 2013-03-02 20:32:05 +04:00
jean-pierre charras e4f72171f5 Eeschema: fix broken mirroring for texts and labels in block mirror X and Y (this fixes Bug #1135505)
Pcbnew: add in module popup menu an option to edit the footprint in Modedit (like in Eeschema for components)
minor icons enhancements.
2013-03-01 20:59:29 +01:00
Wayne Stambaugh 35bec26ff3 Update coding policy to remove support for MSVC. 2013-03-01 08:32:55 -05:00
Dick Hollenbeck 807ac4e3e5 Debug build fix 2013-02-28 22:20:29 -06:00
Dick Hollenbeck 43eaba0bb0 parse *.kicad_pcb files with numeric net_names 2013-02-28 10:17:24 -06:00
Dick Hollenbeck 9191f28aeb specctra_export to handle Edge Cuts graphics in modules 2013-02-27 09:54:29 -06:00
jean-pierre charras a9fbce5c72 CMakeLists.txt: use elseif token instead of elif which create strange issues with some cmake versions.
Fix minor issues in nsis config files
2013-02-27 13:46:40 +01:00
jean-pierre charras 3313b34a01 CMakeLists.txt: use elseif token instead of elif which create issues with some cmake version.
Fix minor issues in nsis config files
2013-02-27 08:19:42 +01:00
jean-pierre charras 7a5386a1a1 Minor fixes and cleanup 2013-02-26 12:25:30 +01:00
jean-pierre charras 4343eb5b8d Fix Bug #1132416. Minor update in templates. 2013-02-24 18:31:18 +01:00
Baranoviskiy Konstantin af433f8031 Remove redundant Eeschema plot submenu on platforms that do not support plot to clipboard. 2013-02-23 15:08:28 -05:00
Wayne Stambaugh facde96ec2 Add build option to use footprint library table. 2013-02-23 14:30:43 -05:00
Anton Blanchard cd664e8b9b Fixes segfault in Pcbnew module editor when clicking delete tool where there is no object. 2013-02-22 18:29:44 -05:00
Wayne Stambaugh 348b7de4ab Fix Eeschema plot dialog escape key handling bug on some Linux distros. 2013-02-22 16:59:53 -05:00
Wayne Stambaugh 0e4bb20e3c Minor dialog and footprint ID class fixes.
* Make Pcbnew net list dialog honor escape key on Linux.
* Make Pcbnew swap layers dialog honor escape key on Linux.
* Layout and UI policy fixes for Pcbnew swap layer and net list dialogs.
* Layout and UI policy fixes for Eeschema plot dialog.
* Rename fpip.h to fpid.h.
* Fix FPID class compiler errors.
* Restore fpid.cpp to Pcbnew static library source list.
2013-02-22 15:03:00 -05:00
Dick Hollenbeck 74540cb49a wxID_CANCEL, 5 pixel border around sizers, resizable search combobox, dialog_shim usage on a few dialogs 2013-02-22 07:47:35 -06:00
jean-pierre charras 41c5e68e6c Pcbnew: Very minor fix in plot dialog. 2013-02-22 09:04:15 +01:00
Baranovskiy Konstantin e37372f45f Eeschema border and title block DXF plot color bug fix. 2013-02-21 18:45:46 -05:00
jean-pierre charras 72e845b2f1 Pcbnew: plot Dialog: add a popup menu (try mouse right click in plot dialog) to selected/unselect groups of layers to plot.
All: For new zoom centering option: use Shift+Ctrl key instead of Alt key to select the new zoom centering, because Alt key has a special function under Windows.
2 very minor other changes.
2013-02-21 21:53:50 +01:00
Baranovskiy Konstantin 55526a100a DXF plot layer color bug fix. (fixes lp:1126403) 2013-02-20 15:26:34 -05:00
jean-pierre charras ee2ed120bd Eeschema: Fix Bug #1130262 (Inverted pins are plotted with erroneous line width) 2013-02-20 12:46:38 +01:00
Wayne Stambaugh 0564cbc70c Minor dialog spacing, grammar, and sizer fixes. 2013-02-19 14:43:48 -05:00
jean-pierre charras 77945c4eb8 Pcbnew: Export vrml: fix an issue for 3D shapes having a local offset defined: the local offset was not correctly scaled. 2013-02-19 10:21:55 +01:00
Wayne Stambaugh 8cd77e78f9 Minor dialog spacing, grammar, and UI policy fixes. 2013-02-18 15:14:53 -05:00
Emmeran 13972e0678 Adds zooming method for zooming relative to the crosshair instead of centering
the crosshair after zooming.

This method is only used when the ALT key is held while using the mousewheel or
if it's permanently enabled in the options dialog next to the middle mouse
button panning option.
2013-02-18 09:57:39 -06:00
Dick Hollenbeck e6df9921b1 fp lib table work 2013-02-15 19:09:53 -06:00
Dick Hollenbeck f77c10ac96 typos and tooltip 2013-02-15 18:13:35 -06:00
Jacobo Aragunde Perez af9ee9f4e7 Plot dxf format: fix issue for some non latin1 chars. 2013-02-15 12:53:16 +01:00
Antia Puentes a379e5d67c Commit patch from Antia Puentes relative to bug Bug #1125047 : PcbNew: Insert a footprint in the board, from the Library Browser, by double clicking on it, with a change to avoid the button release event (from the double click) to be seen by the main window. 2013-02-14 22:20:56 +01:00
marco. 34f7cbc6f9 MacOSX: now autoplace is drawn correctly 2013-02-14 20:57:19 +01:00
marco. 3217bb59a7 MacOSX: Now Arcs are shown in edit mode 2013-02-14 20:56:45 +01:00
Wayne Stambaugh 8289899df8 Add CheckCXXSymbolExists.cmake to fix configure bug using CMake versions prior to 2.8.6. (fixes lp:1124854) 2013-02-14 13:39:36 -05:00
jean-pierre charras 0a34f97624 Remove outdated (and/or erroneous) documentation. 2013-02-14 18:57:12 +01:00
Dick Hollenbeck 49bca46a5c -fPIC only for non-MINGW. See http://mingw.5.n7.nabble.com/Option-fPIC-not-supported-td18480.html 2013-02-14 09:31:56 -06:00
Dick Hollenbeck fdc8a1345d typo 2013-02-14 08:50:32 -06:00
Dick Hollenbeck e4d09b96bc add -fPIC for all builds, even cross comiling to Windows from Linux, even non Debug and Release builds 2013-02-14 07:12:54 -06:00
jean-pierre charras 89f590a1fc Pcbnew: Pcad2kicad: remove dead code. 2013-02-13 18:19:46 +01:00
Antia Puentes fa0a51411a Eeschema: force file ext in"Sheet Save As" command (Bug #1122212 ) 2013-02-13 18:18:23 +01:00
Wayne Stambaugh 330b8bff30 Fix bug caused by setting default drill size in D_PAD (fixes lp:1123392).
* Add check for pad type and force drill size to zero if pad is surface
  mount in PCB_PARSER.
* Modify the D_PAD SetAttribute method to clear drill size if pad type is
  set to surface mount.
2013-02-12 20:01:22 -05:00
Dick Hollenbeck e1addadb4d fix compiler warnings on gcc 4.6.3, Debug build 2013-02-12 11:41:13 -06:00
Emmeran 6a54a198ca converted linux to dos file endings for wxfb files 2013-02-12 05:30:28 +01:00
Emmeran 95213372fe moved changes to dialogs into fbp files 2013-02-12 05:18:22 +01:00
Emmeran 226b877ab9 tabs converted to spaces except wxstruct.h 2013-02-12 04:56:46 +01:00
Wayne Stambaugh 001afa4960 Pcbnew pad properties dialog assertion and layout fixes.
* Fixed spacing issue in pad properties dialog.
* Remove wxSHAPED flag from pad drawing panel to prevent assertion in
  wxSizer.
* Used sane default pad size and drill size settings to prevent wxRound
  assertions.
* Add license to class_board_design_settings.cpp.
2013-02-11 20:07:04 -05:00
jean-pierre charras e206a1b4c5 Eeschema: All fixed fields are now always saved in libraries. Therefore the footprint field can be set in lib (size, visibility) and imported in schematic with its predefined attributes, even if the footprint text is not set. 2013-02-11 19:50:55 +01:00
Wayne Stambaugh 4d465ec8a0 Configuration and compile documentation improvements.
* Improve the stable and testing build version option logic.
* Use CMake FindPythonInterp to configure the Python interpreter.
* Use Python interpreter to determine the system Python module install
  path if not already defined on the command line.
* Add header symbol checks for asinh(), acosh(), and atanh().
* Add test source to check for isinf() which can be defined as a C++template.
* Replace conditional compile on windows systems for aXXXh() with CMake
  configuration tests.
* A few minor MSVC compile fixes.
* Fix incorrect python environment string in fixswigimports.py
* Create a separate document for KiCad CMake build options.
* Create a separate how to compile KiCad on Windows document.
2013-02-10 19:41:49 -05:00
jean-pierre charras 00fafe7d58 eeschema, libedit l fix a bug in lib_arc.cpp which creates incorrect arc start and arc end parameters after rotation or mirror.
the Bug #1121079 is due to this bug, but Bug #1121079 itself cannot be fixed because this is the data inside the lib which is broken.
2013-02-10 19:02:45 +01:00
jean-pierre charras 93a5b4a07f Upgrade boost to version 1.53.0 and clipper to 5.03 2013-02-10 14:52:01 +01:00
jean-pierre charras 42c2399af7 Pcbnew: Try to find a better workaround for zone fiill bug (crash or bad fil areasl in very rare cases).
pcbnew+Eeschema: Fix a very minor bug: filename not displayed in frame reference.
2013-02-09 21:03:20 +01:00
Wayne Stambaugh 3af054c702 Improve Eeschema find dialog behavior.
* Remove ignore mouse events before creating find dialog for true mode-less
  behavior as was originally intended.
2013-02-07 15:36:35 -05:00
Wayne Stambaugh 6582cea862 Improve zone context menu descriptions, fixes lp:1116483 2013-02-07 12:56:41 -05:00
jean-pierre charras f2ebfdf34e Pcbnew: rework on connection calculation: fix an issue for "composite" pads (complex pad build by association of some basic pads):
sometimes connections where not seen.
2013-02-07 18:40:50 +01:00
Jacobo Aragunde Perez da757938e6 Commit patch for bug 1116059 (Inconsistency between confirmation dialogs) 2013-02-07 18:35:37 +01:00
Dick Hollenbeck eed97c549d plotter output file being left open fix. 2013-02-06 09:21:37 -06:00
jean-pierre charras d958f92ccc Kicad manager: fix a minor issue noticeable on Kubuntu 12.04 (bad size of buttons area) 2013-02-06 14:15:40 +01:00
jean-pierre charras 410644343d Eeschema, Libedit: fixes color artifacts when moving/placing a pin.
Very minor other fixes.
2013-02-06 12:54:51 +01:00
jean-pierre charras 02bacd668e Very minor changes (tooltips update, to synchronize them with the doc update) 2013-02-04 09:52:56 +01:00
Andreas Beutling 7ceb3d11f2 fix some errors in common_plotHPGL_functions.cpp 2013-02-03 18:53:48 -06:00
Emmeran 0bdf5bac72 added option to allow zooming around the crosshair instead of the center; can be enabled via options or by holding alt while using the mousewheel 2013-02-02 20:10:48 +01:00
jean-pierre charras 619125f9ab Changes for CvPcb to eeschema stuff file: the stuff file generation from CvPcb is removed. Eeschema now imports footprints names from the .cmp usual file created by CvPcb or by Pcbnew (Why to use 2 file formats for the same thing?) .
Pcbnew: in netlist dialog: The user now can choose between the netlist and the .cmp file to import footprints names.
Therfore no need to delete the .cmp file when exists to use only the netlist.
This is useful for users who use CvPcb only once to fill footprints fields in schematic, and after edit/modify the footprints fields in schematic outside CvPcb.
2013-02-02 18:39:59 +01:00
Jacobo Aragunde Perez 638decafae Commit fixes for bugs #1108773 and #1110651 and a bug fix improvement for #1101718 and #1102381. 2013-02-01 08:58:49 +01:00
Jacobo Aragunde Perez 85562b45e8 Commit patch to fix bug 1108838 (+ fix a very minor fix in eeschema, when loading a new component) 2013-01-30 17:15:45 +01:00
jean-pierre charras eacc8b93f0 Pcbnew: Workaround to fix a crash when filling zone in Pcbnew nanometers (see Bug #1106451 ). Also happens with one of my boards.
Could be a bug inside boost::polygon. This is a workaround, because one never knows if this kind of bug is fixed.
However it fixes this issue for the 2 boards.
2013-01-27 14:54:43 +01:00
jean-pierre charras 8fb8b4335a Fix bug in TestSegmentHit( wxPoint aRefPoint, wxPoint aStart, wxPoint aEnd, int aDist ), when aDist = 0. (fix Bug #1106744 ) 2013-01-27 11:06:09 +01:00
jean-pierre charras 78a8be0e8e Pcbnew: fix a very old bug in DRC, pad to pad drc tests: sometimes a test between a rectangular pad and an oval pad was skipped.
Segment Hit Test: enhanced detection near segment ends (noticeable for instance when clicking on short tracks in Pcbnew.
Remove duplicate code about segment hit test.
remove unused file.
2013-01-26 18:49:48 +01:00
jean-pierre charras 5d5a50dde9 Eeschema: fix a bug which crashes Eeschema (when a label is being created, and its type is changed by popup menu, for instance to a text, before it was put on schematic)
remove unused file and minor coding style fix
2013-01-25 18:29:54 +01:00
acobo Aragunde Perez 2bea1c677c Eeschema: Add "append schematic" feature. Fix bug 1101718 <Empty plot filename> 2013-01-24 19:46:42 +01:00
Jacobo Aragunde Perez a641ebb344 Eeschema: Add "append schematic" feature. Fix bug 1101718 <Empty plot filename> 2013-01-24 18:46:37 +01:00
Dick Hollenbeck 72690e769c fix intermittent build problem involving out of sequence python invocation 2013-01-23 10:35:40 -06:00
Dick Hollenbeck 017fe9c4d4 fix compiler warnings with gcc 4.6.3 on x86_64 linux 2013-01-23 10:13:42 -06:00
Jacobo Aragunde Perez 03ffc93786 Eeschema: hotkey enhancement while moving a block or an item. 2013-01-21 21:16:04 +01:00
jean-pierre charras 9ededca9d7 Gerbview: Fix a minor but annoying issue in gerbview config: colors setup is broken when running a testing version after an old gerbview version (due to a bug of this old version which breaks the color config) 2013-01-21 21:02:07 +01:00
Jacobo Aragunde Perez 2f3c5e7a1e Eeschema: fix Bug #1102381 <eeschema: -cache.lib file not created the first time you save a schematic> 2013-01-21 20:58:02 +01:00
Dick Hollenbeck 273244a196 merge in branch fp-lib-table 2013-01-20 21:27:01 -06:00
Dick Hollenbeck 8fd0c322cd more fp lib table work 2013-01-20 21:12:16 -06: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 7b8c89149b Pcbnew: Fix Bug #1097345 <module editor "change body item width (current)" does nothing.> 2013-01-19 13:58:54 +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
Jacobo Aragunde Perez 5aaa55c898 Add patch from Jacobo Aragunde Perez <Log of opened and closed applications in KiCad launcher> 2013-01-18 11:44:35 +01:00
Jacobo Aragunde Perez 295b5b5dea Add patch from Jacobo Aragunde Perez <Log of opened and closed applications in KiCad launcher> 2013-01-18 11:42:23 +01:00
Dick Hollenbeck 07273ac439 fix goof-ed preprocessor test 2013-01-18 00:13:31 -06:00
Dick Hollenbeck 00d865c173 Enhance DIALOG_SHIM to optionally call SetFocus() after the derived class's constructor has been called, for wx 2.8 and wxGTK 2013-01-18 00:04:25 -06:00
jean-pierre charras 24f73eb87c Pcbnew: fix a minor bug: shape 3D filename not displayed in msg panel when clicking on a footprint. 2013-01-17 18:34:03 +01:00
jean-pierre charras 968a0c9204 Scripting: fix erroneous extension for S exp board files, which prevent to open a .kicad_pcb file from a python script
Make scripting version compilable on platforms where the python executable is not python2:
Just define it by -DPYTHON_EXECUTABLE=<python executable filename> when running cmake (there was already a partial fix for this)
2013-01-16 20:15:56 +01:00
jean-pierre charras cfa75bb828 Scripting: fix erroneous extension for Sexp board files
Make scripting version compilable on platforms where the python executable is not python2 (define it by -DPYTHON_EXECUTABLE=<python executable filename>)
2013-01-16 13:38:30 +01:00
jean-pierre charras de78b60dda Pcbnew: store in configuration the default line width (now in mm), under a new keyword, to avoid a strange behavior of pcbnew in decimils version (old pcbnew versions), after running pcbnew in nanometers. 2013-01-15 10:31:11 +01:00
jean-pierre charras 8d22086097 AUTHORS.txt: add some contributor names (I certainly forgot some other contributors, and I apologize).
Demos: convert .brd files to .kicad_pcb files and fix 2 broken files
2013-01-14 13:16:23 +01:00
jean-pierre charras a864ab6f9e Kicad manager: fix a recent bug: project tree not updated when kicad is launched by a command line with a project name to open.
Pcbnew: export vrml:
* move dialog functions to a new file: dialog_export_vrml.cpp (to be consistent with other dialogs).
* fix some coding style issues
* added patch from Cirilo Bernardo.
2013-01-13 19:41:15 +01:00
jean-pierre charras 7819efacf6 Kicad manager: fix a recent bug: project tree not updated when kicad is launched by a command line with a project name to open.
pcbnew: export vrml:
* move dialog functions in a new file: dialog_export_vrml.cpp.
* fix coding style issues
* patch add from cirilo Bernardo.
2013-01-13 17:55:07 +01:00
Dick Hollenbeck 8d5479ca1c pcbnew/CMakeLists.txt formatting and librt fix 2013-01-12 18:34:16 -06:00
Heikki Pulkkinen 3e18fa422c protect data in class_track.h, switch to using member accessors 2013-01-12 18:04:00 -06: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 5c2efcbf3e 3D viewer: allows import of models created with openscad and convertedvia meshconv to wrl (thanks to Georg Gast <georg@schorsch-tech.de>)
Export VRML: fix scaling issue for pcbnew - nanometers.
2013-01-12 11:35:08 +01:00
Miguel Angel Ajo 0fedf6b3eb MacOSX compilation fixes 2013-01-10 23:10:05 +01:00
jean-pierre charras 4cb0cf6402 Commit missing files. 2013-01-10 13:20:16 +01:00
jean-pierre charras ccfd2369b9 EDA_LIST_DIALOG: add a filter option to select names to display is list, from a kamil zorychta's patch <kamil.zorychta@gmail.com>
Use wxFormBuilder to create EDA_LIST_DIALOG_BASE, like other dialogs.
Minor code cleanup (remove unused functions and coding style fixes) and minor bug fixes.
2013-01-10 13:18:43 +01:00
Wayne Stambaugh 8a5ea7ec0d Pcbnew BOARD object encapsulation improvements. 2013-01-09 13:52:44 -05:00
jean-pierre charras 8b6d5cb42f Pcbnew: Enhancement in connections calculations:
Until now, 2 tracks were seen as connected only if one end of the first track is *exactly* on one end of the other track.
Now the 2 ends are seen as connected when they are "near" i.e. the distance between the 2 ends is < track width/2
2013-01-08 18:58:06 +01:00
jean-pierre charras 518fdb93e5 Pcbnew: Fix unwanted selection clarification popmenu in board editor after double clicking on a DRC Unconnected error
(For DRC clearance error, it was fixed  in bzr 3838, but forgotten for DRC Unconnected error)
2013-01-07 21:52:15 +01:00
jean-pierre charras 0cb7b84880 Pcbnew: Fix Bug #1096766 ( Can't create filled zones after keepout zones) 2013-01-07 08:46:01 +01:00
jean-pierre charras 2dd5bcea2f Gerbview: add option to show negative objects. 2013-01-06 14:31:49 +01:00
Dick Hollenbeck f1af605d6c when linking a DSO, require all symbols to be resolved 2013-01-04 17:02:10 -06:00
jean-pierre charras 840e38de59 Pcbnew: fix link issue (undefined Read_GPCB_Descr symbol) in scripting mode. 2013-01-04 23:00:05 +01:00
Jacobo Aragunde Perez 3821472ad8 Prevent Pcbnew from opening the same file twice. 2013-01-04 18:47:59 +01:00
Jacobo Aragunde Perez f914cd0dec Eeschema:commit patch <Prevent Eeschema from opening the same file twice> with a small fix for windows. 2013-01-04 13:06:50 +01:00
Wayne Stambaugh 16402d8180 Remove unused Geda footprint import source code file. 2013-01-03 16:51:26 -05:00
Wayne Stambaugh ade6ec3256 Doxygen warning fixes. 2013-01-03 15:21:40 -05:00
jean-pierre charras 7dbcbf6d15 Kicad manager: cleanup code, remove dead or not working code. Fix minor isssues 2013-01-03 20:25:12 +01:00
Dick Hollenbeck 7ae228d70e add eagle *.lbr lib path extension for future use 2013-01-03 10:33:22 -06:00
jean-pierre charras ab55b61970 Kicad: Fix a compil issue under Linux, and minor code cleaning, about wxFileWatcher 2013-01-02 23:12:16 +01:00
jean-pierre charras 5436798e51 Kicad: Fix compil issue under Linux, and minor code cleaning, about wxFileWatcher 2013-01-02 22:49:56 +01:00
jean-pierre charras 2fc643de36 Eeschema, Libedit: Fix potential issues when using some hot keys. 2013-01-02 09:34:46 +01:00
jean-pierre charras 9c62d2dfb7 Eeschema, Libedit: fix potential bugs. 2013-01-02 08:55:48 +01:00
Dick Hollenbeck 45bd443184 1) Implement EAGLE_PLUGIN::FootprintLoad(), FootprintEnumerate(), and IsFootprintWritable().
2) Add PCAD_PLUGIN to _pcbnew.so for scripting, fixing a linking bug.
2013-01-01 22:05:48 -06:00
jean-pierre charras dd3b684ce6 Eeschema: fix Bug #1095005 2013-01-01 21:52:37 +01:00
Brian Sidebotham aaf6cce614 switch a template's board format to kicad_pcb format 2013-01-01 14:48:32 -06:00
Brian Sidebotham 08f8703898 Fixes a bug in the template file copying mechanism. The previous code failed to honour sub-directorys and flattened the whole tree whilst copying files.
I have fixed this so that sub-directories that are not the meta directory will get copied verbatim into the new project directory.
2013-01-01 14:39:25 -06:00
jean-pierre charras 8c75adb8c1 Kicad manager:
* Use the recent wxFileSystemWatcher to automatically update the tree project when a file is created/deleted/renamed in the project directory
(and if the file type is usually shown by the manager.)
Needs wxWidgets 2.9.4 or more recent.
* Also code cleanup, dead code or useless code removed.
2013-01-01 16:57:48 +01:00
jean-pierre charras 6f72aaecca Kicad: files watcher: fix Linux specific issues 2013-01-01 15:06:49 +01:00
jean-pierre charras 45b01a5c9c Kicad manager: first use of wxFileSystemWatcher (only with wxWidgets >= 2.9.2) to monitor files list. 2012-12-31 09:12:29 +01:00
Wayne Stambaugh 6789e62210 Fix Pcbnew s-expr file parser bug. 2012-12-30 10:40:05 -05:00
Antia Puentes f4af52f94d Eeschema: Allow to edit an schematic item while dragging 2012-12-29 13:55:36 +01:00
Alexander Lunef 40f4304b2f Pcbnew: Add pcad2kicad pcb plugin, to import PCAD boards ( .pcb ASCII data file PCad 2000 format ) from Alexander Lunef 2012-12-29 10:54:25 +01:00
Wayne Stambaugh 7c86749ca6 Add Pcbnew GEDA PCB module plugin support.
* Create new GEDA PCB plug in.
* Add support for opening GEDA PCB footprints with module editor.
* Make import footprint file dialog remember last selected footprint
  type during current session.
* Update module editor file import to use new GEDA PCB plug in.
* Let IO_MGR know about GEDA PCB plug in.
* Create a WHITESPACE_FILTER_READER to simplify parsing GEDA PCB footprint
  files.
2012-12-28 15:52:12 -05:00
jean-pierre charras d2126bafff Eeschema: fix incorrect hotkey commands while moving/dragging a component. 2012-12-28 16:56:41 +01:00
jean-pierre charras 8653e362b2 Pcbnew: board editor: allows pad edition by hotkey 'E' (was accessible only by mouse button right click)
All: minor code cleaning and very minor bug fixes.
2012-12-27 17:42:41 +01:00
marco. c39ca125d4 MacOSX: deleted obsolete code 2012-12-23 11:57:02 +01:00
marco. 6c867989ca MacOSX: fixing possible crash 2012-12-23 11:55:24 +01:00
marco. 9ba242bc1f MacOSX: refresh overlay with new-deleted objects 2012-12-23 11:53:54 +01:00
jean-pierre charras 97749ed192 Eeschema: fix bug 1092864 2012-12-21 19:57:56 +01:00
jean-pierre charras d919d71054 Eeschema: fix bug 1092834 (Hotkey 'G' Drag label not working) 2012-12-21 13:56:17 +01:00
jean-pierre charras 143debdd61 Pcbnew: Rework on recovery files menu 2012-12-21 08:58:51 +01:00
Dick Hollenbeck 75072f4330 extend fp_lib_table on multiple row paste 2012-12-20 23:29:40 -06:00
jean-pierre charras bde103f5be Pcbnew: fix issue when loading a recovery backup board file.
Because now there are 2 formats, board backup files extensions are .brd-bak or .kicad_pcb-bak instead of the old .000 extension, depending on the initial file format.
2012-12-20 21:20:56 +01:00
jean-pierre charras 96f302c958 Pcbnew: fix bug: missing call to SetFileFormatVersionAtLoad after loading a board, in legacy format. 2012-12-20 19:05:18 +01:00
Dick Hollenbeck 09b1748bc4 fix a fairly serious bug which would leave SOLDERMASK_LAYER_FRONT layer turned off in PADs, when loading *.kicad_pcb files 2012-12-20 00:56:17 -06:00
jean-pierre charras a674dd6581 Pcbnew: class DIMENSION: code cleaning 2012-12-19 20:31:36 +01:00
jean-pierre charras ea603c4deb Pcbnew: fix minor bugs. Fix bug 1091593 and 1091693 . Minor code cleaning 2012-12-18 18:50:00 +01:00
Wayne Stambaugh 63b884558a Doxygen warning fixes. 2012-12-18 08:54:44 -05:00
jean-pierre charras 87e5b6b874 Pcbnew: allows pcbnew to open a .kicad_pcb or a .brd file, from the command line. 2012-12-16 14:48:54 +01:00
jean-pierre charras 4352eddadb eeschema: make new netlist format (S expr netlist format) the default for Pcbnew netlists in dialog netlist.
Also move netlist_control.* to dialogs/dialog_netlist.*, to be consistent with other file dialogs.
2012-12-16 12:36:18 +01:00
jean-pierre charras 3c315005ee Pcbnew: add a dialog to load a legacy file in "old" projects, when the .kicad_pcb file is not existing, and the correspoinding .brd file exists.
Fix also an issue in pcb_parser when a netclass name is just a number (like a track width as name)
2012-12-15 14:39:36 +01:00
jean-pierre charras 4b14415596 3d viewer: code cleaning. Display options are now stored in config. 2012-12-15 09:52:02 +01:00
Wayne Stambaugh 97ea4e83f7 Fix angle scaling error in Pcbnew s-expr file format parser. (fixes the arc bug part of lp:1090524) 2012-12-14 16:37:59 -05:00
Dick Hollenbeck cd62be66e7 fix bug 2012-12-14 13:58:50 -06:00
Dick Hollenbeck 1b4f7d6ce5 fix pcbnew file save as problem, if previous file by same basename did not exist. Show default file ext. 2012-12-14 13:42:38 -06:00
jean-pierre charras 760d02e4d2 Kicad manager: shows *.kicad_pcb files the project tree. 2012-12-14 20:37:51 +01:00
Dick Hollenbeck a564d2f865 minor file save as fixes, move legacy header into its plugin 2012-12-14 12:14:28 -06:00
Dick Hollenbeck 79b4846200 Switch over to *.kicad_pcb format as the default BOARD format.
Add KiCadPcbFileExt global.
2012-12-14 10:54:54 -06:00
Wayne Stambaugh 312254bc8a Fix minor version information text formmatting error. 2012-12-12 11:52:24 -05:00
jean-pierre charras b4f0230658 Pcbnew: fix Bug #1089120. Also change "Length Die" expression to "Length Pad To Die" in code 2012-12-12 12:57:17 +01:00
Dick Hollenbeck a9ccf49580 allow . in layer names 2012-12-10 23:39:36 -06:00
Wayne Stambaugh 2f41c40163 Fix FreeRoute launcher Java executable path error on Windows (fixes lp:1087589) 2012-12-10 21:44:20 -05:00
jean-pierre charras 1886082fce Eeschema: Erc dialog: enhancement. Now not modal.
Pcbnew: Drc dialog: fix a old very minor bug.
Added: single click on an item in marker list moves the board  graphic cursor on the corresponding marker location on the board
Double clicking is not modified.
2012-12-10 20:08:09 +01:00
jean-pierre charras 4a26d543d5 Pcbnew: Add a minimal test for illegal chars in footprints libname (like space and dir separtor)
Also a minor cosmetic enhancement
2012-12-10 12:18:42 +01:00
Dick Hollenbeck ee48de6744 note that the clipboard format is spreadsheet compatible 2012-12-09 14:53:46 -06:00
Dick Hollenbeck f477464f77 embellish fp_lib_table editor with beginnings of cut, copy, paste 2012-12-09 14:51:42 -06:00
Dick Hollenbeck 9a806749ea change spelling to jive with my email on developers list 2012-12-08 23:34:12 -06:00
Dick Hollenbeck 063907211e more fp_lib_table work, enhance parser 2012-12-08 17:58:03 -06:00
jean-pierre charras 926dec84a5 Eeschema: fix compil issue with wxWidgets 2.8.12 2012-12-08 20:36:28 +01:00
jean-pierre charras ba05519662 Eeschema: Add hotkey 'U' to edit reference. Better filtering for hotheys V, F, U: now the corresponding field is selected without selection list between component and the field. 2012-12-08 18:24:49 +01:00
jean-pierre charras 1671432ac1 All: Fix an usually unwanted behavior in kicad: When closing a dialog (mainly ERC, DRC and recently a component selection by the library viewer on a double click) the mouse release left button event (which is seen by the parent after closing the dialog, becuse it is actually made in the parent) generate an unwanted command (item selection, component place ...)
This event can be now skipped if needed by calling  EDA_DRAW_FRAME::SkipNextLeftButtonReleaseEvent() from the dialog.
Very minor other fixes
2012-12-07 11:05:19 +01:00
jean-pierre charras 14fcf7f933 Try to fix an unwanted left mouse release button event, when closing a dialog on a click or double click,
and therefore when the mouse butoon is released in the parent window
Minor other fixes.
2012-12-06 22:53:00 +01:00
marco. 3e7c4a7624 MacOSX: fixes refresh of lines and outlines when drawing 2012-12-06 19:10:58 +01:00
marco. b18e3f5372 MacOSX: Fixes the append always beaviour of cvpcb when reading netlists 2012-12-06 19:10:00 +01:00
marco. 52541cc10c MacOSX: cleanups 3817 & completes 3820 2012-12-06 19:08:34 +01:00
Marco Mattila c648806703 Update board modified state when (un)locking a module in pcbnew. 2012-12-06 12:13:19 +02:00
Dick Hollenbeck 151f81aa95 merge patch with refinement 2012-12-04 13:12:50 -06:00
Dick Hollenbeck 79015495b1 Prevent the double click from being as a single click in the parent
window which would cause the part to be parked rather than staying
in drag mode.
2012-12-04 13:09:53 -06:00
Antia Puentes c971460467 In eeschema, when inserting a component into the schematic using the
Library Browser tool, you have to select it in the components listbox
and then press the "Insert component into schematic" button to close the
window and return to the schematic.

The attached patch enables the selection and insertion of a component in
schematic by double clicking on it in the Library Browser component
listbox. As the double clicking should have effect only if the Library
Browser was launched to load a component in schematic, the patch checks
for NULL the m_Semaphore variable, used two distinguish the mode in
which the Library Browser is running (modal, used when inserting a
component in schematic, or non-modal).
2012-12-04 13:04:04 -06:00
Marco Mattila 275f02adc3 Fix BOM-by-reference generator to print the separator character instead of the ascii code 2012-12-03 17:06:49 +02:00
jean-pierre charras ac41e7009e Pcbnew: plot solder mask layer with min width value specified: algorithm modified to reduce artifacts. 2012-12-03 15:27:34 +01:00
jean-pierre charras affbb8a8e0 Pcbnew: minor coding style fixes. Very minor fixes. Minor enhancements. Fix bug #1085523 2012-12-02 12:38:00 +01:00
jean-pierre charras 8f52ba14db Pcbnew: minor enhancements. 2012-12-01 21:03:33 +01:00
jean-pierre charras 91d5bb5812 Eeschema: dialog ERC: minor enhancements and code cleaning. 2012-11-30 13:28:23 +01:00
Marco Mattila 6559d6a582 Fix pcbnew zone corner filleting 2012-11-30 07:51:47 +02:00
Heikki Pulkkinen 23c1c4a067 Pcbnew: commit patch from Heikki Pulkkinen (via displayed with its right size and clearance during track creation/edition) 2012-11-29 20:27:08 +01:00
Wayne Stambaugh 84c7b07e02 Pcbnew print fixes and improvements.
* Fix offset errors when scale factor greater is than one.
* Changed behavior of fit in page when not drawing border and
  title block to fit board outline in page.
* Fix offset errors when mirroring (still not 100% correct on MSW with
  wxWidgets 2.9.4).
* Lots of the usual code cleaning and simplifying.
2012-11-28 20:50:58 -05:00
jean-pierre charras 70ca712c81 Pcbvew: fix a strange bug which swap x and y values for pad offsets when reading a s expr *.kicad_pcb board file. 2012-11-28 19:04:57 +01:00
Dick Hollenbeck 6ad94a4912 merge in evolving fp lib_table work 2012-11-28 09:24:53 -06:00
Lorenzo Marcantonio cace69a6f2 Added warning about gcc 4.7.1 miscompile in COMPILING.txt 2012-11-28 08:38:02 +01:00
jean-pierre charras efdf28f67e Polyline.cpp: fix a bad wxASSERT test which generate error messages in Debug mode when there is no error, in DEBUG mode, when filling zones with holes. 2012-11-27 21:12:39 +01:00
Dick Hollenbeck 5155c35a71 reverse throw() clauses to quiet SWIG errors 2012-11-27 13:57:38 -06:00
Dick Hollenbeck b065b37a1e richio improvements, fix dangling open file 2012-11-27 08:25:50 -06:00
Dick Hollenbeck 9ae4e60911 start using FILE_LINE_READER( const wxString& ) 2012-11-27 08:14:15 -06:00
Dick Hollenbeck 98086a8891 Change READ_LINE classes to use less virtual functions, and READ_LINE::ReadLine() to return char*
which can eliminate a subsequent call to READ_LINE::Line() for a small performance gain.
2012-11-27 07:50:01 -06:00
Dick Hollenbeck e5c1959dcd Fix dangling open file introduced as recent workaround 2012-11-27 06:42:28 -06:00
Dick Hollenbeck 7f84f6aeb1 Another constructor for FILE_LINE_READER which enables more consistent file open strategies, and only call setvbuf() when the file is at position 0 2012-11-27 06:33:12 -06:00
jean-pierre charras 2d1a7e099b Csv Boom file: fix a minor error in commit 3818 2012-11-26 20:14:38 +01:00
jean-pierre charras 978ae91841 Eeschema: Fixes and enhancements in BOM list generation and BOM code:
* remove useless spaces in csv bom file format.
 * remove KICAD_GOST conditionnal compilation and merge KICAD_GOST code with the "normal" code.
 * Csv file format created by KICAD_GOST code is now available for everybody through the BOM dialog options (as it should).
 * fix coding style issues.
2012-11-26 18:28:54 +01:00
marco. c00a93e94f MacOSX: a strange bug with setvbuf in FILE_LINE_READER disalign the netlist reader. 2012-11-25 13:17:02 +01:00
marco. 126a7c103c MacOSX: Crash in pcbnew during edit footprint and changing layer from dialog (Fixes: #764678) 2012-11-25 09:08:25 +01:00
marco. dd5661e5a8 MacOSX: now editing Text on PCBNEW works nicelly as expected. 2012-11-25 00:23:36 +01:00
marco. b95ab35534 MacOSX: Fixes Crash when adding text on pcbnew (bug #891347) 2012-11-24 23:03:30 +01:00
Marco Mattila cbb28977a2 Fix saving of local thermal parameters in pcbnew legacy_plugin. 2012-11-24 18:02:10 +02:00
jean-pierre charras 932c5e9989 Pcbnew: fix bug1082146 (Keep-out areas get destroyed by "export settings to other zones" )
Eeschema: fix bug 1082107 (error message" component not found" when no component selected from select component dialog box)
2012-11-23 10:18:52 +01:00
jean-pierre charras 22645084bb Pcbnew: fix bug1082146 (Keep-out areas get destroyed by "export settings to other zones" )
Eeschema: fix bug 1082107 (error message" component not found" when no component selected from select component dialog box)
2012-11-23 10:10:37 +01:00
jean-pierre charras bf3b8f567a BOM list code cleanup. 2012-11-22 21:33:52 +01:00
marco. eb3ba80643 MacOSX: disabling BufferedBitmap of OSX in gerbview, not supported nor accelerable and bitmap becomes too large in case of retina display to be usable 2012-11-20 20:19:24 +01:00
jean-pierre charras 31332c3973 polygon: update clipper lib. 2012-11-20 12:42:39 +01:00
jean-pierre charras 1dd0adf7e0 Eeschema: item drag command: Fix issue for overlapping items (from a Younes Manton's idea)
Added: display info when clicking on labels.
2012-11-20 12:35:09 +01:00
marco. b5302db70e MacOSX: problems with cvpcb after multiline patch:
1) OSX compiler is really choosy (class_components_listbox.cpp)
2) Old OSX code maked an endless loop (listboxes.cpp)
2012-11-19 22:34:25 +01:00
Dick Hollenbeck 2aa27122b0 Eliminate many assumptions in Pcbnew's library manager, pertaining to locality of libraries and
their type, by using the more abstract PLUGIN::Footprint*() functions.

This is an intermediate phase only, other changes will be necessary as library table support comes in.
Encapsulate usage of library path searching, since that will go away as library table support comes in.
Add FOOTPRINT_EDIT_FRAME::{get,set}LibPath() and FOOTPRINT_EDIT_FRAME::{get,set}LibNickName() functions
to provide this encapsulation.
2012-11-19 10:19:38 -06:00
jean-pierre charras cb62f5c8ba Try to fix a compil issue with some wxWidget versions. 2012-11-19 15:32:34 +01:00
jean-pierre charras b080f860c9 Pcbnew: enhanced dialog for SVG export 2012-11-16 15:13:31 +01:00
Dick Hollenbeck e435a104c9 Add *.kicad_mod as default import footprint extension. Turn on all Cu layers for thru hole pads in case loading non-wildcard s-expression footprint files. 2012-11-15 10:46:43 -06:00
Dick Hollenbeck a93637b14f remove -std=c++0x compiler option since nobody is ready for it, and accordingly back into auto_ptr from unique_ptr 2012-11-15 10:04:10 -06:00
jean-pierre charras 4794d3774a Pcbnew: fix incorrect filenames when plotting layers 2012-11-15 11:47:23 +01:00
jean-pierre charras 3688bae75f Fix compil issue under MinGW: for an obscure reason the option -std=c++0x creates error in wxWidget code:
some functions used in wxWidgets ( like _strdup and few other) are not defined when this option is set. 
but the equivalent option -std=gnu++0x works fine so it is used under mingw instead of  -std=c++0x.
(Under Linux/OSX  the option -std=c++0x is used)
2012-11-14 21:07:09 +01:00
Dick Hollenbeck 9bbff22d96 1) Switch to boost hashtable support from wx macros which did not handle std::string.
This required the additional compiler command line option "-std=c++0x".

2) Switch to unique_ptr from auto_ptr which is C++ deprecated.

3) Change to new English layer names per mailing list discussion, see class_board.cpp.

4) When saving to *.kicad_pcb or *.kicad_mod, identify opportunities to use wildcard
   layer sets, for pads so far.

5) Switch to two std::string hashtables in pcb_parser.cpp, away from one wxString based one
   for layer names and layer sets mapping. One hashtable holds the mask, the other the index.
   Layer sets are only in the mask table.

6) Move "LOCALE_IO toggle" into PCB_IO::Format() since it is a public API function and
   caller should find it as convenient as possible to use.  LOCALE_IO should handle
   nesting OK in the case where public Format() is called from one of the Footprint*()
   functions.

7) Drop support for "export module to new library".  Creating new libraries will have to
   be handled in concert with library table entries, and we've talked recently about
   creating a better footprint library manager, one that resides in a DLL/DSO.  So
   this kind of functionality needs to be handled in there in the near future.

8) Change name of exported PCB_IO module/footprint to *.kicad_mod and not *.emp.
2012-11-14 01:15:59 -06:00
jean-pierre charras 89a40eeb80 pcbnew: fix minor issues.
pcb_calculator: fix a compil warning (gcc 4.7)
2012-11-12 17:19:10 +01:00
Dick Hollenbeck 4612ef9d50 switch to new s-expression format for footprint exports, use english layernames for naked footprints, dodge conflict with pythons HAVE_GETC_UNLOCKED 2012-11-10 00:39:18 -06:00
Dick Hollenbeck d378dcc734 footprint save to use untranslated (English) layer names 2012-11-09 13:00:00 -06:00
Dick Hollenbeck 272936ef21 populate PCB_PARSER::m_layerMap with English layernames so footprints
can be parsed, since they do not have an overriding layer name map
like a BOARD does.

Avoid doubly looking up hashtable entries in m_layerMap.

Minor code reformatting.
2012-11-09 00:58:00 -06:00
Dick Hollenbeck b4ab7ef7ea remove old sourceforge mailing list export file 2012-11-08 13:45:14 -06:00
jean-pierre charras 96a77d7618 Pcbnew: Add a min width parameter to plot solder mask layers.
* If this param is set to 0, the previous behavior is used.
* Else the solder mask is plotted as polygon, with shapes near than  this min width value are  merged.
Pcbnew in nanometer version: fix a serious rounding issue due to the fact dialogs were using 4 digits for mantissa.
* This is not enough for nanometer coordinates ( 8 are needed to display a value in inches),
*  so sometimes after closing a dialog, some coordinates were modified, although no new value was entered.
Minor other bug fixed.
2012-11-06 18:58:53 +01:00
jean-pierre charras 703293fa30 Add a min width parameter to plot solder mask layers. 2012-11-05 21:20:34 +01:00
jean-pierre charras 31e58d87d4 Eeschema: fix an old bug: sometimes E hotkey (and some other' hot keys) was editing a previously selected item, not the item under the mouse cursor
Templates: remove useless backup files
2012-10-31 21:27:31 +01:00
Dick Hollenbeck e0cc8a2f11 implement move up, move down in lib table editor 2012-10-31 09:41:47 -05:00
Dick Hollenbeck dd519d68ea remove unused #include <wxfstream.h> from several places 2012-10-29 16:56:18 -05:00
Dick Hollenbeck e21bd2479e add new templates to template/CMakeLists.txt, group all templates into one installation COMPONENT 2012-10-29 16:55:05 -05:00
Hans Henry von Tresckow df810f744c TI Stellaris Launchpad Boosterpack Template.
Here is a first cut at the 40pin booster pack template. I made 2
versions, BoosterPack40, which has the optional J5 connector and is
2"x1.7" and BoosterPack40_min, which is 2"x1.35" and leaves the
switches accessible.
2012-10-29 15:48:33 -05:00
Marco Mattila efa0286f26 Do not force vias to be substracted from silkscreen in pcbnew gerber plot 2012-10-28 22:51:47 +02:00
Dick Hollenbeck 4e61451c9c 128 pixel icons from Frabrizio's script and tar file. 2012-10-28 14:10:07 -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
Wayne Stambaugh 58ae2e1920 Add missing scripting build flags to EDA_BASE_FRAME::CopyVersionInfoToClipboard. 2012-10-25 10:27:35 -04:00
Dick Hollenbeck d32333a012 streamline the FILE_OUTPUTFORMATTER API for ease of use 2012-10-25 02:10:59 -05:00
Dick Hollenbeck 9cd011abbb add class FILE_OUTPUTFORMATTER and use it in PCB_IO, since it is about 8-10 faster than STREAM_OUTPUTFORMATTER 2012-10-25 00:52:55 -05:00
Dick Hollenbeck ea4b3877e2 move wxString constructor outside loop for speed 2012-10-24 13:59:37 -05:00
Dick Hollenbeck 28222961dd fix ownership issue in wxFFile vs. FILE_LINE_READER 2012-10-24 13:42:39 -05:00
Dick Hollenbeck 5634bc3381 move PCB_PARSER into PCB_IO as a member 2012-10-24 13:20:33 -05:00
Dick Hollenbeck 484eb55ae8 DSN_LEXER underneath PCB_PARSER does not own the LINE_READER it receives, fix memory leak 2012-10-24 12:38:10 -05:00
Wayne Stambaugh 1e772280b9 Fix compile error against wxWidgets 2.8 brach. 2012-10-23 13:20:22 -04:00
jean-pierre charras 6abf0e9f94 Eeschema: Bug fix (move component field was not undoable)
Minor enhancement in popup menus for wire and bus.
Kicad: stm32f0discovery template: very minor fix.
2012-10-23 18:37:19 +02:00
Dick Hollenbeck 28f238e36b pcbnew import footprint fixed for legacy nanometer format 2012-10-22 15:41:26 -05:00
Kerusey Karyu c771811498 Fix error in stm32f100-discovery-shield.brd 2012-10-21 10:40:10 +02:00
Kerusey Karyu 945fef938c Add stm32f100-discovery-shield template 2012-10-20 18:16:34 +02:00
jean-pierre charras 292c1f0912 Kicad: bug fix in menubar when changing the selected locale.
fctsys.h: remove useless define.
Fix minor issues and add minor enhancements.
2012-10-18 21:31:40 +02:00
Dick Hollenbeck 9e41a8127d more fp_lib_table work 2012-10-18 10:28:50 -05:00
Wayne Stambaugh f3cc32f9e2 Put KiCad on a diet to remove the uncessary slices of pi. (fixes 1066194) 2012-10-17 16:59:05 -04:00
Dick Hollenbeck 58299fc921 more fp_lib_table work 2012-10-17 10:12:17 -05:00
jean-pierre charras f03b9048fe Fix a minor compatibility issue in .pro file for new boards, between decimils and nanometers versions of Pcbnew. 2012-10-17 12:57:21 +02:00
Dick Hollenbeck 69dbeab90f decouple wxGridTableBase from FP_LIB_TABLE, this was poor information hiding 2012-10-16 20:00:25 -05:00
Dick Hollenbeck fb43f4ad6f fp_lib_table dialog work 2012-10-16 01:56:57 -05:00
Dick Hollenbeck 0e1e7f53b1 remove one-ness bug from CMakeLists.txt 2012-10-16 00:28:39 -05:00
Wayne Stambaugh e7925279ab Only use -O1 GCC optimization level for versions 4.7 and above for now. 2012-10-15 21:42:50 -04:00
Dick Hollenbeck 80693fa7c1 add dialog for fp_lib_table 2012-10-15 17:37:08 -05:00
Dick Hollenbeck ae19bbfa33 add dialog for fp_lib_table 2012-10-15 17:30:01 -05:00
Wayne Stambaugh b1ea9d0eb5 Minor FP_LIB_ID object changes. 2012-10-15 16:48:01 -04:00
jean-pierre charras 2dc8c27ec2 Kicad manager: project_template.cpp: accepts lower and upper case HTML keywords (compatibility with libreoffice) 2012-10-15 19:55:04 +02:00
Dick Hollenbeck 0dc4d9c19e Commit Dick's changes to the FP_LIB_TABLE object. 2012-10-15 12:19:42 -04:00
Wayne Stambaugh 012fa536e1 Merge changes from testing branch. 2012-10-15 09:40:40 -04:00
Dick Hollenbeck 26eab9c767 make nanometers the default board internal units within Pcbnew 2012-10-15 00:21:31 -05:00
Wayne Stambaugh 77e1a4c03c Initial commit of footprint library table code. 2012-10-14 21:38:32 -04:00
jean-pierre charras 819404614a missing files 2012-10-14 19:00:47 +02:00
Brian Sidebotham 9823666ca9 Commit patch from Brian Sidebotham: Project template in Kicad manager 2012-10-14 18:57:11 +02:00
jean-pierre charras 621a43c4ad Eeschema: always stores sheet filename in unix-like notation, and fix a bug when editing sheet file name.
Pcbnew: add PDF format  for drill map generation.
Plotter classes: tweaking code.
2012-10-13 20:54:33 +02:00
Andrey Fedorushkov cedcd2bace eeschema: fix segfault when edit text and empty editing text 2012-10-13 22:33:58 +04:00
marco. eee9738755 OSX: Corrected issue with Menus, workaround/fix for an issue with Mountain Lion 2012-10-13 20:23:03 +02:00
Wayne Stambaugh fc9c8cc0ec Fix footprint library file extension bug in CvPcb and Pcbnew due to s-expression changes, fixes lp:1064593. 2012-10-09 15:18:12 -04:00
Wayne Stambaugh 87e773b6f6 Add Boost version to EDA_BASE_FRAME::CopyVersionInfoToClipboard(). 2012-10-09 11:31:55 -04:00
Wayne Stambaugh c11f3407b8 Check for getc_unlocked() and fall back to getc() in richio if it's not available. 2012-10-09 10:31:36 -04:00
Dick Hollenbeck bb383e22b3 optimize isSpace for negative 8 bit bytes 2012-10-08 15:01:17 -05:00
Dick Hollenbeck 56796a950c *) Use fgetc() technique to avoid strlen() in FILE_LINE_READER::ReadLine(),
which was having difficulty with embedded nuls in files coming from PCAD.

*) Make dsnlexer.cpp's isSpace() treat nuls as whitespace.
2012-10-08 14:34:46 -05:00
Dick Hollenbeck 44c25d14ec eeschema erc dialog extends from DIALOG_SHIM 2012-10-08 14:34:04 -05:00
Dick Hollenbeck b97ece7f58 minor. 2012-10-08 14:30:38 -05:00
Wayne Stambaugh 7d08facb45 Convert footpint library log functions to trace functions to reduce debug output. 2012-10-07 18:26:17 -04:00
Dick Hollenbeck fdc7e9a818 Commit Dick's INPUTSTREAM_LINE_READER patch. 2012-10-07 17:26:41 -04:00
Wayne Stambaugh 1468a4ae31 Pcbnew s-experssion footprint library implementation.
* Add footprint methods to PCB_IO.
* Add FP_CACHE and FP_CACHE_ITEM for handling new footprint library design.
* Add code to save legacy libraries in new format.
* Change behavior of BOARD_ITEM::GetLayerName() to return the default layer
  name when the item does not have a BOARD as a parent.
* Minor changes to the module output formatter when writing to module library
  files (no BOARD as parent).
* Add new (and some that I forgot along the way) CMake flags to
  EDA_BASE_FRAME::CopyVersionInfoToClipboard().
* Add -Wno-narrowing to GCC flags to stop GCC 4.7 from complaining about
  a conversion from int to unsigned in the Boost polygon library.
* Add INPUT_STREAM_READER to richio.cpp to allow using any object derived
  from wxInputStream as a LINE_READER (needs to be validated).
2012-10-07 11:37:25 -04:00
jean-pierre charras 8031e512e6 Dialog drill file: remove precision choice, because only one choice was acceptable
(the option with the smallest number of digits for coordinates created unacceptable truncation coordinates in Excellon drill files)
2012-10-05 21:04:17 +02:00
jean-pierre charras c41bb774e4 Pcbnew: drill files creation: better dialog to create driil files, map files and report file. Code cleaning 2012-10-05 14:25:12 +02:00
jean-pierre charras 5951a7f9bc Pcbnew: fix an issue when collecting vias (for instance when left clicking on a via, it was not always detected)
This bug was mainly noticeable when using buried vias (some were never detected)
Minor other fixes (typos, strings hard to translate ...)
2012-10-04 19:47:28 +02:00
jean-pierre charras 7c0af1bf9d More dialogs derived from DIALO_SHIM 2012-10-04 08:57:15 +02:00
jean-pierre charras bae892dfe5 Pcbnew: make all dialogs derived from DIALOG_SHIM. 2012-10-03 13:25:30 +02:00
jean-pierre charras c169de804d Pcbnew: Make scripting version compilable under Windows 2012-10-01 08:04:06 +02:00
jean-pierre charras 0e941708f4 Make scripting version compilable under Windows 2012-09-30 19:50:17 +02:00
jean-pierre charras 6bb4dea501 Eeschema: fix a bug in my previous commit 2012-09-28 20:45:04 +02: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 63257245e8 Eeschema: fix Bug #1057225 2012-09-27 20:18:56 +02:00
marco. 0355119044 [MacOSX] Updated Icons - Document ones still missing :( 2012-09-27 19:20:44 +02:00
Felix Morgner 21dbfef350 Added support for multi-selection and multi-editing in cvpcb. 2012-09-26 15:57:58 -05:00
Felix Morgner 4fec212627 fixed code to better comply with the coding style guidelines 2012-09-26 19:22:48 +02:00
Felix Morgner 99c1d45fa0 Added mutli-selection to cvpcb 2012-09-26 17:36:48 +02:00
marco. 92f8f006fa MacOSX - Fixed some issues launching bundles/binaries 2012-09-26 00:33:42 +02:00
jean-pierre charras 5fa61ecd25 Finishing code cleaning in plot functions. 2012-09-25 09:49:29 +02:00
jean-pierre charras 2d49ced742 Pcbnew: fix compil warning and a minor bug in plot negative (frame fer plotted in white therefore not visible).
minor code cleaning
2012-09-24 18:03:03 +02:00
jean-pierre charras c646c2f806 convert_from_iu: erroneous definition of MILS_PER_IU, MM_PER_IU (and therefore Iu2Mils)
only for Pcbnew in Decimils version. These definitions are provided, but not yet used in code.
2012-09-24 08:46:20 +02:00
jean-pierre charras cc47e88b9e Pcbnew, plot functions: fix bug in SVG plotter, fix a minor other bug when using PS plotter (trcak width fine adjust not working)
and plot code cleaning continued
2012-09-24 08:39:59 +02:00
jean-pierre charras 160560c916 pcb_calculator: fix compil issue about isinf (under mingw) 2012-09-22 17:45:15 +02:00
jean-pierre charras fb193c1232 pcb_calculator: fix compil issue about isinf. 2012-09-22 14:13:57 +02:00
jean-pierre charras 6454d91923 Cvpcb: remove macros MAX, MIN, ABS (forgotten file in my last commit) 2012-09-22 13:29:30 +02:00
jean-pierre charras b660b033ad All: remove macros MAX, MIN, ABS from macros.h and replace these macros by std::max, std::min and std::abs (mainly found in old code). 2012-09-22 13:19:37 +02:00
Dick Hollenbeck 210a7036db switch all <math.h> includes to <cmath> includes on an attempt to dodge some abiguous references to atan2() 2012-09-21 12:02:54 -05:00
jean-pierre charras eb94e66c9d Pcbnew: some code cleanup in plot functions. 2012-09-21 10:20:38 +02:00
jean-pierre charras b1c9c54221 Fix incorrect titles in SVG export dialog 2012-09-20 21:15:14 +02:00
jean-pierre charras 9e0960615a dcsvg (and therefore KicadSVGFileDC) is now unused. Use SVG plotter only to export a board SVG file.
SVG export does not use no more wxWidgets wxDC.
In pcbnew SVG files can be created by plot menu (in B&W) or export SVG menu (B&W or Color).
Export SVG menu is more suitable to create a view of a board, and plot menu is better to create a B&W document of silkscreen layers.
(In the future, the 2 menus could be merged, because they are not very different).
Note: pcbnew plot code is cleaned, mainly in dialog files, but still needs more cleanup.
2012-09-20 20:58:41 +02:00
Craig Southeren 436c17f60b This fixes a MSVC compile error caused by a static scalar initialiser. 2012-09-20 08:54:35 -05:00
Craig Southeren 534c8a8944 Fix MSVC compile errors caused by struct forward declared as class 2012-09-20 08:38:50 -05:00
Dick Hollenbeck 136d84ef3c fmin() was giving grief to MSVC, switch to std::min() 2012-09-20 08:22:33 -05:00
Dick Hollenbeck 44ced95e66 This change fixes a compile error on MSVC 2012-09-20 08:15:12 -05:00
jean-pierre charras 5179ed926b eeschema: plot functions: code cleaning.
SVG plotter: fix issues in draw arc and draw rectangle.
2012-09-18 16:50:30 +02:00
jean-pierre charras c3ecce2ec6 Eescheam: plot HPGL: add comments and minor fix. 2012-09-18 10:39:56 +02:00
jean-pierre charras 5590e1ebf5 eeschema: plot dialog: minor fix 2012-09-17 21:28:17 +02:00
jean-pierre charras 0037e153a0 Eeschema: Plot dialogs: unify 5 dialogs (which means 5 duplicate code) to only one plot dialog (like in Pcbnew)
remove duplicate code and clean it.
Simplify HPGL dialog: plot offet removed and replaced by only one option:
plot origin to center of sheet or not (some HPGL  plotters have the plot origin to center of the paper area,
and others have this origin at the bottom left corner)
This is surely enough.
2012-09-17 20:39:42 +02:00
Marco Mattila 3ed33e3912 Move pcbnew pcb edge layer plot checkbox to common plot options 2012-09-17 21:14:41 +03:00
jean-pierre charras 996bf80d1f Add missing files 2012-09-17 19:56:40 +02:00
jean-pierre charras 16064881be Eeschema: Plot dialogs: unify 5 dialogs (which means 5 duplicate code) to only one plot dialog (like in Pcbnew)
clean duplicate code.
Simplify HPGL dialog: plot offet removed and replace by only one option (plot origin to center of sheet or not)
This is surely enought.
2012-09-17 19:42:27 +02:00
jean-pierre charras a9744e3f84 Pcbnew: added: SVG plotter. Need refinements, but works.
Mainly to plot drill maps, but can be used to plot boards, for documentation.
The print svg still exists, but the plot SVG has more options (mirroring, holes in pads),
however  print svg allows color print, and full board printing, and plot does not.
2012-09-15 14:13:03 +02:00
jean-pierre charras a2b9241ea3 Pcbnew: fix minor issue when loading a foorprint: if the footprint name has lower case letters, the name was asked twice 2012-09-13 14:15:24 +02:00
jean-pierre charras 819589cf05 All: fix most of Doxygen warnings. 2012-09-12 19:28:55 +02:00
jean-pierre charras 3ff16a0b14 Pcbnew: fix compil error I created in my previous commit.
All: fix some Doxygen warnings
2012-09-12 13:11:30 +02:00
jean-pierre charras 93ebdb2cd0 All: better code to handle opened frames libview, libedit, modview, modedit.
Other minor fixes.
2012-09-12 11:53:11 +02:00
jean-pierre charras b810135e4e Code cleaning, minor fixes and minor coding style fixes. wxWidgets 2.9.4 compatibility fix( deprecated function MakeModal ) 2012-09-11 21:03:21 +02: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 3668f4ccc3 Pcbnew: cleanup functions: now, cleanup uses same algorithm as connectivity calculations to detect pads connections, and is faster.
therefore tracks which have a end point inside a pad, but not necessaryexactly  to the pad position are seen as connected, and are no more removed.
Side effect: reconnect to pads option is removed, because it is useless.
TODO: use this algorithm in drag functions.
Minor other fixes
2012-09-07 21:29:44 +02:00
Dick Hollenbeck 5aec46049d apply DIALOG_SHIM to dialog_lib_edit_text_base and make dialog_lib_edit_pin_base apportion more width for pin name 2012-09-07 11:15:18 -05:00
Lorenzo Marcantonio 7d154606be Substituted the few remaining uses of long instead of time_t 2012-09-05 14:13:33 +02:00
jean-pierre charras 61c3339d09 The last one compil error fix. 2012-09-02 19:53:34 +02:00
jean-pierre charras 05dc1bbf3d fix compil errors 2012-09-02 18:38:52 +02:00
Lorenzo Marcantonio a66e910827 Another fix for wx2.9 compilation (same issue as before, another call...) 2012-09-02 17:46:19 +02:00
Lorenzo Marcantonio 34c74d17b4 Probable fix for compilation under wx 2.9 (doesnt hurt anyway) 2012-09-02 16:13:50 +02:00
Lorenzo Marcantonio e771112259 Enforced EDA_COLOR_T type and minor const-ification 2012-09-02 14:06:47 +02:00
Lorenzo Marcantonio 3157b4d188 Enforced EDA_COLOR_T type and minor const-ification 2012-09-02 13:01:12 +02:00
Lorenzo Marcantonio 082d901d60 Encapsulated drawmode as an enum for type checking 2012-09-01 15:38:27 +02:00
jean-pierre charras f301b196ab Modedit: very minor enhancements. 2012-08-31 21:19:48 +02:00
Marco Mattila eaf4919ef8 Take pad clearance into account in intersection detection during pcbnew zone filling. 2012-08-31 21:43:09 +03:00
jean-pierre charras e6dd5128fa Pcbnew: fix bug: deleting a cutout in a zone was not undoable. 2012-08-31 17:59:14 +02:00
jean-pierre charras 92b43c7407 Fix 0 length segment in outline zone creation, that breaks zone chamfer option. 2012-08-31 15:58:23 +02:00
jean-pierre charras 37ee239449 Pcbnew: in SVG export, add option to export only the board area, not the full page.
dialog plot functions: fix compil warnings with wxWidgets 2.8
2012-08-31 09:43:37 +02:00
Lorenzo Marcantonio ba6da604cc Refactored PCB plot infrastructure
Removed filename from the BASE_SCREEN class
Scripting support for board plot
2012-08-30 21:25:12 +02:00
Lorenzo Marcantonio 137066e53c Fully encapsulated with accessors PCB_PLOT_PARAMS 2012-08-30 20:06:13 +02:00
Lorenzo Marcantonio 7cef5395b3 Minor plot driver enhancements 2012-08-29 22:13:47 +02:00
Lorenzo Marcantonio 715af96184 Removed g_pcb_plot_options from gerbview (which has no plotting anyway...) 2012-08-29 20:43:51 +02:00
Lorenzo Marcantonio b44d719446 Removed PCB_BASE_FRAME::m_printBorderAndTitleBlock (all dead code) 2012-08-29 20:34:34 +02:00
Lorenzo Marcantonio c7e3e31db6 const-ifiation of member 2012-08-29 19:35:23 +02:00
Lorenzo Marcantonio 94fdc674aa Added 'parachute' std::exception handling to python interface 2012-08-29 19:32:14 +02:00
Lorenzo Marcantonio 0938f2cff6 Added MEASUREMENT sysvar to DXF driver, marks explicitly the file as metric 2012-08-29 19:31:00 +02:00
Lorenzo Marcantonio e7fd324a75 Fixed format string (spurious character was added) in HPGL driver 2012-08-29 19:29:45 +02:00
Lorenzo Marcantonio a2c75829f9 Fixed compilation with unicode (wxString to printf without GetChars) 2012-08-29 19:28:33 +02:00
Lorenzo Marcantonio fef8347176 Script plotting patch 2012-08-29 18:59:50 +02:00
jean-pierre charras 79d55c0460 Minor cosmetic enhancements.
Kicad manager: shows now svg files in tree files.
Pcbnew: fix incorrect printing (board out of page) when creating drill map in postscript format ( noticeable mainly for small boards)
2012-08-29 14:40:09 +02:00
Lorenzo Marcantonio 96bf0a5460 Missing a wxT in call to LogDebug 2012-08-29 13:28:37 +02:00
Dick Hollenbeck 5b9c354759 wxFileName::CreateTemporaryFile() is switching to /tmp directory when no preceding path is present 2012-08-28 10:41:08 -05:00
jean-pierre charras a4de3018d7 Pcbnew: Fix bug 1042394 and very minor code cleaning. 2012-08-28 08:51:18 +02:00
jean-pierre charras bff11cea90 3D viewer: code tweaking 2012-08-27 13:41:22 +02:00
jean-pierre charras 20acc9a918 3D viewer: fix a very minor issue, and more code cleaning. 2012-08-27 09:06:52 +02:00
jean-pierre charras 5542910960 3D viewer: fix very minor issue. Remove duplicate code 2012-08-26 20:10:28 +02:00
jean-pierre charras 31ff1bac4f 3D viewer:
*  serious code cleanup (remove duplicate code)
  *  shows (option in 3D preference menu) the copper items (tracks, zones...)  in 3D, using 35 microns copper thickness.
      However, because there are a lot more3D data to show (roughly 4 times more), this is slower.
2012-08-26 15:59:55 +02:00
Dick Hollenbeck 0c4c65d7a2 wxServer was a confusing define, since it is also a wxWidgets class, do not use it 2012-08-24 06:31:09 -05:00
Gregor Riepl 96771ccc03 The listener is opened on INADDR_ANY, so it will accept any network
connection, no matter if it is originating locally or from the outside
of the host. There is no check in place to discard non-local
connections. The only security against a malicious attack would be
provided by a local firewall, which is not guaranteed to be installed on
every workstation kicad is used on.

I tested this, and a host running eeschema accepts connections on TCP
port 4243 from other hosts on the internet.

A patch to remedy this potentially serious security hole is attached. It
creates the listener on localhost instead. A flag is provided to allow
the creation of sockets on 0.0.0.0 instead, if required. localhost is
the default.
2012-08-24 06:19:52 -05:00
Dick Hollenbeck 3a07ab1f09 *) 64 bit size_t is not compatible with %u printf format control. use "%zu"
where the 'z' prefix is for size_t arguments.

*) minor beautification
2012-08-24 06:14:10 -05:00
jean-pierre charras b19cc14ef2 3d-viewer and polygon functions: remove duplicate code about conversion from basic shapes to polygons. 2012-08-23 21:15:58 +02:00
Marco Mattila 2dbb428b23 Fix pcbnew thermal stub removal for pads with locally defined thermal properties. 2012-08-22 23:16:21 +03:00
jean-pierre charras 0ebc3f063e 3D-viewer: code cleanup.
Eeschema: annotate and netlist dialogs: enhancements.
Minor  coding policy fixes and  changes.
2012-08-21 12:45:54 +02:00
Dick Hollenbeck 898275fa43 work around wx2.8 wierdness 2012-08-16 10:34:41 -05:00
Dick Hollenbeck 367bfb4e14 fix problem with eeschema print dialog showing up on missing monitor 2012-08-15 12:55:48 -05:00
Dick Hollenbeck 6bb2fce7d9 legacy plugin fully support text horiz/vert justification, eagle plugin text fixes 2012-08-11 14:14:45 -05:00
jean-pierre charras abe5c08e20 3D-viewer: code cleaning. Added option in menu: show a 3D grid.
All: press ctrl+shift key when moving the mouse allows the graphic cursor to be moved outside the grid.
(useful to place graphic objects, texts in any position, regardless the current grid)
2012-08-11 14:52:13 +02:00
Dick Hollenbeck 7c3f47ec5a fixes for plugins 2012-08-11 00:50:17 -05:00
Miguel Angel Ajo f80357cb1a pcbnew: Show/Hide button for scripting console 2012-08-10 23:53:50 +02:00
Miguel Angel Ajo c7d6dad7e0 pcbnew: fix bug 1033510 that crashes pcbnew when no footprint wizard is selected 2012-08-06 22:41:41 +02:00
Miguel Angel Ajo ccb74b99d3 pcbnew: footprint wizards now can export the output module to the library or board 2012-08-05 00:15:57 +02:00
jean-pierre charras 9d5e271334 Pcbnew: fix a minor issue in non copper zones when creating the solid filled areas. 2012-08-04 18:33:04 +02:00
jean-pierre charras c82b878787 Remove Kbool from Kicad. Use Clipper instead.
Clipper is, by far, more easier to use than Kbool, and is currently actively maintained.
It is used only to normalize polygons, i.e. to convert self intersecting polygons to simple polygons,
which is not possible with boost::polygon.
2012-08-04 13:52:04 +02:00
jean-pierre charras c0992a9386 Remove Kbool from Kicad. Use Clipper instead, last changes 2012-08-04 13:47:24 +02:00
jean-pierre charras 1f277fd66d Remove Kbool from Kicad. Use Clipper instead. 2012-08-04 11:43:27 +02:00
jean-pierre charras 7fd24c7f03 Very minor fixes. 2012-08-03 17:43:15 +02:00
jean-pierre charras 4ff3a78de0 Eeschema: fix crash when changing a label type to an other label type during creation.
Pcbnew: code cleaning in polygon functions
2012-08-02 19:36:14 +02:00
jean-pierre charras 899d23d4fd Polygon code cleanup 2012-08-02 19:32:42 +02:00
Miguel Angel Ajo 4d2def3593 scripting + pcbnew: Merged with scripting branch, now it supports -DKICAD_SCRIPTING_WXPYTHON for full wx integration with python 2012-08-02 19:31:39 +02:00
Miguel Angel Ajo 89dd074841 pcbnew scripting: cleanup, renamed KICAD_SCRIPTING_EXPERIMENT to KICAD_SCRIPTING_WXPYTHON, now every flavour compiles 2012-08-02 19:24:53 +02:00
jean-pierre charras 3b56ea6732 Eeschema: fix crash when changing a label type to a global label during creation.
Pcbnew: code cleaning in polygons
2012-08-02 15:23:53 +02:00
Miguel Angel Ajo b0881d8ec5 scripting: fixed kicad compilation, cleanups 2012-08-02 09:47:30 +02:00
Miguel Angel Ajo 5140c348cd pcbnew: wxPyBeginBlockThreads before every python call 2012-08-01 14:50:21 +02:00
Miguel Angel Ajo beec323603 Double Python initialization fixed 2012-08-01 13:54:20 +02:00
jean-pierre charras ef39c5f38e PolyLine and math_for_graphics code cleanup: remove arc support in CPolyLine class:
This is an obscure legacy code from FreePCB, never used, never tested, never maintained.
2012-08-01 10:08:37 +02:00
jean-pierre charras 90a6daa722 Cleanup math_for_graphic code 2012-08-01 09:07:56 +02:00
Miguel Angel Ajo 474128a445 pcbnew scripting: fixed for coding style policy 2012-07-31 23:00:33 +02:00
jean-pierre charras dfdd2cfdbf Remove freepcb arc legacy code from PolyLine. 2012-07-31 19:51:58 +02:00
jean-pierre charras ae05cd80c3 Remove arcs support in zone outlines: this is a legacy code from FreePCB, never used, never tested, never maintained. 2012-07-31 15:12:51 +02:00
jean-pierre charras f96d557e73 Fix issues in zones creation (DRC and merging) I created in 3658.1 2012-07-30 09:40:25 +02:00
Miguel Angel Ajo 1c9433fb31 merged divertion 2012-07-30 00:24:40 +02:00
Miguel Angel Ajo a8e4f8b0ed pcbnew: scripting, Capacitive Touch Slider Wizard 2012-07-29 23:40:41 +02:00
jean-pierre charras 99b90d2fa3 More work on a better support of polygons in Kicad (code cleaning). 2012-07-25 20:46:25 +02:00
jean-pierre charras ef5f1b9e6b Start work on a better support of polygons in Kicad (code cleaning).
Some coding style policy fix.
2012-07-25 09:36:56 +02:00
Miguel Angel Ajo 9259b21ffa Footprint wizard converts from user units to internal units back and forth, so user can type in mm or mils now 2012-07-23 00:23:17 +02:00
Miguel Angel Ajo 894e6eb5ea .dso -> .pyd is the right extension for python .dll WIN32 2012-07-22 14:19:52 +02:00
Miguel Angel Ajo 5d0dee1364 Adam Vašíček patches for WIN32 compilation of kicad scripting 2012-07-22 14:15:38 +02:00
jean-pierre charras 4f01bedf97 Eeschema: fix a bug that crashes eeschema (only when compiled in debug mode) when creating a new wire, and when any wire orientation is allowed. 2012-07-21 18:52:29 +02:00
Marco Mattila 9e20800f8c Fix axis offset issue in pcbnew gerber circular interpolation. 2012-07-18 22:32:47 +03:00
Marco Mattila 9ec6139f9d Edit eeschema single part per line sorting code. 2012-07-17 22:13:35 +03:00
jean-pierre charras 9d8c684a4a Libedit and Modedit: fix minor, but annoying issues when editing items 2012-07-17 17:29:29 +02:00
Marco Mattila 5742bfb8cc Fix eeschema single part per line bom generation. 2012-07-16 21:49:04 +03:00
Miguel Angel Ajo 465dabd919 Fixes Win32 compilation that my previous commit broke, thanks to JP 2012-07-16 16:48:51 +02:00
jean-pierre charras aaabdeaed7 Pcbnew: Fix crash after opening footprint wizard 2012-07-16 15:34:08 +02:00
jean-pierre charras a3ea46d0e4 Fix compil issues under mingw 2012-07-16 11:19:23 +02:00
Miguel Angel Ajo 829e952e49 Python scripting and fixes for non-scripting compilation 2012-07-16 07:53:22 +02:00
Miguel Angel Ajo 863c1b4823 Merged with testing 2012-07-15 22:38:25 +02:00
Miguel Angel Ajo 2a9b8df888 Support for nanometer build, extra example 2012-07-15 22:01:05 +02:00
Marco Mattila 5a6c088bd9 Use circular interpolation for circles and arcs in pcbnew gerber plots. 2012-07-15 20:28:52 +03:00
jean-pierre charras f20bf0d217 Pcbnew: more about keepout areas: remove keepout for pads option and add keepout for copper zones option.
Export keepout to Specctra DSN file.
2012-07-14 18:27:25 +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
jean-pierre charras 0bdec796be Eeschema: fix compatibility issue with wxWidgets 2.8.12 2012-07-12 17:01:14 +02:00
jean-pierre charras 8439dc450f Eeschema: fix compatibility issue with wxWidgets 2.8.12 2012-07-12 16:59:06 +02:00
l. 8234b9e184 All: Fix Assertion on sheet properties, in debug mode 2012-07-11 10:02:47 +02:00
jean-pierre charras 701140a6dd Eeschema: fix wrong bitmap size in hierarchy navigator tree 2012-07-10 14:26:26 +02:00
jean-pierre charras af0d21474d Pcbnew: commit Lorenzo Marcantonio's patch for THT thermals (added loading/saving using S. expr).
Fix incorrect import of smd pads from Gpcb.
Very minor change in dialog print.
2012-07-09 09:10:07 +02:00
Marco Mattila 096f4a1080 Add rotation field to pcbnew text item property dialog. 2012-07-09 01:02:00 +03:00
Dick Hollenbeck 1da099dd1f fix for bug 1022026 2012-07-07 13:27:44 -05:00
Miguel Angel Ajo 974fe74f66 Cleanup toward test-merge 2012-07-06 21:10:55 +02:00
Wayne Stambaugh 04a17d3347 Save and load print parameters and minor code cleaning in new Pcbnew file format. 2012-07-05 13:02:45 -04:00
jean-pierre charras 7f16520498 Eeschema: bug fix: when creating new connections, junctions were not always automatically added when needed.
Fix an other minor bug.
2012-07-05 13:37:48 +02:00
jean-pierre charras 0459b4dafa Pcbnew: fix incorrect detection of arcs having angles != 90 degrees 2012-07-05 11:29:42 +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 1f1a7703d9 Pcbnew, gen Excellon files: fix truncation coordinates in decimal format, units = inches (old bug)
Coordinates were using always 3 digits (1/1000 inch  for mantissa). Uses now 4 digits max in inches and 3 digits max in mm
The resolution is therefore 1/10000 inch or 1/1000 mm. Note this is a limitation of Excellon format.
2012-07-03 15:46:58 +02:00
jean-pierre charras c7f6343bb4 Pcbnew: fix 2 minor issues, noticeable only in debug mode.
When reading board files, the net 0 was stored twice.
It creates only log messges in debug mode, because the list of nets is rebuild after reading files.
2012-06-30 10:20:04 +02:00
Miguel Angel Ajo 08af577218 code cleanup and comments 2012-06-27 23:19:19 +02:00
jean-pierre charras 20f0a5f884 Pcbnew: save/load .kicad_pcb files: fix 2 minor issues.
Use now English layers names to build filenames in plot functions (for techical layers), because translated names create sometimes problems in filenames.
(should do not change anything for English users)
Fix compil issue under wxGTK 2.8.12, created by my recent commit.
Minor changes to make translations easier.
2012-06-27 22:11:04 +02:00
jean-pierre charras 91b0191a02 Pcbnew: save/load .kicad_pcb files: fix 2 minor issues.
Use now English layers names to build filenames in plot functions (for techical layers), because translated names create sometimes  problems in filenames.
(should do not change anything for English users)
2012-06-27 22:07:37 +02:00
jean-pierre charras a6bc4a0dc6 Pcbnew: fix compil issue under wxGTK 2.8.12 2012-06-26 22:18:01 +02:00
jean-pierre charras 047bb44ef5 Pcbnew: minor changes in pcb-parser.cpp and kicad_plugin.cpp to make translations easier.
Code cleaning in autoroute functions.
2012-06-26 19:57:37 +02:00
Jean-Pierre Charras 1b08d1874f Commit JP's custom page size fix for Pcbnew s-expressions file format with minor changes. Thanks JP. 2012-06-25 19:52:57 -04:00
jean-pierre charras 0c946870c5 All: fix a truncation issue in ReturnValueFromString that creates sometimes a small error for values entered in dialogs.
Pcbnew: fix a compatibility issue with nano version for zones parameters.
2012-06-25 22:59:19 +02:00
Miguel Angel Ajo db427cb2cd merge with lp:kicad 2012-06-25 22:51:19 +02:00
Dick Hollenbeck f94a95ab5b use the same format string in the test program as in LEGACY_PLUGIN for record keeping purposes 2012-06-25 09:44:47 -05:00
Dick Hollenbeck e5452a7a39 remove "long double" dependency, mingw was falling over when using it. 2012-06-24 13:41:37 -05:00
Wayne Stambaugh 4019284e66 Minor Pcbnew s-expression improvements.
* Put text effects on a single line.
* Remove size token when defining drill sizes.
* Don't save net in pad definition when pad has no connection.
2012-06-23 21:19:41 -04:00
Dick Hollenbeck e06ce757b7 bzr add test program to verify new conversion strategy 2012-06-23 19:44:02 -05:00
Dick Hollenbeck 4b596cc5f3 legacy_plugin was not round tripping nanometers, add test program to verify new conversion strategy 2012-06-23 18:21:03 -05:00
jean-pierre charras 3a8bf14c9f Fix an issue (only found using gcc under mingw) in dsnlexer.cpp, using ::isspace( ) function that accepts only a 7 bit ASCII value under gcc/ mingw. 2012-06-20 22:33:05 +02:00
jean-pierre charras 025d550955 Pcbnew: small cosmetic enhancement: add a bitmap for zone duplicate command. 2012-06-20 11:57:36 +02:00
Moses McKnight 70c30bce74 Commit patches from Moses McKnight, to avoid duplicate junctions. 2012-06-20 11:52:29 +02:00
jean-pierre charras 52ee7c6e2a Pcbnew: fix incorrect arc export in SVG file export.
Very minor other fixes.
2012-06-19 21:25:41 +02:00
Dick Hollenbeck 0588092184 DIMENSION::m_Value not being saved in LEGACY_PLUGIN using scaling, DIMENSION::AdjustDimensionDetails() uses arrowz appropriate to build 2012-06-18 23:53:08 -05:00
Dick Hollenbeck 8975fd3cf4 a) (zone (fill (mode was wrong, b) put fill on one line 2012-06-18 23:23:42 -05:00
Dick Hollenbeck 5d415c4c4b parsing problem was unbalanced (smoothing) element 2012-06-18 23:08:00 -05:00
jean-pierre charras 1f50b2c767 Pcbnew: Fix an other compatibility issue in kicad nanometers. 2012-06-17 20:29:11 +02: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
Wayne Stambaugh 8c72db6631 Pcbnew s-expression file parser bug fixes and file size improvements.
* Use index when saving layers to handle translated layer names.
* Add LOCALE_IO switcher when loading s-expression format.
* Make SEGVIA default to through hole to improve file size.
* Don't save default orientation of 0 degrees in TEXTE_MODULE and TEXTE_PCB.
* Don't save default zone configuration parameters.
* Save multiple zone corners on a single line.
* Fixed missing ( check in graphic and module arc parsers.
* Consistency improvements for DRAWSEGMENT and EDGE_MODULE objects.
* Minor tweaks to D_PAD formatting.
2012-06-16 18:49:24 -04:00
jean-pierre charras d9ed8a3085 Pcbnew: automatic selection of plugin when loading a file with .kicad_pcb extension from history list.
Very minor other fixes
2012-06-14 21:10:32 +02:00
jean-pierre charras b59cebb2a7 fix incorrect use of KIROUND instead of KiROUND in parseBoardUnits( const char* aExpected ) (see comments in .h file)
very minor fix in pcb_parser.cpp
Fix scaling issue with nanometers in gpcb footprint import.
2012-06-14 08:29:54 +02:00
Andrey Fedorushkov 0c4a026e70 pcbnew: minor fix printf in pcb_parser 2012-06-14 09:34:18 +04:00
Wayne Stambaugh 3b2be428f4 Pcbnew s-expression file parser bug fixes.
* Change save order of drawings to match legacy file format object order.
* Set end point of SEGVIA to start point so the round trip back to legacy
  format is the same.
* Fixed bug saving and loading oval pad drill parameters.
* Fixed bug saving and loading rectangular pad deltas.
* Fixed missing layer for PCB_TARGET.
* Fixed EDA_TEXT italic bug.  Thanks Dick!
* Remove some left over debug logging statements.
2012-06-13 19:04:42 -04:00
Andrey Fedorushkov f7755bdcec pcbnew: show clearance when move or drag via 2012-06-13 17:32:43 +04:00
jean-pierre charras c4c2cd3acd Pcbnew: fix issue about order of tracks this order was modified when reading and writing a board, even without any change in board.
Fix compil warnings and wx28 compatibility.
code cleaning in autoroute functions.
2012-06-11 14:04:34 +02:00
jean-pierre charras 8b210d05ec fix compil warnings 2012-06-11 07:40:52 +02:00
Dick Hollenbeck a71857baaa Commit Dick's Pcbnew s-expression file parser bug fixes.
* Apply Dick's patch along with a few minor changes to fix some clashes with
  changes in my branch.  Thanks Dick!
* Added missing DRAWSEGMENT line angle.
* Fix thru hole pad layer mask issue.
2012-06-10 20:47:15 -04:00
jean-pierre charras 9fea98dd2f Pcbnew: Fix compil issues with wxWidgets 2.8.12
Some code cleaning in autoroute functions.
2012-06-10 18:21:18 +02:00
Dick Hollenbeck d3f9554841 CPolyPt constructors 2012-06-10 04:48:42 -05:00
Dick Hollenbeck b34d8e2150 There was no reason for insertBeforeMe on track loading.
Tracks should be loaded in the same order as they were saved, no exceptions.
This is for the version control system user.
But even with this objective now implemented in LEGACY_PLUGIN, the TRACKS
are still going through a food processor after they are loaded, and the poor
version control system user has no relief, even with this patch.

TRACKS are always modified after being loaded, and I think this needs to be fixed still.
2012-06-09 19:39:40 -05:00
Wayne Stambaugh a2753e85ad Added file include/convert_from_iu.h left out of last commit. 2012-06-09 14:00:30 -04:00
Wayne Stambaugh 2d0d805014 Add Pcbnew s-expression file parser.
* Add s-expression file parser object and keyword files.
* Fix minor issues with s-expression file formatting.
* Fix a minor bug the zone container fill state parsing in the legacy plugin.
* Move EDA_TEXT visibility definition to eda_text.h.
* Add minor BOARD_ITEM object improvements to support s-expression file
  parser.
2012-06-09 13:00:13 -04:00
jean-pierre charras de471744cd Fix some minor bugs in plot functions 2012-06-09 11:38:58 +02: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
Dick Hollenbeck fc9e25fce7 EAGLE_PLUGIN::Load() is now completed. 2012-06-06 21:23:47 -05:00
Dick Hollenbeck 4f471eb569 EAGLE_PLUGIN::Load() is now completed. 2012-06-06 20:49:43 -05:00
Ryan Bunch e07fd7ef82 allow comments in library files 2012-06-06 09:12:39 -05:00
jean-pierre charras f5047b29dd Pcbnew: move files relative to autoroute/autoplace to autorouter folder.
fix nanometer compatibility.
minor code and comments cleaning (although theses files need a lot of code cleaning)
2012-06-05 21:09:30 +02:00
jean-pierre charras be832f8855 Pcbnew: move files relative to autoroute/autoplace to autorouter folder.
fix nanometer compatibility.
minor code and comments cleaning (although theses files need a lot of code cleaning)
2012-06-05 21:07:33 +02:00
Marco Mattila 64c1ea5cec Add missing checks and undo support to pcbnew zone duplication. 2012-06-05 14:44:22 +03:00
Dick Hollenbeck 27d6310cbf EAGLE_PLUGIN: read a portion of the design rules and calculate
pad and via sizes from those settings when diameter is not given
in the local object.  Calculation algorithms are inferred from the
UI help of the Eagle program.

For edge connector type of footprints, some copper pads can be on the
back side even within packages.

Flipping of packages to back was not being done correctly, but I think this 
is working now.

There are still remaining issues with text positioning that I am working on.
2012-06-04 23:39:37 -05:00
Marco Mattila e7817f3e84 Add zone duplication to pcbnew. 2012-06-04 22:04:12 +03:00
Miguel Angel Ajo b5c0cada0d merges tip, conflict resolved 2012-06-03 22:21:53 +02:00
Miguel Angel Ajo 30e251bfba merge 1 with tip 2012-06-03 22:06:51 +02:00
jean-pierre charras e936d3c13a Appying lajos' patch to boost 1.49 2012-06-03 19:41:49 +02:00
jean-pierre charras 2475b2b6f7 Fix eagle_plugin issue (File not found) under Windows. 2012-06-03 17:47:53 +02:00
jean-pierre charras 20a6b7ea70 Eeschema: Fix incorrect display refresh when editing the reference of a component from the popup menu. 2012-06-03 13:16:08 +02:00
Marco Mattila 2455a6cc3b Do some ZONE_CONTAINED encapsulation. 2012-06-03 00:19:17 +03:00
Dick Hollenbeck 57acee0d4e EAGLE_PLUGIN: finish xpath error reporting mechanism for XML document traversal 2012-06-02 12:07:30 -05:00
jean-pierre charras a8c71d4a71 CvPcb: fix focus issue when the display footprint frame is shown (the footprint list loses the focus each time a new footprint is selected, therefore the keyboard cannot be used to select footprints) 2012-06-01 14:03:50 +02:00
Dick Hollenbeck 16e5866611 EAGLE_PLUGIN: load layer definitions, zone parameters, text positions.
Sketch for BOARD::Move().  Pass page_width and page_height to PLUGIN::Save().
2012-06-01 02:39:32 -05:00
jean-pierre charras d1b73df4e7 Cvpcb: code cleaning and minot fix 2012-05-31 19:41:37 +02:00
Dick Hollenbeck c5869705f4 EAGLE_PLUGIN add mechanical "hole" support for both MODULEs and BOARD 2012-05-31 10:18:55 -05:00
jean-pierre charras 808020b1eb Eeschema, Libedit: Fix bug that can crashes Eeschema: In libedit 2 mandatory fields could be deleted. Fixed now.
Very minor other fixes.
2012-05-31 15:47:02 +02:00
Dick Hollenbeck 69905af749 EAGLE_PLUGIN now positions text correct for most cases 2012-05-30 16:40:32 -05:00
Marco Mattila 7bdcad155a Add flip to pcbnew text fields. 2012-05-30 20:38:52 +03:00
Dick Hollenbeck b3fd915f59 add translation to static file filters, comments 2012-05-30 09:14:42 -05:00
Dick Hollenbeck b68fa7cdfd generalize the BOARD loading process PCB_EDIT_FRAME::LoadOnePcbFile() to use any supported PLUGIN 2012-05-29 16:01:17 -05:00
Marco Mattila ad86e50a69 Derive pcbnew find dialog from DIALOG_SHIM. 2012-05-29 23:43:17 +03:00
Dick Hollenbeck f2bd20ab34 Mostly EAGLE_PLUGIN work:
* Derive the pcbnew copper zone and non-copper zone dialog windows from DIAG_SHIM,
  which injects some template code.
* Update UIpolicies.txt to talk about DIALOG_SHIM support.
* Add zone support to eagle_plugin.
* Organize ZONE_CONTAINER class declaration for future privacy and accessors.
2012-05-29 13:10:56 -05:00
jean-pierre charras 52318f6988 Pcbnew: menu Edit/Reset modules fields size: Add dialog to select what modules are modified. 2012-05-29 14:25:10 +02:00
Marco Mattila fd8bfe0cb1 Move pcbnew find dialog into dialogs subdirectory and use wxFormBuilder for it. 2012-05-28 23:01:51 +03:00
Lorenzo Marcantonio 28bcad847e Rename BASE_SCREEN member m_NumberOfScreen to m_NumberOfScreens. 2012-05-26 20:19:12 -04:00
Lorenzo Marcantonio 5e436255af Remove unused definitions in bitmaps.h. 2012-05-25 11:00:51 -04:00
Andrey Fedorushkov d8c14403f2 eeschema: fix set bus width when define KICAD_GOST 2012-05-25 18:33:58 +04:00
jean-pierre charras e6ec9f0a32 Pcbnew: fix crash in legacy_plugin.cpp when reading old lib files.
fix a compil warning.
CvPcb: fix regressions :
 Shows now a void field instead of the dummy footprint name $nonane (whenthere is  no footprint selected in netlist).
 The active footprint selection changes only if a new component is selected from the component file,
 and does not change just when the next component is automatically selected, after a footprint selection.
 Speed up delete association and auto associe.
2012-05-25 08:58:52 +02:00
Lorenzo Marcantonio 925774760c Rationalize numeric time stamps to type time_t. 2012-05-24 21:52:04 -04:00
Dick Hollenbeck 6e78a592f2 more amazing free eagle_plugin work 2012-05-24 10:00:59 -05:00
brian. afdf5258f3 Commit patch from Brian Sidebotham (Bus width value option) 2012-05-24 08:51:52 +02:00
Dick Hollenbeck 76765f2269 more eagle plugin work 2012-05-23 20:18:30 -05:00
Andrey Fedorushkov 43caa734ac Pcbnew: fix control data valid in design rules when define USE_PCBNEW_NANOMETRES 2012-05-23 18:25:15 +04:00
jean-pierre charras cdd60c956e Libedit: fix minor bug: Copy doc not working in Properties dialog. 2012-05-23 12:06:33 +02:00
Dick Hollenbeck aac1010636 more eagle_plugin work 2012-05-22 12:51:18 -05:00
Dick Hollenbeck cb210042b8 fix bug added two revisions ago by me 2012-05-21 13:50:46 -05:00
jean-pierre charras 4812968129 Eeschema: Fix a minor issue in block command
Very minor code cleaning
2012-05-20 21:18:06 +02:00
Dick Hollenbeck 5cda6bc1a6 eagle plugin first work 2012-05-20 08:14:46 -05:00
jean-pierre charras 30c7e31839 Very minor fixes. 2012-05-19 21:04:03 +02:00
jean-pierre charras ea467e6730 Pcbnew: fix bug Bug #1001107 (Solder Mask Ratio Clearance bad value)
Because this bug could create bad values in footprint libraries, this parameter is now checked
when reading a footprint description in legacy format
2012-05-18 10:33:57 +02:00
jean-pierre charras 6d1fe6fe5e Fix 2 minor warning compil (unused variables) 2012-05-16 22:44:21 +02:00
jean-pierre charras 9e7cbed8c1 Fix compil issues with gcc 4.6 and boost 1.49 2012-05-16 18:59:47 +02:00
Dick Hollenbeck 879f85aa7c move boost update script to out of way place, fix bug in it 2012-05-16 07:01:40 -05:00
Miguel Angel Ajo 70df15175b Footprint wizard, plus fixes 2012-05-16 11:35:18 +02:00
Dick Hollenbeck ab001b902a bring in skeleton for eagle_plugin and update boost for use of RapidXML within property_tree 2012-05-15 21:27:27 -05:00
Dick Hollenbeck ffd57d88d7 move all hashtable declarations into include/hashtables.h, prepare for boost usage 2012-05-15 21:00:25 -05:00
Dick Hollenbeck 4a7b5304a0 update to boost 1.49.0 subset 2012-05-15 20:42:04 -05:00
Dick Hollenbeck 84c782fba7 try to delete a footprint library before exporting or creating, quietly 2012-05-15 08:58:55 -05:00
henner zeller 42f1b9e415 commit patch from henner zeller (make EDA_LIST_DIALOG resizable) 2012-05-14 17:23:20 +02:00
jean-pierre charras 40c5a46f38 Libedit: fix Bug #994014.
Pcbnew: fix Pcbnew name capitalization in messages.
About dialog: add a link to kicad-pcb.org
2012-05-13 17:31:58 +02:00
jean-pierre charras 9f41cac041 Remove PCB_INTERNAL_UNIT define because it is no more used in code.
3D viewer: fix incorrect scaling factor when using nanometers.
Very minor other fixes
2012-05-11 11:02:35 +02:00
Miguel Angel Ajo 4dc70b2fc8 wxGrid instead of list, now we do really have values... 2012-05-11 00:30:26 +02:00
Miguel Angel Ajo 4ead38a83d Cosmetic fixes, before moving to wxGrid 2012-05-10 22:49:07 +02:00
jean-pierre charras ff66db7b6f Gerbview: fix incorrect processing of ICI command in Excellon drill files. 2012-05-10 13:02:44 +02:00
Miguel Angel Ajo 351e08c8a9 Footprint wizard UI gets the module from python wizard, and show it 2012-05-10 10:53:05 +02:00
Miguel Angel Ajo eff5023287 * Read string array results from python methods~ 2012-05-10 08:44:08 +02:00
jean-pierre charras f6551172d2 Fix capitalization issues in title bar and config files (broken by bzr rev 3543) 2012-05-10 08:25:27 +02:00
Miguel Angel Ajo c051c1a4a9 footprint wizard UI and footprint wizard lists 2012-05-10 01:04:08 +02:00
Miguel Angel Ajo 23bec4b80b * Footprint wizard UI: Added to module editor.
* Footprint wizard C++ generic classes
* Footprint wizard C++ to python wrappers 
* Automatic plugin loader from ~/.kicad/plugins
* Python plugin architecture: Footprint wizards
2012-05-09 19:37:25 +02:00
Dick Hollenbeck 2e0941a1de Fix some comments. Enhance LEGACY_PLUGIN such that it can tolerate, then fix bad legacy footprint libraries containing duplicate footprint names.
This may have been an undocumented bug from more than a year ago, which manifested itself in *.mod files containing duplicate names.
LEGACY_PLUGIN loads those now quietly, but appends "_v2", "_v3", etc. to each succeeding duplicate sharing the same name.
2012-05-08 19:26:15 -05:00
Dick Hollenbeck 6824dc7199 this helps zooming on some window types 2012-05-08 16:09:18 -05:00
Dick Hollenbeck 40ccdd5763 Fix Pcbnew markers in nanometer build with proper scaling factor. Use double in Zoom() 2012-05-07 16:47:25 -05:00
Dick Hollenbeck fb9e1ea010 Make drawframe.cpp's StatusBar use field widths which are dynamically determined
base on expected text and current window font.

Expand the virtual world to 2.14 meters in the nanometer build of PCBNEW.
This seems to be holding up for now.
2012-05-06 18:32:01 -05:00
Dick Hollenbeck 86e04b4fb3 more nanometer work, see comment at line 66 of pcbnew/classpcb.cpp 2012-05-06 15:10:43 -05:00
jean-pierre charras fda7bbffc3 Gerbview: Fix a compil issue in my last commit. 2012-05-06 21:41:53 +02:00
jean-pierre charras ba96329648 Gerbview: Fix a compil issue in my last commit. 2012-05-06 21:29:52 +02:00
jean-pierre charras f0c50f007c Fix a grid selection issue when starting Eeschema or Gerbview:
Eeschema (also Libedit and Libview) now starts always to the default grid (50 mils)
Gerbview starts with the last selected grid, but the validity is tested.
In Pcbnew the grid value is always displayed, so it should always be good.
2012-05-06 20:04:14 +02:00
jean-pierre charras a3f83d771f Fix grid selection issue when starting Eeschema or Gerbview:
Eeschema (also Libedit and Libview) starts always to the default grid (50 mils)
Gerbview starts with the last selected grid, but the validity is tested.
In Pcbnew the grid value is always displayed, so it should always be good.
2012-05-06 18:55:51 +02:00
Miguel Angel Ajo edee5dc1ce KiCad scripting plugin architecture, footprint wizards first 2012-05-05 22:18:47 +02:00
Dick Hollenbeck 051a7e5733 move import directory to new branch kicad-contrib 2012-05-05 15:06:14 -05:00
Jerry Jacobs 1ad84c07d6 Cosmetic UI changes mostly for Mac OS X, see CHANGELOG.txt 2012-05-05 18:03:21 +02:00
Jerry Jacobs 5f5c504288 Cosmetic UI changes mostly for Mac OS X, see CHANGELOG.txt 2012-05-05 18:02:09 +02:00
Dick Hollenbeck 173c93969d Remove zip library by switching to wxZlibOutputStream for PDF plotter.
Delete LEGACY_PLUGIN cache after deleting library of same name.
Remove automatically generted freerouter help header.
Add Normalize() to BOX2.
Clamp some values in the virtual space of drawframe.cpp
2012-05-04 23:55:36 -05:00
jean-pierre charras f459e4f78d Commit missing files 2012-05-04 20:57:32 +02:00
jean-pierre charras 687a127b97 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 20:16:13 +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
Lorenzo Marcantonio 2fe9a99b8f Commit patch from Lorenzo Marcantonio about plot functions enhancement.
Fix some warning compil issues.
Add zlib sources to avoid build issues under Windows (zlib not installed with mingw).
2012-05-03 22:17:34 +02:00
jean-pierre charras 684d98ecca Add missing files 2012-05-03 21:08:14 +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
Frank Bennett ebcb6d3b82 This import directory contains tools for importing
to Kicad from other EDA tools.

  edif2kicad        / EDIF to EEschema schematic import
    Tools with EDIF out writer:
       o OrCad
       o DataXpress
       o Viewlogic
       o IntuSoft ICAP
       o Protel nVisage
       o PADS ?
       o P-CAD ?
       o EDIF viewer (www.cimmetry.com)
       o EDIF translator (www.elgris.com/content/edif_overview.html)

  pcb123net2kicad   / converts a pcb123 netlist to Kicad default format
2012-05-02 13:58:54 -06:00
Miguel Angel Ajo f114e800a4 support for footprint library operations 2012-05-01 17:13:36 +02:00
jean-pierre charras d26e9ff2e1 Cvpcb: Fix Bug #992429 2012-05-01 12:43:16 +02:00
Miguel Angel Ajo f35037238c merged to testing, fixed some scripting imports 2012-04-30 18:05:22 +02:00
Dick Hollenbeck 3fa7c200b7 Add tools/parser_gen.cpp which is the beginnings of an s-expression parser
generation tool.  For now, it is just an s-expression beautifier using
our "non-specctra mode" version of s-expressions.
2012-04-29 21:57:48 -05:00
jean-pierre charras b322a885a2 Remove old function valeur_param(), that does not work in Kicad Nanometer 2012-04-27 16:41:51 +02:00
jean-pierre charras e96f1aeb3d Remove valeur_param(), that does not work in Kicad Nanometer 2012-04-27 16:15:11 +02:00
jean-pierre charras 9d6c1d12ed Fix some (not all) bad values displayed in NANOMETER mode. 2012-04-27 08:11:41 +02:00
jean-pierre charras cdaa5ceac7 missing change. 2012-04-27 00:04:09 +02:00
jean-pierre charras 8680e9f34a All: change MILS_TO_IU_SCALING_FACTOR constant to IU_PER_MILS ( and MM_TO_IU_SCALING_FACTOR to IU_PER_MM)
Also fix bug 985654.
2012-04-26 23:35:40 +02:00
jean-pierre charras 758f22161a All: change MILS_TO_IU_SCALING_FACTOR constant to IU_PER_MILS ( and MM_TO_IU_SCALING_FACTOR to IU_PER_MM)
Also fix bug 985654.
2012-04-26 23:34:20 +02:00
jean-pierre charras 3b671e09d1 All: change MILS_TO_IU_SCALING_FACTOR constant to MILS_PER_IU ( and MM_TO_IU_SCALING_FACTOR to MM_PER_IU)
Also fix bug 985654.
2012-04-26 22:21:31 +02:00
jean-pierre charras a00df5b330 commit missing files 2012-04-25 21:46:30 +02:00
jean-pierre charras fa3ebc4043 Define MM_TO_IU_SCALING_FACTOR (scaling factor from mm to internal units) only in convert_to_biu.h
Other scaling factors (MILS_TO_IU_SCALING_FACTOR and DECIMILS_TO_IU_SCALING_FACTOR)
also defined only in convert_to_biu.h.
Allows different scaling value for Gerbview.
Needs more tests.
2012-04-25 21:33:24 +02:00
Dick Hollenbeck e3b6385cd3 I was disappointed when I disassembled the code using the KiROUND() inline function
solution to see that it was not pre-computing constants when used in static initializers.

So we have two use cases, and need two solutions to be optimal, since the compiler 
is too stupid to do the right thing.

I think we need something else for compile time computable constants, to be optimal 
in both use cases.  There is quite a bit of code savings by using a macro for that 
situation from my testing.  To fully capitalize on this, we need to go back and make 
Mm2mils() and what not macros also, or have MACRO versions of them too.
2012-04-25 09:12:25 -05:00
Miguel Angel Ajo b939f3bc2f C++ plugin exceptions correctly handled now 2012-04-24 22:28:23 +02:00
Dick Hollenbeck a2f1482192 TODO 2012-04-24 09:23:41 -05:00
Dick Hollenbeck 2140efdce3 Somebody else spelled rectangle as badly as me, fix the mingw build 2012-04-23 21:39:56 -05:00
Dick Hollenbeck 33616f3051 * Add DRECT, DPOINT, and DSIZE (double rect, point, and size) using Torsten's vector2d.h
as a starting point
* Make double Distance() take double arguments and remove internal range checking.
* Start on EDA_DRAW_FRAME::AdjustScrollBars() and use "double" for most all calculations
  in anticipation of setting INT_MAX INT_MIN limits eventually.
2012-04-23 16:56:26 -05:00
Miguel Angel Ajo d719282aaf wxArrayString typemaps, class missing yet 2012-04-23 08:59:37 +02:00
Wayne Stambaugh d8b60a14e1 Pcbnew s-expression file format improvements.
* Move board item object Format() functions into PCB_IO object.
* Change file format to use layer names instead of numbers.
* Change file extension to kicad_pcb.
2012-04-22 11:16:39 -04:00
Miguel Angel Ajo 5157657eba merged to last testing, also added automatic file extension detection on save/load 2012-04-22 13:14:58 +02:00
Miguel Angel Ajo aef92a345c Merged to testing, needs some fixes 2012-04-21 22:04:02 +02:00
Miguel Angel Ajo 42fad8a754 Exceptions handled on board Load/Save 2012-04-20 23:20:56 +02:00
Dick Hollenbeck a9d1f4788b todo 2012-04-19 15:28:54 -05:00
Dick Hollenbeck e594732646 missing include 2012-04-19 15:07:36 -05:00
Dick Hollenbeck c24863c078 // Dick Hollenbeck's KiROUND R&D
// This provides better project control over rounding to int from double
// than wxRound() did.  This scheme provides better logging in Debug builds
// and it provides for compile time calculation of constants.


#include <stdio.h>
#include <assert.h>
#include <limits.h>

//-----<KiROUND KIT>------------------------------------------------------------

/**
 * KiROUND
 * rounds a floating point number to an int using
 * "round halfway cases away from zero".
 * In Debug build an assert fires if will not fit into an int.
 */

#if defined( DEBUG )

// DEBUG: a macro to capture line and file, then calls this inline

static inline int KiRound( double v, int line, const char* filename )
{
    v = v < 0 ? v - 0.5 : v + 0.5;
    if( v > INT_MAX + 0.5 )
    {
        printf( "%s: in file %s on line %d, val: %.16g too ' > 0 ' for int\n", __FUNCTION__, filename, line, v );
    }
    else if( v < INT_MIN - 0.5 )
    {
        printf( "%s: in file %s on line %d, val: %.16g too ' < 0 ' for int\n", __FUNCTION__, filename, line, v );
    }
    return int( v );
}

#define KiROUND( v )    KiRound( v, __LINE__, __FILE__ )

#else

// RELEASE: a macro so compile can pre-compute constants.

#define KiROUND( v )  int( (v) < 0 ? (v) - 0.5 : (v) + 0.5 )

#endif


//-----</KiROUND KIT>-----------------------------------------------------------

// Only a macro is compile time calculated, an inline function causes a static constructor
// in a situation like this.
// Therefore the Release build is best done with a MACRO not an inline function.
int Computed = KiROUND( 14.3 * 8 );


int main( int argc, char** argv )
{
    for( double d = double(INT_MAX)-1;  d < double(INT_MAX)+8;  d += 2.0 )
    {
        int i = KiROUND( d );

        printf( "t: %d  %.16g\n", i, d );
    }

    return 0;
}
2012-04-19 01:55:45 -05:00
Dick Hollenbeck 9a6612c6ec use a block scope to invoke wxFFile's destructor before renaming temporary file 2012-04-18 07:24:40 -05:00
jean-pierre charras f3e171797c Make Gerbview working with USE_PCBNEW_NANOMETRES option ON 2012-04-18 09:07:13 +02:00
Dick Hollenbeck 47a41f9c66 PLUGIN API Doxygen comments 2012-04-17 09:54:48 -05:00
Dick Hollenbeck 72d4b2353b uncrustify math_for_graphics, add copyright legacy_plugin.h 2012-04-17 09:18:14 -05:00
Dick Hollenbeck 597833b55e touch ups 2012-04-17 01:13:22 -05:00
Dick Hollenbeck e88bc8e58b LEGACY_PLUGIN is now in full use:
*) for footprint access into *.mod files and 
*) BOARD save/load

The item_io.cpp and ioascii.cpp have been set off to the side for reference
as *.notused, for awhile.

The CMake options USE_NEW_PCBNEW_LOAD and USE_NEW_PCBNEW_SAVE are gone,
this is now the mandatory usage of the LEGACY_PLUGIN.  This should reduce
code maintenance for awhile until the s-expression plugin comes into 
play.  But at least for legacy format, there is not two code bodies
to maintain any more.

A new LEGACY_PLUGIN footprint library caching scheme is in place which 
needs some testing.  It should not be any faster, but might give better 
results in a networked environment if there is *.mod files on the server.
2012-04-16 22:12:53 -05:00
Dick Hollenbeck 51a83a7a66 cvpcb LEGACY_PLUGIN usage factoring 2012-04-16 21:58:03 -05:00
Dick Hollenbeck 3341669fc6 more footprint support for LEGACY_PLUGIN 2012-04-16 20:35:43 -05:00
Wayne Stambaugh bf5802f1f7 Removal of internal units.
* Remove internal units from BASE_SCREEN and it's derivatives.
* Remove internal units from EDA_DRAW_FRAME and it's derivatives.
* Use build time code to replace internal units conversions.
* Fix scaling bug in page layout sample window that I created in my
  last commit.
2012-04-16 19:31:29 -04:00
Wayne Stambaugh 6468805c27 More internal unit improvements.
* Move all convert from user to internal units into base_units.cpp.
* Remove internal units parameters from all moved conversion functions.
* Revise all source code that calls the moved conversion functions.
* Remove internal units from all dialog text control helper classes.
2012-04-16 13:39:32 -04:00
jean-pierre charras 5d5eb7d38c Fix a serious bug in EDA_RECT::Intersects
Kicad manager: code cleaning. Dead code removed and minor fixes. support of new .kicad_brd extension.
2012-04-16 14:56:01 +02:00
Dick Hollenbeck a42490e0f3 work on footprint plugin API 2012-04-15 22:18:41 -05:00
Wayne Stambaugh 8c0dc01fdd Pcbnew nanometer internal unit fixes.
* Scale page reference border and title block, grid sizes, and zoom factors
  correctly for nanometers.
2012-04-15 21:25:26 -04:00
lajos kamocsay add5321328 Commit patch fixing an issue in pan with middle mouse button (from lajos kamocsay)
Other minor fixes.
2012-04-15 12:33:35 +02:00
Miguel Angel Ajo 55c0eafd6f merged testing branch 2012-04-14 23:18:27 +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
jean-pierre charras b28e976e35 Eeschema: BOM list generation: some fixes and enhancements.
drawframe.cpp: commit a fix about scrollbars  from lajos kamocsay
2012-04-13 20:44:02 +02:00
Wayne Stambaugh bed96be750 Internal unit improvements and Pcbnew s-expression file format changes.
* Move EDA_TEXT object into separate header and source file.
* Compile EDA_TEXT class separately for BOARD_ITEM and SCH_ITEM units.
* Compile PAGE_INFO  class separately for BOARD_ITEM and SCH_ITEM units.
* Minor formatting tweaks to Pcbnew s-expression file.
* Move internal unit formatting functions into BOARD_ITEM and SCH_ITEM.
2012-04-12 17:31:31 -04:00
lajos kamocsay 38ea600803 Fix small issue when panning with middle button. 2012-04-12 09:58:12 +02:00
Dick Hollenbeck b4bb924eab fix comment 2012-04-11 18:51:16 -05:00
Dick Hollenbeck 1121b9cc3c * Coding standards, private functions are lowercase.
* Fix bug in PCBNEW dialog_pad_properties.cpp that I introduced several days ago.
  The m_Master_Pad stuff is stored in the PCB_EDIT_FRAME's BOARD_DESIGN_SETTINGS,
  not in the FOOTPRINT_EDIT_FRAME's BOARD_DESIGN_SETTINGS (i.e. not stored in 
  the module editor's dummy BOARD).  Now we properly initialize the
  DIALOG_PAD_PROPERTIES::m_Pad_Master reference to the correct master pad
  dope, instead of to the dummy module BOARD's master pad, which is not used.
2012-04-11 18:30:06 -05:00
jean-pierre charras 7bd6c82cf0 Eeschema: fix a bug in my previous commit. 2012-04-11 23:01:20 +02:00
jean-pierre charras f0dc54340d All: new middle mouse pan feature, from lajos kamocsay (and jp charras for some enhancements).
If enable in preference menu, allow the pan with drag mouse with middle button down.
both unlimited and limited pan is allowed.
2012-04-11 20:54:20 +02:00
Dick Hollenbeck 0df3793329 handle negative constants 2012-04-11 10:50:17 -05:00
lajos kamocsay a20372579c This is some boost weirdness. 2012-04-11 09:55:40 -05:00
Dick Hollenbeck a0c80381f2 improve comments in specctra stuff 2012-04-11 09:49:11 -05:00
jean-pierre charras 36dac0c14d Pcbnew nanometer: fix hatch lines issue in polyline.cpp
Some minor code cleaning.
2012-04-11 11:47:57 +02:00
Dick Hollenbeck e730219b31 add PCNBEW nanometer support to specctra round-tripper, use micro-meters to do it. 2012-04-10 11:28:26 -05:00
Dick Hollenbeck 6652845683 remove #include <auto_ptr.h> 2012-04-09 08:56:30 -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
Miguel Angel Ajo a201522f6b lajos kamocsay compilation patches 2012-04-09 08:53:24 +02:00
Miguel Angel Ajo 0cdc5c59ab detect building status of the swig .py file (on parallel make builds). Fix unit conversion returns (From_xxx) to integer, what's all the wxPoint/wxRect/wx.. expect. Extended createPcb.py example 2012-04-09 08:19:57 +02:00
Alexander Zakamaldin f2f0f66a50 This bug is not evident for the first glance because most PS viewers fix this issue and print well.
But when using raw printing (for linux - 'lpr some_file.ps') the bug gets out.

Alexander.
2012-04-08 18:37:26 -05:00
Dick Hollenbeck 9e980d916f Add DMils2iu() for scaling deci-mils to internal units.
Instrument saveNETCLASS() with fmtBIU().
Can now round trip to mm board file using LEGACY_PLUGIN in DEBUG build.
2012-04-08 18:32:32 -05:00
Dick Hollenbeck 149f6d807d *) Change LEGACY_PLUGIN to respect saving and loading of UNDEFINED_DRILL_DIAMETER.
*) Allow building without defining 
        USE_NEW_PCBNEW_LOAD & USE_NEW_PCBNEW_SAVE.
	pcbnew/files.cpp would not link.
2012-04-08 14:01:54 -05:00
Miguel Angel Ajo 1f108b0b6c missing script 2012-04-08 17:00:15 +02:00
Miguel Angel Ajo 946ddbaa08 Fix units.i and add some extra wrappers wxSizeMM, wxSizeMils wxRectMM wxRectMils 2012-04-08 16:59:12 +02:00
Miguel Angel Ajo be15057977 Fixed wxSize bug, wxPoint(double,double) support, units. Fixed GetBoard wasn't accessible at every build. Extended example for board creation (now adds pads). Also fixed the _pcbnew loading from pcbnew which should only go to the internal _pcbnew and not the _pcbnew.so/dso. Right installation path for _pcbnew.so (in linux only) 2012-04-08 16:25:49 +02:00
Wayne Stambaugh 9c16a218c0 Pcbnew s-expression file format changes.
* Save dialog now supports saving boards to new file format.
* Add CMake option to build s-expression file save.
* Add check to main CMakeList.txt file to make sure nanometers are
  enables when the new file format is built.
* Minor tweaks to object format functions for improved output.
* Rename kicad_plugin.h/cpp to legacy_plugin.h/cpp.
2012-04-07 14:05:56 -04:00
jean-pierre charras 6976d2538f remove old xpm icons, no more used. 2012-04-07 16:34:56 +02:00
jean-pierre charras d739f03c5f Remove old xpm icons files 2012-04-07 13:09:57 +02:00
Miguel Angel Ajo 7c8bfab5ca TODO.txt updated 2012-04-06 22:42:39 +02:00
Miguel Angel Ajo 485ec24f61 Add method for MODULE in python that takes care of memory handling 2012-04-06 22:38:32 +02:00
Miguel Angel Ajo b54acf607a example for pcb creation in scripting 2012-04-06 21:48:00 +02:00
Miguel Angel Ajo 96c1a50e00 BOARD::Add now it's wrapped in python and clears the .thisown flag on python to avoid GC from deleting the object later (BOARD will do) 2012-04-06 21:46:45 +02:00
Dick Hollenbeck 1effb1fefc USE_NEW_PCBNEW_LOAD and USE_NEW_PCBNEW_SAVE are enabled by default.
This uses the new LEGACY_PLUGIN, so we can force more usage & testing of it
before ioascii.cpp and item_io.cpp are deleted, along with 
BOARD_ITEM::Save() and BOARD_ITEM::ReadDescr() associated functions.
2012-04-06 14:31:28 -05:00
Miguel Angel Ajo 173b869dcb Compilation cleanup, TODO.txt update about library creation 2012-04-06 20:13:03 +02:00
jean-pierre charras 571bca200b Pcbnew: fix Bug #975014 2012-04-06 20:03:16 +02:00
Miguel Angel Ajo 3f761c890c Added wxRect and wxSize wrappers to wx.i 2012-04-05 23:41:45 +02:00
jean-pierre charras 100ea3a59b Finish Pcb Calculator work 2012-04-05 20:56:06 +02:00
Dick Hollenbeck 3d6437863c todo 2012-04-05 13:29:42 -05:00
Dick Hollenbeck f8490ff4af Remove g_PcbPlotOptions, use wxformbuilder to subclass DIALOG_SHIM on several dialogs 2012-04-05 13:27:56 -05:00
Andrey Fedorushkov e4309287bf pcb_calc: fix build in linux distrib Mageia1 with wxgtk2.8-2.8.11-4.mga1 2012-04-04 21:08:16 +04:00
jean-pierre charras 70cf189132 pcb_calculator: fixes and enhancements (not finished) 2012-04-03 20:26:05 +02:00
jean-pierre charras 7ce97878e8 pcb_calculator: enhancement in Regulators page dialog:
* support for 3 terminal regulators
* add a data file management to store parameters for regulators ( name, vref value, Iadj value, type)
Needs some refinements, but it is already very useable.

 Commit dialog page setting patch from Alexander Zakamaldin
2012-04-02 20:11:00 +02:00
Wayne Stambaugh d7feb9ab45 Initial Pcbnew s-expression file format commit.
* Add s-expression Format() function to all objects derived from
  BOARD_ITEM.
* Add s-expression Format() function to base objects as required.
* Add functions to convert coordinates from base internal units
  (nanometers) to millimeter string for writing to s-expression
  file.
* Add temporary dummy conversion functions to prevent link errors
  until schematic and board object and action code can be separated
  into DSO/DLL.
* Add CMake build option to build Pcbnew with nanometer internal
  units.
2012-04-01 16:51:56 -04:00
Alexander Zakamaldin 57ede4aff4 fix minor issue a page layout in GOST mode 2012-03-29 08:47:29 +04:00
jean-pierre charras 4882d5459a Libedit, dialog edit pin: fix wxDialogs tabbing order 2012-03-28 18:53:02 +02:00
jean-pierre charras e356e6dc6b Fix issues about translations:
Eeschema: one string with a bad char (\a, not useable in internationalized strings).
Dialog_page_settings: use not translated strings in code, so strings can be freely translated for the UI.
(Initial code was not working with existing translations)
Update 2 icons.
2012-03-27 18:41:13 +02: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
Alexander Zakamaldin 005a13fef3 Alexander's patches, with refinements from Dick 2012-03-26 16:52:53 -05:00
Alexander Zakamaldin 625e964c8d Alexander's patches, with refinements 2012-03-26 16:45:05 -05:00
Fabrizio Tappero acc07c338c Update icons 2012-03-24 16:38:55 +01:00
jean-pierre charras cf9864766b class EDA_RECT: is no more derived from EDA_ITEM, just from EDA_RECT (reason: does not use anything in EDA_ITEM)
issue in cast to wxRect fixed (EDA_RECT accepts negative size, but not wxRect, so the wxRectcast  is normalized now).
This fixes some bugs.
A minor other bug fix in Pcbnew.
2012-03-24 15:25:30 +01:00
Dick Hollenbeck b01bcda079 Backout my usage of DIALOG_EXTEND_WITH_SHIM in favor of wxFormbuilder's
subclass DIALOG_SHIM support.
Tried dialog_drc but it has nesting problems due to use of DRCLISTBOX, which
needs to be put into its own header file to untangle.
2012-03-22 13:36:20 -05:00
Dick Hollenbeck 31a84b84ec Add include/dialog_shim.h and common/dialog_shim.cpp for use by wxformbuilder's "subclass a wxDialog" support.
This works, but in my version of wxformbuilder there is a bug which does not properly show the 
subclass property, even though it is still in play.  This happens after saving then loading the *.fbp file.
So it is a nuisance bug, but does not affect functionality.
2012-03-22 02:02:49 -05:00
jean-pierre charras fda20d28d8 Pcbnew: Allows an offset for SMD type (and CONNECTOR type) pads. 2012-03-20 21:22:38 +01:00
Andrey Fedorushkov 00e6f01584 eeschema: add forgotten major fix in bzr3471 2012-03-20 19:19:07 +04:00
Andrey Fedorushkov b8a2c4e240 eeschema: fix sorting parts generate BOM "Single part per line" 2012-03-20 18:41:57 +04:00
jean-pierre charras f49c27798e Update some icons with new icons from Fabrizio Tappero.
Remove 2 duplicate icons.
Minor cosmetic enhancements and fixes in popup menus.
2012-03-20 15:17:58 +01:00
Miguel Angel Ajo 6d643f70b5 Fixed Board.Save, listPcb.py +x and updated TODO.txt 2012-03-20 07:34:23 +01:00
Dick Hollenbeck df494fc83e start toying with DIALOG_SHIM 2012-03-19 15:57:19 -05:00
Dick Hollenbeck 87aa22f13f quiet warnings, add Clamp() 2012-03-19 11:29:24 -05:00
Miguel Angel Ajo cd93e14d7d fixed DEBUG build dependency... 2012-03-19 16:39:50 +01:00
Miguel Angel Ajo 9ebe983eaa * cleanups: board.i board_item.i separated from pcbnew.i
* dlist.i empty list fixed (Segfault)
* units.i: FromMM FromMils ToMM ToMils
* added a little example (listPcb.py) that shows most items in a board
2012-03-19 12:21:29 +01:00
Miguel Angel Ajo 9398eb9767 std::vector and std::string items
DLIST iterator code, now we can do:

    for module in pcb.m_Modules:
    	print module.GetReference()

instead of:

    module = pcb.m_Modules

    while module:
	print module.GetReference()
	module = module.Next()

or even:
    module_list = list(pcb.m_Modules)
2012-03-19 09:36:38 +01:00
jean-pierre charras b5cac30abd Eeschema: fix a bug in bool SCH_LINE::MergeOverlap( SCH_LINE* aLine ): ends point of resulting segment incorrects.
remove unused icon files.
2012-03-19 08:48:29 +01:00
Miguel Angel Ajo 7a25604161 fixed ident tabs 2012-03-19 08:40:43 +01:00
Miguel Angel Ajo b28dbd31c3 Cast() method to cast down classes from BOARD_ITEM to all childs 2012-03-18 22:35:51 +01:00
Miguel Angel Ajo c0be31aeda Fixed some indent, and added some conditional compiles on pcbnew.cpp 2012-03-18 10:09:51 +01:00
Miguel Angel Ajo 06c570bab3 * More cleanup (common wrappers moved to scripting, instead of pcbnew/scripting)
* Added a first test 'testLoadSave.py'
2012-03-17 18:30:03 +01:00
Miguel Angel Ajo f422350605 pcbnew_scripting_helpers.cpp/h to handle generic scripting tools
CMakeLists.txt options to build scripting or scripting modules
2012-03-17 16:17:13 +01: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
Joe Ferner ffbbd64c73 Joe Ferner's merge 2012-03-16 22:01:53 -05:00
Dick Hollenbeck 5080d4cc3e cleanups 2012-03-16 21:11:44 -05:00
jean-pierre charras 6dc85d1c96 Eeschema: fix bug Bug #956818 2012-03-16 20:08:57 +01:00
Joe Ferner aad54ec406 Added a toolbar button to cvpcb to filter by pin/pad count. 2012-03-15 14:20:22 -04:00
Wayne Stambaugh 6375497825 Hit test method rationalization and other minor improvements.
* All objects derived from EDA_ITEM now have consistent hit test method
  definitions.
* Remove double function calls from all classes derived from SCH_ITEM.
* Lots of Doxygen comment fixes.
2012-03-15 10:31:16 -04:00
jean-pierre charras e56f76dbcf Update compiling.txt doc. 2012-03-15 09:56:55 +01:00
Andrey Fedorushkov 389656e58c all: add display distance to local coordinates in status bar 2012-03-13 13:33:39 +04:00
Dick Hollenbeck 72e9106481 todo 2012-03-12 10:18:32 -05:00
jean-pierre charras 396538e176 Eeschema: minor fixes:
* make 2 bitmaps more visible.
* fix incorrect screen redraw when rotating a component.
* netlist : the pcbnew advanced format can be now stored (persistant option) in project config.
2012-03-12 11:04:40 +01:00
Dick Hollenbeck 2e29b4f152 * Add PCB_EDIT_FRAME::syncLayerVisibilities(), PCB_LAYER_MANAGER::SyncLayerVisibilities().
* Save all visibilities, layer and render, in BOARD and restore on load.
2012-03-11 19:40:48 -05:00
Miguel Angel Ajo 970e033399 build _pcbnew DSO/DLL 2012-03-11 20:48:43 +01:00
Miguel Angel Ajo ec5757a4fa code cleanup, io_mgr and kicad_plugin included when enabled in cmake... 2012-03-11 20:07:10 +01:00
Miguel Angel Ajo 562d2461aa wxString, wxPoint and wxChar wrappers 2012-03-10 22:40:41 +01:00
jean-pierre charras 3976d5087e Pcbnew: Fix Bug #951414 (Windows specific)
Ckecks more pad parameters in pad editor dialog (previously not tested, so a pad could have some very incorrect parameters)
2012-03-10 14:00:31 +01:00
jean-pierre charras c047d7f484 Pcbnew: regression fix when using the new netlist format:
* when a footprint has  many pads having the same pad name, only the first pad was connected to the net
2012-03-10 08:58:21 +01:00
jean-pierre charras 909c2a6051 Dialog exit: better icon.
Pcbnew:
 * graphic_item_properties_base.fbp * dialog pad edit: make some strings more easier to translate.
 * global pad edition: fix a bug that change pad position instead of pad size (round pas only).
Eeschema:
 * fix a bug: new created wires were not alwaes shows until the screen was redrawn.
2012-03-09 19:58:58 +01:00
Marco Mattila 672b55fd05 Fix compilation issue with KicadSVGFileDC. 2012-03-08 22:47:09 +02:00
Marco Mattila a731a6b712 Add more pad local copper zone settings in pcbnew. Tune the pad properties dialog a little. 2012-03-08 22:44:03 +02:00
jean-pierre charras e90cc8adf5 All: added a standard exit dialog called by int DisplayExitDialog( wxWindow* aParent, const wxString& aMessage )
Called when closing pcbnew, cvpcb and eeschema.
Minor code cleaning: remove duplicate or not used strings (mainly file extensions and wildcards)
2012-03-08 18:47:23 +01:00
jean-pierre charras 5e5ec6f1a9 All: try to fix incorrect acs in plot SVG under wxWidgets 2.9:
wxWidgets 2.9 knows wxSVGFILEDC device context.
Unfortunately, arcs are drawn as pies (this is a feature, not a bug).
This is not correct for Kicad.
So Kicad has its own wxSVGFILEDC (named KicadSVGFileDC) that is basically the same as wxSVGFILEDC,
but with arcs drawn as arcs, not pies.
Note also under wxWidgets 2.8 does not know wxSVGFILEDC , so kicad had already its own SVG device context.
2012-03-07 21:18:00 +01:00
Dick Hollenbeck db7c8cfd92 remove clamping from PAGE_INFO setters 2012-03-06 14:10:12 -06:00
jean-pierre charras ed5585eb6c Libedit: fix bug (svg export does not work)
other minor fixes.
2012-03-06 15:08:59 +01:00
Miguel Angel Ajo 3dacab9691 wxPoint + more lists 2012-03-05 23:49:49 +01:00
Alexander Zakamaldin f13e020314 Problem with the Help link "getting started in kicad" 2012-03-01 09:53:34 -06:00
Miguel Angel Ajo b21dbd9561 Added a starting scripting dialog for tests 2012-03-01 08:21:53 +01:00
Dick Hollenbeck c41752fdf4 Load BOARD project settings before loading BOARD in case BOARD has
any configuration overrides.

Call SetDesignSettings() in PCB_BASE_FRAME::ReadSetup().
2012-02-29 09:25:38 -06:00
Miguel Angel Ajo d7692cd115 SWIG+Python initial scripting support added.
It does nothing but loading and initializing right now.
2012-02-28 22:30:46 +01:00
jean-pierre charras 75d2dc7311 Pcbnew: Hight contrast mode: commit last patch from Miguel Angel Ajo Pelayo, which also fixes an old bug.
All: prepare better compatibility with wxWidgets 2.9.4. Works fine with 2.8.x (I hope...)
2012-02-28 21:14:17 +01:00
Wayne Stambaugh 4a7394038f Minor Eeschema LIB_ITEM object improvements. 2012-02-27 18:02:08 -05:00
Wayne Stambaugh 07e5eee133 Fixes wxSingleChoiceDialog ambiguous constructor compile bug using wxWidgets 2.9.4 or greater. 2012-02-26 14:57:48 -05:00
jean-pierre charras 6219291ddc ModEdit (and ModView): make "invisible" texts visible. They are not visible in the board editor, but must be visible in the footprint editor.
Minor doc update.
2012-02-26 19:49:00 +01:00
Wayne Stambaugh aaa1cc3e02 Eeschema object list and other minor improvements.
* Convert Eeschema from manually linked list to DLIST for storing
  SCH_ITEM objects.
* Add helper functions to SCH_SCREEN for appending list of SCH_ITEM
  objects.
* Fix bug in wire editing code for accurate undo/redo behavior.
* Add member to DLIST to append another DLIST.
* Other minor code cleaning.
2012-02-26 13:39:39 -05:00
jean-pierre charras a1ff326181 Pcbnew: better icon for zone unfill. Minor code cleaning in 3D viewer 2012-02-25 20:55:40 +01:00
jean-pierre charras bfe4937162 Pcbnew: fix compil issue. 2012-02-25 08:55:14 +01:00
Marco Mattila b536b1cf82 Add module and pad local parameters for pad-zone connections (thermal, solid etc.) in pcbnew. 2012-02-25 01:23:46 +02:00
Simon Schubert bcd66579d9 Pcbnew: fix bad arcs in plot postscript (from Simon Schubert) 2012-02-24 18:17:03 +01:00
Marco Mattila 23aea616e0 Fix wxUniCharRef casting issue in eeschema single part per line BOM generation code (?). 2012-02-24 17:00:56 +02:00
Marco Mattila d57a12772a Add correct value sorting (1u < 1n) to bom exports. 2012-02-24 01:57:29 +02:00
jean-pierre charras 2ecda37806 Pcbnew: zone filling: fix broken thermal relief shape for oval pads. mainly noticeable for oval pads having very different X and Y sizes. 2012-02-23 15:59:57 +01:00
Marco Mattila 165cbf1149 Fix compiler warnings introduced in 3430. 2012-02-23 14:54:54 +02:00
Marco Mattila 39ba360861 Fix eeschema component drawing issue during copy. Add hotkey for block save. 2012-02-23 01:35:26 +02:00
Dick Hollenbeck 4154af55e1 Uncrustify 0.59 has some new options, it is still actively supported, now under GIT. 2012-02-22 16:00:55 -06:00
Marco Mattila 97884551f0 Make single part per line BOM generation compare all component fields. 2012-02-22 23:37:34 +02:00
jean-pierre charras 0a68744e2d Eeschema: Add better dialog to edit an existing field of the current edited component. 2012-02-22 15:04:48 +01:00
jean-pierre charras 718b25656c Libedit: Add better dialog to edit an existing field of the current edited component. 2012-02-21 18:47:30 +01:00
Dick Hollenbeck 76e2efedb2 remove unneeded debug printf 2012-02-21 09:58:24 -06:00
Dick Hollenbeck 30ecdbea6a fix infinite loop while generating drill file, bug introduced in 3419 2012-02-21 09:51:11 -06:00
jean-pierre charras 477e98dc6c Fix 2 minor bugs:
* Pcbnew: in hight contrast mode the 'V' hotkey did not always refresh the screen.
* Eeschema: incorrect print scale when the option 'Show page limits' is disable.
2012-02-20 19:46:56 +01:00
Dick Hollenbeck aaa62cddf3 update TODO.txt with personal items 2012-02-20 09:21:42 -06:00
Dick Hollenbeck b6cae6fe86 Miguel's changes 2012-02-20 08:43:49 -06:00
Dick Hollenbeck c2fa1b8816 * Remove virtual BOARD_ITEM::{Get,Set}Position() which in turn means all
derived classes' implementations of these functions become non virtual and
    can be truly _inlined_ for speed!  All GetPosition() in derived classes were also
    changed to return const wxPoint&, that is, a reference rather than a
    full copy of the position wxPoint. There was no need for polymorphism in
    {Get,Set}Position() since we never call these functions via generic pointer.
  * Remove BOARD::{Get,Set}Position() since they were only there to satisfy
    the pure virtuals established in BOARD_ITEM, which are now gone.
  * Added const wxPoint& CPolyLine::GetPos(), made CPolyLine::Get{X,Y}() inline.
  * Derive CPolyPt from wxPoint so we can return "const wxPoint&" fromt
    CPolyLine::GetPos().
2012-02-19 22:48:25 -06:00
Dick Hollenbeck 107ef8f102 see CHANGELOG.txt 2012-02-19 22:33:54 -06: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
Marco Mattila 9ef6ae5b49 Use wxStandardPaths to find out the path to binaries in linux. 2012-02-19 21:13:53 +02:00
Miguel Angel Ajo 6c0c4dbeb5 Added hotkey for high contrast mode as 'H' 2012-02-19 18:33:06 +01:00
Dick Hollenbeck 5208bf9976 * remove global g_Pad_Master global and put it into BOARD_DESIGN_SETTINGS
which is in turn already within BOARD.
  * encapsulate class D_PAD with accessors, making data private.
  * make D_PAD::GetBoundingRadius() do its longer calculation lazily, based on
    m_boundingRadius == -1.
2012-02-18 22:10:49 -06:00
Dick Hollenbeck 9e2eb0c856 see CHANGELOG.txt 2012-02-18 22:02:19 -06:00
jean-pierre charras 827352511a Layers manager: add in popup menu option to hide all coppers layers but active layer.
Design rules: increase number of vias and tracks sizes
Pcbnew: netlist reader: change from my recent commits to keep netnames in pads for footprints not in netlist
(allow an user to place some footprints by hand, set pads netnames and do not lost these netnames when loading a netlsit)
Fix other very minor issues.
2012-02-17 20:43:43 +01:00
jean-pierre charras ba689c10e3 Kicad project manager: add .cmp, .drl .pos and .rpt files management.
Code cleaning and other minor fixes.
2012-02-16 21:03:33 +01:00
Dick Hollenbeck 35ddad2193 wxWidgets Debug builds apparently have some tricky technique to validate
the match between wxString::Format() or wxString::Printf() format strings
with passed arguments, but does this at runtime, not compile time.
Fix some mismatches.  size_t is a 64 bit type on x86_64 whereas int and
unsigned are 32 bit types.  On 32 bit machines they are all 32 bits so
this error is probably not triggered.
2012-02-16 00:17:01 -06:00
jean-pierre charras 4082e12252 Cvpcb: fix compil error. 2012-02-15 17:28:33 +01:00
jean-pierre charras a7d7e8dcc6 Pcbnew: fix Bug #932509 2012-02-15 14:10:52 +01:00
jean-pierre charras 2153f4d1e2 Pcbnew: footprint placement file creation:
* Added a dialog to select options: one or 2 files, units (mm or inch), and force INSERT option.
 * code cleaning
 * Modify corresponding  icon in menu to show a footprint, not a schematic component.
2012-02-15 11:41:16 +01:00
jean-pierre charras 74aecb3e72 Icons for modedit and modview: remove unused or duplicate icons files and rename files. Tweak some icons. 2012-02-13 15:27:34 +01:00
jean-pierre charras 197ace9e44 Modedit: add dialog to edit footprint body items. Fix also minor issues about footprint body items edition. 2012-02-12 20:39:37 +01:00
Fabio Varesano 1393e5c38e there was a 0 more in the scale factor for
the millimeters. The attacched patch fixes this and also the comments 
on the generated file to have "Unit = mm" instead of Inches.
2012-02-11 12:54:36 -06:00
jean-pierre charras d7da6083e4 CvPcb: serious code cleaning. More comments. Remove useless files and some files renamed with a better name. 2012-02-11 10:04:26 +01:00
Dick Hollenbeck 2082fbba4f fix some warnings in Debug mode under wx 2.9.x 2012-02-10 16:26:42 -06:00
jean-pierre charras 72605c343b Modview: fix minor issues. 2012-02-10 16:31:11 +01:00
jean-pierre charras 623ae37f22 Pcbnew - ModView: add 3D view, and fix issues. 2012-02-10 09:49:43 +01:00
jean-pierre charras fa470d5c4a Pcbnew: Added: modview. This footprint viewer frame which has the same purpose as Viewlib in Eeschema.
this viewer is built using the new  FOOTPRINT_VIEWER_FRAME class.
2012-02-09 21:33:38 +01:00
Dick Hollenbeck 54e221cfad fix portion of bug 928330 mentioned in comment #2 2012-02-09 09:00:37 -06:00
Dick Hollenbeck b90d657cb8 fix bug 921553 2012-02-08 09:06:06 -06:00
Dick Hollenbeck 822e5db5dc fix 2012-02-07 11:36:24 -06:00
Dick Hollenbeck be57e57ee4 typos 2012-02-06 09:31:36 -06:00
jean-pierre charras 3da1b75c67 Pcbnew: fix Bug #927293. fix compil issue with wxWidgets 2.9.3 2012-02-06 10:10:32 +01:00
Dick Hollenbeck 398607a658 * move globals into BOARD:
bool g_Zone_45_Only, is now in BOARD::m_zoneSettings.m_Zone_45_Only
    ZONE_SETTINGS g_Zone_Default_Setting is now in BOARD::m_zoneSettings
  * Changed classs ZONE_SETTING to class ZONE_SETTINGS.
  * Changed ZONE_SETTINGS::Import() to operator << ( ZONE_CONTAINER )
  * Added BOARD::{Get,Set}ZoneSettings().
  * Added PCB_BASE_FRAME::{Get,Set}ZoneSettings().
  * Save/load BOARD::m_zoneSettings.m_Zone_45_Only to/from BOARD file.
  * Removed PCB_EDIT_FRAME::InstallDialogNonCopperZonesEditor() in favor of
    ::InvokeNonCopperZonesEditor() declared in zones.h
  * Added ::InvokeCopperZonesEditor() declared in zones.h
  * Removed dialog_copper_zones.h since DIALOG class is now declared in *.cpp.
  * Renamed to enum ZONE_EDIT_T in zones.h
  * SetVisibleAlls() is not called as it was in two previous cases for several
    reasons.  BOARD_DESIGN_SETTINGS constructor controls what is visible initially.
    and in the near future so will the *.brd file.  I believe the user should
    have visibility setting rentention accross editing sessions of zones,
    fields, etc.
  * BOARD_DESIGN_SETTINGS constructor initializes hidden text as not visible.
  * Added PCB_EDIT_FRAME::SyncRenderStates() and PCB_LAYER_WIDGET::syncRenderStates()
    so the checkboxes can be set after loading a BOARD file containing previous
    visibility settings.
2012-02-06 01:16:47 -06:00
Dick Hollenbeck e7b3ed2e88 merge 2012-02-06 01:14:51 -06:00
Dick Hollenbeck 6c04e60587 see CHANGELOG.txt 2012-02-05 23:44:19 -06:00
jean-pierre charras 08ef741770 Undo redo change and code cleanup. 2012-02-05 14:02:46 +01:00
jean-pierre charras 8e846082bb Pcbnew: Fix incorrect behavior of undo/redo command (this issue happens only when a new track is created, and an old redundant track is deleted)
Minor code cleaning
2012-02-04 21:30:00 +01: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 cc46daa67f CHANGELOG.txt 2012-02-02 01:33:53 -06:00
Dick Hollenbeck 7b658917ab Remove:
-wxSize         g_ModuleTextSize;      /* Default footprint texts size */
  -int            g_ModuleSegmentWidth;
  -int            g_ModuleTextWidth;

and add similarly named variables to BOARD_DESIGN_SETTINGS, which are 
in a BOARD.
2012-02-02 01:25:21 -06:00
Dick Hollenbeck 1ca894584c put module text configuration variables into the BOARD 2012-02-02 01:23:00 -06:00
jean-pierre charras 2b3b2fc0cf commint forgotten file 2012-02-01 21:17:43 +01:00
jean-pierre charras f9e2f9dc77 Pcbnew and Cvpcb: more about new netlist support: see CHANGELOG (important changes).
Also commit updated icnos from Fabrizio.
2012-02-01 20:49:37 +01:00
Andrey Fedorushkov 9eb7cba156 revert my bug commit 3389 2012-02-01 15:53:32 +04:00
Andrey Fedorushkov c5f104a548 fix bug plot arc to dxf-format in back_silkscreen, comment and draw layers 2012-02-01 15:42:18 +04:00
Andrey Fedorushkov 0c00c88f11 fix DXF plot arc 2012-02-01 13:36:43 +04:00
Dick Hollenbeck f6f52d87e4 document KICAD_T enum better, remove PCB_ZONE_EDGE_T usages 2012-01-30 15:21:40 -06:00
Dick Hollenbeck 98b5cddab0 support new zone field ZPriority in kicad_plugin.cpp, enhance TESTLINE() so it does not match substrings 2012-01-30 09:53:28 -06:00
jean-pierre charras 60fb3fb7f7 Pcbnew: added a priority level for zones: a zone with a hight priority can be now inside an other low priority zone.
useful for complex zones.
fix in footprint copy.
minor enhancement in netlist/ Footprints Test.
2012-01-30 14:43:02 +01:00
jean-pierre charras e630672397 Pcbnew: Minor fix and enhancement. 2012-01-30 14:25:46 +01:00
jean-pierre charras ee8d721c3c Add priority level to zones. 2012-01-29 20:29:19 +01:00
jean-pierre charras c0d39da548 New netlist format: Cvpcb: code cleaning. Pcbew: minor enhancements 2012-01-28 20:25:59 +01:00
jean-pierre charras 72ab517400 Restore INSTALL.txt, erroneously removed.
Pcbnew: minor code change in netlist functions.
2012-01-27 19:56:06 +01:00
Dick Hollenbeck 499fc46eb1 kicad CMakeList.txt library dependency order 2012-01-27 09:40:04 -06:00
Alain Portal fb7b03a650 Fix build issues on RedHat based systems when using shared libraries. 2012-01-26 16:45:23 -05:00
marco. 96f435202c MacOSX: Handling exec 2012-01-26 20:48:45 +01:00
jean-pierre charras 7eb1a136f1 Pcbnew: First draft to use a new netlist format ( containing the same info as the intermediate netlist, but using S expressions)
* Eeschema can generate this netlist format.
*   Pcbnew can use (automatic identification) the current format or the new format.
*   Cvpcb does not use yet the new format.
2012-01-26 10:37:36 +01:00
Dick Hollenbeck 4cbb5c5e94 tune the order of link libraries, based on estimated dependency sequence 2012-01-25 08:56:52 -06:00
marco. bc48b8507b MacOSX: Gerbview mouse fixed 2012-01-24 20:07:35 +01:00
marco. a51dab7341 MacOSX: Fix in eeschema component move 2012-01-24 18:46:32 +01:00
Gerd v. Egidy ebb85aa232 bom-in-python script does not compile 2012-01-23 09:32:08 -06:00
Dick Hollenbeck 7fd0f0cab5 add tools directory, move container_test.cpp there on standby 2012-01-23 09:25:46 -06:00
Dick Hollenbeck 94097a6b22 * Switch to C++'s true and false and away from C" TRUE and FALSE.
* Enhance class PLUGIN's comments to improve their value as instructional.
  * Switch #includes from "file.h" to <file.h>, and fiddle with search paths
    by using include_directories(BEFORE ...)
  * dialog_page_settings did not have symmetrical space on its right border.
    And it now remembers it last position and size within a program session.
  * base_screen.cpp is now compiled twice, once for {pcbnew,cvpcb} and once
    for eeschema, in preparation for "compile time" support of internal units
    rather than "runtime" support.
2012-01-22 23:17:34 -06:00
Dick Hollenbeck 23172cce23 compile base_screen.cpp separately for {pcbnew,cvpcb} and eeschema, so we can diverge internal units at compile time, not runtime 2012-01-22 22:53:21 -06:00
Dick Hollenbeck 2b394c7ccb dialog_page_settings needed right border space, retain last dialog size and position 2012-01-22 22:45:57 -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
Dick Hollenbeck 3b8f191cc4 enhance comments since PLUGIN needs good documentation for others 2012-01-22 11:21:03 -06:00
Dick Hollenbeck e6c8515873 switch to C++'s false and true from C's FALSE and TRUE 2012-01-22 11:20:22 -06:00
jean-pierre charras 4565308d63 Eeschema: fix bug #919636
Pcbnew: 2 minor enhancements
2012-01-21 16:02:49 +01:00
jean-pierre charras ec307ef62c Pcbnew: fix a serious bug: crashes when attempt to modify a zone that had lost its net (after eeschema changes for instance) 2012-01-19 19:12:30 +01:00
Lorenzo Marcantonio 30fa7158c0 This moves the 'Place Junction' button near the 'No Connection' one, to
keep all the labelling tools together in the eeschema toolbar.
2012-01-18 09:06:48 -06:00
Dick Hollenbeck 708aef8522 towards making KICAD_GOST a runtime option, hoping for unified paper size 2012-01-18 09:02:50 -06:00
fabrizio. b594b4b28c Better icons in Eeschema from Fabrizio Tappero 2012-01-17 20:23:07 +01:00
Dick Hollenbeck b142b9defe set paper orientation into wxPrintData when possible 2012-01-17 09:34:05 -06:00
Alexander Zakamaldin 5cf2d4fabb This patch is intended for poedit to do it's job better. 2012-01-17 09:02:17 -06:00
Dick Hollenbeck a7b251450f portrait setting was being overwritten in dialog_page_settings.cpp, add updatePortrait(), improve comments 2012-01-17 08:58:58 -06:00
Dick Hollenbeck 6d39b53efb try and support Electra *.ses files 2012-01-16 15:43:07 -06:00
Dick Hollenbeck 4502149368 switch to comboboxes on page size dialogs, fix PLUGIN header 2012-01-16 14:49:34 -06:00
Dick Hollenbeck 2c84a28f6b switch to combobox on page size dialogs, fix PLUGIN header 2012-01-16 14:48:32 -06:00
Dick Hollenbeck 286c62d898 fix order of cvpcb link libraries, make some PAGE_INFO functions inline 2012-01-15 23:38:11 -06:00
Dick Hollenbeck b76d05f591 fix syntax error in kicad_plugin.cpp, carve out class_page_info.cpp, and add PAGE_INFO::Custom 2012-01-15 23:17:23 -06:00
Dick Hollenbeck 0025ac7d38 Add "portrait" support to the page size settings for all standard paper
sizes.  Tested with postscript output only.  Required minor file format changes
    to reflect the "portrait" setting.  common/dialogs/dialog_page_settings.cpp
    uses a checkbox but its name is "Landscape", which is inverted from portrait,
    but since it is the more common choice, I used that rather than portrait.
    The tooltip for that checkbox makes it clear.  No portrait mode is supported
    for "User" paper size.
2012-01-15 22:11:43 -06:00
Dick Hollenbeck 9147e66dce fix bug with user page size not taking effect immediately 2012-01-15 15:07:01 -06:00
Dick Hollenbeck f3132afe2a segment CHANGELOG.txt according to past years and current year 2012-01-14 20:11:35 -06:00
Dick Hollenbeck 81d6ebae24 commit CHANGELOG.txt before splitting into to years 2012-01-14 20:04:37 -06:00
Dick Hollenbeck 9431c2a60a changes 2012-01-14 19:31:39 -06:00
Wayne Stambaugh 5289c22087 Pcbnew object improvements.
* Remove unnecessary copy constructors from board and module library
  objects.
* Add doClone() method to board and library objects.
* Add comment to class definitions where the default copy constructor
  generated by the compiler was adequate.
* Replace copy method with clone method where applicable.
* Remove DuplicateStruct() function.
* Remove track object copy function.
2012-01-14 14:50:32 -05:00
jean-pierre charras 742486dce6 Eeschema: Fix erroneous message [Read Only] after creating a new project, and obviously the corresponding schematic file does not yet exist (replaced by [no file]) 2012-01-14 12:52:46 +01:00
jean-pierre charras 3383d6c8a5 Code cleaning and better comments.
Gebview: fix issue in export to pcbnew (Track arc shapes are now exported, approximated by segments)
2012-01-13 19:35:46 +01:00
Dick Hollenbeck 5a9fcf6f11 fix windows version of GetRunningMicroSecs() 2012-01-13 11:11:34 -06:00
Dick Hollenbeck 3421863c01 add GetRunningMicroSecs() to libcommon for debug timing 2012-01-13 03:46:02 -06:00
marco. f40a92561c MacOSX: Grid now is displayed correctly 2012-01-10 23:27:31 +01:00
marco. 6b097a57bf MacOSX: Drag Modules and Tracks now works correctly 2012-01-10 22:55:07 +01:00
jean-pierre charras 1c98200721 Pcbnew: fix issue when KICAD_NANOMETER is defined: when zones use htcth to show zones areas, hatch lines were incorrectly calculated (hunded of thousand lines created)
Eeschema: fix issue in search: search not made in reference strings.
Minor fixes, code cleaning and comment enhancements.
2012-01-10 21:12:46 +01:00
marco. 54c20b57f2 MacOSX: Main issue catch! wxPen with size 0 draws NOTHING (8 months to spot it) 2012-01-10 20:52:48 +01:00
marco. 0404ddae29 MacOSX: compile error fix after r3329 2012-01-10 18:54:40 +01: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
Andrey Fedorushkov d000d48653 fix build when defined KICAD_GOST 2012-01-09 23:13:20 +04:00
Dick Hollenbeck 78d921e731 ++all
* Carve out TITLE_BLOCK from BASE_SCREEN
  * Add include/hashtables.h and put class PROPERTIES in there.
    Change PROPERTIES to use "const char*" as the key instead of wxString.
++eeschema
  * Add shim class SCH_BASE_FRAME which introduces the data model SCH_SCREEN
    to the frame EESCHEMA frame class hierarchy and allows sharing of:
    SCH_SCREEN* GetScreen() const;                              // overload EDA_DRAW_FRAME
    void SetPageSettings( const PAGE_INFO& aPageSettings );     // overload EDA_DRAW_FRAME
    const PAGE_INFO& GetPageSettings () const;                  // overload EDA_DRAW_FRAME
    const wxSize GetPageSizeIU() const;                         // overload EDA_DRAW_FRAME
    const wxPoint& GetOriginAxisPosition() const;               // overload EDA_DRAW_FRAME
    void SetOriginAxisPosition( const wxPoint& aPosition );     // overload EDA_DRAW_FRAME
    const TITLE_BLOCK& GetTitleBlock() const;                   // overload EDA_DRAW_FRAME
    void SetTitleBlock( const TITLE_BLOCK& aTitleBlock );       // overload EDA_DRAW_FRAME
2012-01-09 11:32:27 -06:00
Dick Hollenbeck 67e28ade74 ++eeschema
Add shim class SCH_BASE_FRAME which introduces the data model SCH_SCREEN
    to the frame class hierarchy.
2012-01-09 11:24:01 -06:00
Dick Hollenbeck f694035366 CHANGELOG.txt 2012-01-09 02:37:16 -06:00
Dick Hollenbeck 0cad6e7913 carve out TITLE_BLOCK class from BASE_SCREEN, add hashtables.h for PROPERTIES 2012-01-09 02:35:06 -06:00
Александр Закамалдин 6d3fd3a01d Patch drifted with time, and a patch hunk was erroneously applied by the patch program,
rather than being rejected.
2012-01-07 15:49:24 -06:00
Александр Закамалдин 2caa72f063 This patch implements width tuning (width correction) for PS plotting of tracks, pads and vias.
This feature is very useful for electronics hobbyists who use DIY PCB technology 
(both toner transfer and photoresist methods).
Also width correction may be useful for PCB designers who take care of track width etching.
This patch also fixes some minor PS plotting issues.
2012-01-07 00:02:38 -06:00
jean-pierre charras c3c6b9ef6c Pcbnew: Now, archive modules function archives footprints with default orientation (0 degrees) and default side (Front layer) 2012-01-06 21:32:19 +01:00
jean-pierre charras 9cc4f5d0a6 Eeschema: add compil option in sch_field.cpp to go back to old behavior for field texts justifications (this option is not activated)
Note: only vertical texts have a modified behavior.
Minor other changes.
2012-01-06 20:00:59 +01:00
Dick Hollenbeck 148aecf963 improved comments 2012-01-05 12:16:21 -06:00
Dick Hollenbeck 00052a60c9 add container_test 2012-01-05 11:29:17 -06:00
Dick Hollenbeck 9d080b0868 Ki_PageDescr was re-written as a proper C++ class and renamed to PAGE_INFO.
It describes paper.  The m_Offset field was dropped since it was only used
    in HPGL plotting within EESCHEMA.  PAGE_INFO instance was moved out of
    BASE_SCREEN (which is on its way out) into both SCH_SCREEN and BOARD.


----------- This line and the following will be ignored --------------

modified:
  CMakeLists.txt
  common/CMakeLists.txt
  common/base_screen.cpp
  common/basicframe.cpp
  common/class_plotter.cpp
  common/common.cpp
  common/common_plotHPGL_functions.cpp
  common/common_plotPS_functions.cpp
  common/common_plot_functions.cpp
  common/dialogs/dialog_page_settings.cpp
  common/dialogs/dialog_page_settings.h
  common/dialogs/dialog_page_settings_base.cpp
  common/dialogs/dialog_page_settings_base.fbp
  common/dialogs/dialog_page_settings_base.h
  common/drawframe.cpp
  common/drawpanel.cpp
  common/pcbcommon.cpp
  common/projet_config.cpp
  common/worksheet.cpp
  cvpcb/class_DisplayFootprintsFrame.cpp
  cvpcb/class_footprints_listbox.cpp
  cvpcb/cvframe.cpp
  eeschema/dialogs/dialog_SVG_print.cpp
  eeschema/dialogs/dialog_SVG_print.h
  eeschema/dialogs/dialog_build_BOM.cpp
  eeschema/dialogs/dialog_plot_schematic_DXF.cpp
  eeschema/dialogs/dialog_plot_schematic_HPGL.cpp
  eeschema/dialogs/dialog_plot_schematic_PS.cpp
  eeschema/dialogs/dialog_print_using_printer.cpp
  eeschema/eeschema_config.cpp
  eeschema/files-io.cpp
  eeschema/libedit_plot_component.cpp
  eeschema/libeditframe.cpp
  eeschema/libeditframe.h
  eeschema/load_one_schematic_file.cpp
  eeschema/sch_screen.cpp
  eeschema/sch_sheet.h
  eeschema/schframe.cpp
  eeschema/viewlib_frame.cpp
  eeschema/viewlib_frame.h
  gerbview/dialogs/dialog_show_page_borders.cpp
  gerbview/dialogs/gerbview_dialog_display_options_frame.cpp
  gerbview/events_called_functions.cpp
  gerbview/gerbview.cpp
  gerbview/gerbview.h
  gerbview/gerbview_config.cpp
  gerbview/gerbview_frame.cpp
  gerbview/initpcb.cpp
  include/appl_wxstruct.h
  include/class_base_screen.h
  include/class_colors_design_settings.h
  include/class_pcb_screen.h
  include/class_sch_screen.h
  include/common.h
  include/pcbstruct.h
  include/plot_common.h
  include/wxBasePcbFrame.h
  include/wxEeschemaStruct.h
  include/wxstruct.h
  pcbnew/basepcbframe.cpp
  pcbnew/class_board.h
  pcbnew/class_pad.cpp
  pcbnew/class_pad.h
  pcbnew/class_track.h
  pcbnew/classpcb.cpp
  pcbnew/dialogs/dialog_SVG_print.cpp
  pcbnew/dialogs/dialog_gendrill.h
  pcbnew/dialogs/dialog_pad_properties.cpp
  pcbnew/export_gencad.cpp
  pcbnew/gen_drill_report_files.cpp
  pcbnew/gen_modules_placefile.cpp
  pcbnew/gendrill.cpp
  pcbnew/gendrill.h
  pcbnew/graphpcb.cpp
  pcbnew/initpcb.cpp
  pcbnew/io_mgr.h
  pcbnew/ioascii.cpp
  pcbnew/item_io.cpp
  pcbnew/kicad_plugin.cpp
  pcbnew/loadcmp.cpp
  pcbnew/minimun_spanning_tree.h
  pcbnew/moduleframe.cpp
  pcbnew/onleftclick.cpp
  pcbnew/pcbframe.cpp
  pcbnew/pcbnew_config.cpp
  pcbnew/pcbplot.h
  pcbnew/plotdxf.cpp
  pcbnew/plotgerb.cpp
  pcbnew/plothpgl.cpp
  pcbnew/plotps.cpp
  pcbnew/print_board_functions.cpp
  pcbnew/printout_controler.cpp
  pcbnew/printout_controler.h
  pcbnew/solve.cpp
  pcbnew/xchgmod.cpp
unknown:
  3239.patch
  3268.patch
  build/
  container_test.cpp
  debug/
  dick
  release/
  new/build/
  new/doxygen.sty
  pcbnew/basepcbframe.cpp.orig
  pcbnew/plotps.cpp.orig
pending merges:
  Dick Hollenbeck 2012-01-05 fix unreleased bug pertaining to "Sheet" line in a *.brd file
    Dick Hollenbeck 2012-01-05 [merge] merge in mainline into KICAD_PLUGIN work, which is for the PCBNEW nanometer support
    Dick Hollenbeck 2012-01-05 cannot use plugin until done
    Dick Hollenbeck 2012-01-05 finish up SCH_SHEET::{Set,Get}PageSettings() switch over
    Dick Hollenbeck 2012-01-04 remove page size globals from eeschema
    Dick Hollenbeck 2011-12-30 moving objects into BOARD which are saved in a *.brd file, for PLUGIN access
    Dick Hollenbeck 2011-12-22 [merge] merge in testing
    Dick Hollenbeck 2011-12-22 rename Ki_PageDescr to PAGE_INFO, encapsulate it in accessors, and move it into the BOARD
2012-01-05 10:40:36 -06:00
Dick Hollenbeck dac20005db fix unreleased bug pertaining to "Sheet" line in a *.brd file 2012-01-05 10:37:51 -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 90bb27ca66 cannot use plugin until done 2012-01-05 09:36:45 -06:00
Dick Hollenbeck 1393eb0f11 finish up SCH_SHEET::{Set,Get}PageSettings() switch over 2012-01-05 02:07:11 -06:00
Wayne Stambaugh 152b8d91e3 Eeschema schematic object improvements.
* Move SCH_ITEM::Place() code into SCH_EDIT_FRAME so schematic item
  objects no longer have any knowledge of the schematic frame window
  or undo/redo containers.
2012-01-04 17:08:46 -05:00
jean-pierre charras 5a96588eec Fix bug 910364: When a footprint saved in a .mod file is not on front layer and/or not with orientation 0 degree, the Module editor load it incorrectly.
note:  the Module editor save it with default orientation and layer, but the archive function does not, so some footprints can be not editable.
TODO: modify the Archive Function to use the default layer / orientation.
2012-01-04 20:10:33 +01:00
Dick Hollenbeck d3afe95ca8 remove page size globals from eeschema 2012-01-04 00:18:38 -06:00
Wayne Stambaugh b774d96fb0 Minor coding policy and code readability improvements. 2012-01-03 12:14:17 -05:00
Wayne Stambaugh 0ba26e1d8f Remove unused EDA_ITEM list from BASE_SCREEN. 2012-01-02 15:45:46 -05: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
jean-pierre charras 3f15b9c057 Eeschema: Fix issue in Search/ReplaceAll
Pcbnew: fix a very minor issue.
2011-12-30 20:04:40 +01:00
jean-pierre charras e420623fde Commit forgotten file 2011-12-30 13:44:02 +01:00
jean-pierre charras 5916688f35 Pcbnew: Fix error message in Module Editor after a global pad change.
Minor other enhancements and code cleaning.
2011-12-30 13:29:54 +01: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 b7db108cd7 Pcbnew: fix potential bug in connections calculations (see Bug #909298 ). 2011-12-28 16:14:46 +01:00
Wayne Stambaugh 1cb1e88ef4 Fix wxWidgets 2.8 build error. 2011-12-28 09:15:00 -05:00
jean-pierre charras 375310f2ab 3D view: Fix Bug #908871
Eeschema: fix a minor issue.
2011-12-27 19:08:50 +01:00
jean-pierre charras 750dd6eeac Eeschema: fix bug that creates duplicate segments instead of breaking them at junctions points.
Duplicate segments where created in drag command and netlist calculations.
2011-12-23 09:16:36 +01:00
Dick Hollenbeck 929d5c7a3f merge in testing 2011-12-22 16:12:21 -06:00
Dick Hollenbeck 0d4598656b rename Ki_PageDescr to PAGE_INFO, encapsulate it in accessors, and move it into the BOARD 2011-12-22 15:57:50 -06:00
Guillaume Simard 1983b2db05 While working on the layer changing patch, I found that changing track
size while routing (W, Ctrl+W) didn't update the track in the display
window (you had to move the mouse to get a refresh).
2011-12-22 09:41:16 -06: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
jean-pierre charras 2df818b844 Fix issue in GPcb footprints import.
Better code in test connections in zones.
Very minor other fixes
2011-12-22 09:07:50 +01:00
Wayne Stambaugh 85d2f2f1d5 Eeschema find and replace improvements.
* Add check box and flag to ignore replacing the component reference
  designator field.
* Fix a resizing bug when switching between the find and replace modes of
  the find/replace dialog.
* Fix replace component reference designator field bug.
* Force rebuild of search list when schematic is modified and the replace
  dialog is closed.
* Prevent finding the next item when the find/replace dialog is closed.
* Respect warp mouse pointer setting when closing find/replace dialog.
* Fix duplicate mnemonic control accelerator keys in find/replace dialog.
2011-12-21 15:21:15 -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 98fa228302 Removed -static-libgcc linker flag that caused Pcbnew to crash on Windows when raising an exception in release builds using MinGW GCC 4.6.1 2011-12-21 08:19:14 -05:00
Wayne Stambaugh 81d3487244 Fix debug assertion on wxWidgets 2.9.3. 2011-12-20 10:23:47 -05:00
jean-pierre charras d41b81fc3b Pcbnew: Enhanced algorithm to calculate board connections:
* A track is seen connected to a pad if the track end is inside the pad shape.
* Pads inside pads are now seen connected, if the center of the pad is *inside* the other pad.
* this is made to be sure a large copper area is shared by the 2 pads,  and to keep algorithm fast.
2011-12-19 12:58:24 +01:00
jean-pierre charras ccb910eb62 Cvpcb: fix incorrect behavior when clicking on a component 2011-12-18 21:22:16 +01:00
jean-pierre charras e50d18bc1b Minor enhancement and minor code cleaning. 2011-12-18 18:57:05 +01:00
jean-pierre charras 018ffe7eac fix bug: EDA_ITEM::m_forceVisible not initialized in constructor. 2011-12-18 16:26:09 +01:00
jean-pierre charras a180518f4b Some demo files updated. 2011-12-18 10:06:22 +01:00
jean-pierre charras 2c150e4817 All: fix compatibility issues with wxWidgets 2.9.3
Minor cosmetic enhancements.
Pcbnew: more workd abput connection algorithms (work in progress)
2011-12-17 22:21:03 +01:00
Wayne Stambaugh 0e27f45ffd Encapsulate EDA_APP class. 2011-12-16 15:12:49 -05:00
Alexander Zakamaldin d463580560 fix 2011-12-16 12:15:24 -06:00
Dick Hollenbeck b3a6ddb6e9 improvements, hopefully 2011-12-16 11:03:25 -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
Dick Hollenbeck c9269232cf fix bugs in kicad_plugin.cpp.
KICAD_PLUGIN::Load() is solid now, except for missing globals, which
still need to get moved into the class BOARD.

Same for KICAD_PLUGIN::Save(), only missing globals, which once they
are in the BOARD class, will be added.
2011-12-15 20:39:59 -06:00
Dick Hollenbeck bbc626b750 plugin testing has started 2011-12-15 10:48:36 -06:00
Dick Hollenbeck a9e2399669 legacy pcbnew plugin touch ups 2011-12-14 20:24:52 -06:00
Guillaume Simard cc70c1a463 fix 2011-12-14 16:35:03 -06:00
Guillaume Simard 6767a0b2a3 Make CvPcb correctly preview the selected component footprint if one has already been assigned. 2011-12-14 15:23:32 -05:00
Wayne Stambaugh 95891006cd More EDA_DRAW_FRAME encapsulation work. 2011-12-14 15:03:15 -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
jean-pierre charras 02bb2111e2 Pcbnew: fix issue when creating new tracks: sometimes a ratsnest remains active although a track exists. 2011-12-14 12:31:49 +01:00
Dick Hollenbeck d5a1736346 minor 2011-12-14 01:03:55 -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
Dick Hollenbeck 96bb90dee1 kicad_plugin 2011-12-13 22:29:25 -06:00
Guillaume Simard bced8c9774 Add undo/redo support for Pcbnew auto place, auto move, and auto route features. 2011-12-13 15:42:42 -05:00
jean-pierre charras b2c11207e4 pcbnew/class_track.h: remove duplicate class members. 2011-12-13 21:28:25 +01:00
Wayne Stambaugh a63a2006f0 Add Eeschema replace code.
* Enable replace toolbar button and menu entry.
* Improve find replace logging granularity.
* Fix find and replace dialog control hiding and disabling.
* Minor improvements to the SCH_FIND_REPLACE_DATA object.
* Move find collector list iterator into the collector object.
* Add visibility override flag to EDA_ITEM to temporarily show items that
  are hidden during find and replace.
2011-12-13 10:37:33 -05:00
Wayne Stambaugh 5465966c7b Fix infinite recursion bug in SCH_COMPONENT::SetTimeStamp(). 2011-12-12 15:59:43 -05:00
Wayne Stambaugh d9af562f8f Fix a minor bug in my last commit that caused the debug build to fail. 2011-12-12 10:16:05 -05:00
Wayne Stambaugh 768ec258f7 Encapsulate LABEL_OBJECT class and message panel window member of EDA_DRAW_FRAME. 2011-12-12 09:02:37 -05:00
Dick Hollenbeck 0498f2657c kicad_plugin work, and accessors along with making some fields protected or private 2011-12-12 02:39:41 -06:00
Dick Hollenbeck b979d1e0b9 plugin work, accessors 2011-12-12 02:37:05 -06:00
Dick Hollenbeck dc982a2824 ++PCBNew
* added BOARD::GetPad(int), made BOARD::m_NetInfo private, and contained
    within the BOARD, not dynamically allocated and owned via pointer.
  * added BOARD::GetPadCount()
  * changed NETINFO_LIST::GetCount() to GetNetCount()
  * added BOARD::GetNetCount()
  * more kicad_plugin work.
2011-12-09 23:47:13 -06:00
Dick Hollenbeck 4c2a1dd5d1 more kicad_plugin work, make BOARD::m_NetInfo private 2011-12-09 23:33:24 -06:00
jean-pierre charras 2600bb31c0 Pcbnew: GPcb footprint import: fix incorrect pad size. 2011-12-09 18:43:34 +01:00
Wayne Stambaugh 9461f16281 Encapsulate SCH_EDIT_FRAME and LIB_EDIT_FRAME classes. 2011-12-09 11:37:11 -05:00
jean-pierre charras 4cb29f6104 Pcbnew: GPcb module import: fix incorrect position and size of texts. 2011-12-09 17:17:38 +01:00
jean-pierre charras a67ff643f3 Pcbnew: fix bad initialization of default track width and vias sizes when starting pcbnew with no board loaded. 2011-12-09 11:36:00 +01:00
Wayne Stambaugh d8ad2cceb0 Encapsulate LIB_PIN class and begin encapsulating SCH_EDIT_FRAME class. 2011-12-08 16:05:43 -05:00
jean-pierre charras 37c3e32119 Pcbnew: bug fix: some Global Design Rules not copied to the board after change. 2011-12-08 20:55:10 +01:00
jean-pierre charras ac74985685 All: fix hotkey issue with wxWidgets-2.9.3 (Window only): hotkey events called twice.
* Fix compil issue about automatically created pcb_plot_params.h :
     pcb_plot_params.* moved from pcbnew to common because item_io.cpp (using this file) is compiled in common.
2011-12-08 19:23:44 +01:00
Wayne Stambaugh 1047e60e35 Encapsulate SCH_POLYLINE, SCH_SHEET, and SCH_TEXT classes. 2011-12-08 10:45:01 -05:00
Marco Mattila eb52f4ba63 Fix thermal relief gap calculation for circular pads in pcbnew. 2011-12-08 01:58:43 +02:00
marco. a089ae7ac3 OSX: PCB Calculator correction 2011-12-07 22:06:02 +01:00
Wayne Stambaugh 9dce6fba09 Encapsulate SCH_JUNCTION, SCH_LINE, and SCH_NO_CONNECT classes. 2011-12-07 15:19:29 -05:00
Wayne Stambaugh 16131a500d Encapsulate SCH_FIELD class. 2011-12-07 13:47:59 -05:00
jean-pierre charras bcbde5d813 All: fix a collision name between accessor function GetTimeStamp and GetTimeStamp in common.cpp.
In common.cpp GetTimeStamp is renamed GetNewTimeStamp (a better name).
Pcbnew: prepare work to calculate connections between pads that inteserct and therefore can be connected without any track (composite pads).
2011-12-07 16:49:32 +01:00
Wayne Stambaugh c7fe98db2f Encapsulate SCH_BUS_ENTRY class. 2011-12-07 09:08:52 -05:00
Dick Hollenbeck b6dcf9b7f4 Collect all the PCBNew Save() and ReadDesc...() functions into new file item_io.cpp,
which should eventually go away in favor of kicad_plugin.cpp.
Add CMake options USE_NEW_PCBNEW_LOAD and USE_NEW_PCBNEW_SAVE, which should not be
used yet, and both default to OFF accordingly.
2011-12-06 23:39:18 -06:00
Dick Hollenbeck c4979318d2 more plugin work 2011-12-06 23:28:49 -06:00
Wayne Stambaugh 539f4e1ed7 Encapsulate DANGLING_END_ITEM class. 2011-12-06 16:02:21 -05:00
Wayne Stambaugh 68d752bb13 Zero memory to duplicate behavior changed when C malloc() was replaced by C++ new(). 2011-12-06 09:46:48 -05:00
jean-pierre charras e8c3ca2929 Pcbnew: remove global variables (g_TabOneLayerMask and g_ViaType_Name) 2011-12-06 09:35:13 +01:00
Dick Hollenbeck 241fdb4de4 fix compile of kicad_plugin.cpp with wxWidgets 2.9.x 2011-12-06 00:19:36 -06:00
Dick Hollenbeck fafd74ca6f Fix problem with BOARD bounding box in saved *.brd files,
and TEXTE_MODULE size in kicad_plugin.
Link in io_mgr and kicad_plugin but do not call them yet
2011-12-05 11:22:19 -06:00
Dick Hollenbeck 680a4407f4 fix formatting problems that came about from incompatible tabbing in Lorenzo's patch 2011-12-05 01:03:57 -06:00
Dick Hollenbeck 40ee72653e ++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(), since BOARD::m_PcbFrame gone.
  * 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 of 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 ways of
    destroying the derived classes 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:28:17 -06: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
jean-pierre charras f311bb4d59 Pcbnew:
Enhanced algorithms to calculate board connections:
    Previously, a track was seen connected to a pad only if the track end is
    exactly on the pad position.
    Now a track is seen connected to a pad if the track end is inside the pad shape.
    Algorithm to calculate pads connections to track is still very fast.
    However some other functions (drag pads, track len calculation ...)
    still need the track end exactly on the pad position.
Dead code removal.
2011-12-04 18:57:03 +01:00
jean-pierre charras 2ae221d97f Pcbnew: fix Bug #899373 2011-12-03 15:04:17 +01:00
Dick Hollenbeck a37fdd9751 First working version of KICAD_PLUGIN::Load(), short of some globals and minor conflicts 2011-12-02 15:58:27 -06:00
Dick Hollenbeck 343e55b09a First working copy of KICAD_PLUGIN::Load() 2011-12-02 15:56:47 -06:00
Dick Hollenbeck 0fb4954f19 fix comments, add IO_MGR::Save() 2011-12-02 10:57:44 -06:00
Dick Hollenbeck 086c8decb0 fix warnings and comment 2011-12-02 10:55:31 -06:00
Dick Hollenbeck 0bdef38585 Improved PLUGIN documentation in io_mgr.h 2011-12-02 10:28:00 -06:00
Lorenzo Marcantonio 6418163d3c Update to the GENCAD import export 2011-12-02 09:09:57 -06:00
Dick Hollenbeck 05faa36962 KICAD_PLUG intermediate work, for eventual nanometer boards 2011-12-01 16:54:58 -06:00
Dick Hollenbeck 1b5edd6d4c KICAD_PLUG work 2011-12-01 16:50:41 -06:00
Wayne Stambaugh d9e0ab0241 Improve Eeschema find code and add initial replace plumbing.
* Replace Eeschema find code with a collector based implementation.
* Fixed a search bug when all subsequent searches of an item would ignore
  the remaining valid child items when an item had more than one child
  item that matched the search criteria.
* Add SCH_FIND_COLLECTOR class to find all items that meet the specified
  search criteria.
* Add SCH_FIND_COLLECT0R_DATA to keep track of information for all matching
  items.
* Use collector to iterate over the list of items that match the search
  criteria rather than trying to start at the last matched item.
* Remove unused searching methods from sheet path and sheet path list
  objects.
* Add replace and replace all functionality to Eeschema find dialog.
* Push matching methods down to EDA_ITEM class so they can be used by
  other derived objects.
* Add method to EDA_ITEM to test if item supports replacing.
* Add flag to find/replace data to support replace feature.
* Disable wild card matching check box when dialog is in replace mode as
  wild card replacement is not supported at this time.
* The usual Doxygen comment and coding policy fixes.
2011-12-01 11:49:28 -05:00
Dick Hollenbeck 6c2fcf7e78 KICAD_PLUGIN alternate nanometer board loader work 2011-12-01 00:06:08 -06:00
Dick Hollenbeck 3bb91baf11 KICAD_PLUGIN alternate nanometer board loader work 2011-12-01 00:04:23 -06:00
Marco Mattila 1ab12c2be4 Don't subtract soldermask from other than silkscreen layers when plotting gerbers from pcbnew. 2011-12-01 00:06:27 +02:00
Dick Hollenbeck b6508af0f4 KICAD_PLUGIN and nanometer intermediate checkin, work in progress... 2011-11-30 15:15:56 -06:00
jean-pierre charras 3a887850ee Pcbnew: Fix bug Bug #898178 2011-11-30 21:05:17 +01:00
jean-pierre charras 31bcc6eed9 Add Bulgarian language. Update translators list.
Pcbnew: prepare work on new algos for connections calculations.
2011-11-30 12:45:49 +01:00
Dick Hollenbeck 7a93d0b21c more KICAD_PLUGIN work progress 2011-11-30 01:43:46 -06:00
Dick Hollenbeck 8f79b14680 This patch restores some of the goodness in Vladimir's rev 3239, and in particular
the GetPosition() and SetPosition() changes.  It also starts towards making m_Orientation
and m_Thickness fields private with accessors, but does not complete this latter goal.
2011-11-29 11:25:30 -06:00
Dick Hollenbeck 701fa6b0a3 intermediate check in to show progress on new nanometer file loader PLUGIN 2011-11-28 21:08:14 -06:00
Dick Hollenbeck 2515a806ae initial work on PCBNew PLUGIN support, in preparation for nanometer board load and save 2011-11-27 22:32:29 -06:00
jean-pierre charras 5e3ca2e769 Pcbnew: Fix issue in Undo/Redo command: for very large boards ( > 20000 items) this command could take a long time. Now fast. 2011-11-27 13:29:01 +01:00
jean-pierre charras b707493f35 Update version number 2011-11-26 21:02:59 +01:00
Dick Hollenbeck 63399bbeea changes 2011-11-25 09:40:40 -06:00
Dick Hollenbeck dea21ba82e changes 2011-11-25 09:15:46 -06:00
Dick Hollenbeck 2fd8613777 add board internal units plan, first incomplete draft. 2011-11-25 02:03:55 -06:00
jean-pierre charras 778832a665 Fix a minor issue in my last commit 2011-11-24 22:07:03 +01: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
Dick Hollenbeck cc097762c7 Temporarily reverse out the evolving support for finer Board Internal Units (BIU)s. 2011-11-24 11:32:51 -06:00
Vladimir Uryvaev d4bfa450e0 Debug bug:) fix. Wayne found it. 2011-11-18 03:16:36 +04:00
Wayne Stambaugh 1ef58372a9 Added new find replace image to bitmap header file. 2011-11-17 13:39:18 -05:00
Vladimir Ur 2a69ffb406 Nanometric work
- D_PAD members converted;
- style improved;
- GetPosition made returning value, added SetPosition;
- highly experimental, test it please!
2011-11-17 21:47:27 +04:00
Fabrizio Tappero 69f8b30b25 Change find image, add new find replace image, and remove unused image cpp files. 2011-11-17 11:32:01 -05:00
Wayne Stambaugh 35749e57c4 Fix Eeschema find item bugs and other minor changes.
* Fix bug in hierarchical searches using sheet path pointers which are
  destroyed on every search.  Use human readable path as last sheet found
  in test to prevent comparison of deleted pointers.
* Fix a bug in SCH_COMPONENT::Matches() that would prevent searching for
  pins if the search all fields flags was not set.
* Fix a bug in SCH_COMPONENT::Matches() to use the sheet path to perform
  the comparison to the correct reference designator and unit number.
* Fix wrapping in sheet path and sheet path list MatchNextItem methods.
* Push search methods down to EDA_ITEM object so advanced searching can
  be performed on all items derived from EDA_ITEM.
* Add virtual method to EDA_ITEM object to test if item supports replacing
  text.
* Replace switch statement magic numbers in Eeschema socket connection code
  with Pcbnew for improved readability.
2011-11-16 20:06:08 -05:00
Dick Hollenbeck 169576703d fix compiler warning 2011-11-16 14:52:51 -06:00
Vladimir Ur 959e338698 D_PAD conversion: m_Pos converted
PCB_ITEM: GetPosition -- removed reference
load/save length in config
2011-11-16 21:04:12 +04:00
jean-pierre charras 38553be4de Pcbnew: fix a possible crash after a board cleanup 2011-11-15 20:21:16 +01:00
Vladimir Ur 09a61396ba Some code restyling: VECTOR_PCB is an array. Cleanup uncontrolled definitions of abs, max, etc. max is now overloaded function and MAX is a macro. 2011-11-15 22:26:06 +04:00
Vladimir Ur 4b9b2f4e66 Nanometric work. Design rules, D_PAD (except m_Pos) is now in new units. Metric files can be loaded w/o KICAD_NANOMETRE flag set but saved only with this flag, this could help to gain some compatibility during transition process. ifdef'd code is somewhat minimized by using transition macros. Some potential code bugs are commented. 2011-11-14 20:56:05 +04:00
jean-pierre charras 6f3aa6aca9 Very minor fix 2011-11-12 19:53:04 +01:00
jean-pierre charras 1259683846 Pcbnew: fix bad icon in ModEdit toolbar. 2011-11-12 11:51:20 +01:00
jean-pierre charras 790b6b54f5 Forgotten change. 2011-11-12 10:58:20 +01:00
jean-pierre charras 9cb27eb85c Some better icons.
Fix bug 880132 (Justify not correct)
Note: justifications are now always relative to the text, in libedit (as before) and schematic editor:
if rotated, justification is rotated, because in Pcbnew rotation can have any value.
2011-11-12 10:51:06 +01: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
Vladimir Ur 6ebb044d45 Metric KiCad work continues. Partially processed D_PAD class. It is still need to be tested including all these import and export procedures... 2011-11-11 21:44:20 +04:00
Wayne Stambaugh 77521c4b60 Fix write file bug when file is in the project path and no path is defined. 2011-11-11 11:08:58 -05: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 fc7189e6f4 Fix for hidden find dialog when display settings change. 2011-11-10 12:01:33 -05:00
Wayne Stambaugh cc7e7fc5ca Memory allocation improvements and other minor fixes.
* Replace C malloc() and free() functions with C++ new and delete
  operators or the appropriate STL container.
* Add option to end mouse capture function to skip executing the end
  mouse capture callback.
* Lots of coding policy and Doxygen comment goodness.
2011-11-10 10:55:05 -05:00
jean-pierre charras 7bd8284661 Pcbnew: remove dead or obsolete code. Add or fix some comments.
Add minor enhancements.
2011-11-10 09:21:11 +01:00
Vladimir Ur 0fdf71a80e General design rules tab converted to nanoscale. A bit of refactorisation in via sizes. And build key is KICAD_NANOMETRE not KICAD_NANOMETRIC (as I stated in previous commit). 2011-11-09 21:35:16 +04:00
Vladimir Ur a273b7bdb5 Work on internal (nano)metric length units started.
Added configuartion option KICAD_NANOMETRIC for this.
* With option set to false: *
- it should work and compile as usual
- some values are saved with decimal point (which should be backward/forward compatible as old versions should just drop fractional part)
* With option set to true: *
- lengths in Global Design Rules should be settable 1nm steps.
FROM/TO_LEGACY_LU(_DBL) macros introduced for easy interconnection between old and new units.
2011-11-09 17:25:49 +04:00
Dick Hollenbeck 311a8186ff sweet editor, compiler warning 2011-11-08 15:14:39 -06: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
jean-pierre charras b88505dd85 Pcbnew: code cleaning in ratsnest.cpp. Add comments. 2011-11-08 17:18:46 +01:00
jean-pierre charras 619a82a61a Pcbnew: Fix a membar issue: Layer setup incorrect location (seems due to an error when using copy/paste editor command) 2011-11-07 21:34:35 +01:00
Wayne Stambaugh 393e020442 Fix cursor warping out of client when zooming bug.
* Modify algorithm to correctly calculate the virtual drawing size and
  offset required to place the drawing correctly under all conditions.
* Ignore default wxWidgets scroll keys on Windows in EDA_DRAW_PANEL key
  event handler.
2011-11-07 14:04:24 -05:00
jean-pierre charras 7c17187052 Pcbnew: Fix typo in 2 filenames. Add comments in ratsnest.cpp.
Fix bug 887202.
2011-11-07 19:04:19 +01:00
jean-pierre charras 936d831b82 Pcbnew: more work on a better algorithm to calculate the full ratsnest.
Lee algorithm replaced by a Minimun Spanning Tree algo (using Prim's algorithm ).
Tested on a 5350 pads board, it is more than 100 times faster.
Also fix a crash when clicking on tool  "delete selected items" (main horizontal toolbar),
and remove this tool (currently, no code in Pcbnew for this tool)
2011-11-06 17:16:19 +01:00
Dick Hollenbeck ed2141a6d6 Change various KiCad case utilization to precisely "KiCad" 2011-11-04 10:53:37 -05:00
jean-pierre charras 721cdc4831 Pcbnew: connect.cpp: enhanced ( faster and more powerful ) algorithm to calculate connections between pads.
Code cleaning.
2011-11-03 20:07:59 +01:00
Wayne Stambaugh 3541335a08 Use output formatter to save component library files and objects. 2011-11-01 11:06:26 -04:00
jean-pierre charras fcb482df41 Pcbnew: Fix bug I created in my previous commit.
More about code refactoring in connect.cpp: RecalculateAllTracksNetcode() is 50 times faster with a board using 27000 tracks
Use right icon in pcbnew for load board and new board.
2011-11-01 09:51:27 +01:00
Dick Hollenbeck 9f69193a62 formatting and compiler warnings 2011-11-01 03:06:33 -05:00
Dick Hollenbeck 9bf1f390b2 sweet editor now shows GAL canvas 2011-11-01 03:05:56 -05:00
Wayne Stambaugh 8cad403d23 Use line reader to load component library files and objects. 2011-10-31 16:49:48 -04:00
jean-pierre charras 9cd1fdd92c Fix minor issue under wxWidgets 2.9.3 in DRC dialog display.
More work about code refactoring in connect.cpp
2011-10-31 21:29:46 +01:00
jean-pierre charras d5ea4750e7 Pcbnew: starting work on better ratsnest and connections calculations algorithms.
This first draft should fix bug 851670 and is faster than existing alogorithm.
2011-10-31 14:44:13 +01:00
Dick Hollenbeck 0ee7234cf9 sweet editor work 2011-10-30 00:02:23 -05:00
jean-pierre charras 8a034512ea Pcbnew: fix minor issue: Footprint bounding box was too large for very small footprints (like SM0204) due to the minimal size value used in calculations. 2011-10-29 14:01:59 +02:00
Wayne Stambaugh bbda48f9e8 Unify Eeschema orient commands and other minor fixes.
* Create command event handler for orienting schematic items and block.
* Remove redundant orient item and block command handler code and IDs.
* Remove redundant cancel current command event table entry.
* Remove unnecessary schematic bitmap object virtual functions.
* Set path when saving schematic sheet files to prevent assertion in
  updated path and file write permission test function.
* Restore directory and file name write permission test function to it's
  previous behavior to prevent unexpected save results.
* Add an assertion to verify the path is not empty to directory and file
  write permission test function.
* Improve documentation for path and file write permission test function.
* Fix Doxygen link warnings.
2011-10-28 16:30:50 -04: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
jean-pierre charras 858636fd27 Fix erroneous test for non writable folder, when trying to save a schematic file with no path in name.
(seems wxFileName.IsDirWritable() fails under Windows when the path is empty (does not use the CWD).)
2011-10-27 20:38:31 +02:00
Wayne Stambaugh 60805606a0 Unify Eeschema drag item commands into a single event handler.
* Create command event handler for draggining all schematic items.
* Remove redundant delete item command handler code.
* Remove unused close current tool command ID from process special
  functions event handler.
2011-10-27 13:51:22 -04:00
Wayne Stambaugh 7195644360 Unify Eeschema edit item commands into a single event handler.
* Create command event handler for editing all schematic and child items.
* Remove unique edit schematic item command IDs.
* Unify find item, undo, and redo hot key commands.
2011-10-27 09:34:28 -04:00
Vladimir Ur 443b4a6fe1 PCBNEW favored module placed on OPPOSITE side selected layer become.
Now it select module from selected side if present. Especially handy in contrast view.
2011-10-27 17:01:32 +04:00
jean-pierre charras 32526511de Fix message in KiCad Dialog About (forgotten USE_BOOST_POLYGON_LIBRARY option removed). 2011-10-27 07:43:44 +02:00
Wayne Stambaugh b98b23a1a6 Factor Eeschema rotate item hot keys into a rotate event handler.
* Add a rotate event handler to schematic frame object.
* Remove unique rotate item command IDs.
* Use process event instead of post event to eliminate the need to clean
  up the command event client object from the heap.
* Unify find next item and next DRC error hot key commands.
* Unify move and rotate hot keys commands.
2011-10-26 16:46:04 -04:00
jean-pierre charras 2476bc7f62 bitmap2component: code cleanup. 2011-10-26 13:06:04 +02:00
jean-pierre charras 51a845470b bitmap2component: use BOOST:POLYGON instead of KBool, and minor enhancements. 2011-10-26 11:53:42 +02:00
jean-pierre charras 4cbcf56cee remove useless USE_BOOST_POLYGON_LIBRARY cmake option, and remove unused files.
BOOST POLYGON is always used in zone filling functions.
Kbool is still in use in other calculations.
2011-10-25 18:24:56 +02:00
Andrey Fedorushkov 14c1486062 Pcbnew: add send msg to Eeschema when move module 2011-10-24 19:23:06 +04:00
Wayne Stambaugh e21ebb7282 Factor Eeschema place item hot keys into select tool event handler. 2011-10-24 09:56:35 -04:00
Andrey Fedorushkov 8e584fc233 Eeschema:
* Fix bug in draw reference for multiunit component
* Code cleanup for drag item
2011-10-24 17:11:11 +04:00
jean-pierre charras 4e626d44b9 Make some messages translatable. 2011-10-22 20:21:57 +02:00
Wayne Stambaugh 609abb2f0c Complete Eeschema unified move code.
* Schematic fields now use unified move code.
* Move the unified move code into file schedit.cpp
* Remove old schematic field move code.
2011-10-22 08:31:44 -04:00
Wayne Stambaugh 7bbe2f784e Initial ground work to make schematic fields use unified move code.
* Remove external dependency for adding suffix to reference designator
  fields.
* Make schematic field get and set position methods transform coordinates
  relative to the parent component object that owns them.
* Make base text class get text method virtual so derived classes can
  change the base string according to their individual requirements.
* Fix a problem with default place schematic item add in last commit.
2011-10-21 14:17:51 -04:00
Wayne Stambaugh 78377058c9 More Eeschema schematic item move code unification.
* Tweak move item to support moving schematic sheet pin objects.
* Change schematic sheet pin set position to constrain position within
  the parent sheet.
* Schematic sheet pin moving now handled by unified move code.
* Remove old schematic sheet pin move code.
* Add custom client data object for passing hot key information to
  command event handlers.
* Fix a bug that prevented changes to schematic sheet pin objects from
  being undone.
2011-10-21 09:59:15 -04:00
Dick Hollenbeck 4c063574ae commit Brian's BOM generation scripts so they don't get lost 2011-10-20 10:49:07 -05:00
Dick Hollenbeck 15f0147ece coding standards cleanups 2011-10-20 09:46:06 -05:00
Vladimir Ur 6311e4e9ea Automatic footprint assignment now can be done without equ file, if conditions are met:
* symbol in sch library have only single footprint filter,
* footprint filter have no wildcards,
* according footprint exists in pcb lib.
This could remove need in long equ files for lots of ICs.
2011-10-20 15:28:37 +04:00
Dick Hollenbeck c5f24127a2 sweet editor using GAL, links but does not work 2011-10-19 23:08:15 -05:00
Wayne Stambaugh 30a4bd3902 Minor Eeschema fixes.
* Fix a set position method bug in schematic item that caused the fields
  to drawn in the wrong position.
* Group zoom hot keys to use the same command event in schematic and
  library editor frames.
2011-10-19 19:17:28 -04:00
Wayne Stambaugh 6a4e8aa909 Eeschema schematic item move code unification.
* Add get and set position methods to all schematic items.
* Encapsulate schematic item position members.
* Add swap data method to schematic items that lacked one.
* Remove global swap data function used by undo and redo functions.
* Unify as many schematic move methods as possible.
* Remove unnecessary place schematic item methods.
* All schematic items are now moved in the same event handler.
* Fixed bug in hierarchical sheet get menu item string method.
* Make no connect and junction items movable, fixes lp:804048
2011-10-19 16:32:21 -04:00
Fabrizio Tappero 341e3a507a icons update. 2011-10-19 20:55:21 +02:00
Wayne Stambaugh 1bd7fc8a4e Minor menu bar fixes.
* Fixed bug on Windows that prevented the menu short cuts from working
  properly.
* Fix duplicate menu short cut keys in KiCad, Pcbnew, and Eeschema.
* Add menu short cuts for all possible menu entries.
2011-10-18 15:59:19 -04:00
jean-pierre charras 1fde4ca807 Eeschema, Libedit: Use 16x16 icons in comboboxes inside the pin editor dialog. This gives a better look to this dialog. 2011-10-18 21:18:04 +02:00
jean-pierre charras 0409bc8d1b Fix very minor issues and code cleaning 2011-10-18 19:28:49 +02:00
jean-pierre charras 153b1bd0d2 Eeschema: Fix confusing labels in libedit (for pins and graphic items sharing).
Fix icons in macro menu.
2011-10-18 12:18:05 +02:00
jean-pierre charras 2db1e221d4 Eeschema: Fix icons in macro menu.
Fix confusing labels in libedit (for pins and graphic items sharing)
2011-10-18 12:16:27 +02:00
jean-pierre charras 8a82c61543 Icons update 2011-10-18 10:28:12 +02: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
jean-pierre charras 13324c06b5 Replace icon_cvpcb.svg file (broken?)
Gerbview: very minor fix
2011-10-17 18:49:14 +02:00
jean-pierre charras 021a075fbe Gerbview: minor enhancement.
All: fix some strings very hard to translate in messages.
2011-10-16 10:02:36 +02:00
Wayne Stambaugh 121b65bfb8 More auto save improvements.
* Factor test for auto save file into base frame class.
* Added auto save feature to Eeschema for saving schematics, addresses
  launchpad question 173631.
* Add auto save interval control to Eeschema options dialog.
* Fix problem with subsequent auto saves in last commit.
2011-10-15 09:25:57 -04:00
jean-pierre charras 8e6ac6c5a9 CvPcb: make footprint filter case insensitive (Fix Bug #873417 ) 2011-10-14 18:44:15 +02:00
Wayne Stambaugh b7a8719617 Make CvPcb stay open on save the default behavior. Fixes 872265 2011-10-13 16:13:11 -04:00
Wayne Stambaugh 70569edb05 Pcbnew auto save improvements.
* Factor auto save common code into base frame class so all frame windows
  can take advantage of the shiny new auto save goodness.
* Use a timer instead of depending on mouse and keyboard events to trigger
  an auto save.
* Check for auto save file when opening a board and ask user if they
  wish to use the auto save file or the last saved board file.
* Protect all base frame public members.
2011-10-13 15:56:32 -04:00
jean-pierre charras 0dff6b9bd3 Pcbnew: Fix an issue when try to importing gpcb footprints 2011-10-13 20:37:43 +02:00
Wayne Stambaugh 31ed2c288c Factor bus label parsing function into net list object. 2011-10-12 11:34:52 -04:00
Wayne Stambaugh 4e55b6be65 More Eeschema net list object generation improvements.
* Add net list object creation functions to schematic sheet and label
  objects.
* Remove function to add schematic object net list items as it is no
  longer needed.
* Add license statements to all modified files that required one.
2011-10-12 10:03:43 -04:00
Andrey Fedorushkov 31a4334a5a cvpcb: add send message to eeschema when selecting item in list components 2011-10-12 17:09:12 +04:00
Wayne Stambaugh d5cbd5d186 Eeschema net list object generation improvements.
* Add net list object creation functions to schematic component object.
* Remove external variables used by the verify bus label and parse bus
  label functions.
* Remove redundant net list object include sheet path member assignment.
* Add license statements to all modified files that required one.
2011-10-11 16:23:56 -04:00
Wayne Stambaugh 2ba1984442 Eeschema net list object generation improvements.
* Define function to allow schematic objects to create their own net list
  objects.
* Add net list object creation functions to schematic line, junction, and
  no connect objects.
* Add license statements to all modified files that required one.
2011-10-11 09:38:13 -04:00
Wayne Stambaugh d4fb921b43 Eeschema ERC improvements and other minor fixes.
* Move the hierarchical label connected test into the NETLIST_OBJECT class.
* ERC pin type strings can now be translated.
* Remove unused EDA_DRAW_PANEL attribute from all ERC test functions.
* Add get marker count method to SCH_SCREENS object.
* Redundant header removal.
* Lots of coding style policy fixes.
2011-10-07 10:41:30 -04:00
Wayne Stambaugh 5602177d45 Minor copy version information to clipboard improvements.
* Add KiCad build option states to copy version information to clipboard
  function.
* Add a note to the main CMakeList.txt file to let developers know that
  new option states should be added to the copy version information to
  clipboard function.
2011-10-05 14:26:22 -04:00
Fabrizio Tappero and jean-pierre charras 22b42b2a41 Commit new icons from Fabrizio Tappero .
(With a minor change for icon_cvpcb.svg: better look on dark backgrounds)
Fix bug 668200.
2011-10-05 14:36:32 +02:00
jean-pierre charras 6a33eed0f4 Fix typo errors and make translations more easy. 2011-10-03 21:11:09 +02:00
Wayne Stambaugh 301ef32e17 Fix error when opening component library file names with dot. 2011-10-02 16:24:41 -04:00
Wayne Stambaugh c2f1113e5d Fix Pcbnew KICAD_T enum names for consistency. 2011-10-01 15:24:27 -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
Roman Bashkov 611a5155fc pcbnew:
* Add visible clearance when edit node or track segment,
  add parameter "show clearance for new or edited track with via area"
  in "Display options" menu.
2011-09-30 12:24:10 +04:00
Wayne Stambaugh c09bc26dc2 Minor PCBNew code fixes.
* Translate French code names and comments.
* Dead code removal.
* Hot key object and structure coding style policy fixes.
* Doxygen comment warning fixes.
2011-09-29 12:49:40 -04:00
Fabrizio Tappero eaf17c596a New icons 2011-09-28 21:12:10 +02:00
jean-pierre charras cac9951682 Pcbnew: Fix 2 minor bugs about pcb texts: flipped texts have an incorrect rotation angle,
and text dialog editor did not handle properly negative rotation angles values.
Eeschema: fix bug when rotating (only using the Rotate hotkey) a field.
2011-09-28 10:32:31 +02:00
jean-pierre charras 538b1ed314 Eeschema: fix bug when rotating (only using the Rotate hotkey) a field. 2011-09-28 09:38:58 +02:00
jean-pierre charras 25f95ec11f Pcbnew: Fix 2 minor bugs about pcb texts: flipped texts have an incorrect rotation angle,
and text dialog editor did not handle properly negative rotation angles values.
2011-09-28 08:10:15 +02:00
Wayne Stambaugh e6681f17e4 Fix PCBNew segfault when adding a module. 2011-09-27 16:43:18 -04:00
Wayne Stambaugh b9b341dce2 PCB common library global variable removal and other minor fixes.
* Move auto save time global variables into PCB_EDIT_FRAME object.
* Move footprint library name list global variable int PCB_EDIT_FRAME
  object.
* Improve library back up and temporary file error message strings and make
  them translatable.
* PCBNew string unification.
* Translate French code names and comments.
* Coding style policy and Doxygen comment fixes.
2011-09-26 16:32:56 -04:00
Wayne Stambaugh de96452c41 Minor common PCB library code fixes.
* More common header file compiler fixes.
* Translate French code naming and comments.
* Remove global variable ScreenPcb.
* Dead code removal.
2011-09-24 14:33:28 -04:00
jean-pierre charras 063c56be30 Use accelerators from hot keys in place menu, from the Fabrizio's idea 2011-09-24 19:15:29 +02:00
Marco Mattila 2d761f302b Fix drawsegment bounding box and hittest issues in pcbnew. 2011-09-24 01:40:36 +03:00
jean-pierre charras 8db19bbd6a Preparing hotkeys/shortcuts changes in place menu. 2011-09-23 22:00:30 +02: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
JP Charras and Fabrizio Tappero, fabrizio.tappero 846dca8c05 Update .cpp icon files not updated in previous commit.
Fix minor issues.
Fic compil issue in dimension.cpp with wxMSW 2.8.12 (wxMSW 2.8.12 only).
2011-09-22 21:16:55 +02:00
743 changed files with 29731 additions and 59237 deletions
-1
View File
@@ -28,7 +28,6 @@ version.h
config.h
install_manifest.txt
Documentation/doxygen
Documentation/development/doxygen
*.bak
common/pcb_plot_params_keywords.cpp
include/pcb_plot_params_lexer.h
+4 -4
View File
@@ -47,7 +47,7 @@
class BOARD_DESIGN_SETTINGS;
class EDA_3D_FRAME;
class S3D_VERTEX;
class VIA;
class SEGVIA;
class D_PAD;
// We are using GL lists to store layers and other items
@@ -80,7 +80,7 @@ public:
EDA_3D_CANVAS( EDA_3D_FRAME* parent, int* attribList = 0 );
~EDA_3D_CANVAS();
EDA_3D_FRAME* Parent() const { return static_cast<EDA_3D_FRAME*>( GetParent() ); }
EDA_3D_FRAME* Parent() { return (EDA_3D_FRAME*)GetParent(); }
BOARD* GetBoard() { return Parent()->GetBoard(); }
@@ -160,8 +160,8 @@ public:
void Draw3DGrid( double aGriSizeMM );
void Draw3DAxis();
void Draw3DViaHole( const VIA * aVia );
void Draw3DPadHole( const D_PAD * aPad );
void Draw3DViaHole( SEGVIA * aVia );
void Draw3DPadHole( D_PAD * aPad );
DECLARE_EVENT_TABLE()
};
+46 -64
View File
@@ -77,7 +77,7 @@ static void BuildPadShapeThickOutlineAsPolygon( D_PAD* aPad,
{
if( aPad->GetShape() == PAD_CIRCLE ) // Draw a ring
{
TransformRingToPolygon( aCornerBuffer, aPad->ShapePos(),
TransformRingToPolygon( aCornerBuffer, aPad->ReturnShapePos(),
aPad->GetSize().x / 2, aCircleToSegmentsCount, aWidth );
return;
}
@@ -239,13 +239,8 @@ void EDA_3D_CANVAS::BuildBoard3DView()
BOARD* pcb = GetBoard();
bool realistic_mode = g_Parm_3D_Visu.IsRealisticMode();
// Number of segments to convert a circle to polygon
// Boost polygon (at least v 1.54, v1.55 and previous) in very rare cases crashes
// when using 16 segments to approximate a circle.
// So using 18 segments is a workaround to try to avoid these crashes
// ( We already used this trick in plot_board_layers.cpp,
// see PlotSolderMaskLayer() )
const int segcountforcircle = 18;
// Number of segments to draw a circle using segments
const int segcountforcircle = 16;
double correctionFactor = 1.0 / cos( M_PI / (segcountforcircle * 2) );
const int segcountLowQuality = 12; // segments to draw a circle with low quality
// to reduce time calculations
@@ -262,8 +257,8 @@ void EDA_3D_CANVAS::BuildBoard3DView()
// Build a polygon from edge cut items
wxString msg;
if( !pcb->GetBoardPolygonOutlines( bufferPcbOutlines, allLayerHoles, &msg ) )
if( ! pcb->GetBoardPolygonOutlines( bufferPcbOutlines,
allLayerHoles, &msg ) )
{
msg << wxT("\n\n") <<
_("Unable to calculate the board outlines.\n"
@@ -279,7 +274,7 @@ void EDA_3D_CANVAS::BuildBoard3DView()
bool hightQualityMode = false;
for( LAYER_NUM layer = FIRST_COPPER_LAYER; layer <= LAST_COPPER_LAYER;
++layer )
layer++ )
{
if( layer != LAST_COPPER_LAYER
&& layer >= g_Parm_3D_Visu.m_CopperLayersCount )
@@ -307,19 +302,18 @@ void EDA_3D_CANVAS::BuildBoard3DView()
// Add via hole
if( track->Type() == PCB_VIA_T )
{
VIA *via = static_cast<VIA*>( track );
VIATYPE_T viatype = via->GetViaType();
int holediameter = via->GetDrillValue();
int thickness = g_Parm_3D_Visu.GetCopperThicknessBIU();
int shape = track->GetShape();
int holediameter = track->GetDrillValue();
int thickness = g_Parm_3D_Visu.GetCopperThicknessBIU();
int hole_outer_radius = (holediameter + thickness) / 2;
if( viatype != VIA_THROUGH )
if( shape != VIA_THROUGH )
TransformCircleToPolygon( currLayerHoles,
via->GetStart(), hole_outer_radius,
track->GetStart(), hole_outer_radius,
segcountLowQuality );
else if( !throughHolesListBuilt )
TransformCircleToPolygon( allLayerHoles,
via->GetStart(), hole_outer_radius,
track->GetStart(), hole_outer_radius,
segcountLowQuality );
}
}
@@ -360,11 +354,9 @@ void EDA_3D_CANVAS::BuildBoard3DView()
LAYER_NUM zonelayer = zone->GetLayer();
if( zonelayer == layer )
{
zone->TransformSolidAreasShapesToPolygonSet(
hightQualityMode ? bufferPolys : bufferZonesPolys,
segcountLowQuality, correctionFactorLQ );
}
}
}
@@ -439,16 +431,14 @@ void EDA_3D_CANVAS::BuildBoard3DView()
}
// Draw vias holes (vertical cylinders)
for( const TRACK* track = pcb->m_Track; track != NULL; track = track->Next() )
for( TRACK* track = pcb->m_Track; track != NULL; track = track->Next() )
{
const VIA *via = dynamic_cast<const VIA*>(track);
if( via )
Draw3DViaHole( via );
if( track->Type() == PCB_VIA_T )
Draw3DViaHole( (SEGVIA*) track );
}
// Draw pads holes (vertical cylinders)
for( const MODULE* module = pcb->m_Modules; module != NULL; module = module->Next() )
for( MODULE* module = pcb->m_Modules; module != NULL; module = module->Next() )
{
for( D_PAD* pad = module->Pads(); pad != NULL; pad = pad->Next() )
Draw3DPadHole( pad );
@@ -515,7 +505,6 @@ void EDA_3D_CANVAS::BuildTechLayers3DView()
// to reduce time calculations
// for holes and items which do not need
// a fine representation
double correctionFactorLQ = 1.0 / cos( M_PI / (segcountLowQuality * 2) );
CPOLYGONS_LIST bufferPolys;
bufferPolys.reserve( 100000 ); // Reserve for large board
@@ -525,8 +514,8 @@ void EDA_3D_CANVAS::BuildTechLayers3DView()
CPOLYGONS_LIST bufferPcbOutlines; // stores the board main outlines
// Build a polygon from edge cut items
wxString msg;
if( !pcb->GetBoardPolygonOutlines( bufferPcbOutlines, allLayerHoles, &msg ) )
if( ! pcb->GetBoardPolygonOutlines( bufferPcbOutlines,
allLayerHoles, &msg ) )
{
msg << wxT("\n\n") <<
_("Unable to calculate the board outlines.\n"
@@ -535,19 +524,20 @@ void EDA_3D_CANVAS::BuildTechLayers3DView()
}
int thickness = g_Parm_3D_Visu.GetCopperThicknessBIU();
// Add via holes
for( VIA* via = GetFirstVia( pcb->m_Track ); via != NULL;
via = GetFirstVia( via->Next() ) )
for( TRACK* track = pcb->m_Track; track != NULL; track = track->Next() )
{
VIATYPE_T viatype = via->GetViaType();
int holediameter = via->GetDrillValue();
int hole_outer_radius = (holediameter + thickness) / 2;
// Add via hole
if( track->Type() == PCB_VIA_T )
{
int shape = track->GetShape();
int holediameter = track->GetDrillValue();
int hole_outer_radius = (holediameter + thickness) / 2;
if( viatype == VIA_THROUGH )
TransformCircleToPolygon( allLayerHoles,
via->GetStart(), hole_outer_radius,
segcountLowQuality );
if( shape == VIA_THROUGH )
TransformCircleToPolygon( allLayerHoles,
track->GetStart(), hole_outer_radius,
segcountLowQuality );
}
}
// draw pads holes
@@ -567,7 +557,7 @@ void EDA_3D_CANVAS::BuildTechLayers3DView()
allLayerHoles.ExportTo( brdpolysetHoles );
for( LAYER_NUM layer = FIRST_NON_COPPER_LAYER; layer <= LAST_NON_COPPER_LAYER;
++layer )
layer++ )
{
// Skip user layers, which are not drawn here
if( IsUserLayer( layer) )
@@ -616,30 +606,22 @@ void EDA_3D_CANVAS::BuildTechLayers3DView()
continue;
BuildPadShapeThickOutlineAsPolygon( pad, bufferPolys,
linewidth, segcountforcircle, correctionFactor );
linewidth,
segcountforcircle, correctionFactor );
}
}
else
module->TransformPadsShapesWithClearanceToPolygon( layer,
bufferPolys, 0, segcountforcircle, correctionFactor );
bufferPolys,
0,
segcountforcircle,
correctionFactor );
module->TransformGraphicShapesWithClearanceToPolygonSet( layer,
bufferPolys, 0, segcountforcircle, correctionFactor );
}
// Draw non copper zones
if( g_Parm_3D_Visu.GetFlag( FL_ZONE ) )
{
for( int ii = 0; ii < pcb->GetAreaCount(); ii++ )
{
ZONE_CONTAINER* zone = pcb->GetArea( ii );
if( !zone->IsOnLayer( layer ) )
continue;
zone->TransformSolidAreasShapesToPolygonSet(
bufferPolys, segcountLowQuality, correctionFactorLQ );
}
bufferPolys,
0,
segcountforcircle,
correctionFactor );
}
// bufferPolys contains polygons to merge. Many overlaps .
@@ -718,7 +700,7 @@ void EDA_3D_CANVAS::BuildBoard3DAuxLayers()
bufferPolys.reserve( 5000 ); // Reserve for items not on board
for( LAYER_NUM layer = FIRST_USER_LAYER; layer <= LAST_USER_LAYER;
++layer )
layer++ )
{
if( !Is3DLayerEnabled( layer ) )
continue;
@@ -1065,20 +1047,20 @@ void EDA_3D_CANVAS::Draw3DGrid( double aGriSizeMM )
}
void EDA_3D_CANVAS::Draw3DViaHole( const VIA* aVia )
void EDA_3D_CANVAS::Draw3DViaHole( SEGVIA* aVia )
{
LAYER_NUM top_layer, bottom_layer;
int inner_radius = aVia->GetDrillValue() / 2;
int thickness = g_Parm_3D_Visu.GetCopperThicknessBIU();
aVia->LayerPair( &top_layer, &bottom_layer );
aVia->ReturnLayerPair( &top_layer, &bottom_layer );
// Drawing via hole:
if( g_Parm_3D_Visu.IsRealisticMode() )
SetGLCopperColor();
else
{
EDA_COLOR_T color = g_ColorsSettings.GetItemColor( VIAS_VISIBLE + aVia->GetViaType() );
EDA_COLOR_T color = g_ColorsSettings.GetItemColor( VIAS_VISIBLE + aVia->GetShape() );
SetGLColor( color );
}
@@ -1129,7 +1111,7 @@ void MODULE::ReadAndInsert3DComponentShape( EDA_3D_CANVAS* glcanvas,
// Draw 3D pads.
void EDA_3D_CANVAS::Draw3DPadHole( const D_PAD* aPad )
void EDA_3D_CANVAS::Draw3DPadHole( D_PAD* aPad )
{
// Draw the pad hole
wxSize drillsize = aPad->GetDrillSize();
+88 -84
View File
@@ -26,8 +26,7 @@
*/
#include <fctsys.h>
#include <kiface_i.h>
#include <pgm_base.h>
#include <appl_wxstruct.h>
#include <3d_viewer.h>
#include <3d_canvas.h>
@@ -41,24 +40,23 @@
INFO3D_VISU g_Parm_3D_Visu;
// Key to store 3D Viewer config:
static const wxChar keyBgColor_Red[] = wxT( "BgColor_Red" );
static const wxChar keyBgColor_Green[] = wxT( "BgColor_Green" );
static const wxChar keyBgColor_Blue[] = wxT( "BgColor_Blue" );
static const wxChar keyShowRealisticMode[] = wxT( "ShowRealisticMode" );
static const wxChar keyShowAxis[] = wxT( "ShowAxis" );
static const wxChar keyShowGrid[] = wxT( "ShowGrid3D" );
static const wxChar keyShowGridSize[] = wxT( "Grid3DSize" );
static const wxChar keyShowZones[] = wxT( "ShowZones" );
static const wxChar keyShowFootprints[] = wxT( "ShowFootprints" );
static const wxChar keyShowCopperThickness[] = wxT( "ShowCopperThickness" );
static const wxChar keyShowAdhesiveLayers[] = wxT( "ShowAdhesiveLayers" );
static const wxChar keyShowSilkScreenLayers[] = wxT( "ShowSilkScreenLayers" );
static const wxChar keyShowSolderMaskLayers[] = wxT( "ShowSolderMasLayers" );
static const wxChar keyShowSolderPasteLayers[] =wxT( "ShowSolderPasteLayers" );
static const wxChar keyShowCommentsLayer[] = wxT( "ShowCommentsLayers" );
static const wxChar keyShowBoardBody[] = wxT( "ShowBoardBody" );
static const wxChar keyShowEcoLayers[] = wxT( "ShowEcoLayers" );
static const wxString keyBgColor_Red( wxT( "BgColor_Red" ) );
static const wxString keyBgColor_Green( wxT( "BgColor_Green" ) );
static const wxString keyBgColor_Blue( wxT( "BgColor_Blue" ) );
static const wxString keyShowRealisticMode( wxT( "ShowRealisticMode" ) );
static const wxString keyShowAxis( wxT( "ShowAxis" ) );
static const wxString keyShowGrid( wxT( "ShowGrid3D" ) );
static const wxString keyShowGridSize( wxT( "Grid3DSize" ) );
static const wxString keyShowZones( wxT( "ShowZones" ) );
static const wxString keyShowFootprints( wxT( "ShowFootprints" ) );
static const wxString keyShowCopperThickness( wxT( "ShowCopperThickness" ) );
static const wxString keyShowAdhesiveLayers( wxT( "ShowAdhesiveLayers" ) );
static const wxString keyShowSilkScreenLayers( wxT( "ShowSilkScreenLayers" ) );
static const wxString keyShowSolderMaskLayers( wxT( "ShowSolderMasLayers" ) );
static const wxString keyShowSolderPasteLayers( wxT( "ShowSolderPasteLayers" ) );
static const wxString keyShowCommentsLayer( wxT( "ShowCommentsLayers" ) );
static const wxString keyShowBoardBody( wxT( "ShowBoardBody" ) );
static const wxString keyShowEcoLayers( wxT( "ShowEcoLayers" ) );
BEGIN_EVENT_TABLE( EDA_3D_FRAME, EDA_BASE_FRAME )
EVT_ACTIVATE( EDA_3D_FRAME::OnActivate )
@@ -76,13 +74,11 @@ EVT_MENU_RANGE( ID_MENU3D_GRID, ID_MENU3D_GRID_END,
EVT_CLOSE( EDA_3D_FRAME::OnCloseWindow )
END_EVENT_TABLE()
EDA_3D_FRAME::EDA_3D_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent,
const wxString& aTitle, long style ) :
KIWAY_PLAYER( aKiway, aParent, FRAME_PCB_DISPLAY3D, aTitle,
wxDefaultPosition, wxDefaultSize, style, wxT( "Frame3D" ) )
END_EVENT_TABLE() EDA_3D_FRAME::EDA_3D_FRAME( PCB_BASE_FRAME* parent,
const wxString& title,
long style ) :
EDA_BASE_FRAME( parent, DISPLAY3D_FRAME_TYPE, title,
wxDefaultPosition, wxDefaultSize, style, wxT( "Frame3D" ) )
{
m_canvas = NULL;
m_reloadRequest = false;
@@ -93,7 +89,7 @@ EDA_3D_FRAME::EDA_3D_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent,
icon.CopyFromBitmap( KiBitmap( icon_3d_xpm ) );
SetIcon( icon );
LoadSettings( config() );
GetSettings();
SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );
// Create the status line
@@ -145,84 +141,92 @@ void EDA_3D_FRAME::OnCloseWindow( wxCloseEvent& Event )
}
void EDA_3D_FRAME::LoadSettings( wxConfigBase* aCfg )
void EDA_3D_FRAME::GetSettings()
{
EDA_BASE_FRAME::LoadSettings( aCfg );
wxConfig* config = wxGetApp().GetSettings(); // Current config used by application
class INFO3D_VISU& prms = g_Parm_3D_Visu;
INFO3D_VISU& prms = g_Parm_3D_Visu;
if( config )
{
EDA_BASE_FRAME::LoadSettings();
aCfg->Read( keyBgColor_Red, &g_Parm_3D_Visu.m_BgColor.m_Red, 0.0 );
aCfg->Read( keyBgColor_Green, &g_Parm_3D_Visu.m_BgColor.m_Green, 0.0 );
aCfg->Read( keyBgColor_Blue, &g_Parm_3D_Visu.m_BgColor.m_Blue, 0.0 );
config->Read( keyBgColor_Red, &prms.m_BgColor.m_Red, 0.0 );
config->Read( keyBgColor_Green, &prms.m_BgColor.m_Green, 0.0 );
config->Read( keyBgColor_Blue, &prms.m_BgColor.m_Blue, 0.0 );
bool tmp;
aCfg->Read( keyShowRealisticMode, &tmp, false );
prms.SetFlag( FL_USE_REALISTIC_MODE, tmp );
bool tmp;
config->Read( keyShowRealisticMode, &tmp, false );
prms.SetFlag( FL_USE_REALISTIC_MODE, tmp );
aCfg->Read( keyShowAxis, &tmp, true );
prms.SetFlag( FL_AXIS, tmp );
config->Read( keyShowAxis, &tmp, true );
prms.SetFlag( FL_AXIS, tmp );
aCfg->Read( keyShowGrid, &tmp, true );
prms.SetFlag( FL_GRID, tmp );
config->Read( keyShowGrid, &tmp, true );
prms.SetFlag( FL_GRID, tmp );
aCfg->Read( keyShowGridSize, &prms.m_3D_Grid, 10.0 );
prms.SetFlag( FL_MODULE, tmp );
config->Read( keyShowGridSize, &prms.m_3D_Grid, 10.0 );
prms.SetFlag( FL_MODULE, tmp );
aCfg->Read( keyShowFootprints, &tmp, true );
prms.SetFlag( FL_MODULE, tmp );
config->Read( keyShowFootprints, &tmp, true );
prms.SetFlag( FL_MODULE, tmp );
aCfg->Read( keyShowCopperThickness, &tmp, false );
prms.SetFlag( FL_USE_COPPER_THICKNESS, tmp );
config->Read( keyShowCopperThickness, &tmp, false );
prms.SetFlag( FL_USE_COPPER_THICKNESS, tmp );
aCfg->Read( keyShowZones, &tmp, true );
prms.SetFlag( FL_ZONE, tmp );
config->Read( keyShowZones, &tmp, true );
prms.SetFlag( FL_ZONE, tmp );
aCfg->Read( keyShowAdhesiveLayers, &tmp, true );
prms.SetFlag( FL_ADHESIVE, tmp );
config->Read( keyShowAdhesiveLayers, &tmp, true );
prms.SetFlag( FL_ADHESIVE, tmp );
aCfg->Read( keyShowSilkScreenLayers, &tmp, true );
prms.SetFlag( FL_SILKSCREEN, tmp );
config->Read( keyShowSilkScreenLayers, &tmp, true );
prms.SetFlag( FL_SILKSCREEN, tmp );
aCfg->Read( keyShowSolderMaskLayers, &tmp, true );
prms.SetFlag( FL_SOLDERMASK, tmp );
config->Read( keyShowSolderMaskLayers, &tmp, true );
prms.SetFlag( FL_SOLDERMASK, tmp );
aCfg->Read( keyShowSolderPasteLayers, &tmp, true );
prms.SetFlag( FL_SOLDERPASTE, tmp );
config->Read( keyShowSolderPasteLayers, &tmp, true );
prms.SetFlag( FL_SOLDERPASTE, tmp );
aCfg->Read( keyShowCommentsLayer, &tmp, true );
prms.SetFlag( FL_COMMENTS, tmp );
config->Read( keyShowCommentsLayer, &tmp, true );
prms.SetFlag( FL_COMMENTS, tmp );
aCfg->Read( keyShowEcoLayers, &tmp, true );
prms.SetFlag( FL_ECO, tmp );
config->Read( keyShowEcoLayers, &tmp, true );
prms.SetFlag( FL_ECO, tmp );
aCfg->Read( keyShowBoardBody, &tmp, true );
prms.SetFlag( FL_SHOW_BOARD_BODY, tmp );
config->Read( keyShowBoardBody, &tmp, true );
prms.SetFlag( FL_SHOW_BOARD_BODY, tmp );
}
}
void EDA_3D_FRAME::SaveSettings( wxConfigBase* aCfg )
void EDA_3D_FRAME::SaveSettings()
{
EDA_BASE_FRAME::SaveSettings( aCfg );
wxConfig* config = wxGetApp().GetSettings(); // Current config used by application
INFO3D_VISU& prms = g_Parm_3D_Visu;
if( !config )
return;
aCfg->Write( keyBgColor_Red, g_Parm_3D_Visu.m_BgColor.m_Red );
aCfg->Write( keyBgColor_Green, g_Parm_3D_Visu.m_BgColor.m_Green );
aCfg->Write( keyBgColor_Blue, g_Parm_3D_Visu.m_BgColor.m_Blue );
aCfg->Write( keyShowRealisticMode, prms.GetFlag( FL_USE_REALISTIC_MODE ) );
aCfg->Write( keyShowAxis, prms.GetFlag( FL_AXIS ) );
aCfg->Write( keyShowGrid, prms.GetFlag( FL_GRID ) );
aCfg->Write( keyShowGridSize, prms.m_3D_Grid );
aCfg->Write( keyShowFootprints, prms.GetFlag( FL_MODULE ) );
aCfg->Write( keyShowCopperThickness, prms.GetFlag( FL_USE_COPPER_THICKNESS ) );
aCfg->Write( keyShowZones, prms.GetFlag( FL_ZONE ) );
aCfg->Write( keyShowAdhesiveLayers, prms.GetFlag( FL_ADHESIVE ) );
aCfg->Write( keyShowSilkScreenLayers, prms.GetFlag( FL_SILKSCREEN ) );
aCfg->Write( keyShowSolderMaskLayers, prms.GetFlag( FL_SOLDERMASK ) );
aCfg->Write( keyShowSolderPasteLayers, prms.GetFlag( FL_SOLDERPASTE ) );
aCfg->Write( keyShowCommentsLayer, prms.GetFlag( FL_COMMENTS ) );
aCfg->Write( keyShowEcoLayers, prms.GetFlag( FL_ECO ) );
aCfg->Write( keyShowBoardBody, prms.GetFlag( FL_SHOW_BOARD_BODY ) );
EDA_BASE_FRAME::SaveSettings();
class INFO3D_VISU& prms = g_Parm_3D_Visu;
config->Write( keyBgColor_Red, prms.m_BgColor.m_Red );
config->Write( keyBgColor_Green, prms.m_BgColor.m_Green );
config->Write( keyBgColor_Blue, prms.m_BgColor.m_Blue );
config->Write( keyShowRealisticMode, prms.GetFlag( FL_USE_REALISTIC_MODE ) );
config->Write( keyShowAxis, prms.GetFlag( FL_AXIS ) );
config->Write( keyShowGrid, prms.GetFlag( FL_GRID ) );
config->Write( keyShowGridSize, prms.m_3D_Grid );
config->Write( keyShowFootprints, prms.GetFlag( FL_MODULE ) );
config->Write( keyShowCopperThickness, prms.GetFlag( FL_USE_COPPER_THICKNESS ) );
config->Write( keyShowZones, prms.GetFlag( FL_ZONE ) );
config->Write( keyShowAdhesiveLayers, prms.GetFlag( FL_ADHESIVE ) );
config->Write( keyShowSilkScreenLayers, prms.GetFlag( FL_SILKSCREEN ) );
config->Write( keyShowSolderMaskLayers, prms.GetFlag( FL_SOLDERMASK ) );
config->Write( keyShowSolderPasteLayers, prms.GetFlag( FL_SOLDERPASTE ) );
config->Write( keyShowCommentsLayer, prms.GetFlag( FL_COMMENTS ) );
config->Write( keyShowEcoLayers, prms.GetFlag( FL_ECO ) );
config->Write( keyShowBoardBody, prms.GetFlag( FL_SHOW_BOARD_BODY ) );
}
@@ -511,7 +515,7 @@ void EDA_3D_FRAME::Set3DBgColor()
newcolor = wxGetColourFromUser( this, oldcolor );
if( !newcolor.IsOk() ) // Happens on cancel dialog
if( ! newcolor.IsOk() ) // Happens on cancel dialog
return;
if( newcolor != oldcolor )
+1 -1
View File
@@ -31,7 +31,7 @@
#include <common.h>
#include <macros.h>
#include <kicad_string.h>
#include <pgm_base.h>
#include <appl_wxstruct.h>
#include <3d_viewer.h>
#include <info3d_visu.h>
+8 -14
View File
@@ -30,7 +30,7 @@
#ifndef __3D_VIEWER_H__
#define __3D_VIEWER_H__
#include <draw_frame.h>
#include <wxstruct.h> // for EDA_BASE_FRAME.
#if !wxUSE_GLCANVAS
#error Please build wxWidgets with Opengl support (./configure --with-opengl)
@@ -53,35 +53,30 @@
#include <3d_struct.h>
#define KISYS3DMOD "KISYS3DMOD"
class EDA_3D_CANVAS;
class PCB_BASE_FRAME;
#define KICAD_DEFAULT_3D_DRAWFRAME_STYLE (wxDEFAULT_FRAME_STYLE | wxWANTS_CHARS)
#define LIB3D_PATH wxT( "packages3d" )
#define KICAD_DEFAULT_3D_DRAWFRAME_STYLE wxDEFAULT_FRAME_STYLE | wxWANTS_CHARS
#define LIB3D_PATH wxT( "packages3d" )
class EDA_3D_FRAME : public KIWAY_PLAYER
class EDA_3D_FRAME : public EDA_BASE_FRAME
{
private:
EDA_3D_CANVAS* m_canvas;
bool m_reloadRequest;
wxString m_defaultFileName; /// Filename to propose for screenshot
/// Tracks whether to use Orthographic or Perspective projection
bool m_ortho;
public:
EDA_3D_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent, const wxString& aTitle,
EDA_3D_FRAME( PCB_BASE_FRAME* parent, const wxString& title,
long style = KICAD_DEFAULT_3D_DRAWFRAME_STYLE );
~EDA_3D_FRAME()
{
m_auimgr.UnInit();
};
PCB_BASE_FRAME* Parent() const { return (PCB_BASE_FRAME*)GetParent(); }
PCB_BASE_FRAME* Parent() { return (PCB_BASE_FRAME*)GetParent(); }
BOARD* GetBoard();
@@ -130,9 +125,8 @@ private:
// to the current display options
void ReCreateMainToolbar();
void SetToolbars();
void LoadSettings( wxConfigBase* aCfg ); // overload virtual
void SaveSettings( wxConfigBase* aCfg ); // overload virtual
void GetSettings();
void SaveSettings();
// Other functions
void OnLeftClick( wxDC* DC, const wxPoint& MousePos );
+3 -26
View File
@@ -4,7 +4,7 @@
* Copyright (C) 2013 Tuomas Vaherkoski <tuomasvaherkoski@gmail.com>
* Copyright (C) 2012 Jean-Pierre Charras, jp.charras@wanadoo.fr
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -71,7 +71,7 @@ void VRML_MODEL_PARSER::Load( const wxString aFilename )
if ( text == NULL )
continue;
if( stricmp( text, "DEF" ) == 0 || stricmp( text, "Transform" ) == 0 || stricmp( text, "Group" ) == 0 )
if( stricmp( text, "DEF" ) == 0 || stricmp( text, "Group" ) == 0 )
{
while( GetLine( file, line, &LineNum, 512 ) )
{
@@ -121,7 +121,7 @@ int VRML_MODEL_PARSER::readMaterial( FILE* file, int* LineNum )
return 0;
}
if( stricmp( command, "DEF" ) == 0 || stricmp( command,"Transform" ) == 0 || stricmp( command, "Material") == 0)
if( stricmp( command, "DEF" ) == 0 || stricmp( command, "Material") == 0)
{
material = new S3D_MATERIAL( GetMaster(), mat_name );
@@ -197,9 +197,6 @@ int VRML_MODEL_PARSER::readChildren( FILE* file, int* LineNum )
{
text = strtok( line, sep_chars );
if( *text == '[' )
continue;
if( *text == ']' )
return 0;
@@ -236,11 +233,6 @@ int VRML_MODEL_PARSER::readShape( FILE* file, int* LineNum )
break;
}
if( *text == '{' )
{
continue;
}
if( stricmp( text, "appearance" ) == 0 )
{
readAppearance( file, LineNum );
@@ -275,11 +267,6 @@ int VRML_MODEL_PARSER::readAppearance( FILE* file, int* LineNum )
break;
}
if( *text == '{' )
{
continue;
}
if( stricmp( text, "material" ) == 0 )
{
readMaterial( file, LineNum );
@@ -393,16 +380,6 @@ int VRML_MODEL_PARSER::readGeometry( FILE* file, int* LineNum )
break;
}
if( stricmp( text, "creaseAngle" ) == 0 )
{
continue;
}
if( *text == '{' )
{
continue;
}
if( stricmp( text, "normalPerVertex" ) == 0 )
{
text = strtok( NULL, " ,\t\n\r" );
+39 -76
View File
@@ -23,9 +23,8 @@ set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules )
# reports.
#
#option( USE_KIWAY_DLLS "Build the major modules as KIFACE DLLs or DSOs, will soon be the norm." ON )
set( USE_KIWAY_DLLS true ) # this is now mandatory, the code is the same anyways, the old code is gone.
option( USE_KIWAY_DLLS
"Build the major modules as KIFACE DLLs or DSOs, will soon be the norm." OFF )
# The desire is to migrate designs *away from* case independence, and to create designs which use
# literally (case specific) interpreted component names. But for backwards compatibility,
@@ -82,7 +81,7 @@ mark_as_advanced( KICAD_SKIP_BOOST ) # Normal builders should build Boost.
# when not defined by user, the default is python.exe under Windows and python2 for others
# python binary file should be is exec path.
option( BUILD_GITHUB_PLUGIN "Build the GITHUB_PLUGIN for pcbnew." ON )
option( BUILD_GITHUB_PLUGIN "Build the GITHUB_PLUGIN for pcbnew." OFF )
# This can be set to a custom name to brag about a particular branch in the "About" dialog:
set( KICAD_REPO_NAME "product" CACHE STRING "Name of the tree from which this build came." )
@@ -116,12 +115,6 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
OUTPUT_VARIABLE GCC_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE )
if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
set( TO_LINKER -XLinker )
else()
set( TO_LINKER -Wl )
endif()
# Establish -Wall early, so specialized relaxations of this may come
# subsequently on the command line, such as in pcbnew/github/CMakeLists.txt
set( CMAKE_C_FLAGS "-Wall ${CMAKE_C_FLAGS}" )
@@ -157,17 +150,10 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
endif()
find_package( OpenMP QUIET )
if( OPENMP_FOUND )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}" )
add_definitions( -DUSE_OPENMP )
# MinGW does not include the OpenMP link library and FindOpenMP.cmake does not
# set it either. Not sure this is the most elegant solution but it works.
if( MINGW )
set( OPENMP_LIBRARIES gomp )
endif()
endif()
if( MINGW )
@@ -203,18 +189,18 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PIC_FLAG}" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PIC_FLAG}" )
if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
set( TO_LINKER -XLinker )
else()
set( TO_LINKER -Wl )
endif()
# Thou shalt not link vaporware and tell us it's a valid DSO (apple ld doesn't support it)
if( NOT APPLE )
# Thou shalt not link vaporware and tell us it's a valid DSO (apple ld doesn't support it)
set( CMAKE_SHARED_LINKER_FLAGS "${TO_LINKER},--no-undefined" )
set( CMAKE_MODULE_LINKER_FLAGS "${TO_LINKER},--no-undefined" )
set( CMAKE_EXE_LINKER_FLAGS_RELEASE "-s" )
# Defeat ELF's ability to use the GOT to replace locally implemented functions
# with ones from another module.
# https://bugs.launchpad.net/kicad/+bug/1322354
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${TO_LINKER},-Bsymbolic" )
set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${TO_LINKER},-Bsymbolic" )
endif()
endif()
@@ -235,11 +221,11 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
if( NOT CMAKE_CXX_COMPILER )
EXEC_PROGRAM( wx-config ARGS --cc OUTPUT_VARIABLE CMAKE_C_COMPILER )
endif()
endif( NOT CMAKE_CXX_COMPILER )
if( NOT CMAKE_CXX_COMPILER )
EXEC_PROGRAM( wx-config ARGS --cxx OUTPUT_VARIABLE CMAKE_CXX_COMPILER )
endif()
endif( NOT CMAKE_CXX_COMPILER )
endif()
@@ -355,7 +341,7 @@ include( ExternalProject )
include( CheckFindPackageResult )
# Turn on wxWidgets compatibility mode for some classes
add_definitions( -DWX_COMPATIBILITY )
add_definitions(-DWX_COMPATIBILITY)
#######################
# Find OpenGL library #
@@ -363,20 +349,14 @@ add_definitions( -DWX_COMPATIBILITY )
find_package( OpenGL QUIET )
check_find_package_result( OPENGL_FOUND "OpenGL" )
# Dick 5-Feb-2014:
# Marco: We cannot use both ExternalProject_Add() add and find_package()
# in the same CMake tree and have them both reference the same package:
# http://stackoverflow.com/questions/6351609/cmake-linking-to-library-downloaded-from-externalproject-add
# https://www.mail-archive.com/cmake@cmake.org/msg47501.html
# Handle target used to specify if a target needs wx-widgets or other libraries
# Always defined, empty if no libraries are to be built
# Always defined, empty if no libraries are to be build
add_custom_target( lib-dependencies )
if( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC )
# This should be built in all cases, if swig exec is not avaiable
# will be impossible also enable SCRIPTING being for PCBNEW required immediately
# This should be build in all cases, if swig exec is not avaiable
# will be impossible also enable SCRIPTING being for PCBNEW required immediatly
include( download_pcre )
include( download_swig )
@@ -401,8 +381,8 @@ if( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC )
if( KICAD_SCRIPTING OR KICAD_SCRIPTING_WXPYTHON OR KICAD_SCRIPTING_MODULES )
message(STATUS "Scripting ENABLED")
message(STATUS "Scripting ENABLED")
include( download_wxpython )
set( SWIG_EXECUTABLE ${SWIG_ROOT}/bin/swig )
@@ -452,7 +432,7 @@ if( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC )
if( KICAD_BUILD_DYNAMIC AND APPLE )
add_custom_target( osx_fix_bundles ALL DEPENDS cvpcb eeschema gerbview kicad pcbnew bitmap2component pcb_calculator pl_editor)
add_custom_command(TARGET osx_fix_bundles POST_BUILD COMMAND ${PROJECT_SOURCE_DIR}/scripts/osx_fixbundle.sh ${PROJECT_SOURCE_DIR} COMMENT "Migrating dylibs to bundles")
add_custom_command(TARGET osx_fix_bundles POST_BUILD COMMAND scripts/osx_fixbundle.sh COMMENT "Migrating dylibs to bundles")
endif()
endif( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC)
@@ -460,18 +440,14 @@ endif( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC)
#####################
# Find GLEW library #
#####################
if( NOT GLEW_FOUND )
find_package( GLEW )
check_find_package_result( GLEW_FOUND "GLEW" )
endif()
find_package(GLEW)
check_find_package_result(GLEW_FOUND "GLEW")
######################
# Find Cairo library #
######################
if( NOT CAIRO_FOUND )
find_package( Cairo 1.8.1 QUIET )
check_find_package_result( CAIRO_FOUND "Cairo" )
endif()
find_package(Cairo 1.8.1 QUIET)
check_find_package_result(CAIRO_FOUND "Cairo")
# Download boost and possibly build parts of it
#################################################
@@ -483,8 +459,6 @@ if( KICAD_SKIP_BOOST )
message( FATAL_ERROR "Boost 1.54+ libraries are required." )
endif()
add_custom_target( boost ) # it is required to meet some further dependencies
message( WARNING "
WARNING: You decided to skip building boost library.
KiCad developers strongly advise you to build the bundled boost library, as it is known to work with KiCad.
@@ -500,9 +474,6 @@ endif()
# application. You can figure out what libraries you need here;
# http://www.wxwidgets.org/manuals/2.8/wx_librarieslist.html
# See line 41 of CMakeModules/FindwxWidgets.cmake
set( wxWidgets_CONFIG_OPTIONS --static=no )
# On Apple only wxwidgets 2.9 or higher doesn't need to find aui part of base
# Seems no more needed on wx-3
if( APPLE AND ( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES OR KICAD_SCRIPTING_WXPYTHON) )
@@ -512,8 +483,8 @@ else()
endif()
if( NOT (KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC) )
check_find_package_result( wxWidgets_FOUND "wxWidgets" )
endif()
check_find_package_result( wxWidgets_FOUND "wxWidgets" )
endif( NOT (KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC) )
# Include wxWidgets macros.
include( ${wxWidgets_USE_FILE} )
@@ -561,15 +532,15 @@ if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES )
set( PythonInterp_FIND_VERSION 2.6 )
set( PythonLibs_FIND_VERSION 2.6 )
endif()
# force a python version < 3.0
set( PythonInterp_FIND_VERSION 2.6)
set( PythonLibs_FIND_VERSION 2.6 )
find_package( PythonInterp )
check_find_package_result( PYTHONINTERP_FOUND "Python Interpreter" )
if( NOT PYTHON_VERSION_MAJOR EQUAL 2 )
message( FATAL_ERROR "Python 2.x is required." )
endif()
@@ -632,6 +603,7 @@ add_subdirectory( 3d-viewer )
add_subdirectory( cvpcb )
add_subdirectory( eeschema )
add_subdirectory( gerbview )
add_subdirectory( kicad )
add_subdirectory( lib_dxf )
add_subdirectory( pcbnew )
add_subdirectory( polygon )
@@ -639,11 +611,9 @@ add_subdirectory( pagelayout_editor )
add_subdirectory( potrace )
add_subdirectory( bitmap2component )
add_subdirectory( pcb_calculator )
add_subdirectory( kicad ) # should follow pcbnew, eeschema
add_subdirectory( tools )
add_subdirectory( utils )
add_subdirectory( qa )
#add_subdirectory( new )
@@ -663,16 +633,16 @@ add_dependencies( pnsrouter boost )
if ( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC )
add_dependencies( pcbnew lib-dependencies )
add_dependencies( eeschema lib-dependencies )
add_dependencies( cvpcb lib-dependencies )
add_dependencies( common lib-dependencies )
add_dependencies( gal lib-dependencies )
add_dependencies( pcbcommon lib-dependencies )
add_dependencies( 3d-viewer lib-dependencies )
add_dependencies( pcad2kicadpcb lib-dependencies )
add_dependencies( pl_editor lib-dependencies )
add_dependencies( pnsrouter lib-dependencies )
add_dependencies( pcbnew lib-dependencies )
add_dependencies( eeschema lib-dependencies )
add_dependencies( cvpcb lib-dependencies )
add_dependencies( common lib-dependencies )
add_dependencies( gal lib-dependencies )
add_dependencies( pcbcommon lib-dependencies )
add_dependencies( 3d-viewer lib-dependencies )
add_dependencies( pcad2kicadpcb lib-dependencies )
add_dependencies( pl_editor lib-dependencies )
add_dependencies( pnsrouter lib-dependencies )
endif()
if ( KICAD_BUILD_DYNAMIC )
@@ -696,13 +666,6 @@ if( DOXYGEN_FOUND )
DEPENDS Doxyfile
COMMENT "building doxygen docs into directory Documentation/doxygen/html"
)
add_custom_target( dev-docs
${CMAKE_COMMAND} -E remove_directory Documentation/development/doxygen
COMMAND ${DOXYGEN_EXECUTABLE}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Documentation/development
DEPENDS Doxyfile
COMMENT "building developer's resource docs into directory Documentation/development/doxygen/html"
)
else()
message( STATUS "WARNING: Doxygen not found - doxygen-docs (Source Docs) target not created" )
endif()
+1 -7
View File
@@ -38,12 +38,6 @@
# Where the library is to be installed.
set( PREFIX ${DOWNLOAD_DIR}/avhttp )
if( KICAD_SKIP_BOOST )
set( AVHTTP_DEPEND "" )
else()
set( AVHTTP_DEPEND "boost" )
endif()
# Install the AVHTTP header only library ${PREFIX}
ExternalProject_Add( avhttp
@@ -52,7 +46,7 @@ ExternalProject_Add( avhttp
# grab it from a local zip file for now, cmake caller's source dir
URL ${CMAKE_CURRENT_SOURCE_DIR}/avhttp-master.zip
DEPENDS ${AVHTTP_DEPEND}
DEPENDS boost
CONFIGURE_COMMAND ""
+12 -26
View File
@@ -59,9 +59,7 @@ set( BOOST_LIBS_BUILT
)
#-----</configure>---------------------------------------------------------------
if( NOT BZIP2_FOUND )
find_package( BZip2 REQUIRED )
endif()
find_package( BZip2 REQUIRED )
string( REGEX REPLACE "\\." "_" BOOST_VERS "${BOOST_RELEASE}" )
set( PREFIX ${DOWNLOAD_DIR}/boost_${BOOST_VERS} )
@@ -101,17 +99,7 @@ else()
endif()
find_program(patch_bin NAMES patch patch.exe)
if( "${patch_bin}" STREQUAL "patch_bin-NOTFOUND" )
set( PATCH_STR_CMD ${PATCH_STR_CMD} )
else()
set( PATCH_STR_CMD ${patch_bin} -p0 -i )
endif()
if( MINGW AND NOT CMAKE_HOST_UNIX ) # building for MINGW on windows not UNIX
if( MINGW )
if( MSYS )
# The Boost system does not build properly on MSYS using bootstrap.sh. Running
# bootstrap.bat with cmd.exe does. It's ugly but it works. At least for Boost
@@ -125,16 +113,14 @@ if( MINGW AND NOT CMAKE_HOST_UNIX ) # building for MINGW on windows not UNIX
set( b2_libs ${b2_libs} --with-${lib} )
endforeach()
unset( BOOST_CFLAGS )
else()
string( REGEX REPLACE "\\;" "," libs_csv "${boost_libs_list}" )
#message( STATUS "libs_csv:${libs_csv}" )
set( bootstrap ./bootstrap.sh --with-libraries=${libs_csv} )
# pass to *both* C and C++ compilers
set( BOOST_CFLAGS "cflags=${PIC_FLAG}" )
set( BOOST_CXXFLAGS "cxxflags=${PIC_FLAG}" )
set( BOOST_INCLUDE "${BOOST_ROOT}/include" )
set( BOOST_CFLAGS "cflags=${PIC_FLAG}" )
set( BOOST_INCLUDE "${BOOST_ROOT}/include" )
unset( b2_libs )
endif()
@@ -187,7 +173,7 @@ ExternalProject_Add( boost
URL http://downloads.sourceforge.net/project/boost/boost/${BOOST_RELEASE}/boost_${BOOST_VERS}.tar.bz2
DOWNLOAD_DIR "${DOWNLOAD_DIR}"
TIMEOUT 1200 # 20 minutes
TIMEOUT 600 # 10 minutes
URL_MD5 ${BOOST_MD5}
# If download fails, then enable "LOG_DOWNLOAD ON" and try again.
# Upon a second failure with logging enabled, then look at these logs:
@@ -207,25 +193,25 @@ ExternalProject_Add( boost
# bzr revert is insufficient to remove "added" files:
COMMAND bzr clean-tree -q --force
COMMAND ${PATCH_STR_CMD} "${PROJECT_SOURCE_DIR}/patches/boost_minkowski.patch"
COMMAND ${PATCH_STR_CMD} "${PROJECT_SOURCE_DIR}/patches/boost_cstdint.patch"
COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_minkowski.patch"
COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_cstdint.patch"
COMMAND ${PATCH_STR_CMD} "${PROJECT_SOURCE_DIR}/patches/boost_macosx_x86.patch" #https://svn.boost.org/trac/boost/ticket/8266
COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_macosx_x86.patch" #https://svn.boost.org/trac/boost/ticket/8266
# tell bzr about "added" files by last patch:
COMMAND bzr add libs/context/src/asm/jump_i386_x86_64_sysv_macho_gas.S
COMMAND bzr add libs/context/src/asm/make_i386_x86_64_sysv_macho_gas.S
COMMAND ${PATCH_STR_CMD} "${PROJECT_SOURCE_DIR}/patches/boost_macosx_x86_build.patch" #https://svn.boost.org/trac/boost/ticket/8266
COMMAND ${PATCH_STR_CMD} "${PROJECT_SOURCE_DIR}/patches/boost_macosx_older_openssl.patch" #https://svn.boost.org/trac/boost/ticket/9273
COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_macosx_x86_build.patch" #https://svn.boost.org/trac/boost/ticket/8266
COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_macosx_older_openssl.patch" #https://svn.boost.org/trac/boost/ticket/9273
COMMAND ${PATCH_STR_CMD} "${PROJECT_SOURCE_DIR}/patches/boost_mingw.patch" #https://svn.boost.org/trac/boost/ticket/7262
COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_mingw.patch" #https://svn.boost.org/trac/boost/ticket/7262
# tell bzr about "added" files by last patch:
COMMAND bzr add libs/context/src/asm/make_i386_ms_pe_gas.S
COMMAND bzr add libs/context/src/asm/jump_i386_ms_pe_gas.S
COMMAND bzr add libs/context/src/asm/make_x86_64_ms_pe_gas.S
COMMAND bzr add libs/context/src/asm/jump_x86_64_ms_pe_gas.S
COMMAND ${PATCH_STR_CMD} "${PROJECT_SOURCE_DIR}/patches/patch_macosx_context_ppc_v2.patch" #https://svn.boost.org/trac/boost/ticket/8266
COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/patch_macosx_context_ppc_v2.patch" #https://svn.boost.org/trac/boost/ticket/8266
COMMAND bzr add libs/context/build/Jamfile.v2
COMMAND bzr add libs/context/build/architecture.jam
COMMAND bzr add libs/context/src/asm/jump_combined_sysv_macho_gas.S
+3 -11
View File
@@ -33,9 +33,7 @@ set( CAIRO_ROOT "${PROJECT_SOURCE_DIR}/cairo_root" )
#-----</configure>---------------------------------------------------------------
if( NOT BZIP2_FOUND )
find_package( BZip2 REQUIRED )
endif()
find_package( BZip2 REQUIRED )
set( PREFIX ${DOWNLOAD_DIR}/cairo )
@@ -44,7 +42,7 @@ if ( KICAD_BUILD_STATIC )
endif( KICAD_BUILD_STATIC )
if (APPLE)
if (APPLE)
set( CAIRO_CFLAGS "CFLAGS=" )
set( CAIRO_LDFLAGS "LDFLAGS=-framework CoreServices -framework Cocoa" )
@@ -96,14 +94,8 @@ ExternalProject_Add( cairo
#BINARY_DIR "${PREFIX}"
BUILD_COMMAND $(MAKE)
BUILD_COMMAND $(MAKE)
INSTALL_DIR "${CAIRO_ROOT}"
INSTALL_COMMAND $(MAKE) install
)
# match these with whatever FindCairo.cmake sets
# Dick i'vent set it because /lib and /lib64 issue in non multiarch binaries OSs
#set( CAIRO_FOUND true )
set( CAIRO_INCLUDE_DIR ${CAIRO_ROOT}/include )
set( CAIRO_LIBRARIES ${CAIRO_ROOT}/lib )
+2 -4
View File
@@ -33,13 +33,11 @@ set( GLEW_ROOT "${PROJECT_SOURCE_DIR}/glew_root" )
#-----</configure>---------------------------------------------------------------
if( NOT BZIP2_FOUND )
find_package( BZip2 REQUIRED )
endif()
find_package( BZip2 REQUIRED )
set( PREFIX ${DOWNLOAD_DIR}/glew )
if (APPLE)
if (APPLE)
if( CMAKE_OSX_ARCHITECTURES )
set( GLEW_CFLAGS "CFLAGS.EXTRA=-arch ${CMAKE_OSX_ARCHITECTURES} -mmacosx-version-min=10.5" )
set( GLEW_LDFLAGS "LDFLAGS.EXTRA=-arch ${CMAKE_OSX_ARCHITECTURES} -mmacosx-version-min=10.5" )
+2 -10
View File
@@ -42,14 +42,6 @@ if( CMAKE_TOOLCHAIN_FILE )
set( TOOLCHAIN "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}" )
endif()
FIND_PROGRAM (patch_bin NAMES patch.exe patch)
if( "${patch_bin}" STREQUAL "patch_bin-NOTFOUND" )
set( PATCH_STR_CMD bzr patch -p0 )
else()
set( PATCH_STR_CMD ${patch_bin} -p0 -i )
endif()
ExternalProject_Add(
openssl
DOWNLOAD_DIR ${DOWNLOAD_DIR}
@@ -66,13 +58,13 @@ ExternalProject_Add(
# PATCH_COMMAND patch -p0 < ${PROJECT_SOURCE_DIR}/patches/openssl-1.0.1e.patch
# This one requires the bzr commit below, since bzr patch only knows a working tree.
# Revert the branch to pristine before applying patch sets as bzr patch
# fails when applying a patch to the branch twice and doesn't have a switch
# to ignore previously applied patches
PATCH_COMMAND bzr revert
# PATCH_COMMAND continuation (any *_COMMAND here can be continued with COMMAND):
COMMAND ${PATCH_STR_CMD} ${PROJECT_SOURCE_DIR}/patches/openssl-1.0.1e.patch
COMMAND bzr patch -p0 ${PROJECT_SOURCE_DIR}/patches/openssl-1.0.1e.patch
CONFIGURE_COMMAND
${CMAKE_COMMAND}
+2 -4
View File
@@ -33,15 +33,13 @@ set( PIXMAN_ROOT "${PROJECT_SOURCE_DIR}/pixman_root" )
#-----</configure>---------------------------------------------------------------
if( NOT BZIP2_FOUND )
find_package( BZip2 REQUIRED )
endif()
find_package( BZip2 REQUIRED )
set( PREFIX ${DOWNLOAD_DIR}/pixman )
set(PIXMAN_CPPFLAGS "CFLAGS=")
if (APPLE)
if (APPLE)
if( CMAKE_OSX_ARCHITECTURES )
set(PIXMAN_CPPFLAGS "${PIXMAN_CPPFLAGS} -arch ${CMAKE_OSX_ARCHITECTURES} -fno-common -mmacosx-version-min=10.5")
else()
+1 -3
View File
@@ -33,9 +33,7 @@ set( PKGCONFIG_ROOT "${PROJECT_SOURCE_DIR}/pkgconfig_root" )
#-----</configure>---------------------------------------------------------------
if( NOT BZIP2_FOUND )
find_package( BZip2 REQUIRED )
endif()
find_package( BZip2 REQUIRED )
set( PREFIX ${DOWNLOAD_DIR}/pkgconfig )
+4 -6
View File
@@ -33,13 +33,11 @@ set( LIBWX_ROOT "${PROJECT_SOURCE_DIR}/libwx_root" )
#-----</configure>---------------------------------------------------------------
if( NOT BZIP2_FOUND )
find_package( BZip2 REQUIRED )
endif()
find_package( BZip2 REQUIRED )
set( PREFIX ${DOWNLOAD_DIR}/libwx )
if (APPLE)
if (APPLE)
if( CMAKE_OSX_ARCHITECTURES )
STRING(REGEX REPLACE " -arch " "," LIBWX_ARCHITECTURES ${CMAKE_OSX_ARCHITECTURES})
SET( LIBWX_ARCHITECTURES --enable-universal_binary=${LIBWX_ARCHITECTURES})
@@ -82,7 +80,7 @@ ExternalProject_Add( libwx
#SET directories
set(wxWidgets_BIN_DIR ${LIBWX_ROOT}/bin)
set(wxWidgets_CONFIG_EXECUTABLE ${LIBWX_ROOT}/bin/wx-config)
set(wxWidgets_INCLUDE_DIRS ${LIBWX_ROOT}/include)
set(wxWidgets_INCLUDE_DIRS ${LIBWX_ROOT}/include)
set(wxWidgets_LIBRARY_DIRS ${LIBWX_ROOT}/lib)
@@ -112,7 +110,7 @@ ExternalProject_Add_Step( libwx bzr_init_libwx
######
ExternalProject_Add_Step( libwx libwx_recursive_message
COMMAND cmake .
COMMAND cmake .
COMMENT "*** RERUN CMAKE - wxWidgets built, now reissue a cmake to build Kicad"
DEPENDEES install
)
@@ -1,29 +0,0 @@
KIWAY Build Symbols, Definitions and Intentions
COMPILING_DLL:
This is a signal to import_export.h, and when present, toggles the
interpretation of the #defines in that file. Its purpose should not be
extended beyond this.
USE_KIWAY_DLLS:
Comes from CMake as a user configuration variable, settable in the Cmake
user interface. It decides if KiCad will be built with the *.kiface program
modules.
BUILD_KIWAY_DLL:
Comes from CMake, but at the 2nd tier, not the top tier. By 2nd tier,
something like pcbnew/CMakeLists.txt, not /CMakeLists.txt is meant. It is
not a user configuration variable. Instead, the 2nd tier CMakeLists.txt file
looks at the top level USE_KIWAY_DLLS and decides how the object files under
the 2nd tier's control will be built. If it decides it wants to march in
lockstep with USE_KIWAY_DLLS, then this local CMakeLists.txt file may pass a
defined BUILD_KIWAY_DLL (singular) on the compiler command line to the
pertinent set of compilation steps under its control.
File diff suppressed because it is too large Load Diff
-761
View File
@@ -1,761 +0,0 @@
# Road Map # {#mainpage}
This document is the KiCad Developer's road map document. It is a living
document that should be maintained as the project progresses. The goal of
this document is to provide an overview for developers of where the project
is headed to prevent resource conflicts and endless rehashing of previously
discussed topics. It is broken into sections for each major component of
the KiCad source code and documentation. It defines tasks that developers
an use to contribute to the project and provides updated status information.
Tasks should define clear objective and avoid vague generalizations so that
a new developer can complete the task. It is not a place for developers to
add their own personal wish list It should only be updated with approval
of the project manager after discussion with the lead developers.
Each entry in the road map is made up of four sections. The goal should
be a brief description of the what the road map entry will accomplish. The
task section should be a list of deliverable items that are specific enough
hat they can be documented as completed. The dependencies sections is a list
of requirements that must be completed before work can begin on any of the
tasks. The status section should include a list of completed tasks or marked
as complete as when the goal is met.
[TOC]
# Project # {#project}
This section defines the tasks for the project related goals that are not
related to coding or documentation. It is a catch all for issues such as
developer and user relations, dissemination of information on websites,
policies, etc.
## Stable Release ## {#stable_release}
**Goal:**
Provide a lightweight stable release mechanism that is robust enough to meet
the requirements of Linux packagers and corporate users but avoid the burden
of back porting fixes to a maintenance branch to avoid the additional work for
developers.
**Task:**
- Devise a process to have some type of reasonably stable release protocol
to provide "stable" releases for Linux distribution packagers and corporate
users.
- Document "stable" release procedure.
**Dependencies:**
- None
**Status:**
- Initial planning stages.
## Website Improvements ## {#website_improvements}
**Goal:**
Make the website at www.kicad-pcb.org as the definitive resource for both
users and developers which will provide a single point of reference instead
of the many separate websites currently in used.
**Task:**
- Define the content and design of the website.
- Implement the new design.
**Dependencies:**
- None
**Status:**
- No progress.
# General # {#general}
This section defines the tasks that affect all or most of KiCad or do not
fit under as specific part of the code such as the board editor or the
schematic editor.
## Convert to a Single Process Application. ## {#kiway}
**Goal:**
Merge common schematic and board code into to separate dynamic objects to allow
Eeschema and Pcbnew to run under a single process.
**Task:**
- Convert the majority core code in Eeschema and Pcbnew into dynamic libraries.
- Provide a robust method for communicating between code running under a single
process.
- Revise the schematic editor and board editor main windows run under a single
process instead of multiple stand alone applications.
- Design a method for passing information between the dynamic libraries running
under the same process.
- Remove inter-process communications between Eeschema and Pcbnew.
**Dependencies:**
- None
**Status:**
- Stage 1 code released.
- Stage 2 in process.
## User Interface Modernization ## {#wxaui}
**Goal:**
Give KiCad a more modern user interface with dockable tool bars and windows.
Create perspectives to allow users to arrange dockable windows as they prefer.
**Task:**
- Take advantage of the advanced UI features in wxAui such as detaching and
hiding.
- Study ergonomics of various commercial/proprietary PCB applications (when
in doubt about any particular UI solution, check how it has been done in a
certain proprietary app that is very popular among OSHW folks and do exactly
opposite).
- Clean up menu structure. Menus must allow access to all features of the
program in a clear and logical way. Currently some functions of Pcbnew are
accessible only through tool bars
- Redesign dialogs, make sure they are following same style rules.
- Check quality of translations. Either fix or remove bad quality translations.
- Develop a global shortcut manager that allows the user assign arbitrary
shortcuts for any tool or action.
**Dependencies:**
- [wxWidgets 3](#wxwidgets3)
**Status:**
- No progress.
# Build Tools # {#build_tools}
This section covers build tools for both the KiCad source as well as the
custom dependency builds required to build KiCad.
## Create Separate Build Dependency Project ## {#depends_prj}
**Goal:**
Move the library dependencies and their patches into a separate project to
developers to build and install them as required instead of requiring them
at build time. Give developers the flexibility to build and/or install
library dependencies as they see fit. Remove them from the KiCad source code
to reduce the build footprint.
**Task:**
- Create a separate project to build all external dependency libraries that are
currently build from source (Boost, OpenSSL, etc).
- Use CMake to create a package configuration file for each library so the
KiCad find package can pull in header paths, library dependencies, compile
flags, and link flags to build KiCad.
- Use CMake find package to pull external dependencies.
- Remove all build from source dependencies for KiCad source code.
**Dependencies:**
- None
**Status:**
- Initial concept discussions.
## Platform Binary Installers ## {#installers}
**Goal:**
Provide quality installers for all supported platforms.
**Task:**
- Bring OSX installer up to the level of the Window's and Linux installers.
- Possible use of CPack to build platform specific installers as long as they
are of the same or better quality than the current independent installers.
**Dependencies**
- None
**Status**
- No progress
# Common Library # {#common_lib}
This section covers the source code shared between all of the KiCad
applications
## Unified Rendering Framework ## {#unified_rendering}
**Goal:**
Provide a single framework for developing new tools. Port existing tools
to the new framework and remove the legacy framework tools.
**Task:**
- Port wxDC to GAL or get Cairo rendering to nearly the performance of the
current wxDC rendering so that we have a single framework to develop new
tools and we can continue to support systems that don't have a complete
OpenGL stack.
**Dependencies**
- [Tool framework](http://www.ohwr.org/projects/cern-kicad/wiki/WorkPackages)
**Status**
- No progress
## Unified Geometry Library ## {#geometry_lib}
**Goal:**
Select a single geometry library so that all applications share a common
base for 2D objects. Remove any redundant geometry libraries and code to
clean up code base.
**Task:**
- Select the best geometry library (Boost, etc.) for the task.
- Port all legacy geometry code to the selected library.
- Remove any unused geometry library code.
**Dependencies:**
- None
**Status:**
- In progress as part of push and shove router.
## Conversion to wxWidgets 3 ## {#wxwidgets3}
**Goal:**
Stop supporting the version 2 branch of wxWidgets so that newer features
provided by version 3 can be utilized.
**Task:**
- Make wxWidgets 3 a build requirement.
- Remove all wxWidgets 2 specific code.
**Dependencies:**
- wxWidgets 3 is widely available on Linux distributions.
**Status:**
- No progress
## Linux Printing Improvements ## {#linux_print}
**Goal:**
Bring printing on Linux up to par with printing on Windows.
**Task:**
- Resolve Linux printing issues.
**Dependencies**
- [wxWidgets 3](#wxwidgets3)
**Status**
- No progress.
## Object Properties and Introspection ## {#object_props}
**Goal:**
Provide an object introspection system using properties.
**Task:**
- Select existing or develop property system.
- Add definable properties to base objects.
- Create introspection framework for manipulating object properties.
- Serialization of properties to and from files and/or other I/O structures.
- Create tool to edit property name/type/value table.
**Dependencies:**
- None
**Status:**
- No progress.
## Dynamic Library Plugin ## {#plugin_base}
**Goal:**
Create a base library plugin for handling external file I/O. This will allow
plugins to be provided that are external to the project such as providing solid
model file support (STEP, IGES, etc.) using OpenCascade without making it a
project dependency.
**Task:**
- Create a plugin to handle dynamically registered plugins for loading and
saving file formats.
- This object should be flexible enough to be extended for handling all file
plugin types including schematic, board, footprint library, component
library, etc.
- See [blueprint](https://blueprints.launchpad.net/kicad/+spec/pluggable-file-io)
on Launchpad for more information.
**Dependencies:**
- None
**Status:**
- No progress.
# KiCad: Application Launcher # {#kicad}
This section applies to the source code for the KiCad application launcher.
# Eeschema: Schematic Editor # {#eeschema}
This section applies to the source code for the Eeschema schematic editor.
## Coherent SCHEMATIC Object ## {#sch_object}
**Goal:**
Clean up the code related to the schematic object(s) into a coherent object for
managing and manipulating the schematic.
**Task:**
- Move most if not all of the code from SCH_SCREEN to the new SCHEMATIC object.
- Add any missing functionality to the SCHEMATIC object.
**Dependencies:**
- None
**Status:**
- No progress.
## Hierarchical Sheet Design ## {#hierarchy_fix}
**Goal:**
Create a more robust sheet instance design rather than recreating them on the
fly every time sheet information is required.
**Task:**
- Choose a data structure to contain the sheet hierarchy.
- Create helper class to manipulate the hierarchy data structure.
**Dependencies:**
- None
**Status:**
- No progress.
## Schematic and Component Library Plugin ## {#sch_plugin}
**Goal:**
Create a plugin manager for loading and saving schematics and component
libraries similar to the board plugin manager.
**Task:**
- Design plugin manager for schematics and component libraries.
- Port the current schematic and component library file formats to use the
plugin.
**Dependencies:**
- [Dynamic library plugin](#plugin_base)
**Status:**
- No progress.
## Graphics Abstraction Layer Conversion ## {#sch_gal}
**Goal:**
Take advantage of advanced graphics rendering in Eeschema.
**Task:**
- Port graphics rendering to GAL.
**Dependencies:**
- None
**Status:**
- No progress.
## Port Editing Tools ## {#sch_tool_framework}
**Goal:**
Use standard tool framework across all applications.
**Task:**
- Rewrite editing tools using the new tool framework.
**Dependencies:**
- [GAL port](#sch_gal).
**Status:**
- No progress.
## S-Expression File Format ## {#sch_sexpr}
**Goal:**
Make schematic file format more readable, add new features, and take advantage
of the s-expression capability used in Pcbnew.
**Task:**
- Finalize feature set and file format.
- Discuss the possibility of dropping the unit-less proposal temporarily to get
the s-expression file format and SWEET library format implemented without
completely rewriting Eeschema.
- Add new s-expression file format to plugin.
**Dependencies:**
- [Dynamic library plugin](#plugin_base).
**Status:**
- File format document nearly complete.
## Implement Sweet Component Libraries ## {#sch_sweet}
**Goal:**
Make component library design more robust and feature rich. Use s-expressions
to make component library files more readable.
**Task:**
- Use sweet component file format for component libraries.
**Dependencies:**
- [S-expression file format](#sch_sexpr).
**Status:**
- Initial SWEET library written.
## Component Library Editor Improvements ## {#lib_editor_usability}
**Goal:**
Make editing components with multiple units and/or alternate graphical
representations easier.
**Task:**
- Determine usability improvements in the library editor for components with
multiple units and/or alternate graphical representations.
- Implement said useability improvements.
**Dependencies:**
- None.
**Status:**
- No progress.
## Component and Netlist Attributes ## {#netlist_attributes}
**Goal:**
Provide a method of passing information to other tools via the net list.
**Task:**
- Add virtual components and attributes to netlist to define properties that
can be used by other tools besides the board editor.
**Dependencies:**
- [S-expression schematic file format](#sch_sexpr).
**Status:**
- No progress.
# CvPcb: Footprint Association Tool # {#cvpcb}
This section covers the source code of the footprint assignment tool CvPcb.
## Footprint Assignment Tool ##
**Goal:**
Merge the footprint assignment functionality of CvPcb into Eeschema so
footprints can be assigned inside the schematic editor eliminating the need
to launch an separate program.
**Task:**
- Merge footprint assignment capability into Pcbnew shared library.
- Remove CvPcb as a stand alone tool.
- Add functionality to both the schematic and board editors so users can assign
footprints as they prefer.
**Dependencies:**
- [Convert to a single process application](#kiway).
**Status:**
- Initial library conversion committed to product branch.
# Pcbnew: Circuit Board Editor # {#pcbnew}
This section covers the source code of the board editing application Pcbnew.
## Tool Framework ## {#pcb_tool_framework}
**Goal:**
Unify all board editing tools under a single framework.
**Task:**
- Complete porting of all board editing tools to new tool framework so they
are available in the OpenGL and Cairo canvases.
- Remove all duplicate legacy editing tools.
**Dependencies:**
- None
**Status:**
- Initial porting work in progress.
## Linked Objects ## {#pcb_linked_objects}
**Goal:**
Provide a way to allow external objects such as footprints to be externally
linked in the board file so that changes in the footprint are automatically
updated. This will all a one to many object relationship which can pave the
way for real board modules.
**Task:**
- Add externally and internally linked objects to the file format to allow for
footprints and/or other board objects to be shared (one to many relationship)
instead of only supporting embedded objects (one to one relationship) that
can only be edited in place.
**Dependencies:**
- None.
**Status:**
- No progress.
## Modeling ## {#modeling}
**Goal:**
Provide improved solid modeling support for KiCad including the file formats
available in OpenCascade.
**Task:**
- Design plugin architecture to handle loading and saving 3D models.
- Back port existing 3D formats (IDF and S3D) to plugin
- Add STEP 3D modeling capability.
- Add IGES 3D modeling capability.
**Dependencies:**
- [Dynamic library plugin](#plugin_base).
**Status:**
- No progress.
## Push and Shove Router Improvements ## {#ps_router_improvements}
**Goal:**
Add features such as matched length and microwave tools to the P&S router.
**Task:**
- Determine which features are feasible.
- Look at the recently opened FreeRouter code at
http://www.freerouting.net/fen/download/file.php?id=146 for inspiration.
**Dependencies:**
- None
**Status:**
- No progress.
## Layer Improvements ## {#pcb_layers}
**Goal:**
Increase the number of usable technical and user defined layers in Pcbnew.
**Task:**
- Extend the number of copper and mechanical layers.
- Develop a type safe flag set template or adapt something already available.
- Refactor Pcbnew code to use new flag and remove the 32 layer limitation.
- Extend the board file format to handle the additional layers.
**Dependencies:**
- None
**Status:**
- No progress.
## Pin and Part Swapping ## {#pcb_drc}
**Goal:**
Allow Pcbnew to perform pin and/or part swapping during layout so the user
does not have to do it in Eeschema and re-import the net list.
**Task:**
- Provide forward and back annotation between the schematic and board editors.
- Define netlist file format changes required to handle pin/part swapping.
- Update netlist file formatter and parser to handle file format changes.
- Develop a netlist comparison engine that will produce a netlist diff that
can be passed between the schematic and board editors.
- Create pin/part swap dialog to manipulate swappable pins and parts.
- Add support to handle net label back annotation changes.
**Dependencies:**
- [S-expression schematic file format](#sch_sexpr).
- [Convert to a single process application](#kiway).
**Status:**
- No progress.
## Intelligent Selection Tool ## {#pcb_selection_tool}
**Goal:**
Make the selection tool easier for the user to determine which object(s) are
being selected.
**Task:**
- Determine and define the actual desired behavior.
- Improve ambiguous selections when multiple items are under the cursor or in
the selection bounding box.
**Dependencies:**
- Tool framework.
- Unified geometry library.
**Status:**
- Initial design committed to product branch.
## Clipboard Support ## {#fp_edit_clipboard}
**Goal:**
Provide clipboard cut and paste for footprints..
**Task:**
- Clipboard cut and paste to and from clipboard of footprints in footprint
editor.
**Dependencies:**
- None
**Status:**
- No progress.
## Design Rule Check (DRC) Improvements. ## {#drc_improvements}
**Goal:**
Create additional DRC tests for improved error checking.
**Task:**
- Replace geometry code with [unified geometry library](#geometry_lib).
- Remove floating point code from clearance calculations to prevent rounding
errors.
- Add checks for component, silk screen, and mask clearances.
- Remove DRC related limitations such as no arc or text on copper layers.
- Add option for saving and loading DRC options.
**Dependencies:**
- [Unified geometry library.](#geometry_lib)
**Progress:**
- Planning
## Gerber File Attributes ## {#gerber_attributes}
**Goal:**
Add file attributes to gerber files for defining layer stacks. See
[this](http://www.ucamco.com/files/downloads/file/5/Extending_the_Gerber_Format_with_Attributes.pdf)
document and [this](http://www.ucamco.com/files/downloads/file/22/Kick_Starting_a_Revolution_IPC-2581_Meets_Gerber.pdf)
document for more information.
**Task:**
- Implement gerber file attributes as an optional setting when plotting gerber
files.
**Dependencies:**
- None
**Progress:**
- Under investigation.
# GerbView: Gerber File Viewer # {#gerbview}
This section covers the source code for the GerbView gerber file viewer.
## Graphics Abstraction Layer ## {#gerbview_gal}
**Goal:**
Graphics rendering unification.
**Task:**
- Port graphics rendering layer to GAL.
**Dependencies:**
- None.
**Status**
- No progress.
# Documentation # {#documentation}
This section defines the tasks for both the user and developer documentation.
## Conversion to Markup/down Format ## {#doc_format}
**Goal:**
Make documentation more VCS friendly and separate document content and
formatting for more uniform formatting across all user documentation.
**Task:**
- Convert the documentation to a mark up/down language to reduce the VCS
footprint, to be able to actually use the VCS to see what changed, and
improve the formatting consistency.
**Dependencies:**
- None
**Status:**
- Started with this document.
## Grammar Check ## {#doc_grammar}
**Goal:**
Improve user documentation readability and make life easier to for translators.
**Task:**
- Review and revise all of the English documentation so that it is update with
the current functionality of the code.
- Translate the update documentation into other languages.
**Dependencies:**
- None
**Status:**
- No progress.
## Maintenance ## {#doc_maintenance}
**Task:**
- Keep screen shots current with the source changes.
**Dependencies:**
- None.
**Status:**
- No progress.
## Convert Developer Documentation to Markup/down Format ## {#dev_doc_format}
**Goal:**
Improve developers documentation to make life easier for new developers to get
involved with the project.
**Task:**
- Convert platform build instructions from plain text to new format to be
merged with the developer documentation.
- Convert how to contribute to KiCad instructions from plain text to the new
format to merged with the developer documentation.
**Dependencies:**
- None.
**Status:**
- No progress.
# Unit Testing # {#unittest}
**Goal:**
Improve the quality of KiCad and ensure changes do no break existing
capabilities.
**Task:**
- Explore the possibility of including a C++ unit test framework in addition
to the existing Python framework.
- Create robust enough test coverage to determine if code changes break any
core functionality.
**Dependencies:**
- Completion of the initial release of this document.
**Status:**
- In progress.
# Circuit Simulation # {#simulation}
**Goal:**
Provide quality circuit simulation capabilities similar to commercial products.
**Task:**
- Evaluate and select simulation library (spice, gnucap, qucs, etc).
- Evaluate and select plotting library with wxWidgets support.
- Confirm current spice netlist export is up to the task and add missing
support for simulations.
- Use plotting library to handle simulator output in a consistent manor similar
to LTSpice.
- Develop a tool that allows fine tuning of components on the fly.
- Use plugin for the simulation code to allow support of different simulation
libraries.
- Create a library of simulation components such as voltage source, current
source, current probe, etc.
**Dependencies:**
- [Dynamic library plugin](#plugin_base).
**Status:**
- No progress.
+3 -4
View File
@@ -338,7 +338,7 @@ TYPEDEF_HIDES_STRUCT = NO
# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
# corresponding to a cache size of 2^16 = 65536 symbols.
SYMBOL_CACHE_SIZE = 4
SYMBOL_CACHE_SIZE = 0
# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
@@ -349,7 +349,7 @@ SYMBOL_CACHE_SIZE = 4
# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,
# corresponding to a cache size of 2^16 = 65536 symbols.
LOOKUP_CACHE_SIZE = 6
LOOKUP_CACHE_SIZE = 0
#---------------------------------------------------------------------------
# Build related configuration options
@@ -661,8 +661,7 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
INPUT = Documentation/development/road-map.md \
kicad \
INPUT = kicad \
pcbnew \
cvpcb \
eeschema \
+4 -13
View File
@@ -62,16 +62,7 @@ PCBNew
Dick's Final TODO List:
======================
*) Get licensing cleaned up.
*) DLL-ization of pcbnew & eeschema
http://www.eevblog.com/forum/open-source-kicad-geda/seriously-irritated-with-the-library-editor!/
https://blueprints.launchpad.net/kicad/+spec/modular-kicad
Issues as a result of minimal testing:
* If eeschema launched from C++ project manager and does not find all libraries,
then the dialog showing the names of missing libraries is shown twice.
* Clear all/some? retained strings on project change.
* Clear the FP_LIB_TABLE when the last KIWAY_PLAYER using it is closed.
*) Get licensing cleaned up.
*) DLL-ization of pcbnew & eeschema
http://www.eevblog.com/forum/open-source-kicad-geda/seriously-irritated-with-the-library-editor!/
https://blueprints.launchpad.net/kicad/+spec/modular-kicad
+34 -49
View File
@@ -1,68 +1,53 @@
include_directories( BEFORE ${INC_BEFORE} )
include_directories(BEFORE ${INC_BEFORE})
include_directories(
../potrace
../common
${INC_AFTER}
)
set( BITMAP2COMPONENT_SRCS
../common/single_top.cpp
set(BITMAP2COMPONENT_SRCS
bitmap2component.cpp
bitmap2cmp_gui_base
bitmap2cmp_gui
)
set_source_files_properties( ../common/single_top.cpp PROPERTIES
COMPILE_DEFINITIONS "TOP_FRAME=FRAME_BM2CMP"
)
set_source_files_properties( bitmap2cmp_gui.cpp PROPERTIES
COMPILE_DEFINITIONS "COMPILING_DLL"
)
add_executable( bitmap2component WIN32 MACOSX_BUNDLE
${BITMAP2COMPONENT_SRCS}
${BITMAP2COMPONENT_RESOURCES}
)
target_link_libraries( bitmap2component
common
polygon
bitmaps
${wxWidgets_LIBRARIES}
potrace
)
install( TARGETS bitmap2component
DESTINATION ${KICAD_BIN}
COMPONENT binary
)
if(WIN32)
if(MINGW)
# BITMAP2COMPONENT_RESOURCES variable is set by the macro.
mingw_resource_compiler(bitmap2component)
else(MINGW)
set(BITMAP2COMPONENT_RESOURCES bitmap2component.rc)
endif(MINGW)
endif(WIN32)
if( false ) # linker map with cross reference
set_target_properties( bitmap2component PROPERTIES
LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=bitmap2component.map"
)
endif()
if(APPLE)
set(BITMAP2COMPONENT_RESOURCES bitmap2component.icns)
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/bitmap2component.icns"
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
set(MACOSX_BUNDLE_ICON_FILE bitmap2component.icns)
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.bitmap2component)
endif(APPLE)
if( MINGW )
# BITMAP2COMPONENT_RESOURCES variable is set by the macro.
mingw_resource_compiler( bitmap2component )
else()
set( BITMAP2COMPONENT_RESOURCES bitmap2component.rc )
endif()
add_executable(bitmap2component WIN32 MACOSX_BUNDLE
${BITMAP2COMPONENT_SRCS}
${BITMAP2COMPONENT_RESOURCES})
if( APPLE )
set( BITMAP2COMPONENT_RESOURCES bitmap2component.icns )
set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/bitmap2component.icns" PROPERTIES
MACOSX_PACKAGE_LOCATION Resources
)
set( MACOSX_BUNDLE_ICON_FILE bitmap2component.icns )
set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.bitmap2component )
if(APPLE)
set_target_properties(bitmap2component PROPERTIES MACOSX_BUNDLE_INFO_PLIST
${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
endif(APPLE)
target_link_libraries( bitmap2component common polygon bitmaps
${wxWidgets_LIBRARIES}
potrace
)
install(TARGETS bitmap2component
DESTINATION ${KICAD_BIN}
COMPONENT binary)
set_target_properties( bitmap2component PROPERTIES
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist
)
endif()
+101 -189
View File
@@ -21,11 +21,8 @@
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <fctsys.h>
#include <macros.h>
#include <pgm_base.h>
#include <appl_wxstruct.h>
#include <wxstruct.h>
#include <confirm.h>
#include <gestfich.h>
@@ -38,57 +35,52 @@
#include <colors_selection.h>
#include <build_version.h>
#include <menus_helpers.h>
#include <kiway.h>
#include <kiface_i.h>
#define KEYWORD_FRAME_POSX wxT( "Bmconverter_Pos_x" )
#define KEYWORD_FRAME_POSY wxT( "Bmconverter_Pos_y" )
#define KEYWORD_FRAME_SIZEX wxT( "Bmconverter_Size_x" )
#define KEYWORD_FRAME_SIZEY wxT( "Bmconverter_Size_y" )
#define KEYWORD_LAST_INPUT_FILE wxT( "Last_input" )
#define KEYWORD_LAST_OUTPUT_FILE wxT( "Last_output" )
#define KEYWORD_LAST_FORMAT wxT( "Last_format" )
#define KEYWORD_BINARY_THRESHOLD wxT( "Threshold" )
#define KEYWORD_BW_NEGATIVE wxT( "Negative_choice" )
#define KEYWORD_FRAME_POSX wxT( "Bmconverter_Pos_x" )
#define KEYWORD_FRAME_POSY wxT( "Bmconverter_Pos_y" )
#define KEYWORD_FRAME_SIZEX wxT( "Bmconverter_Size_x" )
#define KEYWORD_FRAME_SIZEY wxT( "Bmconverter_Size_y" )
#define KEYWORD_LAST_INPUT_FILE wxT( "Last_input" )
#define KEYWORD_LAST_OUTPUT_FILE wxT( "Last_output" )
#define KEYWORD_LAST_FORMAT wxT( "Last_format" )
#define KEYWORD_BINARY_THRESHOLD wxT( "Threshold" )
#define KEYWORD_BW_NEGATIVE wxT( "Negative_choice" )
#define DEFAULT_DPI 300 // Default resolution in Bit per inches
extern int bitmap2component( potrace_bitmap_t* aPotrace_bitmap, FILE* aOutfile,
int aFormat, int aDpi_X, int aDpi_Y );
/**
* Class BM2CMP_FRAME_BASE
* is the main frame for this application
*/
/* Class BM2CMP_FRAME_BASE
This is the main frame for this application
*/
class BM2CMP_FRAME : public BM2CMP_FRAME_BASE
{
private:
wxImage m_Pict_Image;
wxBitmap m_Pict_Bitmap;
wxImage m_Greyscale_Image;
wxBitmap m_Greyscale_Bitmap;
wxImage m_NB_Image;
wxBitmap m_BN_Bitmap;
wxSize m_imageDPI; // The initial image resolution. When unknown,
wxImage m_Pict_Image;
wxBitmap m_Pict_Bitmap;
wxImage m_Greyscale_Image;
wxBitmap m_Greyscale_Bitmap;
wxImage m_NB_Image;
wxBitmap m_BN_Bitmap;
wxSize m_imageDPI; // The initial image resolution. When unknown,
// set to DEFAULT_DPI x DEFAULT_DPI per Inch
wxString m_BitmapFileName;
wxString m_ConvertedFileName;
wxSize m_frameSize;
wxPoint m_framePos;
wxConfig* m_config;
wxString m_BitmapFileName;
wxString m_ConvertedFileName;
wxSize m_frameSize;
wxPoint m_framePos;
wxConfig* m_config;
public:
BM2CMP_FRAME( KIWAY* aKiway, wxWindow* aParent );
BM2CMP_FRAME();
~BM2CMP_FRAME();
// overload KIWAY_PLAYER virtual
bool OpenProjectFiles( const std::vector<wxString>& aFilenames, int aCtl=0 );
private:
// Event handlers
void OnPaint( wxPaintEvent& event );
void OnLoadFile( wxCommandEvent& event );
bool LoadFile( wxString& aFullFileName );
void OnExport( wxCommandEvent& event );
/**
@@ -118,18 +110,18 @@ private:
void Binarize( double aThreshold ); // aThreshold = 0.0 (black level) to 1.0 (white level)
void OnOptionsSelection( wxCommandEvent& event );
void OnThresholdChange( wxScrollEvent& event );
void OnResolutionChange( wxCommandEvent& event );
void OnResolutionChange( wxCommandEvent& event );
// called when texts controls which handle the image resolution
// lose the focus, to ensure the rigyht vaules are displayed
// because the m_imageDPI are clipped to acceptable values, and
// the text displayed could be differ duringa text edition
// We are using ChangeValue here to avoid generating a wxEVT_TEXT event.
void UpdateDPITextValueX( wxMouseEvent& event )
void UpdateDPITextValueX( wxMouseEvent& event )
{
m_DPIValueX->ChangeValue( wxString::Format( wxT( "%d" ), m_imageDPI.x ) );
}
void UpdateDPITextValueY( wxMouseEvent& event )
void UpdateDPITextValueY( wxMouseEvent& event )
{
m_DPIValueY->ChangeValue( wxString::Format( wxT( "%d" ), m_imageDPI.y ) );
}
@@ -139,12 +131,8 @@ private:
void updateImageInfo();
};
BM2CMP_FRAME::BM2CMP_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
BM2CMP_FRAME_BASE( aParent )
BM2CMP_FRAME::BM2CMP_FRAME() : BM2CMP_FRAME_BASE( NULL )
{
SetKiway( this, aKiway );
int tmp;
m_config = new wxConfig();
m_config->Read( KEYWORD_FRAME_POSX, & m_framePos.x, -1 );
@@ -153,16 +141,15 @@ BM2CMP_FRAME::BM2CMP_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
m_config->Read( KEYWORD_FRAME_SIZEY, & m_frameSize.y, -1 );
m_config->Read( KEYWORD_LAST_INPUT_FILE, &m_BitmapFileName );
m_config->Read( KEYWORD_LAST_OUTPUT_FILE, &m_ConvertedFileName );
if( m_config->Read( KEYWORD_BINARY_THRESHOLD, &tmp ) )
m_sliderThreshold->SetValue( tmp );
if( m_config->Read( KEYWORD_BW_NEGATIVE, &tmp ) )
m_rbOptions->SetSelection( tmp ? 1 : 0 );
m_config->Read( KEYWORD_LAST_FORMAT, &tmp );
m_radioBoxFormat->SetSelection( tmp );
// Give an icon
wxIcon icon;
icon.CopyFromBitmap( KiBitmap( icon_bitmap2component_xpm ) );
@@ -183,7 +170,7 @@ BM2CMP_FRAME::BM2CMP_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
BM2CMP_FRAME::~BM2CMP_FRAME()
{
if( !m_config || IsIconized() )
if( ( m_config == NULL ) || IsIconized() )
return;
m_frameSize = GetSize();
@@ -239,24 +226,23 @@ void BM2CMP_FRAME::OnPaint( wxPaintEvent& event )
*/
void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event )
{
wxFileName fn( m_BitmapFileName );
wxString path = fn.GetPath();
wxFileName fn(m_BitmapFileName);
wxString path = fn.GetPath();
if( path.IsEmpty() || !wxDirExists(path) )
path = wxGetCwd();
wxFileDialog fileDlg( this, _( "Choose Image" ), path, wxEmptyString,
wxFileDialog FileDlg( this, _( "Choose Image" ), path, wxEmptyString,
_( "Image Files " ) + wxImage::GetImageExtWildcard(),
wxFD_OPEN );
int diag = fileDlg.ShowModal();
int diag = FileDlg.ShowModal();
if( diag != wxID_OK )
return;
wxString fullFilename = fileDlg.GetPath();
wxString fullFilename = FileDlg.GetPath();
if( !OpenProjectFiles( std::vector<wxString>( 1, fullFilename ) ) )
if( ! LoadFile( fullFilename ) )
return;
m_buttonExport->Enable( true );
@@ -265,22 +251,13 @@ void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event )
}
bool BM2CMP_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, int aCtl )
bool BM2CMP_FRAME::LoadFile( wxString& aFullFileName )
{
// Prj().MaybeLoadProjectSettings();
m_BitmapFileName = aFileSet[0];
m_BitmapFileName = aFullFileName;
if( !m_Pict_Image.LoadFile( m_BitmapFileName ) )
{
/* LoadFile has its own UI, no need for further failure notification here
wxString msg = wxString::Format(
_( "Could not load image '%s'" ),
GetChars( aFilename )
);
wxMessageBox( msg );
*/
wxMessageBox( _( "Couldn't load image from <%s>" ), m_BitmapFileName.c_str() );
return false;
}
@@ -288,7 +265,6 @@ bool BM2CMP_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, int
int h = m_Pict_Bitmap.GetHeight();
int w = m_Pict_Bitmap.GetWidth();
// Determine image resolution in DPI (does not existing in all formats).
// the resolution can be given in bit per inches or bit per cm in file
m_imageDPI.x = m_Pict_Image.GetOptionInt( wxIMAGE_OPTION_RESOLUTIONX );
@@ -321,14 +297,12 @@ bool BM2CMP_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, int
m_Greyscale_Image.Destroy();
m_Greyscale_Image = m_Pict_Image.ConvertToGreyscale( );
if( m_rbOptions->GetSelection() > 0 )
NegateGreyscaleImage( );
m_Greyscale_Bitmap = wxBitmap( m_Greyscale_Image );
m_NB_Image = m_Greyscale_Image;
Binarize( (double) m_sliderThreshold->GetValue()/m_sliderThreshold->GetMax() );
Binarize( (double)m_sliderThreshold->GetValue()/m_sliderThreshold->GetMax() );
return true;
}
@@ -395,12 +369,11 @@ void BM2CMP_FRAME::Binarize( double aThreshold )
m_BN_Bitmap = wxBitmap( m_NB_Image );
}
void BM2CMP_FRAME::NegateGreyscaleImage( )
{
unsigned char pix;
int h = m_Greyscale_Image.GetHeight();
int w = m_Greyscale_Image.GetWidth();
int h = m_Greyscale_Image.GetHeight();
int w = m_Greyscale_Image.GetWidth();
for( int y = 0; y < h; y++ )
for( int x = 0; x < w; x++ )
@@ -420,61 +393,58 @@ void BM2CMP_FRAME::OnOptionsSelection( wxCommandEvent& event )
Refresh();
}
void BM2CMP_FRAME::OnThresholdChange( wxScrollEvent& event )
{
Binarize( (double)m_sliderThreshold->GetValue()/m_sliderThreshold->GetMax() );
Refresh();
}
void BM2CMP_FRAME::OnExport( wxCommandEvent& event )
{
int sel = m_radioBoxFormat->GetSelection();
switch( sel )
{
case 0:
OnExportEeschema();
break;
case 0:
OnExportEeschema();
break;
case 1:
OnExportPcbnew( true );
break;
case 1:
OnExportPcbnew( true );
break;
case 2:
OnExportPcbnew( false );
break;
case 2:
OnExportPcbnew( false );
break;
case 3:
OnExportPostScript();
break;
case 3:
OnExportPostScript();
break;
case 4:
OnExportLogo();
break;
case 4:
OnExportLogo();
break;
}
}
void BM2CMP_FRAME::OnExportLogo()
{
wxFileName fn( m_ConvertedFileName );
wxString path = fn.GetPath();
wxFileName fn(m_ConvertedFileName);
wxString path = fn.GetPath();
if( path.IsEmpty() || !wxDirExists(path) )
path = ::wxGetCwd();
wxString msg = _( "Logo file (*.kicad_wks)|*.kicad_wks" );
wxFileDialog fileDlg( this, _( "Create a logo file" ), path, wxEmptyString,
wxFileDialog FileDlg( this, _( "Create a logo file" ), path, wxEmptyString,
msg,
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
int diag = fileDlg.ShowModal();
int diag = FileDlg.ShowModal();
if( diag != wxID_OK )
return;
m_ConvertedFileName = fileDlg.GetPath();
m_ConvertedFileName = FileDlg.GetPath();
FILE* outfile;
outfile = wxFopen( m_ConvertedFileName, wxT( "w" ) );
@@ -491,26 +461,24 @@ void BM2CMP_FRAME::OnExportLogo()
fclose( outfile );
}
void BM2CMP_FRAME::OnExportPostScript()
{
wxFileName fn( m_ConvertedFileName );
wxString path = fn.GetPath();
wxFileName fn(m_ConvertedFileName);
wxString path = fn.GetPath();
if( path.IsEmpty() || !wxDirExists( path ) )
if( path.IsEmpty() || !wxDirExists(path) )
path = ::wxGetCwd();
wxString msg = _( "Postscript file (*.ps)|*.ps" );
wxFileDialog fileDlg( this, _( "Create a Postscript file" ), path, wxEmptyString,
wxFileDialog FileDlg( this, _( "Create a Postscript file" ), path, wxEmptyString,
msg,
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
int diag = fileDlg.ShowModal();
int diag = FileDlg.ShowModal();
if( diag != wxID_OK )
return;
m_ConvertedFileName = fileDlg.GetPath();
m_ConvertedFileName = FileDlg.GetPath();
FILE* outfile;
outfile = wxFopen( m_ConvertedFileName, wxT( "w" ) );
@@ -527,29 +495,27 @@ void BM2CMP_FRAME::OnExportPostScript()
fclose( outfile );
}
void BM2CMP_FRAME::OnExportEeschema()
{
wxFileName fn( m_ConvertedFileName );
wxString path = fn.GetPath();
wxFileName fn(m_ConvertedFileName);
wxString path = fn.GetPath();
if( path.IsEmpty() || !wxDirExists(path) )
path = ::wxGetCwd();
wxString msg = _( "Schematic lib file (*.lib)|*.lib" );
wxFileDialog fileDlg( this, _( "Create a lib file for Eeschema" ), path, wxEmptyString,
wxFileDialog FileDlg( this, _( "Create a lib file for Eeschema" ), path, wxEmptyString,
msg,
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
int diag = fileDlg.ShowModal();
int diag = FileDlg.ShowModal();
if( diag != wxID_OK )
return;
m_ConvertedFileName = fileDlg.GetPath();
m_ConvertedFileName = FileDlg.GetPath();
FILE* outfile = wxFopen( m_ConvertedFileName, wxT( "w" ) );
FILE* outfile;
outfile = wxFopen( m_ConvertedFileName, wxT( "w" ) );
if( outfile == NULL )
{
@@ -566,29 +532,29 @@ void BM2CMP_FRAME::OnExportEeschema()
void BM2CMP_FRAME::OnExportPcbnew( bool aLegacyFormat )
{
wxFileName fn( m_ConvertedFileName );
wxString path = fn.GetPath();
wxFileName fn(m_ConvertedFileName);
wxString path = fn.GetPath();
if( path.IsEmpty() || !wxDirExists( path ) )
if( path.IsEmpty() || !wxDirExists(path) )
path = ::wxGetCwd();
wxString msg = aLegacyFormat ?
_( "Footprint file (*.emp)|*.emp" ) :
_( "Footprint file (*.kicad_mod)|*.kicad_mod" );
wxFileDialog fileDlg( this, _( "Create a footprint file for PcbNew" ),
wxFileDialog FileDlg( this, _( "Create a footprint file for PcbNew" ),
path, wxEmptyString,
msg,
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
int diag = fileDlg.ShowModal();
int diag = FileDlg.ShowModal();
if( diag != wxID_OK )
return;
m_ConvertedFileName = fileDlg.GetPath();
m_ConvertedFileName = FileDlg.GetPath();
FILE* outfile = wxFopen( m_ConvertedFileName, wxT( "w" ) );
FILE* outfile;
outfile = wxFopen( m_ConvertedFileName, wxT( "w" ) );
if( outfile == NULL )
{
@@ -602,7 +568,6 @@ void BM2CMP_FRAME::OnExportPcbnew( bool aLegacyFormat )
fclose( outfile );
}
void BM2CMP_FRAME::ExportFile( FILE* aOutfile, int aFormat )
{
// Create a potrace bitmap
@@ -632,82 +597,29 @@ void BM2CMP_FRAME::ExportFile( FILE* aOutfile, int aFormat )
}
// EDA_APP
//-----<KIFACE>-----------------------------------------------------------------
IMPLEMENT_APP( EDA_APP )
namespace BMP2CMP {
///-----------------------------------------------------------------------------
// EDA_APP
// main program
//-----------------------------------------------------------------------------
static struct IFACE : public KIFACE_I
bool EDA_APP::OnInit()
{
bool OnKifaceStart( PGM_BASE* aProgram, int aCtlBits );
wxInitAllImageHandlers();
wxWindow* CreateWindow( wxWindow* aParent, int aClassId, KIWAY* aKiway, int aCtlBits = 0 )
{
switch( aClassId )
{
InitEDA_Appl( wxT( "BMP2CMP" ) );
default:
{
KIWAY_PLAYER* frame = new BM2CMP_FRAME( aKiway, aParent );
return frame;
}
}
}
wxFrame* frame = new BM2CMP_FRAME();
SetTopWindow( frame );
frame->Show( true );
/**
* Function IfaceOrAddress
* return a pointer to the requested object. The safest way to use this
* is to retrieve a pointer to a static instance of an interface, similar to
* how the KIFACE interface is exported. But if you know what you are doing
* use it to retrieve anything you want.
*
* @param aDataId identifies which object you want the address of.
*
* @return void* - and must be cast into the know type.
*/
void* IfaceOrAddress( int aDataId )
{
return NULL;
}
IFACE( const char* aDSOname, KIWAY::FACE_T aType ) :
KIFACE_I( aDSOname, aType )
{}
} kiface( "BMP2CMP", KIWAY::FACE_BMP2CMP );
} // namespace BMP2CMP
using namespace BMP2CMP;
static PGM_BASE* process;
KIFACE_I& Kiface()
{
return kiface;
return true;
}
// KIFACE_GETTER's actual spelling is a substitution macro found in kiway.h.
// KIFACE_GETTER will not have name mangling due to declaration in kiway.h.
MY_API( KIFACE* ) KIFACE_GETTER( int* aKIFACEversion, int aKIWAYversion, PGM_BASE* aProgram )
void EDA_APP::MacOpenFile( const wxString& aFileName )
{
process = (PGM_BASE*) aProgram;
return &kiface;
}
#if defined(BUILD_KIWAY_DLLS)
PGM_BASE& Pgm()
{
wxASSERT( process ); // KIFACE_GETTER has already been called.
return *process;
}
#endif
bool IFACE::OnKifaceStart( PGM_BASE* aProgram, int aCtlBits )
{
return start_common( aCtlBits );
}
+2 -2
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 5 2013)
// C++ code generated with wxFormBuilder (version Nov 6 2013)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@@ -9,7 +9,7 @@
///////////////////////////////////////////////////////////////////////////
BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : KIWAY_PLAYER( parent, id, title, pos, size, style )
BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+1 -1
View File
@@ -46,7 +46,7 @@
<property name="pos"></property>
<property name="size">527,470</property>
<property name="style">wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER</property>
<property name="subclass">KIWAY_PLAYER; kiway_player.h</property>
<property name="subclass"></property>
<property name="title">Bitmap to Component Converter</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
+2 -5
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 5 2013)
// C++ code generated with wxFormBuilder (version Nov 6 2013)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@@ -11,9 +11,6 @@
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
class KIWAY_PLAYER;
#include "kiway_player.h"
#include <wx/scrolwin.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
@@ -41,7 +38,7 @@ class KIWAY_PLAYER;
///////////////////////////////////////////////////////////////////////////////
/// Class BM2CMP_FRAME_BASE
///////////////////////////////////////////////////////////////////////////////
class BM2CMP_FRAME_BASE : public KIWAY_PLAYER
class BM2CMP_FRAME_BASE : public wxFrame
{
private:
+3 -5
View File
@@ -176,7 +176,6 @@ set( BMAPS_MID
copyblock
copycomponent
copy_button
copy_library
copper_layers_setup
cursor_shape
cursor
@@ -287,6 +286,7 @@ set( BMAPS_MID
import
info
insert_module_board
invert_module
invisible_text
kicad_icon_small
label2glabel
@@ -334,8 +334,6 @@ set( BMAPS_MID
mirepcb
mirror_h
mirror_v
mirror_footprint_axisX
mirror_footprint_axisY
mode_module
mode_track
modratsnest
@@ -460,8 +458,8 @@ set( BMAPS_MID
right
rotate_field
rotate_glabel
rotate_module_cw
rotate_module_ccw
rotate_module_neg
rotate_module_pos
rotate_pin
rotate_ccw
rotate_cw
-119
View File
@@ -1,119 +0,0 @@
/* Do not modify this file, it was automatically generated by the
* PNG2cpp CMake script, using a *.png file as input.
*/
#include <bitmaps.h>
static const unsigned char png[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c,
0xce, 0x00, 0x00, 0x06, 0x5f, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xbd, 0x96, 0x79, 0x4c, 0x54,
0x57, 0x14, 0xc6, 0x5f, 0x97, 0xa4, 0x8d, 0xd1, 0xf4, 0x0f, 0xd3, 0x58, 0x40, 0x23, 0x51, 0xb0,
0x35, 0x30, 0x52, 0x53, 0xa0, 0x2a, 0x1a, 0x96, 0xaa, 0x65, 0x51, 0x89, 0x16, 0x6d, 0xad, 0xb5,
0xd1, 0xba, 0x44, 0x45, 0xc4, 0xa5, 0x8a, 0x11, 0x11, 0x17, 0x6a, 0x1c, 0xd4, 0x26, 0xa2, 0xb6,
0x01, 0xea, 0xda, 0x5a, 0xc5, 0x28, 0x08, 0x8c, 0x02, 0x65, 0x86, 0x19, 0x18, 0x66, 0x80, 0x61,
0x19, 0x04, 0x59, 0x67, 0x5f, 0x90, 0x81, 0x41, 0x20, 0x08, 0xb3, 0xbd, 0x37, 0xef, 0xf4, 0xdc,
0x67, 0xb5, 0xd8, 0x46, 0xaa, 0x4d, 0xd3, 0x97, 0x9c, 0x64, 0x66, 0x72, 0xef, 0xfd, 0x9d, 0xef,
0x9c, 0xef, 0xdc, 0x37, 0x14, 0x00, 0x50, 0x24, 0x84, 0xbe, 0xbe, 0xfb, 0x44, 0xd3, 0xa7, 0x47,
0x1c, 0xa6, 0xa8, 0xd7, 0x9f, 0xfe, 0xf6, 0x32, 0x51, 0x34, 0x61, 0xc2, 0xfb, 0xe2, 0x99, 0x33,
0x93, 0x4b, 0x26, 0x4e, 0xfc, 0x60, 0xac, 0x75, 0x94, 0xb7, 0xb7, 0xf7, 0x2e, 0x5f, 0x5f, 0xdf,
0x84, 0x5b, 0xa1, 0xa1, 0x97, 0x8c, 0x39, 0x39, 0x17, 0xa5, 0xf3, 0xe7, 0x9f, 0x40, 0xe8, 0xa2,
0x9b, 0x14, 0xf5, 0xc6, 0x8b, 0x36, 0x89, 0x29, 0xea, 0xcd, 0xe2, 0xa9, 0x53, 0xc3, 0x85, 0x3c,
0xde, 0x09, 0xc9, 0x8e, 0x1d, 0xd7, 0x85, 0x7c, 0x7e, 0x55, 0x9c, 0xa7, 0xe7, 0x4d, 0x2f, 0x2f,
0xaf, 0x98, 0x17, 0x82, 0x02, 0x02, 0x02, 0x4e, 0x68, 0xb5, 0xda, 0x2b, 0x85, 0xeb, 0xd7, 0x37,
0x8a, 0x44, 0xa2, 0x0e, 0x81, 0x40, 0xd0, 0x22, 0xcf, 0xca, 0x2a, 0x29, 0x0e, 0x0c, 0x3c, 0x9d,
0x3f, 0x6e, 0x9c, 0xe7, 0x5f, 0x37, 0x94, 0x4e, 0x9e, 0xcc, 0xfb, 0x95, 0xc7, 0xfb, 0x45, 0x70,
0xec, 0x58, 0x5d, 0x91, 0x40, 0xd0, 0x51, 0x5e, 0x5e, 0xae, 0x31, 0x8a, 0x44, 0x6a, 0x49, 0x7a,
0x7a, 0x91, 0xa7, 0xa7, 0xe7, 0x17, 0x63, 0x82, 0xf0, 0xc3, 0x95, 0xb6, 0xe3, 0xc7, 0x1f, 0x0c,
0x0e, 0x0e, 0x1a, 0xf0, 0x31, 0x49, 0x24, 0x12, 0x83, 0xa4, 0xb4, 0xb4, 0xfd, 0x52, 0x58, 0x98,
0xf0, 0x7b, 0x0f, 0x8f, 0x05, 0xdc, 0x62, 0x8a, 0x7a, 0xed, 0xa7, 0x69, 0xd3, 0x12, 0xaf, 0xae,
0x5c, 0xa9, 0x50, 0xd6, 0xd7, 0x77, 0xd6, 0xd5, 0xd5, 0x19, 0x31, 0x41, 0xd3, 0xc8, 0xc8, 0x88,
0xbe, 0x47, 0x2a, 0xd5, 0x8a, 0x11, 0x84, 0x8a, 0x56, 0x8d, 0x05, 0xe2, 0x13, 0x90, 0x2a, 0x3d,
0xbd, 0x79, 0x78, 0x78, 0x58, 0x8f, 0x9f, 0xd5, 0xfd, 0xfd, 0xfd, 0xc6, 0x86, 0x86, 0x86, 0xae,
0x96, 0x07, 0x0f, 0x74, 0x97, 0xe2, 0xe2, 0x94, 0xc7, 0xbc, 0xbc, 0x92, 0x4f, 0xcd, 0x98, 0x71,
0x4f, 0x78, 0xf6, 0x6c, 0x0b, 0x3e, 0x7a, 0x0c, 0x33, 0x59, 0xcb, 0xb2, 0xac, 0xc6, 0x6e, 0xb7,
0xeb, 0x2c, 0xe5, 0xe5, 0x5a, 0x31, 0x9f, 0x7f, 0x0f, 0x41, 0x2b, 0x5f, 0x0a, 0x84, 0x9b, 0xb4,
0xf5, 0xf5, 0xf5, 0x5d, 0x7d, 0x7d, 0x7d, 0x46, 0x72, 0x40, 0x47, 0x47, 0x87, 0xf9, 0xb6, 0xf4,
0xb6, 0x65, 0x77, 0xd2, 0x7c, 0x47, 0x7d, 0x45, 0x89, 0xa1, 0xba, 0xba, 0xda, 0x6c, 0xb5, 0x5a,
0x0d, 0x4e, 0xa7, 0x53, 0x3b, 0x30, 0x30, 0x60, 0x68, 0x6c, 0x6c, 0xec, 0xea, 0xee, 0xee, 0x36,
0xf4, 0xcb, 0x64, 0xea, 0x32, 0x3e, 0xff, 0x2e, 0x82, 0xe2, 0x46, 0x1f, 0xee, 0x97, 0xe3, 0x17,
0x12, 0x56, 0x30, 0x3f, 0x8d, 0x03, 0xf1, 0x78, 0xbc, 0x67, 0x20, 0x52, 0x3a, 0x54, 0x63, 0xb8,
0x7f, 0xff, 0xbe, 0x49, 0x28, 0x14, 0x3e, 0xdc, 0xbe, 0x7d, 0xfb, 0xf0, 0x91, 0x9c, 0xd4, 0xc1,
0xec, 0xca, 0xd3, 0xee, 0xb4, 0x9a, 0x54, 0xfb, 0xd9, 0xc6, 0x33, 0x83, 0xc6, 0x5e, 0x83, 0x09,
0x01, 0x66, 0x54, 0x4c, 0xa0, 0x46, 0x04, 0x1a, 0x2d, 0x12, 0x89, 0x56, 0x94, 0x9e, 0x7e, 0xd7,
0xc3, 0xc3, 0x63, 0x85, 0x4f, 0x86, 0xcf, 0x5b, 0x73, 0xef, 0x04, 0x7f, 0xfd, 0xa9, 0xe0, 0x93,
0xd2, 0x53, 0xd5, 0x7c, 0x55, 0xf4, 0xd5, 0xc5, 0xe6, 0x49, 0x93, 0x26, 0x15, 0x53, 0xfe, 0xfe,
0xfe, 0xe9, 0x4f, 0x41, 0x43, 0x43, 0x43, 0x7a, 0xa2, 0xc4, 0xe1, 0x70, 0xe8, 0x6e, 0xdc, 0xb8,
0xd1, 0x93, 0x9a, 0x9a, 0x4a, 0x1f, 0xbe, 0x76, 0x88, 0x2e, 0x50, 0xe6, 0x82, 0xb4, 0xa2, 0x82,
0x55, 0x68, 0x14, 0xee, 0xdd, 0xa5, 0xbb, 0x9c, 0xd9, 0xca, 0xac, 0x7e, 0xb2, 0x8e, 0x28, 0x23,
0x7b, 0x7a, 0x24, 0x12, 0x4d, 0x29, 0x2a, 0x0a, 0x38, 0xc2, 0xcb, 0x8e, 0xbe, 0x11, 0xd9, 0xfa,
0x73, 0xed, 0xd5, 0x21, 0x45, 0x9d, 0xc2, 0x61, 0x32, 0x99, 0x9c, 0x7b, 0xca, 0x76, 0xda, 0xa3,
0xa3, 0xa3, 0xe5, 0x7f, 0x82, 0xf8, 0x7c, 0xd2, 0x23, 0x9d, 0x52, 0xa9, 0x34, 0x35, 0x35, 0x35,
0x75, 0xe5, 0xe7, 0xe7, 0x5b, 0xb2, 0xb3, 0xb3, 0x5d, 0x22, 0xa3, 0x90, 0xa9, 0x30, 0x88, 0x61,
0x64, 0x78, 0x18, 0xe4, 0x72, 0x39, 0x8b, 0xe5, 0x63, 0xb3, 0x65, 0x99, 0xee, 0x84, 0xdc, 0x78,
0x5b, 0x6d, 0x43, 0xad, 0xf9, 0xd1, 0xa3, 0x47, 0x3a, 0x8d, 0x50, 0xa0, 0x5b, 0x91, 0xb9, 0xc8,
0x7a, 0x5a, 0x74, 0xd2, 0x8e, 0xe5, 0x76, 0x29, 0x14, 0x0a, 0xba, 0xa7, 0xa7, 0x87, 0x76, 0xb9,
0x5c, 0xf4, 0xc1, 0xea, 0x03, 0xf6, 0xa8, 0xa8, 0x28, 0x39, 0xe5, 0xe7, 0xe7, 0xf7, 0x0c, 0x44,
0x94, 0x90, 0x52, 0x68, 0x34, 0x1a, 0xf3, 0xf9, 0xf3, 0xe7, 0xad, 0x99, 0x99, 0x99, 0x2e, 0xb1,
0x59, 0xcc, 0x48, 0x4d, 0x12, 0x00, 0xec, 0x3c, 0x6e, 0x04, 0x74, 0x25, 0x54, 0xa0, 0xba, 0xdf,
0xda, 0x4a, 0xd8, 0xb8, 0x0b, 0xcb, 0xe9, 0xeb, 0xd2, 0xeb, 0xbd, 0x4b, 0xb2, 0x16, 0x31, 0x55,
0x2a, 0x99, 0x1b, 0x13, 0x71, 0xe3, 0x5e, 0x9a, 0x3c, 0x78, 0xa6, 0xcb, 0xed, 0x76, 0xd3, 0x87,
0x14, 0xc9, 0xb6, 0xc5, 0x8b, 0x17, 0x3f, 0x0f, 0x32, 0x9b, 0xcd, 0xc6, 0xb6, 0xb6, 0x36, 0xce,
0x51, 0x44, 0x11, 0xc2, 0x68, 0xb1, 0xa9, 0x8c, 0xa9, 0x30, 0x4b, 0x00, 0x33, 0x05, 0x8b, 0xc5,
0x02, 0x04, 0x86, 0x96, 0x06, 0x9c, 0x39, 0xa8, 0x6e, 0xaf, 0x66, 0x17, 0xe5, 0x84, 0x43, 0x6b,
0x67, 0x0b, 0x4b, 0x4a, 0x8b, 0xe5, 0x64, 0xf0, 0xa1, 0x6d, 0x36, 0x1b, 0x8d, 0x3d, 0x64, 0x88,
0xa2, 0xd4, 0xda, 0x83, 0xb6, 0x85, 0x0b, 0x17, 0x3e, 0x01, 0x35, 0x37, 0x37, 0xe7, 0x15, 0xef,
0xdc, 0xa9, 0x2a, 0x2a, 0x2c, 0xec, 0xbd, 0x75, 0xeb, 0x96, 0xf5, 0xf2, 0xe5, 0xcb, 0xd6, 0xa3,
0x47, 0x8f, 0x0e, 0x64, 0x64, 0x64, 0xd0, 0x65, 0x06, 0x91, 0x5b, 0x6c, 0x14, 0x01, 0xaa, 0x05,
0x5c, 0xc7, 0x95, 0xef, 0xf1, 0xe3, 0xc7, 0x04, 0xc8, 0xf6, 0xf4, 0xf6, 0xb0, 0x9f, 0xdd, 0x89,
0x85, 0x3e, 0xab, 0x95, 0x75, 0x39, 0x9d, 0x2c, 0x26, 0xc0, 0xd4, 0xd4, 0xd4, 0x30, 0x58, 0x3a,
0x06, 0x7b, 0xc7, 0x95, 0xee, 0x90, 0xe2, 0x80, 0x2d, 0x22, 0x22, 0x42, 0x4e, 0x05, 0x06, 0x06,
0xb6, 0x60, 0xb3, 0x1c, 0xcb, 0x63, 0x63, 0x9d, 0xc1, 0x41, 0x41, 0x10, 0x16, 0x1a, 0xca, 0xc5,
0xec, 0xd9, 0xb3, 0x01, 0xcd, 0x00, 0x85, 0x2d, 0x05, 0x20, 0x32, 0x08, 0x39, 0x10, 0xa9, 0xc8,
0xf0, 0x93, 0x5e, 0x41, 0x7b, 0x7b, 0x3b, 0x6b, 0x1b, 0x19, 0x61, 0x97, 0xe7, 0x2d, 0x05, 0x02,
0xc1, 0x24, 0xdc, 0x95, 0x95, 0x95, 0x6e, 0x84, 0xd1, 0x44, 0x15, 0x56, 0x9a, 0x7e, 0xa2, 0x28,
0xd9, 0x16, 0x1a, 0x1a, 0x2a, 0xa7, 0xe6, 0xcc, 0x99, 0x63, 0x4c, 0x49, 0x49, 0xe1, 0x0e, 0x8d,
0x8c, 0x8c, 0x84, 0x0d, 0x1b, 0x36, 0xc0, 0xba, 0x75, 0xeb, 0x20, 0x31, 0x31, 0x11, 0xce, 0x9d,
0x3b, 0x07, 0x12, 0x34, 0x42, 0x99, 0x51, 0x08, 0x3a, 0x9d, 0x0e, 0x30, 0x5b, 0xf8, 0x43, 0x0d,
0x18, 0xf4, 0x7a, 0xb6, 0xb3, 0xb3, 0x93, 0x8d, 0xcd, 0x5b, 0xc2, 0xa2, 0xdd, 0x19, 0x9c, 0x27,
0x86, 0xf4, 0x04, 0x13, 0xa2, 0x71, 0xa0, 0x19, 0x9c, 0x47, 0x86, 0xc0, 0x0e, 0x62, 0x8f, 0x16,
0x2c, 0x58, 0x20, 0xa7, 0xe6, 0xcd, 0x9b, 0xa7, 0x19, 0x0d, 0xda, 0xb2, 0x65, 0x0b, 0xec, 0xdd,
0xbb, 0x17, 0x36, 0x6d, 0xda, 0xc4, 0x81, 0xca, 0x8d, 0x12, 0x10, 0x1a, 0x4a, 0x01, 0xeb, 0xce,
0xa9, 0xc1, 0xac, 0xa1, 0xb5, 0xb5, 0x15, 0x48, 0x3f, 0xec, 0x0e, 0x3b, 0xbd, 0x2c, 0x37, 0xc6,
0x4d, 0x9a, 0x4f, 0x00, 0x6a, 0xb5, 0x9a, 0xae, 0xaa, 0xaa, 0x62, 0x88, 0xe3, 0xc8, 0x77, 0xce,
0x75, 0x08, 0x0a, 0x09, 0x09, 0x79, 0x1e, 0x14, 0x1e, 0x1e, 0xce, 0x41, 0x36, 0x6e, 0xdc, 0x08,
0xfb, 0xf7, 0xef, 0x07, 0xec, 0x11, 0x07, 0x2a, 0xd1, 0x16, 0x81, 0x4a, 0xa5, 0x22, 0x87, 0x03,
0xce, 0x0e, 0xa7, 0x0e, 0xef, 0x43, 0xf7, 0xc0, 0xe0, 0x00, 0xbd, 0x14, 0x41, 0xbd, 0xbd, 0xbd,
0xb4, 0x54, 0x2a, 0x65, 0xf4, 0x7a, 0x3d, 0x77, 0x38, 0x09, 0x34, 0x16, 0x8d, 0xea, 0xe9, 0x14,
0x04, 0xcd, 0x9d, 0x3b, 0xb7, 0xea, 0x39, 0xd0, 0xb6, 0x6d, 0xdb, 0x60, 0xd9, 0xb2, 0x65, 0x5c,
0x60, 0x16, 0x80, 0x86, 0x80, 0xe2, 0xb6, 0x7b, 0x50, 0xa8, 0x2e, 0x00, 0xb4, 0x3d, 0x60, 0xb6,
0x80, 0x6e, 0xe2, 0xd4, 0x11, 0x7b, 0x3d, 0xec, 0x7e, 0xc8, 0x81, 0xc8, 0xa1, 0x4f, 0xcb, 0x86,
0xbd, 0x63, 0xf0, 0xc2, 0x65, 0xf0, 0xc2, 0xa5, 0x6d, 0x76, 0x1b, 0x9d, 0x54, 0xf5, 0xad, 0x2d,
0x38, 0x38, 0xf8, 0x09, 0x28, 0x3e, 0x3e, 0x9e, 0xeb, 0xc9, 0xbe, 0x7d, 0xfb, 0x9e, 0xc5, 0xea,
0xd5, 0xab, 0x21, 0x29, 0x29, 0x09, 0x34, 0x5d, 0x6a, 0x38, 0x59, 0xc7, 0x87, 0x23, 0x35, 0xa9,
0x70, 0x57, 0x2d, 0x00, 0x43, 0x17, 0x37, 0x47, 0xc4, 0xea, 0x8c, 0xcd, 0x61, 0xa3, 0x97, 0xe6,
0x45, 0x73, 0xa5, 0xc3, 0x1e, 0xd1, 0x32, 0x99, 0x8c, 0xd1, 0x1b, 0xf4, 0xb4, 0xcc, 0x54, 0x49,
0x9f, 0x54, 0x9e, 0x70, 0xec, 0xac, 0xdc, 0x61, 0xcb, 0x90, 0x9d, 0xb1, 0xe2, 0xfb, 0xae, 0x9e,
0x03, 0x91, 0x52, 0x91, 0xcd, 0xa3, 0xa3, 0xa8, 0xa8, 0x08, 0x12, 0x12, 0x12, 0x20, 0x36, 0x36,
0x16, 0x56, 0xad, 0x5a, 0x05, 0x69, 0xc7, 0xd3, 0xe0, 0x87, 0x92, 0xf3, 0x70, 0xb8, 0x2a, 0x05,
0x2e, 0x35, 0x5f, 0x60, 0x1b, 0x94, 0x0d, 0x8c, 0x4a, 0xa3, 0xa2, 0x97, 0xdc, 0x8e, 0x76, 0x13,
0x33, 0x34, 0x35, 0x37, 0x31, 0x97, 0x5b, 0x2e, 0x3a, 0xbf, 0xcc, 0xfd, 0x7c, 0x24, 0x26, 0x2d,
0xd2, 0x30, 0x2b, 0x7c, 0x56, 0xad, 0x8f, 0x8f, 0xcf, 0x3d, 0x8c, 0xd3, 0xe3, 0xc7, 0x8f, 0x8f,
0x7a, 0x21, 0x68, 0x74, 0x90, 0xe1, 0xcc, 0xca, 0xca, 0x82, 0x3d, 0x7b, 0xf6, 0x00, 0x96, 0x01,
0xd6, 0x1e, 0xfe, 0x8a, 0x49, 0x96, 0xed, 0x77, 0x58, 0x86, 0xbb, 0xe9, 0x25, 0xb9, 0xd1, 0x6e,
0xfd, 0x90, 0xde, 0xb5, 0x36, 0x6f, 0xcd, 0x88, 0xff, 0x9a, 0x99, 0x6d, 0x78, 0x81, 0x7e, 0x43,
0x51, 0xd4, 0x94, 0xbf, 0xbd, 0x26, 0x5e, 0x06, 0x34, 0x3a, 0x88, 0x59, 0xd0, 0xae, 0x83, 0xde,
0x1f, 0x79, 0x97, 0x2d, 0xfc, 0x31, 0x62, 0x20, 0xe4, 0x5a, 0x30, 0xfb, 0xf1, 0x77, 0x41, 0x96,
0xf7, 0xfc, 0xdf, 0xdd, 0x44, 0x8d, 0xf1, 0xfa, 0xff, 0x57, 0x20, 0x34, 0x4b, 0x5f, 0x50, 0x50,
0xd0, 0x87, 0xe3, 0xa6, 0x8c, 0xf3, 0x7a, 0x27, 0x6a, 0xc2, 0xee, 0xb1, 0x00, 0xff, 0x09, 0xe8,
0x55, 0xfe, 0x2d, 0xfd, 0xaf, 0x20, 0x35, 0xb1, 0xf6, 0xd6, 0xad, 0x5b, 0x39, 0x8b, 0xff, 0x53,
0x6c, 0xde, 0xbc, 0x19, 0x62, 0x62, 0x62, 0x1e, 0xe1, 0x5d, 0x18, 0xf0, 0x4a, 0x20, 0xbc, 0xeb,
0x36, 0xe2, 0xe4, 0x76, 0xe3, 0x80, 0x3e, 0x7c, 0xd9, 0xc0, 0xf5, 0xb2, 0xb0, 0xb0, 0xb0, 0xb7,
0x5f, 0x05, 0xf4, 0x3b, 0xd6, 0xb8, 0x5a, 0x39, 0x98, 0x47, 0x6d, 0xf0, 0x00, 0x00, 0x00, 0x00,
0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE copy_library_xpm[1] = {{ png, sizeof( png ), "copy_library_xpm" }};
//EOF
+63
View File
@@ -0,0 +1,63 @@
/* Do not modify this file, it was automatically generated by the
* PNG2cpp CMake script, using a *.png file as input.
*/
#include <bitmaps.h>
static const unsigned char png[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c,
0xce, 0x00, 0x00, 0x02, 0xde, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0x63, 0xf8, 0xff, 0xff, 0x3f,
0x03, 0x3d, 0x30, 0xe9, 0x1a, 0x18, 0x18, 0x2c, 0x81, 0xd8, 0x9d, 0x1e, 0x16, 0x25, 0x00, 0x71,
0xc5, 0xb0, 0xb2, 0x88, 0x07, 0x88, 0xf9, 0xc9, 0xb6, 0x08, 0x08, 0xf8, 0x80, 0x58, 0x00, 0x07,
0xe6, 0x42, 0x52, 0x67, 0x00, 0xc4, 0x36, 0x48, 0x7c, 0x69, 0x20, 0x56, 0xc7, 0x81, 0xd5, 0x80,
0x98, 0x09, 0xdd, 0xa2, 0x28, 0x20, 0x4e, 0xc1, 0x81, 0xbd, 0x71, 0x05, 0x5d, 0x69, 0x69, 0xe9,
0xa1, 0xf3, 0xe7, 0xcf, 0x7f, 0x03, 0xe1, 0xe6, 0xe6, 0xe6, 0x6f, 0x87, 0x0e, 0x1d, 0xfa, 0xd6,
0xd5, 0xd5, 0x05, 0xe6, 0x2f, 0x58, 0xb0, 0xe0, 0x13, 0x50, 0xad, 0x3c, 0x54, 0x1f, 0x83, 0x02,
0x10, 0xeb, 0x00, 0x71, 0x2c, 0x1e, 0x8b, 0x42, 0xa0, 0x6a, 0x24, 0x60, 0x16, 0xc5, 0xe8, 0xb0,
0xb8, 0x16, 0x98, 0x30, 0x15, 0xd4, 0xc4, 0xb9, 0xdc, 0xd8, 0xbf, 0xa4, 0xef, 0xd7, 0xe3, 0xbb,
0xd7, 0xbe, 0xbf, 0x7c, 0xf9, 0xf2, 0xdb, 0xfa, 0xf5, 0xeb, 0xbf, 0xfd, 0xfe, 0xfd, 0xfb, 0xdb,
0xae, 0x25, 0x93, 0x7e, 0xcd, 0x6f, 0xc9, 0xfd, 0x9e, 0xa8, 0xcb, 0xd4, 0x18, 0xa7, 0xcb, 0x94,
0x03, 0xb2, 0xc8, 0x0d, 0x8f, 0x05, 0xe8, 0xd8, 0x02, 0x88, 0x45, 0x81, 0x58, 0x6a, 0xba, 0x3b,
0xd3, 0xac, 0xbb, 0x79, 0x5c, 0xff, 0xe7, 0x15, 0x7a, 0xfe, 0xff, 0x57, 0xc1, 0xf0, 0x7f, 0xff,
0xf2, 0x29, 0xbf, 0x80, 0x2e, 0xff, 0x06, 0xc3, 0x07, 0x32, 0x65, 0xff, 0xed, 0x2b, 0xd2, 0xff,
0x0f, 0xc2, 0x3b, 0xc2, 0x19, 0x1f, 0x81, 0x2c, 0x72, 0x27, 0xd1, 0x22, 0x50, 0xd8, 0x1b, 0xf4,
0xbb, 0x30, 0xcd, 0xbd, 0x9d, 0xc9, 0xf2, 0x7f, 0x69, 0x96, 0xe9, 0xff, 0xf7, 0x85, 0x0c, 0xff,
0xf7, 0x2e, 0x9b, 0x8c, 0x62, 0xd1, 0xd6, 0x14, 0x99, 0x7f, 0x07, 0x72, 0x14, 0xff, 0x83, 0xf0,
0x9a, 0x20, 0xc6, 0xc7, 0x0c, 0xd0, 0xc8, 0x06, 0x05, 0x49, 0x34, 0x1e, 0x0b, 0xfc, 0xa0, 0x6a,
0xb8, 0x61, 0x41, 0x67, 0x21, 0xc1, 0xa0, 0x60, 0x2d, 0xcb, 0x62, 0x5b, 0x94, 0x99, 0x74, 0xfa,
0xfc, 0x89, 0x83, 0x3f, 0x3e, 0xbe, 0x7b, 0xfb, 0x1d, 0xd9, 0xa2, 0x4b, 0x67, 0x8e, 0xff, 0x58,
0x3c, 0x67, 0xda, 0x17, 0x2d, 0x51, 0xe6, 0x50, 0x63, 0x71, 0x56, 0x73, 0x90, 0x45, 0x66, 0xd0,
0xe0, 0x4b, 0xc0, 0x63, 0x51, 0x0c, 0x54, 0x8d, 0x16, 0xcc, 0xa2, 0x22, 0x33, 0xa6, 0xf2, 0xa5,
0xfe, 0x8c, 0x9b, 0xa6, 0x84, 0x2b, 0xbc, 0xd9, 0xdf, 0xec, 0xf3, 0xe7, 0xcc, 0xde, 0x8d, 0x3f,
0x91, 0x2d, 0x5a, 0x5a, 0x11, 0xf8, 0x67, 0x65, 0x9e, 0xe5, 0xef, 0x69, 0xee, 0x8c, 0x7b, 0x6b,
0xac, 0x19, 0xd7, 0x92, 0x13, 0x47, 0x72, 0x40, 0xac, 0x0a, 0x8a, 0xa3, 0xb3, 0xe9, 0xbc, 0xff,
0x27, 0x57, 0xa5, 0xe0, 0x8c, 0xa3, 0xf5, 0x25, 0x8e, 0xff, 0x41, 0x18, 0x16, 0x47, 0xb6, 0x40,
0x1c, 0x08, 0xc4, 0x49, 0x78, 0x2c, 0x00, 0xf9, 0x22, 0x00, 0x88, 0x0d, 0x81, 0x58, 0x11, 0x88,
0x35, 0x4b, 0xcd, 0x99, 0xda, 0x81, 0x61, 0x7f, 0xba, 0x2f, 0x44, 0xe9, 0xeb, 0x81, 0x32, 0xd3,
0xbf, 0x47, 0x37, 0x2f, 0x45, 0xf1, 0xd1, 0xbc, 0x6c, 0xdb, 0xbf, 0x4b, 0x52, 0xb4, 0xff, 0xce,
0xf4, 0xe3, 0xb9, 0xde, 0x60, 0xcb, 0x78, 0x10, 0x64, 0x11, 0x0b, 0x10, 0xb3, 0x01, 0x71, 0x24,
0x1e, 0x8b, 0x3c, 0xa1, 0x6a, 0x98, 0x61, 0x41, 0x07, 0xc4, 0x1c, 0xa0, 0xf8, 0xad, 0xab, 0xab,
0xdb, 0xf7, 0xee, 0xdd, 0xbb, 0xef, 0xa0, 0x24, 0x8d, 0x6c, 0xd1, 0xc7, 0x8f, 0x1f, 0xbf, 0xed,
0xdc, 0xb9, 0x13, 0x94, 0x8f, 0x74, 0xa1, 0x85, 0x01, 0x38, 0xd5, 0x81, 0x34, 0x27, 0xe3, 0xb2,
0x88, 0x99, 0x99, 0x19, 0x44, 0xc7, 0x43, 0x4b, 0x6e, 0xb0, 0x45, 0xf5, 0x36, 0x4c, 0x73, 0x0f,
0xc7, 0x32, 0x7d, 0x99, 0x1b, 0xa7, 0xf1, 0xf7, 0x7c, 0x06, 0xef, 0xff, 0xdd, 0x4b, 0x51, 0x83,
0x6e, 0x7e, 0x8c, 0xe2, 0xbf, 0xcd, 0xc9, 0xb2, 0xff, 0x37, 0xc5, 0x8b, 0x7f, 0x9f, 0xe8, 0xca,
0x78, 0x8f, 0x9c, 0x38, 0x02, 0x27, 0x6f, 0x50, 0x1c, 0x5d, 0xc9, 0xe2, 0xfe, 0x3f, 0xb1, 0x20,
0x18, 0x67, 0x1c, 0x6d, 0x2a, 0xb4, 0xf8, 0x0f, 0xc2, 0xb0, 0x38, 0xd2, 0x04, 0x62, 0x53, 0xa8,
0x8b, 0x71, 0x59, 0x10, 0x0e, 0x55, 0x23, 0x0f, 0x4d, 0xe6, 0x72, 0x19, 0x86, 0xcc, 0x11, 0x9d,
0x0e, 0x4c, 0x1d, 0x9d, 0xb1, 0xe6, 0xf7, 0xf7, 0x4f, 0x2f, 0xfb, 0x7d, 0xeb, 0xe2, 0xf1, 0x1f,
0xc8, 0x16, 0x6d, 0x9e, 0x52, 0xf9, 0x7b, 0x69, 0x6d, 0xf4, 0x8f, 0x1a, 0x2b, 0xa6, 0x69, 0xf9,
0x66, 0x4c, 0xad, 0xc8, 0x65, 0x5d, 0x04, 0x1e, 0x8b, 0xdc, 0x71, 0x95, 0x75, 0xc0, 0x72, 0x6d,
0x17, 0xb2, 0x05, 0xc8, 0xf8, 0xd8, 0xb1, 0x63, 0x1f, 0xe1, 0x65, 0x1d, 0x92, 0x01, 0x36, 0xd0,
0x14, 0x88, 0x0d, 0x1b, 0xe0, 0xb2, 0x28, 0x24, 0x24, 0xa4, 0xb6, 0xa0, 0xa0, 0x60, 0x1a, 0x36,
0x1c, 0x1f, 0x1f, 0x3f, 0x1b, 0x94, 0x10, 0xc8, 0xad, 0x8f, 0x40, 0xa9, 0xc8, 0x82, 0x1e, 0x15,
0x1f, 0x3f, 0x10, 0x0b, 0x8d, 0xb6, 0x19, 0xc8, 0xb1, 0x08, 0x54, 0x08, 0x3b, 0xd3, 0xdc, 0x22,
0x72, 0x31, 0x00, 0x9d, 0xf1, 0x4b, 0xb7, 0xf6, 0x3d, 0xa2, 0xb6, 0x00, 0x00, 0x00, 0x00, 0x49,
0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE invert_module_xpm[1] = {{ png, sizeof( png ), "invert_module_xpm" }};
//EOF
+22 -17
View File
@@ -8,23 +8,28 @@
static const unsigned char png[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c,
0xce, 0x00, 0x00, 0x00, 0xf4, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0x63, 0xf8, 0xff, 0xff, 0x3f,
0x03, 0x3d, 0x30, 0xc3, 0xb0, 0xb4, 0xc8, 0x0c, 0x88, 0x2d, 0x68, 0x8d, 0x41, 0x16, 0xfd, 0xf8,
0x4f, 0x07, 0x30, 0xb0, 0x16, 0xfd, 0xfe, 0xf3, 0xef, 0xff, 0xc5, 0x87, 0xaf, 0xff, 0xef, 0xbc,
0xf4, 0xf8, 0xff, 0xab, 0x4f, 0x3f, 0x68, 0x67, 0x91, 0x71, 0xf9, 0x86, 0xff, 0x22, 0xe9, 0xd3,
0xff, 0xab, 0x15, 0x76, 0xff, 0x67, 0x88, 0x5d, 0xf2, 0x7f, 0xd3, 0xce, 0xf3, 0xb4, 0xb1, 0xc8,
0xa6, 0x7a, 0x13, 0xd8, 0x02, 0xf5, 0xb2, 0xf5, 0x60, 0x7a, 0xf7, 0xae, 0x73, 0x94, 0x5b, 0xd4,
0xb9, 0xe5, 0xea, 0xef, 0xf6, 0xcd, 0x57, 0xfe, 0x23, 0x63, 0xdb, 0xaa, 0x0d, 0xff, 0xf7, 0x5c,
0x79, 0xfe, 0xff, 0xde, 0xab, 0xcf, 0xff, 0xf3, 0x97, 0x9c, 0xf9, 0x5f, 0xdd, 0xbf, 0xe5, 0x3f,
0xba, 0x1a, 0x52, 0x31, 0x03, 0x7b, 0xe2, 0x32, 0xb0, 0xab, 0x91, 0x71, 0x40, 0xdd, 0xfa, 0xff,
0x1b, 0xce, 0x3e, 0xfe, 0xbf, 0xe9, 0xdc, 0x93, 0xff, 0xb3, 0xf6, 0xdd, 0xfa, 0xcf, 0x17, 0x39,
0x07, 0x43, 0x0d, 0xc9, 0x18, 0x9b, 0x45, 0xfc, 0x40, 0x83, 0xab, 0x96, 0x9d, 0xfe, 0xbf, 0xef,
0xda, 0x8b, 0xff, 0x36, 0x59, 0x0b, 0x29, 0xb7, 0x04, 0x97, 0x45, 0x20, 0xcc, 0x1d, 0x35, 0xef,
0xbf, 0x42, 0xd8, 0x24, 0xea, 0x58, 0x82, 0xcf, 0x22, 0xaa, 0x63, 0xba, 0x59, 0xb4, 0x21, 0xae,
0xf4, 0xdf, 0xba, 0x98, 0x92, 0xff, 0xb4, 0xc6, 0x0c, 0x6f, 0x95, 0xb4, 0xfe, 0xbf, 0x95, 0x51,
0xa1, 0x39, 0x1e, 0xb5, 0x68, 0x28, 0x58, 0x34, 0x69, 0x12, 0xdf, 0xfb, 0xfe, 0x7e, 0x01, 0x5a,
0x63, 0x86, 0xd1, 0x56, 0xd0, 0xa0, 0xb7, 0x08, 0x00, 0x49, 0xfd, 0x55, 0x27, 0xb8, 0xb7, 0x24,
0x27, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
0xce, 0x00, 0x00, 0x01, 0x3f, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0x63, 0x78, 0xf6, 0xec, 0xd9,
0x7f, 0x7a, 0x60, 0x86, 0x51, 0x8b, 0xc8, 0xb6, 0xe8, 0xe5, 0xcb, 0x97, 0xff, 0xdf, 0xbf, 0x7f,
0x4f, 0x73, 0xcc, 0x00, 0x22, 0xe8, 0x01, 0x46, 0x2d, 0xa2, 0xb2, 0x45, 0x5f, 0xbf, 0xfe, 0xff,
0x2f, 0x2f, 0x0f, 0xc1, 0x81, 0x81, 0xff, 0xff, 0x87, 0x85, 0x21, 0xf8, 0xcf, 0x9f, 0x93, 0x67,
0xd1, 0x82, 0x65, 0x27, 0xfe, 0x5b, 0xb8, 0xcd, 0x45, 0xc1, 0x7d, 0x4d, 0x5b, 0x80, 0x32, 0x0c,
0xff, 0xff, 0xfb, 0xfb, 0xff, 0xff, 0x3f, 0x7f, 0xfe, 0xff, 0xff, 0xcb, 0x96, 0xfd, 0xff, 0x1f,
0x1a, 0x0a, 0x16, 0x9b, 0x55, 0xbb, 0x12, 0x43, 0x3d, 0x31, 0x98, 0x61, 0xea, 0xec, 0xc3, 0xff,
0xf9, 0x15, 0xbb, 0x51, 0x70, 0x6b, 0xe1, 0x72, 0x84, 0x45, 0x25, 0x25, 0xff, 0xff, 0xd7, 0xd7,
0xff, 0xff, 0x1f, 0x1c, 0x0c, 0x16, 0x9b, 0x9c, 0x37, 0x0f, 0x43, 0x3d, 0x31, 0x18, 0xab, 0x45,
0xdd, 0x45, 0x4b, 0x21, 0x16, 0xcd, 0x9a, 0xf5, 0xff, 0xff, 0xba, 0x75, 0xff, 0xff, 0x6f, 0x01,
0xfa, 0x70, 0xe1, 0x42, 0x88, 0x8f, 0xf2, 0xe7, 0x50, 0xcf, 0xa2, 0xd0, 0xf8, 0x55, 0xff, 0xff,
0x73, 0x71, 0x81, 0x0d, 0x7e, 0x6b, 0x62, 0xf3, 0xff, 0xa5, 0x83, 0x17, 0xc4, 0x62, 0x26, 0xa6,
0xff, 0x49, 0x49, 0xcb, 0xa9, 0x67, 0x91, 0x8c, 0xee, 0xc4, 0xff, 0x17, 0x83, 0xd2, 0xfe, 0x27,
0x8a, 0xc5, 0xfc, 0xd7, 0x92, 0xad, 0xfe, 0xaf, 0x2c, 0xd7, 0xf0, 0x3f, 0x59, 0x34, 0xea, 0xff,
0x69, 0xb7, 0xd8, 0xff, 0x0a, 0x86, 0x93, 0xc9, 0xb3, 0xe8, 0xd4, 0xdc, 0xb5, 0xff, 0xf7, 0x3a,
0xc6, 0x60, 0xe0, 0x33, 0x39, 0x0d, 0xff, 0x03, 0xb5, 0xca, 0xe1, 0x0a, 0x7d, 0x34, 0xca, 0xff,
0x9f, 0x2f, 0x68, 0xc1, 0xaa, 0x96, 0x18, 0xcc, 0xf0, 0xbe, 0xbf, 0x1f, 0x12, 0x2c, 0xd8, 0x30,
0x30, 0x39, 0xcf, 0x0f, 0xa8, 0xfa, 0x3f, 0xcd, 0xa7, 0xea, 0xff, 0x3f, 0x35, 0x35, 0xdc, 0xea,
0x88, 0xc0, 0xf8, 0x2d, 0x02, 0x61, 0x46, 0x46, 0x70, 0xdc, 0x50, 0x62, 0x09, 0x71, 0x16, 0x51,
0x09, 0xd3, 0xd1, 0xa2, 0x19, 0x33, 0xfe, 0xff, 0x15, 0x15, 0xa5, 0x39, 0x1e, 0x6d, 0x33, 0x8c,
0x5a, 0x04, 0xc7, 0x00, 0x6c, 0x3e, 0x11, 0x8b, 0x7d, 0x56, 0xa5, 0xec, 0x00, 0x00, 0x00, 0x00,
0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE lang_sl_xpm[1] = {{ png, sizeof( png ), "lang_sl_xpm" }};
@@ -1,64 +0,0 @@
/* Do not modify this file, it was automatically generated by the
* PNG2cpp CMake script, using a *.png file as input.
*/
#include <bitmaps.h>
static const unsigned char png[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c,
0xce, 0x00, 0x00, 0x02, 0xf6, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xdd, 0x94, 0x5d, 0x48, 0x93,
0x51, 0x18, 0xc7, 0x77, 0x4a, 0xa7, 0x16, 0x6c, 0x19, 0xae, 0x95, 0x31, 0x15, 0xf3, 0x26, 0x2a,
0x31, 0x8c, 0x3e, 0xdd, 0x10, 0x9d, 0x91, 0x5a, 0x2b, 0x12, 0xdb, 0x9c, 0xf3, 0xb3, 0xd0, 0x96,
0x77, 0x96, 0x2b, 0xe8, 0xc3, 0x09, 0x11, 0x91, 0x10, 0x42, 0x31, 0x93, 0xb5, 0x51, 0x0b, 0x51,
0x87, 0xb1, 0x44, 0xc1, 0xcb, 0x8a, 0x6e, 0x86, 0x5d, 0x34, 0x88, 0x1a, 0x14, 0x36, 0xd9, 0xd4,
0x8a, 0x40, 0x52, 0x6a, 0x1f, 0xae, 0xbd, 0xa7, 0xf3, 0xbc, 0x3c, 0xd2, 0x2e, 0x52, 0x37, 0x41,
0x89, 0x06, 0x7f, 0xc6, 0xef, 0x7f, 0x9e, 0xf3, 0xfc, 0xf7, 0x9e, 0xf7, 0xec, 0x11, 0x50, 0x4a,
0x05, 0x7f, 0x13, 0xfb, 0x08, 0x3b, 0x14, 0x64, 0xdc, 0x51, 0x41, 0x7c, 0x57, 0x0e, 0x91, 0xe7,
0xe0, 0xb5, 0xee, 0x27, 0x2e, 0xe0, 0xb6, 0x83, 0xe4, 0x2d, 0xf0, 0xc5, 0x03, 0xe4, 0x25, 0xb0,
0x51, 0x4e, 0xc6, 0x59, 0xbd, 0x68, 0xb1, 0x5e, 0x7c, 0xbf, 0x45, 0x42, 0x44, 0x4c, 0x52, 0x87,
0x56, 0x3c, 0xfb, 0xac, 0x55, 0x4e, 0x6d, 0x27, 0xc8, 0x18, 0x63, 0xb1, 0xf9, 0xb8, 0xf0, 0xd3,
0x70, 0x5b, 0x21, 0x35, 0xab, 0x52, 0x7c, 0xc0, 0x0f, 0xcb, 0xc8, 0xeb, 0x91, 0x36, 0x39, 0x1d,
0xd4, 0xa6, 0xce, 0x32, 0xce, 0x00, 0x8f, 0x29, 0x21, 0xa6, 0x20, 0x08, 0xd1, 0xeb, 0xf5, 0x1f,
0x6d, 0x36, 0x9b, 0xaf, 0xaf, 0x4e, 0x16, 0x19, 0x6a, 0xaf, 0xa0, 0x8f, 0xea, 0x72, 0x82, 0xfd,
0xfd, 0xfd, 0xde, 0x1e, 0xb5, 0x2c, 0x3c, 0x7a, 0x53, 0x43, 0x7b, 0x34, 0xb2, 0x5f, 0xc0, 0x16,
0xdd, 0x8e, 0xd0, 0x30, 0x5b, 0xef, 0xad, 0xcf, 0x8a, 0x58, 0x2c, 0x96, 0x49, 0xf0, 0x14, 0x0a,
0xc5, 0xd5, 0x58, 0x83, 0xc4, 0xb0, 0x21, 0x10, 0x08, 0xf8, 0x07, 0xd4, 0x9b, 0x38, 0x77, 0x93,
0x80, 0x0e, 0xb4, 0xe4, 0x47, 0xd8, 0x9a, 0xdf, 0xaa, 0xcb, 0xe6, 0xd9, 0x5a, 0x25, 0xe3, 0x80,
0x6d, 0xcd, 0x7b, 0x23, 0xfc, 0x3a, 0xab, 0x9b, 0x99, 0x99, 0x09, 0x80, 0x57, 0x52, 0x52, 0x72,
0x23, 0xe6, 0x20, 0xa3, 0xd1, 0xf8, 0x39, 0x1c, 0x0e, 0xfb, 0x27, 0x26, 0x26, 0x02, 0x1e, 0x8f,
0x27, 0x30, 0x3d, 0x3d, 0xcd, 0x37, 0xf1, 0xf9, 0x7c, 0x3c, 0x7b, 0xbd, 0x5e, 0x9e, 0xc1, 0x07,
0x06, 0x01, 0xc7, 0x1d, 0x64, 0x32, 0x99, 0x26, 0xcd, 0x66, 0xb3, 0x7f, 0x61, 0x73, 0x3c, 0x8a,
0x2b, 0xc8, 0x60, 0x30, 0x7c, 0xb1, 0xdb, 0xed, 0xab, 0x1f, 0x64, 0xb5, 0x5a, 0x7d, 0xb0, 0x29,
0x18, 0x0c, 0xfa, 0xe1, 0x5d, 0xcd, 0xcf, 0xcf, 0xf3, 0x4d, 0x42, 0xa1, 0x10, 0xcf, 0xf0, 0x0d,
0x0c, 0x3e, 0x30, 0xd4, 0xad, 0x28, 0x08, 0x2e, 0x03, 0x6c, 0xee, 0x56, 0x67, 0x72, 0x2f, 0x9a,
0xa4, 0x9c, 0xa5, 0x45, 0xce, 0x5f, 0x86, 0x2e, 0xdd, 0xee, 0x08, 0x70, 0x97, 0x76, 0x27, 0xcf,
0xdd, 0xcd, 0x47, 0x78, 0x86, 0xba, 0xb9, 0xb9, 0xb9, 0xf8, 0x83, 0x3a, 0x3b, 0x3b, 0xa7, 0x5c,
0x2e, 0x97, 0xdf, 0xd1, 0xb0, 0x9d, 0x1b, 0xbc, 0x54, 0x4c, 0x9f, 0x5e, 0xc8, 0x8b, 0xb8, 0xdd,
0x6e, 0xff, 0x93, 0xda, 0x6c, 0xce, 0x71, 0xf9, 0x28, 0x7d, 0x5c, 0x93, 0xc5, 0x01, 0x0f, 0x9c,
0xcf, 0x8d, 0x0c, 0x19, 0x8a, 0xe9, 0x60, 0x7d, 0x06, 0xe7, 0x74, 0x3a, 0x03, 0xe0, 0x29, 0x95,
0xca, 0xf6, 0x58, 0x83, 0x48, 0x7a, 0x7a, 0xfa, 0x61, 0xa9, 0x54, 0x5a, 0xd4, 0xa7, 0x95, 0xfc,
0x18, 0xba, 0xa6, 0xa2, 0x0f, 0x4a, 0x13, 0xdf, 0x31, 0xaf, 0xe0, 0x5e, 0xf9, 0x86, 0xa9, 0xd1,
0x8e, 0x0a, 0x6a, 0x52, 0x89, 0xbe, 0x02, 0xdf, 0x2f, 0x4d, 0x78, 0x3f, 0x72, 0x5d, 0x45, 0x7b,
0xab, 0xb7, 0xfd, 0x94, 0x48, 0x24, 0xc7, 0xc0, 0x13, 0x89, 0x44, 0x9b, 0x63, 0x9e, 0x0c, 0x18,
0x98, 0x64, 0x2e, 0x23, 0xdf, 0xde, 0x34, 0x92, 0xd0, 0x5d, 0x25, 0x71, 0x82, 0x77, 0xbb, 0x90,
0x7c, 0x00, 0xbe, 0x53, 0x44, 0x3c, 0xc0, 0xb7, 0x0a, 0xc9, 0x18, 0x30, 0xd4, 0xc1, 0x49, 0xc4,
0x3d, 0x82, 0xa2, 0xc2, 0xb6, 0x30, 0x6d, 0x65, 0x4a, 0x45, 0x4e, 0x43, 0x4e, 0x43, 0x4e, 0x45,
0x96, 0x2e, 0xd5, 0x07, 0x6b, 0x05, 0xdf, 0xa3, 0x94, 0xc4, 0xa4, 0x8f, 0x62, 0x13, 0x16, 0x8d,
0x45, 0x79, 0xfb, 0x98, 0x0a, 0xa2, 0xf8, 0x15, 0xd6, 0x58, 0xa2, 0xbc, 0x06, 0x9c, 0x7b, 0x7f,
0x7a, 0x2f, 0xf3, 0x2b, 0x52, 0x50, 0x49, 0xc8, 0xc9, 0xc8, 0xc9, 0x0b, 0xc7, 0xbb, 0x50, 0xb3,
0xec, 0x13, 0x2d, 0x11, 0xb2, 0x9e, 0x49, 0xc7, 0xd4, 0xc8, 0xa4, 0x42, 0xaf, 0x12, 0x59, 0x8d,
0x7c, 0x12, 0x19, 0xea, 0x84, 0x71, 0x05, 0xc1, 0xad, 0x63, 0xda, 0xc5, 0x94, 0x8b, 0x47, 0x70,
0x8e, 0x49, 0xc3, 0xb4, 0x87, 0xa9, 0x06, 0xb9, 0x16, 0x59, 0x83, 0x0c, 0x61, 0x79, 0xe8, 0x89,
0x63, 0x0d, 0x12, 0x32, 0x55, 0x63, 0x83, 0x95, 0x28, 0xff, 0x9f, 0x0c, 0x6a, 0x58, 0xab, 0xa0,
0xb3, 0x6b, 0x15, 0x54, 0xf7, 0xdf, 0xbd, 0x23, 0xdd, 0xaa, 0x07, 0x61, 0x58, 0x26, 0x53, 0x36,
0x53, 0x3d, 0x6e, 0x86, 0x3f, 0x6a, 0x56, 0xd4, 0x93, 0xd6, 0x20, 0x57, 0x22, 0xc3, 0xe5, 0xc9,
0x41, 0x6f, 0x63, 0xbc, 0x93, 0x61, 0x1d, 0xd3, 0x19, 0xa6, 0x2a, 0xa6, 0x32, 0xf4, 0x4e, 0x21,
0x9f, 0x46, 0x2e, 0x47, 0x86, 0xba, 0xc4, 0xa5, 0x26, 0xc3, 0x6f, 0xb6, 0xf0, 0x43, 0xa9, 0x3d,
0xc3, 0xa5, 0x58, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE mirror_footprint_axisX_xpm[1] = {{ png, sizeof( png ), "mirror_footprint_axisX_xpm" }};
//EOF
@@ -1,64 +0,0 @@
/* Do not modify this file, it was automatically generated by the
* PNG2cpp CMake script, using a *.png file as input.
*/
#include <bitmaps.h>
static const unsigned char png[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c,
0xce, 0x00, 0x00, 0x02, 0xeb, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xed, 0x96, 0x5f, 0x48, 0x53,
0x51, 0x1c, 0xc7, 0x77, 0xb6, 0xca, 0x86, 0x9a, 0xa6, 0xa5, 0x19, 0x65, 0xf6, 0x87, 0x0c, 0xd4,
0xb2, 0x20, 0xc2, 0x14, 0x57, 0x2e, 0xff, 0x2e, 0x2b, 0xc2, 0x9c, 0x3a, 0xaf, 0x34, 0x8b, 0x1c,
0xf8, 0x56, 0x42, 0xb3, 0x21, 0x83, 0x32, 0xea, 0xa5, 0x84, 0x5a, 0x98, 0xb1, 0x35, 0x72, 0x19,
0x35, 0x03, 0xb7, 0x90, 0xf6, 0x10, 0xbe, 0xec, 0xa5, 0x41, 0xc4, 0xa0, 0x07, 0x21, 0x7a, 0x89,
0x8a, 0xb9, 0xb5, 0x31, 0xff, 0x8d, 0xdd, 0x51, 0xee, 0x9e, 0x7e, 0x47, 0xee, 0xbd, 0x4c, 0x71,
0xbb, 0x59, 0xb0, 0x97, 0x3a, 0xf0, 0x79, 0xd8, 0xe5, 0xfc, 0xf6, 0xd9, 0xef, 0x7c, 0x0f, 0xbf,
0x3b, 0x11, 0xc6, 0x58, 0xf4, 0xbb, 0xc0, 0x5a, 0x0f, 0xe0, 0xd5, 0xd4, 0xf0, 0xb5, 0xff, 0xb6,
0xe8, 0x6f, 0x88, 0xfd, 0xb5, 0xeb, 0x12, 0x80, 0xd8, 0x3d, 0x12, 0x40, 0x1b, 0x53, 0x83, 0x80,
0xdc, 0x04, 0xe4, 0x2c, 0x11, 0xc1, 0xda, 0x0e, 0x74, 0x00, 0x14, 0x70, 0x1e, 0xb8, 0x00, 0x74,
0xb2, 0x9f, 0x09, 0x25, 0x2b, 0x1d, 0x1d, 0xac, 0xe2, 0x81, 0x81, 0x01, 0x9f, 0xdd, 0x6e, 0xf7,
0x58, 0xad, 0xd6, 0x29, 0x9d, 0x4e, 0xf7, 0xdd, 0x62, 0xb1, 0x4c, 0xf5, 0xf7, 0xf7, 0x2f, 0x3e,
0xd3, 0xeb, 0xf5, 0x5f, 0xc9, 0x77, 0xb3, 0x7b, 0x45, 0x6b, 0x81, 0x5d, 0xc0, 0xc5, 0x04, 0x1c,
0x62, 0x3b, 0xe3, 0x45, 0xb0, 0x32, 0x80, 0x72, 0xa7, 0xd3, 0x49, 0x4f, 0x4f, 0x4f, 0xd3, 0xf0,
0x2c, 0x3c, 0x3e, 0x3e, 0x1e, 0x36, 0x9b, 0xcd, 0xe1, 0x48, 0x24, 0x12, 0x9e, 0x99, 0x99, 0xa1,
0x6d, 0x36, 0x5b, 0x00, 0x21, 0x54, 0x22, 0x91, 0x48, 0xc8, 0x5e, 0x91, 0x12, 0x50, 0x0b, 0x88,
0x3a, 0xd9, 0x8e, 0x33, 0x81, 0x87, 0x44, 0x62, 0xac, 0x47, 0x01, 0xab, 0x6a, 0x73, 0xe4, 0x65,
0x47, 0x1e, 0x36, 0x35, 0xe7, 0x32, 0x9c, 0x8c, 0xe0, 0xf5, 0x7a, 0x69, 0x8b, 0x32, 0x9b, 0x79,
0x4e, 0xe5, 0x31, 0xa3, 0x6d, 0x59, 0xf4, 0x1d, 0x39, 0xf2, 0x11, 0x51, 0xab, 0x80, 0x24, 0x56,
0x96, 0xce, 0x76, 0x93, 0xf9, 0x5e, 0x8d, 0xe6, 0x5f, 0xf7, 0x29, 0xb0, 0x4d, 0x5b, 0x83, 0x5d,
0x9a, 0x2c, 0x26, 0x18, 0x0c, 0xf2, 0x22, 0x8f, 0xc7, 0x43, 0xbb, 0x35, 0xe9, 0x8c, 0x5d, 0xa7,
0xc0, 0x8e, 0x6b, 0xb5, 0xf8, 0x4d, 0x2b, 0x0a, 0x92, 0xa2, 0x7a, 0xa0, 0x49, 0x40, 0xd2, 0x02,
0x34, 0xb2, 0x1d, 0x7d, 0x06, 0x52, 0xaf, 0x57, 0x22, 0xe7, 0xdd, 0xea, 0x35, 0x6e, 0x4b, 0xd7,
0xc1, 0xa8, 0xb1, 0xbb, 0x32, 0x1a, 0x0a, 0x85, 0xc2, 0x9c, 0x88, 0x74, 0xf7, 0xb8, 0xbb, 0x22,
0x6a, 0x52, 0x17, 0xfd, 0xb8, 0x57, 0x2d, 0x7e, 0xa7, 0x2d, 0x13, 0x3b, 0xb9, 0x50, 0xf3, 0x05,
0x44, 0x07, 0xe2, 0x5c, 0x86, 0xfd, 0x6e, 0xb7, 0x9b, 0x17, 0x2c, 0x67, 0x62, 0x62, 0xc2, 0x0f,
0x7b, 0x76, 0x70, 0x97, 0xe1, 0x2c, 0xd0, 0x2e, 0x20, 0x22, 0xf9, 0x34, 0x03, 0xd9, 0x44, 0x44,
0x8e, 0xf0, 0xf6, 0x71, 0xf4, 0x69, 0xf0, 0xa4, 0x74, 0x6a, 0x98, 0x2a, 0x60, 0x0c, 0x6d, 0x85,
0xcc, 0xdc, 0xdc, 0x1c, 0x2f, 0xf0, 0xfb, 0xfd, 0xf4, 0x90, 0x6a, 0x0f, 0x63, 0x6c, 0xd9, 0xb6,
0x30, 0xd4, 0x28, 0xf5, 0xf4, 0x55, 0x88, 0x3f, 0xae, 0x36, 0xa3, 0x0d, 0x40, 0x29, 0x97, 0x91,
0x43, 0x7f, 0x1a, 0x8f, 0x69, 0xeb, 0xe3, 0x66, 0x34, 0xa6, 0x6b, 0xc4, 0x8e, 0xbe, 0x06, 0x3e,
0xa3, 0x33, 0x80, 0x4a, 0x40, 0x42, 0xb1, 0x39, 0xa6, 0x01, 0x75, 0xa4, 0xa3, 0x5b, 0xc7, 0xd0,
0xa4, 0x41, 0x91, 0xfa, 0xcd, 0x4c, 0xed, 0x66, 0x0c, 0x54, 0x51, 0x34, 0xb6, 0xa3, 0x40, 0x20,
0x40, 0x0f, 0x51, 0xfb, 0x18, 0xa3, 0x6a, 0xe7, 0xc2, 0x83, 0x06, 0xe9, 0x17, 0x5d, 0xb9, 0x78,
0x32, 0xa9, 0x19, 0x35, 0x00, 0xe7, 0x04, 0x44, 0xe4, 0x78, 0x4f, 0x01, 0x1b, 0xd9, 0x8c, 0x52,
0x6f, 0x54, 0x22, 0x97, 0xa1, 0x06, 0x7d, 0x78, 0x76, 0xa9, 0x38, 0xfa, 0xa8, 0xab, 0x6c, 0xc9,
0xad, 0x23, 0xc7, 0x68, 0xd2, 0x1c, 0x89, 0x3e, 0x51, 0x17, 0xfe, 0x1c, 0xac, 0x43, 0xee, 0xde,
0xa3, 0xe2, 0xb7, 0xab, 0xcd, 0x88, 0x5c, 0x06, 0x17, 0x97, 0x91, 0xbd, 0xb7, 0x0e, 0x8f, 0xf6,
0xc8, 0xe3, 0x66, 0xf4, 0xa2, 0xa7, 0x16, 0xbf, 0xba, 0x7a, 0x82, 0xcf, 0xa8, 0x99, 0x9d, 0x6f,
0x42, 0x12, 0x72, 0x33, 0xd3, 0xb8, 0xf1, 0x73, 0xbf, 0x06, 0x79, 0x87, 0x95, 0x39, 0xa1, 0x91,
0xf6, 0x7c, 0x3c, 0xd8, 0xb4, 0x95, 0x99, 0x9d, 0x9d, 0xe5, 0x3b, 0xf2, 0xf9, 0x7c, 0xb4, 0x49,
0xb9, 0x85, 0x19, 0x6e, 0xcf, 0x67, 0x9e, 0x2a, 0x37, 0xcd, 0xdf, 0x94, 0x21, 0x0f, 0x29, 0x12,
0x03, 0x05, 0x02, 0xa2, 0x52, 0x76, 0x72, 0x93, 0xb9, 0x68, 0x63, 0x65, 0x29, 0xc0, 0x61, 0x97,
0xcb, 0xb5, 0x38, 0xdb, 0x96, 0xe7, 0x43, 0x9e, 0x39, 0x1c, 0x0e, 0x32, 0xeb, 0xf6, 0xc2, 0xac,
0x4b, 0x49, 0xde, 0x65, 0x60, 0x0b, 0xa4, 0xe4, 0xcb, 0x12, 0x90, 0x11, 0x47, 0x94, 0x5e, 0x55,
0x55, 0xd5, 0x23, 0x97, 0xcb, 0xaf, 0xac, 0x84, 0x4c, 0x26, 0xbb, 0x4c, 0x6a, 0xfe, 0xe4, 0x55,
0x4e, 0x8e, 0x4f, 0x93, 0x94, 0x57, 0x39, 0xb9, 0x71, 0xff, 0xff, 0x05, 0x25, 0x55, 0xf4, 0x0b,
0x47, 0x10, 0x1b, 0x88, 0xb6, 0x78, 0xc3, 0xad, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44,
0xae, 0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE mirror_footprint_axisY_xpm[1] = {{ png, sizeof( png ), "mirror_footprint_axisY_xpm" }};
//EOF
@@ -86,6 +86,6 @@ static const unsigned char png[] = {
0xb8, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE rotate_module_ccw_xpm[1] = {{ png, sizeof( png ), "rotate_module_ccw_xpm" }};
const BITMAP_OPAQUE rotate_module_neg_xpm[1] = {{ png, sizeof( png ), "rotate_module_neg_xpm" }};
//EOF
@@ -88,6 +88,6 @@ static const unsigned char png[] = {
0x33, 0x99, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE rotate_module_cw_xpm[1] = {{ png, sizeof( png ), "rotate_module_cw_xpm" }};
const BITMAP_OPAQUE rotate_module_pos_xpm[1] = {{ png, sizeof( png ), "rotate_module_pos_xpm" }};
//EOF
-501
View File
@@ -1,501 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.0"
width="26"
height="26"
id="svg2"
inkscape:version="0.48.4 r9939"
sodipodi:docname="save_library.svg">
<metadata
id="metadata166">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1280"
inkscape:window-height="977"
id="namedview164"
showgrid="true"
inkscape:zoom="13.906433"
inkscape:cx="11.483952"
inkscape:cy="24.158587"
inkscape:window-x="-4"
inkscape:window-y="-4"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
inkscape:snap-to-guides="false"
inkscape:snap-grids="false">
<inkscape:grid
type="xygrid"
id="grid3041"
empspacing="1"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<defs
id="defs4">
<clipPath
id="ba">
<path
style="fill:#ffffff"
d="m 0,96 v 60 H 96 V 96 H 0 z m 68,20 c 9.9411,0 18,8.0589 18,18 0,9.9411 -8.0589,18 -18,18 -9.9411,0 -18,-8.0589 -18,-18 0,-9.9411 8.0589,-18 18,-18 z"
id="path125"
inkscape:connector-curvature="0" />
</clipPath>
<linearGradient
id="bl"
y2="5.9782"
gradientUnits="userSpaceOnUse"
x2="69"
gradientTransform="matrix(-0.2255,-0.071329,0.05452,-0.20327,7.6326,90.834)"
y1="122"
x1="69">
<stop
stop-color="#1e71ac"
offset="0"
id="stop128" />
<stop
stop-color="#81c1e9"
offset="1"
id="stop130" />
</linearGradient>
<linearGradient
id="bm"
y2="67.706001"
xlink:href="#a"
gradientUnits="userSpaceOnUse"
x2="118.33"
gradientTransform="matrix(0.39018,0.62586,-0.63862,0.30043,3.5817,-20.909)"
y1="87.488998"
x1="120.65" />
<linearGradient
id="a">
<stop
offset="0"
id="stop15" />
<stop
stop-opacity="0"
offset="1"
id="stop17" />
</linearGradient>
<linearGradient
id="bn"
y2="5.9782"
gradientUnits="userSpaceOnUse"
x2="69"
gradientTransform="matrix(-0.2255,-0.071329,0.05452,-0.20327,7.6018,90.825)"
y1="122"
x1="69">
<stop
stop-color="#cd2323"
offset="0"
id="stop134" />
<stop
stop-color="#ef7474"
offset="1"
id="stop136" />
</linearGradient>
<linearGradient
id="ao"
y2="67.706001"
xlink:href="#a"
gradientUnits="userSpaceOnUse"
x2="118.33"
y1="87.488998"
x1="120.65" />
<clipPath
id="aq">
<path
style="fill:url(#linearGradient4033)"
d="m 118,56 c -9.9411,0 -18,8.0589 -18,18 0,9.9411 8.0589,18 18,18 9.7305,0 17.637,-7.7253 17.969,-17.375 v -1.25 C 135.639,63.725 127.729,56 117.999,56 z m -6,10.75 c 5.9493,0.05747 10.832,4.9413 11.031,10.875 l 3.75,0.03125 -6,8.7188 -6.1562,-8.8125 3.9688,0.03125 c -0.25101,-4.9057 -4.4893,-9.9506 -11.719,-9.625 1.5223,-0.80073 3.2718,-1.2367 5.125,-1.2188 z"
id="path122"
inkscape:connector-curvature="0" />
</clipPath>
<linearGradient
id="bo"
y2="5.1837001"
xlink:href="#an"
gradientUnits="userSpaceOnUse"
x2="84.360001"
gradientTransform="matrix(0.21868,0.069171,-0.053262,0.19858,-13.124,56.327)"
y1="79.417"
x1="84.360001" />
<linearGradient
id="an">
<stop
stop-color="#fff"
offset="0"
id="stop65" />
<stop
stop-color="#fff"
stop-opacity=".49804"
offset=".43290"
id="stop67" />
<stop
stop-color="#fff"
stop-opacity="0"
offset="1"
id="stop69" />
</linearGradient>
<linearGradient
id="bp"
y2="67.706001"
xlink:href="#a"
gradientUnits="userSpaceOnUse"
x2="118.33"
gradientTransform="matrix(-0.39018,-0.62586,0.63862,-0.30043,-9.9736,166.82)"
y1="87.488998"
x1="120.65" />
<linearGradient
y2="67.706001"
x2="118.33"
y1="87.488998"
x1="120.65"
gradientUnits="userSpaceOnUse"
id="linearGradient3263"
xlink:href="#a"
inkscape:collect="always" />
<linearGradient
y2="5.1837001"
x2="84.360001"
y1="79.417"
x1="84.360001"
gradientTransform="matrix(-0.21868,-0.069171,0.053262,-0.19858,6.7324,89.587)"
gradientUnits="userSpaceOnUse"
id="linearGradient3265"
xlink:href="#an"
inkscape:collect="always" />
</defs>
<g
id="g3990">
<path
style="opacity:0.62891002;fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:0.70963186;stroke-linejoin:round"
d="M 9.6596115,5.3159336 C 8.7156736,3.8303478 3.0884583,1.8780913 0.49605765,1.4843719 0.63286624,6.1106521 0.6354959,8.6438074 0.49418944,12.920355 c 3.38119706,0.417619 6.65007166,1.706376 9.23954246,2.980621 0,0.622176 -0.07398,-10.2117676 -0.07398,-10.5850424 z"
id="path37"
inkscape:connector-curvature="0" />
<path
style="opacity:0.62891002;fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:0.70963186;stroke-linejoin:round"
d="M 9.6596115,5.2865056 C 12.083236,3.1557432 15.360122,2.2885383 19.136304,1.3375403 c -0.284772,4.9489073 -0.102455,7.511336 -0.07213,11.4946857 -3.418311,0.03634 -6.963207,1.559699 -9.3305721,3.068595 0,-0.02308 -0.07398,-10.2410411 -0.07398,-10.6143154 z"
id="path39"
inkscape:connector-curvature="0" />
<path
style="opacity:0.62891002;fill:none;stroke:#000000;stroke-width:0.14192638"
d="m 17.62063,3.1873399 c 0,0 -3.815638,0.8838087 -6.848929,2.9595554"
id="path49"
inkscape:connector-curvature="0" />
<path
style="opacity:0.62891002;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 17.394036,4.8012488 c 0,0 -3.511103,0.5173178 -6.620968,2.5038816"
id="path51"
inkscape:connector-curvature="0" />
<path
style="opacity:0.62891002;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 17.272918,6.2311532 c 0,0 -3.27395,0.5096669 -6.50024,2.3370702"
id="path53"
inkscape:connector-curvature="0" />
<path
style="opacity:0.62891002;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 17.274877,7.6866141 c 0,0 -3.172573,0.2684782 -6.502004,2.2116124"
id="path55"
inkscape:connector-curvature="0" />
<path
style="opacity:0.62891002;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 17.231902,8.9007628 c -0.03698,0.00743 -2.876823,0.5090318 -6.459029,2.2830152"
id="path57"
inkscape:connector-curvature="0" />
<path
style="opacity:0.62891002;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 17.392078,10.085174 c -0.03698,0.0074 -3.083882,0.550216 -6.6194,2.401967"
id="path59"
inkscape:connector-curvature="0" />
<path
style="opacity:0.62891002;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 17.440915,11.350822 c 0,0 -3.334509,0.62075 -6.668628,2.435112"
id="path61"
inkscape:connector-curvature="0" />
<path
style="opacity:0.62891001999999996;fill:#ffffff;fill-rule:evenodd;stroke:#b30808;stroke-width:0.66616368000000004;stroke-linejoin:round;stroke-opacity:1"
d="M 9.6857877,5.2775219 C 11.821476,2.9262027 14.709431,1.7611526 18.037104,0.46661814 17.786146,5.4413914 17.946825,7.9872467 17.973521,11.967809 c -3.012389,0.347254 -6.136318,2.193026 -8.2225848,3.917213 0,-0.02307 -0.065194,-10.2342253 -0.065194,-10.6076548 z"
id="path63"
inkscape:connector-curvature="0" />
<path
style="opacity:0.62891002;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 16.702517,2.4541111 c 0,0 -3.362637,1.230861 -6.03552,3.5825057"
id="path65"
inkscape:connector-curvature="0" />
<path
style="opacity:0.62891002;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 16.395829,5.5296759 c 0,0 -2.885024,0.8074347 -5.728246,2.9282685"
id="path67"
inkscape:connector-curvature="0" />
<path
style="opacity:0.62891002;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 16.358716,8.2031579 c -0.0326,0.010797 -2.535167,0.7706957 -5.691915,2.8704961"
id="path69"
inkscape:connector-curvature="0" />
<path
style="opacity:0.62891002;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 16.544293,10.634088 c 0,0 -2.938551,0.924033 -5.87671,3.041646"
id="path71"
inkscape:connector-curvature="0" />
<path
style="opacity:0.62891002;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 2.7583286,3.1579116 c 0,0 3.36596,0.8838087 6.041577,2.9595557"
id="path73"
inkscape:connector-curvature="0" />
<path
style="opacity:0.62891002;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 2.9593364,4.7719751 c 0,0 3.0971682,0.5173182 5.8403743,2.503882"
id="path75"
inkscape:connector-curvature="0" />
<path
style="opacity:0.62891002;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 3.0659941,6.2018799 c 0,0 2.8879549,0.5096669 5.7339115,2.3370702"
id="path77"
inkscape:connector-curvature="0" />
<path
style="opacity:0.62891002;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 3.0642361,7.6573407 c 0,0 2.7984881,0.2684787 5.7354746,2.211612"
id="path79"
inkscape:connector-curvature="0" />
<path
style="opacity:0.62891002;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 3.1023281,8.8714891 c 0.032629,0.00743 2.5377046,0.5090322 5.6975775,2.2830149"
id="path81"
inkscape:connector-curvature="0" />
<path
style="opacity:0.62891002;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 2.9607041,10.055745 c 0.032629,0.0074 2.7203506,0.550216 5.8392015,2.401967"
id="path83"
inkscape:connector-curvature="0" />
<path
style="opacity:0.62891002;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 2.9173379,11.321502 c 0,0 2.9412841,0.620751 5.8825677,2.435112"
id="path85"
inkscape:connector-curvature="0" />
<path
style="opacity:0.62891001999999996;fill:#ffffff;fill-rule:evenodd;stroke:#b30808;stroke-width:0.62566995999999997;stroke-linejoin:round;stroke-opacity:1"
d="M 9.7584553,5.2482486 C 7.8745648,2.8969293 5.3270927,1.7318792 2.3916691,0.43734473 2.6130319,5.4121176 2.4713087,7.9579739 2.4477345,11.938536 c 2.6572551,0.347238 5.4129623,2.193026 7.2532919,3.917213 0,-0.02308 0.057508,-10.2342256 0.057508,-10.6076551 z"
id="path87"
inkscape:connector-curvature="0" />
<path
style="opacity:0.62891002;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 3.5691981,2.4248377 c 0,0 2.966093,1.2308611 5.3240818,3.5825058"
id="path89"
inkscape:connector-curvature="0" />
<path
style="opacity:0.62891002;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 3.8401392,5.5004025 c 0,0 2.544933,0.8074348 5.0529453,2.9282686"
id="path91"
inkscape:connector-curvature="0" />
<path
style="opacity:0.62891002;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 3.8723709,8.1738841 c 0.028751,0.010797 2.2362901,0.7706957 5.020909,2.8704959"
id="path93"
inkscape:connector-curvature="0" />
<path
style="opacity:0.62891002;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 3.7092593,10.604815 c 0,0 2.5920103,0.924032 5.1840206,3.041645"
id="path95"
inkscape:connector-curvature="0" />
</g>
<g
id="g3956"
transform="translate(-0.07190883,-0.14381829)">
<g
id="g221"
transform="matrix(0.60926793,0,0,0.60018523,-14.556018,11.034576)">
<path
id="path223"
d="m 25.961,2.2795 c -0.50881,0 -0.91843,0.40232 -0.91843,0.90206 v 20.226 c 0,0.49974 0.40962,0.90206 0.91843,0.90206 h 19.775 c 0.50881,0 0.91843,-0.40232 0.91843,-0.90206 v -18.154 l -3.0423,-2.974 h -17.651 z"
style="fill:#7f7f7f;fill-rule:evenodd;stroke-width:1pt;stroke-linecap:round;stroke-linejoin:round"
inkscape:connector-curvature="0" />
<path
id="path225"
d="m 29.647,2.3339 v 5.6378 c 0,0.57606 0.51531,1.0398 1.1554,1.0398 h 7.7628 c 0.64009,-4e-7 1.1554,-0.46376 1.1554,-1.0398 V 2.3339 h -10.074 z"
style="fill:#bfbfbf;fill-rule:evenodd;stroke:#333333;stroke-width:1.34249997"
inkscape:connector-curvature="0" />
<rect
id="rect227"
x="31.209"
y="3.7319"
width="2.8554001"
height="3.8492999"
rx="0.60650003"
style="fill:#7f7f7f;fill-rule:evenodd;stroke:#333333;stroke-width:0.80549997" />
<path
id="path229"
d="m 25.961,2.2795 c -0.50881,0 -0.91843,0.40232 -0.91843,0.90206 v 20.226 c 0,0.49974 0.40962,0.90206 0.91843,0.90206 h 19.775 c 0.50881,0 0.91843,-0.40232 0.91843,-0.90206 v -18.154 l -3.0423,-2.974 h -17.651 z"
style="fill:none;stroke:#333333;stroke-width:1.34249997;stroke-linecap:round;stroke-linejoin:round"
inkscape:connector-curvature="0" />
<rect
id="rect231"
x="26.805"
y="10.573"
width="18.097"
height="12.181"
rx="0.88217002"
style="fill:#d9d9d9;fill-opacity:0.75;fill-rule:evenodd;stroke:#333333;stroke-width:0.80549997;stroke-linecap:round;stroke-linejoin:round" />
</g>
</g>
<g
id="g3928"
transform="translate(-16.682927,23.730025)">
<path
style="opacity:0.86666667;fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:0.70963186;stroke-linejoin:round"
d="m 32.922582,-13.273155 c -0.943938,-1.485586 -6.571153,-3.437843 -9.163554,-3.831562 0.136808,4.62628 0.139438,7.1594355 -0.0019,11.4359835 3.381197,0.4176189 6.650071,1.7063755 9.239542,2.9806206 0,0.6221756 -0.07398,-10.2117681 -0.07398,-10.5850421 z"
id="path37-7"
inkscape:connector-curvature="0" />
<path
style="opacity:0.86666667;fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:0.70963186;stroke-linejoin:round"
d="m 32.922582,-13.302583 c 2.423624,-2.130763 5.70051,-2.997968 9.476692,-3.948966 -0.284772,4.948908 -0.102455,7.5113364 -0.07213,11.4946857 -3.418311,0.036338 -6.963207,1.5596995 -9.330572,3.0685957 0,-0.023077 -0.07398,-10.2410414 -0.07398,-10.6143154 z"
id="path39-4"
inkscape:connector-curvature="0" />
<path
style="opacity:0.86666667;fill:none;stroke:#000000;stroke-width:0.14192638"
d="m 40.8836,-15.401749 c 0,0 -3.815638,0.883809 -6.848929,2.959555"
id="path49-0"
inkscape:connector-curvature="0" />
<path
style="opacity:0.86666667;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 40.657006,-13.78784 c 0,0 -3.511102,0.517318 -6.620967,2.503882"
id="path51-9"
inkscape:connector-curvature="0" />
<path
style="opacity:0.86666667;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 40.535889,-12.357936 c 0,0 -3.273951,0.509667 -6.500241,2.33707"
id="path53-4"
inkscape:connector-curvature="0" />
<path
style="opacity:0.86666667;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 40.537847,-10.902475 c 0,0 -3.172573,0.268478 -6.502004,2.2116126"
id="path55-8"
inkscape:connector-curvature="0" />
<path
style="opacity:0.86666667;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 40.494872,-9.6883261 c -0.03698,0.00743 -2.876823,0.5090318 -6.459029,2.2830147"
id="path57-8"
inkscape:connector-curvature="0" />
<path
style="opacity:0.86666667;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 40.655048,-8.5039152 c -0.03698,0.00743 -3.083882,0.5502158 -6.6194,2.4019671"
id="path59-2"
inkscape:connector-curvature="0" />
<path
style="opacity:0.86666667;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 40.703885,-7.2382672 c 0,0 -3.334508,0.6207506 -6.668628,2.4351127"
id="path61-4"
inkscape:connector-curvature="0" />
<path
style="opacity:0.86666667;fill:#ffffff;fill-rule:evenodd;stroke:#22a51e;stroke-width:0.66616368;stroke-linejoin:round;stroke-opacity:0.99019614"
d="m 32.948758,-13.311567 c 2.135688,-2.351319 5.023643,-3.516369 8.351316,-4.810904 -0.250958,4.974773 -0.09028,7.520629 -0.06358,11.5011909 -3.012389,0.3472537 -6.136318,2.1930263 -8.222585,3.9172135 0,-0.023073 -0.06519,-10.2342254 -0.06519,-10.6076554 z"
id="path63-5"
inkscape:connector-curvature="0" />
<path
style="opacity:0.86666667;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 39.965487,-16.134978 c 0,0 -3.362637,1.230861 -6.03552,3.582506"
id="path65-5"
inkscape:connector-curvature="0" />
<path
style="opacity:0.86666667;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 39.658799,-13.059413 c 0,0 -2.885024,0.807435 -5.728246,2.928268"
id="path67-1"
inkscape:connector-curvature="0" />
<path
style="opacity:0.86666667;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 39.621686,-10.385931 c -0.0326,0.0108 -2.535166,0.7706957 -5.691914,2.8704963"
id="path69-7"
inkscape:connector-curvature="0" />
<path
style="opacity:0.86666667;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 39.807263,-7.9550005 c 0,0 -2.938551,0.9240323 -5.87671,3.0416451"
id="path71-1"
inkscape:connector-curvature="0" />
<path
style="opacity:0.86666667;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 26.021299,-15.431177 c 0,0 3.36596,0.883808 6.041577,2.959555"
id="path73-1"
inkscape:connector-curvature="0" />
<path
style="opacity:0.86666667;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 26.222307,-13.817114 c 0,0 3.097168,0.517318 5.840374,2.503882"
id="path75-5"
inkscape:connector-curvature="0" />
<path
style="opacity:0.86666667;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 26.328964,-12.387209 c 0,0 2.887955,0.509667 5.733912,2.33707"
id="path77-2"
inkscape:connector-curvature="0" />
<path
style="opacity:0.86666667;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 26.327206,-10.931748 c 0,0 2.798488,0.268478 5.735475,2.2116118"
id="path79-7"
inkscape:connector-curvature="0" />
<path
style="opacity:0.86666667;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 26.365298,-9.7175999 c 0.03263,0.00743 2.537705,0.5090323 5.697578,2.2830152"
id="path81-6"
inkscape:connector-curvature="0" />
<path
style="opacity:0.86666667;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 26.223674,-8.5333436 c 0.03263,0.00743 2.720351,0.5502158 5.839202,2.401967"
id="path83-1"
inkscape:connector-curvature="0" />
<path
style="opacity:0.86666667;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 26.180308,-7.2675868 c 0,0 2.941284,0.6207511 5.882568,2.4351123"
id="path85-4"
inkscape:connector-curvature="0" />
<path
style="opacity:0.86666667;fill:#ffffff;fill-rule:evenodd;stroke:#22a51e;stroke-width:0.62566996;stroke-linejoin:round;stroke-opacity:0.99019614"
d="m 33.021426,-13.34084 c -1.883891,-2.35132 -4.431363,-3.51637 -7.366787,-4.810904 0.221363,4.974773 0.07964,7.520629 0.05607,11.5011906 2.657255,0.3472383 5.412962,2.1930263 7.253292,3.917214 0,-0.023077 0.05751,-10.2342266 0.05751,-10.6076556 z"
id="path87-2"
inkscape:connector-curvature="0" />
<path
style="opacity:0.86666667;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 26.832168,-16.164251 c 0,0 2.966093,1.230861 5.324082,3.582506"
id="path89-3"
inkscape:connector-curvature="0" />
<path
style="opacity:0.86666667;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 27.103109,-13.088686 c 0,0 2.544933,0.807434 5.052946,2.928268"
id="path91-2"
inkscape:connector-curvature="0" />
<path
style="opacity:0.86666667;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 27.135341,-10.415205 c 0.02875,0.0108 2.23629,0.7706959 5.020909,2.8704965"
id="path93-2"
inkscape:connector-curvature="0" />
<path
style="opacity:0.86666667;fill:none;stroke:#000000;stroke-width:0.2174277"
d="m 26.97223,-7.9842742 c 0,0 2.59201,0.9240326 5.18402,3.041645"
id="path95-1"
inkscape:connector-curvature="0" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 21 KiB

+59
View File
@@ -0,0 +1,59 @@
<svg xmlns="http://www.w3.org/2000/svg" height="48" width="48" version="1.1" viewBox="0 0 48 48">
<g transform="matrix(0,-2.0558,1.4629,0,25.92,42.873)">
<rect fill-opacity="0" height="16" width="16" y="0" x="0"/>
</g>
<g opacity=".96484" stroke-linejoin="round" transform="matrix(0,-1.6938,1.4407,0,27.509,5.1795)" stroke="#000">
<rect transform="rotate(90)" height="14.619" width="9.7086" y="3.4905" x="1.904" stroke-width="0.4" fill="#fff"/>
<path d="m693.26 625.06a18.914 18.914 0 0 1 -37.828 0.11702" transform="matrix(0 .071482 -.071482 0 41.168 -41.24)" stroke-width="5.5958" fill="none"/>
</g>
<g stroke-linejoin="round" transform="matrix(0,-1.6938,1.4407,0,27.292,5.243)" stroke="#030303">
<rect transform="rotate(90)" height="2.511" width="4.7176" y="13.332" x="-.31959" stroke-width="0.3" fill="#ff7800"/>
<rect transform="rotate(90)" height="2.511" width="4.7176" y="5.3636" x="-.31959" stroke-width="0.3" fill="#ff7800"/>
<path d="m654.65 737.28a9.5805 9.5805 0 1 1 -19.161 0 9.5805 9.5805 0 1 1 19.161 0z" transform="matrix(0 .071482 -.071482 0 46.083 -44.072)" stroke-width="4.1969" fill="#ffede0"/>
<rect transform="rotate(90)" height="2.511" width="4.7176" y="9.3478" x="-.31959" stroke-width="0.3" fill="#ff7800"/>
<path d="m654.65 737.28a9.5805 9.5805 0 1 1 -19.161 0 9.5805 9.5805 0 1 1 19.161 0z" transform="matrix(0 .071482 -.071482 0 42.08 -44.072)" stroke-width="4.1969" fill="#ffede0"/>
<path d="m654.65 737.28a9.5805 9.5805 0 1 1 -19.161 0 9.5805 9.5805 0 1 1 19.161 0z" transform="matrix(0 .071482 -.071482 0 38.077 -44.072)" stroke-width="4.1969" fill="#ffede0"/>
</g>
<g transform="matrix(0,-1.6938,1.4407,0,41.377,5.243)">
<rect stroke-linejoin="round" transform="rotate(90)" height="2.511" width="4.7176" stroke="#030303" y="13.332" x="-.31959" stroke-width="0.3" fill="#ff7800"/>
<rect stroke-linejoin="round" transform="rotate(90)" height="2.511" width="4.7176" stroke="#030303" y="5.3636" x="-.31959" stroke-width="0.3" fill="#ff7800"/>
<path stroke-linejoin="round" d="m654.65 737.28a9.5805 9.5805 0 1 1 -19.161 0 9.5805 9.5805 0 1 1 19.161 0z" transform="matrix(0 .071482 -.071482 0 46.083 -44.072)" stroke="#030303" stroke-width="4.1969" fill="#ffede0"/>
<rect stroke-linejoin="round" transform="rotate(90)" height="2.511" width="4.7176" stroke="#030303" y="9.3478" x="-.31959" stroke-width="0.3" fill="#ff7800"/>
<path stroke-linejoin="round" d="m654.65 737.28a9.5805 9.5805 0 1 1 -19.161 0 9.5805 9.5805 0 1 1 19.161 0z" transform="matrix(0 .071482 -.071482 0 42.08 -44.072)" stroke="#030303" stroke-width="4.1969" fill="#ffede0"/>
<g stroke-width="0.3">
<path stroke-linejoin="round" d="m654.65 737.28a9.5805 9.5805 0 1 1 -19.161 0 9.5805 9.5805 0 1 1 19.161 0z" transform="matrix(0 .071482 -.071482 0 38.077 -44.072)" stroke="#030303" stroke-width="4.1969" fill="#ffede0"/>
</g>
</g>
<g transform="matrix(1.5378,0,0,2.5138,-73.197,-100.33)">
<rect transform="matrix(8.316e-8,-1,1,9.4237e-8,0,0)" height="1" width="2" y="62.753" x="-48.952"/>
<rect transform="matrix(8.316e-8,-1,1,9.4237e-8,0,0)" height="1" width="2" y="62.753" x="-51.952"/>
<rect transform="matrix(8.316e-8,-1,1,9.4237e-8,0,0)" height="1" width="2" y="62.753" x="-54.952"/>
<rect y="43.952" width="1" x="62.753" height="2"/>
<rect y="40.952" width="1" x="62.753" height="2"/>
<rect y="55.952" width="1" x="62.753" height="2"/>
</g>
<g opacity=".39453" transform="matrix(0,-1.6938,1.4021,0,1.3977,5.1795)">
<g stroke-linejoin="round">
<rect transform="rotate(90)" height="14.619" width="9.7086" stroke="#000" y="3.4905" x="1.904" stroke-width="0.4"/>
<path d="m693.26 625.06a18.914 18.914 0 0 1 -37.828 0.11702" transform="matrix(0 .071482 -.071482 0 41.168 -41.24)" stroke="#030303" stroke-width="5.5958"/>
</g>
<g stroke-linejoin="round" transform="translate(-.0375 -.15)" stroke="#030303">
<rect transform="rotate(90)" height="2.511" width="4.7176" y="13.332" x="-.31959" stroke-width="0.3"/>
<rect transform="rotate(90)" height="2.511" width="4.7176" y="5.3636" x="-.31959" stroke-width="0.3"/>
<path stroke-width="4.1969" d="m654.65 737.28a9.5805 9.5805 0 1 1 -19.161 0 9.5805 9.5805 0 1 1 19.161 0z" transform="matrix(0 .071482 -.071482 0 46.083 -44.072)"/>
<rect transform="rotate(90)" height="2.511" width="4.7176" y="9.3478" x="-.31959" stroke-width="0.3"/>
<path stroke-width="4.1969" d="m654.65 737.28a9.5805 9.5805 0 1 1 -19.161 0 9.5805 9.5805 0 1 1 19.161 0z" transform="matrix(0 .071482 -.071482 0 42.08 -44.072)"/>
<path stroke-width="4.1969" d="m654.65 737.28a9.5805 9.5805 0 1 1 -19.161 0 9.5805 9.5805 0 1 1 19.161 0z" transform="matrix(0 .071482 -.071482 0 38.077 -44.072)"/>
</g>
<g transform="translate(-.0375 9.6261)">
<rect stroke-linejoin="round" transform="rotate(90)" height="2.511" width="4.7176" stroke="#030303" y="13.332" x="-.31959" stroke-width="0.3"/>
<rect stroke-linejoin="round" transform="rotate(90)" height="2.511" width="4.7176" stroke="#030303" y="5.3636" x="-.31959" stroke-width="0.3"/>
<path stroke-linejoin="round" d="m654.65 737.28a9.5805 9.5805 0 1 1 -19.161 0 9.5805 9.5805 0 1 1 19.161 0z" transform="matrix(0 .071482 -.071482 0 46.083 -44.072)" stroke="#030303" stroke-width="4.1969"/>
<rect stroke-linejoin="round" transform="rotate(90)" height="2.511" width="4.7176" stroke="#030303" y="9.3478" x="-.31959" stroke-width="0.3"/>
<path stroke-linejoin="round" d="m654.65 737.28a9.5805 9.5805 0 1 1 -19.161 0 9.5805 9.5805 0 1 1 19.161 0z" transform="matrix(0 .071482 -.071482 0 42.08 -44.072)" stroke="#030303" stroke-width="4.1969"/>
<g stroke-width="0.3">
<path stroke-linejoin="round" d="m654.65 737.28a9.5805 9.5805 0 1 1 -19.161 0 9.5805 9.5805 0 1 1 19.161 0z" transform="matrix(0 .071482 -.071482 0 38.077 -44.072)" stroke="#030303" stroke-width="4.1969"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.7 KiB

+23 -96
View File
@@ -1,96 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.0"
width="26"
height="26"
viewBox="0 0 6.5520289 12.549593"
id="Layer_1"
xml:space="preserve"
sodipodi:version="0.32"
inkscape:version="0.48.4 r9939"
sodipodi:docname="lang_sl.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"><metadata
id="metadata2274"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><sodipodi:namedview
inkscape:window-height="736"
inkscape:window-width="1280"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
guidetolerance="10.0"
gridtolerance="10.0"
objecttolerance="10.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#ffffff"
id="base"
inkscape:zoom="21.500006"
inkscape:cx="11.153739"
inkscape:cy="12.000002"
inkscape:window-x="0"
inkscape:window-y="26"
inkscape:current-layer="Layer_1"
showgrid="false"
inkscape:window-maximized="0" /><defs
id="defs3" /><g
id="g3012"
transform="matrix(0.02883723,0,0,0.02875969,0.01271393,9.7865102)"><rect
id="rect3212"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
y="-277.0564"
x="-103.804"
height="289.60599"
width="434.409" /><rect
id="rect6123"
style="fill:#ed1c24;fill-opacity:1;fill-rule:evenodd;stroke:none"
y="-83.985741"
x="-103.804"
height="96.535332"
width="434.409" /><rect
id="rect4183"
style="fill:#005da4;fill-opacity:1;fill-rule:evenodd;stroke:none"
y="-180.52107"
x="-103.804"
height="96.535332"
width="434.409" /><path
inkscape:connector-curvature="0"
id="path13"
style="fill:#ed1c24;fill-opacity:1"
d="m -18.170084,-221.38606 c -0.892,0.39333 -1.777333,0.80166 -2.656,1.22466 l 2.768,43.79933 c 0.754,11.94066 5.831999,23.241 14.341998,31.75066 5.819333,5.819 12.943332,10.034 20.684998,12.358 l 6.67e-4,0 c 7.741666,-2.32433 14.865998,-6.539 20.684998,-12.358 8.509666,-8.50966 13.587999,-19.81 14.341665,-31.75066 l 2.768333,-43.79933 c -0.879,-0.423 -1.763666,-0.83133 -2.656333,-1.22466 l 6.67e-4,3.3e-4 -2.833333,44.83632 c -0.709,11.28567 -5.507,21.96667 -13.549332,30.009 -5.3,5.30067 -11.746666,9.19133 -18.756332,11.43167 l -0.001,0 c -7.009999,-2.24034 -13.455998,-6.131 -18.755998,-11.43167 -8.042666,-8.04233 -12.840665,-18.72333 -13.549332,-30.009 l -2.833666,-44.83665 6.66e-4,0" /><path
inkscape:connector-curvature="0"
id="path15"
style="fill:#005da4;fill-opacity:1"
d="m 52.108909,-221.38573 c -10.967666,-4.83567 -22.921331,-7.403 -35.139663,-7.403 -12.218666,0 -24.172331,2.56733 -35.139997,7.403 l 2.834,44.83632 c 0.708666,11.28567 5.506666,21.96667 13.549332,30.009 5.300333,5.30067 11.746332,9.19133 18.755998,11.43167 l 0.001,0 c 7.009666,-2.24034 13.456332,-6.131 18.755665,-11.43167 8.042999,-8.04233 12.840998,-18.72333 13.549332,-30.009" /><polyline
transform="matrix(0.3333333,0,0,0.3333333,-20.826084,-228.78873)"
points="119.764,62.917 124.434,56.539 116.574,57.394 113.386,50.161 110.197,57.394 102.338,56.539 107.008,62.917 102.338,69.295 110.197,68.44 113.386,75.673 116.574,68.44 124.434,69.295 "
id="polyline17"
style="fill:#ffdd00;fill-opacity:1" /><polyline
transform="matrix(0.3333333,0,0,0.3333333,-20.826084,-228.78873)"
points="90,23.232 94.669,16.854 86.811,17.709 83.622,10.476 80.433,17.709 72.575,16.854 77.244,23.232 72.575,29.61 80.433,28.755 83.622,35.988 86.811,28.755 94.669,29.61 "
id="polyline19"
style="fill:#ffdd00;fill-opacity:1" /><polyline
transform="matrix(0.3333333,0,0,0.3333333,-20.826084,-228.78873)"
points="149.527,23.232 154.195,16.854 146.338,17.709 143.148,10.476 139.959,17.709 132.102,16.854 136.771,23.232 132.102,29.61 139.959,28.755 143.148,35.988 146.338,28.755 154.195,29.61 "
id="polyline21"
style="fill:#ffdd00;fill-opacity:1" /><path
inkscape:connector-curvature="0"
id="path23"
style="fill:#ffffff"
d="m 45.315909,-170.02074 -14.173665,-18.89799 -5.669333,7.55933 -8.503999,-17.008 -8.503999,17.008 -5.669333,-7.55933 -14.173332,18.89799 c 0,2.506 0.995667,4.909 2.767667,6.681 1.772,1.77133 4.174999,2.76767 6.681332,2.76767 1.673334,0 3.301,-0.444 4.725,-1.26634 0.00933,-0.006 -0.011333,0.007 -0.00233,0.001 0.709666,-0.41 1.475333,-0.72934 2.280333,-0.94467 2.420666,-0.64833 4.999666,-0.30933 7.169999,0.94333 1.449,0.83667 3.080666,1.26634 4.725333,1.26634 0.007,0 -0.0087,0 -0.0017,0 1.645,0 3.276333,-0.42967 4.725666,-1.26634 2.17,-1.25266 4.749333,-1.59233 7.17,-0.94333 0.804666,0.21533 1.570333,0.53467 2.279999,0.94467 0.0097,0.005 -0.011,-0.007 -0.002,-0.001 1.424334,0.82234 3.051333,1.26634 4.724667,1.26634 2.506666,0 4.909666,-0.996 6.681666,-2.76767 1.771999,-1.772 2.767666,-4.175 2.767666,-6.681" /><path
inkscape:connector-curvature="0"
id="path25"
style="fill:#ffffff"
d="m -8.020085,-159.76041 c 0.650333,1.29234 1.365333,2.55334 2.142333,3.778 0,0 -3.33e-4,6.7e-4 0,10e-4 1.994666,0.91733 4.256333,1.11533 6.394666,0.54233 0.805333,-0.21533 1.570666,-0.535 2.280333,-0.94467 0.00933,-0.005 -0.011333,0.007 -0.002,0.001 1.424,-0.823 3.051666,-1.26634 4.724999,-1.26634 0.00333,0 -0.00433,0 -0.001,0 1.644667,-6.6e-4 3.276334,0.429 4.725333,1.26634 2.170333,1.25266 4.749333,1.59166 7.170333,0.94333 0.804667,-0.21533 1.570333,-0.535 2.28,-0.94467 0.0097,-0.005 -0.011,0.007 -0.002,10e-4 1.423666,-0.823 3.051333,-1.26634 4.725333,-1.26634 0.0033,0 -0.0047,0 -0.0013,0 1.644667,-6.6e-4 3.276667,0.429 4.725333,1.26634 2.170667,1.25266 4.749333,1.59166 7.169999,0.94333 0.519667,-0.13867 1.022,-0.32167 1.504,-0.543 l 0,0 c 0.777333,-1.22533 1.492334,-2.48633 2.142667,-3.778 0,-6.7e-4 0,0 0,0 -0.472,0.17967 -0.929667,0.397 -1.368334,0.65033 -0.009,0.005 0.01167,-0.007 0.0027,-0.001 -0.709666,0.40967 -1.475333,0.72867 -2.280666,0.94467 -2.420667,0.64833 -4.999333,0.30933 -7.17,-0.944 -1.448666,-0.83667 -3.080666,-1.26567 -4.725332,-1.26567 -0.0033,0 0.0047,0 0.0013,0 -1.673667,0 -3.301333,0.444 -4.725333,1.26633 -0.009,0.005 0.01167,-0.007 0.002,-0.001 -0.709667,0.41 -1.475333,0.72933 -2.28,0.94467 -2.420999,0.649 -4.999999,0.31 -7.170332,-0.94334 -1.449,-0.83666 -3.080667,-1.26633 -4.725333,-1.26633 -0.00367,0 0.00433,0 0.001,0 -1.673333,0 -3.301,0.444 -4.725,1.267 -0.00933,0.005 0.011334,-0.007 0.002,-10e-4 -0.709666,0.40966 -1.475,0.72866 -2.280333,0.94466 -2.420666,0.64834 -4.999666,0.30934 -7.169999,-0.944 -0.440333,-0.254 -0.897667,-0.47066 -1.367,-0.649 -3.33e-4,0 0,-6.6e-4 0,0" /><path
inkscape:connector-curvature="0"
id="path27"
style="fill:#ffffff"
d="m 37.368577,-152.50907 c -1.101,1.41066 -2.293,2.76099 -3.572333,4.03966 -4.78,4.78 -10.549332,8.34233 -16.827332,10.48833 l -3.33e-4,0 c -6.277999,-2.146 -12.047666,-5.70766 -16.827665,-10.48833 -1.279,-1.27867 -2.471,-2.629 -3.572,-4.03966 0,0 -3.33e-4,0 0,0 1.303,0.20966 2.648333,0.146 3.947667,-0.20167 0.805333,-0.216 1.570666,-0.535 2.280333,-0.94467 0.00933,-0.005 -0.011334,0.007 -0.002,10e-4 1.423999,-0.823 3.051666,-1.26634 4.724999,-1.26634 0.00333,0 -0.00433,0 -10e-4,0 1.644667,-6.6e-4 3.276333,0.429 4.725333,1.26567 2.170333,1.25333 4.749333,1.59233 7.169999,0.944 0.805334,-0.216 1.571,-0.535 2.280667,-0.94467 0.009,-0.005 -0.01167,0.007 -0.002,0.001 1.423666,-0.823 3.051333,-1.26634 4.724666,-1.26634 0.0033,0 -0.004,0 -6.67e-4,0 1.644667,-6.6e-4 3.276,0.429 4.725333,1.26567 1.89,1.09167 4.091,1.48967 6.226666,1.14533 6.67e-4,0 0,0 -6.66e-4,6.7e-4" /></g></svg>
<svg xmlns="http://www.w3.org/2000/svg" height="256" width="256" version="1.1" viewBox="-2100 -1470 1493.3333 1493.3333">
<title>Flag of Brazil</title>
<defs>
<clipPath id="a">
<path d="m171.82 258.25c-26.762-12.893-65.044-38.479-65.044-89.094 0-50.614 2.42-73.633 2.42-73.633h125.25s2.422 23.019 2.422 73.633c-0.001 50.616-38.286 76.201-65.05 89.094z"/>
</clipPath>
</defs>
<clipPath>
<circle cy="0" cx="0" r="735" fill="#28166f"/>
</clipPath>
<rect fill-rule="evenodd" height="1516.7" width="1516.7" y="-1493.3" x="-2100" fill="#e6e6e6"/>
<g transform="matrix(1.1905,0,0,1.2308,-1926.1,-225.26)">
<rect height="252.78" width="1225" y="-540.56" x="-116.67" fill="#0f218b"/>
<rect height="252.78" width="1225" y="-793.33" x="-116.67" fill="#fff"/>
<rect height="252.78" width="1225" y="-287.78" x="-116.67" fill="#f00"/>
<path fill-rule="evenodd" fill="#fff" d="m121.41-423.58c0-111.98 7.1462-174.77 7.1462-174.77h321.57s7.1486 62.786 7.1486 174.77c0 119.2-97.529 178.65-161.74 207.37l-6.1942 2.7706-6.1871-2.7706c-64.207-28.717-161.74-88.167-161.74-207.37z"/>
<path fill="#f00" d="m289.34-228.14c-63.222-28.283-153.66-84.409-153.66-195.44s5.717-161.52 5.717-161.52h295.89s5.7217 50.495 5.7217 161.52c-0.002 111.03-90.446 167.16-153.67 195.44z"/>
<path fill="#fff" d="m302.86-452.69c17.118 0.25665 50.522 0.87964 80.262-8.3622 0 0-0.78666 9.8824-0.78666 21.395 0 11.514 0.78666 21.397 0.78666 21.397-27.281-8.4762-60.971-8.6539-80.262-8.4258v61.325h-27.04v-61.325c-19.294-0.22801-52.979-0.0506-80.262 8.4258 0 0 0.78666-9.8824 0.78666-21.397 0-11.512-0.78666-21.395-0.78666-21.395 29.74 9.2418 63.142 8.6188 80.262 8.3622v-38.514c-15.604-0.12944-38.089 0.56377-63.51 8.4631 0 0 0.7867-9.8824 0.7867-21.397 0-11.512-0.7867-21.395-0.7867-21.395 25.386 7.8862 47.841 8.5903 63.439 8.4631-0.80085-24.389-8.4526-55.126-8.4526-55.126s15.748 1.1429 22.041 1.1429c6.3028 0 22.046-1.1429 22.046-1.1429s-7.6495 30.74-8.4526 55.126c15.601 0.1251 38.056-0.57694 63.442-8.4631 0 0-0.7867 9.8823-0.7867 21.395 0 11.514 0.7867 21.397 0.7867 21.397-25.424-7.8993-47.909-8.5925-63.513-8.4631v38.514z"/>
<g transform="matrix(2.3624,0,0,2.1936,-116.57,-794.65)" clip-path="url(#a)">
<path fill-rule="evenodd" fill="#0f218b" d="m170.64 274.85-55.454-49.43s7.089-22.927 20.927-22.927c10.996 0 15.009 8.865 15.009 8.865s7.22-18.689 20.696-18.689c13.479 0 20.699 18.689 20.699 18.689s4.013-8.865 15.01-8.865c13.838 0 20.927 22.927 20.927 22.927l-57.814 49.43z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

@@ -1,353 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
height="26"
width="26"
version="1.1"
viewBox="0 0 26 26"
id="svg2"
inkscape:version="0.48.4 r9939"
sodipodi:docname="mirror_footprint_axisX.svg">
<metadata
id="metadata100">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs98" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1280"
inkscape:window-height="977"
id="namedview96"
showgrid="true"
inkscape:zoom="28.392708"
inkscape:cx="13.120654"
inkscape:cy="11.517507"
inkscape:window-x="-4"
inkscape:window-y="-4"
inkscape:window-maximized="1"
inkscape:current-layer="svg2">
<inkscape:grid
type="xygrid"
id="grid3569"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<g
transform="matrix(-1.2534861,0,0,-0.77869134,24.497945,12.448397)"
id="g4">
<rect
style="fill-opacity:0"
height="16"
width="16"
y="0"
x="0"
id="rect6" />
</g>
<g
id="g3617"
transform="matrix(1,0,0,1.061887,0,-0.74862645)">
<g
id="g8"
transform="matrix(-1.0327633,0,0,-0.76687444,1.515029,11.602584)"
style="opacity:0.96483998;stroke:#000000;stroke-linejoin:round">
<rect
id="rect10"
x="1.904"
y="3.4905"
width="9.7086"
height="14.619"
transform="matrix(0,1,-1,0,0,0)"
style="fill:#ffffff;stroke-width:0.40000001" />
<path
id="path12"
transform="matrix(0,0.071482,-0.071482,0,41.168,-41.24)"
d="m 693.26,625.06 a 18.91409,18.91409 0 0 1 -37.828,0.11702"
inkscape:connector-curvature="0"
style="fill:none;stroke-width:5.59579992" />
</g>
<g
id="g14"
transform="matrix(-1.0327633,0,0,-0.76687444,1.553747,11.718091)"
style="stroke:#030303;stroke-linejoin:round">
<rect
id="rect16"
x="-0.31959"
y="13.332"
width="4.7175999"
height="2.5109999"
transform="matrix(0,1,-1,0,0,0)"
style="fill:#ff7800;stroke-width:0.30000001" />
<rect
id="rect18"
x="-0.31959"
y="5.3635998"
width="4.7175999"
height="2.5109999"
transform="matrix(0,1,-1,0,0,0)"
style="fill:#ff7800;stroke-width:0.30000001" />
<path
id="path20"
transform="matrix(0,0.071482,-0.071482,0,46.083,-44.072)"
d="m 654.65,737.28 a 9.5805,9.5805 0 1 1 -19.161,0 9.5805,9.5805 0 1 1 19.161,0 z"
inkscape:connector-curvature="0"
style="fill:#ffede0;stroke-width:4.19689989" />
<rect
id="rect22"
x="-0.31959"
y="9.3478003"
width="4.7175999"
height="2.5109999"
transform="matrix(0,1,-1,0,0,0)"
style="fill:#ff7800;stroke-width:0.30000001" />
<path
id="path24"
transform="matrix(0,0.071482,-0.071482,0,42.08,-44.072)"
d="m 654.65,737.28 a 9.5805,9.5805 0 1 1 -19.161,0 9.5805,9.5805 0 1 1 19.161,0 z"
inkscape:connector-curvature="0"
style="fill:#ffede0;stroke-width:4.19689989" />
<path
id="path26"
transform="matrix(0,0.071482,-0.071482,0,38.077,-44.072)"
d="m 654.65,737.28 a 9.5805,9.5805 0 1 1 -19.161,0 9.5805,9.5805 0 1 1 19.161,0 z"
inkscape:connector-curvature="0"
style="fill:#ffede0;stroke-width:4.19689989" />
</g>
<g
id="g28"
transform="matrix(-1.0327633,0,0,-0.76687444,1.553747,4.220745)">
<rect
id="rect30"
x="-0.31959"
y="13.332"
width="4.7175999"
height="2.5109999"
transform="matrix(0,1,-1,0,0,0)"
style="fill:#ff7800;stroke:#030303;stroke-width:0.30000001;stroke-linejoin:round" />
<rect
id="rect32"
x="-0.31959"
y="5.3635998"
width="4.7175999"
height="2.5109999"
transform="matrix(0,1,-1,0,0,0)"
style="fill:#ff7800;stroke:#030303;stroke-width:0.30000001;stroke-linejoin:round" />
<path
id="path34"
transform="matrix(0,0.071482,-0.071482,0,46.083,-44.072)"
d="m 654.65,737.28 a 9.5805,9.5805 0 1 1 -19.161,0 9.5805,9.5805 0 1 1 19.161,0 z"
inkscape:connector-curvature="0"
style="fill:#ffede0;stroke:#030303;stroke-width:4.19689989;stroke-linejoin:round" />
<rect
id="rect36"
x="-0.31959"
y="9.3478003"
width="4.7175999"
height="2.5109999"
transform="matrix(0,1,-1,0,0,0)"
style="fill:#ff7800;stroke:#030303;stroke-width:0.30000001;stroke-linejoin:round" />
<path
id="path38"
transform="matrix(0,0.071482,-0.071482,0,42.08,-44.072)"
d="m 654.65,737.28 a 9.5805,9.5805 0 1 1 -19.161,0 9.5805,9.5805 0 1 1 19.161,0 z"
inkscape:connector-curvature="0"
style="fill:#ffede0;stroke:#030303;stroke-width:4.19689989;stroke-linejoin:round" />
<g
id="g40"
style="stroke-width:0.30000001">
<path
id="path42"
transform="matrix(0,0.071482,-0.071482,0,38.077,-44.072)"
d="m 654.65,737.28 a 9.5805,9.5805 0 1 1 -19.161,0 9.5805,9.5805 0 1 1 19.161,0 z"
inkscape:connector-curvature="0"
style="fill:#ffede0;stroke:#030303;stroke-width:4.19689989;stroke-linejoin:round" />
</g>
</g>
</g>
<g
transform="matrix(0,-0.95944068,1.5327431,0,-62.817441,74.189237)"
id="g44">
<rect
transform="matrix(8.316e-8,-1,1,9.4237e-8,0,0)"
height="1"
width="2"
y="62.752998"
x="-48.952"
id="rect46" />
<rect
transform="matrix(8.316e-8,-1,1,9.4237e-8,0,0)"
height="1"
width="2"
y="62.752998"
x="-51.952"
id="rect48" />
<rect
transform="matrix(8.316e-8,-1,1,9.4237e-8,0,0)"
height="1"
width="2"
y="62.752998"
x="-54.952"
id="rect50" />
<rect
y="43.952"
width="1"
x="62.752998"
height="2"
id="rect52" />
<rect
y="40.952"
width="1"
x="62.752998"
height="2"
id="rect54" />
<rect
y="55.952"
width="1"
x="62.752998"
height="2"
id="rect56" />
</g>
<g
style="opacity:0.39452999"
transform="matrix(-1.0327633,0,0,-0.74632793,1.515029,25.501444)"
id="g58">
<g
style="stroke-linejoin:round"
id="g60">
<rect
style="stroke:#000000;stroke-width:0.40000001"
transform="matrix(0,1,-1,0,0,0)"
height="14.619"
width="9.7086"
y="3.4905"
x="1.904"
id="rect62" />
<path
style="stroke:#030303;stroke-width:5.59579992"
inkscape:connector-curvature="0"
d="m 693.26,625.06 a 18.91409,18.91409 0 0 1 -37.828,0.11702"
transform="matrix(0,0.071482,-0.071482,0,41.168,-41.24)"
id="path64" />
</g>
<g
style="stroke:#030303;stroke-linejoin:round"
transform="translate(-0.0375,-0.15)"
id="g66">
<rect
style="stroke-width:0.30000001"
transform="matrix(0,1,-1,0,0,0)"
height="2.5109999"
width="4.7175999"
y="13.332"
x="-0.31959"
id="rect68" />
<rect
style="stroke-width:0.30000001"
transform="matrix(0,1,-1,0,0,0)"
height="2.5109999"
width="4.7175999"
y="5.3635998"
x="-0.31959"
id="rect70" />
<path
style="stroke-width:4.19689989"
inkscape:connector-curvature="0"
d="m 654.65,737.28 a 9.5805,9.5805 0 1 1 -19.161,0 9.5805,9.5805 0 1 1 19.161,0 z"
transform="matrix(0,0.071482,-0.071482,0,46.083,-44.072)"
id="path72" />
<rect
style="stroke-width:0.30000001"
transform="matrix(0,1,-1,0,0,0)"
height="2.5109999"
width="4.7175999"
y="9.3478003"
x="-0.31959"
id="rect74" />
<path
style="stroke-width:4.19689989"
inkscape:connector-curvature="0"
d="m 654.65,737.28 a 9.5805,9.5805 0 1 1 -19.161,0 9.5805,9.5805 0 1 1 19.161,0 z"
transform="matrix(0,0.071482,-0.071482,0,42.08,-44.072)"
id="path76" />
<path
style="stroke-width:4.19689989"
inkscape:connector-curvature="0"
d="m 654.65,737.28 a 9.5805,9.5805 0 1 1 -19.161,0 9.5805,9.5805 0 1 1 19.161,0 z"
transform="matrix(0,0.071482,-0.071482,0,38.077,-44.072)"
id="path78" />
</g>
<g
transform="translate(-0.0375,9.6261)"
id="g80">
<rect
style="stroke:#030303;stroke-width:0.30000001;stroke-linejoin:round"
transform="matrix(0,1,-1,0,0,0)"
height="2.5109999"
width="4.7175999"
y="13.332"
x="-0.31959"
id="rect82" />
<rect
style="stroke:#030303;stroke-width:0.30000001;stroke-linejoin:round"
transform="matrix(0,1,-1,0,0,0)"
height="2.5109999"
width="4.7175999"
y="5.3635998"
x="-0.31959"
id="rect84" />
<path
style="stroke:#030303;stroke-width:4.19689989;stroke-linejoin:round"
inkscape:connector-curvature="0"
d="m 654.65,737.28 a 9.5805,9.5805 0 1 1 -19.161,0 9.5805,9.5805 0 1 1 19.161,0 z"
transform="matrix(0,0.071482,-0.071482,0,46.083,-44.072)"
id="path86" />
<rect
style="stroke:#030303;stroke-width:0.30000001;stroke-linejoin:round"
transform="matrix(0,1,-1,0,0,0)"
height="2.5109999"
width="4.7175999"
y="9.3478003"
x="-0.31959"
id="rect88" />
<path
style="stroke:#030303;stroke-width:4.19689989;stroke-linejoin:round"
inkscape:connector-curvature="0"
d="m 654.65,737.28 a 9.5805,9.5805 0 1 1 -19.161,0 9.5805,9.5805 0 1 1 19.161,0 z"
transform="matrix(0,0.071482,-0.071482,0,42.08,-44.072)"
id="path90" />
<g
style="stroke-width:0.30000001"
id="g92">
<path
style="stroke:#030303;stroke-width:4.19689989;stroke-linejoin:round"
inkscape:connector-curvature="0"
d="m 654.65,737.28 a 9.5805,9.5805 0 1 1 -19.161,0 9.5805,9.5805 0 1 1 19.161,0 z"
transform="matrix(0,0.071482,-0.071482,0,38.077,-44.072)"
id="path94" />
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 11 KiB

@@ -1,353 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
height="26"
width="26"
version="1.1"
viewBox="0 0 26 26"
id="svg3353"
inkscape:version="0.48.4 r9939"
sodipodi:docname="mirror_footprint_axisY.svg">
<metadata
id="metadata3451">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs3449" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1280"
inkscape:window-height="977"
id="namedview3447"
showgrid="true"
inkscape:zoom="28.827087"
inkscape:cx="12.909051"
inkscape:cy="10.157649"
inkscape:window-x="-4"
inkscape:window-y="-4"
inkscape:window-maximized="1"
inkscape:current-layer="svg3353">
<inkscape:grid
type="xygrid"
id="grid3501"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<g
transform="matrix(0,-1.2532577,0.77946185,0,13.569249,24.479187)"
id="g3355">
<rect
style="fill-opacity:0"
height="16"
width="16"
y="0"
x="0"
id="rect3357" />
</g>
<g
id="g3549"
transform="matrix(1.0639398,0,0,1,-0.8901316,0)">
<g
id="g3359"
transform="matrix(0,-1.0325751,0.76763326,0,14.415899,1.5004589)"
style="opacity:0.96483998;stroke:#000000;stroke-linejoin:round">
<rect
id="rect3361"
x="1.904"
y="3.4905"
width="9.7086"
height="14.619"
transform="matrix(0,1,-1,0,0,0)"
style="fill:#ffffff;stroke-width:0.40000001" />
<path
id="path3363"
transform="matrix(0,0.071482,-0.071482,0,41.168,-41.24)"
d="m 693.26,625.06 a 18.91409,18.91409 0 0 1 -37.828,0.11702"
inkscape:connector-curvature="0"
style="fill:none;stroke-width:5.59579992" />
</g>
<g
id="g3365"
transform="matrix(0,-1.0325751,0.76763326,0,14.300277,1.5391698)"
style="stroke:#030303;stroke-linejoin:round">
<rect
id="rect3367"
x="-0.31959"
y="13.332"
width="4.7175999"
height="2.5109999"
transform="matrix(0,1,-1,0,0,0)"
style="fill:#ff7800;stroke-width:0.30000001" />
<rect
id="rect3369"
x="-0.31959"
y="5.3635998"
width="4.7175999"
height="2.5109999"
transform="matrix(0,1,-1,0,0,0)"
style="fill:#ff7800;stroke-width:0.30000001" />
<path
id="path3371"
transform="matrix(0,0.071482,-0.071482,0,46.083,-44.072)"
d="m 654.65,737.28 a 9.5805,9.5805 0 1 1 -19.161,0 9.5805,9.5805 0 1 1 19.161,0 z"
inkscape:connector-curvature="0"
style="fill:#ffede0;stroke-width:4.19689989" />
<rect
id="rect3373"
x="-0.31959"
y="9.3478003"
width="4.7175999"
height="2.5109999"
transform="matrix(0,1,-1,0,0,0)"
style="fill:#ff7800;stroke-width:0.30000001" />
<path
id="path3375"
transform="matrix(0,0.071482,-0.071482,0,42.08,-44.072)"
d="m 654.65,737.28 a 9.5805,9.5805 0 1 1 -19.161,0 9.5805,9.5805 0 1 1 19.161,0 z"
inkscape:connector-curvature="0"
style="fill:#ffede0;stroke-width:4.19689989" />
<path
id="path3377"
transform="matrix(0,0.071482,-0.071482,0,38.077,-44.072)"
d="m 654.65,737.28 a 9.5805,9.5805 0 1 1 -19.161,0 9.5805,9.5805 0 1 1 19.161,0 z"
inkscape:connector-curvature="0"
style="fill:#ffede0;stroke-width:4.19689989" />
</g>
<g
id="g3379"
transform="matrix(0,-1.0325751,0.76763326,0,21.805042,1.5391698)">
<rect
id="rect3381"
x="-0.31959"
y="13.332"
width="4.7175999"
height="2.5109999"
transform="matrix(0,1,-1,0,0,0)"
style="fill:#ff7800;stroke:#030303;stroke-width:0.30000001;stroke-linejoin:round" />
<rect
id="rect3383"
x="-0.31959"
y="5.3635998"
width="4.7175999"
height="2.5109999"
transform="matrix(0,1,-1,0,0,0)"
style="fill:#ff7800;stroke:#030303;stroke-width:0.30000001;stroke-linejoin:round" />
<path
id="path3385"
transform="matrix(0,0.071482,-0.071482,0,46.083,-44.072)"
d="m 654.65,737.28 a 9.5805,9.5805 0 1 1 -19.161,0 9.5805,9.5805 0 1 1 19.161,0 z"
inkscape:connector-curvature="0"
style="fill:#ffede0;stroke:#030303;stroke-width:4.19689989;stroke-linejoin:round" />
<rect
id="rect3387"
x="-0.31959"
y="9.3478003"
width="4.7175999"
height="2.5109999"
transform="matrix(0,1,-1,0,0,0)"
style="fill:#ff7800;stroke:#030303;stroke-width:0.30000001;stroke-linejoin:round" />
<path
id="path3389"
transform="matrix(0,0.071482,-0.071482,0,42.08,-44.072)"
d="m 654.65,737.28 a 9.5805,9.5805 0 1 1 -19.161,0 9.5805,9.5805 0 1 1 19.161,0 z"
inkscape:connector-curvature="0"
style="fill:#ffede0;stroke:#030303;stroke-width:4.19689989;stroke-linejoin:round" />
<g
id="g3391"
style="stroke-width:0.30000001">
<path
id="path3393"
transform="matrix(0,0.071482,-0.071482,0,38.077,-44.072)"
d="m 654.65,737.28 a 9.5805,9.5805 0 1 1 -19.161,0 9.5805,9.5805 0 1 1 19.161,0 z"
inkscape:connector-curvature="0"
style="fill:#ffede0;stroke:#030303;stroke-width:4.19689989;stroke-linejoin:round" />
</g>
</g>
</g>
<g
transform="matrix(1.0275067,0,0,1.5324639,-52.51157,-62.82029)"
id="g3395">
<rect
transform="matrix(8.316e-8,-1,1,9.4237e-8,0,0)"
height="1"
width="2"
y="62.752998"
x="-48.952"
id="rect3397" />
<rect
transform="matrix(8.316e-8,-1,1,9.4237e-8,0,0)"
height="1"
width="2"
y="62.752998"
x="-51.952"
id="rect3399" />
<rect
transform="matrix(8.316e-8,-1,1,9.4237e-8,0,0)"
height="1"
width="2"
y="62.752998"
x="-54.952"
id="rect3401" />
<rect
y="43.952"
width="1"
x="62.752998"
height="2"
id="rect3403" />
<rect
y="40.952"
width="1"
x="62.752998"
height="2"
id="rect3405" />
<rect
y="55.952"
width="1"
x="62.752998"
height="2"
id="rect3407" />
</g>
<g
style="opacity:0.39452999"
transform="matrix(0,-1.0325751,0.74706642,0,0.50328559,1.5004589)"
id="g3409">
<g
style="stroke-linejoin:round"
id="g3411">
<rect
style="stroke:#000000;stroke-width:0.40000001"
transform="matrix(0,1,-1,0,0,0)"
height="14.619"
width="9.7086"
y="3.4905"
x="1.904"
id="rect3413" />
<path
style="stroke:#030303;stroke-width:5.59579992"
inkscape:connector-curvature="0"
d="m 693.26,625.06 a 18.91409,18.91409 0 0 1 -37.828,0.11702"
transform="matrix(0,0.071482,-0.071482,0,41.168,-41.24)"
id="path3415" />
</g>
<g
style="stroke:#030303;stroke-linejoin:round"
transform="translate(-0.0375,-0.15)"
id="g3417">
<rect
style="stroke-width:0.30000001"
transform="matrix(0,1,-1,0,0,0)"
height="2.5109999"
width="4.7175999"
y="13.332"
x="-0.31959"
id="rect3419" />
<rect
style="stroke-width:0.30000001"
transform="matrix(0,1,-1,0,0,0)"
height="2.5109999"
width="4.7175999"
y="5.3635998"
x="-0.31959"
id="rect3421" />
<path
style="stroke-width:4.19689989"
inkscape:connector-curvature="0"
d="m 654.65,737.28 a 9.5805,9.5805 0 1 1 -19.161,0 9.5805,9.5805 0 1 1 19.161,0 z"
transform="matrix(0,0.071482,-0.071482,0,46.083,-44.072)"
id="path3423" />
<rect
style="stroke-width:0.30000001"
transform="matrix(0,1,-1,0,0,0)"
height="2.5109999"
width="4.7175999"
y="9.3478003"
x="-0.31959"
id="rect3425" />
<path
style="stroke-width:4.19689989"
inkscape:connector-curvature="0"
d="m 654.65,737.28 a 9.5805,9.5805 0 1 1 -19.161,0 9.5805,9.5805 0 1 1 19.161,0 z"
transform="matrix(0,0.071482,-0.071482,0,42.08,-44.072)"
id="path3427" />
<path
style="stroke-width:4.19689989"
inkscape:connector-curvature="0"
d="m 654.65,737.28 a 9.5805,9.5805 0 1 1 -19.161,0 9.5805,9.5805 0 1 1 19.161,0 z"
transform="matrix(0,0.071482,-0.071482,0,38.077,-44.072)"
id="path3429" />
</g>
<g
transform="translate(-0.0375,9.6261)"
id="g3431">
<rect
style="stroke:#030303;stroke-width:0.30000001;stroke-linejoin:round"
transform="matrix(0,1,-1,0,0,0)"
height="2.5109999"
width="4.7175999"
y="13.332"
x="-0.31959"
id="rect3433" />
<rect
style="stroke:#030303;stroke-width:0.30000001;stroke-linejoin:round"
transform="matrix(0,1,-1,0,0,0)"
height="2.5109999"
width="4.7175999"
y="5.3635998"
x="-0.31959"
id="rect3435" />
<path
style="stroke:#030303;stroke-width:4.19689989;stroke-linejoin:round"
inkscape:connector-curvature="0"
d="m 654.65,737.28 a 9.5805,9.5805 0 1 1 -19.161,0 9.5805,9.5805 0 1 1 19.161,0 z"
transform="matrix(0,0.071482,-0.071482,0,46.083,-44.072)"
id="path3437" />
<rect
style="stroke:#030303;stroke-width:0.30000001;stroke-linejoin:round"
transform="matrix(0,1,-1,0,0,0)"
height="2.5109999"
width="4.7175999"
y="9.3478003"
x="-0.31959"
id="rect3439" />
<path
style="stroke:#030303;stroke-width:4.19689989;stroke-linejoin:round"
inkscape:connector-curvature="0"
d="m 654.65,737.28 a 9.5805,9.5805 0 1 1 -19.161,0 9.5805,9.5805 0 1 1 19.161,0 z"
transform="matrix(0,0.071482,-0.071482,0,42.08,-44.072)"
id="path3441" />
<g
style="stroke-width:0.30000001"
id="g3443">
<path
style="stroke:#030303;stroke-width:4.19689989;stroke-linejoin:round"
inkscape:connector-curvature="0"
d="m 654.65,737.28 a 9.5805,9.5805 0 1 1 -19.161,0 9.5805,9.5805 0 1 1 19.161,0 z"
transform="matrix(0,0.071482,-0.071482,0,38.077,-44.072)"
id="path3445" />
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 11 KiB

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

+11 -66
View File
@@ -29,7 +29,7 @@ add_custom_target(
set( GAL_SRCS
# Common part
draw_panel_gal.cpp
drawpanel_gal.cpp
painter.cpp
worksheet_viewitem.cpp
gal/graphics_abstraction_layer.cpp
@@ -66,48 +66,6 @@ if( WIN32 AND MSYS )
add_definitions( -DGLEW_STATIC )
endif()
# A shared library subsetted from common which restricts what can go into
# a single_top link image. By not linking to common, we control what does
# statically go into single_top link images. My current thinking is that only
# wxWidgets should be a shared link from single top, everything else should be
# statically bound into it. Otherwise you will have DSO loading problems. After it
# sets the LIB PATHS however, we want the *.kiface modules to use shared linking.
add_library( singletop STATIC EXCLUDE_FROM_ALL
confirm.cpp
eda_doc.cpp
kiway.cpp
kiway_holder.cpp
)
# A shared library used by multiple *.kiface files and one or two program
# launchers. Object files can migrate into here over time, but only if they are
# surely needed and certainly used from more than one place without recompilation.
# Functions and data all need to use the #include <import_export.h> and be declared
# as APIEXPORT
set( LIB_KICAD_SRCS
colors.cpp
dlist.cpp
string.cpp
)
if( future )
add_library( lib_kicad SHARED
)
target_link_libraries( lib_kicad
${wxWidgets_LIBRARIES}
)
set_target_properties( lib_kicad PROPERTIES
OUTPUT_NAME ki
)
install( TARGETS lib_kicad
DESTINATION ${KICAD_BIN}
COMPONENT binary
)
endif()
set( COMMON_ABOUT_DLG_SRCS
dialog_about/AboutDialog_main.cpp
dialog_about/dialog_about.cpp
@@ -135,13 +93,11 @@ set( COMMON_PAGE_LAYOUT_SRCS
)
set( COMMON_SRCS
${LIB_KICAD_SRCS}
${COMMON_ABOUT_DLG_SRCS}
${COMMON_PAGE_LAYOUT_SRCS}
base_struct.cpp
basicframe.cpp
bezier_curves.cpp
bin_mod.cpp
bitmap.cpp
block_commande.cpp
build_version.cpp
@@ -151,7 +107,6 @@ set( COMMON_SRCS
class_marker_base.cpp
class_plotter.cpp
class_undoredo_container.cpp
colors.cpp
common.cpp
common_plot_functions.cpp
common_plotHPGL_functions.cpp
@@ -160,20 +115,18 @@ set( COMMON_SRCS
common_plotGERBER_functions.cpp
common_plotDXF_functions.cpp
common_plotSVG_functions.cpp
config_params.cpp
confirm.cpp
copy_to_clipboard.cpp
convert_basic_shapes_to_polygon.cpp
dialog_shim.cpp
displlst.cpp
draw_frame.cpp
draw_panel.cpp
dlist.cpp
drawframe.cpp
drawpanel.cpp
drawtxt.cpp
dsnlexer.cpp
eda_dde.cpp
eda_doc.cpp
filter_reader.cpp
# findkicadhelppath.cpp.notused deprecated, use searchhelpfilefullpath.cpp
gestfich.cpp
getrunningmicrosecs.cpp
grid_tricks.cpp
@@ -181,38 +134,28 @@ set( COMMON_SRCS
hotkeys_basic.cpp
hotkey_grid_table.cpp
html_messagebox.cpp
kiface_i.cpp
kiway.cpp
kiway_express.cpp
kiway_holder.cpp
kiway_player.cpp
msgpanel.cpp
netlist_keywords.cpp
newstroke_font.cpp
prependpath.cpp
project.cpp
projet_config.cpp
ptree.cpp
reporter.cpp
richio.cpp
searchhelpfilefullpath.cpp
search_stack.cpp
selcolor.cpp
systemdirsappend.cpp
string.cpp
trigo.cpp
utf8.cpp
wildcards_and_files_ext.cpp
worksheet.cpp
wxwineda.cpp
wxunittext.cpp
xnode.cpp
zoom.cpp
)
# We will not want edaappl.cpp linked into the KIFACE, only into the KIWAY.
if( TRUE OR NOT USE_KIWAY_DLLS )
#if( NOT USE_KIWAY_DLLS )
# We DO NOT want pgm_base.cpp linked into the KIFACE, only into the KIWAY.
# Check the map files to verify eda_pgm.o not being linked in.
list( APPEND COMMON_SRCS pgm_base.cpp )
list( APPEND COMMON_SRCS edaappl.cpp )
endif()
if( NOT HAVE_STRTOKR )
@@ -241,14 +184,16 @@ set( COMMON_SRCS
geometry/shape_collisions.cpp
geometry/shape_index.cpp
)
add_library( common STATIC ${COMMON_SRCS} )
add_dependencies( common lib-dependencies )
set( PCB_COMMON_SRCS
base_screen.cpp
eda_text.cpp
class_page_info.cpp
convert_basic_shapes_to_polygon.cpp
pcbcommon.cpp
footprint_info.cpp
../pcbnew/basepcbframe.cpp
+7
View File
@@ -175,6 +175,13 @@ void BASE_SCREEN::SetGridList( GRIDS& gridlist )
}
void BASE_SCREEN::GetGrids( GRIDS& aList )
{
for( size_t i = 0; i < m_grids.size(); i++ )
aList.push_back( m_grids[ i ] );
}
int BASE_SCREEN::SetGrid( const wxRealPoint& size )
{
wxASSERT( !m_grids.empty() );
+7 -7
View File
@@ -197,7 +197,7 @@ void StripTrailingZeros( wxString& aStringValue, unsigned aTrailingZeroAllowed )
* otherwise the actual value is rounded when read from dialog and converted
* in internal units, and therefore modified.
*/
wxString StringFromValue( EDA_UNITS_T aUnit, int aValue, bool aAddUnitSymbol )
wxString ReturnStringFromValue( EDA_UNITS_T aUnit, int aValue, bool aAddUnitSymbol )
{
double value_to_print = To_User_Unit( aUnit, aValue );
@@ -257,7 +257,7 @@ wxString StringFromValue( EDA_UNITS_T aUnit, int aValue, bool aAddUnitSymbol )
void PutValueInLocalUnits( wxTextCtrl& aTextCtr, int aValue )
{
wxString msg = StringFromValue( g_UserUnit, aValue );
wxString msg = ReturnStringFromValue( g_UserUnit, aValue );
aTextCtr.SetValue( msg );
}
@@ -286,7 +286,7 @@ double From_User_Unit( EDA_UNITS_T aUnit, double aValue )
}
int ValueFromString( EDA_UNITS_T aUnits, const wxString& aTextValue )
int ReturnValueFromString( EDA_UNITS_T aUnits, const wxString& aTextValue )
{
double value;
double dtmp = 0;
@@ -348,21 +348,21 @@ int ValueFromString( EDA_UNITS_T aUnits, const wxString& aTextValue )
}
int ValueFromString( const wxString& aTextValue )
int ReturnValueFromString( const wxString& aTextValue )
{
int value;
value = ValueFromString( g_UserUnit, aTextValue);
value = ReturnValueFromString( g_UserUnit, aTextValue);
return value;
}
int ValueFromTextCtrl( const wxTextCtrl& aTextCtr )
int ReturnValueFromTextCtrl( const wxTextCtrl& aTextCtr )
{
int value;
wxString msg = aTextCtr.GetValue();
value = ValueFromString( g_UserUnit, msg );
value = ReturnValueFromString( g_UserUnit, msg );
return value;
}
+156 -134
View File
@@ -36,8 +36,7 @@
#include <build_version.h>
#include <fctsys.h>
#include <pgm_base.h>
#include <kiface_i.h>
#include <appl_wxstruct.h>
#include <online_help.h>
#include <id.h>
#include <eda_doc.h>
@@ -46,7 +45,7 @@
#include <menus_helpers.h>
#include <boost/version.hpp>
#include <typeinfo>
/// The default auto save interval is 10 minutes.
#define DEFAULT_AUTO_SAVE_INTERVAL 600
@@ -62,9 +61,11 @@ static const wxChar entryPerspective[] = wxT( "Perspective" );
EDA_BASE_FRAME::EDA_BASE_FRAME( wxWindow* aParent, FRAME_T aFrameType,
const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize,
long aStyle, const wxString& aFrameName ) :
EDA_BASE_FRAME::EDA_BASE_FRAME( wxWindow* aParent,
ID_DRAWFRAME_TYPE aFrameType,
const wxString& aTitle,
const wxPoint& aPos, const wxSize& aSize,
long aStyle, const wxString & aFrameName ) :
wxFrame( aParent, wxID_ANY, aTitle, aPos, aSize, aStyle, aFrameName )
{
wxSize minsize;
@@ -107,10 +108,7 @@ EDA_BASE_FRAME::EDA_BASE_FRAME( wxWindow* aParent, FRAME_T aFrameType,
void EDA_BASE_FRAME::windowClosing( wxCloseEvent& event )
{
wxConfigBase* cfg = config();
if( cfg )
SaveSettings( cfg ); // virtual, wxFrame specific
SaveSettings(); // virtual, wxFrame specific
event.Skip(); // we did not "handle" the event, only eavesdropped on it.
}
@@ -118,6 +116,9 @@ void EDA_BASE_FRAME::windowClosing( wxCloseEvent& event )
EDA_BASE_FRAME::~EDA_BASE_FRAME()
{
if( wxGetApp().GetHtmlHelpController() )
wxGetApp().SetHtmlHelpController( NULL );
delete m_autoSaveTimer;
// This is needed for OSX: avoids further OnDraw processing after this
@@ -151,19 +152,6 @@ bool EDA_BASE_FRAME::ProcessEvent( wxEvent& aEvent )
}
bool EDA_BASE_FRAME::Enable( bool enable )
{
// so we can do logging of this state change:
#if defined(DEBUG)
const char* type_id = typeid( *this ).name();
printf( "wxFrame %-28s: %s\n", type_id, enable ? "enabled" : "disabled" );
#endif
return wxFrame::Enable( enable );
}
void EDA_BASE_FRAME::onAutoSaveTimer( wxTimerEvent& aEvent )
{
if( !doAutoSave() )
@@ -182,45 +170,58 @@ void EDA_BASE_FRAME::ReCreateMenuBar()
}
void EDA_BASE_FRAME::ShowChangedLanguage()
void EDA_BASE_FRAME::SetLanguage( wxCommandEvent& event )
{
int id = event.GetId();
wxGetApp().SetLanguageIdentifier( id );
wxGetApp().SetLanguage();
ReCreateMenuBar();
GetMenuBar()->Refresh();
}
void EDA_BASE_FRAME::LoadSettings( wxConfigBase* aCfg )
void EDA_BASE_FRAME::LoadSettings()
{
wxString text;
int Ypos_min;
wxConfig* config;
config = wxGetApp().GetSettings();
int maximized = 0;
wxString text = m_FrameName + wxT( "Pos_x" );
aCfg->Read( text, &m_FramePos.x );
text = m_FrameName + wxT( "Pos_y" );
aCfg->Read( text, &m_FramePos.y );
text = m_FrameName + wxT( "Size_x" );
aCfg->Read( text, &m_FrameSize.x, 600 );
text = m_FrameName + wxT( "Size_y" );
aCfg->Read( text, &m_FrameSize.y, 400 );
text = m_FrameName + wxT( "Maximized" );
aCfg->Read( text, &maximized, 0 );
if( m_hasAutoSave )
if( config )
{
text = m_FrameName + entryAutoSaveInterval;
aCfg->Read( text, &m_autoSaveInterval, DEFAULT_AUTO_SAVE_INTERVAL );
text = m_FrameName + wxT( "Pos_x" );
config->Read( text, &m_FramePos.x );
text = m_FrameName + wxT( "Pos_y" );
config->Read( text, &m_FramePos.y );
text = m_FrameName + wxT( "Size_x" );
config->Read( text, &m_FrameSize.x, 600 );
text = m_FrameName + wxT( "Size_y" );
config->Read( text, &m_FrameSize.y, 400 );
text = m_FrameName + wxT( "Maximized" );
config->Read( text, &maximized, 0 );
if( m_hasAutoSave )
{
text = m_FrameName + entryAutoSaveInterval;
config->Read( text, &m_autoSaveInterval, DEFAULT_AUTO_SAVE_INTERVAL );
}
}
// Ensure Window title bar is visible
#if defined( __WXMAC__ )
// for macOSX, the window must be below system (macOSX) toolbar
// Ypos_min = GetMBarHeight(); seems no more exist in new API (subject to change)
int Ypos_min = 20;
// Ypos_min = GetMBarHeight(); seems no more exist in new API (subject to change)
Ypos_min = 20;
#else
int Ypos_min = 0;
Ypos_min = 0;
#endif
if( m_FramePos.y < Ypos_min )
m_FramePos.y = Ypos_min;
@@ -228,39 +229,44 @@ void EDA_BASE_FRAME::LoadSettings( wxConfigBase* aCfg )
if( maximized )
Maximize();
aCfg->Read( m_FrameName + entryPerspective, &m_perspective );
// Once this is fully implemented, wxAuiManager will be used to maintain the persistance of
// the main frame and all it's managed windows and all of the legacy frame persistence
// position code can be removed.
if( config )
config->Read( m_FrameName + entryPerspective, &m_perspective );
}
void EDA_BASE_FRAME::SaveSettings( wxConfigBase* aCfg )
void EDA_BASE_FRAME::SaveSettings()
{
wxString text;
wxString text;
wxConfig* config = wxGetApp().GetSettings();
if( IsIconized() )
if( !config || IsIconized() )
return;
m_FrameSize = GetSize();
m_FramePos = GetPosition();
text = m_FrameName + wxT( "Pos_x" );
aCfg->Write( text, (long) m_FramePos.x );
config->Write( text, (long) m_FramePos.x );
text = m_FrameName + wxT( "Pos_y" );
aCfg->Write( text, (long) m_FramePos.y );
config->Write( text, (long) m_FramePos.y );
text = m_FrameName + wxT( "Size_x" );
aCfg->Write( text, (long) m_FrameSize.x );
config->Write( text, (long) m_FrameSize.x );
text = m_FrameName + wxT( "Size_y" );
aCfg->Write( text, (long) m_FrameSize.y );
config->Write( text, (long) m_FrameSize.y );
text = m_FrameName + wxT( "Maximized" );
aCfg->Write( text, IsMaximized() );
config->Write( text, IsMaximized() );
if( m_hasAutoSave )
{
text = m_FrameName + entryAutoSaveInterval;
aCfg->Write( text, m_autoSaveInterval );
config->Write( text, m_autoSaveInterval );
}
// Once this is fully implemented, wxAuiManager will be used to maintain
@@ -270,28 +276,8 @@ void EDA_BASE_FRAME::SaveSettings( wxConfigBase* aCfg )
// printf( "perspective(%s): %s\n",
// TO_UTF8( m_FrameName + entryPerspective ), TO_UTF8( perspective ) );
aCfg->Write( m_FrameName + entryPerspective, perspective );
}
wxConfigBase* EDA_BASE_FRAME::config()
{
// KICAD_MANAGER_FRAME overrides this
wxConfigBase* ret = Kiface().KifaceSettings();
//wxASSERT( ret );
return ret;
}
const SEARCH_STACK& EDA_BASE_FRAME::sys_search()
{
return Kiface().KifaceSearch();
}
wxString EDA_BASE_FRAME::help_name()
{
return Kiface().GetHelpFileName();
config->Write( m_FrameName + entryPerspective, perspective );
}
@@ -302,12 +288,12 @@ void EDA_BASE_FRAME::PrintMsg( const wxString& text )
void EDA_BASE_FRAME::UpdateFileHistory( const wxString& FullFileName,
wxFileHistory* aFileHistory )
wxFileHistory * aFileHistory )
{
wxFileHistory* fileHistory = aFileHistory;
if( !fileHistory )
fileHistory = &Kiface().GetFileHistory();
if( fileHistory == NULL )
fileHistory = & wxGetApp().GetFileHistory();
fileHistory->AddFileToHistory( FullFileName );
}
@@ -316,63 +302,65 @@ void EDA_BASE_FRAME::UpdateFileHistory( const wxString& FullFileName,
wxString EDA_BASE_FRAME::GetFileFromHistory( int cmdId, const wxString& type,
wxFileHistory* aFileHistory )
{
wxString fn, msg;
size_t i;
wxFileHistory* fileHistory = aFileHistory;
if( !fileHistory )
fileHistory = &Kiface().GetFileHistory();
if( fileHistory == NULL )
fileHistory = & wxGetApp().GetFileHistory();
int baseId = fileHistory->GetBaseId();
wxASSERT( cmdId >= baseId && cmdId < baseId + (int) fileHistory->GetCount() );
wxASSERT( cmdId >= baseId && cmdId < baseId + ( int )fileHistory->GetCount() );
unsigned i = cmdId - baseId;
i = ( size_t )( cmdId - baseId );
if( i < fileHistory->GetCount() )
{
wxString fn = fileHistory->GetHistoryFile( i );
fn = fileHistory->GetHistoryFile( i );
if( wxFileName::FileExists( fn ) )
return fn;
else
if( !wxFileName::FileExists( fn ) )
{
wxString msg = wxString::Format(
wxT( "file '%s' was not found." ),
GetChars( fn ) );
msg.Printf( wxT( "file <%s> was not found." ), GetChars( fn ) );
wxMessageBox( msg );
fileHistory->RemoveFileFromHistory( i );
fn = wxEmptyString;
}
}
return wxEmptyString;
return fn;
}
void EDA_BASE_FRAME::GetKicadHelp( wxCommandEvent& event )
{
const SEARCH_STACK& search = sys_search();
wxString msg;
/* We have to get document for beginners,
* or the full specific doc
* or the the full specific doc
* if event id is wxID_INDEX, we want the document for beginners.
* else the specific doc file (its name is in Kiface().GetHelpFileName())
* else the specific doc file (its name is in wxGetApp().GetHelpFileName())
* The document for beginners is the same for all KiCad utilities
*/
if( event.GetId() == wxID_INDEX )
{
// Temporary change the help filename
wxString tmp = wxGetApp().GetHelpFileName();
// Search for "getting_started_in_kicad.pdf" or "Getting_Started_in_KiCad.pdf"
wxString helpFile = SearchHelpFileFullPath( search, wxT( "getting_started_in_kicad.pdf" ) );
wxGetApp().SetHelpFileName( wxT( "getting_started_in_kicad.pdf" ) );
wxString helpFile = wxGetApp().GetHelpFile();
if( !helpFile )
helpFile = SearchHelpFileFullPath( search, wxT( "Getting_Started_in_KiCad.pdf" ) );
{ // Try to find "Getting_Started_in_KiCad.pdf"
wxGetApp().SetHelpFileName( wxT( "Getting_Started_in_KiCad.pdf" ) );
helpFile = wxGetApp().GetHelpFile();
}
if( !helpFile )
{
wxString msg = wxString::Format( _(
"Help file '%s' could not be found." ),
wxT( "getting_started_in_kicad.pdf" )
);
msg.Printf( _( "Help file %s could not be found." ),
GetChars( wxGetApp().GetHelpFileName() ) );
wxMessageBox( msg );
}
else
@@ -380,36 +368,36 @@ void EDA_BASE_FRAME::GetKicadHelp( wxCommandEvent& event )
GetAssociatedDocument( this, helpFile );
}
wxGetApp().SetHelpFileName( tmp );
return;
}
wxString base_name = help_name();
#if defined ONLINE_HELP_FILES_FORMAT_IS_HTML
wxHtmlHelpController* hc = Pgm().GetHtmlHelpController();
wxString helpFile = SearchHelpFileFullPath( search, );
if( !!helpFile )
if( wxGetApp().GetHtmlHelpController() == NULL )
{
hc->UseConfig( Pgm().CommonSettings() );
hc->SetTitleFormat( wxT( "KiCad Help" ) );
hc->AddBook( helpFile );
wxGetApp().InitOnLineHelp();
}
hc->DisplayContents();
hc->Display( helpFile );
if( wxGetApp().GetHtmlHelpController() )
{
wxGetApp().GetHtmlHelpController()->DisplayContents();
wxGetApp().GetHtmlHelpController()->Display( wxGetApp().GetHelpFileName() );
}
else
{
msg.Printf( _( "Help file %s could not be found." ), GetChars( wxGetApp().GetHelpFileName() ) );
wxMessageBox( msg );
}
#elif defined ONLINE_HELP_FILES_FORMAT_IS_PDF
wxString helpFile = SearchHelpFileFullPath( search, base_name );
wxString helpFile = wxGetApp().GetHelpFile();
if( !helpFile )
{
wxString msg = wxString::Format( _(
"Help file '%s' could not be found." ),
GetChars( base_name )
);
msg.Printf( _( "Help file %s could not be found." ),
GetChars( wxGetApp().GetHelpFileName() ) );
wxMessageBox( msg );
}
else
@@ -425,8 +413,8 @@ void EDA_BASE_FRAME::GetKicadHelp( wxCommandEvent& event )
void EDA_BASE_FRAME::OnSelectPreferredEditor( wxCommandEvent& event )
{
wxFileName fn = Pgm().GetEditorName();
wxString wildcard( wxT( "*" ) );
wxFileName fn = wxGetApp().GetEditorName();
wxString wildcard( wxT( "*" ) );
#ifdef __WINDOWS__
wildcard += wxT( ".exe" );
@@ -442,16 +430,18 @@ void EDA_BASE_FRAME::OnSelectPreferredEditor( wxCommandEvent& event )
if( dlg.ShowModal() == wxID_CANCEL )
return;
wxString editor = dlg.GetPath();
wxASSERT( wxGetApp().GetCommonSettings() );
Pgm().SetEditorName( editor );
wxConfig* cfg = wxGetApp().GetCommonSettings();
wxGetApp().SetEditorName( dlg.GetPath() );
cfg->Write( wxT( "Editor" ), wxGetApp().GetEditorName() );
}
void EDA_BASE_FRAME::GetKicadAbout( wxCommandEvent& event )
{
bool ShowAboutDialog(wxWindow * parent);
ShowAboutDialog( this );
ShowAboutDialog(this);
}
@@ -545,7 +535,7 @@ void EDA_BASE_FRAME::CopyVersionInfoToClipboard( wxCommandEvent& event )
wxString tmp;
wxPlatformInfo info;
tmp = wxT( "Application: " ) + Pgm().App().GetAppName() + wxT( "\n" );
tmp = wxT( "Application: " ) + wxGetApp().GetTitle() + wxT( "\n" );
tmp << wxT( "Version: " ) << GetBuildVersion()
#ifdef DEBUG
<< wxT( " Debug" )
@@ -676,14 +666,14 @@ void EDA_BASE_FRAME::CheckForAutoSaveFile( const wxFileName& aFileName,
if( !autoSaveFileName.FileExists() )
return;
wxString msg = wxString::Format( _(
"Well this is potentially embarrassing! It appears that the last time "
"you were editing the file '%s' it was not saved properly. Do you wish to restore the last "
"edits you made?" ),
GetChars( aFileName.GetFullName() )
);
wxString msg;
int response = wxMessageBox( msg, Pgm().App().GetAppName(), wxYES_NO | wxICON_QUESTION, this );
msg.Printf( _( "Well this is potentially embarrassing! It appears that the last time \
you were editing the file <%s> it was not saved properly. Do you wish to restore the last \
edits you made?" ),
GetChars( aFileName.GetFullName() ) );
int response = wxMessageBox( msg, wxGetApp().GetAppName(), wxYES_NO | wxICON_QUESTION, this );
// Make a backup of the current file, delete the file, and rename the auto save file to
// the file name.
@@ -713,7 +703,7 @@ void EDA_BASE_FRAME::CheckForAutoSaveFile( const wxFileName& aFileName,
if( !wxRenameFile( autoSaveFileName.GetFullPath(), aFileName.GetFullPath() ) )
{
wxMessageBox( _( "The auto save file could not be renamed to the board file name." ),
Pgm().App().GetAppName(), wxOK | wxICON_EXCLAMATION, this );
wxGetApp().GetAppName(), wxOK | wxICON_EXCLAMATION, this );
}
}
else
@@ -726,3 +716,35 @@ void EDA_BASE_FRAME::CheckForAutoSaveFile( const wxFileName& aFileName,
}
}
/**
* Function SetModalMode
* Disable or enable all other windows, to emulate a dialog behavior
* Useful when the frame is used to show and selec items
* (see FOOTPRINT_VIEWER_FRAME and LIB_VIEW_FRAME)
*
* @param aModal = true to disable all other opened windows (i.e.
* this windows is in dialog mode
* = false to enable other windows
* This function is analog to MakeModal( aModal ), deprecated since wxWidgets 2.9.4
*/
void EDA_BASE_FRAME::SetModalMode( bool aModal )
{
// Disable all other windows
#if wxCHECK_VERSION(2, 9, 4)
if ( IsTopLevel() )
{
wxWindowList::compatibility_iterator node = wxTopLevelWindows.GetFirst();
while (node)
{
wxWindow *win = node->GetData();
if (win != this)
win->Enable(!aModal);
node = node->GetNext();
}
}
#else
// Deprecated since wxWidgets 2.9.4
MakeModal( aModal );
#endif
}
-52
View File
@@ -1,52 +0,0 @@
#include <wx/config.h>
#include <bin_mod.h>
#include <online_help.h>
BIN_MOD::BIN_MOD( const char* aName ) :
m_name( aName ),
m_config( 0 )
{
}
void BIN_MOD::Init()
{
// do an OS specific wxConfig instantiation, using the bin_mod (EXE/DLL/DSO) name.
m_config = new wxConfig( wxString::FromUTF8( m_name ) );
m_history.Load( *m_config );
// Prepare On Line Help. Use only lower case for help file names, in order to
// avoid problems with upper/lower case file names under windows and unix.
#if defined ONLINE_HELP_FILES_FORMAT_IS_HTML
m_help_file = wxString::FromUTF8( m_name ) + wxT( ".html" );
#elif defined ONLINE_HELP_FILES_FORMAT_IS_PDF
m_help_file = wxString::FromUTF8( m_name ) + wxT( ".pdf" );
#else
#error Help files format not defined
#endif
}
void BIN_MOD::End()
{
if( m_config )
{
m_history.Save( *m_config );
// Deleting a wxConfigBase writes its contents to disk if changed.
// Might be NULL if called twice, in which case nothing happens.
delete m_config;
m_config = 0;
}
}
BIN_MOD::~BIN_MOD()
{
End();
}
+1 -1
View File
@@ -29,7 +29,7 @@
#include <fctsys.h>
#include <gr_basic.h>
#include <draw_frame.h>
#include <wxstruct.h>
#include <common.h>
#include <macros.h>
#include <base_struct.h>
+2 -3
View File
@@ -100,13 +100,12 @@ void COLORS_DESIGN_SETTINGS::SetLayerColor( LAYER_NUM aLayer, EDA_COLOR_T aColor
* @return the color for an item which is one of the item indices given
* in pcbstruct.h, enum PCB_VISIBLE or in schematic
*/
EDA_COLOR_T COLORS_DESIGN_SETTINGS::GetItemColor( int aItemIdx ) const
EDA_COLOR_T COLORS_DESIGN_SETTINGS::GetItemColor( int aItemIdx )
{
if( (unsigned) aItemIdx < DIM( m_ItemsColors ) )
if( (unsigned) aItemIdx < DIM(m_ItemsColors) )
{
return m_ItemsColors[aItemIdx];
}
return UNSPECIFIED_COLOR;
}
+6 -5
View File
@@ -19,8 +19,8 @@
// Default marquer shape:
const int M_SHAPE_SCALE = 6; // default scaling factor for MarkerShapeCorners coordinates
const unsigned CORNERS_COUNT = 8;
#define M_SHAPE_SCALE 6 // default scaling factor for MarkerShapeCorners coordinates
#define CORNERS_COUNT 8
/* corners of the default shape
* actual coordinates are these values * .m_ScalingFactor
*/
@@ -46,10 +46,10 @@ void MARKER_BASE::init()
m_Color = RED;
wxPoint start = MarkerShapeCorners[0];
wxPoint end = MarkerShapeCorners[0];
for( unsigned ii = 0; ii < CORNERS_COUNT; ii++ )
{
wxPoint corner = MarkerShapeCorners[ii];
m_Corners.push_back( corner );
start.x = std::min( start.x, corner.x);
start.y = std::min( start.y, corner.y);
end.x = std::max( end.x, corner.x);
@@ -64,6 +64,7 @@ void MARKER_BASE::init()
MARKER_BASE::MARKER_BASE( const MARKER_BASE& aMarker )
{
m_Pos = aMarker.m_Pos;
m_Corners = aMarker.m_Corners;
m_MarkerType = aMarker.m_MarkerType;
m_Color = aMarker.m_Color;
m_ShapeBoundingBox = aMarker.m_ShapeBoundingBox;
@@ -153,9 +154,9 @@ void MARKER_BASE::DrawMarker( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDr
GRSetDrawMode( aDC, aDrawMode );
for( unsigned ii = 0; ii < CORNERS_COUNT; ii++ )
for( unsigned ii = 0; ii < m_Corners.size(); ii++ )
{
corners[ii] = MarkerShapeCorners[ii];
corners[ii] = m_Corners[ii];
corners[ii].x *= m_ScalingFactor;
corners[ii].y *= m_ScalingFactor;
corners[ii] += m_Pos + aOffset;
+15 -16
View File
@@ -38,22 +38,21 @@
// Standard paper sizes nicknames.
const wxChar PAGE_INFO::A4[] = wxT( "A4" );
const wxChar PAGE_INFO::A3[] = wxT( "A3" );
const wxChar PAGE_INFO::A2[] = wxT( "A2" );
const wxChar PAGE_INFO::A1[] = wxT( "A1" );
const wxChar PAGE_INFO::A0[] = wxT( "A0" );
const wxChar PAGE_INFO::A[] = wxT( "A" );
const wxChar PAGE_INFO::B[] = wxT( "B" ) ;
const wxChar PAGE_INFO::C[] = wxT( "C" );
const wxChar PAGE_INFO::D[] = wxT( "D" );
const wxChar PAGE_INFO::E[] = wxT( "E" );
const wxChar PAGE_INFO::GERBER[] = wxT( "GERBER" );
const wxChar PAGE_INFO::USLetter[] = wxT( "USLetter" );
const wxChar PAGE_INFO::USLegal[] = wxT( "USLegal" );
const wxChar PAGE_INFO::USLedger[] = wxT( "USLedger" );
const wxChar PAGE_INFO::Custom[] = wxT( "User" );
const wxString PAGE_INFO::A4( wxT( "A4" ) );
const wxString PAGE_INFO::A3( wxT( "A3" ) );
const wxString PAGE_INFO::A2( wxT( "A2" ) );
const wxString PAGE_INFO::A1( wxT( "A1" ) );
const wxString PAGE_INFO::A0( wxT( "A0" ) );
const wxString PAGE_INFO::A( wxT( "A" ) );
const wxString PAGE_INFO::B( wxT( "B" ) );
const wxString PAGE_INFO::C( wxT( "C" ) );
const wxString PAGE_INFO::D( wxT( "D" ) );
const wxString PAGE_INFO::E( wxT( "E" ) );
const wxString PAGE_INFO::GERBER( wxT( "GERBER" ) );
const wxString PAGE_INFO::USLetter( wxT( "USLetter" ) );
const wxString PAGE_INFO::USLegal( wxT( "USLegal" ) );
const wxString PAGE_INFO::USLedger( wxT( "USLedger" ) );
const wxString PAGE_INFO::Custom( wxT( "User" ) );
// Standard page sizes in mils, all constants
-157
View File
@@ -1,157 +0,0 @@
#include <colors.h>
/**
* The predefined colors used in KiCad.
* Please: if you change a value, remember these values are carefully chosen
* to have good results in Pcbnew, that uses the ORed value of basic colors
* when displaying superimposed objects
* This list must have exactly NBCOLORS items
*/
const StructColors g_ColorRefs[NBCOLORS] =
{
{ 0, 0, 0, BLACK, wxT( "Black" ), DARKDARKGRAY },
{ 72, 72, 72, DARKDARKGRAY, wxT( "Gray 1" ), DARKGRAY },
{ 132, 132, 132, DARKGRAY, wxT( "Gray 2" ), LIGHTGRAY },
{ 194, 194, 194, LIGHTGRAY, wxT( "Gray 3" ), WHITE },
{ 255, 255, 255, WHITE, wxT( "White" ), WHITE },
{ 194, 255, 255, LIGHTYELLOW, wxT( "L.Yellow" ), WHITE },
{ 72, 0, 0, DARKBLUE, wxT( "Blue 1" ), BLUE },
{ 0, 72, 0, DARKGREEN, wxT( "Green 1" ), GREEN },
{ 72, 72, 0, DARKCYAN, wxT( "Cyan 1" ), CYAN },
{ 0, 0, 72, DARKRED, wxT( "Red 1" ), RED },
{ 72, 0, 72, DARKMAGENTA, wxT( "Magenta 1" ), MAGENTA },
{ 0, 72, 72, DARKBROWN, wxT( "Brown 1" ), BROWN },
{ 132, 0, 0, BLUE, wxT( "Blue 2" ), LIGHTBLUE },
{ 0, 132, 0, GREEN, wxT( "Green 2" ), LIGHTGREEN },
{ 132, 132, 0, CYAN, wxT( "Cyan 2" ), LIGHTCYAN },
{ 0, 0, 132, RED, wxT( "Red 2" ), LIGHTRED },
{ 132, 0, 132, MAGENTA, wxT( "Magenta 2" ), LIGHTMAGENTA },
{ 0, 132, 132, BROWN, wxT( "Brown 2" ), YELLOW },
{ 194, 0, 0, LIGHTBLUE, wxT( "Blue 3" ), PUREBLUE, },
{ 0, 194, 0, LIGHTGREEN, wxT( "Green 3" ), PUREGREEN },
{ 194, 194, 0, LIGHTCYAN, wxT( "Cyan 3" ), PURECYAN },
{ 0, 0, 194, LIGHTRED, wxT( "Red 3" ), PURERED },
{ 194, 0, 194, LIGHTMAGENTA, wxT( "Magenta 3" ), PUREMAGENTA },
{ 0, 194, 194, YELLOW, wxT( "Yellow 3" ), PUREYELLOW },
{ 255, 0, 0, PUREBLUE, wxT( "Blue 4" ), WHITE },
{ 0, 255, 0, PUREGREEN, wxT( "Green 4" ), WHITE },
{ 255, 255, 0, PURECYAN, wxT( "Cyan 4" ), WHITE },
{ 0, 0, 255, PURERED, wxT( "Red 4" ), WHITE },
{ 255, 0, 255, PUREMAGENTA, wxT( "Magenta 4" ), WHITE },
{ 0, 255, 255, PUREYELLOW, wxT( "Yellow 4" ), WHITE },
};
EDA_COLOR_T ColorByName( const wxString& aName )
{
// look for a match in the palette itself
for( EDA_COLOR_T trying = BLACK; trying < NBCOLORS; trying = NextColor(trying) )
{
if( 0 == aName.CmpNoCase( g_ColorRefs[trying].m_Name ) )
return trying;
}
// Not found, no idea...
return UNSPECIFIED_COLOR;
}
bool ColorIsLight( EDA_COLOR_T aColor )
{
const StructColors &c = g_ColorRefs[ColorGetBase( aColor )];
int r = c.m_Red;
int g = c.m_Green;
int b = c.m_Blue;
return ((r * r) + (g * g) + (b * b)) > (128 * 128 * 3);
}
EDA_COLOR_T ColorFindNearest( const wxColour &aColor )
{
return ColorFindNearest( aColor.Red(), aColor.Green(), aColor.Blue() );
}
EDA_COLOR_T ColorFindNearest( int aR, int aG, int aB )
{
EDA_COLOR_T candidate = BLACK;
/* Find the 'nearest' color in the palette. This is fun. There is
a gazilion of metrics for the color space and no one of the
useful one is in the RGB color space. Who cares, this is a CAD,
not a photosomething...
I hereby declare that the distance is the sum of the square of the
component difference. Think about the RGB color cube. Now get the
euclidean distance, but without the square root... for ordering
purposes it's the same, obviously. Also each component can't be
less of the target one, since I found this currently work better...
*/
int nearest_distance = 255 * 255 * 3 + 1; // Can't beat this
for( EDA_COLOR_T trying = BLACK; trying < NBCOLORS; trying = NextColor(trying) )
{
const StructColors &c = g_ColorRefs[trying];
int distance = (aR - c.m_Red) * (aR - c.m_Red) +
(aG - c.m_Green) * (aG - c.m_Green) +
(aB - c.m_Blue) * (aB - c.m_Blue);
if( distance < nearest_distance && c.m_Red >= aR &&
c.m_Green >= aG && c.m_Blue >= aB )
{
nearest_distance = distance;
candidate = trying;
}
}
return candidate;
}
EDA_COLOR_T ColorMix( EDA_COLOR_T aColor1, EDA_COLOR_T aColor2 )
{
/* Memoization storage. This could be potentially called for each
* color merge so a cache is useful (there are few colours anyway) */
static EDA_COLOR_T mix_cache[NBCOLORS][NBCOLORS];
// TODO how is alpha used? it's a mac only thing, I have no idea
aColor1 = ColorGetBase( aColor1 );
aColor2 = ColorGetBase( aColor2 );
// First easy thing: a black gives always the other colour
if( aColor1 == BLACK )
return aColor2;
if( aColor2 == BLACK)
return aColor1;
/* Now we are sure that black can't occur, so the rule is:
* BLACK means not computed yet. If we're lucky we already have
* an answer */
EDA_COLOR_T candidate = mix_cache[aColor1][aColor2];
if( candidate != BLACK )
return candidate;
// Blend the two colors (i.e. OR the RGB values)
const StructColors &c1 = g_ColorRefs[aColor1];
const StructColors &c2 = g_ColorRefs[aColor2];
// Ask the palette for the nearest color to the mix
wxColour mixed( c1.m_Red | c2.m_Red,
c1.m_Green | c2.m_Green,
c1.m_Blue | c2.m_Blue );
candidate = ColorFindNearest( mixed );
/* Here, BLACK is *not* a good answer, since it would recompute the next time.
* Even theorically its not possible (with the current rules), but
* maybe the metric will change in the future */
if( candidate == BLACK)
candidate = DARKDARKGRAY;
// Store the result in the cache. The operation is commutative, too
mix_cache[aColor1][aColor2] = candidate;
mix_cache[aColor2][aColor1] = candidate;
return candidate;
}
+43
View File
@@ -59,11 +59,54 @@
*/
bool g_ShowPageLimits = true;
wxString g_UserLibDirBuffer;
EDA_UNITS_T g_UserUnit;
EDA_COLOR_T g_GhostColor;
/**
* The predefined colors used in KiCad.
* Please: if you change a value, remember these values are carefully chosen
* to have good results in Pcbnew, that uses the ORed value of basic colors
* when displaying superimposed objects
* This list must have exactly NBCOLORS items
*/
const StructColors g_ColorRefs[NBCOLORS] =
{
{ 0, 0, 0, BLACK, wxT( "Black" ), DARKDARKGRAY },
{ 72, 72, 72, DARKDARKGRAY, wxT( "Gray 1" ), DARKGRAY },
{ 132, 132, 132, DARKGRAY, wxT( "Gray 2" ), LIGHTGRAY },
{ 194, 194, 194, LIGHTGRAY, wxT( "Gray 3" ), WHITE },
{ 255, 255, 255, WHITE, wxT( "White" ), WHITE },
{ 194, 255, 255, LIGHTYELLOW, wxT( "L.Yellow" ), WHITE },
{ 72, 0, 0, DARKBLUE, wxT( "Blue 1" ), BLUE },
{ 0, 72, 0, DARKGREEN, wxT( "Green 1" ), GREEN },
{ 72, 72, 0, DARKCYAN, wxT( "Cyan 1" ), CYAN },
{ 0, 0, 72, DARKRED, wxT( "Red 1" ), RED },
{ 72, 0, 72, DARKMAGENTA, wxT( "Magenta 1" ), MAGENTA },
{ 0, 72, 72, DARKBROWN, wxT( "Brown 1" ), BROWN },
{ 132, 0, 0, BLUE, wxT( "Blue 2" ), LIGHTBLUE },
{ 0, 132, 0, GREEN, wxT( "Green 2" ), LIGHTGREEN },
{ 132, 132, 0, CYAN, wxT( "Cyan 2" ), LIGHTCYAN },
{ 0, 0, 132, RED, wxT( "Red 2" ), LIGHTRED },
{ 132, 0, 132, MAGENTA, wxT( "Magenta 2" ), LIGHTMAGENTA },
{ 0, 132, 132, BROWN, wxT( "Brown 2" ), YELLOW },
{ 194, 0, 0, LIGHTBLUE, wxT( "Blue 3" ), PUREBLUE, },
{ 0, 194, 0, LIGHTGREEN, wxT( "Green 3" ), PUREGREEN },
{ 194, 194, 0, LIGHTCYAN, wxT( "Cyan 3" ), PURECYAN },
{ 0, 0, 194, LIGHTRED, wxT( "Red 3" ), PURERED },
{ 194, 0, 194, LIGHTMAGENTA, wxT( "Magenta 3" ), PUREMAGENTA },
{ 0, 194, 194, YELLOW, wxT( "Yellow 3" ), PUREYELLOW },
{ 255, 0, 0, PUREBLUE, wxT( "Blue 4" ), WHITE },
{ 0, 255, 0, PUREGREEN, wxT( "Green 4" ), WHITE },
{ 255, 255, 0, PURECYAN, wxT( "Cyan 4" ), WHITE },
{ 0, 0, 255, PURERED, wxT( "Red 4" ), WHITE },
{ 255, 0, 255, PUREMAGENTA, wxT( "Magenta 4" ), WHITE },
{ 0, 255, 255, PUREYELLOW, wxT( "Yellow 4" ), WHITE },
};
/**
* Function to use local notation or C standard notation for floating point numbers
* some countries use 1,5 and others (and C) 1.5
+12 -113
View File
@@ -11,7 +11,6 @@
#include <plot_common.h>
#include <macros.h>
#include <kicad_string.h>
#include <convert_basic_shapes_to_polygon.h>
/**
* Oblique angle for DXF native text
@@ -320,115 +319,24 @@ void DXF_PLOTTER::Circle( const wxPoint& centre, int diameter, FILL_T fill, int
/**
* DXF polygon: doesn't fill it but at least it close the filled ones
* DXF does not know thick outline.
* It does not know thhick segments, therefore filled polygons with thick outline
* are converted to inflated polygon by aWidth/2
*/
#include "clipper.hpp"
void DXF_PLOTTER::PlotPoly( const std::vector< wxPoint >& aCornerList,
FILL_T aFill, int aWidth)
{
if( aCornerList.size() <= 1 )
return;
unsigned last = aCornerList.size() - 1;
// Plot outlines with lines (thickness = 0) to define the polygon
if( aWidth <= 0 )
{
MoveTo( aCornerList[0] );
for( unsigned ii = 1; ii < aCornerList.size(); ii++ )
LineTo( aCornerList[ii] );
// Close polygon if 'fill' requested
if( aFill )
{
if( aCornerList[last] != aCornerList[0] )
LineTo( aCornerList[0] );
}
PenFinish();
return;
}
// if the polygon outline has thickness, and is not filled
// (i.e. is a polyline) plot outlines with thick segments
if( aWidth > 0 && !aFill )
{
MoveTo( aCornerList[0] );
for( unsigned ii = 1; ii < aCornerList.size(); ii++ )
ThickSegment( aCornerList[ii-1], aCornerList[ii],
aWidth, FILLED );
return;
}
// The polygon outline has thickness, and is filled
// Build and plot the polygon which contains the initial
// polygon and its thick outline
CPOLYGONS_LIST bufferOutline;
CPOLYGONS_LIST bufferPolybase;
const int circleToSegmentsCount = 16;
// enter outline as polygon:
MoveTo( aCornerList[0] );
for( unsigned ii = 1; ii < aCornerList.size(); ii++ )
LineTo( aCornerList[ii] );
// Close polygon if 'fill' requested
if( aFill )
{
TransformRoundedEndsSegmentToPolygon( bufferOutline,
aCornerList[ii-1], aCornerList[ii], circleToSegmentsCount, aWidth );
unsigned ii = aCornerList.size() - 1;
if( aCornerList[ii] != aCornerList[0] )
LineTo( aCornerList[0] );
}
// enter the initial polygon:
for( unsigned ii = 0; ii < aCornerList.size(); ii++ )
{
CPolyPt polypoint( aCornerList[ii].x, aCornerList[ii].y );
bufferPolybase.Append( polypoint );
}
bufferPolybase.CloseLastContour();
// Merge polygons to build the polygon which contains the initial
// polygon and its thick outline
KI_POLYGON_SET polysBase; // Store the main outline and the final outline
KI_POLYGON_SET polysOutline; // Store the thick segments to draw the outline
bufferPolybase.ExportTo( polysBase );
bufferOutline.ExportTo( polysOutline );
polysBase += polysOutline; // create the outline which contains thick outline
// We should have only one polygon in list, now.
wxASSERT( polysBase.size() == 1 );
if( polysBase.size() < 1 ) // should not happen
return;
KI_POLYGON poly = polysBase[0]; // Expected only one polygon here
if( poly.size() < 2 ) // should not happen
return;
// Now, output the final polygon to DXF file:
last = poly.size() - 1;
KI_POLY_POINT point = *(poly.begin());
wxPoint startPoint( point.x(), point.y() );
MoveTo( startPoint );
for( unsigned ii = 1; ii < poly.size(); ii++ )
{
point = *( poly.begin() + ii );
LineTo( wxPoint( point.x(), point.y() ) );
}
// Close polygon, if needed
point = *(poly.begin() + last);
wxPoint endPoint( point.x(), point.y() );
if( endPoint != startPoint )
LineTo( startPoint );
PenFinish();
}
@@ -662,21 +570,12 @@ void DXF_PLOTTER::Text( const wxPoint& aPos,
enum EDA_TEXT_VJUSTIFY_T aV_justify,
int aWidth,
bool aItalic,
bool aBold,
bool aMultilineAllowed )
bool aBold )
{
// Fix me: see how to use DXF text mode for multiline texts
if( aMultilineAllowed && !aText.Contains( wxT( "\n" ) ) )
aMultilineAllowed = false; // the text has only one line.
if( textAsLines || containsNonAsciiChars( aText ) || aMultilineAllowed )
{
// output text as graphics.
// Perhaps miltiline texts could be handled as DXF text entity
// but I do not want spend time about this (JPC)
if( textAsLines || containsNonAsciiChars( aText ) )
/* output text as graphics */
PLOTTER::Text( aPos, aColor, aText, aOrient, aSize, aH_justify, aV_justify,
aWidth, aItalic, aBold, aMultilineAllowed );
}
aWidth, aItalic, aBold );
else
{
/* Emit text as a text entity. This loses formatting and shape but it's
+8 -15
View File
@@ -325,32 +325,25 @@ void GERBER_PLOTTER::PlotPoly( const std::vector< wxPoint >& aCornerList,
if( aCornerList.size() <= 1 )
return;
// Gerber format does not know filled polygons with thick outline
// Thereore, to plot a filled polygon with outline having a thickness,
// one should plot outline as thick segments
SetCurrentLineWidth( aWidth );
if( aFill )
{
fputs( "G36*\n", outputFile );
MoveTo( aCornerList[0] );
MoveTo( aCornerList[0] );
for( unsigned ii = 1; ii < aCornerList.size(); ii++ )
LineTo( aCornerList[ii] );
for( unsigned ii = 1; ii < aCornerList.size(); ii++ )
{
LineTo( aCornerList[ii] );
}
if( aFill )
{
FinishTo( aCornerList[0] );
fputs( "G37*\n", outputFile );
}
if( aWidth > 0 )
else
{
MoveTo( aCornerList[0] );
for( unsigned ii = 1; ii < aCornerList.size(); ii++ )
LineTo( aCornerList[ii] );
PenFinish();
}
}
-2
View File
@@ -264,8 +264,6 @@ void HPGL_PLOTTER::PlotPoly( const std::vector<wxPoint>& aCornerList,
if( aCornerList.size() <= 1 )
return;
SetCurrentLineWidth( aWidth );
MoveTo( aCornerList[0] );
for( unsigned ii = 1; ii < aCornerList.size(); ii++ )
+5 -10
View File
@@ -28,7 +28,7 @@
*/
#include <fctsys.h>
#include <pgm_base.h>
#include <appl_wxstruct.h>
#include <trigo.h>
#include <wxstruct.h>
#include <base_struct.h>
@@ -741,15 +741,10 @@ void PDF_PLOTTER::Text( const wxPoint& aPos,
enum EDA_TEXT_VJUSTIFY_T aV_justify,
int aWidth,
bool aItalic,
bool aBold,
bool aMultilineAllowed )
bool aBold )
{
// Fix me: see how to use PDF text mode for multiline texts
if( aMultilineAllowed && !aText.Contains( wxT( "\n" ) ) )
aMultilineAllowed = false; // the text has only one line.
// Emit native PDF text (if requested)
if( m_textMode != PLOTTEXTMODE_STROKE && !aMultilineAllowed )
if( m_textMode != PLOTTEXTMODE_STROKE )
{
const char *fontname = aItalic ? (aBold ? "/KicadFontBI" : "/KicadFontI")
: (aBold ? "/KicadFontB" : "/KicadFont");
@@ -805,10 +800,10 @@ void PDF_PLOTTER::Text( const wxPoint& aPos,
}
// Plot the stroked text (if requested)
if( m_textMode != PLOTTEXTMODE_NATIVE || aMultilineAllowed )
if( m_textMode != PLOTTEXTMODE_NATIVE )
{
PLOTTER::Text( aPos, aColor, aText, aOrient, aSize, aH_justify, aV_justify,
aWidth, aItalic, aBold, aMultilineAllowed );
aWidth, aItalic, aBold );
}
}
+87 -92
View File
@@ -211,34 +211,34 @@ void PSLIKE_PLOTTER::fputsPostscriptString(FILE *fout, const wxString& txt)
putc( '(', fout );
for( unsigned i = 0; i < txt.length(); i++ )
{
// Lazyness made me use stdio buffering yet another time...
wchar_t ch = txt[i];
if( ch < 256 )
{
switch (ch)
{
// The ~ shouldn't reach the outside
case '~':
break;
// These characters must be escaped
case '(':
case ')':
case '\\':
putc( '\\', fout );
// Lazyness made me use stdio buffering yet another time...
wchar_t ch = txt[i];
if( ch < 256 )
{
switch (ch)
{
// The ~ shouldn't reach the outside
case '~':
break;
// These characters must be escaped
case '(':
case ')':
case '\\':
putc( '\\', fout );
// FALLTHRU
default:
putc( ch, fout );
break;
}
}
// FALLTHRU
default:
putc( ch, fout );
break;
}
}
}
putc( ')', fout );
}
/**
* Sister function for the GraphicTextWidth in drawtxt.cpp
* Sister function for the ReturnGraphicTextWidth in drawtxt.cpp
* Does the same processing (i.e. calculates a text string width) but
* using postscript metrics for the Helvetica font (optionally used for
* PS and PDF plotting
@@ -303,7 +303,7 @@ void PSLIKE_PLOTTER::postscriptOverlinePositions( const wxString& aText, int aXS
}
void PS_PLOTTER::SetViewport( const wxPoint& aOffset, double aIusPerDecimil,
double aScale, bool aMirror )
double aScale, bool aMirror )
{
wxASSERT( !outputFile );
m_plotMirror = aMirror;
@@ -354,31 +354,31 @@ void PSLIKE_PLOTTER::computeTextParameters( const wxPoint& aPos,
switch( aH_justify )
{
case GR_TEXT_HJUSTIFY_CENTER:
dx = -tw / 2;
break;
dx = -tw / 2;
break;
case GR_TEXT_HJUSTIFY_RIGHT:
dx = -tw;
break;
dx = -tw;
break;
case GR_TEXT_HJUSTIFY_LEFT:
dx = 0;
break;
dx = 0;
break;
}
switch( aV_justify )
{
case GR_TEXT_VJUSTIFY_CENTER:
dy = th / 2;
break;
dy = th / 2;
break;
case GR_TEXT_VJUSTIFY_TOP:
dy = th;
break;
break;
case GR_TEXT_VJUSTIFY_BOTTOM:
dy = 0;
break;
dy = 0;
break;
}
RotatePoint( &dx, &dy, aOrient );
@@ -620,7 +620,7 @@ void PS_PLOTTER::PenTo( const wxPoint& pos, char plume )
}
if( penState != plume || pos != penLastpos )
{
DPOINT pos_dev = userToDeviceCoordinates( pos );
DPOINT pos_dev = userToDeviceCoordinates( pos );
fprintf( outputFile, "%g %g %sto\n",
pos_dev.x, pos_dev.y,
( plume=='D' ) ? "line" : "move" );
@@ -650,39 +650,39 @@ bool PS_PLOTTER::StartPlot()
static const char* PSMacro[] =
{
"%%BeginProlog\n"
"/line { newpath moveto lineto stroke } bind def\n",
"/cir0 { newpath 0 360 arc stroke } bind def\n",
"/cir1 { newpath 0 360 arc gsave fill grestore stroke } bind def\n",
"/cir2 { newpath 0 360 arc gsave fill grestore stroke } bind def\n",
"/arc0 { newpath arc stroke } bind def\n",
"/arc1 { newpath 4 index 4 index moveto arc closepath gsave fill\n",
" grestore stroke } bind def\n",
"/arc2 { newpath 4 index 4 index moveto arc closepath gsave fill\n",
" grestore stroke } bind def\n",
"/poly0 { stroke } bind def\n",
"/poly1 { closepath gsave fill grestore stroke } bind def\n",
"/poly2 { closepath gsave fill grestore stroke } bind def\n",
"/rect0 { rectstroke } bind def\n",
"/rect1 { rectfill } bind def\n",
"/rect2 { rectfill } bind def\n",
"/linemode0 { 0 setlinecap 0 setlinejoin 0 setlinewidth } bind def\n",
"/linemode1 { 1 setlinecap 1 setlinejoin } bind def\n",
"/dashedline { [200] 100 setdash } bind def\n",
"/solidline { [] 0 setdash } bind def\n",
"%%BeginProlog\n"
"/line { newpath moveto lineto stroke } bind def\n",
"/cir0 { newpath 0 360 arc stroke } bind def\n",
"/cir1 { newpath 0 360 arc gsave fill grestore stroke } bind def\n",
"/cir2 { newpath 0 360 arc gsave fill grestore stroke } bind def\n",
"/arc0 { newpath arc stroke } bind def\n",
"/arc1 { newpath 4 index 4 index moveto arc closepath gsave fill\n",
" grestore stroke } bind def\n",
"/arc2 { newpath 4 index 4 index moveto arc closepath gsave fill\n",
" grestore stroke } bind def\n",
"/poly0 { stroke } bind def\n",
"/poly1 { closepath gsave fill grestore stroke } bind def\n",
"/poly2 { closepath gsave fill grestore stroke } bind def\n",
"/rect0 { rectstroke } bind def\n",
"/rect1 { rectfill } bind def\n",
"/rect2 { rectfill } bind def\n",
"/linemode0 { 0 setlinecap 0 setlinejoin 0 setlinewidth } bind def\n",
"/linemode1 { 1 setlinecap 1 setlinejoin } bind def\n",
"/dashedline { [200] 100 setdash } bind def\n",
"/solidline { [] 0 setdash } bind def\n",
// This is for 'hidden' text (search anchors for PDF)
// This is for 'hidden' text (search anchors for PDF)
"/phantomshow { moveto\n",
" /KicadFont findfont 0.000001 scalefont setfont\n",
" show } bind def\n",
" show } bind def\n",
// This is for regular postscript text
"/textshow { gsave\n",
" findfont exch scalefont setfont concat 1 scale 0 0 moveto show\n",
" } bind def\n",
// Utility for getting Latin1 encoded fonts
"/reencodefont {\n",
// Utility for getting Latin1 encoded fonts
"/reencodefont {\n",
" findfont dup length dict begin\n",
" { 1 index /FID ne\n",
" { def }\n",
@@ -692,13 +692,13 @@ bool PS_PLOTTER::StartPlot()
" currentdict\n",
" end } bind def\n"
// Remap AdobeStandard fonts to Latin1
"/KicadFont /Helvetica reencodefont definefont pop\n",
"/KicadFont-Bold /Helvetica-Bold reencodefont definefont pop\n",
"/KicadFont-Oblique /Helvetica-Oblique reencodefont definefont pop\n",
"/KicadFont-BoldOblique /Helvetica-BoldOblique reencodefont definefont pop\n",
"%%EndProlog\n",
NULL
// Remap AdobeStandard fonts to Latin1
"/KicadFont /Helvetica reencodefont definefont pop\n",
"/KicadFont-Bold /Helvetica-Bold reencodefont definefont pop\n",
"/KicadFont-Oblique /Helvetica-Oblique reencodefont definefont pop\n",
"/KicadFont-BoldOblique /Helvetica-BoldOblique reencodefont definefont pop\n",
"%%EndProlog\n",
NULL
};
time_t time1970 = time( NULL );
@@ -726,8 +726,8 @@ bool PS_PLOTTER::StartPlot()
psPaperSize.Set( pageInfo.GetHeightMils(), pageInfo.GetWidthMils() );
fprintf( outputFile, "%%%%BoundingBox: 0 0 %d %d\n",
(int) ceil( psPaperSize.x * BIGPTsPERMIL ),
(int) ceil( psPaperSize.y * BIGPTsPERMIL ) );
(int) ceil( psPaperSize.x * BIGPTsPERMIL ),
(int) ceil( psPaperSize.y * BIGPTsPERMIL ) );
// Specify the size of the sheet and the name associated with that size.
// (If the "User size" option has been selected for the sheet size,
@@ -775,9 +775,9 @@ bool PS_PLOTTER::StartPlot()
// within the Document Structuring Convention.
fputs( "%%Page: 1 1\n"
"%%BeginPageSetup\n"
"gsave\n"
"0.0072 0.0072 scale\n" // Configure postscript for decimils coordinates
"linemode1\n", outputFile );
"gsave\n"
"0.0072 0.0072 scale\n" // Configure postscript for decimils coordinates
"linemode1\n", outputFile );
// Rototranslate the coordinate to achieve the landscape layout
@@ -803,7 +803,7 @@ bool PS_PLOTTER::EndPlot()
wxASSERT( outputFile );
fputs( "showpage\n"
"grestore\n"
"%%EOF\n", outputFile );
"%%EOF\n", outputFile );
fclose( outputFile );
outputFile = NULL;
@@ -812,32 +812,27 @@ bool PS_PLOTTER::EndPlot()
void PS_PLOTTER::Text( const wxPoint& aPos,
enum EDA_COLOR_T aColor,
const wxString& aText,
double aOrient,
const wxSize& aSize,
enum EDA_TEXT_HJUSTIFY_T aH_justify,
enum EDA_TEXT_VJUSTIFY_T aV_justify,
int aWidth,
bool aItalic,
bool aBold,
bool aMultilineAllowed )
void PS_PLOTTER::Text( const wxPoint& aPos,
enum EDA_COLOR_T aColor,
const wxString& aText,
double aOrient,
const wxSize& aSize,
enum EDA_TEXT_HJUSTIFY_T aH_justify,
enum EDA_TEXT_VJUSTIFY_T aV_justify,
int aWidth,
bool aItalic,
bool aBold )
{
SetCurrentLineWidth( aWidth );
SetColor( aColor );
// Fix me: see how to use PS text mode for multiline texts
if( aMultilineAllowed && !aText.Contains( wxT( "\n" ) ) )
aMultilineAllowed = false; // the text has only one line.
// Draw the native postscript text (if requested)
if( m_textMode == PLOTTEXTMODE_NATIVE && !aMultilineAllowed )
if( m_textMode == PLOTTEXTMODE_NATIVE )
{
const char *fontname = aItalic ? (aBold ? "/KicadFont-BoldOblique"
: "/KicadFont-Oblique")
: (aBold ? "/KicadFont-Bold"
: "/KicadFont");
: (aBold ? "/KicadFont-Bold"
: "/KicadFont");
// Compute the copious tranformation parameters
double ctm_a, ctm_b, ctm_c, ctm_d, ctm_e, ctm_f;
@@ -879,16 +874,16 @@ void PS_PLOTTER::Text( const wxPoint& aPos,
if( m_textMode == PLOTTEXTMODE_PHANTOM )
{
fputsPostscriptString( outputFile, aText );
DPOINT pos_dev = userToDeviceCoordinates( aPos );
DPOINT pos_dev = userToDeviceCoordinates( aPos );
fprintf( outputFile, " %g %g phantomshow\n",
pos_dev.x, pos_dev.y );
}
// Draw the stroked text (if requested)
if( m_textMode != PLOTTEXTMODE_NATIVE || aMultilineAllowed )
if( m_textMode != PLOTTEXTMODE_NATIVE )
{
PLOTTER::Text( aPos, aColor, aText, aOrient, aSize, aH_justify, aV_justify,
aWidth, aItalic, aBold, aMultilineAllowed );
aWidth, aItalic, aBold );
}
}
+3 -13
View File
@@ -346,7 +346,7 @@ void SVG_PLOTTER::Arc( const wxPoint& centre, double StAngle, double EndAngle, i
DPOINT centre_dev = userToDeviceCoordinates( centre );
double radius_dev = userToDeviceSize( radius );
if( !m_yaxisReversed ) // Should be never the case
if( m_yaxisReversed ) // Should be always the case
{
double tmp = StAngle;
StAngle = -EndAngle;
@@ -478,15 +478,6 @@ void SVG_PLOTTER::PenTo( const wxPoint& pos, char plume )
if( penState == 'Z' ) // here plume = 'D' or 'U'
{
DPOINT pos_dev = userToDeviceCoordinates( pos );
// Ensure we do not use a fill mode when moving tne pen,
// in SVG mode (i;e. we are plotting only basic lines, not a filled area
if( m_fillMode != NO_FILL )
{
setFillMode( NO_FILL );
setSVGPlotStyle();
}
fprintf( outputFile, "<path d=\"M%d %d\n",
(int) pos_dev.x, (int) pos_dev.y );
}
@@ -581,8 +572,7 @@ void SVG_PLOTTER::Text( const wxPoint& aPos,
enum EDA_TEXT_VJUSTIFY_T aV_justify,
int aWidth,
bool aItalic,
bool aBold,
bool aMultilineAllowed )
bool aBold )
{
setFillMode( NO_FILL );
SetColor( aColor );
@@ -591,5 +581,5 @@ void SVG_PLOTTER::Text( const wxPoint& aPos,
// TODO: see if the postscript native text code can be used in SVG plotter
PLOTTER::Text( aPos, aColor, aText, aOrient, aSize, aH_justify, aV_justify,
aWidth, aItalic, aBold, aMultilineAllowed );
aWidth, aItalic, aBold );
}
+1 -1
View File
@@ -34,7 +34,7 @@
#include <class_drawpanel.h>
#include <class_base_screen.h>
#include <confirm.h>
#include <draw_frame.h>
#include <wxstruct.h>
static bool DrawPageOnClipboard( EDA_DRAW_FRAME* aFrame );
+4 -4
View File
@@ -21,7 +21,7 @@
#include <bitmaps.h>
#include <wxstruct.h>
#include <common.h>
#include <pgm_base.h>
#include <appl_wxstruct.h>
#include <build_version.h>
@@ -41,7 +41,7 @@ static wxString HtmlNewline( const unsigned int amount = 1 );
static void InitKiCadAboutNew( AboutAppInfo& info )
{
// Set application specific icon
const wxTopLevelWindow* const tlw = wxDynamicCast( Pgm().App().GetTopWindow(), wxTopLevelWindow);
const wxTopLevelWindow * const tlw = wxDynamicCast(::wxGetApp().GetTopWindow(), wxTopLevelWindow);
if( tlw )
info.SetIcon( tlw->GetIcon() );
@@ -56,10 +56,10 @@ static void InitKiCadAboutNew( AboutAppInfo& info )
}
/* Set title */
info.SetAppName( wxT( ".: " ) + Pgm().App().GetAppName() + wxT( " :." ) );
info.SetAppName( wxT( ".: " ) + wxGetApp().GetTitle() + wxT( " :." ) );
/* Copyright information */
info.SetCopyright( wxT( "(C) 1992-2014 KiCad Developers Team" ) );
info.SetCopyright( wxT( "(C) 1992-2013 KiCad Developers Team" ) );
/* KiCad build version */
wxString version;
+8 -1
View File
@@ -29,9 +29,16 @@ dialog_about::dialog_about(wxWindow *parent, AboutAppInfo& appInfo)
m_staticTextBuildVersion->SetLabel( info.GetBuildVersion() );
m_staticTextLibVersion->SetLabel( info.GetLibVersion() );
/* Affects m_titlepanel the parent of some wxStaticText.
* Changing the text afterwards makes it under Windows necessary to call 'Layout()'
* so that the new text gets properly layout.
*/
/* m_staticTextCopyright->GetParent()->Layout();
m_staticTextBuildVersion->GetParent()->Layout();
m_staticTextLibVersion->GetParent()->Layout();
*/
DeleteNotebooks();
CreateNotebooks();
GetSizer()->SetSizeHints(this);
m_auiNotebook->Update();
SetFocus();
+1 -4
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 6 2013)
// C++ code generated with wxFormBuilder (version Sep 8 2010)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@@ -46,13 +46,11 @@ dialog_about_base::dialog_about_base( wxWindow* parent, wxWindowID id, const wxS
m_staticTextLibVersion->Wrap( -1 );
b_apptitleSizer->Add( m_staticTextLibVersion, 0, wxALIGN_CENTER|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizer3->Add( b_apptitleSizer, 10, wxEXPAND, 5 );
bSizer3->Add( 0, 0, 2, wxEXPAND, 5 );
bSizer1->Add( bSizer3, 0, wxEXPAND, 5 );
wxStaticLine* m_staticline1;
@@ -69,7 +67,6 @@ dialog_about_base::dialog_about_base( wxWindow* parent, wxWindowID id, const wxS
m_buttonOK->SetDefault();
bSizer1->Add( m_buttonOK, 0, wxALIGN_CENTER|wxALL, 5 );
this->SetSizer( bSizer1 );
this->Layout();
File diff suppressed because it is too large Load Diff
+8 -7
View File
@@ -1,16 +1,15 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 6 2013)
// C++ code generated with wxFormBuilder (version Sep 8 2010)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __DIALOG_ABOUT_BASE_H__
#define __DIALOG_ABOUT_BASE_H__
#ifndef __dialog_about_base__
#define __dialog_about_base__
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
@@ -38,11 +37,13 @@ class dialog_about_base : public wxDialog
wxButton* m_buttonOK;
protected:
wxStaticBitmap* m_bitmapApp;
wxStaticText* m_staticTextAppTitle;
wxStaticText* m_staticTextCopyright;
wxStaticText* m_staticTextBuildVersion;
wxStaticText* m_staticTextLibVersion;
wxAuiNotebook* m_auiNotebook;
// Virtual event handlers, overide them in your derived class
@@ -52,9 +53,9 @@ class dialog_about_base : public wxDialog
public:
dialog_about_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About..."), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 750,450 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSTAY_ON_TOP );
dialog_about_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About..."), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 750,350 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSTAY_ON_TOP );
~dialog_about_base();
};
#endif //__DIALOG_ABOUT_BASE_H__
#endif //__dialog_about_base__
+1 -214
View File
@@ -24,64 +24,18 @@
*/
#include <dialog_shim.h>
#include <kiway_player.h>
#include <wx/evtloop.h>
/*
Quasi-Modal Mode Explained:
The gtk calls in wxDialog::ShowModal() cause event routing problems if that
modal dialog then tries to use KIWAY_PLAYER::ShowModal(). The latter shows up
and mostly works but does not respond to the window decoration close button.
There is no way to get around this without reversing the gtk calls temporarily.
Quasi-Modal mode is our own almost modal mode which disables only the parent
of the DIALOG_SHIM, leaving other frames operable and while staying captured in the
nested event loop. This avoids the gtk calls and leaves event routing pure
and sufficient to operate the KIWAY_PLAYER::ShowModal() properly. When using
ShowQuasiModal() you have to use EndQuasiModal() in your dialogs and not
EndModal(). There is also IsQuasiModal() but its value can only be true
when the nested event loop is active. Do not mix the modal and quasi-modal
functions. Use one set or the other.
You might find this behavior preferable over a pure modal mode, and it was said
that only the Mac has this natively, but now other platforms have something
similar. You CAN use it anywhere for any dialog. But you MUST use it when
you want to use KIWAY_PLAYER::ShowModal() from a dialog event.
*/
DIALOG_SHIM::DIALOG_SHIM( wxWindow* aParent, wxWindowID id, const wxString& title,
const wxPoint& pos, const wxSize& size, long style, const wxString& name ) :
wxDialog( aParent, id, title, pos, size, style, name ),
KIWAY_HOLDER( 0 ),
m_qmodal_loop( 0 ),
m_qmodal_showing( false )
wxDialog( aParent, id, title, pos, size, style, name )
{
// pray that aParent is either a KIWAY_PLAYER or DIALOG_SHIM derivation.
KIWAY_HOLDER* h = dynamic_cast<KIWAY_HOLDER*>( aParent );
wxASSERT_MSG( h,
wxT( "DIALOG_SHIM's parent is NULL or not derived from KIWAY_PLAYER nor DIALOG_SHIM" ) );
if( h )
SetKiway( this, &h->Kiway() );
#if DLGSHIM_USE_SETFOCUS
Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_SHIM::onInit ) );
#endif
}
DIALOG_SHIM::~DIALOG_SHIM()
{
// if the dialog is quasi-modal, this will end its event loop
if( IsQuasiModal() )
EndQuasiModal( wxID_CANCEL );
}
// our hashtable is an implementation secret, don't need or want it in a header file
#include <hashtables.h>
#include <base_struct.h> // EDA_RECT
@@ -128,173 +82,6 @@ bool DIALOG_SHIM::Show( bool show )
}
bool DIALOG_SHIM::Enable( bool enable )
{
// so we can do logging of this state change:
#if defined(DEBUG)
const char* type_id = typeid( *this ).name();
printf( "wxDialog %s: %s\n", type_id, enable ? "enabled" : "disabled" );
#endif
return wxDialog::Enable( enable );
}
#if !wxCHECK_VERSION( 2, 9, 4 )
wxWindow* DIALOG_SHIM::CheckIfCanBeUsedAsParent( wxWindow* parent ) const
{
if ( !parent )
return NULL;
extern WXDLLIMPEXP_DATA_BASE(wxList) wxPendingDelete;
if ( wxPendingDelete.Member(parent) || parent->IsBeingDeleted() )
{
// this window is being deleted and we shouldn't create any children
// under it
return NULL;
}
if ( parent->GetExtraStyle() & wxWS_EX_TRANSIENT )
{
// this window is not being deleted yet but it's going to disappear
// soon so still don't parent this window under it
return NULL;
}
if ( !parent->IsShownOnScreen() )
{
// using hidden parent won't work correctly neither
return NULL;
}
// FIXME-VC6: this compiler requires an explicit const cast or it fails
// with error C2446
if ( const_cast<const wxWindow *>(parent) == this )
{
// not sure if this can really happen but it doesn't hurt to guard
// against this clearly invalid situation
return NULL;
}
return parent;
}
wxWindow* DIALOG_SHIM::GetParentForModalDialog(wxWindow *parent, long style) const
{
// creating a parent-less modal dialog will result (under e.g. wxGTK2)
// in an unfocused dialog, so try to find a valid parent for it unless we
// were explicitly asked not to
if ( style & wxDIALOG_NO_PARENT )
return NULL;
// first try the given parent
if ( parent )
parent = CheckIfCanBeUsedAsParent(wxGetTopLevelParent(parent));
// then the currently active window
if ( !parent )
parent = CheckIfCanBeUsedAsParent(
wxGetTopLevelParent(wxGetActiveWindow()));
// and finally the application main window
if ( !parent )
parent = CheckIfCanBeUsedAsParent(wxTheApp->GetTopWindow());
return parent;
}
#endif
int DIALOG_SHIM::ShowQuasiModal()
{
// toggle a window's "enable" status to disabled, then enabled on exit.
// exception safe.
struct ENABLE_DISABLE
{
wxWindow* m_win;
ENABLE_DISABLE( wxWindow* aWindow ) : m_win( aWindow ) { if( m_win ) m_win->Disable(); }
~ENABLE_DISABLE()
{
if( m_win )
{
m_win->Enable();
m_win->SetFocus(); // let's focus back on the parent window
}
}
};
// This is an exception safe way to zero a pointer before returning.
// Yes, even though DismissModal() clears this first normally, this is
// here in case there's an exception before the dialog is dismissed.
struct NULLER
{
void*& m_what;
NULLER( void*& aPtr ) : m_what( aPtr ) {}
~NULLER() { m_what = 0; } // indeed, set it to NULL on destruction
} clear_this( (void*&) m_qmodal_loop );
// release the mouse if it's currently captured as the window having it
// will be disabled when this dialog is shown -- but will still keep the
// capture making it impossible to do anything in the modal dialog itself
wxWindow* win = wxWindow::GetCapture();
if( win )
win->ReleaseMouse();
// Get the optimal parent
wxWindow* parent = GetParentForModalDialog( GetParent(), GetWindowStyle() );
// Show the optimal parent
DBG( if( parent ) printf( "%s: optimal parent: %s\n", __func__, typeid(*parent).name() );)
ENABLE_DISABLE toggle( parent ); // quasi-modal: disable only my "optimal" parent
Show( true );
m_qmodal_showing = true;
WX_EVENT_LOOP event_loop;
#if wxCHECK_VERSION( 2, 9, 4 ) // 2.9.4 is only approximate.
// new code needs this, old code does it in wxEventLoop::Run() and cannot
// tolerate it here. Where that boundary is as a version number, I don't know.
// A closer look at the subversion repo for wx would tell.
wxEventLoopActivator event_loop_stacker( &event_loop );
#endif
m_qmodal_loop = &event_loop;
event_loop.Run();
return GetReturnCode();
}
void DIALOG_SHIM::EndQuasiModal( int retCode )
{
SetReturnCode( retCode );
if( !IsQuasiModal() )
{
wxFAIL_MSG( wxT( "either DIALOG_SHIM::EndQuasiModal called twice or ShowQuasiModal wasn't called" ) );
return;
}
m_qmodal_showing = false;
if( m_qmodal_loop )
{
m_qmodal_loop->Exit();
m_qmodal_loop = NULL;
}
Show( false );
}
#if DLGSHIM_USE_SETFOCUS
static bool findWindowRecursively( const wxWindowList& children, const wxWindow* wanted )
+1 -1
View File
@@ -5,7 +5,7 @@
#include <fctsys.h>
#include <common.h>
#include <macros.h>
#include <draw_frame.h>
#include <wxstruct.h>
#include <dialog_get_component.h>
+6 -7
View File
@@ -28,7 +28,7 @@
#include <algorithm>
#include <fctsys.h>
#include <pgm_base.h>
#include <appl_wxstruct.h>
#include <common.h>
#include <dialog_hotkeys_editor.h>
@@ -175,7 +175,7 @@ void HOTKEYS_EDITOR_DIALOG::OnClickOnCell( wxGridEvent& event )
/** OnRightClickOnCell
* If a cell is selected, display a list of keys for selection
* The list is restricted to keys that cannot be entered:
* tab, home, return ... because these keys have special functions in dialogs
* tab, home ... because these keys have special functions in dialogs
*/
void HOTKEYS_EDITOR_DIALOG::OnRightClickOnCell( wxGridEvent& event )
{
@@ -186,8 +186,8 @@ void HOTKEYS_EDITOR_DIALOG::OnRightClickOnCell( wxGridEvent& event )
return;
// Do not translate these key names. They are internally used.
// See hotkeys_basic.cpp
#define C_COUNT 9
//ee hotkeys_basic.cpp
#define C_COUNT 8
wxString choices[C_COUNT] =
{
wxT("End")
@@ -198,12 +198,11 @@ void HOTKEYS_EDITOR_DIALOG::OnRightClickOnCell( wxGridEvent& event )
wxT("Space"),
wxT("Ctrl+Space"),
wxT("Alt+Space"),
wxT("Return")
};
wxString keyname = wxGetSingleChoice( _( "Special keys only. For others keys, use keyboard" ),
_( "Select a key" ), C_COUNT, choices, this );
int key = KeyCodeFromKeyName( keyname );
int key = ReturnKeyCodeFromKeyName( keyname );
if( key == 0 )
return;
@@ -252,7 +251,7 @@ void HOTKEYS_EDITOR_DIALOG::OnKeyPressed( wxKeyEvent& event )
#endif
// See if this key code is handled in hotkeys names list
bool exists;
KeyNameFromKeyCode( key, &exists );
ReturnKeyNameFromKeyCode( key, &exists );
if( !exists ) // not handled, see hotkeys_basic.cpp
{
+15 -15
View File
@@ -33,7 +33,7 @@
#include <base_struct.h>
#include <class_drawpanel.h>
#include <class_title_block.h>
#include <draw_frame.h>
#include <wxstruct.h>
#include <worksheet_shape_builder.h>
#include <class_base_screen.h>
#include <wildcards_and_files_ext.h>
@@ -703,21 +703,21 @@ void DIALOG_PAGES_SETTINGS::GetPageLayoutInfoFromDialog()
{
PAGE_INFO pageInfo; // SetType() later to lookup size
static const wxChar* papers[] = {
static const wxString* papers[] = {
// longest common string first, since sequential search below
PAGE_INFO::A4,
PAGE_INFO::A3,
PAGE_INFO::A2,
PAGE_INFO::A1,
PAGE_INFO::A0,
PAGE_INFO::A,
PAGE_INFO::B,
PAGE_INFO::C,
PAGE_INFO::D,
PAGE_INFO::E,
PAGE_INFO::USLetter,
PAGE_INFO::USLegal,
PAGE_INFO::USLedger,
&PAGE_INFO::A4,
&PAGE_INFO::A3,
&PAGE_INFO::A2,
&PAGE_INFO::A1,
&PAGE_INFO::A0,
&PAGE_INFO::A,
&PAGE_INFO::B,
&PAGE_INFO::C,
&PAGE_INFO::D,
&PAGE_INFO::E,
&PAGE_INFO::USLetter,
&PAGE_INFO::USLegal,
&PAGE_INFO::USLedger,
};
unsigned i;
+1 -1
View File
@@ -29,7 +29,7 @@
#include <fctsys.h>
#include <macros.h>
#include <draw_frame.h>
#include <wxstruct.h>
#include <kicad_string.h>
#include <dialog_helpers.h>
+37 -66
View File
@@ -28,18 +28,17 @@
*/
#include <fctsys.h>
#include <pgm_base.h>
#include <kiface_i.h>
#include <appl_wxstruct.h>
#include <gr_basic.h>
#include <common.h>
#include <bitmaps.h>
#include <macros.h>
#include <id.h>
#include <class_drawpanel.h>
#include <class_draw_panel_gal.h>
#include <class_drawpanel_gal.h>
#include <class_base_screen.h>
#include <msgpanel.h>
#include <draw_frame.h>
#include <wxstruct.h>
#include <confirm.h>
#include <kicad_device_context.h>
#include <dialog_helpers.h>
@@ -48,7 +47,6 @@
#include <wx/fontdlg.h>
#include <view/view.h>
#include <view/view_controls.h>
#include <gal/graphics_abstraction_layer.h>
/**
@@ -65,7 +63,7 @@ static const wxString GridColorEntryKeyword( wxT( "GridColor" ) );
static const wxString LastGridSizeIdKeyword( wxT( "_LastGridSize" ) );
BEGIN_EVENT_TABLE( EDA_DRAW_FRAME, KIWAY_PLAYER )
BEGIN_EVENT_TABLE( EDA_DRAW_FRAME, EDA_BASE_FRAME )
EVT_MOUSEWHEEL( EDA_DRAW_FRAME::OnMouseEvent )
EVT_MENU_OPEN( EDA_DRAW_FRAME::OnMenuOpen )
EVT_ACTIVATE( EDA_DRAW_FRAME::OnActivate )
@@ -90,12 +88,12 @@ BEGIN_EVENT_TABLE( EDA_DRAW_FRAME, KIWAY_PLAYER )
END_EVENT_TABLE()
EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent,
FRAME_T aFrameType,
EDA_DRAW_FRAME::EDA_DRAW_FRAME( wxWindow* aParent,
ID_DRAWFRAME_TYPE aFrameType,
const wxString& aTitle,
const wxPoint& aPos, const wxSize& aSize,
long aStyle, const wxString & aFrameName ) :
KIWAY_PLAYER( aKiway, aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName )
EDA_BASE_FRAME( aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName )
{
m_drawToolBar = NULL;
m_optionsToolBar = NULL;
@@ -396,7 +394,7 @@ void EDA_DRAW_FRAME::OnSelectGrid( wxCommandEvent& event )
if( IsGalCanvasActive() )
{
GetGalCanvas()->GetGAL()->SetGridSize( VECTOR2D( screen->GetGrid().m_Size.x,
screen->GetGrid().m_Size.y ) );
screen->GetGrid().m_Size.y ) );
GetGalCanvas()->GetView()->MarkTargetDirty( KIGFX::TARGET_NONCACHED );
}
@@ -533,39 +531,7 @@ wxPoint EDA_DRAW_FRAME::GetGridPosition( const wxPoint& aPosition ) const
}
void EDA_DRAW_FRAME::SetNextGrid()
{
if( m_gridSelectBox )
{
m_gridSelectBox->SetSelection( ( m_gridSelectBox->GetSelection() + 1 ) %
m_gridSelectBox->GetCount() );
wxCommandEvent cmd( wxEVT_COMMAND_COMBOBOX_SELECTED );
// cmd.SetEventObject( this );
OnSelectGrid( cmd );
}
}
void EDA_DRAW_FRAME::SetPrevGrid()
{
if( m_gridSelectBox )
{
int cnt = m_gridSelectBox->GetSelection();
if( --cnt < 0 )
cnt = m_gridSelectBox->GetCount() - 1;
m_gridSelectBox->SetSelection( cnt );
wxCommandEvent cmd( wxEVT_COMMAND_COMBOBOX_SELECTED );
// cmd.SetEventObject( this );
OnSelectGrid( cmd );
}
}
int EDA_DRAW_FRAME::BlockCommand( int key )
int EDA_DRAW_FRAME::ReturnBlockCommand( int key )
{
return 0;
}
@@ -589,6 +555,12 @@ bool EDA_DRAW_FRAME::HandleBlockEnd( wxDC* DC )
}
void EDA_DRAW_FRAME::SetLanguage( wxCommandEvent& event )
{
EDA_BASE_FRAME::SetLanguage( event );
}
void EDA_DRAW_FRAME::UpdateStatusBar()
{
wxString Line;
@@ -610,21 +582,25 @@ void EDA_DRAW_FRAME::UpdateStatusBar()
}
void EDA_DRAW_FRAME::LoadSettings( wxConfigBase* aCfg )
void EDA_DRAW_FRAME::LoadSettings()
{
EDA_BASE_FRAME::LoadSettings( aCfg );
wxASSERT( wxGetApp().GetSettings() != NULL );
aCfg->Read( m_FrameName + CursorShapeEntryKeyword, &m_cursorShape, ( long )0 );
wxConfig* cfg = wxGetApp().GetSettings();
EDA_BASE_FRAME::LoadSettings();
cfg->Read( m_FrameName + CursorShapeEntryKeyword, &m_cursorShape, ( long )0 );
bool btmp;
if( aCfg->Read( m_FrameName + ShowGridEntryKeyword, &btmp ) )
if ( cfg->Read( m_FrameName + ShowGridEntryKeyword, &btmp ) )
SetGridVisibility( btmp );
int itmp;
if( aCfg->Read( m_FrameName + GridColorEntryKeyword, &itmp ) )
if( cfg->Read( m_FrameName + GridColorEntryKeyword, &itmp ) )
SetGridColor( ColorFromInt( itmp ) );
aCfg->Read( m_FrameName + LastGridSizeIdKeyword, &m_LastGridSizeId, 0L );
cfg->Read( m_FrameName + LastGridSizeIdKeyword, &m_LastGridSizeId, 0L );
// m_LastGridSizeId is an offset, expected to be >= 0
if( m_LastGridSizeId < 0 )
@@ -632,14 +608,17 @@ void EDA_DRAW_FRAME::LoadSettings( wxConfigBase* aCfg )
}
void EDA_DRAW_FRAME::SaveSettings( wxConfigBase* aCfg )
void EDA_DRAW_FRAME::SaveSettings()
{
EDA_BASE_FRAME::SaveSettings( aCfg );
wxASSERT( wxGetApp().GetSettings() != NULL );
aCfg->Write( m_FrameName + CursorShapeEntryKeyword, m_cursorShape );
aCfg->Write( m_FrameName + ShowGridEntryKeyword, IsGridVisible() );
aCfg->Write( m_FrameName + GridColorEntryKeyword, ( long ) GetGridColor() );
aCfg->Write( m_FrameName + LastGridSizeIdKeyword, ( long ) m_LastGridSizeId );
wxConfig* cfg = wxGetApp().GetSettings();
EDA_BASE_FRAME::SaveSettings();
cfg->Write( m_FrameName + CursorShapeEntryKeyword, m_cursorShape );
cfg->Write( m_FrameName + ShowGridEntryKeyword, IsGridVisible() );
cfg->Write( m_FrameName + GridColorEntryKeyword, ( long ) GetGridColor() );
cfg->Write( m_FrameName + LastGridSizeIdKeyword, ( long ) m_LastGridSizeId );
}
@@ -703,7 +682,7 @@ bool EDA_DRAW_FRAME::HandleBlockBegin( wxDC* aDC, int aKey, const wxPoint& aPosi
if( ( Block->GetCommand() != BLOCK_IDLE ) || ( Block->GetState() != STATE_NO_BLOCK ) )
return false;
Block->SetCommand( (BLOCK_COMMAND_T) BlockCommand( aKey ) );
Block->SetCommand( (BLOCK_COMMAND_T) ReturnBlockCommand( aKey ) );
if( Block->GetCommand() == 0 )
return false;
@@ -1040,17 +1019,9 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable )
wxPoint EDA_DRAW_FRAME::GetCrossHairPosition( bool aInvertY ) const
{
// subject to change, borrow from old BASE_SCREEN for now.
if( IsGalCanvasActive() )
{
VECTOR2I cursor = GetGalCanvas()->GetViewControls()->GetCursorPosition();
return wxPoint( cursor.x, cursor.y );
}
else
{
BASE_SCREEN* screen = GetScreen(); // virtual call
return screen->getCrossHairPosition( aInvertY );
}
BASE_SCREEN* screen = GetScreen(); // virtual call
return screen->getCrossHairPosition( aInvertY );
}
+20 -29
View File
@@ -28,16 +28,15 @@
*/
#include <fctsys.h>
#include <pgm_base.h>
#include <kiface_i.h>
#include <appl_wxstruct.h>
#include <gr_basic.h>
#include <common.h>
#include <macros.h>
#include <id.h>
#include <class_drawpanel.h>
#include <class_draw_panel_gal.h>
#include <class_drawpanel_gal.h>
#include <class_base_screen.h>
#include <draw_frame.h>
#include <wxstruct.h>
#include <kicad_device_context.h>
@@ -46,17 +45,16 @@ static const int CURSOR_SIZE = 12; ///< Cursor size in pixels
#define CLIP_BOX_PADDING 2
// keys to store options in config:
#define ENBL_ZOOM_NO_CENTER_KEY wxT( "ZoomNoCenter" )
#define ENBL_MIDDLE_BUTT_PAN_KEY wxT( "MiddleButtonPAN" )
#define MIDDLE_BUTT_PAN_LIMITED_KEY wxT( "MiddleBtnPANLimited" )
#define ENBL_AUTO_PAN_KEY wxT( "AutoPAN" )
#define ENBL_ZOOM_NO_CENTER_KEY wxT( "ZoomNoCenter" )
#define ENBL_MIDDLE_BUTT_PAN_KEY wxT( "MiddleButtonPAN" )
#define MIDDLE_BUTT_PAN_LIMITED_KEY wxT( "MiddleBtnPANLimited" )
#define ENBL_AUTO_PAN_KEY wxT( "AutoPAN" )
// Definitions for enabling and disabling debugging features in drawpanel.cpp.
// Please don't forget to turn these off before making any commits to Launchpad.
/* Definitions for enabling and disabling debugging features in drawpanel.cpp.
* Please don't forget to turn these off before making any commits to Launchpad.
*/
#define DEBUG_SHOW_CLIP_RECT 0 // Set to 1 to draw clipping rectangle.
/**
* Trace mask used to enable or disable the trace output of coordinates during drawing
* functions. The coordinate dumping can be turned on by setting the WXTRACE environment
@@ -124,14 +122,12 @@ EDA_DRAW_PANEL::EDA_DRAW_PANEL( EDA_DRAW_FRAME* parent, int id,
m_mouseCaptureCallback = NULL;
m_endMouseCaptureCallback = NULL;
wxConfigBase* cfg = Kiface().KifaceSettings();
if( cfg )
if( wxGetApp().GetSettings() )
{
cfg->Read( ENBL_MIDDLE_BUTT_PAN_KEY, &m_enableMiddleButtonPan, false );
cfg->Read( ENBL_ZOOM_NO_CENTER_KEY, &m_enableZoomNoCenter, false );
cfg->Read( MIDDLE_BUTT_PAN_LIMITED_KEY, &m_panScrollbarLimits, false );
cfg->Read( ENBL_AUTO_PAN_KEY, &m_enableAutoPan, true );
wxGetApp().GetSettings()->Read( ENBL_MIDDLE_BUTT_PAN_KEY, &m_enableMiddleButtonPan, false );
wxGetApp().GetSettings()->Read( ENBL_ZOOM_NO_CENTER_KEY, &m_enableZoomNoCenter, false );
wxGetApp().GetSettings()->Read( MIDDLE_BUTT_PAN_LIMITED_KEY, &m_panScrollbarLimits, false );
wxGetApp().GetSettings()->Read( ENBL_AUTO_PAN_KEY, &m_enableAutoPan, true );
}
m_requestAutoPan = false;
@@ -153,19 +149,14 @@ EDA_DRAW_PANEL::EDA_DRAW_PANEL( EDA_DRAW_FRAME* parent, int id,
EDA_DRAW_PANEL::~EDA_DRAW_PANEL()
{
wxConfigBase* cfg = Kiface().KifaceSettings();
if( cfg )
{
cfg->Write( ENBL_MIDDLE_BUTT_PAN_KEY, m_enableMiddleButtonPan );
cfg->Write( ENBL_ZOOM_NO_CENTER_KEY, m_enableZoomNoCenter );
cfg->Write( MIDDLE_BUTT_PAN_LIMITED_KEY, m_panScrollbarLimits );
cfg->Write( ENBL_AUTO_PAN_KEY, m_enableAutoPan );
}
wxGetApp().GetSettings()->Write( ENBL_MIDDLE_BUTT_PAN_KEY, m_enableMiddleButtonPan );
wxGetApp().GetSettings()->Write( ENBL_ZOOM_NO_CENTER_KEY, m_enableZoomNoCenter );
wxGetApp().GetSettings()->Write( MIDDLE_BUTT_PAN_LIMITED_KEY, m_panScrollbarLimits );
wxGetApp().GetSettings()->Write( ENBL_AUTO_PAN_KEY, m_enableAutoPan );
}
EDA_DRAW_FRAME* EDA_DRAW_PANEL::GetParent() const
EDA_DRAW_FRAME* EDA_DRAW_PANEL::GetParent()
{
wxWindow* mom = wxScrolledWindow::GetParent();
return (EDA_DRAW_FRAME*) mom;
@@ -1,7 +1,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2013-2014 CERN
* Copyright (C) 2013 CERN
* @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software; you can redistribute it and/or
@@ -29,7 +29,7 @@
#include <wx/colour.h>
#include <wx/filename.h>
#include <class_draw_panel_gal.h>
#include <class_drawpanel_gal.h>
#include <view/view.h>
#include <view/wx_view_controls.h>
#include <pcb_painter.h>
@@ -45,6 +45,8 @@
#include <profile.h>
#endif /* __WXDEBUG__ */
#define METRIC_UNIT_LENGTH (1e9)
EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWindowId,
const wxPoint& aPosition, const wxSize& aSize,
GalType aGalType ) :
@@ -59,6 +61,11 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin
SwitchBackend( aGalType );
SetBackgroundStyle( wxBG_STYLE_CUSTOM );
// Initial display settings
m_gal->SetLookAtPoint( VECTOR2D( 0, 0 ) );
m_gal->SetZoomFactor( 1.0 );
m_gal->ComputeWorldScreenMatrix();
m_painter = new KIGFX::PCB_PAINTER( m_gal );
m_view = new KIGFX::VIEW( true );
@@ -67,6 +74,7 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin
m_viewControls = new KIGFX::WX_VIEW_CONTROLS( m_view, this );
Connect( wxEVT_PAINT, wxPaintEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this );
Connect( wxEVT_SIZE, wxSizeEventHandler( EDA_DRAW_PANEL_GAL::onSize ), NULL, this );
/* Generic events for the Tool Dispatcher */
@@ -82,7 +90,8 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin
Connect( wxEVT_MIDDLE_DCLICK, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this );
Connect( wxEVT_MOUSEWHEEL, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this );
Connect( wxEVT_CHAR_HOOK, wxEventHandler( EDA_DRAW_PANEL_GAL::skipEvent ) );
Connect( wxEVT_CHAR, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this );
Connect( wxEVT_KEY_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this );
Connect( wxEVT_KEY_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this );
Connect( wxEVT_ENTER_WINDOW, wxEventHandler( EDA_DRAW_PANEL_GAL::onEnter ), NULL, this );
Connect( KIGFX::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE,
wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this );
@@ -122,22 +131,17 @@ void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& WXUNUSED( aEvent ) )
{
m_drawing = true;
m_view->UpdateItems();
m_gal->BeginDrawing();
m_gal->ClearScreen( m_painter->GetSettings()->GetBackgroundColor() );
if( m_view->IsDirty() )
{
m_view->ClearTargets();
// Grid has to be redrawn only when the NONCACHED target is redrawn
if( m_view->IsTargetDirty( KIGFX::TARGET_NONCACHED ) )
m_gal->DrawGrid();
m_view->Redraw();
}
m_gal->SetBackgroundColor( KIGFX::COLOR4D( 0.0, 0.0, 0.0, 1.0 ) );
m_gal->ClearScreen();
m_view->ClearTargets();
// Grid has to be redrawn only when the NONCACHED target is redrawn
if( m_view->IsTargetDirty( KIGFX::TARGET_NONCACHED ) )
m_gal->DrawGrid();
m_view->Redraw();
m_gal->DrawCursor( m_viewControls->GetCursorPosition() );
m_gal->EndDrawing();
m_drawing = false;
@@ -183,33 +187,23 @@ void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect )
}
void EDA_DRAW_PANEL_GAL::StartDrawing()
{
m_pendingRefresh = false;
Connect( wxEVT_PAINT, wxPaintEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this );
wxPaintEvent redrawEvent;
wxPostEvent( this, redrawEvent );
}
void EDA_DRAW_PANEL_GAL::StopDrawing()
{
m_pendingRefresh = true;
m_refreshTimer.Stop();
Disconnect( wxEVT_PAINT, wxPaintEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this );
m_refreshTimer.Stop();
}
void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType )
{
// Protect from refreshing during backend switch
m_pendingRefresh = true;
m_refreshTimer.Stop();
// Do not do anything if the currently used GAL is correct
if( aGalType == m_currentGal && m_gal != NULL )
return;
// Prevent refreshing canvas during backend switch
StopDrawing();
delete m_gal;
switch( aGalType )
@@ -226,6 +220,10 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType )
return;
}
m_gal->SetWorldUnitLength( 1.0 / METRIC_UNIT_LENGTH * 2.54 ); // 1 inch in nanometers
m_gal->SetScreenDPI( 106 ); // Display resolution setting
m_gal->ComputeWorldScreenMatrix();
wxSize size = GetClientSize();
m_gal->ResizeScreen( size.GetX(), size.GetY() );
@@ -233,9 +231,13 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType )
m_painter->SetGAL( m_gal );
if( m_view )
{
m_view->SetGAL( m_gal );
m_view->RecacheAllItems( true );
}
m_currentGal = aGalType;
m_pendingRefresh = false;
}
+2 -2
View File
@@ -161,7 +161,7 @@ static const char* GetHersheyShapeDescription( int AsciiCode )
}
int GraphicTextWidth( const wxString& aText, int aXSize, bool aItalic, bool aWidth )
int ReturnGraphicTextWidth( const wxString& aText, int aXSize, bool aItalic, bool aWidth )
{
int tally = 0;
int char_count = aText.length();
@@ -315,7 +315,7 @@ void DrawGraphicText( EDA_RECT* aClipBox,
current_char_pos = aPos;
dx = GraphicTextWidth( aText, size_h, aItalic, aWidth );
dx = ReturnGraphicTextWidth( aText, size_h, aItalic, aWidth );
dy = size_v;
/* Do not draw the text if out of draw area! */
+1 -1
View File
@@ -4,7 +4,7 @@
#include <fctsys.h>
#include <eda_dde.h>
#include <draw_frame.h>
#include <wxstruct.h>
#include <id.h>
#include <common.h>
#include <macros.h>
+20 -27
View File
@@ -3,7 +3,7 @@
*/
#include <fctsys.h>
#include <pgm_base.h>
#include <appl_wxstruct.h>
#include <common.h>
#include <confirm.h>
#include <gestfich.h>
@@ -14,25 +14,23 @@
#include <macros.h>
void PGM_BASE::ReadPdfBrowserInfos()
void EDA_APP::ReadPdfBrowserInfos()
{
wxASSERT( m_common_settings );
wxString browser = m_common_settings->Read( wxT( "PdfBrowserName" ), wxEmptyString );
SetPdfBrowserName( browser );
wxASSERT( m_commonSettings != NULL );
m_PdfBrowser = m_commonSettings->Read( wxT( "PdfBrowserName" ), wxEmptyString );
int tmp;
m_common_settings->Read( wxT( "UseSystemBrowser" ), &tmp, 0 );
m_use_system_pdf_browser = bool( tmp );
m_commonSettings->Read( wxT( "UseSystemBrowser" ), &tmp, 0 );
m_useSystemPdfBrowser = tmp != 0;
}
void PGM_BASE::WritePdfBrowserInfos()
void EDA_APP::WritePdfBrowserInfos()
{
wxASSERT( m_common_settings );
wxASSERT( m_commonSettings != NULL );
m_common_settings->Write( wxT( "PdfBrowserName" ), GetPdfBrowserName() );
m_common_settings->Write( wxT( "UseSystemBrowser" ), m_use_system_pdf_browser );
m_commonSettings->Write( wxT( "PdfBrowserName" ), m_PdfBrowser );
m_commonSettings->Write( wxT( "UseSystemBrowser" ), m_useSystemPdfBrowser );
}
@@ -59,24 +57,20 @@ static const wxFileTypeInfo EDAfallbacks[] =
};
bool GetAssociatedDocument( wxWindow* aParent,
bool GetAssociatedDocument( wxFrame* aFrame,
const wxString& aDocName,
const wxPathList* aPaths)
{
wxString docname, fullfilename;
wxString docname, fullfilename, file_ext;
wxString msg;
wxString command;
bool success = false;
// Is an internet url
static const wxChar* url_header[3] = {
wxT( "http:" ),
wxT( "ftp:" ),
wxT( "www." )
};
static const wxString url_header[3] = { wxT( "http:" ), wxT( "ftp:" ), wxT( "www." ) };
for( unsigned ii = 0; ii < DIM(url_header); ii++ )
for( int ii = 0; ii < 3; ii++ )
{
if( aDocName.First( url_header[ii] ) == 0 ) //. seems an internet url
{
@@ -122,7 +116,7 @@ bool GetAssociatedDocument( wxWindow* aParent,
fullfilename,
extension,
mask,
aParent,
aFrame,
wxFD_OPEN,
true,
wxPoint( -1, -1 ) );
@@ -132,14 +126,13 @@ bool GetAssociatedDocument( wxWindow* aParent,
if( !wxFileExists( fullfilename ) )
{
msg.Printf( _( "Doc File '%s' not found" ), GetChars( aDocName ) );
DisplayError( aParent, msg );
msg.Printf( _( "Doc File <%s> not found" ), GetChars( aDocName ) );
DisplayError( aFrame, msg );
return false;
}
wxFileName currentFileName( fullfilename );
wxString file_ext = currentFileName.GetExt();
wxFileName CurrentFileName( fullfilename );
file_ext = CurrentFileName.GetExt();
if( file_ext == wxT( "pdf" ) )
{
@@ -176,7 +169,7 @@ bool GetAssociatedDocument( wxWindow* aParent,
if( !success )
{
msg.Printf( _( "Unknown MIME type for doc file <%s>" ), GetChars( fullfilename ) );
DisplayError( aParent, msg );
DisplayError( aFrame, msg );
}
return success;
+13 -2
View File
@@ -32,6 +32,14 @@
#include <trigo.h> // RotatePoint
#include <class_drawpanel.h> // EDA_DRAW_PANEL
// until bzr rev 4476, Y position of vertical justification
// of multiline texts was incorrectly calculated for BOTTOM
// and CENTER vertical justification. (Only the first line was justified)
// If this line is left uncommented, the bug is fixed, but
// creates a (very minor) issue for existing texts, mainly in Pcbnew
// because the text position is sometimes critical.
#define FIX_MULTILINE_VERT_JUSTIF
// Conversion to application internal units defined at build time.
#if defined( PCBNEW )
#include <class_board_item.h>
@@ -86,7 +94,7 @@ EDA_TEXT::~EDA_TEXT()
int EDA_TEXT::LenSize( const wxString& aLine ) const
{
return GraphicTextWidth( aLine, m_Size.x, m_Italic, m_Bold );
return ReturnGraphicTextWidth( aLine, m_Size.x, m_Italic, m_Bold );
}
/**
@@ -197,6 +205,7 @@ EDA_RECT EDA_TEXT::GetTextBox( int aLine, int aThickness, bool aInvertY ) const
if( linecount > 1 )
{
#ifdef FIX_MULTILINE_VERT_JUSTIF
int yoffset;
linecount -= 1;
@@ -215,6 +224,7 @@ EDA_RECT EDA_TEXT::GetTextBox( int aLine, int aThickness, bool aInvertY ) const
rect.SetY( rect.GetY() - yoffset );
break;
}
#endif
}
rect.Inflate( thickness / 2 );
@@ -295,6 +305,7 @@ void EDA_TEXT::GetPositionsOfLinesOfMultilineText(
offset.y = GetInterline();
#ifdef FIX_MULTILINE_VERT_JUSTIF
if( aLineCount > 1 )
{
switch( m_VJustify )
@@ -315,7 +326,7 @@ void EDA_TEXT::GetPositionsOfLinesOfMultilineText(
// Rotate the position of the first line
// around the center of the multiline text block
RotatePoint( &pos, m_Pos, m_Orient );
#endif
// Rotate the offset lines to increase happened in the right direction
RotatePoint( &offset, m_Orient );
+1297
View File
File diff suppressed because it is too large Load Diff
-126
View File
@@ -1,126 +0,0 @@
#include <fctsys.h>
#include <pgm_base.h>
#include <macros.h>
#include <gestfich.h>
/**
* Function FindKicadHelpPath
* finds the absolute path for KiCad "help" (or "help/&ltlanguage&gt")
* Find path kicad/doc/help/xx/ or kicad/doc/help/:
* from BinDir
* else from environment variable KICAD
* else from one of s_HelpPathList
* typically c:/kicad/doc/help or /usr/share/kicad/help
* or /usr/local/share/kicad/help
* (must have kicad in path name)
*
* xx = iso639-1 language id (2 letters (generic) or 4 letters):
* fr = french (or fr_FR)
* en = English (or en_GB or en_US ...)
* de = deutch
* es = spanish
* pt = portuguese (or pt_BR ...)
*
* default = en (if not found = fr)
*/
wxString FindKicadHelpPath()
{
bool found = false;
wxString bin_dir = Pgm().GetExecutablePath();
if( bin_dir.Last() == '/' )
bin_dir.RemoveLast();
wxString fullPath = bin_dir.BeforeLast( '/' ); // cd ..
fullPath += wxT( "/doc/help/" );
wxString localeString = Pgm().GetLocale()->GetCanonicalName();
wxString path_tmp = fullPath;
#ifdef __WINDOWS__
path_tmp.MakeLower();
#endif
if( path_tmp.Contains( wxT( "kicad" ) ) )
{
if( wxDirExists( fullPath ) )
found = true;
}
// find kicad/help/ from environment variable KICAD
if( !found && Pgm().IsKicadEnvVariableDefined() )
{
fullPath = Pgm().GetKicadEnvVariable() + wxT( "/doc/help/" );
if( wxDirExists( fullPath ) )
found = true;
}
if( !found )
{
// Possibilities online help
const static wxChar* possibilities[] = {
#ifdef __WINDOWS__
wxT( "c:/kicad/doc/help/" ),
wxT( "d:/kicad/doc/help/" ),
wxT( "c:/Program Files/kicad/doc/help/" ),
wxT( "d:/Program Files/kicad/doc/help/" ),
#else
wxT( "/usr/share/doc/kicad/help/" ),
wxT( "/usr/local/share/doc/kicad/help/" ),
wxT( "/usr/local/kicad/doc/help/" ), // default install for "universal
// tarballs" and build for a server
// (new)
wxT( "/usr/local/kicad/help/" ), // default install for "universal
// tarballs" and build for a server
// (old)
#endif
};
for( unsigned i=0; i<DIM(possibilities); ++i )
{
fullPath = possibilities[i];
if( wxDirExists( fullPath ) )
{
found = true;
break;
}
}
}
if( found )
{
wxString langFullPath = fullPath + localeString + UNIX_STRING_DIR_SEP;
if( wxDirExists( langFullPath ) )
return langFullPath;
langFullPath = fullPath + localeString.Left( 2 ) + UNIX_STRING_DIR_SEP;
if( wxDirExists( langFullPath ) )
return langFullPath;
langFullPath = fullPath + wxT( "en/" );
if( wxDirExists( langFullPath ) )
{
return langFullPath;
}
else
{
langFullPath = fullPath + wxT( "fr/" );
if( wxDirExists( langFullPath ) )
return langFullPath;
}
return fullPath;
}
return wxEmptyString;
}
+1 -1
View File
@@ -38,7 +38,7 @@
#include <fctsys.h>
#include <common.h>
#include <macros.h>
#include <pgm_base.h>
#include <appl_wxstruct.h>
#include <wildcards_and_files_ext.h>
#include <footprint_info.h>
#include <io_mgr.h>
+284 -65
View File
@@ -24,16 +24,13 @@
*/
#include <fctsys.h>
#include <wx/config.h> // wxExpandEnvVars()
#include <wx/filename.h>
#include <wx/stdpaths.h>
#include <set>
//#include <pgm_base.h>
#include <kiface_i.h>
#include <search_stack.h>
#include <appl_wxstruct.h>
#include <pcb_netlist.h>
#include <reporter.h>
#include <footprint_info.h>
@@ -46,7 +43,20 @@
using namespace FP_LIB_TABLE_T;
static const wxChar global_tbl_name[] = wxT( "fp-lib-table" );
/**
* Definition for enabling and disabling footprint library trace output. See the
* wxWidgets documentation on using the WXTRACE environment variable.
*/
static const wxString traceFpLibTable( wxT( "KicadFpLibTable" ) );
/// The footprint library table name used when no project file is passed to Pcbnew or CvPcb.
/// This is used temporarily to store the project specific library table until the project
/// file being edited is save. It is then moved to the file fp-lib-table in the folder where
/// the project file is saved.
static wxString defaultProjectFileName( wxT( "prj-fp-lib-table" ) );
static wxString defaultFileName( wxT( "fp-lib-table" ) );
void FP_LIB_TABLE::ROW::SetType( const wxString& aType )
@@ -137,12 +147,6 @@ FP_LIB_TABLE::FP_LIB_TABLE( FP_LIB_TABLE* aFallBackTable ) :
}
FP_LIB_TABLE::~FP_LIB_TABLE()
{
// *fallBack is not owned here.
}
wxArrayString FP_LIB_TABLE::FootprintEnumerate( const wxString& aNickname )
{
const ROW* row = FindRow( aNickname );
@@ -402,6 +406,19 @@ void FP_LIB_TABLE::ROW::Format( OUTPUTFORMATTER* out, int nestLevel ) const
);
}
void FP_LIB_TABLE::Save( const wxFileName& aPath ) const throw( IO_ERROR )
{
wxFileName fn = GetProjectFileName( aPath );
wxLogTrace( traceFpLibTable, wxT( "Saving footprint libary table <%s>." ),
GetChars( fn.GetFullPath() ) );
FILE_OUTPUTFORMATTER sf( fn.GetFullPath() );
Format( &sf, 0 );
}
#define OPT_SEP '|' ///< options separator character
PROPERTIES* FP_LIB_TABLE::ParseOptions( const std::string& aOptionsList )
@@ -520,16 +537,9 @@ std::vector<wxString> FP_LIB_TABLE::GetLogicalLibs()
} while( ( cur = cur->fallBack ) != 0 );
ret.reserve( unique.size() );
// DBG(printf( "%s: count:%zd\n", __func__, unique.size() );)
// return a sorted, unique set of nicknames in a std::vector<wxString> to caller
for( std::set<wxString>::const_iterator it = unique.begin(); it!=unique.end(); ++it )
{
//DBG(printf( " %s\n", TO_UTF8( *it ) );)
ret.push_back( *it );
}
return ret;
}
@@ -635,6 +645,8 @@ const FP_LIB_TABLE::ROW* FP_LIB_TABLE::FindRow( const wxString& aNickname )
// wxGetenv( wchar_t* ) is not re-entrant on linux.
// Put a lock on multithreaded use of wxGetenv( wchar_t* ), called from wxEpandEnvVars(),
// needed by bool ReadFootprintFiles( FP_LIB_TABLE* aTable, const wxString* aNickname = NULL );
#if 1
#include <ki_mutex.h>
const wxString FP_LIB_TABLE::ExpandSubstitutions( const wxString& aString )
@@ -648,57 +660,262 @@ const wxString FP_LIB_TABLE::ExpandSubstitutions( const wxString& aString )
return wxExpandEnvVars( aString );
}
#else
const wxString FP_LIB_TABLE::ExpandSubstitutions( const wxString& aString )
{
// We reserve the right to do this another way, by providing our own member
// function.
return wxExpandEnvVars( aString );
}
#endif
bool FP_LIB_TABLE::IsEmpty( bool aIncludeFallback )
{
if( !aIncludeFallback || !fallBack )
if( !aIncludeFallback || (fallBack == NULL) )
return rows.empty();
return rows.empty() && fallBack->IsEmpty( true );
return fallBack->IsEmpty() && rows.empty();
}
MODULE* FP_LIB_TABLE::FootprintLoadWithOptionalNickname( const FPID& aFootprintId )
throw( IO_ERROR, PARSE_ERROR )
bool FP_LIB_TABLE::MissingLegacyLibs( const wxArrayString& aLibNames, wxString* aErrorMsg )
{
wxString nickname = aFootprintId.GetLibNickname();
wxString fpname = aFootprintId.GetFootprintName();
bool retv = false;
if( nickname.size() )
for( unsigned i = 0; i < aLibNames.GetCount(); i++ )
{
return FootprintLoad( nickname, fpname );
wxFileName fn = wxFileName( wxEmptyString, aLibNames[i], LegacyFootprintLibPathExtension );
wxString legacyLibPath = wxGetApp().FindLibraryPath( fn );
if( legacyLibPath.IsEmpty() )
continue;
if( FindRowByURI( legacyLibPath ) == 0 )
{
retv = true;
if( aErrorMsg )
*aErrorMsg += wxT( "\"" ) + legacyLibPath + wxT( "\"\n" );
}
}
// nickname is empty, sequentially search (alphabetically) all libs/nicks for first match:
else
{
std::vector<wxString> nicks = GetLogicalLibs();
return retv;
}
// Search each library going through libraries alphabetically.
for( unsigned i = 0; i<nicks.size(); ++i )
bool FP_LIB_TABLE::ConvertFromLegacy( NETLIST& aNetList, const wxArrayString& aLibNames,
REPORTER* aReporter ) throw( IO_ERROR )
{
wxString msg;
FPID lastFPID;
COMPONENT* component;
MODULE* module = 0;
bool retv = true;
if( aNetList.IsEmpty() )
return true;
aNetList.SortByFPID();
wxString libPath;
wxFileName fn;
PLUGIN::RELEASER pi( IO_MGR::PluginFind( IO_MGR::LEGACY ) );
for( unsigned ii = 0; ii < aNetList.GetCount(); ii++ )
{
component = aNetList.GetComponent( ii );
// The footprint hasn't been assigned yet so ignore it.
if( component->GetFPID().empty() )
continue;
if( component->GetFPID() != lastFPID )
{
// FootprintLoad() returns NULL on not found, does not throw exception
// unless there's an IO_ERROR.
MODULE* ret = FootprintLoad( nicks[i], fpname );
if( ret )
return ret;
module = NULL;
for( unsigned ii = 0; ii < aLibNames.GetCount(); ii++ )
{
fn = wxFileName( wxEmptyString, aLibNames[ii], LegacyFootprintLibPathExtension );
libPath = wxGetApp().FindLibraryPath( fn );
if( !libPath )
{
if( aReporter )
{
msg.Printf( _( "Cannot find footprint library file '%s' in any of the "
"KiCad legacy library search paths.\n" ),
GetChars( fn.GetFullPath() ) );
aReporter->Report( msg );
}
retv = false;
continue;
}
module = pi->FootprintLoad( libPath, component->GetFPID().GetFootprintName() );
if( module )
{
lastFPID = component->GetFPID();
break;
}
}
}
return NULL;
if( module == NULL )
{
if( aReporter )
{
msg.Printf( _( "Component `%s` footprint '%s' was not found in any legacy "
"library.\n" ),
GetChars( component->GetReference() ),
GetChars( component->GetFPID().Format() ) );
aReporter->Report( msg );
}
// Clear the footprint assignment since the old library lookup method is no
// longer valid.
FPID emptyFPID;
component->SetFPID( emptyFPID );
retv = false;
continue;
}
else
{
wxString libNickname;
FP_LIB_TABLE* cur = this;
do
{
cur->ensureIndex();
for( unsigned i = 0; i < cur->rows.size(); i++ )
{
wxString uri = cur->rows[i].GetFullURI( true );
if( wxFileName::GetPathSeparator() == wxChar( '\\' )
&& uri.Find( wxChar( '/' ) ) >= 0 )
uri.Replace( wxT( "/"), wxT( "\\" ) );
#ifdef __WINDOWS__
if( uri.CmpNoCase( libPath ) )
#else
if( uri == libPath )
#endif
{
libNickname = cur->rows[i].GetNickName();
break;
}
}
} while( ( cur = cur->fallBack ) != 0 && libNickname.IsEmpty() );
if( libNickname.IsEmpty() )
{
if( aReporter )
{
msg.Printf( _( "Component `%s` footprint '%s' legacy library path <%s > "
"was not found in the footprint library table.\n" ),
GetChars( component->GetReference() ),
GetChars( component->GetFPID().Format() ) );
aReporter->Report( msg );
}
retv = false;
}
else
{
FPID newFPID = lastFPID;
newFPID.SetLibNickname( libNickname );
if( !newFPID.IsValid() )
{
if( aReporter )
{
msg.Printf( _( "Component `%s` FPID '%s' is not valid.\n" ),
GetChars( component->GetReference() ),
GetChars( newFPID.Format() ) );
aReporter->Report( msg );
}
retv = false;
}
else
{
// The footprint name should already be set.
component->SetFPID( newFPID );
}
}
}
}
return retv;
}
void FP_LIB_TABLE::SetProjectPathEnvVariable( const wxFileName& aPath )
{
wxString path;
if( !aPath.IsOk() || !aPath.DirExists() )
path = wxEmptyString;
else
path = aPath.GetPath();
wxLogTrace( traceFpLibTable, wxT( "Setting env %s to '%s'." ),
GetChars( ProjectPathEnvVariableName() ), GetChars( path ) );
wxSetEnv( ProjectPathEnvVariableName(), path );
}
const wxString FP_LIB_TABLE::ProjectPathEnvVariableName()
{
return wxT( "KIPRJMOD" );
}
const wxString FP_LIB_TABLE::GlobalPathEnvVariableName()
{
return wxT( "KISYSMOD" );
return wxT( KISYSMOD );
}
wxString FP_LIB_TABLE::GetProjectFileName( const wxFileName& aPath )
{
wxFileName fn = aPath;
// Set $KICAD_PRJ_PATH to user's configuration path if aPath is not set or does not exist.
if( !aPath.IsOk() || !aPath.DirExists() )
{
fn.AssignDir( wxStandardPaths::Get().GetUserConfigDir() );
#if defined( __WINDOWS__ )
fn.AppendDir( wxT( "kicad" ) );
#endif
fn.SetName( defaultProjectFileName );
}
else
{
fn.AssignDir( aPath.GetPath() );
fn.SetName( defaultFileName );
}
wxLogTrace( traceFpLibTable, wxT( "Project specific footprint library table file '%s'." ),
GetChars( fn.GetFullPath() ) );
return fn.GetFullPath();
}
bool FP_LIB_TABLE::LoadGlobalTable( FP_LIB_TABLE& aTable ) throw (IO_ERROR, PARSE_ERROR )
{
bool tableExists = true;
wxFileName fn = GetGlobalTableFileName();
bool tableExists = true;
wxFileName fn = GetGlobalTableFileName();
if( !fn.FileExists() )
{
@@ -710,21 +927,23 @@ bool FP_LIB_TABLE::LoadGlobalTable( FP_LIB_TABLE& aTable ) throw (IO_ERROR, PARS
GetChars( fn.GetPath() ) ) );
}
// Attempt to copy the default global file table from the KiCad
// template folder to the user's home configuration path.
wxString fileName = Kiface().KifaceSearch().FindValidPath( global_tbl_name );
// Attempt to copy the default global file table from the KiCad template folder to
// the users home configuration path.
wxString fileName = wxGetApp().FindLibraryPath( defaultFileName );
// The fallback is to create an empty global footprint table for the user to populate.
if( fileName.IsEmpty() || !::wxCopyFile( fileName, fn.GetFullPath(), false ) )
{
FP_LIB_TABLE emptyTable;
emptyTable.Save( fn.GetFullPath() );
FP_LIB_TABLE emptyTable;
FILE_OUTPUTFORMATTER sf( fn.GetFullPath() );
emptyTable.Format( &sf, 0 );
}
}
aTable.Load( fn.GetFullPath() );
FILE_LINE_READER reader( fn.GetFullPath() );
FP_LIB_TABLE_LEXER lexer( &reader );
aTable.Parse( &lexer );
return tableExists;
}
@@ -733,38 +952,38 @@ wxString FP_LIB_TABLE::GetGlobalTableFileName()
{
wxFileName fn;
// This is possibly problematic with an uncertain wxApp title, which is now
// the case. We'll need a better technique soon.
fn.SetPath( wxStandardPaths::Get().GetUserConfigDir() );
#if defined( __WINDOWS__ )
fn.AppendDir( wxT( "kicad" ) );
#endif
fn.SetName( global_tbl_name );
fn.SetName( GetFileName() );
wxLogTrace( traceFpLibTable, wxT( "Global footprint library table file '%s'." ),
GetChars( fn.GetFullPath() ) );
return fn.GetFullPath();
}
// prefer wxString filename so it can be seen in a debugger easier than wxFileName.
void FP_LIB_TABLE::Load( const wxString& aFileName )
const wxString& FP_LIB_TABLE::GetFileName()
{
return defaultFileName;
}
void FP_LIB_TABLE::Load( const wxFileName& aFileName, FP_LIB_TABLE* aFallBackTable )
throw( IO_ERROR )
{
// It's OK if footprint library tables are missing.
if( wxFileName::IsFileReadable( aFileName ) )
{
FILE_LINE_READER reader( aFileName );
FP_LIB_TABLE_LEXER lexer( &reader );
fallBack = aFallBackTable;
// Empty footprint library tables are valid.
if( aFileName.IsOk() && aFileName.FileExists() )
{
FILE_LINE_READER reader( aFileName.GetFullPath() );
FP_LIB_TABLE_LEXER lexer( &reader );
Parse( &lexer );
}
}
void FP_LIB_TABLE::Save( const wxString& aFileName ) const throw( IO_ERROR )
{
FILE_OUTPUTFORMATTER sf( aFileName );
Format( &sf, 0 );
}
+27 -14
View File
@@ -62,7 +62,6 @@ const char* EndsWithRev( const char* start, const char* tail, char separator )
}
#if 0 // Not used
int RevCmp( const char* s1, const char* s2 )
{
int r = strncmp( s1, s2, 3 );
@@ -77,7 +76,6 @@ int RevCmp( const char* s1, const char* s2 )
return -(rnum1 - rnum2); // swap the sign, higher revs first
}
#endif
//----<Policy and field test functions>-------------------------------------
@@ -118,7 +116,7 @@ void FPID::clear()
}
int FPID::Parse( const UTF8& aId )
int FPID::Parse( const std::string& aId )
{
clear();
@@ -173,6 +171,12 @@ int FPID::Parse( const UTF8& aId )
}
int FPID::Parse( const wxString& aId )
{
return Parse( std::string( TO_UTF8( aId ) ) );
}
FPID::FPID( const std::string& aId ) throw( PARSE_ERROR )
{
int offset = Parse( aId );
@@ -190,14 +194,14 @@ FPID::FPID( const std::string& aId ) throw( PARSE_ERROR )
FPID::FPID( const wxString& aId ) throw( PARSE_ERROR )
{
UTF8 id = aId;
std::string id = TO_UTF8( aId );
int offset = Parse( id );
if( offset != -1 )
{
THROW_PARSE_ERROR( _( "Illegal character found in FPID string" ),
aId,
wxString::FromUTF8( id.c_str() ),
id.c_str(),
0,
offset );
@@ -205,7 +209,7 @@ FPID::FPID( const wxString& aId ) throw( PARSE_ERROR )
}
int FPID::SetLibNickname( const UTF8& aLogical )
int FPID::SetLibNickname( const std::string& aLogical )
{
int offset = okLogical( aLogical );
@@ -218,9 +222,15 @@ int FPID::SetLibNickname( const UTF8& aLogical )
}
int FPID::SetFootprintName( const UTF8& aFootprintName )
int FPID::SetLibNickname( const wxString& aLogical )
{
int separation = int( aFootprintName.find_first_of( "/" ) );
return SetLibNickname( std::string( TO_UTF8( aLogical ) ) );
}
int FPID::SetFootprintName( const std::string& aFootprintName )
{
int separation = int( aFootprintName.find_first_of( "/" ) );
if( separation != -1 )
{
@@ -236,7 +246,13 @@ int FPID::SetFootprintName( const UTF8& aFootprintName )
}
int FPID::SetRevision( const UTF8& aRevision )
int FPID::SetFootprintName( const wxString& aFootprintName )
{
return SetFootprintName( std::string( TO_UTF8( aFootprintName ) ) );
}
int FPID::SetRevision( const std::string& aRevision )
{
int offset = okRevision( aRevision );
@@ -285,10 +301,8 @@ UTF8 FPID::GetFootprintNameAndRev() const
}
#if 0 // this is broken, it does not output aFootprintName for some reason
UTF8 FPID::Format( const UTF8& aLogicalLib, const UTF8& aFootprintName,
const UTF8& aRevision )
UTF8 FPID::Format( const std::string& aLogicalLib, const std::string& aFootprintName,
const std::string& aRevision )
throw( PARSE_ERROR )
{
UTF8 ret;
@@ -330,7 +344,6 @@ UTF8 FPID::Format( const UTF8& aLogicalLib, const UTF8& aFootprintName,
return ret;
}
#endif
int FPID::compare( const FPID& aFPID ) const
+22 -26
View File
@@ -35,9 +35,8 @@
using namespace KIGFX;
const float CAIRO_GAL::LAYER_ALPHA = 0.8;
///> Opacity of a single layer
const float LAYER_ALPHA = 0.8;
CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener,
wxEvtHandler* aPaintListener, const wxString& aName ) :
@@ -74,16 +73,14 @@ CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener,
#endif
SetSize( aParent->GetSize() );
screenSize = VECTOR2I( aParent->GetSize() );
initCursor();
screenSize = VECTOR2D( aParent->GetSize() );
initCursor( 20 );
// Grid color settings are different in Cairo and OpenGL
SetGridColor( COLOR4D( 0.1, 0.1, 0.1, 0.8 ) );
// Allocate memory for pixel storage
allocateBitmaps();
initSurface();
}
@@ -142,7 +139,7 @@ void CAIRO_GAL::EndDrawing()
*wxOutputPtr++ = value & 0xff; // Blue pixel
}
wxImage img( screenSize.x, screenSize.y, (unsigned char*) wxOutput, true );
wxImage img( (int) screenSize.x, (int) screenSize.y, (unsigned char*) wxOutput, true );
wxBitmap bmp( img );
wxClientDC client_dc( this );
wxBufferedDC dc;
@@ -287,7 +284,7 @@ void CAIRO_GAL::DrawCurve( const VECTOR2D& aStartPoint, const VECTOR2D& aControl
void CAIRO_GAL::ResizeScreen( int aWidth, int aHeight )
{
screenSize = VECTOR2I( aWidth, aHeight );
screenSize = VECTOR2D( aWidth, aHeight );
// Recreate the bitmaps
deleteBitmaps();
@@ -319,10 +316,10 @@ void CAIRO_GAL::Flush()
}
void CAIRO_GAL::ClearScreen( const COLOR4D& aColor )
void CAIRO_GAL::ClearScreen()
{
backgroundColor = aColor;
cairo_set_source_rgb( currentContext, aColor.r, aColor.g, aColor.b );
cairo_set_source_rgb( currentContext,
backgroundColor.r, backgroundColor.g, backgroundColor.b );
cairo_rectangle( currentContext, 0.0, 0.0, screenSize.x, screenSize.y );
cairo_fill( currentContext );
}
@@ -434,7 +431,7 @@ void CAIRO_GAL::SetLayerDepth( double aLayerDepth )
}
void CAIRO_GAL::Transform( const MATRIX3x3D& aTransformation )
void CAIRO_GAL::Transform( MATRIX3x3D aTransformation )
{
cairo_matrix_t cairoTransformation;
@@ -888,10 +885,11 @@ void CAIRO_GAL::skipMouseEvent( wxMouseEvent& aEvent )
}
void CAIRO_GAL::initCursor()
void CAIRO_GAL::initCursor( int aCursorSize )
{
cursorPixels = new wxBitmap( cursorSize, cursorSize );
cursorPixelsSaved = new wxBitmap( cursorSize, cursorSize );
cursorPixels = new wxBitmap( aCursorSize, aCursorSize );
cursorPixelsSaved = new wxBitmap( aCursorSize, aCursorSize );
cursorSize = aCursorSize;
wxMemoryDC cursorShape( *cursorPixels );
@@ -902,8 +900,8 @@ void CAIRO_GAL::initCursor()
cursorShape.SetPen( pen );
cursorShape.Clear();
cursorShape.DrawLine( 0, cursorSize / 2, cursorSize, cursorSize / 2 );
cursorShape.DrawLine( cursorSize / 2, 0, cursorSize / 2, cursorSize );
cursorShape.DrawLine( 0, aCursorSize / 2, aCursorSize, aCursorSize / 2 );
cursorShape.DrawLine( aCursorSize / 2, 0, aCursorSize / 2, aCursorSize );
}
@@ -927,15 +925,14 @@ void CAIRO_GAL::blitCursor( wxBufferedDC& clientDC )
}
// Store pixels that are going to be overpainted
VECTOR2D cursorScreen = ToScreen( cursorPosition ) - cursorSize / 2;
cursorSave.Blit( 0, 0, cursorSize, cursorSize, &clientDC, cursorScreen.x, cursorScreen.y );
cursorSave.Blit( 0, 0, cursorSize, cursorSize, &clientDC, cursorPosition.x, cursorPosition.y );
// Draw the cursor
clientDC.Blit( cursorScreen.x, cursorScreen.y, cursorSize, cursorSize,
clientDC.Blit( cursorPosition.x, cursorPosition.y, cursorSize, cursorSize,
&cursorShape, 0, 0, wxOR );
savedCursorPosition.x = (wxCoord) cursorScreen.x;
savedCursorPosition.y = (wxCoord) cursorScreen.y;
savedCursorPosition.x = (wxCoord) cursorPosition.x;
savedCursorPosition.y = (wxCoord) cursorPosition.y;
}
@@ -961,8 +958,7 @@ void CAIRO_GAL::deleteBitmaps()
void CAIRO_GAL::initSurface()
{
if( isInitialized )
return;
wxASSERT( !isInitialized );
// Create the Cairo surface
surface = cairo_image_surface_create_for_data( (unsigned char*) bitmapBuffer, GAL_FORMAT,
@@ -977,7 +973,7 @@ void CAIRO_GAL::initSurface()
cairo_set_antialias( context, CAIRO_ANTIALIAS_SUBPIXEL );
// Clear the screen
ClearScreen( backgroundColor );
ClearScreen();
// Compute the world <-> screen transformations
ComputeWorldScreenMatrix();
+35 -43
View File
@@ -31,10 +31,6 @@
using namespace KIGFX;
const double GAL::METRIC_UNIT_LENGTH = 1e9;
GAL::GAL() :
strokeFont( this )
{
@@ -43,10 +39,7 @@ GAL::GAL() :
SetIsStroke( true );
SetFillColor( COLOR4D( 0.0, 0.0, 0.0, 0.0 ) );
SetStrokeColor( COLOR4D( 1.0, 1.0, 1.0, 1.0 ) );
SetLookAtPoint( VECTOR2D( 0, 0 ) );
SetZoomFactor( 1.0 );
SetWorldUnitLength( 1.0 / METRIC_UNIT_LENGTH * 2.54 ); // 1 inch in nanometers
SetScreenDPI( 106 ); // Display resolution setting
SetDepthRange( VECTOR2D( GAL::MIN_DEPTH, GAL::MAX_DEPTH ) );
SetFlip( false, false );
SetLineWidth( 1.0 );
@@ -92,7 +85,7 @@ void GAL::ComputeWorldScreenMatrix()
MATRIX3x3D translation;
translation.SetIdentity();
translation.SetTranslation( 0.5 * VECTOR2D( screenSize ) );
translation.SetTranslation( 0.5 * screenSize );
MATRIX3x3D scale;
scale.SetIdentity();
@@ -119,26 +112,23 @@ void GAL::DrawGrid()
SetTarget( TARGET_NONCACHED );
// Draw the origin marker
double originSize = gridOriginMarkerSize / worldScale;
double origSize = static_cast<double>( gridOriginMarkerSize ) / worldScale;
SetLayerDepth( GAL::GRID_DEPTH );
SetIsFill( false );
SetIsStroke( true );
SetStrokeColor( COLOR4D( 1.0, 1.0, 1.0, 1.0 ) );
SetLineWidth( gridLineWidth / worldScale );
DrawLine( gridOrigin + VECTOR2D( -originSize, -originSize ),
gridOrigin + VECTOR2D( originSize, originSize ) );
DrawLine( gridOrigin + VECTOR2D( -originSize, originSize ),
gridOrigin + VECTOR2D( originSize, -originSize ) );
DrawCircle( gridOrigin, originSize * 0.7 );
DrawLine( gridOrigin + VECTOR2D( -origSize, -origSize ),
gridOrigin + VECTOR2D( origSize, origSize ) );
DrawLine( gridOrigin + VECTOR2D( -origSize, origSize ),
gridOrigin + VECTOR2D( origSize, -origSize ) );
DrawCircle( gridOrigin, origSize * 0.7 );
// Draw the grid
// For the drawing the start points, end points and increments have
// to be calculated in world coordinates
gridOffset = VECTOR2D( (long) gridOrigin.x % (long) gridSize.x,
(long) gridOrigin.y % (long) gridSize.y );
VECTOR2D worldStartPoint = screenWorldMatrix * VECTOR2D( 0.0, 0.0 );
VECTOR2D worldEndPoint = screenWorldMatrix * VECTOR2D( screenSize );
VECTOR2D worldStartPoint = screenWorldMatrix * VECTOR2D( 0.0, 0.0 );
VECTOR2D worldEndPoint = screenWorldMatrix * screenSize;
int gridScreenSizeDense = round( gridSize.x * worldScale );
int gridScreenSizeCoarse = round( gridSize.x * static_cast<double>( gridTick ) * worldScale );
@@ -151,19 +141,20 @@ void GAL::DrawGrid()
if( std::max( gridScreenSizeDense, gridScreenSizeCoarse ) > gridDrawThreshold )
{
// Compute grid variables
int gridStartX = round( worldStartPoint.x / gridSize.x );
int gridEndX = round( worldEndPoint.x / gridSize.x );
int gridStartY = round( worldStartPoint.y / gridSize.y );
int gridEndY = round( worldEndPoint.y / gridSize.y );
int gridStartX = round( worldStartPoint.x / gridSize.x );
int gridEndX = round( worldEndPoint.x / gridSize.x );
int gridStartY = round( worldStartPoint.y / gridSize.y );
int gridEndY = round( worldEndPoint.y / gridSize.y );
assert( gridEndX >= gridStartX );
assert( gridEndY >= gridStartY );
// Swap the coordinates, if they have not the right order
SWAP( gridEndX, <, gridStartX );
SWAP( gridEndY, <, gridStartY );
// Correct the index, else some lines are not correctly painted
gridStartX -= ( gridOrigin.x / gridSize.x ) + 1;
gridStartY -= ( gridOrigin.y / gridSize.y ) + 1;
gridEndX += ( gridOrigin.x / gridSize.x ) + 1;
gridEndY += ( gridOrigin.y / gridSize.y ) + 1;
gridStartX -= 1;
gridStartY -= 1;
gridEndX += 1;
gridEndY += 1;
// Draw the grid behind all other layers
SetLayerDepth( depthRange.y * 0.75 );
@@ -175,8 +166,6 @@ void GAL::DrawGrid()
SetStrokeColor( gridColor );
// Now draw the grid, every coarse grid line gets the double width
// Vertical lines
for( int j = gridStartY; j < gridEndY; j += 1 )
{
if( j % gridTick == 0 && gridScreenSizeDense > gridDrawThreshold )
@@ -187,12 +176,11 @@ void GAL::DrawGrid()
if( ( j % gridTick == 0 && gridScreenSizeCoarse > gridDrawThreshold )
|| gridScreenSizeDense > gridDrawThreshold )
{
drawGridLine( VECTOR2D( gridStartX * gridSize.x, j * gridSize.y + gridOrigin.y ),
VECTOR2D( gridEndX * gridSize.x, j * gridSize.y + gridOrigin.y ) );
drawGridLine( VECTOR2D( gridStartX * gridSize.x, j * gridSize.y ),
VECTOR2D( gridEndX * gridSize.x, j * gridSize.y ) );
}
}
// Horizontal lines
for( int i = gridStartX; i < gridEndX; i += 1 )
{
if( i % gridTick == 0 && gridScreenSizeDense > gridDrawThreshold )
@@ -203,8 +191,8 @@ void GAL::DrawGrid()
if( ( i % gridTick == 0 && gridScreenSizeCoarse > gridDrawThreshold )
|| gridScreenSizeDense > gridDrawThreshold )
{
drawGridLine( VECTOR2D( i * gridSize.x + gridOrigin.x, gridStartY * gridSize.y ),
VECTOR2D( i * gridSize.x + gridOrigin.x, gridEndY * gridSize.y ) );
drawGridLine( VECTOR2D( i * gridSize.x, gridStartY * gridSize.y ),
VECTOR2D( i * gridSize.x, gridEndY * gridSize.y ) );
}
}
}
@@ -232,10 +220,10 @@ void GAL::DrawGrid()
if( tickX || tickY || gridScreenSizeDense > gridDrawThreshold )
{
double radius = ( tickX && tickY ) ? doubleMarker : marker;
DrawRectangle( VECTOR2D( i * gridSize.x - radius + gridOrigin.x,
j * gridSize.y - radius + gridOrigin.y ),
VECTOR2D( i * gridSize.x + radius + gridOrigin.x,
j * gridSize.y + radius + gridOrigin.y ) );
DrawRectangle( VECTOR2D( i * gridSize.x - radius,
j * gridSize.y - radius ),
VECTOR2D( i * gridSize.x + radius,
j * gridSize.y + radius ) );
}
}
}
@@ -244,8 +232,12 @@ void GAL::DrawGrid()
}
VECTOR2D GAL::GetGridPoint( const VECTOR2D& aPoint ) const
VECTOR2D GAL::GetGridPoint( VECTOR2D aPoint ) const
{
return VECTOR2D( round( ( aPoint.x - gridOffset.x ) / gridSize.x ) * gridSize.x + gridOffset.x,
round( ( aPoint.y - gridOffset.y ) / gridSize.y ) * gridSize.y + gridOffset.y );
VECTOR2D pointWorld = ToWorld( aPoint );
pointWorld.x = round( pointWorld.x / gridSize.x ) * gridSize.x;
pointWorld.y = round( pointWorld.y / gridSize.y ) * gridSize.y;
return ToScreen( pointWorld );
}
+1 -1
View File
@@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may search the http:O//www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
+39 -41
View File
@@ -86,7 +86,8 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener,
#endif
SetSize( aParent->GetSize() );
screenSize = VECTOR2I( aParent->GetSize() );
screenSize = VECTOR2D( aParent->GetSize() );
initCursor( 80 );
// Grid color settings are different in Cairo and OpenGL
SetGridColor( COLOR4D( 0.8, 0.8, 0.8, 0.1 ) );
@@ -102,8 +103,6 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener,
}
gluTessProperty( tesselator, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_POSITIVE );
currentManager = &nonCachedManager;
}
@@ -251,8 +250,6 @@ void OPENGL_GAL::DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoin
const VECTOR2D startEndVector = aEndPoint - aStartPoint;
double lineAngle = startEndVector.Angle();
currentManager->Color( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a );
drawLineQuad( aStartPoint, aEndPoint );
// Line caps
@@ -470,15 +467,10 @@ void OPENGL_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEn
void OPENGL_GAL::DrawPolyline( std::deque<VECTOR2D>& aPointList )
{
if( aPointList.empty() )
return;
currentManager->Color( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a );
std::deque<VECTOR2D>::const_iterator it = aPointList.begin();
// Start from the second point
for( ++it; it != aPointList.end(); ++it )
for( it++; it != aPointList.end(); it++ )
{
const VECTOR2D startEndVector = ( *it - *( it - 1 ) );
double lineAngle = startEndVector.Angle();
@@ -562,7 +554,7 @@ void OPENGL_GAL::DrawCurve( const VECTOR2D& aStartPoint, const VECTOR2D& aContro
void OPENGL_GAL::ResizeScreen( int aWidth, int aHeight )
{
screenSize = VECTOR2I( aWidth, aHeight );
screenSize = VECTOR2D( aWidth, aHeight );
// Resize framebuffers
compositor.Resize( aWidth, aHeight );
@@ -589,15 +581,24 @@ void OPENGL_GAL::Flush()
}
void OPENGL_GAL::ClearScreen( const COLOR4D& aColor )
void OPENGL_GAL::ClearScreen()
{
// Clear screen
glClearColor( aColor.r, aColor.g, aColor.b, aColor.a );
glClearColor( backgroundColor.r, backgroundColor.g, backgroundColor.b, backgroundColor.a );
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
}
void OPENGL_GAL::Transform( const MATRIX3x3D& aTransformation )
void OPENGL_GAL::SetStrokeColor( const COLOR4D& aColor )
{
strokeColor = aColor;
// This is the default drawing color
currentManager->Color( aColor.r, aColor.g, aColor.b, aColor.a );
}
void OPENGL_GAL::Transform( MATRIX3x3D aTransformation )
{
GLdouble matrixData[16] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 };
@@ -766,8 +767,8 @@ void OPENGL_GAL::DrawCursor( const VECTOR2D& aCursorPosition )
{
// Now we should only store the position of the mouse cursor
// The real drawing routines are in blitCursor()
VECTOR2D screenCursor = worldScreenMatrix * aCursorPosition;
cursorPosition = screenWorldMatrix * VECTOR2D( screenCursor.x, screenSize.y - screenCursor.y );
cursorPosition = VECTOR2D( aCursorPosition.x,
screenSize.y - aCursorPosition.y ); // invert Y axis
}
@@ -777,9 +778,13 @@ void OPENGL_GAL::drawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEnd
// We do not need a very precise comparison here (the lineWidth is set by GAL::DrawGrid())
if( fabs( lineWidth - 2.0 * gridLineWidth / worldScale ) < 0.1 )
{
glLineWidth( 1.0 );
}
else
{
glLineWidth( 2.0 );
}
glColor4d( gridColor.r, gridColor.g, gridColor.b, gridColor.a );
@@ -793,23 +798,8 @@ void OPENGL_GAL::drawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEnd
}
void OPENGL_GAL::drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint )
inline void OPENGL_GAL::drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint )
{
/* Helper drawing: ____--- v3 ^
* ____---- ... \ \
* ____---- ... \ end \
* v1 ____---- ... ____---- \ width
* ---- ...___---- \ \
* \ ___...-- \ v
* \ ____----... ____---- v2
* ---- ... ____----
* start \ ... ____----
* \... ____----
* ----
* v0
* dots mark triangles' hypotenuses
*/
VECTOR2D startEndVector = aEndPoint - aStartPoint;
double lineLength = startEndVector.EuclideanNorm();
double scale = 0.5 * lineWidth / lineLength;
@@ -867,8 +857,8 @@ void OPENGL_GAL::drawFilledSemiCircle( const VECTOR2D& aCenterPoint, double aRad
/* Draw a triangle that contains the semicircle, then shade it to leave only
* the semicircle. Parameters given to setShader are indices of the triangle's vertices
* (if you want to understand more, check the vertex shader source [shader.vert]).
* Shader uses these coordinates to determine if fragments are inside the semicircle or not.
* (if you want to understand more, check the vertex shader source [shader.vert]).
* Shader uses this coordinates to determine if fragments are inside the semicircle or not.
* v2
* /\
* /__\
@@ -898,9 +888,9 @@ void OPENGL_GAL::drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRa
/* Draw a triangle that contains the semicircle, then shade it to leave only
* the semicircle. Parameters given to setShader are indices of the triangle's vertices
* (if you want to understand more, check the vertex shader source [shader.vert]), the
* radius and the line width. Shader uses these coordinates to determine if fragments are
* inside the semicircle or not.
* (if you want to understand more, check the vertex shader source [shader.vert]), the
* radius and the line width. Shader uses this coordinates to determine if fragments are
* inside the semicircle or not.
* v2
* /\
* /__\
@@ -978,6 +968,12 @@ void OPENGL_GAL::initGlew()
}
void OPENGL_GAL::initCursor( int aCursorSize )
{
cursorSize = aCursorSize;
}
void OPENGL_GAL::blitCursor()
{
if( !isCursorEnabled )
@@ -985,9 +981,11 @@ void OPENGL_GAL::blitCursor()
compositor.SetBuffer( OPENGL_COMPOSITOR::DIRECT_RENDERING );
VECTOR2D cursorBegin = cursorPosition - cursorSize / ( 2 * worldScale );
VECTOR2D cursorEnd = cursorPosition + cursorSize / ( 2 * worldScale );
VECTOR2D cursorCenter = ( cursorBegin + cursorEnd ) / 2;
VECTOR2D cursorBegin = ToWorld( cursorPosition -
VECTOR2D( cursorSize / 2, cursorSize / 2 ) );
VECTOR2D cursorEnd = ToWorld( cursorPosition +
VECTOR2D( cursorSize / 2, cursorSize / 2 ) );
VECTOR2D cursorCenter = ( cursorBegin + cursorEnd ) / 2.0;
glDisable( GL_TEXTURE_2D );
glLineWidth( 1.0 );
+4 -4
View File
@@ -268,9 +268,9 @@ void STROKE_FONT::drawSingleLineText( const UTF8& aText )
// If it is a double tilda, just process the second one
}
int dd = *chIt - ' ';
unsigned dd = *chIt - ' ';
if( dd >= (int) m_glyphBoundingBoxes.size() || dd < 0 )
if( dd >= m_glyphBoundingBoxes.size() || dd < 0 )
dd = '?' - ' ';
GLYPH& glyph = m_glyphs[dd];
@@ -336,9 +336,9 @@ VECTOR2D STROKE_FONT::computeTextSize( const UTF8& aText ) const
}
// Index in the bounding boxes table
int dd = *it - ' ';
unsigned dd = *it - ' ';
if( dd >= (int) m_glyphBoundingBoxes.size() || dd < 0 )
if( dd >= m_glyphBoundingBoxes.size() || dd < 0 )
dd = '?' - ' ';
result.x += m_glyphSize.x * m_glyphBoundingBoxes[dd].GetEnd().x;
File diff suppressed because it is too large Load Diff
+85 -186
View File
@@ -23,13 +23,11 @@
*/
#include <math/vector2d.h>
#include <math.h>
#include <geometry/shape.h>
#include <geometry/shape_line_chain.h>
#include <geometry/shape_circle.h>
#include <geometry/shape_rect.h>
#include <geometry/shape_segment.h>
typedef VECTOR2I::extended_type ecoord;
@@ -47,21 +45,25 @@ static inline bool Collide( const SHAPE_CIRCLE& aA, const SHAPE_CIRCLE& aB, int
return false;
if( aNeedMTV )
aMTV = delta.Resize( min_dist - sqrt( dist_sq ) + 3 ); // fixme: apparent rounding error
aMTV = delta.Resize( sqrt( abs( min_dist_sq - dist_sq ) ) + 1 );
return true;
}
static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_CIRCLE& aB, int aClearance,
bool aNeedMTV, VECTOR2I& aMTV )
static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_CIRCLE& aB, int aClearance,
bool aNeedMTV, VECTOR2I& aMTV )
{
const VECTOR2I c = aB.GetCenter();
const VECTOR2I p0 = aA.GetPosition();
const VECTOR2I size = aA.GetSize();
const int r = aB.GetRadius();
const int min_dist = aClearance + r;
const ecoord r = aB.GetRadius();
const ecoord min_dist = aClearance + r;
const ecoord min_dist_sq = min_dist * min_dist;
if( aA.BBox( 0 ).Contains( c ) )
return true;
const VECTOR2I vts[] =
{
VECTOR2I( p0.x, p0.y ),
@@ -71,35 +73,33 @@ static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_CIRCLE& aB, int aC
VECTOR2I( p0.x, p0.y )
};
int nearest_seg_dist = INT_MAX;
ecoord nearest_seg_dist_sq = VECTOR2I::ECOORD_MAX;
VECTOR2I nearest;
bool inside = c.x >= p0.x && c.x <= ( p0.x + size.x )
&& c.y >= p0.y && c.y <= ( p0.y + size.y );
if( !aNeedMTV && inside )
return true;
for( int i = 0; i < 4; i++ )
if( !inside )
{
const SEG seg( vts[i], vts[i + 1] );
VECTOR2I pn = seg.NearestPoint( c );
int d = ( pn - c ).EuclideanNorm();
if( ( d < min_dist ) && !aNeedMTV )
return true;
if( d < nearest_seg_dist )
for( int i = 0; i < 4; i++ )
{
nearest = pn;
nearest_seg_dist = d;
const SEG seg( vts[i], vts[i + 1] );
ecoord dist_sq = seg.SquaredDistance( c );
if( dist_sq < min_dist_sq )
{
if( !aNeedMTV )
return true;
else
{
nearest = seg.NearestPoint( c );
nearest_seg_dist_sq = dist_sq;
}
}
}
}
if( nearest_seg_dist >= min_dist && !inside )
if( nearest_seg_dist_sq >= min_dist_sq && !inside )
return false;
VECTOR2I delta = c - nearest;
@@ -107,77 +107,25 @@ static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_CIRCLE& aB, int aC
if( !aNeedMTV )
return true;
if( inside )
aMTV = -delta.Resize( abs( min_dist + 1 + nearest_seg_dist ) + 1 );
aMTV = -delta.Resize( sqrt( abs( r * r + nearest_seg_dist_sq ) + 1 ) );
else
aMTV = delta.Resize( abs( min_dist + 1 - nearest_seg_dist ) + 1 );
aMTV = delta.Resize( sqrt( abs( r * r - nearest_seg_dist_sq ) + 1 ) );
return true;
}
static VECTOR2I pushoutForce( const SHAPE_CIRCLE& aA, const SEG& aB, int aClearance )
{
VECTOR2I nearest = aB.NearestPoint( aA.GetCenter() );
VECTOR2I f (0, 0);
int dist = ( nearest - aA.GetCenter() ).EuclideanNorm();
int min_dist = aClearance + aA.GetRadius();
if( dist < min_dist )
f = ( aA.GetCenter() - nearest ).Resize ( min_dist - dist + 10 );
return f;
}
static inline bool Collide( const SHAPE_CIRCLE& aA, const SHAPE_LINE_CHAIN& aB, int aClearance,
bool aNeedMTV, VECTOR2I& aMTV )
{
bool found = false;
VECTOR2I::extended_type clSq = (VECTOR2I::extended_type) aClearance * aClearance;
for( int s = 0; s < aB.SegmentCount(); s++ )
{
if( aA.Collide( aB.CSegment( s ), aClearance ) )
{
found = true;
break;
}
return true;
}
if( !aNeedMTV || !found )
return found;
SHAPE_CIRCLE cmoved( aA );
VECTOR2I f_total( 0, 0 );
for( int s = 0; s < aB.SegmentCount(); s++ )
{
VECTOR2I f = pushoutForce( cmoved, aB.CSegment( s ), aClearance );
cmoved.SetCenter( cmoved.GetCenter() + f );
f_total += f;
}
aMTV = f_total;
return found;
}
static inline bool Collide( const SHAPE_CIRCLE& aA, const SHAPE_SEGMENT& aSeg, int aClearance,
bool aNeedMTV, VECTOR2I& aMTV )
{
bool col = aA.Collide( aSeg.GetSeg(), aClearance + aSeg.GetWidth() / 2);
if( col && aNeedMTV )
{
aMTV = pushoutForce( aA, aSeg.GetSeg(), aClearance + aSeg.GetWidth() / 2);
}
return col;
return false;
}
@@ -207,123 +155,74 @@ static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_LINE_CHAIN& aB, in
}
static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_SEGMENT& aSeg, int aClearance,
bool aNeedMTV, VECTOR2I& aMTV )
bool CollideShapes( const SHAPE* aA, const SHAPE* aB, int aClearance,
bool aNeedMTV, VECTOR2I& aMTV )
{
return aA.Collide( aSeg.GetSeg(), aClearance + aSeg.GetWidth() / 2 );
}
switch( aA->Type() )
{
case SH_RECT:
switch( aB->Type() )
{
case SH_CIRCLE:
return Collide( *static_cast<const SHAPE_RECT*>( aA ),
*static_cast<const SHAPE_CIRCLE*>( aB ), aClearance, aNeedMTV, aMTV );
case SH_LINE_CHAIN:
return Collide( *static_cast<const SHAPE_RECT*>( aA ),
*static_cast<const SHAPE_LINE_CHAIN*>( aB ), aClearance, aNeedMTV, aMTV );
static inline bool Collide( const SHAPE_SEGMENT& aA, const SHAPE_SEGMENT& aB, int aClearance,
bool aNeedMTV, VECTOR2I& aMTV )
{
return aA.Collide( aB.GetSeg(), aClearance + aB.GetWidth() / 2 );
}
default:
break;
}
break;
case SH_CIRCLE:
switch( aB->Type() )
{
case SH_RECT:
return Collide( *static_cast<const SHAPE_RECT*>( aB ),
*static_cast<const SHAPE_CIRCLE*>( aA ), aClearance, aNeedMTV, aMTV );
static inline bool Collide( const SHAPE_LINE_CHAIN& aA, const SHAPE_SEGMENT& aB, int aClearance,
bool aNeedMTV, VECTOR2I& aMTV )
{
if( aA.Collide( aB.GetSeg(), aClearance + aB.GetWidth() / 2 ) )
return true;
case SH_CIRCLE:
return Collide( *static_cast<const SHAPE_CIRCLE*>( aA ),
*static_cast<const SHAPE_CIRCLE*>( aB ), aClearance, aNeedMTV, aMTV );
return false;
}
case SH_LINE_CHAIN:
return Collide( *static_cast<const SHAPE_CIRCLE*>( aA ),
*static_cast<const SHAPE_LINE_CHAIN *>( aB ), aClearance, aNeedMTV, aMTV );
default:
break;
}
break;
template<class ShapeAType, class ShapeBType> bool
CollCase( const SHAPE* aA, const SHAPE* aB, int aClearance, bool aNeedMTV, VECTOR2I& aMTV )
{
return Collide (*static_cast<const ShapeAType*>( aA ),
*static_cast<const ShapeBType*>( aB ),
aClearance, aNeedMTV, aMTV);
}
case SH_LINE_CHAIN:
switch( aB->Type() )
{
case SH_RECT:
return Collide( *static_cast<const SHAPE_RECT*>( aB ),
*static_cast<const SHAPE_LINE_CHAIN*>( aA ), aClearance, aNeedMTV, aMTV );
bool CollideShapes( const SHAPE* aA, const SHAPE* aB, int aClearance, bool aNeedMTV, VECTOR2I& aMTV )
{
switch( aA->Type() )
{
case SH_RECT:
switch( aB->Type() )
{
case SH_CIRCLE:
return CollCase<SHAPE_RECT, SHAPE_CIRCLE>( aA, aB, aClearance, aNeedMTV, aMTV );
case SH_CIRCLE:
return Collide( *static_cast<const SHAPE_CIRCLE*>( aB ),
*static_cast<const SHAPE_LINE_CHAIN*>( aA ), aClearance, aNeedMTV, aMTV );
case SH_LINE_CHAIN:
return CollCase<SHAPE_RECT, SHAPE_LINE_CHAIN>( aA, aB, aClearance, aNeedMTV, aMTV );
case SH_LINE_CHAIN:
return Collide( *static_cast<const SHAPE_LINE_CHAIN*>( aA ),
*static_cast<const SHAPE_LINE_CHAIN*>( aB ), aClearance, aNeedMTV, aMTV );
case SH_SEGMENT:
return CollCase<SHAPE_RECT, SHAPE_SEGMENT>( aA, aB, aClearance, aNeedMTV, aMTV );
default:
break;
}
break;
default:
break;
}
default:
break;
}
case SH_CIRCLE:
switch( aB->Type() )
{
case SH_RECT:
return CollCase<SHAPE_RECT, SHAPE_CIRCLE>( aB, aA, aClearance, aNeedMTV, aMTV );
assert( 0 ); // unsupported_collision
case SH_CIRCLE:
return CollCase<SHAPE_CIRCLE, SHAPE_CIRCLE>( aA, aB, aClearance, aNeedMTV, aMTV );
case SH_LINE_CHAIN:
return CollCase<SHAPE_CIRCLE, SHAPE_LINE_CHAIN>( aA, aB, aClearance, aNeedMTV, aMTV );
case SH_SEGMENT:
return CollCase<SHAPE_CIRCLE, SHAPE_SEGMENT>( aA, aB, aClearance, aNeedMTV, aMTV );
default:
break;
}
case SH_LINE_CHAIN:
switch( aB->Type() )
{
case SH_RECT:
return CollCase<SHAPE_RECT, SHAPE_LINE_CHAIN>( aB, aA, aClearance, aNeedMTV, aMTV );
case SH_CIRCLE:
return CollCase<SHAPE_CIRCLE, SHAPE_LINE_CHAIN>( aB, aA, aClearance, aNeedMTV, aMTV );
case SH_LINE_CHAIN:
return CollCase<SHAPE_LINE_CHAIN, SHAPE_LINE_CHAIN>( aA, aB, aClearance, aNeedMTV, aMTV );
case SH_SEGMENT:
return CollCase<SHAPE_LINE_CHAIN, SHAPE_SEGMENT>( aA, aB, aClearance, aNeedMTV, aMTV );
default:
break;
}
case SH_SEGMENT:
switch( aB->Type() )
{
case SH_RECT:
return CollCase<SHAPE_RECT, SHAPE_SEGMENT>( aB, aA, aClearance, aNeedMTV, aMTV );
case SH_CIRCLE:
return CollCase<SHAPE_CIRCLE, SHAPE_SEGMENT>( aB, aA, aClearance, aNeedMTV, aMTV );
case SH_LINE_CHAIN:
return CollCase<SHAPE_LINE_CHAIN, SHAPE_SEGMENT>( aB, aA, aClearance, aNeedMTV, aMTV );
case SH_SEGMENT:
return CollCase<SHAPE_SEGMENT, SHAPE_SEGMENT>( aA, aB, aClearance, aNeedMTV, aMTV );
default:
break;
}
default:
break;
}
bool unsupported_collision = true;
assert( unsupported_collision == false );
return false;
return false;
}
+41 -49
View File
@@ -135,9 +135,6 @@ int SHAPE_LINE_CHAIN::Distance( const VECTOR2I& aP ) const
{
int d = INT_MAX;
if( IsClosed() && PointInside( aP ) )
return 0;
for( int s = 0; s < SegmentCount(); s++ )
d = std::min( d, CSegment( s ).Distance( aP ) );
@@ -182,7 +179,7 @@ int SHAPE_LINE_CHAIN::Split( const VECTOR2I& aP )
int SHAPE_LINE_CHAIN::Find( const VECTOR2I& aP ) const
{
for( int s = 0; s < PointCount(); s++ )
for( int s = 0; s< PointCount(); s++ )
if( CPoint( s ) == aP )
return s;
@@ -190,16 +187,6 @@ int SHAPE_LINE_CHAIN::Find( const VECTOR2I& aP ) const
}
int SHAPE_LINE_CHAIN::FindSegment( const VECTOR2I& aP ) const
{
for( int s = 0; s < SegmentCount(); s++ )
if( CSegment( s ).Distance( aP ) <= 1 )
return s;
return -1;
}
const SHAPE_LINE_CHAIN SHAPE_LINE_CHAIN::Slice( int aStartIndex, int aEndIndex ) const
{
SHAPE_LINE_CHAIN rv;
@@ -274,9 +261,6 @@ int SHAPE_LINE_CHAIN::Intersect( const SHAPE_LINE_CHAIN& aChain, INTERSECTIONS&
if( a.Collinear( b ) )
{
is.our = a;
is.their = b;
if( a.Contains( b.A ) ) { is.p = b.A; aIp.push_back( is ); }
if( a.Contains( b.B ) ) { is.p = b.B; aIp.push_back( is ); }
if( b.Contains( a.A ) ) { is.p = a.A; aIp.push_back( is ); }
@@ -298,6 +282,44 @@ int SHAPE_LINE_CHAIN::Intersect( const SHAPE_LINE_CHAIN& aChain, INTERSECTIONS&
}
return aIp.size();
for( int s1 = 0; s1 < SegmentCount(); s1++ )
{
for( int s2 = 0; s2 < aChain.SegmentCount(); s2++ )
{
const SEG& a = CSegment( s1 );
const SEG& b = aChain.CSegment( s2 );
OPT_VECTOR2I p = a.Intersect( b );
INTERSECTION is;
if( p )
{
is.p = *p;
is.our = a;
is.their = b;
aIp.push_back( is );
}
else if( a.Collinear( b ) )
{
if( a.A != b.A && a.A != b.B && b.Contains( a.A ) )
{
is.p = a.A;
is.our = a;
is.their = b;
aIp.push_back( is );
}
else if( a.B != b.A && a.B != b.B && b.Contains( a.B ) )
{
is.p = a.B;
is.our = a;
is.their = b;
aIp.push_back( is );
}
}
}
}
return aIp.size();
}
@@ -350,13 +372,10 @@ bool SHAPE_LINE_CHAIN::PointInside( const VECTOR2I& aP ) const
bool SHAPE_LINE_CHAIN::PointOnEdge( const VECTOR2I& aP ) const
{
if( !PointCount() )
return false;
else if( PointCount() == 1 )
if( SegmentCount() < 1 )
return m_points[0] == aP;
for( int i = 0; i < SegmentCount(); i++ )
for( int i = 1; i < SegmentCount(); i++ )
{
const SEG s = CSegment( i );
@@ -515,30 +534,3 @@ const std::string SHAPE_LINE_CHAIN::Format() const
return ss.str();
}
bool SHAPE_LINE_CHAIN::CompareGeometry ( const SHAPE_LINE_CHAIN & aOther ) const
{
SHAPE_LINE_CHAIN a(*this), b(aOther);
a.Simplify();
b.Simplify();
if(a.m_points.size() != b.m_points.size())
return false;
for(int i = 0; i < a.PointCount(); i++)
if(a.CPoint(i) != b.CPoint(i))
return false;
return true;
}
bool SHAPE_LINE_CHAIN::Intersects( const SHAPE_LINE_CHAIN& aChain ) const
{
INTERSECTIONS dummy;
return Intersect(aChain, dummy) != 0;
}
SHAPE* SHAPE_LINE_CHAIN::Clone() const
{
return new SHAPE_LINE_CHAIN( *this );
}
+255 -100
View File
@@ -30,7 +30,7 @@
// For compilers that support precompilation, includes "wx.h".
#include <fctsys.h>
#include <pgm_base.h>
#include <appl_wxstruct.h>
#include <confirm.h>
#include <common.h>
@@ -78,6 +78,66 @@
* like export KICAD=/my_path/kicad if /my_path/kicad is not a default path
*/
// Path list for online help
static wxString s_HelpPathList[] = {
#ifdef __WINDOWS__
wxT( "c:/kicad/doc/help/" ),
wxT( "d:/kicad/doc/help/" ),
wxT( "c:/Program Files/kicad/doc/help/" ),
wxT( "d:/Program Files/kicad/doc/help/" ),
#else
wxT( "/usr/share/doc/kicad/help/" ),
wxT( "/usr/local/share/doc/kicad/help/" ),
wxT( "/usr/local/kicad/doc/help/" ), // default install for "universal
// tarballs" and build for a server
// (new)
wxT( "/usr/local/kicad/help/" ), // default install for "universal
// tarballs" and build for a server
// (old)
#endif
wxT( "end_list" ) // End of list symbol, do not change
};
// Path list for KiCad data files
static wxString s_KicadDataPathList[] = {
#ifdef __WINDOWS__
wxT( "c:/kicad/share/" ),
wxT( "d:/kicad/share/" ),
wxT( "c:/kicad/" ),
wxT( "d:/kicad/" ),
wxT( "c:/Program Files/kicad/share/" ),
wxT( "d:/Program Files/kicad/share/" ),
wxT( "c:/Program Files/kicad/" ),
wxT( "d:/Program Files/kicad/" ),
#else
wxT( "/usr/share/kicad/" ),
wxT( "/usr/local/share/kicad/" ),
wxT( "/usr/local/kicad/share/" ), // default data path for "universal
// tarballs" and build for a server
// (new)
wxT( "/usr/local/kicad/" ), // default data path for "universal
// tarballs" and build for a server
// (old)
#endif
wxT( "end_list" ) // End of list symbol, do not change
};
// Path list for KiCad binary files
static wxString s_KicadBinaryPathList[] = {
#ifdef __WINDOWS__
wxT( "c:/kicad/bin/" ),
wxT( "d:/kicad/bin/" ),
wxT( "c:/Program Files/kicad/bin/" ),
wxT( "d:/Program Files/kicad/bin/" ),
#else
wxT( "/usr/bin/" ),
wxT( "/usr/local/bin/" ),
wxT( "/usr/local/kicad/bin/" ),
#endif
wxT( "end_list" ) // End of list symbol, do not change
};
wxString MakeReducedFileName( const wxString& fullfilename,
const wxString& default_path,
@@ -221,7 +281,7 @@ wxString EDA_FileSelector( const wxString& Title,
defaultname,
dotted_Ext,
Mask,
flag, // open mode wxFD_OPEN, wxFD_SAVE ..
flag, /* open mode wxFD_OPEN, wxFD_SAVE .. */
Frame,
Pos.x, Pos.y );
@@ -232,48 +292,123 @@ wxString EDA_FileSelector( const wxString& Title,
}
wxString FindKicadFile( const wxString& shortname )
wxString FindKicadHelpPath()
{
// Test the presence of the file in the directory shortname of
// the KiCad binary path.
wxString fullFileName = Pgm().GetExecutablePath() + shortname;
wxString FullPath, LangFullPath, tmp;
wxString LocaleString;
bool PathFound = false;
if( wxFileExists( fullFileName ) )
return fullFileName;
/* find kicad/help/ */
tmp = wxGetApp().GetExecutablePath();
// Test the presence of the file in the directory shortname
// defined by the environment variable KiCad.
if( Pgm().IsKicadEnvVariableDefined() )
if( tmp.Last() == '/' )
tmp.RemoveLast();
FullPath = tmp.BeforeLast( '/' ); // cd ..
FullPath += wxT( "/doc/help/" );
LocaleString = wxGetApp().GetLocale()->GetCanonicalName();
wxString path_tmp = FullPath;
#ifdef __WINDOWS__
path_tmp.MakeLower();
#endif
if( path_tmp.Contains( wxT( "kicad" ) ) )
{
fullFileName = Pgm().GetKicadEnvVariable() + shortname;
if( wxFileExists( fullFileName ) )
return fullFileName;
if( wxDirExists( FullPath ) )
PathFound = true;
}
// find binary file from possibilities list:
// /usr/local/kicad/linux or c:/kicad/winexe
// Path list for KiCad binary files
const static wxChar* possibilities[] = {
#ifdef __WINDOWS__
wxT( "c:/kicad/bin/" ),
wxT( "d:/kicad/bin/" ),
wxT( "c:/Program Files/kicad/bin/" ),
wxT( "d:/Program Files/kicad/bin/" ),
#else
wxT( "/usr/bin/" ),
wxT( "/usr/local/bin/" ),
wxT( "/usr/local/kicad/bin/" ),
#endif
};
for( unsigned i=0; i<DIM(possibilities); ++i )
/* find kicad/help/ from environment variable KICAD */
if( !PathFound && wxGetApp().IsKicadEnvVariableDefined() )
{
fullFileName = possibilities[i] + shortname;
FullPath = wxGetApp().GetKicadEnvVariable() + wxT( "/doc/help/" );
if( wxFileExists( fullFileName ) )
return fullFileName;
if( wxDirExists( FullPath ) )
PathFound = true;
}
/* find kicad/help/ from "s_HelpPathList" */
int ii = 0;
while( !PathFound )
{
FullPath = s_HelpPathList[ii++];
if( FullPath == wxT( "end_list" ) )
break;
if( wxDirExists( FullPath ) )
PathFound = true;
}
if( PathFound )
{
LangFullPath = FullPath + LocaleString + UNIX_STRING_DIR_SEP;
if( wxDirExists( LangFullPath ) )
return LangFullPath;
LangFullPath = FullPath + LocaleString.Left( 2 ) + UNIX_STRING_DIR_SEP;
if( wxDirExists( LangFullPath ) )
return LangFullPath;
LangFullPath = FullPath + wxT( "en/" );
if( wxDirExists( LangFullPath ) )
{
return LangFullPath;
}
else
{
LangFullPath = FullPath + wxT( "fr/" );
if( wxDirExists( LangFullPath ) )
return LangFullPath;
}
return FullPath;
}
return wxEmptyString;
}
wxString FindKicadFile( const wxString& shortname )
{
wxString FullFileName;
/* Test the presence of the file in the directory shortname of
* the KiCad binary path.
*/
FullFileName = wxGetApp().GetExecutablePath() + shortname;
if( wxFileExists( FullFileName ) )
return FullFileName;
/* Test the presence of the file in the directory shortname
* defined by the environment variable KiCad.
*/
if( wxGetApp().IsKicadEnvVariableDefined() )
{
FullFileName = wxGetApp().GetKicadEnvVariable() + shortname;
if( wxFileExists( FullFileName ) )
return FullFileName;
}
/* find binary file from default path list:
* /usr/local/kicad/linux or c:/kicad/winexe
* (see s_KicadDataPathList) */
int ii = 0;
while( 1 )
{
if( s_KicadBinaryPathList[ii] == wxT( "end_list" ) )
break;
FullFileName = s_KicadBinaryPathList[ii++] + shortname;
if( wxFileExists( FullFileName ) )
return FullFileName;
}
return shortname;
@@ -283,15 +418,15 @@ wxString FindKicadFile( const wxString& shortname )
int ExecuteFile( wxWindow* frame, const wxString& ExecFile, const wxString& param,
wxProcess *callback )
{
wxString fullFileName;
wxString FullFileName;
fullFileName = FindKicadFile( ExecFile );
FullFileName = FindKicadFile( ExecFile );
#ifdef __WXMAC__
if( wxFileExists( fullFileName ) || wxDir::Exists( fullFileName ) )
if( wxFileExists( FullFileName ) || wxDir::Exists( FullFileName ) )
{
return ProcessExecute( Pgm().GetExecutablePath() + wxT( "/" )
return ProcessExecute( wxGetApp().GetExecutablePath() + wxT( "/" )
+ ExecFile + wxT( " " )
+ param, wxEXEC_ASYNC, callback );
}
@@ -300,41 +435,41 @@ int ExecuteFile( wxWindow* frame, const wxString& ExecFile, const wxString& para
return ProcessExecute( wxT( "/usr/bin/open " ) + param, wxEXEC_ASYNC, callback );
}
#else
if( wxFileExists( fullFileName ) )
if( wxFileExists( FullFileName ) )
{
if( !param.IsEmpty() )
fullFileName += wxT( " " ) + param;
FullFileName += wxT( " " ) + param;
return ProcessExecute( fullFileName, wxEXEC_ASYNC, callback );
return ProcessExecute( FullFileName, wxEXEC_ASYNC, callback );
}
#endif
wxString msg;
msg.Printf( _( "Command <%s> could not found" ), GetChars( fullFileName ) );
msg.Printf( _( "Command <%s> could not found" ), GetChars( FullFileName ) );
DisplayError( frame, msg, 20 );
return -1;
}
wxString KicadDatasPath()
wxString ReturnKicadDatasPath()
{
bool found = false;
bool PathFound = false;
wxString data_path;
if( Pgm().IsKicadEnvVariableDefined() ) // Path defined by the KICAD environment variable.
if( wxGetApp().IsKicadEnvVariableDefined() ) // Path defined by the KICAD environment variable.
{
data_path = Pgm().GetKicadEnvVariable();
found = true;
data_path = wxGetApp().GetKicadEnvVariable();
PathFound = true;
}
else // Path of executables.
{
wxString tmp = Pgm().GetExecutablePath();
wxString tmp = wxGetApp().GetExecutablePath();
#ifdef __WINDOWS__
tmp.MakeLower();
#endif
if( tmp.Contains( wxT( "kicad" ) ) )
{
#ifdef __WINDOWS__
tmp = Pgm().GetExecutablePath();
tmp = wxGetApp().GetExecutablePath();
#endif
if( tmp.Last() == '/' )
tmp.RemoveLast();
@@ -350,56 +485,33 @@ wxString KicadDatasPath()
if( wxDirExists( data_path ) )
{
found = true;
PathFound = true;
}
else if( wxDirExists( old_path ) )
{
data_path = old_path;
found = true;
PathFound = true;
}
}
}
if( !found )
/* find KiCad from default path list:
* /usr/local/kicad/ or c:/kicad/
* (see s_KicadDataPathList) */
int ii = 0;
while( !PathFound )
{
// find KiCad from possibilities list:
// /usr/local/kicad/ or c:/kicad/
if( s_KicadDataPathList[ii] == wxT( "end_list" ) )
break;
const static wxChar* possibilities[] = {
#ifdef __WINDOWS__
wxT( "c:/kicad/share/" ),
wxT( "d:/kicad/share/" ),
wxT( "c:/kicad/" ),
wxT( "d:/kicad/" ),
wxT( "c:/Program Files/kicad/share/" ),
wxT( "d:/Program Files/kicad/share/" ),
wxT( "c:/Program Files/kicad/" ),
wxT( "d:/Program Files/kicad/" ),
#else
wxT( "/usr/share/kicad/" ),
wxT( "/usr/local/share/kicad/" ),
wxT( "/usr/local/kicad/share/" ), // default data path for "universal
// tarballs" and build for a server
// (new)
wxT( "/usr/local/kicad/" ), // default data path for "universal
// tarballs" and build for a server
// (old)
#endif
};
data_path = s_KicadDataPathList[ii++];
for( unsigned i=0; i<DIM(possibilities); ++i )
{
data_path = possibilities[i];
if( wxDirExists( data_path ) )
{
found = true;
break;
}
}
if( wxDirExists( data_path ) )
PathFound = true;
}
if( found )
if( PathFound )
{
data_path.Replace( WIN_STRING_DIR_SEP, UNIX_STRING_DIR_SEP );
@@ -415,6 +527,47 @@ wxString KicadDatasPath()
}
wxString& EDA_APP::GetEditorName()
{
wxString editorname = m_EditorName;
// We get the preferred editor name from environment variable first.
if( editorname.IsEmpty() )
{
// If there is no EDITOR variable set, try the desktop default
if(!wxGetEnv( wxT( "EDITOR" ), &editorname ))
{
#ifdef __WXMAC__
editorname = "/usr/bin/open";
#elif __WXX11__
editorname = "/usr/bin/xdg-open";
#endif
}
}
if( editorname.IsEmpty() ) // We must get a preferred editor name
{
DisplayInfoMessage( NULL,
_( "No default editor found, you must choose it" ) );
wxString mask( wxT( "*" ) );
#ifdef __WINDOWS__
mask += wxT( ".exe" );
#endif
editorname = EDA_FileSelector( _( "Preferred Editor:" ), wxEmptyString,
wxEmptyString, wxEmptyString, mask,
NULL, wxFD_OPEN, true );
}
if( !editorname.IsEmpty() )
{
m_EditorName = editorname;
m_commonSettings->Write( wxT( "Editor" ), m_EditorName );
}
return m_EditorName;
}
bool OpenPDF( const wxString& file )
{
wxString command;
@@ -422,12 +575,12 @@ bool OpenPDF( const wxString& file )
wxString type;
bool success = false;
Pgm().ReadPdfBrowserInfos();
wxGetApp().ReadPdfBrowserInfos();
if( !Pgm().UseSystemPdfBrowser() ) // Run the preferred PDF Browser
if( !wxGetApp().UseSystemPdfBrowser() ) // Run the preferred PDF Browser
{
AddDelimiterString( filename );
command = Pgm().GetPdfBrowserName() + wxT( " " ) + filename;
command = wxGetApp().GetPdfBrowserFileName() + wxT( " " ) + filename;
}
else
{
@@ -457,36 +610,38 @@ bool OpenPDF( const wxString& file )
}
success = false;
command.clear();
command.Empty();
if( !success )
{
#if !defined(__WINDOWS__)
#ifndef __WINDOWS__
AddDelimiterString( filename );
// here is a list of PDF viewers candidates
static const wxChar* tries[] =
/* here is a list of PDF viewers candidates */
const static wxString tries[] =
{
wxT( "/usr/bin/evince" ),
wxT( "/usr/bin/okular" ),
wxT( "/usr/bin/gpdf" ),
wxT( "/usr/bin/konqueror" ),
wxT( "/usr/bin/kpdf" ),
wxT( "/usr/bin/xpdf" ),
wxT( "/usr/bin/open" ), // BSD and OSX file & dir opener
wxT( "/usr/bin/xdg-open" ), // Freedesktop file & dir opener
wxT( "" ),
};
for( unsigned ii = 0; ii<DIM(tries); ii++ )
for( int ii = 0; ; ii++ )
{
if( tries[ii].IsEmpty() )
break;
if( wxFileExists( tries[ii] ) )
{
command = tries[ii];
command += wxT( ' ' );
command += filename;
command = tries[ii] + wxT( " " ) + filename;
break;
}
}
#endif
}
}
+328 -82
View File
@@ -79,26 +79,6 @@ static EDA_COLOR_T s_DC_lastbrushcolor = UNSPECIFIED_COLOR;
static bool s_DC_lastbrushfill = false;
static wxDC* s_DC_lastDC = NULL;
/***
* Utility for the line clipping code, returns the boundary code of
* a point. Bit allocation is arbitrary
*/
static inline int clipOutCode( const EDA_RECT *aClipBox, int x, int y )
{
int code;
if( y < aClipBox->GetY() )
code = 2;
else if( y > aClipBox->GetBottom() )
code = 1;
else
code = 0;
if( x < aClipBox->GetX() )
code |= 4;
else if( x > aClipBox->GetRight() )
code |= 8;
return code;
}
/**
* Test if any part of a line falls within the bounds of a rectangle.
@@ -113,68 +93,225 @@ static inline int clipOutCode( const EDA_RECT *aClipBox, int x, int y )
*
* @return - False if any part of the line lies within the rectangle.
*/
static bool clipLine( const EDA_RECT *aClipBox, int &x1, int &y1, int &x2, int &y2 )
static bool clipLine( EDA_RECT* aClipBox, int& x1, int& y1, int& x2, int& y2 )
{
// Stock Cohen-Sutherland algorithm; check *any* CG book for details
int outcode1 = clipOutCode( aClipBox, x1, y1 );
int outcode2 = clipOutCode( aClipBox, x2, y2 );
if( aClipBox->Contains( x1, y1 ) && aClipBox->Contains( x2, y2 ) )
return false;
while( outcode1 || outcode2 )
wxRect rect = *aClipBox;
int minX = rect.GetLeft();
int maxX = rect.GetRight();
int minY = rect.GetTop();
int maxY = rect.GetBottom();
int clippedX, clippedY;
#if DEBUG_DUMP_CLIP_COORDS
int tmpX1, tmpY1, tmpX2, tmpY2;
tmpX1 = x1;
tmpY1 = y1;
tmpX2 = x2;
tmpY2 = y2;
#endif
if( aClipBox->Contains( x1, y1 ) )
{
// Fast reject
if( outcode1 & outcode2 )
return true;
// Choose a side to clip
int thisoutcode, x, y;
if( outcode1 )
thisoutcode = outcode1;
else
thisoutcode = outcode2;
if( x1 == x2 ) /* Vertical line, clip Y. */
{
if( y2 < minY )
{
y2 = minY;
return false;
}
/* One clip round
* Since we use the full range of 32 bit ints, the proportion
* computation has to be done in 64 bits to avoid horrible
* results */
if( thisoutcode & 1 ) // Clip the bottom
{
y = aClipBox->GetBottom();
x = x1 + (x2 - x1) * int64_t(y - y1) / (y2 - y1);
}
else if( thisoutcode & 2 ) // Clip the top
{
y = aClipBox->GetY();
x = x1 + (x2 - x1) * int64_t(y - y1) / (y2 - y1);
}
else if( thisoutcode & 8 ) // Clip the right
{
x = aClipBox->GetRight();
y = y1 + (y2 - y1) * int64_t(x - x1) / (x2 - x1);
if( y2 > maxY )
{
y2 = maxY;
return false;
}
}
else // if( thisoutcode & 4), obviously, clip the left
else if( y1 == y2 ) /* Horizontal line, clip X. */
{
x = aClipBox->GetX();
y = y1 + (y2 - y1) * int64_t(x - x1) / (x2 - x1);
if( x2 < minX )
{
x2 = minX;
return false;
}
if( x2 > maxX )
{
x2 = maxX;
return false;
}
}
// Put the result back and update the boundary code
// No ambiguity, otherwise it would have been a fast reject
if( thisoutcode == outcode1 )
/* If we're here, it's a diagonal line. */
if( TestForIntersectionOfStraightLineSegments( x1, y1, x2, y2, minX, minY, minX, maxY,
&clippedX, &clippedY ) /* Left */
|| TestForIntersectionOfStraightLineSegments( x1, y1, x2, y2, minX, minY, maxX, minY,
&clippedX, &clippedY ) /* Top */
|| TestForIntersectionOfStraightLineSegments( x1, y1, x2, y2, maxX, minY, maxX, maxY,
&clippedX, &clippedY ) /* Right */
|| TestForIntersectionOfStraightLineSegments( x1, y1, x2, y2, minX, maxY, maxX, maxY,
&clippedX, &clippedY ) ) /* Bottom */
{
x1 = x;
y1 = y;
outcode1 = clipOutCode( aClipBox, x1, y1 );
}
else
{
x2 = x;
y2 = y;
outcode2 = clipOutCode( aClipBox, x2, y2 );
if( x2 != clippedX )
x2 = clippedX;
if( y2 != clippedY )
y2 = clippedY;
return false;
}
/* If we're here, something has gone terribly wrong. */
#if DEBUG_DUMP_CLIP_ERROR_COORDS
wxLogDebug( wxT( "Line (%d,%d):(%d,%d) in rectangle (%d,%d,%d,%d) clipped to (%d,%d,%d,%d)" ),
tmpX1, tmpY1, tmpX2, tmpY2, minX, minY, maxX, maxY, x1, y1, x2, y2 );
#endif
return false;
}
return false;
else if( aClipBox->Contains( x2, y2 ) )
{
if( x1 == x2 ) /* Vertical line, clip Y. */
{
if( y2 < minY )
{
y2 = minY;
return false;
}
if( y2 > maxY )
{
y2 = maxY;
return false;
}
}
else if( y1 == y2 ) /* Horizontal line, clip X. */
{
if( x2 < minX )
{
x2 = minX;
return false;
}
if( x2 > maxX )
{
x2 = maxX;
return false;
}
}
if( TestForIntersectionOfStraightLineSegments( x1, y1, x2, y2, minX, minY, minX, maxY,
&clippedX, &clippedY ) /* Left */
|| TestForIntersectionOfStraightLineSegments( x1, y1, x2, y2, minX, minY, maxX, minY,
&clippedX, &clippedY ) /* Top */
|| TestForIntersectionOfStraightLineSegments( x1, y1, x2, y2, maxX, minY, maxX, maxY,
&clippedX, &clippedY ) /* Right */
|| TestForIntersectionOfStraightLineSegments( x1, y1, x2, y2, minX, maxY, maxX, maxY,
&clippedX, &clippedY ) ) /* Bottom */
{
if( x1 != clippedX )
x1 = clippedX;
if( y1 != clippedY )
y1 = clippedY;
return false;
}
/* If we're here, something has gone terribly wrong. */
#if DEBUG_DUMP_CLIP_ERROR_COORDS
wxLogDebug( wxT( "Line (%d,%d):(%d,%d) in rectangle (%d,%d,%d,%d) clipped to (%d,%d,%d,%d)" ),
tmpX1, tmpY1, tmpX2, tmpY2, minX, minY, maxX, maxY, x1, y1, x2, y2 );
#endif
return false;
}
else
{
int* intersectX;
int* intersectY;
int intersectX1, intersectY1, intersectX2, intersectY2;
bool haveFirstPoint = false;
intersectX = &intersectX1;
intersectY = &intersectY1;
/* Left clip rectangle line. */
if( TestForIntersectionOfStraightLineSegments( x1, y1, x2, y2, minX, minY, minX, maxY,
intersectX, intersectY ) )
{
intersectX = &intersectX2;
intersectY = &intersectY2;
haveFirstPoint = true;
}
/* Top clip rectangle line. */
if( TestForIntersectionOfStraightLineSegments( x1, y1, x2, y2, minX, minY, maxX, minY,
intersectX, intersectY ) )
{
intersectX = &intersectX2;
intersectY = &intersectY2;
if( haveFirstPoint )
{
x1 = intersectX1;
y1 = intersectY1;
x2 = intersectX2;
y2 = intersectY2;
return false;
}
haveFirstPoint = true;
}
/* Right clip rectangle line. */
if( TestForIntersectionOfStraightLineSegments( x1, y1, x2, y2, maxX, minY, maxX, maxY,
intersectX, intersectY ) )
{
intersectX = &intersectX2;
intersectY = &intersectY2;
if( haveFirstPoint )
{
x1 = intersectX1;
y1 = intersectY1;
x2 = intersectX2;
y2 = intersectY2;
return false;
}
haveFirstPoint = true;
}
/* Bottom clip rectangle line. */
if( TestForIntersectionOfStraightLineSegments( x1, y1, x2, y2, minX, maxY, maxX, maxY,
intersectX, intersectY ) )
{
intersectX = &intersectX2;
intersectY = &intersectY2;
if( haveFirstPoint )
{
x1 = intersectX1;
y1 = intersectY1;
x2 = intersectX2;
y2 = intersectY2;
return false;
}
}
/* If we're here and only one line of the clip box has been intersected,
* something has gone terribly wrong. */
#if DEBUG_DUMP_CLIP_ERROR_COORDS
if( haveFirstPoint )
wxLogDebug( wxT( "Line (%d,%d):(%d,%d) in rectangle (%d,%d,%d,%d) clipped to (%d,%d,%d,%d)" ),
tmpX1, tmpY1, tmpX2, tmpY2, minX, minY, maxX, maxY, x1, y1, x2, y2 );
#endif
}
/* Set this to one to verify that diagonal lines get clipped properly. */
#if DEBUG_DUMP_CLIP_COORDS
if( !( x1 == x2 || y1 == y2 ) )
wxLogDebug( wxT( "Clipped line (%d,%d):(%d,%d) from rectangle (%d,%d,%d,%d)" ),
tmpX1, tmpY1, tmpX2, tmpY2, minX, minY, maxX, maxY );
#endif
return true;
}
static void WinClipAndDrawLine( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
EDA_COLOR_T Color, int width = 1 )
{
@@ -668,11 +805,15 @@ static void GRSPoly( EDA_RECT* ClipBox, wxDC* DC, int n, wxPoint Points[],
}
else
{
GRMoveTo( Points[0].x, Points[0].y );
for( int i = 1; i < n; ++i )
{
GRLineTo( ClipBox, DC, Points[i].x, Points[i].y, width, Color );
}
wxPoint endPt = Points[n - 1];
GRSetBrush( DC, Color );
DC->DrawLines( n, Points );
// The last point is not drawn by DrawLine and DrawLines
// Add it if the polygon is not closed
if( endPt != Points[0] )
DC->DrawPoint( endPt.x, endPt.y );
}
}
@@ -700,18 +841,16 @@ static void GRSClosedPoly( EDA_RECT* aClipBox, wxDC* aDC,
}
else
{
GRMoveTo( aPoints[0].x, aPoints[0].y );
for( int i = 1; i < aPointCount; ++i )
{
GRLineTo( aClipBox, aDC, aPoints[i].x, aPoints[i].y, aWidth, aColor );
}
GRSetBrush( aDC, aBgColor );
aDC->DrawLines( aPointCount, aPoints );
int lastpt = aPointCount - 1;
// Close the polygon
/* Close the polygon. */
if( aPoints[lastpt] != aPoints[0] )
{
GRLineTo( aClipBox, aDC, aPoints[0].x, aPoints[0].y, aWidth, aColor );
GRLine( aClipBox, aDC, aPoints[0].x, aPoints[0].y,
aPoints[lastpt].x, aPoints[lastpt].y,
aWidth, aColor );
}
}
}
@@ -1207,6 +1346,113 @@ void GRBezier( EDA_RECT* ClipBox,
}
EDA_COLOR_T ColorMix( EDA_COLOR_T aColor1, EDA_COLOR_T aColor2 )
{
/* Memoization storage. This could be potentially called for each
* color merge so a cache is useful (there are few colours anyway) */
static EDA_COLOR_T mix_cache[NBCOLORS][NBCOLORS];
// TODO how is alpha used? it's a mac only thing, I have no idea
aColor1 = ColorGetBase( aColor1 );
aColor2 = ColorGetBase( aColor2 );
// First easy thing: a black gives always the other colour
if( aColor1 == BLACK )
return aColor2;
if( aColor2 == BLACK)
return aColor1;
/* Now we are sure that black can't occur, so the rule is:
* BLACK means not computed yet. If we're lucky we already have
* an answer */
EDA_COLOR_T candidate = mix_cache[aColor1][aColor2];
if( candidate != BLACK )
return candidate;
// Blend the two colors (i.e. OR the RGB values)
const StructColors &c1 = g_ColorRefs[aColor1];
const StructColors &c2 = g_ColorRefs[aColor2];
// Ask the palette for the nearest color to the mix
wxColour mixed( c1.m_Red | c2.m_Red,
c1.m_Green | c2.m_Green,
c1.m_Blue | c2.m_Blue );
candidate = ColorFindNearest( mixed );
/* Here, BLACK is *not* a good answer, since it would recompute the next time.
* Even theorically its not possible (with the current rules), but
* maybe the metric will change in the future */
if( candidate == BLACK)
candidate = DARKDARKGRAY;
// Store the result in the cache. The operation is commutative, too
mix_cache[aColor1][aColor2] = candidate;
mix_cache[aColor2][aColor1] = candidate;
return candidate;
}
EDA_COLOR_T ColorByName( const wxString& aName )
{
// look for a match in the palette itself
for( EDA_COLOR_T trying = BLACK; trying < NBCOLORS; trying = NextColor(trying) )
{
if( 0 == aName.CmpNoCase( g_ColorRefs[trying].m_Name ) )
return trying;
}
// Not found, no idea...
return UNSPECIFIED_COLOR;
}
bool ColorIsLight( EDA_COLOR_T aColor )
{
const StructColors &c = g_ColorRefs[ColorGetBase( aColor )];
int r = c.m_Red;
int g = c.m_Green;
int b = c.m_Blue;
return ((r * r) + (g * g) + (b * b)) > (128 * 128 * 3);
}
EDA_COLOR_T ColorFindNearest( const wxColour &aColor )
{
return ColorFindNearest( aColor.Red(), aColor.Green(), aColor.Blue() );
}
EDA_COLOR_T ColorFindNearest( int aR, int aG, int aB )
{
EDA_COLOR_T candidate = BLACK;
/* Find the 'nearest' color in the palette. This is fun. There is
a gazilion of metrics for the color space and no one of the
useful one is in the RGB color space. Who cares, this is a CAD,
not a photosomething...
I hereby declare that the distance is the sum of the square of the
component difference. Think about the RGB color cube. Now get the
euclidean distance, but without the square root... for ordering
purposes it's the same, obviously. Also each component can't be
less of the target one, since I found this currently work better...
*/
int nearest_distance = 255 * 255 * 3 + 1; // Can't beat this
for( EDA_COLOR_T trying = BLACK; trying < NBCOLORS; trying = NextColor(trying) )
{
const StructColors &c = g_ColorRefs[trying];
int distance = (aR - c.m_Red) * (aR - c.m_Red) +
(aG - c.m_Green) * (aG - c.m_Green) +
(aB - c.m_Blue) * (aB - c.m_Blue);
if( distance < nearest_distance && c.m_Red >= aR &&
c.m_Green >= aG && c.m_Blue >= aB )
{
nearest_distance = distance;
candidate = trying;
}
}
return candidate;
}
void GRDrawAnchor( EDA_RECT *aClipBox, wxDC *aDC, int x, int y,
int aSize, EDA_COLOR_T aColor )
{
+1 -24
View File
@@ -1,26 +1,3 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <hotkey_grid_table.h>
/*
@@ -101,7 +78,7 @@ wxString HOTKEY_EDITOR_GRID_TABLE::GetValue( int row, int col )
}
else
{
return KeyNameFromKeyCode( hotkey_descr->m_KeyCode );
return ReturnKeyNameFromKeyCode( hotkey_descr->m_KeyCode );
}
}
}
+43 -48
View File
@@ -29,7 +29,7 @@
*/
#include <fctsys.h>
#include <kiface_i.h>
#include <appl_wxstruct.h>
#include <hotkeys_basic.h>
#include <id.h>
#include <confirm.h>
@@ -61,11 +61,9 @@ wxString g_ModuleEditSectionTag( wxT( "[footprinteditor]" ) );
EDA_HOTKEY::EDA_HOTKEY( const wxChar* infomsg, int idcommand, int keycode, int idmenuevent )
{
m_KeyCode = keycode; // Key code (ascii value for ascii keys
// or wxWidgets code for function key
m_InfoMsg = infomsg; // info message.
m_Idcommand = idcommand; // internal id for the corresponding
// command (see hotkey_id_commnand list)
m_IdMenuEvent = idmenuevent; // id to call the corresponding event
// (if any) (see id.h)
@@ -133,21 +131,19 @@ static struct hotkey_name_descr s_Hotkey_Name_List[] =
{ wxT( "Left" ), WXK_LEFT },
{ wxT( "Right" ), WXK_RIGHT },
{ wxT( "Return" ), WXK_RETURN },
{ wxT( "Space" ), WXK_SPACE },
// Do not change this line: end of list
{ wxT( "" ), 0 }
};
#define MODIFIER_CTRL wxT( "Ctrl+" )
#define MODIFIER_ALT wxT( "Alt+" )
#define MODIFIER_CTRL wxT( "Ctrl+" )
#define MODIFIER_ALT wxT( "Alt+" )
#define MODIFIER_SHIFT wxT( "Shift+" )
/**
* Function KeyNameFromKeyCode
* Function ReturnKeyNameFromKeyCode
* return the key name from the key code
* Only some wxWidgets key values are handled for function key ( see
* s_Hotkey_Name_List[] )
@@ -155,7 +151,7 @@ static struct hotkey_name_descr s_Hotkey_Name_List[] =
* @param aIsFound = a pointer to a bool to return true if found, or false. an be NULL default)
* @return the key name in a wxString
*/
wxString KeyNameFromKeyCode( int aKeycode, bool* aIsFound )
wxString ReturnKeyNameFromKeyCode( int aKeycode, bool* aIsFound )
{
wxString keyname, modifier, fullkeyname;
int ii;
@@ -241,7 +237,7 @@ wxString AddHotkeyName( const wxString& aText, EDA_HOTKEY** aList,
wxString keyname;
if( aList )
keyname = KeyNameFromCommandId( aList, aCommandId );
keyname = ReturnKeyNameFromCommandId( aList, aCommandId );
if( !keyname.IsEmpty() )
{
@@ -282,14 +278,14 @@ wxString AddHotkeyName( const wxString& aText,
{
wxString msg = aText;
wxString keyname;
EDA_HOTKEY** list;
EDA_HOTKEY** List;
if( aDescList )
{
for( ; aDescList->m_HK_InfoList != NULL; aDescList++ )
{
list = aDescList->m_HK_InfoList;
keyname = KeyNameFromCommandId( list, aCommandId );
List = aDescList->m_HK_InfoList;
keyname = ReturnKeyNameFromCommandId( List, aCommandId );
if( !keyname.IsEmpty() )
{
@@ -317,13 +313,13 @@ wxString AddHotkeyName( const wxString& aText,
/**
* Function KeyNameFromCommandId
* Function ReturnKeyNameFromCommandId
* return the key name from the Command id value ( m_Idcommand member value)
* @param aList = pointer to a EDA_HOTKEY list of commands
* @param aCommandId = Command Id value
* @return the key name in a wxString
*/
wxString KeyNameFromCommandId( EDA_HOTKEY** aList, int aCommandId )
wxString ReturnKeyNameFromCommandId( EDA_HOTKEY** aList, int aCommandId )
{
wxString keyname;
@@ -333,7 +329,7 @@ wxString KeyNameFromCommandId( EDA_HOTKEY** aList, int aCommandId )
if( hk_decr->m_Idcommand == aCommandId )
{
keyname = KeyNameFromKeyCode( hk_decr->m_KeyCode );
keyname = ReturnKeyNameFromKeyCode( hk_decr->m_KeyCode );
break;
}
}
@@ -343,14 +339,14 @@ wxString KeyNameFromCommandId( EDA_HOTKEY** aList, int aCommandId )
/**
* Function KeyCodeFromKeyName
* Function ReturnKeyCodeFromKeyName
* return the key code from its key name
* Only some wxWidgets key values are handled for function key
* @param keyname = wxString key name to find in s_Hotkey_Name_List[],
* like F2 or space or an usual (ascii) char.
* @return the key code
*/
int KeyCodeFromKeyName( const wxString& keyname )
int ReturnKeyCodeFromKeyName( const wxString& keyname )
{
int ii, keycode = 0;
@@ -410,7 +406,7 @@ int KeyCodeFromKeyName( const wxString& keyname )
void DisplayHotkeyList( EDA_DRAW_FRAME* aFrame, struct EDA_HOTKEY_CONFIG* aDescList )
{
wxString keyname;
EDA_HOTKEY** list;
EDA_HOTKEY** List;
wxString msg = wxT( "<html><body bgcolor=\"#E2E2E2\">" );
@@ -420,16 +416,15 @@ void DisplayHotkeyList( EDA_DRAW_FRAME* aFrame, struct EDA_HOTKEY_CONFIG* aDescL
for( ; aDescList->m_HK_InfoList != NULL; aDescList++ )
{
list = aDescList->m_HK_InfoList;
List = aDescList->m_HK_InfoList;
for( ; *list != NULL; list++ )
for( ; *List != NULL; List++ )
{
EDA_HOTKEY* hk_decr = *list;
EDA_HOTKEY* hk_decr = *List;
if( !hk_decr->m_InfoMsg.Contains( wxT( "Macros" ) ) )
{
keyname = KeyNameFromKeyCode( hk_decr->m_KeyCode );
keyname = ReturnKeyNameFromKeyCode( hk_decr->m_KeyCode );
// Some chars should be modified, using html encoding, to be
// displayed by DisplayHtmlInfoMessage()
keyname.Replace( wxT("<"), wxT("&lt;") );
@@ -485,8 +480,8 @@ int EDA_BASE_FRAME::WriteHotkeyConfig( struct EDA_HOTKEY_CONFIG* aDescList,
msg = wxT( "$hotkey list\n" );
// Print the current hotkey list
EDA_HOTKEY** list;
/* Print the current hotkey list */
EDA_HOTKEY** List;
for( ; aDescList->m_HK_InfoList != NULL; aDescList++ )
{
@@ -500,13 +495,13 @@ int EDA_BASE_FRAME::WriteHotkeyConfig( struct EDA_HOTKEY_CONFIG* aDescList,
msg += *aDescList->m_SectionTag;
msg += wxT( "\n" );
list = aDescList->m_HK_InfoList;
List = aDescList->m_HK_InfoList;
for( ; *list != NULL; list++ )
for( ; *List != NULL; List++ )
{
EDA_HOTKEY* hk_decr = *list;
EDA_HOTKEY* hk_decr = *List;
msg += wxT( "shortcut " );
keyname = KeyNameFromKeyCode( hk_decr->m_KeyCode );
keyname = ReturnKeyNameFromKeyCode( hk_decr->m_KeyCode );
AddDelimiterString( keyname );
infokey = hk_decr->m_InfoMsg;
AddDelimiterString( infokey );
@@ -553,21 +548,21 @@ int EDA_BASE_FRAME::ReadHotkeyConfigFile( const wxString& aFilename,
{
wxFile cfgfile( aFilename );
// get length
/* get length */
cfgfile.SeekEnd();
wxFileOffset size = cfgfile.Tell();
cfgfile.Seek( 0 );
// read data
/* read data */
char* buffer = new char[size];
cfgfile.Read( buffer, size );
wxString data( buffer, wxConvUTF8 );
// parse
/* parse */
ParseHotkeyConfig( data, aDescList );
// cleanup
/* cleanup */
delete[] buffer;
cfgfile.Close();
return 1;
@@ -608,7 +603,7 @@ int EDA_BASE_FRAME::ReadHotkeyConfig( struct EDA_HOTKEY_CONFIG* aDescList )
void ParseHotkeyConfig( const wxString& data,
struct EDA_HOTKEY_CONFIG* aDescList )
{
// Read the config
/* Read the config */
wxStringTokenizer tokenizer( data, L"\r\n", wxTOKEN_STRTOK );
EDA_HOTKEY** CurrentHotkeyList = 0;
@@ -648,23 +643,23 @@ void ParseHotkeyConfig( const wxString& data,
if( CurrentHotkeyList == NULL )
continue;
// Get the key name
/* Get the key name */
lineTokenizer.SetString( lineTokenizer.GetString(), L"\"\r\n\t ", wxTOKEN_STRTOK );
wxString keyname = lineTokenizer.GetNextToken();
wxString remainder = lineTokenizer.GetString();
// Get the command name
/* Get the command name */
wxString fctname = remainder.AfterFirst( '\"' ).BeforeFirst( '\"' );
// search the hotkey in current hotkey list
for( EDA_HOTKEY** list = CurrentHotkeyList; *list != NULL; list++ )
/* search the hotkey in current hotkey list */
for( EDA_HOTKEY** List = CurrentHotkeyList; *List != NULL; List++ )
{
EDA_HOTKEY* hk_decr = *list;
EDA_HOTKEY* hk_decr = *List;
if( hk_decr->m_InfoMsg == fctname )
{
int code = KeyCodeFromKeyName( keyname );
int code = ReturnKeyCodeFromKeyName( keyname );
if( code )
hk_decr->m_KeyCode = code;
@@ -686,7 +681,7 @@ void EDA_BASE_FRAME::ImportHotkeyConfigFromFile( struct EDA_HOTKEY_CONFIG* aDesc
wxString ext = DEFAULT_HOTKEY_FILENAME_EXT;
wxString mask = wxT( "*." ) + ext;
wxString path = wxGetCwd();
wxString filename = Kiface().Name() + wxT( '.' ) + ext;
wxString filename = wxGetApp().GetAppName() + wxT( "." ) + ext;
filename = EDA_FileSelector( _( "Read Hotkey Configuration File:" ),
path,
@@ -714,7 +709,7 @@ void EDA_BASE_FRAME::ExportHotkeyConfigToFile( struct EDA_HOTKEY_CONFIG* aDescLi
wxString ext = DEFAULT_HOTKEY_FILENAME_EXT;
wxString mask = wxT( "*." ) + ext;
wxString path = wxGetCwd();
wxString filename = Kiface().Name() + wxT( "." ) + ext;
wxString filename = wxGetApp().GetAppName() + wxT( "." ) + ext;
filename = EDA_FileSelector( _( "Write Hotkey Configuration File:" ),
path,
@@ -741,14 +736,14 @@ void AddHotkeyConfigMenu( wxMenu* aMenu )
wxMenu* HotkeySubmenu = new wxMenu();
// List existing hotkey menu
/* List existing hotkey menu*/
AddMenuItem( HotkeySubmenu,
ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST,
_( "&List Current Keys" ),
_( "Displays the current hotkeys list and corresponding commands" ),
KiBitmap( info_xpm ) );
// Call hotkeys editor
/* Call hotkeys editor*/
AddMenuItem( HotkeySubmenu, ID_PREFERENCES_HOTKEY_SHOW_EDITOR,
_( "&Edit Hotkeys" ),
_( "Call the hotkeys editor" ),
@@ -756,19 +751,19 @@ void AddHotkeyConfigMenu( wxMenu* aMenu )
HotkeySubmenu->AppendSeparator();
// create hotkey file to export current hotkeys config
/* create hotkey file to export current hotkeys config */
AddMenuItem( HotkeySubmenu, ID_PREFERENCES_HOTKEY_EXPORT_CONFIG,
_( "E&xport Hotkeys" ),
_( "Create a hotkey configuration file to export the current hotkeys" ),
KiBitmap( save_setup_xpm ) );
// Reload hotkey file
/* Reload hotkey file */
AddMenuItem( HotkeySubmenu, ID_PREFERENCES_HOTKEY_IMPORT_CONFIG,
_( "&Import Hotkeys" ),
_( "Load an existing hotkey configuration file" ),
KiBitmap( reload_xpm ) );
// Append HotkeySubmenu to menu
/* Append HotkeySubmenu to menu */
AddMenuItem( aMenu, HotkeySubmenu,
ID_PREFERENCES_HOTKEY_SUBMENU, _( "&Hotkeys" ),
_( "Hotkeys configuration and preferences" ),
-128
View File
@@ -1,128 +0,0 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2008-2011 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <macros.h> // FROM_UTF8()
#include <wx/config.h>
#include <wx/stdpaths.h>
#include <kiface_i.h>
#include <pgm_base.h>
#include <common.h>
#include <gr_basic.h>
static const wxChar showPageLimitsKey[] = wxT( "ShowPageLimits" );
static const wxChar backgroundColorKey[] = wxT( "BackgroundColor" );
/// Initialize aDst SEARCH_STACK with KIFACE (DSO) specific settings.
/// A non-member function so it an be moved easily, plus it's nobody's business.
static void setSearchPaths( SEARCH_STACK* aDst, KIWAY::FACE_T aId )
{
SEARCH_STACK bases;
SystemDirsAppend( &bases );
aDst->Clear();
for( unsigned i = 0; i < bases.GetCount(); ++i )
{
wxFileName fn( bases[i], wxEmptyString );
// Add schematic library file path to search path list.
// we must add <kicad path>/library and <kicad path>/library/doc
if( aId == KIWAY::FACE_SCH )
{
// Add schematic doc file path (library/doc) to search path list.
fn.AppendDir( wxT( "library" ) );
aDst->AddPaths( fn.GetPath() );
fn.AppendDir( wxT( "doc" ) );
aDst->AddPaths( fn.GetPath() );
fn.RemoveLastDir();
fn.RemoveLastDir(); // "../../" up twice, removing library/doc/
}
// Add PCB library file path to search path list.
if( aId == KIWAY::FACE_PCB || aId == KIWAY::FACE_CVPCB )
{
fn.AppendDir( wxT( "modules" ) );
aDst->AddPaths( fn.GetPath() );
// Add 3D module library file path to search path list.
fn.AppendDir( wxT( "packages3d" ) );
aDst->AddPaths( fn.GetPath() );
fn.RemoveLastDir();
fn.RemoveLastDir(); // "../../" up twice, remove modules/packages3d
}
// Add KiCad template file path to search path list.
fn.AppendDir( wxT( "template" ) );
aDst->AddPaths( fn.GetPath() );
}
aDst->AddPaths( wxT( "/usr/local/share" ) );
#if 1 && defined(DEBUG)
aDst->Show( "kiface" );
#endif
}
bool KIFACE_I::start_common( int aCtlBits )
{
m_start_flags = aCtlBits;
m_bm.Init();
m_bm.m_config->Read( showPageLimitsKey, &g_ShowPageLimits );
// FIXME OSX Mountain Lion (10.8)
// Seems that Read doesn't found anything and ColorFromInt
// Asserts - I'm unable to reproduce on 10.7
int draw_bg_color = BLACK; // Default for all apps but Eeschema
if( m_id == KIWAY::FACE_SCH )
draw_bg_color = WHITE; // Default for Eeschema
m_bm.m_config->Read( backgroundColorKey, &draw_bg_color );
g_DrawBgColor = ColorFromInt( draw_bg_color );
setSearchPaths( &m_bm.m_search, m_id );
return true;
}
void KIFACE_I::end_common()
{
m_bm.End();
}
+31 -353
View File
@@ -22,398 +22,76 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <kiway.h>
#include <config.h>
#include <wx/debug.h>
#include <string.h>
#include <macros.h>
#include <kiway.h>
#include <kiway_player.h>
#include <kiway_express.h>
#include <pgm_base.h>
#include <config.h>
#include <id.h>
#include <wx/stdpaths.h>
#include <wx/debug.h>
// one for each FACE_T
wxDynamicLibrary KIWAY::s_sch_dso;
wxDynamicLibrary KIWAY::s_pcb_dso;
KIFACE* KIWAY::m_kiface[KIWAY_FACE_COUNT];
int KIWAY::m_kiface_version[KIWAY_FACE_COUNT];
KIWAY::KIWAY( PGM_BASE* aProgram, int aCtlBits, wxFrame* aTop ):
m_program( aProgram ),
m_ctl( aCtlBits ),
m_top( 0 )
KIWAY::KIWAY()
{
SetTop( aTop ); // hook player_destroy_handler() into aTop.
memset( m_player, 0, sizeof( m_player ) );
memset( &m_dso_players, 0, sizeof( m_dso_players ) );
}
// Any event types derived from wxCommandEvt, like wxWindowDestroyEvent, are
// propogated upwards to parent windows if not handled below. Therefore the
// m_top window should receive all wxWindowDestroyEvents originating from
// KIWAY_PLAYERs. It does anyways, but now player_destroy_handler eavesdrops
// on that event stream looking for KIWAY_PLAYERs being closed.
void KIWAY::player_destroy_handler( wxWindowDestroyEvent& event )
const wxString KIWAY::dso_name( FACE_T aFaceId )
{
wxWindow* w = event.GetWindow();
for( unsigned i=0; i<DIM(m_player); ++i )
{
// if destroying one of our flock, then mark it as deceased.
if( (wxWindow*) m_player[i] == w )
{
DBG(printf( "%s: m_player[%d] destroyed: %s\n",
__func__, i, TO_UTF8( m_player[i]->GetName() ) );)
m_player[i] = 0;
}
}
// event.Skip(); skip to who, the wxApp? I'm the top window.
}
void KIWAY::SetTop( wxFrame* aTop )
{
if( m_top )
{
m_top->Disconnect( wxEVT_DESTROY, wxWindowDestroyEventHandler( KIWAY::player_destroy_handler ), NULL, this );
}
if( aTop )
{
aTop->Connect( wxEVT_DESTROY, wxWindowDestroyEventHandler( KIWAY::player_destroy_handler ), NULL, this );
}
m_top = aTop;
}
const wxString KIWAY::dso_full_path( FACE_T aFaceId )
{
const wxChar* name;
switch( aFaceId )
{
case FACE_SCH: name = KIFACE_PREFIX wxT( "eeschema" ); break;
case FACE_PCB: name = KIFACE_PREFIX wxT( "pcbnew" ); break;
case FACE_CVPCB: name = KIFACE_PREFIX wxT( "cvpcb" ); break;
case FACE_GERBVIEW: name = KIFACE_PREFIX wxT( "gerbview" ); break;
case FACE_PL_EDITOR: name = KIFACE_PREFIX wxT( "pl_editor" ); break;
case FACE_PCB_CALCULATOR: name = KIFACE_PREFIX wxT( "pcb_calculator" ); break;
case FACE_BMP2CMP: name = KIFACE_PREFIX wxT( "bitmap2component" ); break;
case FACE_SCH: return KIFACE_PREFIX wxT( "eeschema" ) KIFACE_SUFFIX;
case FACE_PCB: return KIFACE_PREFIX wxT( "pcbnew" ) KIFACE_SUFFIX;
default:
wxASSERT_MSG( 0, wxT( "caller has a bug, passed a bad aFaceId" ) );
return wxEmptyString;
}
wxFileName fn = wxStandardPaths::Get().GetExecutablePath();
fn.SetName( name );
// Here a "suffix" == an extension with a preceding '.',
// so skip the preceding '.' to get an extension
fn.SetExt( KIFACE_SUFFIX + 1 ); // + 1 => &KIFACE_SUFFIX[1]
return fn.GetFullPath();
}
PROJECT& KIWAY::Prj() const
PROJECT& KIWAY::Project()
{
return *(PROJECT*) &m_project; // strip const-ness, function really is const.
return m_project;
}
KIFACE* KIWAY::KiFACE( FACE_T aFaceId, bool doLoad )
{
// Since this will be called from python, cannot assume that code will
// not pass a bad aFaceId.
if( unsigned( aFaceId ) >= DIM( m_kiface ) )
switch( aFaceId )
{
// @todo : throw an exception here for python's benefit, at least that
// way it gets some explanatory text.
case FACE_SCH:
case FACE_PCB:
//case FACE_LIB:
//case FACE_MOD:
if( m_dso_players[aFaceId] )
return m_dso_players[aFaceId];
default:
wxASSERT_MSG( 0, wxT( "caller has a bug, passed a bad aFaceId" ) );
return NULL;
}
// return the previously loaded KIFACE, if it was.
if( m_kiface[aFaceId] )
return m_kiface[aFaceId];
// DSO with KIFACE has not been loaded yet, does caller want to load it?
// DSO with KIFACE has not been loaded yet, does user want to load it?
if( doLoad )
{
wxString dname = dso_full_path( aFaceId );
wxDynamicLibrary dso;
void* addr = NULL;
if( !dso.Load( dname, wxDL_VERBATIM | wxDL_NOW ) )
switch( aFaceId )
{
// Failure: error reporting UI was done via wxLogSysError().
// No further reporting required here.
}
case FACE_SCH:
break;
else if( ( addr = dso.GetSymbol( wxT( KIFACE_INSTANCE_NAME_AND_VERSION ) ) ) == NULL )
{
// Failure: error reporting UI was done via wxLogSysError().
// No further reporting required here.
}
case FACE_PCB:
break;
else
{
KIFACE_GETTER_FUNC* getter = (KIFACE_GETTER_FUNC*) addr;
KIFACE* kiface = getter( &m_kiface_version[aFaceId], KIFACE_VERSION, m_program );
// KIFACE_GETTER_FUNC function comment (API) says the non-NULL is unconditional.
wxASSERT_MSG( kiface,
wxT( "attempted DSO has a bug, failed to return a KIFACE*" ) );
// Give the DSO a single chance to do its "process level" initialization.
// "Process level" specifically means stay away from any projects in there.
if( kiface->OnKifaceStart( m_program, m_ctl ) )
{
// Tell dso's wxDynamicLibrary destructor not to Unload() the program image.
(void) dso.Detach();
return m_kiface[aFaceId] = kiface;
}
}
// In any of the failure cases above, dso.Unload() should be called here
// by dso destructor.
// However:
// There is a file installation bug. We only look for KIFACE_I's which we know
// to exist, and we did not find one. If we do not find one, this is an
// installation bug.
wxString msg = wxString::Format( wxT(
"Fatal Installation Bug\nmissing file:\n'%s'\n\nargv[0]:\n'%s'" ),
GetChars( dname ),
GetChars( wxStandardPaths::Get().GetExecutablePath() )
);
// This is a fatal error, one from which we cannot recover, nor do we want
// to protect against in client code which would require numerous noisy
// tests in numerous places. So we inform the user that the installation
// is bad. This exception will likely not get caught until way up in the
// wxApp derivative, at which point the process will exit gracefully.
THROW_IO_ERROR( msg );
}
return NULL;
}
KIWAY::FACE_T KIWAY::KifaceType( FRAME_T aFrameType )
{
switch( aFrameType )
{
case FRAME_SCH:
case FRAME_SCH_LIB_EDITOR:
case FRAME_SCH_VIEWER:
case FRAME_SCH_VIEWER_MODAL:
return FACE_SCH;
case FRAME_PCB:
case FRAME_PCB_MODULE_EDITOR:
case FRAME_PCB_MODULE_VIEWER:
case FRAME_PCB_MODULE_VIEWER_MODAL:
case FRAME_PCB_FOOTPRINT_WIZARD_MODAL:
case FRAME_PCB_DISPLAY3D:
return FACE_PCB;
case FRAME_CVPCB:
case FRAME_CVPCB_DISPLAY:
return FACE_CVPCB;
case FRAME_GERBER:
return FACE_GERBVIEW;
case FRAME_PL_EDITOR:
return FACE_PL_EDITOR;
case FRAME_CALC:
return FACE_PCB_CALCULATOR;
case FRAME_BM2CMP:
return FACE_BMP2CMP;
default:
return FACE_T( -1 );
}
}
KIWAY_PLAYER* KIWAY::Player( FRAME_T aFrameType, bool doCreate )
{
// Since this will be called from python, cannot assume that code will
// not pass a bad aFrameType.
if( unsigned( aFrameType ) >= DIM( m_player ) )
{
// @todo : throw an exception here for python's benefit, at least that
// way it gets some explanatory text.
wxASSERT_MSG( 0, wxT( "caller has a bug, passed a bad aFrameType" ) );
return NULL;
}
// return the previously opened window
if( m_player[aFrameType] )
return m_player[aFrameType];
if( doCreate )
{
FACE_T face_type = KifaceType( aFrameType );
wxASSERT( face_type != FACE_T(-1) );
KIFACE* kiface = KiFACE( face_type );
wxASSERT( kiface );
if( kiface )
{
KIWAY_PLAYER* frame = (KIWAY_PLAYER*) kiface->CreateWindow(
m_top,
aFrameType,
this,
m_ctl // questionable need, these same flags where passed to the KIFACE::OnKifaceStart()
);
wxASSERT( frame );
return m_player[aFrameType] = frame;
//case FACE_LIB:
//case FACE_MOD:
default:
;
}
}
return NULL;
}
bool KIWAY::PlayerClose( FRAME_T aFrameType, bool doForce )
{
// Since this will be called from python, cannot assume that code will
// not pass a bad aFrameType.
if( unsigned( aFrameType ) >= DIM( m_player ) )
{
// @todo : throw an exception here for python's benefit, at least that
// way it gets some explanatory text.
wxASSERT_MSG( 0, wxT( "caller has a bug, passed a bad aFrameType" ) );
return false;
}
if( m_player[aFrameType] )
{
if( m_player[aFrameType]->Close( doForce ) )
{
m_player[aFrameType] = 0;
return true;
}
return false;
}
return true; // window is closed already.
}
bool KIWAY::PlayersClose( bool doForce )
{
bool ret = true;
for( unsigned i=0; i < DIM( m_player ); ++i )
{
ret = ret && PlayerClose( FRAME_T( i ), doForce );
}
return ret;
}
void KIWAY::ExpressMail( FRAME_T aDestination,
MAIL_T aCommand, const std::string& aPayload, wxWindow* aSource )
{
KIWAY_EXPRESS mail( aDestination, aCommand, aPayload, aSource );
ProcessEvent( mail );
}
void KIWAY::SetLanguage( int aLanguage )
{
Pgm().SetLanguageIdentifier( aLanguage );
Pgm().SetLanguage();
#if 1
// This is a risky hack that goes away if we allow the language to be
// set only from the top most frame if !Kiface.IsSingle()
// Only for the C++ project manager, and not for the python one and not for
// single_top do we look for the EDA_BASE_FRAME as the top level window.
// For single_top this is not needed because that window is registered in
// the array below.
if( m_ctl & KFCTL_CPP_PROJECT_SUITE )
{
EDA_BASE_FRAME* top = (EDA_BASE_FRAME*) m_top;
if( top )
top->ShowChangedLanguage();
}
#endif
for( unsigned i=0; i < DIM( m_player ); ++i )
{
KIWAY_PLAYER* frame = m_player[i];
if( frame )
{
frame->ShowChangedLanguage();
}
}
}
bool KIWAY::ProcessEvent( wxEvent& aEvent )
{
KIWAY_EXPRESS* mail = dynamic_cast<KIWAY_EXPRESS*>( &aEvent );
if( mail )
{
FRAME_T dest = mail->Dest();
// see if recipient is alive
KIWAY_PLAYER* alive = Player( dest, false );
if( alive )
{
#if 1
return alive->ProcessEvent( aEvent );
#else
alive->KiwayMailIn( *mail );
return true;
#endif
}
}
return false;
}
void KIWAY::OnKiwayEnd()
{
for( unsigned i=0; i < DIM( m_kiface ); ++i )
{
if( m_kiface[i] )
m_kiface[i]->OnKifaceEnd();
}
}
-60
View File
@@ -1,60 +0,0 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2014 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2014 KiCad Developers, see CHANGELOG.TXT for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <kiway_express.h>
//IMPLEMENT_DYNAMIC_CLASS( KIWAY_EXPRESS, wxEvent )
#if 0 // requires that this code reside in only a single link image, rather than
// in each of kicad.exe, _pcbnew.kiface, and _eeschema.kiface as now.
// In the current case wxEVENT_ID will get a different value in each link
// image. We need to put this into a shared library for common utilization,
// I think that library should be libki.so. I am reluctant to do that now
// because the cost will be finding libki.so at runtime, and we need infrastructure
// to set our LIB_ENV_VAR to the proper place so libki.so can be reliably found.
// All things in due course.
const wxEventType KIWAY_EXPRESS::wxEVENT_ID = wxNewEventType();
#else
const wxEventType KIWAY_EXPRESS::wxEVENT_ID = 30000; // commmon accross all link images, hopefully unique.
#endif
KIWAY_EXPRESS::KIWAY_EXPRESS( const KIWAY_EXPRESS& anOther ) :
wxEvent( anOther )
{
m_destination = anOther.m_destination;
m_payload = anOther.m_payload;
}
KIWAY_EXPRESS::KIWAY_EXPRESS( FRAME_T aDestination, MAIL_T aCommand,
const std::string& aPayload, wxWindow* aSource ) :
wxEvent( aCommand, wxEVENT_ID ),
m_destination( aDestination ),
m_payload( aPayload )
{
SetEventObject( aSource );
}
-32
View File
@@ -1,32 +0,0 @@
#include <kiway.h>
#include <kiway_player.h>
#if defined(DEBUG)
#include <typeinfo>
#endif
PROJECT& KIWAY_HOLDER::Prj() const
{
return Kiway().Prj();
}
// this is not speed critical, hide it out of line.
void KIWAY_HOLDER::SetKiway( wxWindow* aDest, KIWAY* aKiway )
{
#if defined(DEBUG)
// offer a trap point for debugging most any window
wxASSERT( aDest );
if( !strcmp( typeid(aDest).name(), "DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB" ) )
{
int breakhere=1;
(void) breakhere;
}
#endif
(void) aDest;
m_kiway = aKiway;
}
-204
View File
@@ -1,204 +0,0 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2014 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2014 KiCad Developers, see CHANGELOG.TXT for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <kiway_player.h>
#include <kiway_express.h>
#include <kiway.h>
#include <id.h>
#include <macros.h>
#include <typeinfo>
#include <wx/utils.h>
#include <wx/evtloop.h>
BEGIN_EVENT_TABLE( KIWAY_PLAYER, EDA_BASE_FRAME )
EVT_KIWAY_EXPRESS( KIWAY_PLAYER::kiway_express )
EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, KIWAY_PLAYER::language_change )
END_EVENT_TABLE()
KIWAY_PLAYER::KIWAY_PLAYER( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType,
const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize,
long aStyle, const wxString& aWdoName ) :
EDA_BASE_FRAME( aParent, aFrameType, aTitle, aPos, aSize, aStyle, aWdoName ),
KIWAY_HOLDER( aKiway ),
m_modal( false ),
m_modal_loop( 0 ), m_modal_resultant_parent( 0 )
{
// DBG( printf("KIWAY_EXPRESS::wxEVENT_ID:%d\n", KIWAY_EXPRESS::wxEVENT_ID );)
}
KIWAY_PLAYER::KIWAY_PLAYER( wxWindow* aParent, wxWindowID aId, const wxString& aTitle,
const wxPoint& aPos, const wxSize& aSize, long aStyle,
const wxString& aWdoName ) :
EDA_BASE_FRAME( aParent, (FRAME_T) aId, aTitle, aPos, aSize, aStyle, aWdoName ),
KIWAY_HOLDER( 0 ),
m_modal( false ),
m_modal_loop( 0 ), m_modal_resultant_parent( 0 )
{
// DBG( printf("KIWAY_EXPRESS::wxEVENT_ID:%d\n", KIWAY_EXPRESS::wxEVENT_ID );)
}
KIWAY_PLAYER::~KIWAY_PLAYER(){}
void KIWAY_PLAYER::KiwayMailIn( KIWAY_EXPRESS& aEvent )
{
// override this in derived classes.
}
bool KIWAY_PLAYER::ShowModal( wxString* aResult, wxWindow* aResultantFocusWindow )
{
wxASSERT_MSG( IsModal(), wxT( "ShowModal() shouldn't be called on non-modal frame" ) );
/*
This function has a nice interface but a necessarily unsightly implementation.
Now the implementation is encapsulated, localizing future changes.
It works in tandem with DismissModal(). But only ShowModal() is in the
vtable and therefore cross-module capable.
*/
// This is an exception safe way to zero a pointer before returning.
// Yes, even though DismissModal() clears this first normally, this is
// here in case there's an exception before the dialog is dismissed.
struct NULLER
{
void*& m_what;
NULLER( void*& aPtr ) : m_what( aPtr ) {}
~NULLER() { m_what = 0; } // indeed, set it to NULL on destruction
} clear_this( (void*&) m_modal_loop );
m_modal_resultant_parent = aResultantFocusWindow;
Show( true );
SetFocus();
{
// exception safe way to disable all frames except the modal one,
// re-enables only those that were disabled on exit
wxWindowDisabler toggle( this );
WX_EVENT_LOOP event_loop;
#if wxCHECK_VERSION( 2, 9, 4 ) // 2.9.4 is only approximate.
// new code needs this, old code does it in wxEventLoop::Run() and cannot
// tolerate it here. Where that boundary is as a version number, I don't know.
// A closer look at the subversion repo for wx would tell.
wxEventLoopActivator event_loop_stacker( &event_loop );
#endif
m_modal_loop = &event_loop;
event_loop.Run();
} // End of scop for some variables.
// End nesting before setting focus below.
if( aResult )
*aResult = m_modal_string;
DBG(printf( "~%s: aResult:'%s' ret:%d\n",
__func__, TO_UTF8( m_modal_string ), m_modal_ret_val );)
if( aResultantFocusWindow )
{
aResultantFocusWindow->Raise();
// have the final say, after wxWindowDisabler reenables my parent and
// the events settle down, set the focus
wxYield();
aResultantFocusWindow->SetFocus();
}
return m_modal_ret_val;
}
bool KIWAY_PLAYER::Destroy()
{
// Reparent is needed on Windows to leave the modal parent on top with focus
// However it works only if the caller is a main frame, not a dialog.
// (application crashes if the new parent is a wxDialog
#ifdef __WINDOWS__
if( m_modal_resultant_parent && GetParent() != m_modal_resultant_parent )
{
EDA_BASE_FRAME* parent = dynamic_cast<EDA_BASE_FRAME*>(m_modal_resultant_parent);
if( parent )
Reparent( m_modal_resultant_parent );
}
#endif
return EDA_BASE_FRAME::Destroy();
}
bool KIWAY_PLAYER::IsDismissed()
{
bool ret = !m_modal_loop;
DBG(printf( "%s: ret:%d\n", __func__, ret );)
return ret;
}
void KIWAY_PLAYER::DismissModal( bool aRetVal, const wxString& aResult )
{
m_modal_ret_val = aRetVal;
m_modal_string = aResult;
if( m_modal_loop )
{
m_modal_loop->Exit();
m_modal_loop = 0; // this marks it as dismissed.
}
Show( false );
}
void KIWAY_PLAYER::kiway_express( KIWAY_EXPRESS& aEvent )
{
// logging support
#if defined(DEBUG)
const char* class_name = typeid( this ).name();
printf( "%s: received cmd:%d pay:'%s'\n", class_name,
aEvent.Command(), aEvent.GetPayload().c_str() );
#endif
KiwayMailIn( aEvent ); // call the virtual, override in derived.
}
void KIWAY_PLAYER::language_change( wxCommandEvent& event )
{
int id = event.GetId();
// tell all the KIWAY_PLAYERs about the language change.
Kiway().SetLanguage( id );
}
+3 -8
View File
@@ -27,24 +27,20 @@
#include <cstdlib>
#include <climits>
#include <math/math_util.h>
#include <stdint.h>
template<>
template <>
int rescale( int aNumerator, int aValue, int aDenominator )
{
return (int) ( (int64_t) aNumerator * (int64_t) aValue / (int64_t) aDenominator );
}
template<>
template <>
int64_t rescale( int64_t aNumerator, int64_t aValue, int64_t aDenominator )
{
#ifdef __x86_64__
return ( (__int128_t) aNumerator * (__int128_t) aValue ) / aDenominator;
#else
int64_t r = 0;
int64_t sign = ( ( aNumerator < 0 ) ? -1 : 1 ) * ( aDenominator < 0 ? -1 : 1 ) *
( aValue < 0 ? -1 : 1 );
( aValue < 0 ? -1 : 1 );
int64_t a = std::abs( aNumerator );
int64_t b = std::abs( aValue );
@@ -88,5 +84,4 @@ int64_t rescale( int64_t aNumerator, int64_t aValue, int64_t aDenominator )
return t1 * sign;
}
#endif
}
+2 -3
View File
@@ -37,9 +37,8 @@ END_EVENT_TABLE()
EDA_MSG_PANEL::EDA_MSG_PANEL( wxWindow* aParent, int aId,
const wxPoint& aPosition, const wxSize& aSize,
long style, const wxString &name ) :
wxPanel( aParent, aId, aPosition, aSize, style, name )
const wxPoint& aPosition, const wxSize& aSize ) :
wxPanel( aParent, aId, aPosition, aSize )
{
SetFont( wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT ) );
SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );

Some files were not shown because too many files have changed in this diff Show More