KiCad PCB EDA Suite
schframe.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-2017 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 WX_EESCHEMA_STRUCT_H
31 #define WX_EESCHEMA_STRUCT_H
32 
33 #include <sch_base_frame.h>
34 #include <config_params.h>
36 #include <template_fieldnames.h>
37 #include <block_commande.h>
38 #include <class_sch_screen.h>
39 #include <sch_collectors.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 wxFindDialogEvent;
65 class wxFindReplaceData;
66 class SCHLIB_FILTER;
67 class RESCUER;
68 
69 
72  CMP_NORMAL, // Normal orientation, no rotation or mirror
73  CMP_ROTATE_CLOCKWISE, // Rotate -90
75  CMP_ORIENT_0, // No rotation and no mirror id CMP_NORMAL
76  CMP_ORIENT_90, // Rotate 90, no mirror
77  CMP_ORIENT_180, // Rotate 180, no mirror
78  CMP_ORIENT_270, // Rotate -90, no mirror
79  CMP_MIRROR_X = 0x100, // Mirror around X axis
80  CMP_MIRROR_Y = 0x200 // Mirror around Y axis
81 };
82 
83 
89 };
91 
92 
99 };
101 
102 
110 };
111 
112 
113 #define SCH_EDIT_FRAME_NAME wxT( "SchematicFrame" )
114 
119 {
120 private:
124 
127  wxPageSetupDialogData m_pageSetupData;
128  wxFindReplaceData* m_findReplaceData;
138  wxArrayString m_findStringHistoryList;
147  wxString m_netListerCommand;
149  int m_exec_flags;
151 
154 
158 
161 
164 
167 
169  wxString m_netListFormat;
170 
173 
174  /* these are PROJECT specific, not schematic editor specific
175  wxString m_userLibraryPath;
176  wxArrayString m_componentLibFiles;
177  */
178 
180  static wxSize m_lastSheetPinTextSize;
182 
183 protected:
185 
189  const wxSize &GetLastSheetPinTextSize();
190 
196  virtual bool doAutoSave() override;
197 
201  virtual bool isAutoSaveRequired() const override;
202 
209  void addCurrentItemToList( bool aRedraw = true );
210 
211  void updateFindReplaceView( wxFindDialogEvent& aEvent );
212 
213  void backAnnotateFootprints( const std::string& aChangedSetOfReferences );
214 
221  bool prepareForNetlist();
222 
226  void sendNetlist();
227 
228 public:
229  SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent );
230  ~SCH_EDIT_FRAME();
231 
232  SCH_SCREEN* GetScreen() const override;
233 
234  void OnCloseWindow( wxCloseEvent& Event );
235 
236  bool GetForceHVLines() const { return m_forceHVLines; }
237  void SetForceHVLines( bool aForceHVdirection ) { m_forceHVLines = aForceHVdirection; }
238 
239  bool GetShowAllPins() const { return m_showAllPins; }
240 
241  void SetShowAllPins( bool aEnable ) { m_showAllPins = aEnable; }
242 
243  const wxString GetNetListFormatName() const { return m_netListFormat; }
244 
245  void SetNetListFormatName( const wxString& aFormat ) { m_netListFormat = aFormat; }
246 
248 
249  void SetSpiceAjustPassiveValues( bool aEnable ) { m_spiceAjustPassiveValues = aEnable; }
250 
252  const wxString& GetPlotDirectoryName() const { return m_plotDirectoryName; }
253  void SetPlotDirectoryName( const wxString& aDirName ) { m_plotDirectoryName = aDirName; }
254 
255  void Process_Special_Functions( wxCommandEvent& event );
256  void Process_Config( wxCommandEvent& event );
257  void OnSelectTool( wxCommandEvent& aEvent );
258 
259  bool GeneralControl( wxDC* aDC, const wxPoint& aPosition, EDA_KEY aHotKey = 0 ) override;
260 
270 
276  void SaveProjectSettings( bool aAskForSave ) override;
277 
283  bool LoadProjectFile();
284 
292  static wxString GetDefaultFieldName( int aFieldNdx );
293 
305  int AddTemplateFieldName( const TEMPLATE_FIELDNAME& aFieldName )
306  {
307  return m_TemplateFieldNames.AddTemplateFieldName( aFieldName );
308  }
309 
310 
315  {
316  return m_TemplateFieldNames.GetTemplateFieldNames();
317  }
318 
319 
324  {
325  return m_TemplateFieldNames;
326  }
327 
332  {
333  m_TemplateFieldNames.DeleteAllTemplateFieldNames();
334  }
335 
348 
349  void LoadSettings( wxConfigBase* aCfg ) override;
350  void SaveSettings( wxConfigBase* aCfg ) override;
351 
352  void RedrawActiveWindow( wxDC* DC, bool EraseBg ) override;
353 
354  void CreateScreens();
355  void ReCreateHToolbar() override;
356  void ReCreateVToolbar() override;
357  void ReCreateOptToolbar();
358  void ReCreateMenuBar() override;
359 
361  EDA_HOTKEY* GetHotKeyDescription( int aCommand ) const override;
362 
363  bool OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition, EDA_ITEM* aItem = NULL ) override;
364 
369  void OnModify();
370 
371  virtual wxString GetScreenDesc() const override;
372 
373  void InstallConfigFrame( wxCommandEvent& event );
374 
381  virtual void ExecuteRemoteCommand( const char* cmdline ) override;
382 
383  void KiwayMailIn( KIWAY_EXPRESS& aEvent ) override;
384 
385  void OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) override;
386  void OnLeftDClick( wxDC* aDC, const wxPoint& aPosition ) override;
387  bool OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu ) override;
388  void OnSelectOptionToolbar( wxCommandEvent& event );
389  double BestZoom() override;
390 
407  SCH_ITEM* LocateAndShowItem( const wxPoint& aPosition,
408  const KICAD_T aFilterList[] = SCH_COLLECTOR::AllItems,
409  int aHotKeyCommandId = 0 );
410 
426  SCH_ITEM* LocateItem( const wxPoint& aPosition,
427  const KICAD_T aFilterList[] = SCH_COLLECTOR::AllItems,
428  int aHotKeyCommandId = 0 );
429 
438  bool DeleteItemAtCrossHair( wxDC* aDC );
439 
440 
450  bool HighlightConnectionAtPosition( wxPoint aPosition );
451 
462  SCH_ITEM* FindComponentAndItem( const wxString& aReference,
463  bool aSearchHierarchy,
464  SCH_SEARCH_T aSearchType,
465  const wxString& aSearchText,
466  bool aWarpMouse );
467 
480  void SendMessageToPCBNEW( EDA_ITEM* aObjectToSync, SCH_COMPONENT* aPart );
481 
488  NETLIST_OBJECT_LIST* BuildNetListBase( bool updateStatusText = true );
489 
510  bool CreateNetlist( int aFormat,
511  const wxString& aFullFileName,
512  unsigned aNetlistOptions,
513  REPORTER* aReporter = NULL,
514  bool silent = false ) override;
515 
533  bool WriteNetListFile( NETLIST_OBJECT_LIST* aConnectedItemsList,
534  int aFormat,
535  const wxString& aFullFileName,
536  unsigned aNetlistOptions,
537  REPORTER* aReporter = NULL );
538 
545  void DeleteAnnotation( bool aCurrentSheetOnly );
546 
573  void AnnotateComponents( bool aAnnotateSchematic, ANNOTATE_ORDER_T aSortOption,
574  ANNOTATE_OPTION_T aAlgoOption, bool aResetAnnotation,
575  bool aRepairTimestamps, bool aLockUnits );
576 
593  int CheckAnnotate( wxArrayString* aMessageList, bool aOneSheetOnly );
594 
595  // Functions used for hierarchy handling
597 
598  void SetCurrentSheet( const SCH_SHEET_PATH& aSheet );
599 
603  void DisplayCurrentSheet();
604 
613 
625 
631  void SetSheetNumberAndCount();
632 
636  void OnPrint( wxCommandEvent& event );
637 
638  wxPageSetupDialogData& GetPageSetupData() { return m_pageSetupData; }
639 
640  void SetPreviewPosition( const wxPoint& aPoint ) { m_previewPosition = aPoint; }
641  void SetPreviewSize( const wxSize& aSize ) { m_previewSize = aSize; }
643  const wxSize& GetPreviewSize() { return m_previewSize; }
644 
645  void SetPrintDialogPosition( const wxPoint& aPoint )
646  {
647  m_printDialogPosition = aPoint;
648  }
649 
650 
651  void SetPrintDialogSize( const wxSize& aSize ) { m_printDialogSize = aSize; }
653  const wxSize& GetPrintDialogSize() { return m_printDialogSize; }
654 
656  void SetPrintMonochrome( bool aMonochrome ) { m_printMonochrome = aMonochrome; }
658  void SetPrintSheetReference( bool aShow ) { m_printSheetReference = aShow; }
659 
660  // Plot functions:
661  void PlotSchematic( wxCommandEvent& event );
662 
663  // read and save files
664  void Save_File( wxCommandEvent& event );
665 
671  void OnSaveProject( wxCommandEvent& aEvent );
672 
673  bool OpenProjectFiles( const std::vector<wxString>& aFileSet, int aCtl = 0 ) override;
674 
704  bool AppendSchematic();
705 
713 
734  bool ProcessCmpToFootprintLinkFile( const wxString& aFullFilename,
735  bool aForceVisibilityState,
736  bool aVisibilityState );
737 
751  bool SaveEEFile( SCH_SCREEN* aScreen,
752  bool aSaveUnderNewName = false,
753  bool aCreateBackupFile = CREATE_BACKUP_FILE );
754 
755  // General search:
756 
757  bool IsSearchCacheObsolete( const SCH_FIND_REPLACE_DATA& aSearchCriteria );
758 
765  bool ImportFile( const wxString& aFileName, int aFileType ) override;
766 
774  bool AskToSaveChanges();
775 
776 private:
777 
781  void OnAutoplaceFields( wxCommandEvent& aEvent );
782 
786  void OnMoveItem( wxCommandEvent& aEvent );
787 
792  void OnRotate( wxCommandEvent& aEvent );
793 
797  void OnEditItem( wxCommandEvent& aEvent );
798 
803  void SelectAllFromSheet( wxCommandEvent& aEvent );
804 
808  void OnDragItem( wxCommandEvent& aEvent );
809 
814  void OnOrient( wxCommandEvent& aEvent );
815 
816  void OnExit( wxCommandEvent& event );
817  void OnAnnotate( wxCommandEvent& event );
818  void OnErc( wxCommandEvent& event );
819  void OnCreateNetlist( wxCommandEvent& event );
820  void OnUpdatePCB( wxCommandEvent& event );
821  void OnSimulate( wxCommandEvent& event );
822  void OnCreateBillOfMaterials( wxCommandEvent& event );
823  void OnLaunchBomManager( wxCommandEvent& event );
824  void OnFindItems( wxCommandEvent& event );
825  void OnFindDialogClose( wxFindDialogEvent& event );
826  void OnFindDrcMarker( wxFindDialogEvent& event );
827  void OnFindCompnentInLib( wxFindDialogEvent& event );
828 
834  void OnFindSchematicItem( wxFindDialogEvent& aEvent );
835 
842  void OnFindReplace( wxFindDialogEvent& aEvent );
843 
844  void OnLoadFile( wxCommandEvent& event );
845  void OnLoadCmpToFootprintLinkFile( wxCommandEvent& event );
846  void OnUpdateFields( wxCommandEvent& event );
847  void OnNewProject( wxCommandEvent& event );
848  void OnLoadProject( wxCommandEvent& event );
849  void OnAppendProject( wxCommandEvent& event );
850  void OnImportProject( wxCommandEvent& event );
851  void OnOpenPcbnew( wxCommandEvent& event );
852  void OnOpenPcbModuleEditor( wxCommandEvent& event );
853  void OnOpenCvpcb( wxCommandEvent& event );
854  void OnOpenLibraryEditor( wxCommandEvent& event );
855  void OnRescueProject( wxCommandEvent& event );
856  void OnRemapSymbols( wxCommandEvent& aEvent );
857  // a helper function to run the dialog that allows to rename the symbol library Id of
858  // groups of components, for instance after a symbol has moved from a library to
859  // an other library
860  void OnEditComponentSymbolsId( wxCommandEvent& aEvent );
861  void OnPreferencesOptions( wxCommandEvent& event );
862  void OnCancelCurrentCommand( wxCommandEvent& aEvent );
863 
864  void OnSelectItem( wxCommandEvent& aEvent );
865 
869  void OnCopySchematicItemRequest( wxCommandEvent& event );
870 
871  /* User interface update event handlers. */
872  void OnUpdatePaste( wxUpdateUIEvent& event );
873  void OnUpdateHiddenPins( wxUpdateUIEvent& event );
874  void OnUpdateBusOrientation( wxUpdateUIEvent& event );
875  void OnUpdateSelectTool( wxUpdateUIEvent& aEvent );
876  void OnUpdateSave( wxUpdateUIEvent& aEvent );
877  void OnUpdateSaveSheet( wxUpdateUIEvent& aEvent );
878  void OnUpdateHierarchySheet( wxUpdateUIEvent& aEvent );
879  void OnUpdateRemapSymbols( wxUpdateUIEvent& aEvent );
880 
890  void UpdateTitle();
891 
892  // Bus Entry
895  void SetBusEntryShape( wxDC* DC, SCH_BUS_ENTRY_BASE* BusEntry, char entry_shape );
896 
904  SCH_NO_CONNECT* AddNoConnect( wxDC* aDC, const wxPoint& aPosition );
905 
909  SCH_JUNCTION* AddJunction( wxDC* aDC, const wxPoint& aPosition, bool aPutInUndoList = false );
910 
917  void PrepareMoveItem( SCH_ITEM* aItem, wxDC* aDC );
918 
919  // Text, label, glabel
920  SCH_TEXT* CreateNewText( wxDC* aDC, int aType );
921  void EditSchematicText( SCH_TEXT* TextStruct );
922  void ChangeTextOrient( SCH_TEXT* aTextItem );
923 
930  void OnConvertTextType( wxCommandEvent& aEvent );
931 
939  void BeginSegment( wxDC* DC, int type );
940 
944  void EndSegment( wxDC* DC );
945 
949  void DeleteCurrentSegment( wxDC* DC );
950  void DeleteConnection( bool DeleteFullConnection );
951 
952  // graphic lines
953  void Edge( DRAWSEGMENT* Segment, wxDC* DC );
954  void SetNewWidth( DRAWSEGMENT* DrawSegm, wxDC* DC );
955  void Layer( DRAWSEGMENT* Segment, wxDC* DC );
956  DRAWSEGMENT* Begin_Edge( DRAWSEGMENT* Segment, wxDC* DC );
957 
958  // Images:
959  SCH_BITMAP* CreateNewImage( wxDC* aDC );
960  void MoveImage( SCH_BITMAP* aItem, wxDC* aDC );
961  void RotateImage( SCH_BITMAP* aItem );
962 
970  void MirrorImage( SCH_BITMAP* aItem, bool Is_X_axis );
971  void EditImage( SCH_BITMAP* aItem );
972 
973  // Hierarchical Sheet & PinSheet
974  void InstallHierarchyFrame( wxPoint& pos );
975  SCH_SHEET* CreateSheet( wxDC* DC );
976  void ReSizeSheet( SCH_SHEET* Sheet, wxDC* DC );
977 
987  void RotateHierarchicalSheet( SCH_SHEET* aSheet, bool aRotCCW );
988 
998  void MirrorSheet( SCH_SHEET* aSheet, bool aFromXaxis );
999 
1001  bool LoadCacheLibrary( const wxString& aFileName );
1002 
1003 private:
1011  int EditLine( SCH_LINE* aLine, bool aRedraw );
1012 
1013 public:
1035  bool EditSheet( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHierarchy );
1036 
1038 
1039 private:
1040  bool validateSheet( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHierarchy );
1041 
1049  SCH_SHEET_PIN* CreateSheetPin( SCH_SHEET* aSheet, wxDC* aDC );
1050 
1058  int EditSheetPin( SCH_SHEET_PIN* aSheetPin, bool aRedraw );
1059 
1068  SCH_SHEET_PIN* ImportSheetPin( SCH_SHEET* aSheet, wxDC* aDC );
1069 
1070 public:
1076  void DeleteItem( SCH_ITEM* aItem );
1077 
1078  int GetLabelIncrement() const { return m_repeatLabelDelta; }
1079 
1080 private:
1081 
1098  SCH_COMPONENT* Load_Component( wxDC* aDC,
1099  const SCHLIB_FILTER* aFilter,
1100  SCH_BASE_FRAME::HISTORY_LIST& aHistoryList,
1101  bool aUseLibBrowser );
1102 
1108  void EditComponent( SCH_COMPONENT* aComponent );
1109 
1110 public:
1111 
1115  void OrientComponent( COMPONENT_ORIENTATION_T aOrientation = CMP_NORMAL );
1116 
1117 private:
1118  void OnSelectUnit( wxCommandEvent& aEvent );
1119  void ConvertPart( SCH_COMPONENT* DrawComponent, wxDC* DC );
1120  void SetInitCmp( SCH_COMPONENT* DrawComponent, wxDC* DC );
1121 
1127  void EditComponentFieldText( SCH_FIELD* aField );
1128 
1129  void RotateField( SCH_FIELD* aField );
1130 
1134  void PasteListOfItems( wxDC* DC );
1135 
1136  /* Undo - redo */
1137 public:
1138 
1167  void SaveCopyInUndoList( SCH_ITEM* aItemToCopy,
1168  UNDO_REDO_T aTypeCommand,
1169  const wxPoint& aTransformPoint = wxPoint( 0, 0 ) );
1170 
1179  void SaveCopyInUndoList( const PICKED_ITEMS_LIST& aItemsList,
1180  UNDO_REDO_T aTypeCommand,
1181  const wxPoint& aTransformPoint = wxPoint( 0, 0 ) );
1182 
1183 private:
1184 
1191  void PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRedoCommand );
1192 
1201  void GetSchematicFromRedoList( wxCommandEvent& event );
1202 
1209  void GetSchematicFromUndoList( wxCommandEvent& event );
1210 
1217  void copyBlockItems( PICKED_ITEMS_LIST& aItemsList );
1218 
1225  void addJunctionMenuEntries( wxMenu* aMenu, SCH_JUNCTION* aJunction );
1226 
1227 public:
1228  void Key( wxDC* DC, int hotkey, EDA_ITEM* DrawStruct );
1229 
1233  void InitBlockPasteInfos() override;
1234 
1243  virtual int BlockCommand( EDA_KEY aKey ) override;
1244 
1251  virtual void HandleBlockPlace( wxDC* DC ) override;
1252 
1264  virtual bool HandleBlockEnd( wxDC* aDC ) override;
1265 
1272  void RepeatDrawItem( wxDC* DC );
1273 
1277  void SetRepeatItem( SCH_ITEM* aItem );
1278 
1285 
1293  void SetUndoItem( const SCH_ITEM* aItem );
1294 
1295  SCH_ITEM* GetUndoItem() const { return m_undoItem; }
1296 
1306  void SaveUndoItemInUndoList( SCH_ITEM* aItem );
1307 
1317  bool CreateArchiveLibraryCacheFile( bool aUseCurrentSheetFilename = false );
1318 
1325  bool CreateArchiveLibrary( const wxString& aFileName );
1326 
1340  bool rescueProject( RESCUER& aRescuer, bool aRunningOnDemand );
1341  bool RescueLegacyProject( bool aRunningOnDemand );
1342  bool RescueSymbolLibTableProject( bool aRunningOnDemand );
1343 
1352  virtual void PrintPage( wxDC* aDC, LSET aPrintMask,
1353  bool aPrintMirrorMode, void* aData = NULL ) override;
1354 
1355  void SetSimulatorCommand( const wxString& aCommand ) { m_simulatorCommand = aCommand; }
1356 
1357  wxString GetSimulatorCommand() const { return m_simulatorCommand; }
1358 
1359  void SetNetListerCommand( const wxString& aCommand ) { m_netListerCommand = aCommand; }
1360 
1364  void DefaultExecFlags() { m_exec_flags = wxEXEC_SYNC; }
1365 
1371  void SetExecFlags( const int aFlags ) { m_exec_flags |= aFlags; }
1372 
1379  void ClearExecFlags( const int aFlags ) { m_exec_flags &= ~( aFlags ); }
1380 
1381  wxString GetNetListerCommand() const { return m_netListerCommand; }
1382 
1384  const static wxCursor CURSOR_PROBE;
1385 
1387  const static wxCursor CURSOR_TUNE;
1388 
1389  DECLARE_EVENT_TABLE()
1390 };
1391 
1392 
1393 #endif // WX_EESCHEMA_STRUCT_H
void OnLoadProject(wxCommandEvent &event)
Definition: schframe.cpp:1063
void SetCurrentSheet(const SCH_SHEET_PATH &aSheet)
Definition: schframe.cpp:585
void ReCreateOptToolbar()
Definition: tool_sch.cpp:264
void OnFindDrcMarker(wxFindDialogEvent &event)
Definition: find.cpp:59
SCH_NO_CONNECT * AddNoConnect(wxDC *aDC, const wxPoint &aPosition)
Add no connect item to the current schematic sheet at aPosition.
Class for a bus to bus entry.
void RepeatDrawItem(wxDC *DC)
Repeat the last item placement if the last item was a bus, bus entry, label, or component.
ANNOTATE_ORDER_T
Schematic annotation order options.
Definition: schframe.h:85
void OrientComponent(COMPONENT_ORIENTATION_T aOrientation=CMP_NORMAL)
Rotate and mirror a component.
Definition: getpart.cpp:291
const wxString GetNetListFormatName() const
Definition: schframe.h:243
wxString m_netListerCommand
Command line to call a custom net list generator.
Definition: schframe.h:148
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:643
Annotate using the first free reference number starting at the sheet number * 100.
Definition: schframe.h:96
void EditComponent(SCH_COMPONENT *aComponent)
Display the edit component dialog to edit the parameters of aComponent.
void OnOpenCvpcb(wxCommandEvent &event)
Definition: schframe.cpp:1142
A list of parameters type.
void RotateField(SCH_FIELD *aField)
bool OnHotKey(wxDC *aDC, int aHotKey, const wxPoint &aPosition, EDA_ITEM *aItem=NULL) override
void OnSelectOptionToolbar(wxCommandEvent &event)
Definition: tool_sch.cpp:305
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.
Definition: schframe.h:1364
int EditLine(SCH_LINE *aLine, bool aRedraw)
Function EditLine displays the dialog for editing the parameters of aLine.
Definition: sch_line.cpp:718
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.
const TEMPLATES & GetTemplates()
Return the field names template for read only access.
Definition: schframe.h:323
bool OpenProjectFiles(const std::vector< wxString > &aFileSet, int aCtl=0) override
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:413
void OnFindItems(wxCommandEvent &event)
Definition: schframe.cpp:943
void DeleteItem(SCH_ITEM *aItem)
Remove aItem from the current screen and saves it in the undo list.
SCH_JUNCTION * AddJunction(wxDC *aDC, const wxPoint &aPosition, bool aPutInUndoList=false)
Add a new junction at aPosition.
wxString GetSimulatorCommand() const
Definition: schframe.h:1357
void OnLoadFile(wxCommandEvent &event)
Definition: schframe.cpp:999
Find an item by it's reference designator.
Definition: schframe.h:107
void OnUpdateSaveSheet(wxUpdateUIEvent &aEvent)
Definition: schframe.cpp:828
bool LoadCmpToFootprintLinkFile()
Loads a .cmp file from CvPcb and update the footprint field of components.
Definition: backanno.cpp:217
void OnUpdateHiddenPins(wxUpdateUIEvent &event)
Definition: schframe.cpp:801
void SetPlotDirectoryName(const wxString &aDirName)
Definition: schframe.h:253
void OnOpenPcbModuleEditor(wxCommandEvent &event)
Definition: schframe.cpp:1124
int AddTemplateFieldName(const TEMPLATE_FIELDNAME &aFieldName)
Insert or append a wanted symbol field name into the field names template.
Definition: schframe.h:305
static const KICAD_T AllItems[]
A scan list for all schematic items.
PARAM_CFG_ARRAY m_projectFileParams
Definition: schframe.h:125
void SaveCopyInUndoList(SCH_ITEM *aItemToCopy, UNDO_REDO_T aTypeCommand, const wxPoint &aTransformPoint=wxPoint(0, 0))
Create a copy of the current schematic item, and put it in the undo list.
SCH_ITEM * GetRepeatItem() const
Return the item which is to be repeated with the insert key.
Definition: schframe.h:1284
void OnPreferencesOptions(wxCommandEvent &event)
void SetPrintDialogPosition(const wxPoint &aPoint)
Definition: schframe.h:645
wxArrayString m_findStringHistoryList
Definition: schframe.h:138
void SetForceHVLines(bool aForceHVdirection)
Definition: schframe.h:237
bool GetForceHVLines() const
Definition: schframe.h:236
void OnModify()
Must be called after a schematic change in order to set the "modify" flag of the current screen* and ...
Definition: schframe.cpp:773
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)
Definition: schframe.cpp:1030
int CheckAnnotate(wxArrayString *aMessageList, bool aOneSheetOnly)
Check for annotation errors.
Definition: annotate.cpp:187
void OnUpdateRemapSymbols(wxUpdateUIEvent &aEvent)
Definition: schframe.cpp:819
void OnFindDialogClose(wxFindDialogEvent &event)
Definition: schframe.cpp:981
void ReCreateMenuBar() override
Function ReCreateMenuBar Creates recreates the menu bar.
wxString m_DefaultSchematicFileName
Definition: schframe.h:122
static wxSize m_lastSheetPinTextSize
Last sheet pin text size.
Definition: schframe.h:180
wxPoint GetLastSheetPinPosition() const
Definition: schframe.h:1037
bool GetPrintMonochrome()
Definition: schframe.h:655
wxPoint m_printDialogPosition
Definition: schframe.h:131
bool CreateNetlist(int aFormat, const wxString &aFullFileName, unsigned aNetlistOptions, REPORTER *aReporter=NULL, bool silent=false) override
Create a netlist for the current schematic.
void OnLaunchBomManager(wxCommandEvent &event)
Definition: schframe.cpp:933
void OnConvertTextType(wxCommandEvent &aEvent)
Command event handler to change a text type to an other one.
Definition: edit_label.cpp:137
void ChangeTextOrient(SCH_TEXT *aTextItem)
Definition: edit_label.cpp:50
SCH_FIND_COLLECTOR m_foundItems
List of find/replace items.
Definition: schframe.h:144
void copyBlockItems(PICKED_ITEMS_LIST &aItemsList)
Copy the list of block item.
void Layer(DRAWSEGMENT *Segment, wxDC *DC)
bool AskToSaveChanges()
Checks if any of the screens has unsaved changes and asks the user whether to save or drop them...
Find a component field.
Definition: schframe.h:109
static const wxCursor CURSOR_TUNE
Tuner cursor, used by circuit simulator
Definition: schframe.h:1387
PARAM_CFG_ARRAY & GetConfigurationSettings()
Return the Eeschema applications settings.
void OnCloseWindow(wxCloseEvent &Event)
Definition: schframe.cpp:624
void addCurrentItemToList(bool aRedraw=true)
Add the item currently being edited to the schematic and adds the changes to the undo/redo container...
Definition: schframe.cpp:1350
void UpdateTitle()
Set the main window title bar text.
Definition: schframe.cpp:1447
wxFindReplaceData * m_findReplaceData
Definition: schframe.h:128
void OnAppendProject(wxCommandEvent &event)
ANNOTATE_OPTION_T
Schematic annotation type options.
Definition: schframe.h:94
int m_repeatLabelDelta
Repeat label number increment step.
Definition: schframe.h:142
std::vector< COMPONENT_SELECTION > HISTORY_LIST
bool GetPrintSheetReference()
Definition: schframe.h:657
The common library.
void OnPrint(wxCommandEvent &event)
Show the print dialog.
Definition: schframe.cpp:1290
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)
Definition: schframe.h:1355
void RotateHierarchicalSheet(SCH_SHEET *aSheet, bool aRotCCW)
Rotate a sheet object.
Definition: sheet.cpp:454
void BeginSegment(wxDC *DC, int type)
Creates a new segment ( WIRE, BUS ) or terminates the current segment in progress.
void OnEditItem(wxCommandEvent &aEvent)
Handle the ID_SCH_EDIT_ITEM event used to edit schematic items.
Definition: schedit.cpp:961
SCH_ITEM * GetUndoItem() const
Definition: schframe.h:1295
Schematic editor (Eeschema) main window.
Definition: schframe.h:118
void SetPrintSheetReference(bool aShow)
Definition: schframe.h:658
SCH_COLLECTOR m_collectedItems
List of collected items.
Definition: schframe.h:143
SCH_TEXT * CreateNewText(wxDC *aDC, int aType)
Definition: edit_label.cpp:66
void MirrorImage(SCH_BITMAP *aItem, bool Is_X_axis)
Mirror a bitmap.
void SetPrintMonochrome(bool aMonochrome)
Definition: schframe.h:656
void OnRescueProject(wxCommandEvent &event)
Definition: schframe.cpp:1251
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:279
bool m_autoplaceAlign
align autoplaced fields to the grid
Definition: schframe.h:157
Class REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:61
TEMPLATES m_TemplateFieldNames
Definition: schframe.h:184
void EditComponentFieldText(SCH_FIELD *aField)
Display the edit field dialog to edit the parameters of aField.
bool ImportFile(const wxString &aFileName, int aFileType) override
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.
Implementing DIALOG_SCH_FIND_BASE.
void OnCopySchematicItemRequest(wxCommandEvent &event)
Command event handler for duplicating the item at the current location.
Symbol library viewer main window.
Definition: viewlib_frame.h:49
void OnUpdateHierarchySheet(wxUpdateUIEvent &aEvent)
Definition: schframe.cpp:835
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
Definition: schframe.h:1381
void SetRepeatItem(SCH_ITEM *aItem)
Clone aItem and owns that clone in this container.
Definition: schframe.cpp:471
void PrepareMoveItem(SCH_ITEM *aItem, wxDC *aDC)
Start moving aItem using the mouse.
Definition: schedit.cpp:775
void SaveProjectSettings(bool aAskForSave) override
Save changes to the project settings to the project (.pro) file.
void InstallHierarchyFrame(wxPoint &pos)
Definition: hierarch.cpp:150
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...
Definition: schframe.cpp:609
void updateFindReplaceView(wxFindDialogEvent &aEvent)
Definition: find.cpp:453
void OnUpdateSave(wxUpdateUIEvent &aEvent)
Definition: schframe.cpp:811
void OnImportProject(wxCommandEvent &event)
Class NETLIST_OBJECT_LIST is a container holding and owning NETLIST_OBJECTs, which are connected item...
SCH_SHEET_PIN * CreateSheetPin(SCH_SHEET *aSheet, wxDC *aDC)
Create a new SCH_SHEET_PIN object and add it to aSheet at the current cursor position.
Definition: sheetlab.cpp:110
Find a component pin in the schematic.
Definition: schframe.h:106
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
Function GetScreen returns a pointer to a BASE_SCREEN or one of its derivatives.
Definition: schframe.cpp:532
Class SCH_COLLECTOR.
void EndSegment(wxDC *DC)
Terminate a bus, wire, or line creation.
virtual wxString GetScreenDesc() const override
Definition: schframe.cpp:538
DRAWSEGMENT * Begin_Edge(DRAWSEGMENT *Segment, wxDC *DC)
SCH_SHEET_PATH * m_CurrentSheet
which sheet we are presently working on.
Definition: schframe.h:121
double BestZoom() override
Return the zoom level which displays the full page on screen.
Definition: schframe.cpp:718
SCH_BUS_BUS_ENTRY * CreateBusBusEntry()
Definition: busentry.cpp:42
UNDO_REDO_T
Undo Redo considerations: Basically we have 3 cases New item Deleted item Modified item there is also...
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:305
SCH_ITEM * LocateAndShowItem(const wxPoint &aPosition, const KICAD_T aFilterList[]=SCH_COLLECTOR::AllItems, int aHotKeyCommandId=0)
Check the schematic at aPosition in logical (drawing) units for a item matching the types in aFilterL...
const wxString & GetPlotDirectoryName() const
accessor to the destination directory to use when generating plot files.
Definition: schframe.h:252
void InitBlockPasteInfos() override
Initialize the parameters used by the block paste command.
SCH_SHEET * CreateSheet(wxDC *DC)
Definition: sheet.cpp:401
void DeleteAllTemplateFieldNames()
Remove all template field names.
Definition: schframe.h:331
Annotate by X position from left to right.
Definition: schframe.h:86
bool m_forceHVLines
force H or V directions for wires, bus, line
Definition: schframe.h:153
void SetInitCmp(SCH_COMPONENT *DrawComponent, wxDC *DC)
static wxString GetDefaultFieldName(int aFieldNdx)
Return a default symbol field name for field aFieldNdx for all components.
Annotate by position of component in the schematic sheet object list.
Definition: schframe.h:88
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:45
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.
std::vector< TEMPLATE_FIELDNAME > TEMPLATE_FIELDNAMES
DIALOG_SCH_FIND * m_dlgFindReplace
Definition: schframe.h:135
bool HighlightConnectionAtPosition(wxPoint aPosition)
Highlight the connection found at aPosition.
static PINSHEETLABEL_SHAPE m_lastSheetPinType
Last sheet pin type.
Definition: schframe.h:179
const wxPoint & GetPreviewPosition()
Definition: schframe.h:642
bool DeleteItemAtCrossHair(wxDC *aDC)
Delete the item found under the cross hair.
Definition: schedit.cpp:657
void DeleteCurrentSegment(wxDC *DC)
Erase the last segment at the current mouse position.
void DeleteAnnotation(bool aCurrentSheetOnly)
Clear the current component annotation.
Definition: annotate.cpp:39
void OnUpdateSelectTool(wxUpdateUIEvent &aEvent)
Definition: schedit.cpp:637
wxPageSetupDialogData m_pageSetupData
Definition: schframe.h:127
void OnUpdatePaste(wxUpdateUIEvent &event)
Definition: schframe.cpp:784
void OnRotate(wxCommandEvent &aEvent)
Handle the ID_SCH_ROTATE_CLOCKWISE and ID_SCH_ROTATE_COUNTERCLOCKWISE events used to rotate schematic...
Definition: schedit.cpp:855
bool prepareForNetlist()
Verify that annotation is complete so that a proper netlist is even possible.
Definitions for the Eeschema program SCH_SCREEN class.
bool GetShowAllPins() const
Definition: schframe.h:239
SCH_SHEET_PATH & GetCurrentSheet()
Definition: schframe.cpp:577
void Key(wxDC *DC, int hotkey, EDA_ITEM *DrawStruct)
SCH_ITEM * FindComponentAndItem(const wxString &aReference, bool aSearchHierarchy, SCH_SEARCH_T aSearchType, const wxString &aSearchText, bool aWarpMouse)
Finds a component in the schematic and an item in this component.
Definition: find.cpp:109
void PlotSchematic(wxCommandEvent &event)
bool LoadCacheLibrary(const wxString &aFileName)
Loads the cache library associated to the aFileName.
Annotate by Y position from top to bottom.
Definition: schframe.h:87
void Edge(DRAWSEGMENT *Segment, wxDC *DC)
bool AppendSchematic()
Import a KiCad schematic into the current page.
void OnSelectUnit(wxCommandEvent &aEvent)
Definition: getpart.cpp:322
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:44
wxSize m_printDialogSize
Definition: schframe.h:132
const wxSize & GetLastSheetPinTextSize()
Initializing accessor for the pin text size.
Definition: sheetlab.cpp:50
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:257
void OnUpdateFields(wxCommandEvent &event)
Definition: schframe.cpp:1015
static const wxCursor CURSOR_PROBE
Probe cursor, used by circuit simulator
Definition: schframe.h:1384
SCH_ITEM * m_item_to_repeat
Last item to insert by the repeat command.
Definition: schframe.h:141
void RotateImage(SCH_BITMAP *aItem)
uint32_t EDA_KEY
Definition: common.h:51
wxPoint m_findDialogPosition
Definition: schframe.h:136
void backAnnotateFootprints(const std::string &aChangedSetOfReferences)
Definition: backanno.cpp:51
void OnAutoplaceFields(wxCommandEvent &aEvent)
Handle the ID_AUTOPLACE_FIELDS event.
const TEMPLATE_FIELDNAMES & GetTemplateFieldNames()
Function GetTemplateFieldName returns a template fieldnames list for read only access.
bool LoadProjectFile()
Loads the KiCad project file (*.pro) settings specific to Eeschema.
wxArrayString m_replaceStringHistoryList
Definition: schframe.h:139
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.
Definition: schframe.cpp:1330
Class SCH_SHEET_PATH.
void DeleteAllTemplateFieldNames()
Function DeleteAllTemplateFieldNames deletes the entire contents.
wxPageSetupDialogData & GetPageSetupData()
Definition: schframe.h:638
bool IsSearchCacheObsolete(const SCH_FIND_REPLACE_DATA &aSearchCriteria)
Definition: find.cpp:287
void EditSchematicText(SCH_TEXT *TextStruct)
bool m_printMonochrome
Print monochrome instead of grey scale.
Definition: schframe.h:133
Class PICKED_ITEMS_LIST is a holder to handle information on schematic or board items.
bool GetSpiceAjustPassiveValues() const
Definition: schframe.h:247
int m_foundItemIndex
An index to the last find item in the found items list m_foundItems.
Definition: schframe.h:160
const wxSize & GetPrintDialogSize()
Definition: schframe.h:653
void OnUpdatePCB(wxCommandEvent &event)
Definition: schframe.cpp:860
Annotate incrementally using the first free reference number.
Definition: schframe.h:95
void OnLoadCmpToFootprintLinkFile(wxCommandEvent &event)
Definition: schframe.cpp:1008
void GetSchematicFromRedoList(wxCommandEvent &event)
Redo the last edition.
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
Definition: schframe.h:126
SCH_BITMAP * CreateNewImage(wxDC *aDC)
void OnUpdateBusOrientation(wxUpdateUIEvent &event)
Definition: schframe.cpp:790
bool m_autoplaceFields
automatically place component fields
Definition: schframe.h:155
void LoadSettings(wxConfigBase *aCfg) override
Function LoadSettings loads common frame parameters from a configuration file.
void OnOpenLibraryEditor(wxCommandEvent &event)
Definition: schframe.cpp:1166
void SetPreviewPosition(const wxPoint &aPoint)
Definition: schframe.h:640
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:488
void OnEditComponentSymbolsId(wxCommandEvent &aEvent)
Definition: schframe.cpp:1277
void RedrawActiveWindow(wxDC *DC, bool EraseBg) override
Definition: eeredraw.cpp:54
Annotate using the first free reference number starting at the sheet number * 1000.
Definition: schframe.h:98
void CreateScreens()
Definition: schframe.cpp:546
void OnAnnotate(wxCommandEvent &event)
Definition: schframe.cpp:841
bool m_showAllPins
Flag to indicate show hidden pins.
Definition: schframe.h:163
void ReSizeSheet(SCH_SHEET *Sheet, wxDC *DC)
Definition: sheet.cpp:429
void MoveImage(SCH_BITMAP *aItem, wxDC *aDC)
bool m_printSheetReference
Definition: schframe.h:134
wxString m_SelectedNetName
Definition: schframe.h:123
void OnRemapSymbols(wxCommandEvent &aEvent)
Definition: schframe.cpp:1262
Find an item by it's value field.
Definition: schframe.h:108
This file is part of the common library.
wxPoint m_previewPosition
Definition: schframe.h:129
void ClearExecFlags(const int aFlags)
Clear (removes) specified flags that not needed for next execution of external generator of the netli...
Definition: schframe.h:1379
PINSHEETLABEL_SHAPE
Definition: sch_text.h:46
void SetNetListFormatName(const wxString &aFormat)
Definition: schframe.h:245
wxSize m_previewSize
Definition: schframe.h:130
The symbol library editor main window.
Definition: libeditframe.h:58
void SetNewWidth(DRAWSEGMENT *DrawSegm, wxDC *DC)
const TEMPLATE_FIELDNAMES & GetTemplateFieldNames()
Return a template field names list for read only access.
Definition: schframe.h:314
wxSize m_findDialogSize
Definition: schframe.h:137
SCH_COMPONENT * Load_Component(wxDC *aDC, 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:205
class EDA_HOTKEY is a class to handle hot key commands.
Definition: hotkeys_basic.h:57
BLOCK_SELECTOR m_blockItems
List of selected items.
Definition: schframe.h:140
void OnExit(wxCommandEvent &event)
Definition: schframe.cpp:1284
int GetLabelIncrement() const
Definition: schframe.h:1078
Find a component in the schematic.
Definition: schframe.h:105
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
void SetPreviewSize(const wxSize &aSize)
Definition: schframe.h:641
SCH_EDIT_FRAME(KIWAY *aKiway, wxWindow *aParent)
void SetSheetNumberAndCount()
Set the m_ScreenNumber and m_NumberOfScreens members for screens.
Definition: schframe.cpp:497
wxString m_plotDirectoryName
The name of the destination directory to use when generating plot files.
Definition: schframe.h:166
void OnLeftClick(wxDC *aDC, const wxPoint &aPosition) override
SCH_ITEM * m_undoItem
Copy of the current item being edited.
Definition: schframe.h:145
#define CREATE_BACKUP_FILE
Definition: wxstruct.h:59
void OnErc(wxCommandEvent &event)
Definition: schframe.cpp:847
bool m_autoplaceJustify
allow autoplace to change justification
Definition: schframe.h:156
Class SCH_FIND_REPLACE_DATA adds missing useful comparison and assignment operators to the wxFindRepl...
SCH_SEARCH_T
Schematic search type used by the socket link with Pcbnew.
Definition: schframe.h:104
void OnSelectTool(wxCommandEvent &aEvent)
Definition: schedit.cpp:510
void OnOpenPcbnew(wxCommandEvent &event)
Definition: schframe.cpp:1080
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:165
bool RescueSymbolLibTableProject(bool aRunningOnDemand)
const wxPoint & GetPrintDialogPosition()
Definition: schframe.h:652
virtual void PrintPage(wxDC *aDC, LSET aPrintMask, bool aPrintMirrorMode, void *aData=NULL) override
Plot or print the current sheet to the clipboard.
Definition: schframe.cpp:1305
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()
Definition: schframe.cpp:742
void EditImage(SCH_BITMAP *aItem)
void OnCreateNetlist(wxCommandEvent &event)
Definition: schframe.cpp:913
wxString m_simulatorCommand
Command line used to call the circuit simulator (gnucap, spice, ...)
Definition: schframe.h:146
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 m_netListFormat
The name of the format to use when generating a net list.
Definition: schframe.h:169
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:1084
bool GeneralControl(wxDC *aDC, const wxPoint &aPosition, EDA_KEY aHotKey=0) override
Function GeneralControl performs application specific control using aDC at aPosition in logical units...
SCH_SHEET_PIN * ImportSheetPin(SCH_SHEET *aSheet, wxDC *aDC)
Automatically create a sheet pin from the hierarchical labels in the schematic referenced by aSheet...
Definition: sheetlab.cpp:140
const wxSize & GetPreviewSize()
Definition: schframe.h:643
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:1155
bool EditSheet(SCH_SHEET *aSheet, SCH_SHEET_PATH *aHierarchy)
Edit an existing sheet or add a new sheet to the schematic.
Definition: sheet.cpp:45
void MirrorSheet(SCH_SHEET *aSheet, bool aFromXaxis)
Mirror a hierarchical sheet.
Definition: sheet.cpp:481
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...
Definition: schframe.cpp:591
int m_exec_flags
Flags of the wxExecute() function to call a custom net list generator.
Definition: schframe.h:150
void OnSelectItem(wxCommandEvent &aEvent)
Definition: schframe.cpp:1315
bool RescueLegacyProject(bool aRunningOnDemand)
static wxPoint m_lastSheetPinPosition
Last sheet pin position.
Definition: schframe.h:181
void OnCreateBillOfMaterials(wxCommandEvent &event)
Definition: schframe.cpp:927
int EditSheetPin(SCH_SHEET_PIN *aSheetPin, bool aRedraw)
Display the dialog for editing the parameters of aSheetPin.
Definition: sheetlab.cpp:61
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.
Definition: netform.cpp:46
bool CreateArchiveLibrary(const wxString &aFileName)
Create a library aFileName that contains all components used in the current schematic.
Definition: libarch.cpp:67
void SetPrintDialogSize(const wxSize &aSize)
Definition: schframe.h:651
void SetExecFlags(const int aFlags)
Set (adds) specified flags for next execution of external generator of the netlist or bom...
Definition: schframe.h:1371
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.
bool m_spiceAjustPassiveValues
Use netcodes (net number) as net names when generating spice net lists.
Definition: schframe.h:172
void Process_Special_Functions(wxCommandEvent &event)
Definition: schedit.cpp:54
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.
COMPONENT_ORIENTATION_T
enum used in RotationMiroir()
Definition: schframe.h:71
void InstallConfigFrame(wxCommandEvent &event)
void SetNetListerCommand(const wxString &aCommand)
Definition: schframe.h:1359
void SetSpiceAjustPassiveValues(bool aEnable)
Definition: schframe.h:249
bool SetCurrentSheetHighlightFlags()
Set or reset the BRIGHTENED of connected objects inside the current sheet, according to the highlight...
void SetShowAllPins(bool aEnable)
Definition: schframe.h:241
void ReCreateVToolbar() override
Definition: tool_sch.cpp:183
void AnnotateComponents(bool aAnnotateSchematic, ANNOTATE_ORDER_T aSortOption, ANNOTATE_OPTION_T aAlgoOption, bool aResetAnnotation, bool aRepairTimestamps, bool aLockUnits)
Annotate the components in the schematic that are not currently annotated.
Definition: annotate.cpp:60
void GetSchematicFromUndoList(wxCommandEvent &event)
Perform an undo the last edition.
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:358
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:829
EDA_HOTKEY * GetHotKeyDescription(int aCommand) const override
>
void ConvertPart(SCH_COMPONENT *DrawComponent, wxDC *DC)
Definition: getpart.cpp:381
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:128