KiCad PCB EDA Suite
sch_edit_frame.h
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2015 Jean-Pierre Charras, jp.charras wanadoo.fr
5  * Copyright (C) 2008 Wayne Stambaugh <stambaughw@gmail.com>
6  * Copyright (C) 2004-2021 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 
26 #ifndef SCH_EDIT_FRAME_H
27 #define SCH_EDIT_FRAME_H
28 
29 #include <stddef.h>
30 #include <vector>
31 #include <wx/cmndata.h>
32 #include <wx/event.h>
33 #include <wx/gdicmn.h>
34 #include <wx/string.h>
35 #include <wx/utils.h>
36 
37 #include <config_params.h>
38 #include <core/typeinfo.h>
39 #include <eda_base_frame.h>
40 #include <eeschema_settings.h>
41 #include <math/box2.h>
42 #include <sch_base_frame.h>
43 #include <sch_text.h> // enum PINSHEETLABEL_SHAPE
44 #include <template_fieldnames.h>
45 #include <undo_redo_container.h>
46 
47 class STATUS_TEXT_POPUP;
48 
49 class SCH_ITEM;
50 class EDA_ITEM;
51 class SCH_LINE;
52 class SCH_TEXT;
53 class SCH_BITMAP;
54 class SCH_SHEET;
55 class SCH_SHEET_PATH;
56 class SCH_SHEET_PIN;
57 class SCH_COMPONENT;
58 class SCH_FIELD;
59 class SCH_JUNCTION;
60 class SCHEMATIC;
61 class DIALOG_SCH_FIND;
62 class wxFindReplaceData;
63 class RESCUER;
65 
66 // @todo Move this to transform alone with all of the transform manipulation code.
69  CMP_NORMAL, // Normal orientation, no rotation or mirror
70  CMP_ROTATE_CLOCKWISE, // Rotate -90
72  CMP_ORIENT_0, // No rotation and no mirror id CMP_NORMAL
73  CMP_ORIENT_90, // Rotate 90, no mirror
74  CMP_ORIENT_180, // Rotate 180, no mirror
75  CMP_ORIENT_270, // Rotate -90, no mirror
76  CMP_MIRROR_X = 0x100, // Mirror around X axis
77  CMP_MIRROR_Y = 0x200 // Mirror around Y axis
78 };
79 
80 
86 };
88 
89 
96 };
98 
99 
104 };
105 
106 
111 };
112 
113 
118 {
119  // The schematic editor control class should be able to access some internal
120  // functions of the editor frame.
121  friend class SCH_EDITOR_CONTROL;
122 
123 private:
126 
127  wxPageSetupDialogData m_pageSetupData;
130  int m_exec_flags;
132 
135 
136 protected:
142  bool doAutoSave() override;
143 
147  bool isAutoSaveRequired() const override;
148 
152  void sendNetlistToCvpcb();
153 
154  void onSize( wxSizeEvent& aEvent );
155 
156 public:
157  SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent );
158  ~SCH_EDIT_FRAME() override;
159 
160  SCH_SCREEN* GetScreen() const override;
161 
162  SELECTION& GetCurrentSelection() override;
163 
164  SCHEMATIC& Schematic() const;
165 
169  bool GetShowAllPins() const override;
170 
174  void SaveProjectSettings() override;
175 
181  bool LoadProjectSettings();
182 
183  void ShowSchematicSetupDialog( const wxString& aInitialPage = wxEmptyString );
184 
185  void LoadSettings( APP_SETTINGS_BASE* aCfg ) override;
186  void SaveSettings( APP_SETTINGS_BASE* aCfg ) override;
187 
188  void CreateScreens();
189  void ReCreateHToolbar() override;
190  void ReCreateVToolbar() override;
191  void ReCreateOptToolbar() override;
192  void ReCreateMenuBar() override;
193 
194  void setupUIConditions() override;
195 
201  bool IsContentModified() override;
202 
207  void OnModify() override;
208 
212  void RecordERCExclusions();
213 
217  void ResolveERCExclusions();
218 
222  wxString GetScreenDesc() const override;
223 
242  void ExecuteRemoteCommand( const char* cmdline ) override;
243 
244  void KiwayMailIn( KIWAY_EXPRESS& aEvent ) override;
245 
250  void AddItemToScreenAndUndoList( SCH_SCREEN* aScreen, SCH_ITEM* aItem, bool aUndoAppend );
251 
255  void ShowFindReplaceDialog( bool aReplace );
256 
262  void UpdateHierarchyNavigator( bool aForceUpdate = false );
263 
268 
269  void ShowFindReplaceStatus( const wxString& aMsg, int aStatusTime );
270  void ClearFindReplaceStatus();
271 
275  wxFindReplaceData* GetFindReplaceData();
276 
280  void OnFindDialogClose();
281 
293  bool BreakSegment( SCH_LINE* aSegment, const wxPoint& aPoint,
294  SCH_LINE** aNewSegment = NULL, SCH_SCREEN* aScreen = nullptr );
295 
306  bool BreakSegments( const wxPoint& aPoint, SCH_SCREEN* aScreen = nullptr );
307 
317  bool BreakSegmentsOnJunctions( SCH_SCREEN* aScreen = nullptr );
318 
323  void TestDanglingEnds();
324 
337  void SendMessageToPCBNEW( EDA_ITEM* aObjectToSync, SCH_COMPONENT* aPart );
338 
344  void SendCrossProbeNetName( const wxString& aNetName );
345 
350  void SetCrossProbeConnection( const SCH_CONNECTION* aConnection );
351 
356 
358  {
359  return m_highlightedConn;
360  }
361 
362  void SetHighlightedConnection( const SCH_CONNECTION* aConnection )
363  {
364  m_highlightedConn = aConnection;
365  }
366 
375  bool ReadyToNetlist( const wxString& aAnnotateMessage );
376 
393  bool WriteNetListFile( int aFormat,
394  const wxString& aFullFileName,
395  unsigned aNetlistOptions,
396  REPORTER* aReporter = NULL );
397 
404  void DeleteAnnotation( bool aCurrentSheetOnly, bool* appendUndo );
405 
434  void AnnotateComponents( bool aAnnotateSchematic, ANNOTATE_ORDER_T aSortOption,
435  ANNOTATE_OPTION_T aAlgoOption, int aStartNumber,
436  bool aResetAnnotation, bool aRepairTimestamps, bool aLockUnits,
437  REPORTER& aReporter );
438 
455  int CheckAnnotate( ANNOTATION_ERROR_HANDLER aErrorHandler, bool aOneSheetOnly = false );
456 
462  int ModalAnnotate( const wxString& aMessage );
463 
464  // Functions used for hierarchy handling
466 
467  void SetCurrentSheet( const SCH_SHEET_PATH& aSheet );
468 
472  void HardRedraw() override;
473 
477  void DisplayCurrentSheet();
478 
483 
489  void OnPageSettingsChange() override;
490 
499 
505  void SetSheetNumberAndCount();
506 
507  wxPageSetupDialogData& GetPageSetupData() { return m_pageSetupData; }
508 
509  void NewProject();
510  void LoadProject();
511 
512  void Save_File( bool doSaveAs = false );
513 
514  bool SaveProject();
515 
516  bool OpenProjectFiles( const std::vector<wxString>& aFileSet, int aCtl = 0 ) override;
517 
518  wxString GetCurrentFileName() const override;
519 
525  bool AppendSchematic();
526 
536  bool SaveEEFile( SCH_SHEET* aSheet,
537  bool aSaveUnderNewName = false );
538 
539 
547  bool AskToSaveChanges();
548 
549  SCH_JUNCTION* AddJunction( SCH_SCREEN* aScreen, const wxPoint& aPos, bool aAppendToUndo,
550  bool aFinal = true );
551 
561  bool SchematicCleanUp( SCH_SCREEN* aScreen = nullptr );
562 
573  bool TrimWire( const wxPoint& aStart, const wxPoint& aEnd );
574 
580  std::vector<wxPoint> GetSchematicConnections();
581 
582  void OnOpenPcbnew( wxCommandEvent& event );
583  void OnOpenCvpcb( wxCommandEvent& event );
584  void OnUpdatePCB( wxCommandEvent& event );
585  void OnAnnotate( wxCommandEvent& event );
586 
587 private:
588  // Sets up the tool framework
589  void setupTools();
590 
591  void OnExit( wxCommandEvent& event );
592 
593  void OnLoadFile( wxCommandEvent& event );
594  void OnAppendProject( wxCommandEvent& event );
595  void OnImportProject( wxCommandEvent& event );
596 
597  void OnClearFileHistory( wxCommandEvent& aEvent );
598 
599  bool canCloseWindow( wxCloseEvent& aCloseEvent ) override;
600  void doCloseWindow() override;
601 
610  void UpdateTitle();
611 
615  void initScreenZoom();
616 
625  bool checkForNoFullyDefinedLibIds( SCH_SHEET* aSheet );
626 
633  bool importFile( const wxString& aFileName, int aFileType );
634 
639  void mapExistingAnnotation( std::map<wxString, wxString>& aMap );
640 
641 public:
650  bool CheckSheetForRecursion( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHierarchy );
651 
663  bool AllowCaseSensitiveFileNameClashes( const wxString& aSchematicFileName );
664 
693  bool EditSheetProperties( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHierarchy,
694  bool* aClearAnnotationNewItems );
695 
696  void InitSheet( SCH_SHEET* aSheet, const wxString& aNewFilename );
697 
742  bool LoadSheetFromFile( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHierarchy,
743  const wxString& aFileName );
744 
751  void DeleteJunction( SCH_ITEM* aItem, bool aAppend = false );
752 
753  void ConvertPart( SCH_COMPONENT* aComponent );
754 
755  void SelectUnit( SCH_COMPONENT* aComponent, int aUnit );
756 
757  /* Undo - redo */
758 
762  void StartNewUndo();
763 
779  void SaveCopyInUndoList( SCH_SCREEN* aScreen,
780  SCH_ITEM* aItemToCopy,
781  UNDO_REDO aTypeCommand,
782  bool aAppend );
783 
791  void SaveCopyInUndoList( const PICKED_ITEMS_LIST& aItemsList,
792  UNDO_REDO aTypeCommand,
793  bool aAppend );
794 
801 
814  void ClearUndoORRedoList( UNDO_REDO_LIST whichList, int aItemCount = -1 ) override;
815 
819  void SaveCopyForRepeatItem( SCH_ITEM* aItem );
820 
827 
828  EDA_ITEM* GetItem( const KIID& aId ) override;
829 
835 
845  bool CreateArchiveLibraryCacheFile( bool aUseCurrentSheetFilename = false );
846 
853  bool CreateArchiveLibrary( const wxString& aFileName );
854 
860  virtual void PrintPage( const RENDER_SETTINGS* aSettings ) override;
861 
862  void SetNetListerCommand( const wxString& aCommand ) { m_netListerCommand = aCommand; }
863 
867  void DefaultExecFlags() { m_exec_flags = wxEXEC_SYNC; }
868 
874  void SetExecFlags( const int aFlags ) { m_exec_flags |= aFlags; }
875 
882  void ClearExecFlags( const int aFlags ) { m_exec_flags &= ~( aFlags ); }
883 
884  wxString GetNetListerCommand() const { return m_netListerCommand; }
885 
889  void RecalculateConnections( SCH_CLEANUP_FLAGS aCleanupFlags );
890 
894  void InstallPreferences( PAGED_DIALOG* aParent, PANEL_HOTKEYS_EDITOR* aHotkeysPanel ) override;
895 
899  void CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged ) override;
900 
902 
903  void ShowChangedLanguage() override;
904 
905  void SetScreen( BASE_SCREEN* aScreen ) override;
906 
907  const BOX2I GetDocumentExtents( bool aIncludeAllVisible = true ) const override;
908 
909  void FixupJunctions();
910 
911  void FocusOnItem( SCH_ITEM* aItem );
912 
920  void UpdateSymbolFromEditor( const LIB_PART& aSymbol );
921 
928 
929  void ShowAllIntersheetRefs( bool aShow );
930 
931  DECLARE_EVENT_TABLE()
932 };
933 
934 
935 #endif // SCH_EDIT_FRAME_H
void SetCurrentSheet(const SCH_SHEET_PATH &aSheet)
bool ReadyToNetlist(const wxString &aAnnotateMessage)
Checks if we are ready to write a netlist file for the current schematic.
bool CheckSheetForRecursion(SCH_SHEET *aSheet, SCH_SHEET_PATH *aHierarchy)
Verify that aSheet will not cause a recursion error in aHierarchy.
Definition: sheet.cpp:44
wxString m_netListerCommand
Command line to call a custom net list generator.
void ShowFindReplaceStatus(const wxString &aMsg, int aStatusTime)
int CheckAnnotate(ANNOTATION_ERROR_HANDLER aErrorHandler, bool aOneSheetOnly=false)
Check for annotation errors.
SCH_FIELD instances are attached to a component and provide a place for the component's value,...
Definition: sch_field.h:51
void OnOpenCvpcb(wxCommandEvent &event)
void onSize(wxSizeEvent &aEvent)
void Save_File(bool doSaveAs=false)
bool SchematicCleanUp(SCH_SCREEN *aScreen=nullptr)
Performs routine schematic cleaning including breaking wire and buses and deleting identical objects ...
SCHEMATIC * m_schematic
The currently loaded schematic.
Carry a payload from one KIWAY_PLAYER to another within a PROJECT.
Definition: kiway_express.h:38
void DefaultExecFlags()
Reset the execution flags to defaults for external netlist and bom generators.
void UpdateNetHighlightStatus()
HIERARCHY_NAVIG_DLG * FindHierarchyNavigator()
bool OpenProjectFiles(const std::vector< wxString > &aFileSet, int aCtl=0) override
Open a project or set of files given by aFileList.
void mapExistingAnnotation(std::map< wxString, wxString > &aMap)
Fills a map of uuid -> reference from the currently loaded schematic.
void OnLoadFile(wxCommandEvent &event)
wxFindReplaceData * GetFindReplaceData()
Get the find criteria (as set by the dialog).
void SendCrossProbeNetName(const wxString &aNetName)
Sends a net name to pcbnew for highlighting.
bool WriteNetListFile(int aFormat, const wxString &aFullFileName, unsigned aNetlistOptions, REPORTER *aReporter=NULL)
Create a netlist file.
SELECTION & GetCurrentSelection() override
Get the current selection from the canvas area.
void RecalculateConnections(SCH_CLEANUP_FLAGS aCleanupFlags)
Generates the connection data for the entire schematic hierarchy.
virtual void PrintPage(const RENDER_SETTINGS *aSettings) override
Plot or print the current sheet to the clipboard.
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
void SaveProjectSettings() override
Save changes to the project settings to the project (.pro) file.
COMPONENT_ORIENTATION_T
enum used in RotationMiroir()
Holds all the data relating to one schematic A schematic may consist of one or more sheets (and one r...
Definition: schematic.h:58
void StartNewUndo()
Create a new, blank stack for future Undo commands to be pushed to.
ANNOTATE_ORDER_T
Schematic annotation order options.
bool BreakSegments(const wxPoint &aPoint, SCH_SCREEN *aScreen=nullptr)
Checks every wire and bus for a intersection at aPoint and break into two segments at aPoint if an in...
void SetScreen(BASE_SCREEN *aScreen) override
const SCH_CONNECTION * GetHighlightedConnection() const
bool BreakSegment(SCH_LINE *aSegment, const wxPoint &aPoint, SCH_LINE **aNewSegment=NULL, SCH_SCREEN *aScreen=nullptr)
Breaks a single segment into two at the specified point.
void ReCreateMenuBar() override
Recreates the menu bar.
Extension of STATUS_POPUP for displaying a single line text.
Definition: status_popup.h:79
void SendCrossProbeClearHighlight()
Tells PcbNew to clear the existing highlighted net, if one exists.
void AnnotateComponents(bool aAnnotateSchematic, ANNOTATE_ORDER_T aSortOption, ANNOTATE_OPTION_T aAlgoOption, int aStartNumber, bool aResetAnnotation, bool aRepairTimestamps, bool aLockUnits, REPORTER &aReporter)
Annotate the components in the schematic that are not currently annotated.
const BOX2I GetDocumentExtents(bool aIncludeAllVisible=true) const override
Returns bbox of document with option to not include some items.
bool AskToSaveChanges()
Checks if any of the screens has unsaved changes and asks the user whether to save or drop them.
void ResolveERCExclusions()
Update markers to match recorded exclusions.
EDA_ITEM * GetItem(const KIID &aId) override
Fetch an item by KIID.
void UpdateTitle()
Set the main window title bar text.
Annotate incrementally using the first free reference number.
void OnAppendProject(wxCommandEvent &event)
void InitSheet(SCH_SHEET *aSheet, const wxString &aNewFilename)
Definition: sheet.cpp:93
void setupUIConditions() override
Setup the UI conditions for the various actions and their controls in this frame.
void DrawCurrentSheetToClipboard()
Use the wxWidgets print code to draw an image of the current sheet onto the clipboard.
Definition: sheet.cpp:481
SCH_CLEANUP_FLAGS
Schematic editor (Eeschema) main window.
void OnPageSettingsChange() override
Called when modifying the page settings.
void DisplayCurrentSheet()
Draw the current sheet on the display.
Definition: hierarch.cpp:289
A pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:64
void OnFindDialogClose()
Notification that the Find dialog has closed.
bool canCloseWindow(wxCloseEvent &aCloseEvent) override
void DeleteAnnotation(bool aCurrentSheetOnly, bool *appendUndo)
Clear the current component annotation.
bool importFile(const wxString &aFileName, int aFileType)
Load the given filename but sets the path to the current project path.
bool SaveEEFile(SCH_SHEET *aSheet, bool aSaveUnderNewName=false)
Save aSheet to a schematic file.
UNDO_REDO
Undo Redo considerations: Basically we have 3 cases New item Deleted item Modified item there is also...
void OnImportProject(wxCommandEvent &event)
SCH_JUNCTION * AddJunction(SCH_SCREEN *aScreen, const wxPoint &aPos, bool aAppendToUndo, bool aFinal=true)
SCH_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
wxString GetScreenDesc() const override
Return a human-readable description of the current screen.
Handle actions specific to the schematic editor.
void ShowChangedLanguage() override
Redraw the menus and what not in current language.
void OnClearFileHistory(wxCommandEvent &aEvent)
void SendMessageToPCBNEW(EDA_ITEM *aObjectToSync, SCH_COMPONENT *aPart)
Send a message to Pcbnew via a socket connection.
Definition: kiid.h:44
void doCloseWindow() override
void ReCreateHToolbar() override
bool LoadSheetFromFile(SCH_SHEET *aSheet, SCH_SHEET_PATH *aHierarchy, const wxString &aFileName)
Load a the KiCad schematic file aFileName into the sheet aSheet.
Definition: sheet.cpp:101
bool AllowCaseSensitiveFileNameClashes(const wxString &aSchematicFileName)
Check aSchematicFileName for a potential file name case sensitivity clashes.
Definition: sheet.cpp:553
void UpdateSymbolFromEditor(const LIB_PART &aSymbol)
Update the LIB_PART of the currently selected symbol.
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
Definition: app_settings.h:99
#define NULL
void TestDanglingEnds()
Test all of the connectable objects in the schematic for unused connection points.
void HardRedraw() override
Rebuild the GAL and redraw the screen.
wxPageSetupDialogData m_pageSetupData
Handles how to draw a screen (a board, a schematic ...)
Definition: base_screen.h:40
Annotate by position of component in the schematic sheet object list.
void initScreenZoom()
Initialize the zoom value of the current screen and mark the screen as zoom-initialized.
void ShowAllIntersheetRefs(bool aShow)
SCHEMATIC & Schematic() const
void UpdateHierarchyNavigator(bool aForceUpdate=false)
Run the Hierarchy Navigator dialog.
Define a library symbol object.
Definition: lib_symbol.h:93
Base window classes and related definitions.
void SaveCopyForRepeatItem(SCH_ITEM *aItem)
Clone aItem and owns that clone in this container.
bool AppendSchematic()
Import a KiCad schematic into the current sheet.
bool CreateArchiveLibraryCacheFile(bool aUseCurrentSheetFilename=false)
Create a symbol library file with the name of the root document plus the '-cache' suffix,...
Definition: libarch.cpp:42
void KiwayMailIn(KIWAY_EXPRESS &aEvent) override
Receive KIWAY_EXPRESS messages from other players.
std::vector< wxPoint > GetSchematicConnections()
Collects a unique list of all possible connection points in the schematic.
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
Definition: kiway.h:260
ANNOTATE_OPTION_T
Schematic annotation type options.
SCH_ITEM * m_item_to_repeat
Last item to insert by the repeat command.
DIALOG_SCH_FIND * m_findReplaceDialog
Define a sheet pin (label) used in sheets to create hierarchical schematics.
Definition: sch_sheet.h:85
bool isAutoSaveRequired() const override
Returns true if the schematic has been modified.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
wxPageSetupDialogData & GetPageSetupData()
A holder to handle information on schematic or board items.
void OnUpdatePCB(wxCommandEvent &event)
void ReCreateOptToolbar() override
Object to handle a bitmap image that can be inserted in a schematic.
Definition: sch_bitmap.h:42
void SelectUnit(SCH_COMPONENT *aComponent, int aUnit)
Definition: getpart.cpp:198
bool LoadProjectSettings()
Loads the KiCad project file (*.pro) settings specific to Eeschema.
const SCH_CONNECTION * m_highlightedConn
The highlighted net or bus, or nullptr.
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition: sch_sheet.h:219
bool doAutoSave() override
Save the schematic files that have been modified and not yet saved.
Annotate by Y position from top to bottom.
UNDO_REDO_LIST
Remove the aItemCount of old commands from aList and delete commands, pickers and picked items if nee...
bool BreakSegmentsOnJunctions(SCH_SCREEN *aScreen=nullptr)
Tests all junctions and bus entries in the schematic for intersections with wires and buses and break...
void OnAnnotate(wxCommandEvent &event)
Annotate using the first free reference number starting at the sheet number * 100.
void ClearFindReplaceStatus()
void SetHighlightedConnection(const SCH_CONNECTION *aConnection)
void ClearExecFlags(const int aFlags)
Clear (removes) specified flags that not needed for next execution of external generator of the netli...
SCH_ITEM * GetRepeatItem() const
Return the item which is to be repeated with the insert key.
int ModalAnnotate(const wxString &aMessage)
Run a modal version of the Annotate dialog for a specific purpose.
void AddItemToScreenAndUndoList(SCH_SCREEN *aScreen, SCH_ITEM *aItem, bool aUndoAppend)
Add an item to the schematic and adds the changes to the undo/redo container.
SCH_SEARCH_T
Schematic search type used by the socket link with Pcbnew.
void InstallPreferences(PAGED_DIALOG *aParent, PANEL_HOTKEYS_EDITOR *aHotkeysPanel) override
Allows Eeschema to install its preferences panels into the preferences dialog.
void OnExit(wxCommandEvent &event)
Segment description base class to describe items which have 2 end points (track, wire,...
Definition: sch_line.h:37
SCH_EDIT_FRAME(KIWAY *aKiway, wxWindow *aParent)
void SetSheetNumberAndCount()
Set the m_ScreenNumber and m_NumberOfScreens members for screens.
Each graphical item can have a SCH_CONNECTION describing its logical connection (to a bus or net).
void SaveCopyInUndoList(SCH_SCREEN *aScreen, SCH_ITEM *aItemToCopy, UNDO_REDO aTypeCommand, bool aAppend)
Create a copy of the current schematic item, and put it in the undo list.
void LoadSettings(APP_SETTINGS_BASE *aCfg) override
Load common frame parameters from a configuration file.
std::function< void(ERCE_T aType, const wxString &aMsg, SCH_REFERENCE *aItemA, SCH_REFERENCE *aItemB)> ANNOTATION_ERROR_HANDLER
Define a standard error handler for annotation errors.
void RecomputeIntersheetRefs()
Update the schematic's page reference map for all global labels, and refresh the labels so that they ...
void DeleteJunction(SCH_ITEM *aItem, bool aAppend=false)
Removes a given junction and heals any wire segments under the junction.
void RollbackSchematicFromUndo()
Performs an undo of the last edit WITHOUT logging a corresponding redo.
Annotate by X position from left to right.
Annotate using the first free reference number starting at the sheet number * 1000.
void ShowFindReplaceDialog(bool aReplace)
Run the Find or Find & Replace dialog.
void OnOpenPcbnew(wxCommandEvent &event)
Schematic symbol object.
Definition: sch_symbol.h:79
void SetCrossProbeConnection(const SCH_CONNECTION *aConnection)
Sends a connection (net or bus) to pcbnew for highlighting.
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:149
wxString GetCurrentFileName() const override
Get the full filename + path of the currently opened file in the frame.
~SCH_EDIT_FRAME() override
void ExecuteRemoteCommand(const char *cmdline) override
Execute a remote command sent by Pcbnew via a socket connection.
wxString GetUniqueFilenameForCurrentSheet()
bool EditSheetProperties(SCH_SHEET *aSheet, SCH_SHEET_PATH *aHierarchy, bool *aClearAnnotationNewItems)
Edit an existing sheet or add a new sheet to the schematic.
Definition: sheet.cpp:465
wxString GetNetListerCommand() const
SCH_SHEET_PATH & GetCurrentSheet() const
bool TrimWire(const wxPoint &aStart, const wxPoint &aEnd)
If any single wire passes through both points, remove the portion between the two points,...
void FocusOnItem(SCH_ITEM *aItem)
void PutDataInPreviousState(PICKED_ITEMS_LIST *aList)
Restore an undo or redo command to put data pointed by aList in the previous state.
void OnModify() override
Must be called after a schematic change in order to set the "modify" flag of the current screen and u...
void SaveSettings(APP_SETTINGS_BASE *aCfg) override
Save common frame parameters to a configuration data file.
bool IsContentModified() override
Get if the current schematic has been modified but not saved.
bool checkForNoFullyDefinedLibIds(SCH_SHEET *aSheet)
Verify that the symbol library links aSheet and all of it's child sheets have been remapped to the sy...
Definition: sheet.cpp:72
void ClearUndoORRedoList(UNDO_REDO_LIST whichList, int aItemCount=-1) override
Free the undo or redo list from aList element.
int m_exec_flags
Flags of the wxExecute() function to call a custom net list generator.
void ShowSchematicSetupDialog(const wxString &aInitialPage=wxEmptyString)
void CommonSettingsChanged(bool aEnvVarsChanged, bool aTextVarsChanged) override
Called after the preferences dialog is run.
bool CreateArchiveLibrary(const wxString &aFileName)
Create a library aFileName that contains all components used in the current schematic.
Definition: libarch.cpp:65
void SetExecFlags(const int aFlags)
Set (adds) specified flags for next execution of external generator of the netlist or bom.
A shim class between EDA_DRAW_FRAME and several derived classes: SYMBOL_EDIT_FRAME,...
void ConvertPart(SCH_COMPONENT *aComponent)
Definition: getpart.cpp:237
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition: sch_item.h:196
void SetNetListerCommand(const wxString &aCommand)
void RecordERCExclusions()
Scan existing markers and record data from any that are Excluded.
bool GetShowAllPins() const override
Allow edit frame to show/hide hidden pins.
void ReCreateVToolbar() override
void sendNetlistToCvpcb()
Send the kicad netlist over to CVPCB.