KiCad PCB EDA Suite
sch_edit_frame.h
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2015 Jean-Pierre Charras, jp.charras wanadoo.fr
5  * Copyright (C) 2008 Wayne Stambaugh <stambaughw@gmail.com>
6  * Copyright (C) 2004-2018 KiCad Developers, see AUTHORS.txt for contributors.
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, you may find one here:
20  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21  * or you may search the http://www.gnu.org website for the version 2 license,
22  * or you may write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24  */
25 
30 #ifndef SCH_EDIT_FRAME_H
31 #define SCH_EDIT_FRAME_H
32 
33 #include <sch_base_frame.h>
34 #include <config_params.h>
35 #include <undo_redo_container.h>
36 #include <template_fieldnames.h>
37 #include <block_commande.h>
38 #include <sch_collectors.h>
39 #include <sch_draw_panel.h>
40 
41 // enum PINSHEETLABEL_SHAPE
42 #include <sch_text.h>
43 
44 class LIB_EDIT_FRAME;
45 class LIB_VIEW_FRAME;
46 class DRAWSEGMENT;
47 class SCH_ITEM;
48 class SCH_NO_CONNECT;
49 class EDA_ITEM;
50 class SCH_BUS_ENTRY_BASE;
51 class SCH_BUS_WIRE_ENTRY;
52 class SCH_BUS_BUS_ENTRY;
53 class SCH_GLOBALLABEL;
54 class SCH_TEXT;
55 class SCH_BITMAP;
56 class SCH_SHEET;
57 class SCH_SHEET_PATH;
58 class SCH_SHEET_PIN;
59 class SCH_COMPONENT;
60 class SCH_FIELD;
61 class LIB_PIN;
62 class SCH_JUNCTION;
63 class DIALOG_SCH_FIND;
64 class DIALOG_ANNOTATE;
65 class wxFindDialogEvent;
66 class wxFindReplaceData;
67 class SCHLIB_FILTER;
68 class RESCUER;
69 
70 
73  CMP_NORMAL, // Normal orientation, no rotation or mirror
74  CMP_ROTATE_CLOCKWISE, // Rotate -90
76  CMP_ORIENT_0, // No rotation and no mirror id CMP_NORMAL
77  CMP_ORIENT_90, // Rotate 90, no mirror
78  CMP_ORIENT_180, // Rotate 180, no mirror
79  CMP_ORIENT_270, // Rotate -90, no mirror
80  CMP_MIRROR_X = 0x100, // Mirror around X axis
81  CMP_MIRROR_Y = 0x200 // Mirror around Y axis
82 };
83 
84 
90 };
92 
93 
100 };
102 
103 
111 };
112 
113 
118 {
119 private:
123 
126  wxPageSetupDialogData m_pageSetupData;
127  wxFindReplaceData* m_findReplaceData;
132  wxArrayString m_findStringHistoryList;
141  wxString m_netListerCommand;
143  int m_exec_flags;
145 
148 
153 
156 
159 
162 
164  wxString m_netListFormat;
165 
168 
170  static wxSize m_lastSheetPinTextSize;
172 
173 protected:
177  const wxSize &GetLastSheetPinTextSize();
178 
184  virtual bool doAutoSave() override;
185 
189  virtual bool isAutoSaveRequired() const override;
190 
195  void addCurrentItemToScreen();
196 
197  void updateFindReplaceView( wxFindDialogEvent& aEvent );
198 
199  void backAnnotateFootprints( const std::string& aChangedSetOfReferences );
200 
207  bool prepareForNetlist();
208 
212  void sendNetlist();
213 
214 public:
215  SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent );
216  ~SCH_EDIT_FRAME();
217 
218  SCH_SCREEN* GetScreen() const override;
219 
220  void OnCloseWindow( wxCloseEvent& Event );
221 
222  bool GetForceHVLines() const { return m_forceHVLines; }
223  void SetForceHVLines( bool aForceHVdirection ) { m_forceHVLines = aForceHVdirection; }
224 
225  bool GetShowAllPins() const { return m_showAllPins; }
226  void SetShowAllPins( bool aEnable ) { m_showAllPins = aEnable; }
227 
228  bool GetFootprintPreview() const { return m_footprintPreview; }
229  void SetFootprintPreview( bool aEnable ) { m_footprintPreview = aEnable; }
230 
231  bool GetAutoplaceFields() const { return m_autoplaceFields; }
232  void SetAutoplaceFields( bool aEnable ) { m_autoplaceFields = aEnable; }
233 
234  bool GetAutoplaceAlign() const { return m_autoplaceAlign; }
235  void SetAutoplaceAlign( bool aEnable ) { m_autoplaceAlign = aEnable; }
236 
237  bool GetAutoplaceJustify() const { return m_autoplaceJustify; }
238  void SetAutoplaceJustify( bool aEnable ) { m_autoplaceJustify = aEnable; }
239 
240  const wxString GetNetListFormatName() const { return m_netListFormat; }
241  void SetNetListFormatName( const wxString& aFormat ) { m_netListFormat = aFormat; }
242 
244  void SetSpiceAjustPassiveValues( bool aEnable ) { m_spiceAjustPassiveValues = aEnable; }
245 
247  const wxString& GetPlotDirectoryName() const { return m_plotDirectoryName; }
248  void SetPlotDirectoryName( const wxString& aDirName ) { m_plotDirectoryName = aDirName; }
249 
250  void Process_Special_Functions( wxCommandEvent& event );
251  void Process_Config( wxCommandEvent& event );
252  void OnSelectTool( wxCommandEvent& aEvent );
253 
254  bool GeneralControl( wxDC* aDC, const wxPoint& aPosition, EDA_KEY aHotKey ) override;
255 
265 
271  void SaveProjectSettings( bool aAskForSave ) override;
272 
278  bool LoadProjectFile();
279 
287  static wxString GetDefaultFieldName( int aFieldNdx );
288 
300  int AddTemplateFieldName( const TEMPLATE_FIELDNAME& aFieldName )
301  {
302  return m_templateFieldNames.AddTemplateFieldName( aFieldName );
303  }
304 
309  {
311  }
312 
325 
326  void LoadSettings( wxConfigBase* aCfg ) override;
327  void SaveSettings( wxConfigBase* aCfg ) override;
328 
329  void RedrawActiveWindow( wxDC* DC, bool EraseBg ) override;
330 
331  void CreateScreens();
332  void ReCreateHToolbar() override;
333  void ReCreateVToolbar() override;
334  void ReCreateOptToolbar();
335  void ReCreateMenuBar() override;
336 
338  EDA_HOTKEY* GetHotKeyDescription( int aCommand ) const override;
339 
340  bool OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition, EDA_ITEM* aItem ) override;
341 
346  void OnModify();
347 
348  virtual wxString GetScreenDesc() const override;
349 
356  virtual void ExecuteRemoteCommand( const char* cmdline ) override;
357 
358  void KiwayMailIn( KIWAY_EXPRESS& aEvent ) override;
359 
360  void OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) override;
361  void OnLeftDClick( wxDC* aDC, const wxPoint& aPosition ) override;
362  bool OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu ) override;
363  void OnSelectOptionToolbar( wxCommandEvent& event );
364  double BestZoom() override;
365 
384  SCH_ITEM* LocateAndShowItem( const wxPoint& aPosition,
385  const KICAD_T aFilterList[] = SCH_COLLECTOR::AllItems,
386  int aHotKeyCommandId = 0,
387  bool* aClarifySelectionMenuCancelled = nullptr );
388 
404  SCH_ITEM* LocateItem( const wxPoint& aPosition,
405  const KICAD_T aFilterList[] = SCH_COLLECTOR::AllItems,
406  int aHotKeyCommandId = 0 );
407 
415  bool DeleteItemAtCrossHair();
416 
417 
427  bool HighlightConnectionAtPosition( wxPoint aPosition );
428 
438  SCH_ITEM* FindComponentAndItem( const wxString& aReference,
439  bool aSearchHierarchy,
440  SCH_SEARCH_T aSearchType,
441  const wxString& aSearchText );
442 
452  bool BreakSegment( SCH_LINE* aSegment, const wxPoint& aPoint, bool aAppend = false,
453  SCH_LINE** aNewSegment = NULL );
454 
463  bool BreakSegments( const wxPoint& aPoint, bool aAppend = false );
464 
472  bool BreakSegmentsOnJunctions( bool aApped = false );
473 
478  bool TestDanglingEnds();
479 
492  void SendMessageToPCBNEW( EDA_ITEM* aObjectToSync, SCH_COMPONENT* aPart );
493 
499  void SendCrossProbeNetName( const wxString& aNetName );
500 
507  NETLIST_OBJECT_LIST* BuildNetListBase( bool updateStatusText = true );
508 
529  bool CreateNetlist( int aFormat,
530  const wxString& aFullFileName,
531  unsigned aNetlistOptions,
532  REPORTER* aReporter = NULL,
533  bool silent = false );
534 
552  bool WriteNetListFile( NETLIST_OBJECT_LIST* aConnectedItemsList,
553  int aFormat,
554  const wxString& aFullFileName,
555  unsigned aNetlistOptions,
556  REPORTER* aReporter = NULL );
557 
564  void DeleteAnnotation( bool aCurrentSheetOnly );
565 
594  void AnnotateComponents( bool aAnnotateSchematic, ANNOTATE_ORDER_T aSortOption,
595  ANNOTATE_OPTION_T aAlgoOption, int aStartNumber,
596  bool aResetAnnotation, bool aRepairTimestamps, bool aLockUnits,
597  REPORTER& aReporter );
598 
615  int CheckAnnotate( REPORTER& aReporter, bool aOneSheetOnly );
616 
622  int ModalAnnotate( const wxString& aMessage );
623 
624  // Functions used for hierarchy handling
626 
627  void SetCurrentSheet( const SCH_SHEET_PATH& aSheet );
628 
632  void HardRedraw() override;
633 
637  void DisplayCurrentSheet();
638 
647 
659 
665  void SetSheetNumberAndCount();
666 
670  void OnPrint( wxCommandEvent& event );
671 
672  wxPageSetupDialogData& GetPageSetupData() { return m_pageSetupData; }
673 
675  void SetPrintMonochrome( bool aMonochrome ) { m_printMonochrome = aMonochrome; }
677  void SetPrintSheetReference( bool aShow ) { m_printSheetReference = aShow; }
678 
679  // Plot functions:
680  void PlotSchematic( wxCommandEvent& event );
681 
682  // read and save files
683  void Save_File( wxCommandEvent& event );
684 
690  void OnSaveProject( wxCommandEvent& aEvent );
691  bool SaveProject();
692 
693  bool OpenProjectFiles( const std::vector<wxString>& aFileSet, int aCtl = 0 ) override;
694 
724  bool AppendSchematic();
725 
733 
754  bool ProcessCmpToFootprintLinkFile( const wxString& aFullFilename,
755  bool aForceVisibilityState,
756  bool aVisibilityState );
757 
771  bool SaveEEFile( SCH_SCREEN* aScreen,
772  bool aSaveUnderNewName = false,
773  bool aCreateBackupFile = CREATE_BACKUP_FILE );
774 
775  // General search:
776 
777  bool IsSearchCacheObsolete( const SCH_FIND_REPLACE_DATA& aSearchCriteria );
778 
786  bool AskToSaveChanges();
787 
788 private:
789 
793  void OnAutoplaceFields( wxCommandEvent& aEvent );
794 
798  void OnMoveItem( wxCommandEvent& aEvent );
799 
804  void OnRotate( wxCommandEvent& aEvent );
805 
809  void OnEditItem( wxCommandEvent& aEvent );
810 
815  void SelectAllFromSheet( wxCommandEvent& aEvent );
816 
820  void OnDragItem( wxCommandEvent& aEvent );
821 
826  void OnOrient( wxCommandEvent& aEvent );
827 
828  void OnExit( wxCommandEvent& event );
829  void OnAnnotate( wxCommandEvent& event );
830  void OnErc( wxCommandEvent& event );
831  void OnCreateNetlist( wxCommandEvent& event );
832  void OnUpdatePCB( wxCommandEvent& event );
833  void OnSimulate( wxCommandEvent& event );
834  void OnCreateBillOfMaterials( wxCommandEvent& event );
835  void OnLaunchBomManager( wxCommandEvent& event );
836  void OnFindItems( wxCommandEvent& event );
837  void OnFindDialogClose( wxFindDialogEvent& event );
838  void OnFindDrcMarker( wxFindDialogEvent& event );
839  void OnFindCompnentInLib( wxFindDialogEvent& event );
840 
846  void OnFindSchematicItem( wxFindDialogEvent& aEvent );
847 
854  void OnFindReplace( wxFindDialogEvent& aEvent );
855 
856  void OnLoadFile( wxCommandEvent& event );
857  void OnLoadCmpToFootprintLinkFile( wxCommandEvent& event );
858  void OnUpdateFields( wxCommandEvent& event );
859  void OnNewProject( wxCommandEvent& event );
860  void OnLoadProject( wxCommandEvent& event );
861  void OnAppendProject( wxCommandEvent& event );
862  void OnImportProject( wxCommandEvent& event );
863  void OnOpenPcbnew( wxCommandEvent& event );
864  void OnOpenPcbModuleEditor( wxCommandEvent& event );
865  void OnOpenCvpcb( wxCommandEvent& event );
866  void OnOpenLibraryEditor( wxCommandEvent& event );
867  void OnRescueProject( wxCommandEvent& event );
868  void OnRemapSymbols( wxCommandEvent& aEvent );
869 
870  // a helper function to run the dialog that allows to rename the symbol library Id of
871  // groups of components, for instance after a symbol has moved from a library to
872  // another library
873  void OnEditComponentSymbolsId( wxCommandEvent& aEvent );
874  void OnPreferencesOptions( wxCommandEvent& event );
875  void OnCancelCurrentCommand( wxCommandEvent& aEvent );
876 
877  void OnSelectItem( wxCommandEvent& aEvent );
878 
882  void OnCopySchematicItemRequest( wxCommandEvent& event );
883 
884  /* User interface update event handlers. */
885  void OnUpdatePaste( wxUpdateUIEvent& event );
886  void OnUpdateHiddenPins( wxUpdateUIEvent& event );
887  void OnUpdateBusOrientation( wxUpdateUIEvent& event );
888  void OnUpdateSelectTool( wxUpdateUIEvent& aEvent );
889  void OnUpdateSave( wxUpdateUIEvent& aEvent );
890  void OnUpdateSaveSheet( wxUpdateUIEvent& aEvent );
891  void OnUpdateHierarchySheet( wxUpdateUIEvent& aEvent );
892  void OnUpdateRemapSymbols( wxUpdateUIEvent& aEvent );
893 
897  void CloseErc();
898 
908  void UpdateTitle();
909 
910  // Bus Entry
913  void SetBusEntryShape( wxDC* DC, SCH_BUS_ENTRY_BASE* BusEntry, char entry_shape );
914 
921  SCH_NO_CONNECT* AddNoConnect( const wxPoint& aPosition );
922 
926  SCH_JUNCTION* AddJunction( const wxPoint& aPosition, bool aPutInUndoList = false );
927 
931  void SaveWireImage();
932 
938  void GetSchematicConnections( std::vector< wxPoint >& aConnections );
939 
947  bool SchematicCleanUp( bool aAppend = false );
948 
958  bool TrimWire( const wxPoint& aStart, const wxPoint& aEnd, bool aAppend = true );
959 
966  void PrepareMoveItem( SCH_ITEM* aItem );
967 
968  // Text, label, glabel
969  SCH_TEXT* CreateNewText( int aType );
970  void EditSchematicText( SCH_TEXT* TextStruct );
971  void ChangeTextOrient( SCH_TEXT* aTextItem );
972 
979  void OnConvertTextType( wxCommandEvent& aEvent );
980 
988  void BeginSegment( int type );
989 
993  void EndSegment();
994 
998  void DeleteCurrentSegment();
999  void DeleteConnection( bool DeleteFullConnection );
1000 
1001  // Images:
1002  SCH_BITMAP* CreateNewImage( wxDC* aDC );
1003  void RotateImage( SCH_BITMAP* aItem );
1004 
1012  void MirrorImage( SCH_BITMAP* aItem, bool Is_X_axis );
1013  void EditImage( SCH_BITMAP* aItem );
1014 
1015  // Hierarchical Sheet & PinSheet
1016  void InstallHierarchyFrame( wxPoint& pos );
1017  SCH_SHEET* CreateSheet( wxDC* DC );
1018  void ReSizeSheet( SCH_SHEET* Sheet, wxDC* DC );
1019 
1029  void RotateHierarchicalSheet( SCH_SHEET* aSheet, bool aRotCCW );
1030 
1040  void MirrorSheet( SCH_SHEET* aSheet, bool aFromXaxis );
1041 
1049  int EditLine( SCH_LINE* aLine, bool aRedraw );
1050 
1051 public:
1080  bool EditSheet( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHierarchy, bool* aClearAnnotationNewItems );
1081 
1083 
1084 private:
1091  bool importFile( const wxString& aFileName, int aFileType );
1092 
1093  bool validateSheet( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHierarchy );
1094 
1102 
1110  int EditSheetPin( SCH_SHEET_PIN* aSheetPin, bool aRedraw );
1111 
1120 
1121 public:
1128  void DeleteItem( SCH_ITEM* aItem, bool aAppend = false );
1129 
1137  void DeleteItemsInList( PICKED_ITEMS_LIST& aItemsList, bool aAppend = false );
1138 
1145  void DeleteJunction( SCH_ITEM* aItem, bool aAppend = false );
1146 
1154  void CheckListConnections( PICKED_ITEMS_LIST& aItemsList, bool aAppend = false );
1155 
1156  int GetLabelIncrement() const { return m_repeatLabelDelta; }
1157 
1158 private:
1159 
1175  SCH_COMPONENT* Load_Component( const SCHLIB_FILTER* aFilter,
1176  SCH_BASE_FRAME::HISTORY_LIST& aHistoryList,
1177  bool aUseLibBrowser );
1178 
1184  void EditComponent( SCH_COMPONENT* aComponent );
1185 
1186 public:
1187 
1191  void OrientComponent( COMPONENT_ORIENTATION_T aOrientation = CMP_NORMAL );
1192 
1193 private:
1194  void OnSelectUnit( wxCommandEvent& aEvent );
1195  void ConvertPart( SCH_COMPONENT* DrawComponent );
1196 
1202  void EditComponentFieldText( SCH_FIELD* aField );
1203 
1204  void RotateField( SCH_FIELD* aField );
1205 
1209  void PasteListOfItems( wxDC* DC );
1210 
1211  /* Undo - redo */
1212 public:
1213 
1243  void SaveCopyInUndoList( SCH_ITEM* aItemToCopy,
1244  UNDO_REDO_T aTypeCommand,
1245  bool aAppend = false,
1246  const wxPoint& aTransformPoint = wxPoint( 0, 0 ) );
1247 
1257  void SaveCopyInUndoList( const PICKED_ITEMS_LIST& aItemsList,
1258  UNDO_REDO_T aTypeCommand,
1259  bool aAppend = false,
1260  const wxPoint& aTransformPoint = wxPoint( 0, 0 ) );
1261 
1262 private:
1263 
1270  void PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRedoCommand );
1271 
1280  void GetSchematicFromRedoList( wxCommandEvent& event );
1281 
1288  void GetSchematicFromUndoList( wxCommandEvent& event );
1289 
1296  void copyBlockItems( PICKED_ITEMS_LIST& aItemsList, const wxPoint& aMoveVector );
1297 
1304  void addJunctionMenuEntries( wxMenu* aMenu, SCH_JUNCTION* aJunction );
1305 
1306 public:
1307  void Key( wxDC* DC, int hotkey, EDA_ITEM* DrawStruct );
1308 
1312  void InitBlockPasteInfos() override;
1313 
1322  virtual int BlockCommand( EDA_KEY aKey ) override;
1323 
1330  virtual void HandleBlockPlace( wxDC* DC ) override;
1331 
1343  virtual bool HandleBlockEnd( wxDC* aDC ) override;
1344 
1351  void RepeatDrawItem();
1352 
1356  void SetRepeatItem( SCH_ITEM* aItem );
1357 
1364 
1372  void SetUndoItem( const SCH_ITEM* aItem );
1373 
1374  SCH_ITEM* GetUndoItem() const { return m_undoItem; }
1375 
1385  void SaveUndoItemInUndoList( SCH_ITEM* aItem );
1386 
1396  bool CreateArchiveLibraryCacheFile( bool aUseCurrentSheetFilename = false );
1397 
1404  bool CreateArchiveLibrary( const wxString& aFileName );
1405 
1419  bool rescueProject( RESCUER& aRescuer, bool aRunningOnDemand );
1420  bool RescueLegacyProject( bool aRunningOnDemand );
1421  bool RescueSymbolLibTableProject( bool aRunningOnDemand );
1422 
1431  virtual void PrintPage( wxDC* aDC, LSET aPrintMask,
1432  bool aPrintMirrorMode, void* aData = NULL ) override;
1433 
1434  void SetSimulatorCommand( const wxString& aCommand ) { m_simulatorCommand = aCommand; }
1435 
1436  wxString GetSimulatorCommand() const { return m_simulatorCommand; }
1437 
1438  void SetNetListerCommand( const wxString& aCommand ) { m_netListerCommand = aCommand; }
1439 
1443  void DefaultExecFlags() { m_exec_flags = wxEXEC_SYNC; }
1444 
1450  void SetExecFlags( const int aFlags ) { m_exec_flags |= aFlags; }
1451 
1458  void ClearExecFlags( const int aFlags ) { m_exec_flags &= ~( aFlags ); }
1459 
1460  wxString GetNetListerCommand() const { return m_netListerCommand; }
1461 
1470  void doUpdatePcb( const wxString& aUpdateOptions = "" );
1471 
1472  void SetCurrentSheet( SCH_SHEET_PATH *aSheet );
1473 
1477  void InstallPreferences( PAGED_DIALOG* aParent ) override;
1478 
1482  void CommonSettingsChanged() override;
1483 
1484  void ShowChangedLanguage() override;
1485 
1486  void DuplicateItemsInList( SCH_SCREEN* screen, PICKED_ITEMS_LIST& aItemsList,
1487  const wxPoint& aMoveVector );
1488 
1489  virtual void SetScreen( BASE_SCREEN* aScreen ) override;
1490 
1491  virtual const BOX2I GetDocumentExtents() const override;
1492 
1494  const static wxCursor CURSOR_PROBE;
1495 
1497  const static wxCursor CURSOR_TUNE;
1498 
1499  DECLARE_EVENT_TABLE()
1500 };
1501 
1502 
1503 #endif // SCH_EDIT_FRAME_H
void OnLoadProject(wxCommandEvent &event)
void SetCurrentSheet(const SCH_SHEET_PATH &aSheet)
void ReCreateOptToolbar()
Definition: tool_sch.cpp:279
void OnFindDrcMarker(wxFindDialogEvent &event)
Definition: find.cpp:60
bool DeleteItemAtCrossHair()
Delete the item found under the cross hair.
Definition: schedit.cpp:653
Class for a bus to bus entry.
void OrientComponent(COMPONENT_ORIENTATION_T aOrientation=CMP_NORMAL)
Rotate and mirror a component.
Definition: getpart.cpp:299
SCH_JUNCTION * AddJunction(const wxPoint &aPosition, bool aPutInUndoList=false)
Add a new junction at aPosition.
void RepeatDrawItem()
Repeat the last item placement if the last item was a bus, bus entry, label, or component.
const wxString GetNetListFormatName() const
void DeleteCurrentSegment()
Erase the last segment at the current mouse position.
wxString m_netListerCommand
Command line to call a custom net list generator.
Class SCH_FIELD instances are attached to a component and provide a place for the component&#39;s value...
Definition: sch_field.h:56
void DeleteConnection(bool DeleteFullConnection)
Definition: schedit.cpp:638
void EditComponent(SCH_COMPONENT *aComponent)
Display the edit component dialog to edit the parameters of aComponent.
void OnOpenCvpcb(wxCommandEvent &event)
A list of parameters type.
void RotateField(SCH_FIELD *aField)
void OnSelectOptionToolbar(wxCommandEvent &event)
Definition: tool_sch.cpp:318
Class KIWAY_EXPRESS carries a payload from one KIWAY_PLAYER to another within a PROJECT.
Definition: kiway_express.h:39
void DefaultExecFlags()
Reset the execution flags to defaults for external netlist and bom generators.
int EditLine(SCH_LINE *aLine, bool aRedraw)
Function EditLine displays the dialog for editing the parameters of aLine.
Definition: sch_line.cpp:785
bool SchematicCleanUp(bool aAppend=false)
Performs routine schematic cleaning including breaking wire and buses and deleting identical objects ...
Class SCH_FIND_COLLECTOR is used to iterate over all of the items in a schematic or sheet and collect...
void Process_Config(wxCommandEvent &event)
void sendNetlist()
Send the kicad netlist over to CVPCB.
void BeginSegment(int type)
Creates a new segment ( WIRE, BUS ) or terminates the current segment in progress.
wxString * m_findReplaceStatus
bool OpenProjectFiles(const std::vector< wxString > &aFileSet, int aCtl=0) override
void CloseErc()
Close the ERC dialog if it is open.
NETLIST_OBJECT_LIST * BuildNetListBase(bool updateStatusText=true)
Create a flat list which stores all connected objects.
void OnMoveItem(wxCommandEvent &aEvent)
Handle the ID_SCH_MOVE_ITEM event used to move schematic items.
Definition: schedit.cpp:387
void OnFindItems(wxCommandEvent &event)
wxString GetSimulatorCommand() const
void OnLoadFile(wxCommandEvent &event)
void OnUpdateSaveSheet(wxUpdateUIEvent &aEvent)
SCH_TEXT * CreateNewText(int aType)
Definition: edit_label.cpp:68
void SendCrossProbeNetName(const wxString &aNetName)
Sends a net name to eeschema for highlighting.
bool LoadCmpToFootprintLinkFile()
Loads a .cmp file from CvPcb and update the footprint field of components.
Definition: backanno.cpp:221
void OnUpdateHiddenPins(wxUpdateUIEvent &event)
void SetPlotDirectoryName(const wxString &aDirName)
void OnOpenPcbModuleEditor(wxCommandEvent &event)
int AddTemplateFieldName(const TEMPLATE_FIELDNAME &aFieldName)
Insert or append a wanted symbol field name into the field names template.
void GetSchematicConnections(std::vector< wxPoint > &aConnections)
Collects a unique list of all possible connection points in the schematic.
static const KICAD_T AllItems[]
A scan list for all schematic items.
PARAM_CFG_ARRAY m_projectFileParams
SCH_ITEM * GetRepeatItem() const
Return the item which is to be repeated with the insert key.
void OnPreferencesOptions(wxCommandEvent &event)
COMPONENT_ORIENTATION_T
enum used in RotationMiroir()
wxArrayString m_findStringHistoryList
void SetForceHVLines(bool aForceHVdirection)
bool GetForceHVLines() const
ANNOTATE_ORDER_T
Schematic annotation order options.
void OnModify()
Must be called after a schematic change in order to set the "modify" flag of the current screen* and ...
void DuplicateItemsInList(SCH_SCREEN *screen, PICKED_ITEMS_LIST &aItemsList, const wxPoint &aMoveVector)
virtual void SetScreen(BASE_SCREEN *aScreen) override
virtual int BlockCommand(EDA_KEY aKey) override
Return the block command internal code (BLOCK_MOVE, BLOCK_DUPLICATE...) corresponding to the keys pre...
void OnNewProject(wxCommandEvent &event)
void OnUpdateRemapSymbols(wxUpdateUIEvent &aEvent)
void OnFindDialogClose(wxFindDialogEvent &event)
void ReCreateMenuBar() override
Function ReCreateMenuBar Creates recreates the menu bar.
bool GetAutoplaceAlign() const
wxString m_DefaultSchematicFileName
static wxSize m_lastSheetPinTextSize
Last sheet pin text size.
wxPoint GetLastSheetPinPosition() const
bool GetPrintMonochrome()
bool OnHotKey(wxDC *aDC, int aHotKey, const wxPoint &aPosition, EDA_ITEM *aItem) override
UNDO_REDO_T
Undo Redo considerations: Basically we have 3 cases New item Deleted item Modified item there is also...
void SetAutoplaceAlign(bool aEnable)
void OnLaunchBomManager(wxCommandEvent &event)
void OnConvertTextType(wxCommandEvent &aEvent)
Command event handler to change a text type to another one.
Definition: edit_label.cpp:135
void ChangeTextOrient(SCH_TEXT *aTextItem)
Definition: edit_label.cpp:50
SCH_FIND_COLLECTOR m_foundItems
List of find/replace items.
void AnnotateComponents(bool aAnnotateSchematic, ANNOTATE_ORDER_T aSortOption, ANNOTATE_OPTION_T aAlgoOption, int aStartNumber, bool aResetAnnotation, bool aRepairTimestamps, bool aLockUnits, REPORTER &aReporter)
Annotate the components in the schematic that are not currently annotated.
Definition: annotate.cpp:82
Find a component in the schematic.
bool BreakSegments(const wxPoint &aPoint, bool aAppend=false)
Checks every wire and bus for a intersection at aPoint and break into two segments at aPoint if an in...
bool AskToSaveChanges()
Checks if any of the screens has unsaved changes and asks the user whether to save or drop them...
bool BreakSegmentsOnJunctions(bool aApped=false)
Tests all junctions and bus entries in the schematic for intersections with wires and buses and break...
TEMPLATES m_templateFieldNames
static const wxCursor CURSOR_TUNE
Tuner cursor, used by circuit simulator
PARAM_CFG_ARRAY & GetConfigurationSettings()
Return the Eeschema applications settings.
void OnCloseWindow(wxCloseEvent &Event)
SCH_SHEET_PIN * CreateSheetPin(SCH_SHEET *aSheet)
Create a new SCH_SHEET_PIN object and add it to aSheet at the current cursor position.
Definition: sheetlab.cpp:77
void UpdateTitle()
Set the main window title bar text.
Find an item by it&#39;s value field.
Annotate incrementally using the first free reference number.
wxFindReplaceData * m_findReplaceData
void OnAppendProject(wxCommandEvent &event)
int m_repeatLabelDelta
Repeat label number increment step.
std::vector< COMPONENT_SELECTION > HISTORY_LIST
bool GetPrintSheetReference()
The common library.
void OnPrint(wxCommandEvent &event)
Show the print dialog.
int AddTemplateFieldName(const TEMPLATE_FIELDNAME &aFieldName)
Function AddTemplateFieldName inserts or appends a wanted symbol field name into the fieldnames templ...
void SetSimulatorCommand(const wxString &aCommand)
void RotateHierarchicalSheet(SCH_SHEET *aSheet, bool aRotCCW)
Rotate a sheet object.
Definition: sheet.cpp:459
void OnEditItem(wxCommandEvent &aEvent)
Handle the ID_SCH_EDIT_ITEM event used to edit schematic items.
Definition: schedit.cpp:971
void ConvertPart(SCH_COMPONENT *DrawComponent)
Definition: getpart.cpp:371
SCH_ITEM * GetUndoItem() const
Schematic editor (Eeschema) main window.
bool TestDanglingEnds()
Test all of the connectable objects in the schematic for unused connection points.
void SetPrintSheetReference(bool aShow)
SCH_COLLECTOR m_collectedItems
List of collected items.
void MirrorImage(SCH_BITMAP *aItem, bool Is_X_axis)
Mirror a bitmap.
Definition: edit_bitmap.cpp:87
void SetPrintMonochrome(bool aMonochrome)
void OnRescueProject(wxCommandEvent &event)
virtual void HandleBlockPlace(wxDC *DC) override
Call after HandleBlockEnd, when a block command needs to be executed after the block is moved to its ...
void DisplayCurrentSheet()
Draw the current sheet on the display.
Definition: hierarch.cpp:265
bool m_autoplaceAlign
align autoplaced fields to the grid
Class REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:61
void EditComponentFieldText(SCH_FIELD *aField)
Display the edit field dialog to edit the parameters of aField.
void EndSegment()
Terminate a bus, wire, or line creation.
bool importFile(const wxString &aFileName, int aFileType)
Load the given filename but sets the path to the current project path.
SCH_ITEM * LocateItem(const wxPoint &aPosition, const KICAD_T aFilterList[]=SCH_COLLECTOR::AllItems, int aHotKeyCommandId=0)
Check for items at aPosition matching the types in aFilterList.
bool EditSheet(SCH_SHEET *aSheet, SCH_SHEET_PATH *aHierarchy, bool *aClearAnnotationNewItems)
Edit an existing sheet or add a new sheet to the schematic.
Definition: sheet.cpp:45
Implementing DIALOG_SCH_FIND_BASE.
Find a component pin in the schematic.
void SetAutoplaceJustify(bool aEnable)
void OnCopySchematicItemRequest(wxCommandEvent &event)
Command event handler for duplicating the item at the current location.
Symbol library viewer main window.
Definition: viewlib_frame.h:44
void OnUpdateHierarchySheet(wxUpdateUIEvent &aEvent)
KICAD_T
Enum KICAD_T is the set of class identification values, stored in EDA_ITEM::m_StructType.
Definition: typeinfo.h:78
wxString GetNetListerCommand() const
SCH_ITEM * FindComponentAndItem(const wxString &aReference, bool aSearchHierarchy, SCH_SEARCH_T aSearchType, const wxString &aSearchText)
Finds a component in the schematic and an item in this component.
Definition: find.cpp:109
void SetRepeatItem(SCH_ITEM *aItem)
Clone aItem and owns that clone in this container.
void SaveProjectSettings(bool aAskForSave) override
Save changes to the project settings to the project (.pro) file.
void InstallHierarchyFrame(wxPoint &pos)
Definition: hierarch.cpp:140
void SaveUndoItemInUndoList(SCH_ITEM *aItem)
Swap the cloned item in member variable m_undoItem with aItem and saves it to the undo list then swap...
void updateFindReplaceView(wxFindDialogEvent &aEvent)
Definition: find.cpp:387
void OnUpdateSave(wxUpdateUIEvent &aEvent)
void OnImportProject(wxCommandEvent &event)
Class NETLIST_OBJECT_LIST is a container holding and owning NETLIST_OBJECTs, which are connected item...
Base class for a bus or wire entry.
Definition: sch_bus_entry.h:41
PARAM_CFG_ARRAY & GetProjectFileParametersList()
Return the project file parameter list for Eeschema.
SCH_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
Class SCH_COLLECTOR.
virtual wxString GetScreenDesc() const override
virtual const BOX2I GetDocumentExtents() const override
SCH_SHEET_PATH * m_CurrentSheet
which sheet we are presently working on.
void ShowChangedLanguage() override
Function ShowChangedLanguage redraws the menus and what not in current language.
double BestZoom() override
Return the zoom level which displays the full page on screen.
SCH_BUS_BUS_ENTRY * CreateBusBusEntry()
Definition: busentry.cpp:42
void SendMessageToPCBNEW(EDA_ITEM *aObjectToSync, SCH_COMPONENT *aPart)
Send a message to Pcbnew via a socket connection.
void OnFindSchematicItem(wxFindDialogEvent &aEvent)
Find an item in the schematic matching the search criteria in aEvent.
Definition: find.cpp:254
const wxString & GetPlotDirectoryName() const
accessor to the destination directory to use when generating plot files.
void InitBlockPasteInfos() override
Initialize the parameters used by the block paste command.
SCH_SHEET * CreateSheet(wxDC *DC)
Definition: sheet.cpp:406
void DeleteAllTemplateFieldNames()
Remove all template field names.
bool m_forceHVLines
force H or V directions for wires, bus, line
static wxString GetDefaultFieldName(int aFieldNdx)
Return a default symbol field name for field aFieldNdx for all components.
void addJunctionMenuEntries(wxMenu *aMenu, SCH_JUNCTION *aJunction)
Add the context menu items to aMenu for aJunction.
void Save_File(wxCommandEvent &event)
void ReCreateHToolbar() override
Definition: tool_sch.cpp:46
void SetBusEntryShape(wxDC *DC, SCH_BUS_ENTRY_BASE *BusEntry, char entry_shape)
Definition: busentry.cpp:66
Class LSET is a set of PCB_LAYER_IDs.
bool m_footprintPreview
whether to show footprint previews
void PrepareMoveItem(SCH_ITEM *aItem)
Start moving aItem using the mouse.
Definition: schedit.cpp:761
DIALOG_SCH_FIND * m_dlgFindReplace
bool HighlightConnectionAtPosition(wxPoint aPosition)
Highlight the connection found at aPosition.
static PINSHEETLABEL_SHAPE m_lastSheetPinType
Last sheet pin type.
void DeleteAnnotation(bool aCurrentSheetOnly)
Clear the current component annotation.
Definition: annotate.cpp:59
void OnUpdateSelectTool(wxUpdateUIEvent &aEvent)
Definition: schedit.cpp:631
void HardRedraw() override
Rebuild the GAL and redraw the screen.
wxPageSetupDialogData m_pageSetupData
void OnUpdatePaste(wxUpdateUIEvent &event)
void OnRotate(wxCommandEvent &aEvent)
Handle the ID_SCH_ROTATE_CLOCKWISE and ID_SCH_ROTATE_COUNTERCLOCKWISE events used to rotate schematic...
Definition: schedit.cpp:849
bool prepareForNetlist()
Verify that annotation is complete so that a proper netlist is even possible.
Class BASE_SCREEN handles how to draw a screen (a board, a schematic ...)
Definition: base_screen.h:76
bool GetShowAllPins() const
Annotate by position of component in the schematic sheet object list.
SCH_SHEET_PATH & GetCurrentSheet()
void Key(wxDC *DC, int hotkey, EDA_ITEM *DrawStruct)
void InstallPreferences(PAGED_DIALOG *aParent) override
Allows Eeschema to install its preferences panels into the preferences dialog.
void SaveCopyInUndoList(SCH_ITEM *aItemToCopy, UNDO_REDO_T aTypeCommand, bool aAppend=false, const wxPoint &aTransformPoint=wxPoint(0, 0))
Create a copy of the current schematic item, and put it in the undo list.
void PlotSchematic(wxCommandEvent &event)
SCH_COMPONENT * Load_Component(const SCHLIB_FILTER *aFilter, SCH_BASE_FRAME::HISTORY_LIST &aHistoryList, bool aUseLibBrowser)
Load a symbol library and places it on the current schematic.
Definition: getpart.cpp:214
bool AppendSchematic()
Import a KiCad schematic into the current page.
SCH_SHEET_PIN * ImportSheetPin(SCH_SHEET *aSheet)
Automatically create a sheet pin from the hierarchical labels in the schematic referenced by aSheet...
Definition: sheetlab.cpp:106
void OnSelectUnit(wxCommandEvent &aEvent)
Definition: getpart.cpp:327
bool SaveEEFile(SCH_SCREEN *aScreen, bool aSaveUnderNewName=false, bool aCreateBackupFile=CREATE_BACKUP_FILE)
Save aScreen to a schematic file.
bool CreateArchiveLibraryCacheFile(bool aUseCurrentSheetFilename=false)
Create a symbol library file with the name of the root document plus the &#39;-cache&#39; suffix...
Definition: libarch.cpp:42
const wxSize & GetLastSheetPinTextSize()
Initializing accessor for the pin text size.
Definition: sheetlab.cpp:48
void OnSaveProject(wxCommandEvent &aEvent)
Command event handler to save the entire project and create a component library archive.
void KiwayMailIn(KIWAY_EXPRESS &aEvent) override
Function KiwayMailIn receives KIWAY_EXPRESS messages from other players.
Class KIWAY is a minimalistic software bus for communications between various DLLs/DSOs (DSOs) within...
Definition: kiway.h:258
void OnUpdateFields(wxCommandEvent &event)
static const wxCursor CURSOR_PROBE
Probe cursor, used by circuit simulator
ANNOTATE_OPTION_T
Schematic annotation type options.
SCH_ITEM * m_item_to_repeat
Last item to insert by the repeat command.
void RotateImage(SCH_BITMAP *aItem)
Definition: edit_bitmap.cpp:75
uint32_t EDA_KEY
Definition: common.h:73
void backAnnotateFootprints(const std::string &aChangedSetOfReferences)
Definition: backanno.cpp:51
void OnAutoplaceFields(wxCommandEvent &aEvent)
Handle the ID_AUTOPLACE_FIELDS event.
bool LoadProjectFile()
Loads the KiCad project file (*.pro) settings specific to Eeschema.
wxArrayString m_replaceStringHistoryList
void OnFindCompnentInLib(wxFindDialogEvent &event)
Define a sheet pin (label) used in sheets to create hierarchical schematics.
Definition: sch_sheet.h:61
virtual bool isAutoSaveRequired() const override
Returns true if the schematic has been modified.
bool GetAutoplaceJustify() const
Class SCH_SHEET_PATH.
void DeleteAllTemplateFieldNames()
Function DeleteAllTemplateFieldNames deletes the entire contents.
wxPageSetupDialogData & GetPageSetupData()
bool IsSearchCacheObsolete(const SCH_FIND_REPLACE_DATA &aSearchCriteria)
Definition: find.cpp:236
void EditSchematicText(SCH_TEXT *TextStruct)
bool m_printMonochrome
Print monochrome instead of grey scale.
Class PICKED_ITEMS_LIST is a holder to handle information on schematic or board items.
bool GetSpiceAjustPassiveValues() const
int m_foundItemIndex
An index to the last find item in the found items list m_foundItems.
void OnUpdatePCB(wxCommandEvent &event)
SCH_ITEM * LocateAndShowItem(const wxPoint &aPosition, const KICAD_T aFilterList[]=SCH_COLLECTOR::AllItems, int aHotKeyCommandId=0, bool *aClarifySelectionMenuCancelled=nullptr)
Check the schematic at aPosition in logical (drawing) units for a item matching the types in aFilterL...
void OnLoadCmpToFootprintLinkFile(wxCommandEvent &event)
void GetSchematicFromRedoList(wxCommandEvent &event)
Redo the last edit.
bool validateSheet(SCH_SHEET *aSheet, SCH_SHEET_PATH *aHierarchy)
Object to handle a bitmap image that can be inserted in a schematic.
Definition: sch_bitmap.h:42
void SaveSettings(wxConfigBase *aCfg) override
Function SaveSettings saves common frame parameters to a configuration data file. ...
PARAM_CFG_ARRAY m_configSettings
SCH_BITMAP * CreateNewImage(wxDC *aDC)
Definition: edit_bitmap.cpp:39
void OnUpdateBusOrientation(wxUpdateUIEvent &event)
bool m_autoplaceFields
automatically place component fields
void LoadSettings(wxConfigBase *aCfg) override
Function LoadSettings loads common frame parameters from a configuration file.
void OnOpenLibraryEditor(wxCommandEvent &event)
int CheckAnnotate(REPORTER &aReporter, bool aOneSheetOnly)
Check for annotation errors.
Definition: annotate.cpp:245
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition: sch_sheet.h:209
void PutDataInPreviousState(PICKED_ITEMS_LIST *aList, bool aRedoCommand)
Restore an undo or redo command to put data pointed by aList in the previous state.
virtual bool doAutoSave() override
Save the schematic files that have been modified and not yet saved.
void OnCancelCurrentCommand(wxCommandEvent &aEvent)
Definition: schedit.cpp:462
void OnEditComponentSymbolsId(wxCommandEvent &aEvent)
void RedrawActiveWindow(wxDC *DC, bool EraseBg) override
Definition: eeredraw.cpp:54
void doUpdatePcb(const wxString &aUpdateOptions="")
Updates netlist and sends it to pcbnew.
Annotate by Y position from top to bottom.
void OnAnnotate(wxCommandEvent &event)
bool m_showAllPins
Flag to indicate show hidden pins.
void ReSizeSheet(SCH_SHEET *Sheet, wxDC *DC)
Definition: sheet.cpp:434
bool m_printSheetReference
wxString m_SelectedNetName
Annotate using the first free reference number starting at the sheet number * 100.
void OnRemapSymbols(wxCommandEvent &aEvent)
Find a component field.
This file is part of the common library.
#define CREATE_BACKUP_FILE
void copyBlockItems(PICKED_ITEMS_LIST &aItemsList, const wxPoint &aMoveVector)
Copy the list of block item.
void ClearExecFlags(const int aFlags)
Clear (removes) specified flags that not needed for next execution of external generator of the netli...
PINSHEETLABEL_SHAPE
Definition: sch_text.h:46
void SetNetListFormatName(const wxString &aFormat)
The symbol library editor main window.
int ModalAnnotate(const wxString &aMessage)
Run a modal version of the Annotate dialog for a specific purpose.
class EDA_HOTKEY is a class to handle hot key commands.
Definition: hotkeys_basic.h:59
SCH_SEARCH_T
Schematic search type used by the socket link with Pcbnew.
void CheckListConnections(PICKED_ITEMS_LIST &aItemsList, bool aAppend=false)
Adds junctions if needed to each item in the list after they have been moved.
BLOCK_SELECTOR m_blockItems
List of selected items.
void OnExit(wxCommandEvent &event)
int GetLabelIncrement() const
void OnLeftDClick(wxDC *aDC, const wxPoint &aPosition) override
Function OnLeftDClick called on a double click event from the drawpanel mouse handler if an editable ...
Segment description base class to describe items which have 2 end points (track, wire, draw line ...)
Definition: sch_line.h:41
bool CreateNetlist(int aFormat, const wxString &aFullFileName, unsigned aNetlistOptions, REPORTER *aReporter=NULL, bool silent=false)
Create a netlist for the current schematic.
SCH_EDIT_FRAME(KIWAY *aKiway, wxWindow *aParent)
void SetSheetNumberAndCount()
Set the m_ScreenNumber and m_NumberOfScreens members for screens.
wxString m_plotDirectoryName
The name of the destination directory to use when generating plot files.
bool GetFootprintPreview() const
void OnLeftClick(wxDC *aDC, const wxPoint &aPosition) override
SCH_ITEM * m_undoItem
Copy of the current item being edited.
void DeleteJunction(SCH_ITEM *aItem, bool aAppend=false)
Removes a given junction and heals any wire segments under the junction.
void OnErc(wxCommandEvent &event)
bool m_autoplaceJustify
allow autoplace to change justification
Class SCH_FIND_REPLACE_DATA adds missing useful comparison and assignment operators to the wxFindRepl...
void SetAutoplaceFields(bool aEnable)
Find an item by it&#39;s reference designator.
void OnSelectTool(wxCommandEvent &aEvent)
Definition: schedit.cpp:488
Annotate by X position from left to right.
void DeleteItemsInList(PICKED_ITEMS_LIST &aItemsList, bool aAppend=false)
Removes all items (and unused junctions that connect to them) and saves each in the undo list...
Annotate using the first free reference number starting at the sheet number * 1000.
void OnOpenPcbnew(wxCommandEvent &event)
Class SCH_COMPONENT describes a real schematic component.
Definition: sch_component.h:69
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
Definition: base_struct.h:154
bool RescueSymbolLibTableProject(bool aRunningOnDemand)
bool TrimWire(const wxPoint &aStart, const wxPoint &aEnd, bool aAppend=true)
If any single wire passes through both points, remove the portion between the two points...
virtual void PrintPage(wxDC *aDC, LSET aPrintMask, bool aPrintMirrorMode, void *aData=NULL) override
Plot or print the current sheet to the clipboard.
virtual void ExecuteRemoteCommand(const char *cmdline) override
Execute a remote command send by Pcbnew via a socket, port KICAD_SCH_PORT_SERVICE_NUMBER (currently 4...
wxString GetUniqueFilenameForCurrentSheet()
void EditImage(SCH_BITMAP *aItem)
void OnCreateNetlist(wxCommandEvent &event)
wxString m_simulatorCommand
Command line used to call the circuit simulator (gnucap, spice, ...)
Struct TEMPLATE_FIELDNAME holds a name of a component&#39;s field, field value, and default visibility...
void PasteListOfItems(wxDC *DC)
Paste a list of items from the block stack.
Class for a wire to bus entry.
wxString m_netListFormat
The name of the format to use when generating a net list.
Class DIALOG_ANNOTATE: a dialog to set/clear reference designators, of a schematic hierarchy...
bool BreakSegment(SCH_LINE *aSegment, const wxPoint &aPoint, bool aAppend=false, SCH_LINE **aNewSegment=NULL)
Breaks a single segment into two at the specified point.
bool OnRightClick(const wxPoint &aPosition, wxMenu *PopMenu) override
void OnDragItem(wxCommandEvent &aEvent)
Handle the ID_SCH_DRAG_ITEM event used to drag schematic items.
Definition: schedit.cpp:1133
virtual bool HandleBlockEnd(wxDC *aDC) override
Handle the "end" of a block command, i.e.
void OnOrient(wxCommandEvent &aEvent)
Handle the ID_SCH_MIRROR_X, ID_SCH_MIRROR_Y, and ID_SCH_ORIENT_NORMAL events used to orient schematic...
Definition: schedit.cpp:1206
bool GetAutoplaceFields() const
void MirrorSheet(SCH_SHEET *aSheet, bool aFromXaxis)
Mirror a hierarchical sheet.
Definition: sheet.cpp:490
void OnSimulate(wxCommandEvent &event)
Definition: simulate.cpp:29
void SetUndoItem(const SCH_ITEM *aItem)
Clone aItem which can be used to restore the state of the item being edited when the user cancels the...
void SetFootprintPreview(bool aEnable)
int m_exec_flags
Flags of the wxExecute() function to call a custom net list generator.
void OnSelectItem(wxCommandEvent &aEvent)
bool RescueLegacyProject(bool aRunningOnDemand)
void addCurrentItemToScreen()
Add the item currently being edited to the schematic and adds the changes to the undo/redo container...
static wxPoint m_lastSheetPinPosition
Last sheet pin position.
void OnCreateBillOfMaterials(wxCommandEvent &event)
int EditSheetPin(SCH_SHEET_PIN *aSheetPin, bool aRedraw)
Display the dialog for editing the parameters of aSheetPin.
Definition: sheetlab.cpp:60
SCH_BUS_WIRE_ENTRY * CreateBusWireEntry()
Definition: busentry.cpp:53
bool WriteNetListFile(NETLIST_OBJECT_LIST *aConnectedItemsList, int aFormat, const wxString &aFullFileName, unsigned aNetlistOptions, REPORTER *aReporter=NULL)
Create a netlist file.
bool CreateArchiveLibrary(const wxString &aFileName)
Create a library aFileName that contains all components used in the current schematic.
Definition: libarch.cpp:65
void SetExecFlags(const int aFlags)
Set (adds) specified flags for next execution of external generator of the netlist or bom...
A shim class between EDA_DRAW_FRAME and several derived classes: LIB_EDIT_FRAME, LIB_VIEW_FRAME, and SCH_EDIT_FRAME, and it brings in a common way of handling the provided virtual functions for the derived classes.
SCH_NO_CONNECT * AddNoConnect(const wxPoint &aPosition)
Add no connect item to the current schematic sheet at aPosition.
bool m_spiceAjustPassiveValues
Use netcodes (net number) as net names when generating spice net lists.
void Process_Special_Functions(wxCommandEvent &event)
Definition: schedit.cpp:55
Class SCH_ITEM is a base class for any item which can be embedded within the SCHEMATIC container clas...
Implementation of the label properties dialog.
void SetNetListerCommand(const wxString &aCommand)
void SetSpiceAjustPassiveValues(bool aEnable)
void CommonSettingsChanged() override
Called after the preferences dialog is run.
bool SetCurrentSheetHighlightFlags()
Set or reset the BRIGHTENED of connected objects inside the current sheet, according to the highlight...
void DeleteItem(SCH_ITEM *aItem, bool aAppend=false)
Remove aItem from the current screen and saves it in the undo list.
void SetShowAllPins(bool aEnable)
void ReCreateVToolbar() override
Definition: tool_sch.cpp:191
void SaveWireImage()
Save a copy of the current wire image in the undo list.
void GetSchematicFromUndoList(wxCommandEvent &event)
Perform an undo the last edit.
void OnFindReplace(wxFindDialogEvent &aEvent)
Perform a search and replace of text in an item in the schematic matching the search and replace crit...
Definition: find.cpp:293
void SelectAllFromSheet(wxCommandEvent &aEvent)
Handle the ID_POPUP_SCH_SELECT_ON_PCB event used to select items in Pcbnew based on the sheet they ar...
Definition: schedit.cpp:823
bool GeneralControl(wxDC *aDC, const wxPoint &aPosition, EDA_KEY aHotKey) override
Perform application specific control using aDC at aPosition in logical units.
EDA_HOTKEY * GetHotKeyDescription(int aCommand) const override
>
bool rescueProject(RESCUER &aRescuer, bool aRunningOnDemand)
Perform rescue operations to recover old projects from before certain changes were made...
bool ProcessCmpToFootprintLinkFile(const wxString &aFullFilename, bool aForceVisibilityState, bool aVisibilityState)
Read the footprint info from each line in the stuff file by reference designator. ...
Definition: backanno.cpp:132