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-2017 Wayne Stambaugh <stambaughw@verizon.net>
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 
68 
71  CMP_NORMAL, // Normal orientation, no rotation or mirror
72  CMP_ROTATE_CLOCKWISE, // Rotate -90
74  CMP_ORIENT_0, // No rotation and no mirror id CMP_NORMAL
75  CMP_ORIENT_90, // Rotate 90, no mirror
76  CMP_ORIENT_180, // Rotate 180, no mirror
77  CMP_ORIENT_270, // Rotate -90, no mirror
78  CMP_MIRROR_X = 0x100, // Mirror around X axis
79  CMP_MIRROR_Y = 0x200 // Mirror around Y axis
80 };
81 
82 
88 };
90 
91 
98 };
100 
101 
109 };
110 
111 
112 #define SCH_EDIT_FRAME_NAME wxT( "SchematicFrame" )
113 
118 {
119 private:
123 
126  wxPageSetupDialogData m_pageSetupData;
127  wxFindReplaceData* m_findReplaceData;
137  wxArrayString m_findStringHistoryList;
146  wxString m_netListerCommand;
148  int m_exec_flags;
150 
153 
157 
160 
163 
166 
168  wxString m_netListFormat;
169 
172 
173  /* these are PROJECT specific, not schematic editor specific
174  wxString m_userLibraryPath;
175  wxArrayString m_componentLibFiles;
176  */
177 
179  static wxSize m_lastSheetPinTextSize;
181 
182 protected:
184 
188  const wxSize &GetLastSheetPinTextSize();
189 
196  virtual bool doAutoSave() override;
197 
202  virtual bool isAutoSaveRequired() const override;
203 
211  void addCurrentItemToList( bool aRedraw = true );
212 
213  void updateFindReplaceView( wxFindDialogEvent& aEvent );
214 
215  void backAnnotateFootprints( const std::string& aChangedSetOfReferences );
216 
223  bool prepareForNetlist();
224 
229  void sendNetlist();
230 
231 public:
232  SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent );
233  ~SCH_EDIT_FRAME();
234 
235  SCH_SCREEN* GetScreen() const override;
236 
237  void OnCloseWindow( wxCloseEvent& Event );
238 
239  bool GetForceHVLines() const { return m_forceHVLines; }
240  void SetForceHVLines( bool aForceHVdirection ) { m_forceHVLines = aForceHVdirection; }
241 
242  bool GetShowAllPins() const { return m_showAllPins; }
243 
244  void SetShowAllPins( bool aEnable ) { m_showAllPins = aEnable; }
245 
246  const wxString GetNetListFormatName() const { return m_netListFormat; }
247 
248  void SetNetListFormatName( const wxString& aFormat ) { m_netListFormat = aFormat; }
249 
251 
252  void SetSpiceAjustPassiveValues( bool aEnable ) { m_spiceAjustPassiveValues = aEnable; }
253 
254  /* These are PROJECT specific, not schematic editor specific
255  wxString GetUserLibraryPath() const { return m_userLibraryPath; }
256  void SetUserLibraryPath( const wxString& aPath ) { m_userLibraryPath = aPath; }
257  const wxArrayString& GetComponentLibraries() const { return m_componentLibFiles; }
258  void SetComponentLibraries( const wxArrayString& aList ) { m_componentLibFiles = aList; }
259  */
260 
262  const wxString& GetPlotDirectoryName() const { return m_plotDirectoryName; }
263  void SetPlotDirectoryName( const wxString& aDirName ) { m_plotDirectoryName = aDirName; }
264 
265  void Process_Special_Functions( wxCommandEvent& event );
266  void Process_Config( wxCommandEvent& event );
267  void OnSelectTool( wxCommandEvent& aEvent );
268 
269  bool GeneralControl( wxDC* aDC, const wxPoint& aPosition, EDA_KEY aHotKey = 0 ) override;
270 
281 
287  void SaveProjectSettings( bool aAskForSave ) override;
288 
295  bool LoadProjectFile();
296 
303  static wxString GetDefaultFieldName( int aFieldNdx );
304 
316  int AddTemplateFieldName( const TEMPLATE_FIELDNAME& aFieldName )
317  {
318  return m_TemplateFieldNames.AddTemplateFieldName( aFieldName );
319  }
320 
321 
327  {
328  return m_TemplateFieldNames.GetTemplateFieldNames();
329  }
330 
331 
337  {
338  return m_TemplateFieldNames;
339  }
340 
346  {
347  m_TemplateFieldNames.DeleteAllTemplateFieldNames();
348  }
349 
363 
364  void LoadSettings( wxConfigBase* aCfg ) override;
365  void SaveSettings( wxConfigBase* aCfg ) override;
366 
367  void RedrawActiveWindow( wxDC* DC, bool EraseBg ) override;
368 
369  void CreateScreens();
370  void ReCreateHToolbar() override;
371  void ReCreateVToolbar() override;
372  void ReCreateOptToolbar();
373  void ReCreateMenuBar() override;
374 
376  EDA_HOTKEY* GetHotKeyDescription( int aCommand ) const override;
377 
378  bool OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition, EDA_ITEM* aItem = NULL ) override;
379 
386  void OnModify();
387 
388  virtual wxString GetScreenDesc() const override;
389 
390  void InstallConfigFrame( wxCommandEvent& event );
391 
398  virtual void ExecuteRemoteCommand( const char* cmdline ) override;
399 
400  void KiwayMailIn( KIWAY_EXPRESS& aEvent ) override;
401 
402  void OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) override;
403  void OnLeftDClick( wxDC* aDC, const wxPoint& aPosition ) override;
404  bool OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu ) override;
405  void OnSelectOptionToolbar( wxCommandEvent& event );
406  double BestZoom() override;
407 
424  SCH_ITEM* LocateAndShowItem( const wxPoint& aPosition,
425  const KICAD_T aFilterList[] = SCH_COLLECTOR::AllItems,
426  int aHotKeyCommandId = 0 );
427 
444  SCH_ITEM* LocateItem( const wxPoint& aPosition,
445  const KICAD_T aFilterList[] = SCH_COLLECTOR::AllItems,
446  int aHotKeyCommandId = 0 );
447 
457  bool DeleteItemAtCrossHair( wxDC* aDC );
458 
459 
469  bool HighlightConnectionAtPosition( wxPoint aPosition );
470 
481  SCH_ITEM* FindComponentAndItem( const wxString& aReference,
482  bool aSearchHierarchy,
483  SCH_SEARCH_T aSearchType,
484  const wxString& aSearchText,
485  bool aWarpMouse );
486 
500  void SendMessageToPCBNEW( EDA_ITEM* aObjectToSync, SCH_COMPONENT* aPart );
501 
510  NETLIST_OBJECT_LIST* BuildNetListBase( bool updateStatusText = true );
511 
532  bool CreateNetlist( int aFormat,
533  const wxString& aFullFileName,
534  unsigned aNetlistOptions,
535  REPORTER* aReporter = NULL );
536 
555  bool WriteNetListFile( NETLIST_OBJECT_LIST* aConnectedItemsList,
556  int aFormat,
557  const wxString& aFullFileName,
558  unsigned aNetlistOptions,
559  REPORTER* aReporter = NULL );
560 
567  void DeleteAnnotation( bool aCurrentSheetOnly );
568 
597  void AnnotateComponents( bool aAnnotateSchematic, ANNOTATE_ORDER_T aSortOption,
598  ANNOTATE_OPTION_T aAlgoOption, bool aResetAnnotation,
599  bool aRepairTimestamps, bool aLockUnits );
600 
622  int CheckAnnotate( wxArrayString* aMessageList, bool aOneSheetOnly );
623 
624  // Functions used for hierarchy handling
626 
627  void SetCurrentSheet( const SCH_SHEET_PATH& aSheet );
628 
633  void DisplayCurrentSheet();
634 
643 
656 
663  void SetSheetNumberAndCount();
664 
668  void OnPrint( wxCommandEvent& event );
669 
670  wxPageSetupDialogData& GetPageSetupData() { return m_pageSetupData; }
671 
672  void SetPreviewPosition( const wxPoint& aPoint ) { m_previewPosition = aPoint; }
673  void SetPreviewSize( const wxSize& aSize ) { m_previewSize = aSize; }
675  const wxSize& GetPreviewSize() { return m_previewSize; }
676 
677  void SetPrintDialogPosition( const wxPoint& aPoint )
678  {
679  m_printDialogPosition = aPoint;
680  }
681 
682 
683  void SetPrintDialogSize( const wxSize& aSize ) { m_printDialogSize = aSize; }
685  const wxSize& GetPrintDialogSize() { return m_printDialogSize; }
686 
688  void SetPrintMonochrome( bool aMonochrome ) { m_printMonochrome = aMonochrome; }
690  void SetPrintSheetReference( bool aShow ) { m_printSheetReference = aShow; }
691 
692  // Plot functions:
693  void PlotSchematic( wxCommandEvent& event );
694 
695  // read and save files
696  void Save_File( wxCommandEvent& event );
697 
705  void OnSaveProject( wxCommandEvent& aEvent );
706 
707  bool OpenProjectFiles( const std::vector<wxString>& aFileSet, int aCtl = 0 ) override;
708 
715  bool AppendOneEEProject();
716 
729  bool LoadOneEEFile( SCH_SCREEN* aScreen, const wxString& aFullFileName, bool append = false );
730 
739 
761  bool ProcessCmpToFootprintLinkFile( const wxString& aFullFilename,
762  bool aForceVisibilityState,
763  bool aVisibilityState );
764 
779  bool SaveEEFile( SCH_SCREEN* aScreen,
780  bool aSaveUnderNewName = false,
781  bool aCreateBackupFile = CREATE_BACKUP_FILE );
782 
783  // General search:
784 
785  bool IsSearchCacheObsolete( const SCH_FIND_REPLACE_DATA& aSearchCriteria );
786 
787 
788 private:
789 
794  void OnAutoplaceFields( wxCommandEvent& aEvent );
795 
800  void OnMoveItem( wxCommandEvent& aEvent );
801 
807  void OnRotate( wxCommandEvent& aEvent );
808 
813  void OnEditItem( wxCommandEvent& aEvent );
814 
819  void OnDragItem( wxCommandEvent& aEvent );
820 
826  void OnOrient( wxCommandEvent& aEvent );
827 
828  void OnExit( wxCommandEvent& event );
829  void OnAnnotate( wxCommandEvent& event );
830  void OnErc( wxCommandEvent& event );
831  void OnCreateNetlist( wxCommandEvent& event );
832  void OnUpdatePCB( wxCommandEvent& event );
833  void OnSimulate( wxCommandEvent& event );
834  void OnCreateBillOfMaterials( wxCommandEvent& event );
835  void OnLaunchBomManager( wxCommandEvent& event );
836  void OnFindItems( wxCommandEvent& event );
837  void OnFindDialogClose( wxFindDialogEvent& event );
838  void OnFindDrcMarker( wxFindDialogEvent& event );
839  void OnFindCompnentInLib( wxFindDialogEvent& event );
840 
847  void OnFindSchematicItem( wxFindDialogEvent& aEvent );
848 
856  void OnFindReplace( wxFindDialogEvent& aEvent );
857 
858  void OnLoadFile( wxCommandEvent& event );
859  void OnLoadCmpToFootprintLinkFile( wxCommandEvent& event );
860  void OnNewProject( wxCommandEvent& event );
861  void OnLoadProject( wxCommandEvent& event );
862  void OnAppendProject( wxCommandEvent& event );
863  void OnOpenPcbnew( wxCommandEvent& event );
864  void OnOpenPcbModuleEditor( wxCommandEvent& event );
865  void OnOpenCvpcb( wxCommandEvent& event );
866  void OnOpenLibraryEditor( wxCommandEvent& event );
867  void OnRescueProject( wxCommandEvent& event );
868  void OnPreferencesOptions( wxCommandEvent& event );
869  void OnCancelCurrentCommand( wxCommandEvent& aEvent );
870 
871  void OnSelectItem( wxCommandEvent& aEvent );
872 
877  void OnCopySchematicItemRequest( wxCommandEvent& event );
878 
879  /* User interface update event handlers. */
880  void OnUpdateBlockSelected( wxUpdateUIEvent& event );
881  void OnUpdatePaste( wxUpdateUIEvent& event );
882  void OnUpdateHiddenPins( wxUpdateUIEvent& event );
883  void OnUpdateBusOrientation( wxUpdateUIEvent& event );
884  void OnUpdateSelectTool( wxUpdateUIEvent& aEvent );
885  void OnUpdateSave( wxUpdateUIEvent& aEvent );
886  void OnUpdateSaveSheet( wxUpdateUIEvent& aEvent );
887  void OnUpdateHierarchySheet( wxUpdateUIEvent& aEvent );
888 
900  void UpdateTitle();
901 
902  // Bus Entry
905  void SetBusEntryShape( wxDC* DC, SCH_BUS_ENTRY_BASE* BusEntry, char entry_shape );
906 
914  SCH_NO_CONNECT* AddNoConnect( wxDC* aDC, const wxPoint& aPosition );
915 
920  SCH_JUNCTION* AddJunction( wxDC* aDC, const wxPoint& aPosition, bool aPutInUndoList = false );
921 
929  void PrepareMoveItem( SCH_ITEM* aItem, wxDC* aDC );
930 
931  // Text, label, glabel
932  SCH_TEXT* CreateNewText( wxDC* aDC, int aType );
933  void EditSchematicText( SCH_TEXT* TextStruct );
934  void ChangeTextOrient( SCH_TEXT* aTextItem );
935 
942  void OnConvertTextType( wxCommandEvent& aEvent );
943 
952  void BeginSegment( wxDC* DC, int type );
953 
958  void EndSegment( wxDC* DC );
959 
964  void DeleteCurrentSegment( wxDC* DC );
965  void DeleteConnection( bool DeleteFullConnection );
966 
967  // graphic lines
968  void Edge( DRAWSEGMENT* Segment, wxDC* DC );
969  void SetNewWidth( DRAWSEGMENT* DrawSegm, wxDC* DC );
970  void Layer( DRAWSEGMENT* Segment, wxDC* DC );
971  DRAWSEGMENT* Begin_Edge( DRAWSEGMENT* Segment, wxDC* DC );
972 
973  // Images:
974  SCH_BITMAP* CreateNewImage( wxDC* aDC );
975  void MoveImage( SCH_BITMAP* aItem, wxDC* aDC );
976  void RotateImage( SCH_BITMAP* aItem );
984  void MirrorImage( SCH_BITMAP* aItem, bool Is_X_axis );
985  void EditImage( SCH_BITMAP* aItem );
986 
987  // Hierarchical Sheet & PinSheet
988  void InstallHierarchyFrame( wxPoint& pos );
989  SCH_SHEET* CreateSheet( wxDC* DC );
990  void ReSizeSheet( SCH_SHEET* Sheet, wxDC* DC );
991 
999  void RotateHierarchicalSheet( SCH_SHEET* aSheet, bool aRotCCW );
1000 
1009  void MirrorSheet( SCH_SHEET* aSheet, bool aFromXaxis );
1010 
1012  bool LoadCacheLibrary( const wxString& aFileName );
1013 
1014 public:
1040  bool EditSheet( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHierarchy );
1041 
1043 
1044 private:
1052  SCH_SHEET_PIN* CreateSheetPin( SCH_SHEET* aSheet, wxDC* aDC );
1053 
1061  int EditSheetPin( SCH_SHEET_PIN* aSheetPin, bool aRedraw );
1062 
1071  SCH_SHEET_PIN* ImportSheetPin( SCH_SHEET* aSheet, wxDC* aDC );
1072 
1073 public:
1079  void DeleteItem( SCH_ITEM* aItem );
1080 
1081  int GetLabelIncrement() const { return m_repeatLabelDelta; }
1082 
1083 private:
1084 
1101  SCH_COMPONENT* Load_Component( wxDC* aDC,
1102  const SCHLIB_FILTER* aFilter,
1103  SCH_BASE_FRAME::HISTORY_LIST& aHistoryList,
1104  bool aUseLibBrowser );
1105 
1112  void EditComponent( SCH_COMPONENT* aComponent );
1113 
1114 public:
1115 
1120  void OrientComponent( COMPONENT_ORIENTATION_T aOrientation = CMP_NORMAL );
1121 
1122 private:
1123  void OnSelectUnit( wxCommandEvent& aEvent );
1124  void ConvertPart( SCH_COMPONENT* DrawComponent, wxDC* DC );
1125  void SetInitCmp( SCH_COMPONENT* DrawComponent, wxDC* DC );
1126 
1133  void EditComponentFieldText( SCH_FIELD* aField );
1134 
1135  void RotateField( SCH_FIELD* aField );
1136 
1141  void PasteListOfItems( wxDC* DC );
1142 
1143  /* Undo - redo */
1144 public:
1145 
1174  void SaveCopyInUndoList( SCH_ITEM* aItemToCopy,
1175  UNDO_REDO_T aTypeCommand,
1176  const wxPoint& aTransformPoint = wxPoint( 0, 0 ) );
1177 
1187  void SaveCopyInUndoList( const PICKED_ITEMS_LIST& aItemsList,
1188  UNDO_REDO_T aTypeCommand,
1189  const wxPoint& aTransformPoint = wxPoint( 0, 0 ) );
1190 
1191 private:
1192 
1200  void PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRedoCommand );
1201 
1209  void GetSchematicFromRedoList( wxCommandEvent& event );
1210 
1217  void GetSchematicFromUndoList( wxCommandEvent& event );
1218 
1225  void copyBlockItems( PICKED_ITEMS_LIST& aItemsList );
1226 
1233  void addJunctionMenuEntries( wxMenu* aMenu, SCH_JUNCTION* aJunction );
1234 
1235 public:
1236  void Key( wxDC* DC, int hotkey, EDA_ITEM* DrawStruct );
1237 
1242  void InitBlockPasteInfos() override;
1243 
1252  virtual int BlockCommand( EDA_KEY aKey ) override;
1253 
1261  virtual void HandleBlockPlace( wxDC* DC ) override;
1262 
1275  virtual bool HandleBlockEnd( wxDC* aDC ) override;
1276 
1284  void RepeatDrawItem( wxDC* DC );
1285 
1290  void SetRepeatItem( SCH_ITEM* aItem );
1291 
1298 
1307  void SetUndoItem( const SCH_ITEM* aItem );
1308 
1309  SCH_ITEM* GetUndoItem() const { return m_undoItem; }
1310 
1319  void SaveUndoItemInUndoList( SCH_ITEM* aItem );
1320 
1330  bool CreateArchiveLibraryCacheFile( bool aUseCurrentSheetFilename = false );
1331 
1339  bool CreateArchiveLibrary( const wxString& aFileName );
1340 
1356  bool RescueProject( bool aRunningOnDemand );
1357 
1366  virtual void PrintPage( wxDC* aDC, LSET aPrintMask,
1367  bool aPrintMirrorMode, void* aData = NULL ) override;
1368 
1369  void SetSimulatorCommand( const wxString& aCommand ) { m_simulatorCommand = aCommand; }
1370 
1371  wxString GetSimulatorCommand() const { return m_simulatorCommand; }
1372 
1373  void SetNetListerCommand( const wxString& aCommand ) { m_netListerCommand = aCommand; }
1374 
1380  void DefaultExecFlags() { m_exec_flags = wxEXEC_SYNC; }
1381 
1388  void SetExecFlags( const int aFlags ) { m_exec_flags |= aFlags; }
1389 
1396  void ClearExecFlags( const int aFlags ) { m_exec_flags &= ~( aFlags ); }
1397 
1398  wxString GetNetListerCommand() const { return m_netListerCommand; }
1399 
1401  const static wxCursor CURSOR_PROBE;
1402 
1404  const static wxCursor CURSOR_TUNE;
1405 
1406  DECLARE_EVENT_TABLE()
1407 };
1408 
1409 
1410 #endif // WX_EESCHEMA_STRUCT_H
void OnLoadProject(wxCommandEvent &event)
Definition: schframe.cpp:1033
void SetCurrentSheet(const SCH_SHEET_PATH &aSheet)
Definition: schframe.cpp:574
void ReCreateOptToolbar()
Definition: tool_sch.cpp:270
void OnFindDrcMarker(wxFindDialogEvent &event)
Definition: find.cpp:58
SCH_NO_CONNECT * AddNoConnect(wxDC *aDC, const wxPoint &aPosition)
Function AddNoConnect add a no connect item to the current schematic sheet at aPosition.
Class SCH_BUS_WIRE_ENTRY.
void RepeatDrawItem(wxDC *DC)
Function RepeatDrawItem repeats 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:84
void OrientComponent(COMPONENT_ORIENTATION_T aOrientation=CMP_NORMAL)
Function OrientComponent rotates and mirrors a component.
Definition: getpart.cpp:275
const wxString GetNetListFormatName() const
Definition: schframe.h:246
wxString m_netListerCommand
Command line to call a custom net list generator.
Definition: schframe.h:147
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:651
Annotate using the first free reference number starting at the sheet number * 100.
Definition: schframe.h:95
void EditComponent(SCH_COMPONENT *aComponent)
Function EditComponent displays the edit component dialog to edit the parameters of aComponent...
void OnOpenCvpcb(wxCommandEvent &event)
Definition: schframe.cpp:1112
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:311
Class KIWAY_EXPRESS carries a payload from one KIWAY_PLAYER to another within a PROJECT.
Definition: kiway_express.h:39
void DefaultExecFlags()
Function DefaultExecFlags resets the execution flags to defaults for external netlist and bom generat...
Definition: schframe.h:1380
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()
Function sendNetlist sends the kicad netlist over to CVPCB.
const TEMPLATES & GetTemplates()
Function GetTemplates returns the field names template for read only access.
Definition: schframe.h:336
bool OpenProjectFiles(const std::vector< wxString > &aFileSet, int aCtl=0) override
NETLIST_OBJECT_LIST * BuildNetListBase(bool updateStatusText=true)
BuildNetListBase netlist generation: Creates a flat list which stores all connected objects...
void OnMoveItem(wxCommandEvent &aEvent)
Function OnMoveItem handles the ID_SCH_MOVE_ITEM event used to move schematic itams.
Definition: schedit.cpp:421
void OnFindItems(wxCommandEvent &event)
Definition: schframe.cpp:927
void DeleteItem(SCH_ITEM *aItem)
Function DeleteItem removes aItem from the current screen and saves it in the undo list...
SCH_JUNCTION * AddJunction(wxDC *aDC, const wxPoint &aPosition, bool aPutInUndoList=false)
Function AddJunction adds a new junction at aPosition.
wxString GetSimulatorCommand() const
Definition: schframe.h:1371
void OnLoadFile(wxCommandEvent &event)
Definition: schframe.cpp:983
Find an item by it's reference designator.
Definition: schframe.h:106
void OnUpdateSaveSheet(wxUpdateUIEvent &aEvent)
Definition: schframe.cpp:816
bool LoadCmpToFootprintLinkFile()
Function ReadCmpToFootprintLinkFile Loads a .cmp file from CvPcb and update the footprin field of com...
Definition: backanno.cpp:220
void OnUpdateHiddenPins(wxUpdateUIEvent &event)
Definition: schframe.cpp:798
void SetPlotDirectoryName(const wxString &aDirName)
Definition: schframe.h:263
void OnOpenPcbModuleEditor(wxCommandEvent &event)
Definition: schframe.cpp:1094
int AddTemplateFieldName(const TEMPLATE_FIELDNAME &aFieldName)
Function AddTemplateFieldName inserts or appends a wanted symbol field name into the field names temp...
Definition: schframe.h:316
static const KICAD_T AllItems[]
A scan list for all schematic items.
bool RescueProject(bool aRunningOnDemand)
Function RescueProject performs rescue operations to recover old projects from before certain changes...
PARAM_CFG_ARRAY m_projectFileParams
Definition: schframe.h:124
void SaveCopyInUndoList(SCH_ITEM *aItemToCopy, UNDO_REDO_T aTypeCommand, const wxPoint &aTransformPoint=wxPoint(0, 0))
Function SaveCopyInUndoList.
SCH_ITEM * GetRepeatItem() const
Function GetRepeatItem returns the item which is to be repeated with the insert key.
Definition: schframe.h:1297
void OnPreferencesOptions(wxCommandEvent &event)
void SetPrintDialogPosition(const wxPoint &aPoint)
Definition: schframe.h:677
wxArrayString m_findStringHistoryList
Definition: schframe.h:137
void SetForceHVLines(bool aForceHVdirection)
Definition: schframe.h:240
bool GetForceHVLines() const
Definition: schframe.h:239
void OnModify()
Function OnModify Must be called after a schematic change in order to set the "modify" flag of the cu...
Definition: schframe.cpp:762
virtual int BlockCommand(EDA_KEY aKey) override
Function BlockCommand Returns the block command internat code (BLOCK_MOVE, BLOCK_DUPLICATE...) corresponding to the keys pressed (ALT, SHIFT, SHIFT ALT ..) when block command is started by dragging the mouse.
void OnNewProject(wxCommandEvent &event)
Definition: schframe.cpp:999
int CheckAnnotate(wxArrayString *aMessageList, bool aOneSheetOnly)
Function CheckAnnotate checks for annotation errors.
Definition: annotate.cpp:187
void OnFindDialogClose(wxFindDialogEvent &event)
Definition: schframe.cpp:965
void ReCreateMenuBar() override
Function ReCreateMenuBar Creates recreates the menu bar.
wxString m_DefaultSchematicFileName
Definition: schframe.h:121
static wxSize m_lastSheetPinTextSize
Last sheet pin text size.
Definition: schframe.h:179
wxPoint GetLastSheetPinPosition() const
Definition: schframe.h:1042
bool GetPrintMonochrome()
Definition: schframe.h:687
wxPoint m_printDialogPosition
Definition: schframe.h:130
void OnLaunchBomManager(wxCommandEvent &event)
Definition: schframe.cpp:918
void OnConvertTextType(wxCommandEvent &aEvent)
Function OnCovertTextType is a 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:143
void copyBlockItems(PICKED_ITEMS_LIST &aItemsList)
Function copyBlockItems copies the list of block item.
void Layer(DRAWSEGMENT *Segment, wxDC *DC)
Find a component field.
Definition: schframe.h:108
static const wxCursor CURSOR_TUNE
Tuner cursor, used by circuit simulator
Definition: schframe.h:1404
PARAM_CFG_ARRAY & GetConfigurationSettings()
Function GetConfigurationSettings returns the Eeschema applications settings.
void OnCloseWindow(wxCloseEvent &Event)
Definition: schframe.cpp:613
void addCurrentItemToList(bool aRedraw=true)
Function addCurrentItemToList adds the item currently being edited to the schematic and adds the chan...
Definition: schframe.cpp:1283
void UpdateTitle()
Function UpdateTitle sets the main window title bar text.
Definition: schframe.cpp:1380
wxFindReplaceData * m_findReplaceData
Definition: schframe.h:127
void OnAppendProject(wxCommandEvent &event)
ANNOTATE_OPTION_T
Schematic annotation type options.
Definition: schframe.h:93
int m_repeatLabelDelta
Repeat label number increment step.
Definition: schframe.h:141
std::vector< COMPONENT_SELECTION > HISTORY_LIST
bool GetPrintSheetReference()
Definition: schframe.h:689
The common library.
void OnPrint(wxCommandEvent &event)
Show the print dialog.
Definition: schframe.cpp:1223
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:1369
void RotateHierarchicalSheet(SCH_SHEET *aSheet, bool aRotCCW)
Rotate a sheet on itself.
Definition: sheet.cpp:405
void BeginSegment(wxDC *DC, int type)
Function BeginSegment creates a new segment ( WIRE, BUS ) or terminates the current segment in progre...
void OnEditItem(wxCommandEvent &aEvent)
Function OnEditItem handles the ID_SCH_EDIT_ITEM event used to edit schematic itams.
Definition: schedit.cpp:943
SCH_ITEM * GetUndoItem() const
Definition: schframe.h:1309
Schematic editor (Eeschema) main window.
Definition: schframe.h:117
void SetPrintSheetReference(bool aShow)
Definition: schframe.h:690
SCH_COLLECTOR m_collectedItems
List of collected items.
Definition: schframe.h:142
SCH_TEXT * CreateNewText(wxDC *aDC, int aType)
Definition: edit_label.cpp:66
void MirrorImage(SCH_BITMAP *aItem, bool Is_X_axis)
Function MirrorImage Mirror a bitmap.
void SetPrintMonochrome(bool aMonochrome)
Definition: schframe.h:688
void OnRescueProject(wxCommandEvent &event)
Definition: schframe.cpp:1211
virtual void HandleBlockPlace(wxDC *DC) override
Function HandleBlockPlace Called after HandleBlockEnd, when a block command needs to be executed afte...
void DisplayCurrentSheet()
Function DisplayCurrentSheet draws the current sheet on the display.
Definition: hierarch.cpp:279
bool m_autoplaceAlign
align autoplaced fields to the grid
Definition: schframe.h:156
Class REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:61
TEMPLATES m_TemplateFieldNames
Definition: schframe.h:183
void EditComponentFieldText(SCH_FIELD *aField)
Function EditComponentFieldText displays the edit field dialog to edit the parameters of aField...
SCH_ITEM * LocateItem(const wxPoint &aPosition, const KICAD_T aFilterList[]=SCH_COLLECTOR::AllItems, int aHotKeyCommandId=0)
Function LocateItem checks for items at aPosition matching the types in aFilterList.
void OnUpdateBlockSelected(wxUpdateUIEvent &event)
Definition: schframe.cpp:773
Implementing DIALOG_SCH_FIND_BASE.
void OnCopySchematicItemRequest(wxCommandEvent &event)
Function OnCopySchematicItemRequest is the command event handler for duplicating the item at the curr...
Component library viewer main window.
Definition: viewlib_frame.h:49
void OnUpdateHierarchySheet(wxUpdateUIEvent &aEvent)
Definition: schframe.cpp:823
KICAD_T
Enum KICAD_T is the set of class identification values, stored in EDA_ITEM::m_StructType.
Definition: typeinfo.h:90
wxString GetNetListerCommand() const
Definition: schframe.h:1398
void SetRepeatItem(SCH_ITEM *aItem)
Function SetRepeatItem clones aItem and owns that clone in this container.
Definition: schframe.cpp:460
void PrepareMoveItem(SCH_ITEM *aItem, wxDC *aDC)
Function PrepareMoveItem start moving aItem using the mouse.
Definition: schedit.cpp:783
void SaveProjectSettings(bool aAskForSave) override
Function SaveProjectSettings saves changes to the project settings to the project (...
void InstallHierarchyFrame(wxPoint &pos)
Definition: hierarch.cpp:141
void SaveUndoItemInUndoList(SCH_ITEM *aItem)
Function SaveUndoItemInUndoList swaps the cloned item in member variable m_undoItem with aItem and sa...
Definition: schframe.cpp:598
void updateFindReplaceView(wxFindDialogEvent &aEvent)
Definition: find.cpp:453
void OnUpdateSave(wxUpdateUIEvent &aEvent)
Definition: schframe.cpp:808
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)
Function CreateSheetPin creates a new SCH_SHEET_PIN object and add it to aSheet at the current cursor...
Definition: sheetlab.cpp:110
Find a component pin in the schematic.
Definition: schframe.h:105
Class SCH_BUS_ENTRY_BASE.
Definition: sch_bus_entry.h:43
PARAM_CFG_ARRAY & GetProjectFileParametersList()
Function GetProjectFileParametersList returns 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:521
Class SCH_COLLECTOR.
void EndSegment(wxDC *DC)
Function EndSegment called to terminate a bus, wire, or line creation.
virtual wxString GetScreenDesc() const override
Definition: schframe.cpp:527
DRAWSEGMENT * Begin_Edge(DRAWSEGMENT *Segment, wxDC *DC)
SCH_SHEET_PATH * m_CurrentSheet
which sheet we are presently working on.
Definition: schframe.h:120
double BestZoom() override
Return the zoom level which displays the full page on screen.
Definition: schframe.cpp:707
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)
Function SendMessageToPcbnew send a remote to Pcbnew via a socket connection.
void OnFindSchematicItem(wxFindDialogEvent &aEvent)
Function OnFindSchematicItem finds 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)
Function LocateAndShowItem checks the schematic at aPosition in logical (drawing) units for a item ma...
const wxString & GetPlotDirectoryName() const
accessor to the destination directory to use when generating plot files.
Definition: schframe.h:262
void InitBlockPasteInfos() override
Function InitBlockPasteInfos initializes the parameters used by the block paste command.
SCH_SHEET * CreateSheet(wxDC *DC)
Definition: sheet.cpp:352
void DeleteAllTemplateFieldNames()
Function DeleteAllTemplateFieldNames removes all template field names.
Definition: schframe.h:345
Annotate by X position from left to right.
Definition: schframe.h:85
bool m_forceHVLines
force H or V directions for wires, bus, line
Definition: schframe.h:152
void SetInitCmp(SCH_COMPONENT *DrawComponent, wxDC *DC)
static wxString GetDefaultFieldName(int aFieldNdx)
Function GetDefaultFieldName returns a default symbol field name for field aFieldNdx for all componen...
Annotate by position of component in the schematic sheet object list.
Definition: schframe.h:87
void addJunctionMenuEntries(wxMenu *aMenu, SCH_JUNCTION *aJunction)
Function addJunctionMenuEntries adds 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:134
bool HighlightConnectionAtPosition(wxPoint aPosition)
Function HighlightConnectionAtPosition Highlight the connection found at aPosition.
static PINSHEETLABEL_SHAPE m_lastSheetPinType
Last sheet pin type.
Definition: schframe.h:178
const wxPoint & GetPreviewPosition()
Definition: schframe.h:674
bool AppendOneEEProject()
Function AppendOneEEProject read an entire project and loads it into the schematic editor without rep...
bool DeleteItemAtCrossHair(wxDC *aDC)
Function DeleteItemAtCrossHair delete the item found under the cross hair.
Definition: schedit.cpp:665
void DeleteCurrentSegment(wxDC *DC)
Function DeleteCurrentSegment erases the last segment at the current mouse position.
void DeleteAnnotation(bool aCurrentSheetOnly)
Function DeleteAnnotation clears the current component annotation.
Definition: annotate.cpp:39
void OnUpdateSelectTool(wxUpdateUIEvent &aEvent)
Definition: schedit.cpp:645
wxPageSetupDialogData m_pageSetupData
Definition: schframe.h:126
void OnUpdatePaste(wxUpdateUIEvent &event)
Definition: schframe.cpp:781
void OnRotate(wxCommandEvent &aEvent)
Function OnRotate handles the ID_SCH_ROTATE_CLOCKWISE and ID_SCH_ROTATE_COUNTERCLOCKWISE events used ...
Definition: schedit.cpp:837
bool prepareForNetlist()
Function prepareForNetlist verifies that annotation is complete so that a proper netlist is even poss...
Definitions for the Eeschema program SCH_SCREEN class.
bool GetShowAllPins() const
Definition: schframe.h:242
bool CreateNetlist(int aFormat, const wxString &aFullFileName, unsigned aNetlistOptions, REPORTER *aReporter=NULL)
Function CreateNetlist.
SCH_SHEET_PATH & GetCurrentSheet()
Definition: schframe.cpp:566
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)
Function FindComponentAndItem finds a component in the schematic and an item in this component...
Definition: find.cpp:108
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:86
void Edge(DRAWSEGMENT *Segment, wxDC *DC)
void OnSelectUnit(wxCommandEvent &aEvent)
Definition: getpart.cpp:309
bool SaveEEFile(SCH_SCREEN *aScreen, bool aSaveUnderNewName=false, bool aCreateBackupFile=CREATE_BACKUP_FILE)
Function SaveEEFile saves aScreen to a schematic file.
bool CreateArchiveLibraryCacheFile(bool aUseCurrentSheetFilename=false)
Function CreateArchiveLibraryCacheFile creates a library file with the name of the root document plus...
Definition: libarch.cpp:43
wxSize m_printDialogSize
Definition: schframe.h:131
const wxSize & GetLastSheetPinTextSize()
Initializing accessor for the pin text size.
Definition: sheetlab.cpp:50
void OnSaveProject(wxCommandEvent &aEvent)
Function OnSaveProject is the command event handler to save the entire project and create a component...
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
static const wxCursor CURSOR_PROBE
Probe cursor, used by circuit simulator
Definition: schframe.h:1401
SCH_ITEM * m_item_to_repeat
Last item to insert by the repeat command.
Definition: schframe.h:140
void RotateImage(SCH_BITMAP *aItem)
uint32_t EDA_KEY
Definition: common.h:52
wxPoint m_findDialogPosition
Definition: schframe.h:135
void backAnnotateFootprints(const std::string &aChangedSetOfReferences)
Definition: backanno.cpp:51
void OnAutoplaceFields(wxCommandEvent &aEvent)
Function OnAutoplaceFields handles the ID_AUTOPLACE_FIELDS event.
const TEMPLATE_FIELDNAMES & GetTemplateFieldNames()
Function GetTemplateFieldName returns a template fieldnames list for read only access.
bool LoadProjectFile()
Function LoadProjectFile loads the KiCad project file (*.pro) settings specific to Eeschema...
wxArrayString m_replaceStringHistoryList
Definition: schframe.h:138
void OnFindCompnentInLib(wxFindDialogEvent &event)
Class SCH_SHEET_PIN defines a sheet pin (label) used in sheets to create hierarchical schematics...
Definition: sch_sheet.h:62
virtual bool isAutoSaveRequired() const override
Function autoSaveRequired returns true if the schematic has been modified.
Definition: schframe.cpp:1263
Class SCH_SHEET_PATH.
void DeleteAllTemplateFieldNames()
Function DeleteAllTemplateFieldNames deletes the entire contents.
wxPageSetupDialogData & GetPageSetupData()
Definition: schframe.h:670
bool IsSearchCacheObsolete(const SCH_FIND_REPLACE_DATA &aSearchCriteria)
Definition: find.cpp:286
void EditSchematicText(SCH_TEXT *TextStruct)
bool m_printMonochrome
Print monochrome instead of grey scale.
Definition: schframe.h:132
Class PICKED_ITEMS_LIST is a holder to handle information on schematic or board items.
bool GetSpiceAjustPassiveValues() const
Definition: schframe.h:250
int m_foundItemIndex
An index to the last find item in the found items list m_foundItems.
Definition: schframe.h:159
const wxSize & GetPrintDialogSize()
Definition: schframe.h:685
void OnUpdatePCB(wxCommandEvent &event)
Definition: schframe.cpp:847
Annotate incrementally using the first free reference number.
Definition: schframe.h:94
void OnLoadCmpToFootprintLinkFile(wxCommandEvent &event)
Definition: schframe.cpp:992
void GetSchematicFromRedoList(wxCommandEvent &event)
Function GetSchematicFromRedoList Redo the last edition:
void SaveSettings(wxConfigBase *aCfg) override
Function SaveSettings saves common frame parameters to a configuration data file. ...
PARAM_CFG_ARRAY m_configSettings
Definition: schframe.h:125
SCH_BITMAP * CreateNewImage(wxDC *aDC)
void OnUpdateBusOrientation(wxUpdateUIEvent &event)
Definition: schframe.cpp:787
bool m_autoplaceFields
automatically place component fields
Definition: schframe.h:154
void LoadSettings(wxConfigBase *aCfg) override
Function LoadSettings loads common frame parameters from a configuration file.
void OnOpenLibraryEditor(wxCommandEvent &event)
Definition: schframe.cpp:1136
void SetPreviewPosition(const wxPoint &aPoint)
Definition: schframe.h:672
Class SCH_SHEET is the sheet symbol placed in a schematic, and is the entry point for a sub schematic...
Definition: sch_sheet.h:216
void PutDataInPreviousState(PICKED_ITEMS_LIST *aList, bool aRedoCommand)
Function PutDataInPreviousState is used in undo or redo command to put data pointed by List in the pr...
virtual bool doAutoSave() override
Function doAutoSave saves the schematic files that have been modified and not yet saved...
void OnCancelCurrentCommand(wxCommandEvent &aEvent)
Definition: schedit.cpp:496
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:97
void CreateScreens()
Definition: schframe.cpp:535
void OnAnnotate(wxCommandEvent &event)
Definition: schframe.cpp:829
bool m_showAllPins
Flag to indicate show hidden pins.
Definition: schframe.h:162
void ReSizeSheet(SCH_SHEET *Sheet, wxDC *DC)
Definition: sheet.cpp:380
void MoveImage(SCH_BITMAP *aItem, wxDC *aDC)
bool m_printSheetReference
Definition: schframe.h:133
wxString m_SelectedNetName
Definition: schframe.h:122
Find an item by it's value field.
Definition: schframe.h:107
This file is part of the common library.
wxPoint m_previewPosition
Definition: schframe.h:128
void ClearExecFlags(const int aFlags)
Function ClearExecFlags clears (removes) specified flags that not needed for next execution of extern...
Definition: schframe.h:1396
PINSHEETLABEL_SHAPE
Definition: sch_text.h:46
void SetNetListFormatName(const wxString &aFormat)
Definition: schframe.h:248
wxSize m_previewSize
Definition: schframe.h:129
The component library editor main window.
Definition: libeditframe.h:51
void SetNewWidth(DRAWSEGMENT *DrawSegm, wxDC *DC)
const TEMPLATE_FIELDNAMES & GetTemplateFieldNames()
Function GetTemplateFieldName returns a template field names list for read only access.
Definition: schframe.h:326
wxSize m_findDialogSize
Definition: schframe.h:136
SCH_COMPONENT * Load_Component(wxDC *aDC, const SCHLIB_FILTER *aFilter, SCH_BASE_FRAME::HISTORY_LIST &aHistoryList, bool aUseLibBrowser)
Function Load_Component loads from a library and places a component.
Definition: getpart.cpp:192
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:139
void OnExit(wxCommandEvent &event)
Definition: schframe.cpp:1217
int GetLabelIncrement() const
Definition: schframe.h:1081
Find a component in the schematic.
Definition: schframe.h:104
void OnLeftDClick(wxDC *aDC, const wxPoint &aPosition) override
Function OnLeftDClick called on a double click event from the drawpanel mouse handler if an editable ...
void SetPreviewSize(const wxSize &aSize)
Definition: schframe.h:673
SCH_EDIT_FRAME(KIWAY *aKiway, wxWindow *aParent)
void SetSheetNumberAndCount()
Function SetSheetNumberAndCount Set the m_ScreenNumber and m_NumberOfScreens members for screens must...
Definition: schframe.cpp:486
wxString m_plotDirectoryName
The name of the destination directory to use when generating plot files.
Definition: schframe.h:165
void OnLeftClick(wxDC *aDC, const wxPoint &aPosition) override
SCH_ITEM * m_undoItem
Copy of the current item being edited.
Definition: schframe.h:144
bool LoadOneEEFile(SCH_SCREEN *aScreen, const wxString &aFullFileName, bool append=false)
Function LoadOneEEFile loads the schematic (.sch) file aFullFileName into aScreen.
#define CREATE_BACKUP_FILE
Definition: wxstruct.h:59
void OnErc(wxCommandEvent &event)
Definition: schframe.cpp:835
bool m_autoplaceJustify
allow autoplace to change justification
Definition: schframe.h:155
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:103
void OnSelectTool(wxCommandEvent &aEvent)
Definition: schedit.cpp:518
void OnOpenPcbnew(wxCommandEvent &event)
Definition: schframe.cpp:1050
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:151
const wxPoint & GetPrintDialogPosition()
Definition: schframe.h:684
virtual void PrintPage(wxDC *aDC, LSET aPrintMask, bool aPrintMirrorMode, void *aData=NULL) override
Function PrintPage plots or prints the current sheet to the clipboard.
Definition: schframe.cpp:1238
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()
Function GetUniqueFilenameForCurrentSheet.
Definition: schframe.cpp:731
void EditImage(SCH_BITMAP *aItem)
void OnCreateNetlist(wxCommandEvent &event)
Definition: schframe.cpp:899
wxString m_simulatorCommand
Command line used to call the circuit simulator (gnucap, spice, ...)
Definition: schframe.h:145
Struct TEMPLATE_FIELDNAME holds a name of a component's field, field value, and default visibility...
void PasteListOfItems(wxDC *DC)
Function PastListOfItems pastes a list of items from the block stack.
Class SCH_BUS_WIRE_ENTRY.
wxString m_netListFormat
The name of the format to use when generating a net list.
Definition: schframe.h:168
bool OnRightClick(const wxPoint &aPosition, wxMenu *PopMenu) override
void OnDragItem(wxCommandEvent &aEvent)
Function OnDragItem handles the ID_SCH_DRAG_ITEM event used to drag schematic itams.
Definition: schedit.cpp:1064
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)
Function ImportSheetPin automatically creates a sheet pin from the hierarchical labels in the schemat...
Definition: sheetlab.cpp:140
const wxSize & GetPreviewSize()
Definition: schframe.h:675
virtual bool HandleBlockEnd(wxDC *aDC) override
Function HandleBlockEnd Handle the "end" of a block command, i.e.
void OnOrient(wxCommandEvent &aEvent)
Function OnOrient handles the ID_SCH_MIRROR_X, ID_SCH_MIRROR_Y, and ID_SCH_ORIENT_NORMAL events used ...
Definition: schedit.cpp:1135
bool EditSheet(SCH_SHEET *aSheet, SCH_SHEET_PATH *aHierarchy)
Function EditSheet is used to edit an existing sheet or add a new sheet to the schematic.
Definition: sheet.cpp:44
void MirrorSheet(SCH_SHEET *aSheet, bool aFromXaxis)
Function MirrorSheet Mirror a hierarchical sheet Mirroring is made around its centre.
Definition: sheet.cpp:432
void OnSimulate(wxCommandEvent &event)
Definition: simulate.cpp:29
void SetUndoItem(const SCH_ITEM *aItem)
Function SetUndoItem clones aItem which can be used to restore the state of the item being edited whe...
Definition: schframe.cpp:580
int m_exec_flags
Flags of the wxExecute() function to call a custom net list generator.
Definition: schframe.h:149
void OnSelectItem(wxCommandEvent &aEvent)
Definition: schframe.cpp:1248
static wxPoint m_lastSheetPinPosition
Last sheet pin position.
Definition: schframe.h:180
void OnCreateBillOfMaterials(wxCommandEvent &event)
Definition: schframe.cpp:913
int EditSheetPin(SCH_SHEET_PIN *aSheetPin, bool aRedraw)
Function EditSheetPin displays 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)
Function WriteNetListFile Create the netlist file.
Definition: netform.cpp:46
bool CreateArchiveLibrary(const wxString &aFileName)
Function CreateArchiveLibrary creates a library aFileName that contains all components used in the cu...
Definition: libarch.cpp:66
void SetPrintDialogSize(const wxSize &aSize)
Definition: schframe.h:683
void SetExecFlags(const int aFlags)
Function SetExecFlags sets (adds) specified flags for next execution of external generator of the net...
Definition: schframe.h:1388
Class SCH_BASE_FRAME is a shim class between EDA_DRAW_FRAME and several derived classes: LIB_EDIT_FRA...
bool m_spiceAjustPassiveValues
Use netcodes (net number) as net names when generating spice net lists.
Definition: schframe.h:171
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:70
void InstallConfigFrame(wxCommandEvent &event)
void SetNetListerCommand(const wxString &aCommand)
Definition: schframe.h:1373
void SetSpiceAjustPassiveValues(bool aEnable)
Definition: schframe.h:252
bool SetCurrentSheetHighlightFlags()
Function SetCurrentSheetHighlightFlags Set/reset the BRIGHTENED of connected objects inside the curre...
void SetShowAllPins(bool aEnable)
Definition: schframe.h:244
void ReCreateVToolbar() override
Definition: tool_sch.cpp:189
void AnnotateComponents(bool aAnnotateSchematic, ANNOTATE_ORDER_T aSortOption, ANNOTATE_OPTION_T aAlgoOption, bool aResetAnnotation, bool aRepairTimestamps, bool aLockUnits)
Function AnnotateComponents.
Definition: annotate.cpp:60
void GetSchematicFromUndoList(wxCommandEvent &event)
Function GetSchematicFromUndoList performs an undo the last edition:
void OnFindReplace(wxFindDialogEvent &aEvent)
Function OnReplace performs a search and replace of text in an item in the schematic matching the sea...
Definition: find.cpp:358
EDA_HOTKEY * GetHotKeyDescription(int aCommand) const override
>
void ConvertPart(SCH_COMPONENT *DrawComponent, wxDC *DC)
Definition: getpart.cpp:366
bool ProcessCmpToFootprintLinkFile(const wxString &aFullFilename, bool aForceVisibilityState, bool aVisibilityState)
Function ProcessStuffFile gets footprint info from each line in the Stuff File by Ref Desg...
Definition: backanno.cpp:131