Commit Graph

51 Commits

Author SHA1 Message Date
jean-pierre charras f785d27498 Eeschema, label editor dialog: fix a very minor cosmetic issue when resizing the dialog. 2018-06-23 17:53:29 +02:00
jean-pierre charras 0e493a3f91 Disallow '/' in labels, Step 2: disallow not allowed chars in all labels (local, global, hierarchical, and sheet pin)
Currently, if a old label already containing a '/' (or a space) is edited, it is accepted,
but no new not allowed char can be added to the label.
(Previously, a sheet pin label was not filtered)
2018-02-19 18:15:53 +01:00
Jeff Young 04d1d503ee Disallow '/' in labels.
Fixes: lp:1749232
* https://bugs.launchpad.net/kicad/+bug/1749232
2018-02-19 18:08:09 +01:00
Jeff Young 6c61a46721 Rationalize label orientations for dialog display.
Fixes: lp:593795
* https://bugs.launchpad.net/kicad/+bug/593795
2018-02-08 20:16:26 -05:00
jean-pierre charras 8022f1cc01 fix code after renamin files 2018-01-30 11:49:51 +01:00
jean-pierre charras 4c5bd01887 Rename a few files 2018-01-28 22:02:31 +01:00
Jeff Young fb597f4298 Enable tab navigation and shift-return-for-OK in multiline text controls for text objects.
Fixes: lp:1420916
* https://bugs.launchpad.net/kicad/+bug/1420916
2017-12-31 09:08:42 -05:00
jean-pierre charras ccfad8306b eeschema: fix an annoying issue created by commit fdb53f28e6b666f242c3d24dfbfb0e4050bfa2ad: enter a label size starting by 0 (like 0.3) was not possible. 2017-03-14 20:40:21 +01:00
Oliver fdb53f28e6 Improvement for label edit dialog in eeschema:
- Added wxTE_RICH property to label text controls (allows ctrl+backspace in Windows)
- Added numeric validator to text size
2017-03-14 13:08:36 -04:00
jean-pierre charras 7dddb1d1c1 When editing a label property it always goes to right orientation by itself
Fixes: lp:1661264
https://bugs.launchpad.net/kicad/+bug/1661264
2017-02-02 16:50:49 +01:00
Diogo Condeco 75ffcbcef5 MACOS Setfocus and CancelButtonIssue moved into dialog_shim.
Setfocus now works on macos dialogs by setting DLGSHIM_USE_SETFOCUS.
This option is only enabled __WXMAC__ is defined.

FixOSXCancelButtonIssue() is now called inside DIALOG_SHIM::SHOW.
All other calls from within the dialogs were removed.
2017-01-29 23:51:35 +01:00
Dick Hollenbeck 0c459ced97 EDA_TEXT object refactor.
Make all EDA_TEXT data private and rename accessors to avoid function
name collisions in derived classes.

Overload EDA_TEXT's SetTextAngle() and SetEffects() in TEXTE_PCB.

Add support for preserving Reference text position, size, orientation
during a netlist import into a BOARD, as well as the one off footprint
update dialog.
2017-01-25 08:03:32 -05:00
Simon Richter ad088db6d2 Add more "override" markers. 2016-09-25 13:59:41 -04:00
Simon Richter 59c81976dc Explicitly mark overriding functions. 2016-09-24 14:53:15 -04:00
jean-pierre charras 3cea754d90 Eeschema: dlg size fixes and osx fixes 2016-07-16 12:54:55 +02:00
jean-pierre charras df1d10c824 Eeschema: Fix issue in multiline text properties dialog editor: on wxWidgets 3.1, the enter key closes the dialog instead of inserting a new line in text. 2016-03-24 13:28:50 +01:00
jean-pierre charras 8522b0deb7 Rename enum TypeSheetLabel to PINSHEETLABEL_SHAPE (Better name, and in accordance with our coding style policy) 2016-02-28 19:16:59 +01:00
unknown 4b103baa3a Enum refactoring and shiny icons in dialog_lib_edit_pin_table 2016-02-28 18:33:29 +01:00
Dick Hollenbeck 83ecd43754 Eeschema impovements.
* Improve schematic label edit dialog.
* Rename SCH_SCREEN::BuildSchCmpLinksToLibCmp() to SCH_SCREEN::CheckComponentsToPartsLinks()
  for improved readability.
