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;
171  static wxPoint m_lastSheetPinPosition;
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 
644  void OnPageSettingsChange() override;
645 
656  bool SetCurrentSheetHighlightFlags( std::vector<EDA_ITEM*>* aItemsToRedrawList );
657 
669 
675  void SetSheetNumberAndCount();
676 
680  void OnPrint( wxCommandEvent& event );
681 
682  wxPageSetupDialogData& GetPageSetupData() { return m_pageSetupData; }
683 
685  void SetPrintMonochrome( bool aMonochrome ) { m_printMonochrome = aMonochrome; }
687  void SetPrintSheetReference( bool aShow ) { m_printSheetReference = aShow; }
688 
689  // Plot functions:
690  void PlotSchematic( wxCommandEvent& event );
691 
692  // read and save files
693  void Save_File( wxCommandEvent& event );
694 
700  void OnSaveProject( wxCommandEvent& aEvent );
701  bool SaveProject();
702 
703  bool OpenProjectFiles( const std::vector<wxString>& aFileSet, int aCtl = 0 ) override;
704 
734  bool AppendSchematic();
735 
743 
764  bool ProcessCmpToFootprintLinkFile( const wxString& aFullFilename,
765  bool aForceVisibilityState,
766  bool aVisibilityState );
767 
781  bool SaveEEFile( SCH_SCREEN* aScreen,
782  bool aSaveUnderNewName = false,
783  bool aCreateBackupFile = CREATE_BACKUP_FILE );
784 
785  // General search:
786 
787  bool IsSearchCacheObsolete( const SCH_FIND_REPLACE_DATA& aSearchCriteria );
788 
796  bool AskToSaveChanges();
797 
798 private:
799 
803  void OnAutoplaceFields( wxCommandEvent& aEvent );
804 
808  void OnMoveItem( wxCommandEvent& aEvent );
809 
814  void OnRotate( wxCommandEvent& aEvent );
815 
819  void OnEditItem( wxCommandEvent& aEvent );
820 
825  void SelectAllFromSheet( wxCommandEvent& aEvent );
826 
830  void OnDragItem( wxCommandEvent& aEvent );
831 
836  void OnOrient( wxCommandEvent& aEvent );
837 
838  void OnExit( wxCommandEvent& event );
839  void OnAnnotate( wxCommandEvent& event );
840  void OnErc( wxCommandEvent& event );
841  void OnCreateNetlist( wxCommandEvent& event );
842  void OnUpdatePCB( wxCommandEvent& event );
843  void OnSimulate( wxCommandEvent& event );
844  void OnCreateBillOfMaterials( wxCommandEvent& event );
845  void OnLaunchBomManager( wxCommandEvent& event );
846  void OnFindItems( wxCommandEvent& event );
847  void OnFindDialogClose( wxFindDialogEvent& event );
848  void OnFindDrcMarker( wxFindDialogEvent& event );
849  void OnFindCompnentInLib( wxFindDialogEvent& event );
850 
856  void OnFindSchematicItem( wxFindDialogEvent& aEvent );
857 
864  void OnFindReplace( wxFindDialogEvent& aEvent );
865 
866  void OnLoadFile( wxCommandEvent& event );
867  void OnLoadCmpToFootprintLinkFile( wxCommandEvent& event );
868  void OnUpdateFields( wxCommandEvent& event );
869  void OnNewProject( wxCommandEvent& event );
870  void OnLoadProject( wxCommandEvent& event );
871  void OnAppendProject( wxCommandEvent& event );
872  void OnImportProject( wxCommandEvent& event );
873  void OnOpenPcbnew( wxCommandEvent& event );
874  void OnOpenPcbModuleEditor( wxCommandEvent& event );
875  void OnOpenCvpcb( wxCommandEvent& event );
876  void OnOpenLibraryEditor( wxCommandEvent& event );
877  void OnRescueProject( wxCommandEvent& event );
878  void OnRemapSymbols( wxCommandEvent& aEvent );
879 
880  // a helper function to run the dialog that allows to rename the symbol library Id of
881  // groups of components, for instance after a symbol has moved from a library to
882  // another library
883  void OnEditComponentSymbolsId( wxCommandEvent& aEvent );
884  void OnPreferencesOptions( wxCommandEvent& event );
885  void OnCancelCurrentCommand( wxCommandEvent& aEvent );
886 
887  void OnSelectItem( wxCommandEvent& aEvent );
888 
892  void OnCopySchematicItemRequest( wxCommandEvent& event );
893 
894  /* User interface update event handlers. */
895  void OnUpdatePaste( wxUpdateUIEvent& event );
896  void OnUpdateHiddenPins( wxUpdateUIEvent& event );
897  void OnUpdateBusOrientation( wxUpdateUIEvent& event );
898  void OnUpdateSelectTool( wxUpdateUIEvent& aEvent );
899  void OnUpdateSave( wxUpdateUIEvent& aEvent );
900  void OnUpdateSaveSheet( wxUpdateUIEvent& aEvent );
901  void OnUpdateHierarchySheet( wxUpdateUIEvent& aEvent );
902  void OnUpdateRemapSymbols( wxUpdateUIEvent& aEvent );
903 
907  void CloseErc();
908 
918  void UpdateTitle();
919 
920  // Bus Entry
923  void SetBusEntryShape( wxDC* DC, SCH_BUS_ENTRY_BASE* BusEntry, char entry_shape );
924 
931  SCH_NO_CONNECT* AddNoConnect( const wxPoint& aPosition );
932 
936  SCH_JUNCTION* AddJunction( const wxPoint& aPosition, bool aPutInUndoList = false );
937 
941  void SaveWireImage();
942 
948  void GetSchematicConnections( std::vector< wxPoint >& aConnections );
949 
957  bool SchematicCleanUp( bool aAppend = false );
958 
968  bool TrimWire( const wxPoint& aStart, const wxPoint& aEnd, bool aAppend = true );
969 
976  void PrepareMoveItem( SCH_ITEM* aItem );
977 
978  // Text, label, glabel
979  SCH_TEXT* CreateNewText( int aType );
980  void EditSchematicText( SCH_TEXT* TextStruct );
981  void ChangeTextOrient( SCH_TEXT* aTextItem );
982 
989  void OnConvertTextType( wxCommandEvent& aEvent );
990 
998  void BeginSegment( int type );
999 
1003  void EndSegment();
1004 
1008  void DeleteCurrentSegment();
1009  void DeleteConnection( bool DeleteFullConnection );
1010 
1011  // Images:
1012  SCH_BITMAP* CreateNewImage( wxDC* aDC );
1013  void RotateImage( SCH_BITMAP* aItem );
1014 
1022  void MirrorImage( SCH_BITMAP* aItem, bool Is_X_axis );
1023 
1029  bool EditImage( SCH_BITMAP* aItem );
1030 
1031  // Hierarchical Sheet & PinSheet
1032  void InstallHierarchyFrame( wxPoint& pos );
1033  SCH_SHEET* CreateSheet( wxDC* DC );
1034  void ReSizeSheet( SCH_SHEET* Sheet, wxDC* DC );
1035 
1045  void RotateHierarchicalSheet( SCH_SHEET* aSheet, bool aRotCCW );
1046 
1056  void MirrorSheet( SCH_SHEET* aSheet, bool aFromXaxis );
1057 
1065  int EditLine( SCH_LINE* aLine, bool aRedraw );
1066 
1067 public:
1096  bool EditSheet( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHierarchy, bool* aClearAnnotationNewItems );
1097 
1099 
1100 private:
1107  bool importFile( const wxString& aFileName, int aFileType );
1108 
1109  bool validateSheet( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHierarchy );
1110 
1118 
1126  int EditSheetPin( SCH_SHEET_PIN* aSheetPin, bool aRedraw );
1127 
1136 
1137 public:
1144  void DeleteItem( SCH_ITEM* aItem, bool aAppend = false );
1145 
1153  void DeleteItemsInList( PICKED_ITEMS_LIST& aItemsList, bool aAppend = false );
1154 
1161  void DeleteJunction( SCH_ITEM* aItem, bool aAppend = false );
1162 
1170  void CheckListConnections( PICKED_ITEMS_LIST& aItemsList, bool aAppend = false );
1171 
1172  int GetLabelIncrement() const { return m_repeatLabelDelta; }
1173 
1174 private:
1175 
1191  SCH_COMPONENT* Load_Component( const SCHLIB_FILTER* aFilter,
1192  SCH_BASE_FRAME::HISTORY_LIST& aHistoryList,
1193  bool aUseLibBrowser );
1194 
1200  void EditComponent( SCH_COMPONENT* aComponent );
1201 
1202 public:
1203 
1207  void OrientComponent( COMPONENT_ORIENTATION_T aOrientation = CMP_NORMAL );
1208 
1209 private:
1210  void OnSelectUnit( wxCommandEvent& aEvent );
1211  void ConvertPart( SCH_COMPONENT* DrawComponent );
1212 
1218  void EditComponentFieldText( SCH_FIELD* aField );
1219 
1220  void RotateField( SCH_FIELD* aField );
1221 
1225  void PasteListOfItems( wxDC* DC );
1226 
1227  /* Undo - redo */
1228 public:
1229 
1259  void SaveCopyInUndoList( SCH_ITEM* aItemToCopy,
1260  UNDO_REDO_T aTypeCommand,
1261  bool aAppend = false,
1262  const wxPoint& aTransformPoint = wxPoint( 0, 0 ) );
1263 
1273  void SaveCopyInUndoList( const PICKED_ITEMS_LIST& aItemsList,
1274  UNDO_REDO_T aTypeCommand,
1275  bool aAppend = false,
1276  const wxPoint& aTransformPoint = wxPoint( 0, 0 ) );
1277 
1278 private:
1279 
1286  void PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRedoCommand );
1287 
1296  void GetSchematicFromRedoList( wxCommandEvent& event );
1297 
1304  void GetSchematicFromUndoList( wxCommandEvent& event );
1305 
1312  void copyBlockItems( PICKED_ITEMS_LIST& aItemsList, const wxPoint& aMoveVector );
1313 
1320  void addJunctionMenuEntries( wxMenu* aMenu, SCH_JUNCTION* aJunction );
1321 
1322 public:
1323  void Key( wxDC* DC, int hotkey, EDA_ITEM* DrawStruct );
1324 
1328  void InitBlockPasteInfos() override;
1329 
1338  virtual int BlockCommand( EDA_KEY aKey ) override;
1339 
1346  virtual void HandleBlockPlace( wxDC* DC ) override;
1347 
1359  virtual bool HandleBlockEnd( wxDC* aDC ) override;
1360 
1367  void RepeatDrawItem();
1368 
1372  void SetRepeatItem( SCH_ITEM* aItem );
1373 
1380 
1388  void SetUndoItem( const SCH_ITEM* aItem );
1389 
1390  SCH_ITEM* GetUndoItem() const { return m_undoItem; }
1391 
1401  void SaveUndoItemInUndoList( SCH_ITEM* aItem );
1402 
1412  bool CreateArchiveLibraryCacheFile( bool aUseCurrentSheetFilename = false );
1413 
1420  bool CreateArchiveLibrary( const wxString& aFileName );
1421 
1435  bool rescueProject( RESCUER& aRescuer, bool aRunningOnDemand );
1436  bool RescueLegacyProject( bool aRunningOnDemand );
1437  bool RescueSymbolLibTableProject( bool aRunningOnDemand );
1438 
1447  virtual void PrintPage( wxDC* aDC, LSET aPrintMask,
1448  bool aPrintMirrorMode, void* aData = NULL ) override;
1449 
1450  void SetSimulatorCommand( const wxString& aCommand ) { m_simulatorCommand = aCommand; }
1451 
1452  wxString GetSimulatorCommand() const { return m_simulatorCommand; }
1453 
1454  void SetNetListerCommand( const wxString& aCommand ) { m_netListerCommand = aCommand; }
1455 
1459  void DefaultExecFlags() { m_exec_flags = wxEXEC_SYNC; }
1460 
1466  void SetExecFlags( const int aFlags ) { m_exec_flags |= aFlags; }
1467 
1474  void ClearExecFlags( const int aFlags ) { m_exec_flags &= ~( aFlags ); }
1475 
1476  wxString GetNetListerCommand() const { return m_netListerCommand; }
1477 
1486  void doUpdatePcb( const wxString& aUpdateOptions = "" );
1487 
1488  void SetCurrentSheet( SCH_SHEET_PATH *aSheet );
1489 
1493  void InstallPreferences( PAGED_DIALOG* aParent ) override;
1494 
1498  void CommonSettingsChanged() override;
1499 
1500  void ShowChangedLanguage() override;
1501 
1502  void DuplicateItemsInList( SCH_SCREEN* screen, PICKED_ITEMS_LIST& aItemsList,
1503  const wxPoint& aMoveVector );
1504 
1505  virtual void SetScreen( BASE_SCREEN* aScreen ) override;
1506 
1507  virtual const BOX2I GetDocumentExtents() const override;
1508 
1510  const static wxCursor CURSOR_PROBE;
1511 
1513  const static wxCursor CURSOR_TUNE;
1514 
1515  DECLARE_EVENT_TABLE()
1516 };
1517 
1518 
1519 #endif // SCH_EDIT_FRAME_H
void OnLoadProject(wxCommandEvent &event)
void SetCurrentSheet(const SCH_SHEET_PATH &aSheet)
SCH_ITEM * GetUndoItem() const
void ReCreateOptToolbar()
Definition: tool_sch.cpp:279
void OnFindDrcMarker(wxFindDialogEvent &event)
Definition: find.cpp:60
bool GetAutoplaceJustify() const
bool DeleteItemAtCrossHair()
Delete the item found under the cross hair.
Definition: schedit.cpp:637
Class for a bus to bus entry.
void OrientComponent(COMPONENT_ORIENTATION_T aOrientation=CMP_NORMAL)
Rotate and mirror a component.
Definition: getpart.cpp:279
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.
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's value,...
Definition: sch_field.h:56
void DeleteConnection(bool DeleteFullConnection)
Definition: schedit.cpp:622
void EditComponent(SCH_COMPONENT *aComponent)
Display the edit component dialog to edit the parameters of aComponent.
const wxString GetNetListFormatName() const
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:784
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:379
void OnFindItems(wxCommandEvent &event)
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
void OnPreferencesOptions(wxCommandEvent &event)
COMPONENT_ORIENTATION_T
enum used in RotationMiroir()
wxArrayString m_findStringHistoryList
void SetForceHVLines(bool aForceHVdirection)
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.
wxString m_DefaultSchematicFileName
static wxSize m_lastSheetPinTextSize
Last sheet pin text size.
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'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:462
void OnEditItem(wxCommandEvent &aEvent)
Handle the ID_SCH_EDIT_ITEM event used to edit schematic items.
Definition: schedit.cpp:960
void ConvertPart(SCH_COMPONENT *DrawComponent)
Definition: getpart.cpp:351
Schematic editor (Eeschema) main window.
bool TestDanglingEnds()
Test all of the connectable objects in the schematic for unused connection points.
void SetPrintSheetReference(bool aShow)
void OnPageSettingsChange() override
Called when modifying the page settings.
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.
bool GetAutoplaceFields() const
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
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:397
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:264
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:744
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:615
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:832
bool prepareForNetlist()
Verify that annotation is complete so that a proper netlist is even possible.
bool GetForceHVLines() const
Class BASE_SCREEN handles how to draw a screen (a board, a schematic ...)
Definition: base_screen.h:76
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:212
const wxString & GetPlotDirectoryName() const
accessor to the destination directory to use when generating plot files.
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:307
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 '-cache' 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:74
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.
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:246
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.
wxPoint GetLastSheetPinPosition() 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)
wxString GetSimulatorCommand() const
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
int GetLabelIncrement() const
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:446
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)
SCH_ITEM * GetRepeatItem() const
Return the item which is to be repeated with the insert key.
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)
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,...
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.
bool EditImage(SCH_BITMAP *aItem)
Launches the "Edit Image" dialog to modify an image.
wxString m_plotDirectoryName
The name of the destination directory to use when generating plot files.
bool SetCurrentSheetHighlightFlags(std::vector< EDA_ITEM * > *aItemsToRedrawList)
Set or reset the BRIGHTENED of connected objects inside the current sheet, according to the highlight...
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
bool GetShowAllPins() const
Class SCH_FIND_REPLACE_DATA adds missing useful comparison and assignment operators to the wxFindRepl...
void SetAutoplaceFields(bool aEnable)
Find an item by it's reference designator.
void OnSelectTool(wxCommandEvent &aEvent)
Definition: schedit.cpp:472
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:70
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 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'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 GetNetListerCommand() const
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:1123
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:1196
bool GetAutoplaceAlign() const
void MirrorSheet(SCH_SHEET *aSheet, bool aFromXaxis)
Mirror a hierarchical sheet.
Definition: sheet.cpp:493
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...
bool GetSpiceAjustPassiveValues() const
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,...
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.
void DeleteItem(SCH_ITEM *aItem, bool aAppend=false)
Remove aItem from the current screen and saves it in the undo list.
bool GetFootprintPreview() const
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:303
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:806
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