2015-04-03 16:38:24 -04:00
jean-pierre charras c6f4f15926 Eeschema: Minor code reorganization:
* move not shared files (sch_item_struct.*, sch_base_frame.h) to eeschema;
* move wxEeschemaStruct.h to eeschema and rename it schframe.h to be consistent with the other corresponding file name schframe.cpp;
* remove few not needed  #include
2015-02-21 10:46:44 +01:00
Lorenzo Marcantonio 260ca0e79f Added support for decoupling stored text from shown text in EDA_TEXT
Factored out text ellipsing support to max 15 character (for generating menu items)
2014-09-13 20:15:45 +02:00
Lorenzo Marcantonio 6d17ad712c Made the project default text size apply to all text things in eeschema, instead of the hardcoded value 2014-05-16 15:57:53 +02:00
Dick Hollenbeck 2c67c3ff80 * KIWAY Milestone A): Make major modules into DLL/DSOs.
!   The initial testing of this commit should be done using a Debug build so that
    all the wxASSERT()s are enabled.  Also, be sure and keep enabled the
    USE_KIWAY_DLLs option.  The tree won't likely build without it.  Turning it
    off is senseless anyways.  If you want stable code, go back to a prior version,
    the one tagged with "stable".

*   Relocate all functionality out of the wxApp derivative into more finely
    targeted purposes:
    a) DLL/DSO specific
    b) PROJECT specific
    c) EXE or process specific
    d) configuration file specific data
    e) configuration file manipulations functions.

    All of this functionality was blended into an extremely large wxApp derivative
    and that was incompatible with the desire to support multiple concurrently
    loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects.
    An amazing amount of organization come from simply sorting each bit of
    functionality into the proper box.

*   Switch to wxConfigBase from wxConfig everywhere except instantiation.
*   Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD,
    PGM_SINGLE_TOP,
*   Remove "Return" prefix on many function names.
*   Remove obvious comments from CMakeLists.txt files, and from else() and endif()s.
*   Fix building boost for use in a DSO on linux.
*   Remove some of the assumptions in the CMakeLists.txt files that windows had
    to be the host platform when building windows binaries.
*   Reduce the number of wxStrings being constructed at program load time via
    static construction.
*   Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that
    these functions are useful even when the wxConfigBase comes from another
    source, as is the case in the KICAD_MANAGER_FRAME.
*   Move the setting of the KIPRJMOD environment variable into class PROJECT,
    so that it can be moved into a project variable soon, and out of FP_LIB_TABLE.
*   Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all
    its child wxFrames and wxDialogs now have a Kiway() member function which
    returns a KIWAY& that that window tree branch is in support of.  This is like
    wxWindows DNA in that child windows get this member with proper value at time
    of construction.
*   Anticipate some of the needs for milestones B) and C) and make code
    adjustments now in an effort to reduce work in those milestones.
*   No testing has been done for python scripting, since milestone C) has that
    being largely reworked and re-thought-out.
2014-03-19 19:42:08 -05:00
jean-pierre charras cf7dbf6f94 Fix some minor issues 2013-11-18 18:52:18 +01: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
Lorenzo Marcantonio 42709330e0 Better strings for the translators (converted concatenations to formats) 2013-04-09 19:49:01 +02:00
Lorenzo Marcantonio 4865a68fa0 Extremely trivial stuff (mostly cosmetics) 2013-03-28 07:40:19 +01:00
Wayne Stambaugh 7d0ec1a138 More encapsulation work.
* Complete encapsulation of the MODULE class.
* Complete encapsulation of the EDA_TEXT class.
* Encapsulate most of the ZONE_CONTAINER class.
* Add pcbcommon library as a dependency for reSWIGging the scripting
  support.  This should cover most dependency cases.
2013-03-18 15:36:07 -04:00
Jacobo Aragunde Perez 03ffc93786 Eeschema: hotkey enhancement while moving a block or an item. 2013-01-21 21:16:04 +01:00
Andrey Fedorushkov cedcd2bace eeschema: fix segfault when edit text and empty editing text 2012-10-13 22:33:58 +04: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
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
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
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 df494fc83e start toying with DIALOG_SHIM 2012-03-19 15:57:19 -05:00
Dick Hollenbeck b8a0ab4c52 switch to <> for includes from "" per conversation with Jean-Pierre and Wayne, adjust search paths 2012-01-22 22:33:36 -06:00
Wayne Stambaugh c2e5fcaec8 More encapsulation improvements.
* EDA_DRAW_FRAME completely encapsulated.
* Encapsulate the the low hanging fruit in EDA_DRAW_PANEL.
2011-12-22 08:28:11 -05:00
Wayne Stambaugh 6c28cdc62c More encapsulation work and other minor improvements.
* EDA_RECT and EDA_ITEM completely encapsulated.
* Removed unnecessary EDA_ITEM member m_Selected and replaced functionality
  with SELECTED flag bit.
2011-12-21 08:42:02 -05:00
Wayne Stambaugh fac288cffa More encapsulation work and other minor improvements.
* EDA_DRAW_FRAME completely encapsulated except for DrawFrame member.
* Moved members specific to Pcbnew from EDA_DRAW_FRAME to PCB_BASE_FRAME
  or PCB_EDIT_FRAME as appropriate.
* Replace EDA_TOOLBAR with wxAuiToolBar as EDA_TOOL bar provided no
  additional functionality and made code less readable.
* Remove EDA_TOOLBAR class definition from wxstruct.h and delete file
  wineda_toolbar.cpp.
* Rename tool bar members to something more descriptive since the
  horizontal and vertical references wont mean anything once the
  tool bars are movable.
* Lots of dead code removal.
2011-12-16 08:32:23 -05:00
Wayne Stambaugh 1047e60e35 Encapsulate SCH_POLYLINE, SCH_SHEET, and SCH_TEXT classes. 2011-12-08 10:45:01 -05:00
Wayne Stambaugh ebc7259a91 Rename WinEDA_App class to EDA_APP and remove redundant includes. 2011-09-06 10:09:40 -04:00
Wayne Stambaugh cfc3d6dfd6 EESchema sheet pin code improvements.
* Change all code references to pin sheet and sheet label to sheet pin to
  more closely match the sheet pin object for improved code readability.
* Change menu and tool bar text from pin sheet to sheet pin for improved
  user readability.
* Moved sheet pin place method to sheet pin object source file.
* Move last sheet pin stored state information into schematic frame object.
* Add Doxygen comments for the sheet pin editing methods.
2011-03-30 15:26:05 -04:00
Wayne Stambaugh 175fab48f8 EESchema multiple item hit testing and other minor improvements.
* Add item clarification context menu to EESchema when multiple unresolved
  items are found at the current cross hair position.
* Add collector class SCH_COLLECTOR for supporting multiple item hit testing.
* Removed bit wise masked filtering from schematic item hit testing.
* Removed all old hit testing functions and methods scattered about the
  EESchema source code.
* Move terminal point test function into SCH_SCREEN object.
* Fixed bug in terminal point test when terminating a bus to a label.
* Define the < operator for sorting schematic items.
* Add area calculation method to EDA_Rect item.
* Add method for returning an item's bitmap for menu display purposes.
* Add method for returning an item's menu text for menu display purposes.
* Changed EDA_ITEMS container from boost::ptr_vector to std::vector.
* Factor coordinate string conversion code from EDA_DRAW_FRAME to function
  CoordinateToString().
2011-03-25 15:16:05 -04:00
Wayne Stambaugh 9e0e43e4c1 EESchema and other minor code improvements.
* Change EDA_ITEM set flag function to set flag bits using logical or
  instead of assignment.
* Add clear flag function to EDA_ITEM to clear flag bit using inverted
  logical and.
* Factor change schematic text type code out of switch statement into
  a single function call.
* Schematic text orientation function renaming improvements.
* Lots of small coding policy changes to updated files.
2011-03-02 20:58:12 -05:00
Wayne Stambaugh 7b8b51b240 Draw panel object refactoring and other minor code cleaning.
* Rename all member variables and methods that reference the cross hair
  code in draw panel object from cursor to cross hair to eliminate confusion
  between the two concepts.
* Rename cursor capture call backs in draw panel object to improve code
  readability.
* Create helper class for turning off the cross hair while drawing.
* Remove redundant block clear code.
* Remove redundant mouse capture call back reset code when end capture
  call back is called.
* Remove unused function definitions in base draw frame object.
* Lots of minor coding policy and doxygen comment fixes.
2011-02-11 15:48:13 -05:00
Wayne Stambaugh d657b43052 Use wxDC for all coordinate manipulations.
* Remove all occurrences if #ifdef USE_WX_ZOOM and all associated code within
  the #else/#endif block ( old zoom code ).
* Removed the build option for USE_WX_ZOOM from CMakeList.txt and config.h.in.
* Removed all scaling code in base screen object.
* Fixed buffered paint and buffered client DC on Windows.  Buffering works
  properly on Linux and Windows.
* Modified kicad_device_context.h to automatically uses buffering on platforms
  where double buffering is supported natively.
* Remove all of the scaled versions of the drawing functions in gr_basic.cpp
  and any support code.
* Removed all traces of ActiveScreen global variable from eeschema and
  gerbview.
* Renamed Recadre_Trace to RedrawScreen in draw frame object.
* Renamed PostDirtyRect to RefreshDrawingRect in draw panel object.
* Lots of code cleaning an Doxygen comment improvements.
2011-01-30 17:22:38 -05:00
jean-pierre charras 3453e67085 Eeschema: minor enhancements 2010-12-22 15:11:01 +01:00
Wayne Stambaugh adb4ad1a7b Schematic object improvements and other minor fixes. 2010-12-10 14:47:44 -05:00
Wayne Stambaugh c79077c9a2 Minor fixes and lots of coding policy changes. 2010-12-08 15:12:46 -05:00
jean-pierre charras 8e0937e6a2 Pcbnew: code cleaning, dialogs converted from Dialogblocks to wxFormBuilder, file housekeeping. Add patch from Manveru. 2010-11-27 14:09:18 +01:00